nfets 0.0.13 → 0.0.14
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.
- package/README.md +4 -0
- package/dist/chunk-3WPW27WV.mjs +24 -0
- package/dist/chunk-VB5FKAWY.mjs +7 -0
- package/dist/{chunk-Z2TLKKAE.mjs → chunk-W6MRGYXP.mjs} +0 -1
- package/dist/chunk-XYOTPYUB.mjs +238 -0
- package/dist/core/index.cjs +261 -0
- package/dist/core/index.d.cts +576 -0
- package/dist/core/index.d.ts +576 -0
- package/dist/core/index.mjs +1 -0
- package/dist/either-CdHd_Yt7.d.cts +20 -0
- package/dist/either-CdHd_Yt7.d.ts +20 -0
- package/dist/index.cjs +82 -77
- package/dist/index.d.cts +70 -677
- package/dist/index.d.ts +70 -677
- package/dist/index.mjs +1 -260
- package/dist/nfe/index.cjs +30 -0
- package/dist/nfe/index.d.cts +4622 -0
- package/dist/nfe/index.d.ts +4622 -0
- package/dist/nfe/index.mjs +1 -0
- package/dist/src-NRIPS2N7.mjs +7 -0
- package/package.json +17 -6
- package/packages/nfe/schemas/PL_009_V4/110150_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_009_V4/Averb_v1.00.xsd +11 -0
- package/packages/nfe/schemas/PL_009_V4/CCe_v1.00.xsd +11 -0
- package/packages/nfe/schemas/PL_009_V4/EPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/EPP1.xml +13 -0
- package/packages/nfe/schemas/PL_009_V4/ERP1.xml +19 -0
- package/packages/nfe/schemas/PL_009_V4/EventoCancEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/EventoCancInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/EventoEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/EventoInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/MT_inutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/SuframaInternaliza_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/SuframaVistoria_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/confRecebto_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/consCad_v2.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/consGTIN_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/consNFeDest_v1.01.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/consReciNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/consReciNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/consSitNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/consSitNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/consStatServ_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/consStatServ_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/distDFeInt_v1.00.xsd +71 -0
- package/packages/nfe/schemas/PL_009_V4/distDFeInt_v1.01.xsd +97 -0
- package/packages/nfe/schemas/PL_009_V4/downloadNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/e110110_v1.00.xsd +58 -0
- package/packages/nfe/schemas/PL_009_V4/e110111_v1.00.xsd +42 -0
- package/packages/nfe/schemas/PL_009_V4/e110112_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_009_V4/e110130_v1.00.xsd +102 -0
- package/packages/nfe/schemas/PL_009_V4/e110131_v1.00.xsd +51 -0
- package/packages/nfe/schemas/PL_009_V4/e110140NFCe_v1.00.xsd +118 -0
- package/packages/nfe/schemas/PL_009_V4/e110140NFe_v1.00.xsd +124 -0
- package/packages/nfe/schemas/PL_009_V4/e110140_v1.00.xsd +124 -0
- package/packages/nfe/schemas/PL_009_V4/e110150_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_009_V4/e110192_v1.00.xsd +106 -0
- package/packages/nfe/schemas/PL_009_V4/e110193_v1.00.xsd +40 -0
- package/packages/nfe/schemas/PL_009_V4/e110750_v1.00.xsd +138 -0
- package/packages/nfe/schemas/PL_009_V4/e110751_v1.00.xsd +39 -0
- package/packages/nfe/schemas/PL_009_V4/e111500_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_009_V4/e111501_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_009_V4/e111502_v1.00.xsd +50 -0
- package/packages/nfe/schemas/PL_009_V4/e111503_v1.00.xsd +50 -0
- package/packages/nfe/schemas/PL_009_V4/e210200_v1.00.xsd +31 -0
- package/packages/nfe/schemas/PL_009_V4/e210210_v1.00.xsd +31 -0
- package/packages/nfe/schemas/PL_009_V4/e210220_v1.00.xsd +44 -0
- package/packages/nfe/schemas/PL_009_V4/e210240_v1.00.xsd +44 -0
- package/packages/nfe/schemas/PL_009_V4/e411500_v1.00.xsd +134 -0
- package/packages/nfe/schemas/PL_009_V4/e411501_v1.00.xsd +134 -0
- package/packages/nfe/schemas/PL_009_V4/e411502_v1.00.xsd +95 -0
- package/packages/nfe/schemas/PL_009_V4/e411503_v1.00.xsd +95 -0
- package/packages/nfe/schemas/PL_009_V4/e610130_v1.00.xsd +128 -0
- package/packages/nfe/schemas/PL_009_V4/e610131_v1.00.xsd +68 -0
- package/packages/nfe/schemas/PL_009_V4/e790700_v1.00.xsd +125 -0
- package/packages/nfe/schemas/PL_009_V4/e990900_v1.00.xsd +87 -0
- package/packages/nfe/schemas/PL_009_V4/e990910_v1.00.xsd +81 -0
- package/packages/nfe/schemas/PL_009_V4/envAverb_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/envCCe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/envCancelPProrrogNFe_v1.0.xsd +50 -0
- package/packages/nfe/schemas/PL_009_V4/envComprovanteEntregaNFe_v1.00.xsd +11 -0
- package/packages/nfe/schemas/PL_009_V4/envConfRecebto_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/envEPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/envEventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/envEventoCancEConf_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/envEventoCancEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/envEventoCancInsucessoNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/envEventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/envEventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/envEventoEConf_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/envEventoEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/envEventoInsucessoNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/envEvento_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/envFiscoNfe_v1.0.xsd +179 -0
- package/packages/nfe/schemas/PL_009_V4/envPProrrogNFe_v1.0.xsd +65 -0
- package/packages/nfe/schemas/PL_009_V4/envRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/envSuframaInternaliza_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/envSuframaVistoria_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/enviNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/enviNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/eventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/eventoCancEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/eventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/eventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/eventoEPEC_v0.01.xsd +267 -0
- package/packages/nfe/schemas/PL_009_V4/eventoEPEC_v1.00.xsd +231 -0
- package/packages/nfe/schemas/PL_009_V4/eventoEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/eventoRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/inutNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/inutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteAverb_v1.00.xsd +482 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteCCe_v1.00.xsd +382 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteCcgConsGTIN_v1.00.xsd +94 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteComprovanteEntregaNFe_v1.00.xsd +487 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteConfRecebto_v1.00.xsd +369 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteConsNFeDest_v1.01.xsd +483 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteConsSitNFe_v3.10.xsd +502 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteConsSitNFe_v4.00.xsd +502 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteConsStatServ_v3.10.xsd +98 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteConsStatServ_v4.00.xsd +98 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteConsultaCadastro_v2.00.xsd +404 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteDownloadNFe_v1.00.xsd +149 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEPEC_v1.00.xsd +423 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEventoAtorInteressado_v1.00.xsd +384 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEventoCancEConf_v1.00.xsd +296 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEventoCancEntregaNFe_v1.00.xsd +307 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEventoCancInsucessoNFe_v1.00.xsd +297 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEventoCancNFe_v1.00.xsd +358 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEventoCancSubst_v1.00.xsd +366 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEventoEConf_v1.00.xsd +296 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEventoEntregaNFe_v1.00.xsd +321 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEventoInsucessoNFe_v1.00.xsd +297 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteEvento_v1.00.xsd +335 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteInutNFe_v3.10.xsd +193 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteInutNFe_v4.00.xsd +193 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteInutNFe_v4.00_MT.xsd +200 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteNFe_v3.10.xsd +6060 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteNFe_v4.00.xsd +7339 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteRemIndus_v1.00.xsd +344 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteSuframaInternaliza_v1.00.xsd +642 -0
- package/packages/nfe/schemas/PL_009_V4/leiauteSuframaVistoria_v1.00.xsd +648 -0
- package/packages/nfe/schemas/PL_009_V4/nfe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/nfe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procAverbNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/procCCeNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/procComprovanteEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/procConfRecebtoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoCancEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoCancEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoCancInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procEventoNFe_v99.99.xsd +37 -0
- package/packages/nfe/schemas/PL_009_V4/procInutNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procInutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/procRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/prod_leiauteNFe_v4.00.xsd +6736 -0
- package/packages/nfe/schemas/PL_009_V4/resEvento_v1.00.xsd +94 -0
- package/packages/nfe/schemas/PL_009_V4/resEvento_v1.01.xsd +108 -0
- package/packages/nfe/schemas/PL_009_V4/resNFe_v1.00.xsd +110 -0
- package/packages/nfe/schemas/PL_009_V4/resNFe_v1.01.xsd +122 -0
- package/packages/nfe/schemas/PL_009_V4/retComprovanteEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/retConsCad_v2.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retConsGTIN_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retConsReciNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retConsReciNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retConsSitNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retConsSitNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retConsStatServ_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retConsStatServ_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retDistDFeInt_v1.00.xsd +84 -0
- package/packages/nfe/schemas/PL_009_V4/retDistDFeInt_v1.01.xsd +99 -0
- package/packages/nfe/schemas/PL_009_V4/retDownloadNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvAverb_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvAverb_v1.00_1.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvCCe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvCancelPProrrogNFe_v1.0.xsd +231 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvConfRecebto_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvEPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvEventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvEventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvEventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvEvento_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvFiscoNFe_v1.0.xsd +234 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvSuframaInternaliza_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnvSuframaVistoria_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnviNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEnviNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEventoCancEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEventoCancEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEventoCancInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEventoEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEventoEPEC_v0.01.xsd +207 -0
- package/packages/nfe/schemas/PL_009_V4/retEventoEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retEventoInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retInutNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retInutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/retPProrrogNFe_v1.0.xsd +233 -0
- package/packages/nfe/schemas/PL_009_V4/retconsNFeDest_v1.01.xsd +9 -0
- package/packages/nfe/schemas/PL_009_V4/tiposBasico_v1.03.xsd +873 -0
- package/packages/nfe/schemas/PL_009_V4/tiposBasico_v3.10.xsd +571 -0
- package/packages/nfe/schemas/PL_009_V4/tiposBasico_v4.00.xsd +598 -0
- package/packages/nfe/schemas/PL_009_V4/tiposBasicosCcgConsGTIN_v1.00.xsd +84 -0
- package/packages/nfe/schemas/PL_009_V4/tiposDistDFe_v1.00.xsd +217 -0
- package/packages/nfe/schemas/PL_009_V4/tiposDistDFe_v1.01.xsd +222 -0
- package/packages/nfe/schemas/PL_009_V4/xmldsig-core-schema_v1.01.xsd +98 -0
- package/packages/nfe/schemas/PL_010_V1/110150_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_010_V1/Averb_v1.00.xsd +11 -0
- package/packages/nfe/schemas/PL_010_V1/CCe_v1.00.xsd +11 -0
- package/packages/nfe/schemas/PL_010_V1/DFeTiposBasicos_v1.00.xsd +1088 -0
- package/packages/nfe/schemas/PL_010_V1/EPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/EPP1.xml +13 -0
- package/packages/nfe/schemas/PL_010_V1/ERP1.xml +19 -0
- package/packages/nfe/schemas/PL_010_V1/EventoCancEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/EventoCancInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/EventoEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/EventoInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/MT_inutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/SuframaInternaliza_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/SuframaVistoria_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/confRecebto_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/consCad_v2.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/consGTIN_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/consNFeDest_v1.01.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/consReciNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/consReciNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/consSitNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/consSitNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/consStatServ_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/consStatServ_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/distDFeInt_v1.00.xsd +71 -0
- package/packages/nfe/schemas/PL_010_V1/distDFeInt_v1.01.xsd +97 -0
- package/packages/nfe/schemas/PL_010_V1/downloadNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/e110001_v1.00.xsd +73 -0
- package/packages/nfe/schemas/PL_010_V1/e110110_v1.00.xsd +58 -0
- package/packages/nfe/schemas/PL_010_V1/e110111_v1.00.xsd +42 -0
- package/packages/nfe/schemas/PL_010_V1/e110112_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1/e110130_v1.00.xsd +102 -0
- package/packages/nfe/schemas/PL_010_V1/e110131_v1.00.xsd +51 -0
- package/packages/nfe/schemas/PL_010_V1/e110140NFCe_v1.00.xsd +118 -0
- package/packages/nfe/schemas/PL_010_V1/e110140NFe_v1.00.xsd +124 -0
- package/packages/nfe/schemas/PL_010_V1/e110140_v1.00.xsd +124 -0
- package/packages/nfe/schemas/PL_010_V1/e110150_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_010_V1/e110192_v1.00.xsd +106 -0
- package/packages/nfe/schemas/PL_010_V1/e110193_v1.00.xsd +40 -0
- package/packages/nfe/schemas/PL_010_V1/e110750_v1.00.xsd +138 -0
- package/packages/nfe/schemas/PL_010_V1/e110751_v1.00.xsd +39 -0
- package/packages/nfe/schemas/PL_010_V1/e111500_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1/e111501_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1/e111502_v1.00.xsd +50 -0
- package/packages/nfe/schemas/PL_010_V1/e111503_v1.00.xsd +50 -0
- package/packages/nfe/schemas/PL_010_V1/e112110_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1/e112120_v1.00 .xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1/e112130_v1.00.xsd +119 -0
- package/packages/nfe/schemas/PL_010_V1/e112140_v1.00.xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1/e210200_v1.00.xsd +31 -0
- package/packages/nfe/schemas/PL_010_V1/e210210_v1.00.xsd +31 -0
- package/packages/nfe/schemas/PL_010_V1/e210220_v1.00.xsd +44 -0
- package/packages/nfe/schemas/PL_010_V1/e210240_v1.00.xsd +44 -0
- package/packages/nfe/schemas/PL_010_V1/e211110_v1.00.xsd +134 -0
- package/packages/nfe/schemas/PL_010_V1/e211120_v1.00.xsd +124 -0
- package/packages/nfe/schemas/PL_010_V1/e211124_v1.00.xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1/e211128_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1/e211130_v1.00.xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1/e211140_v1.00.xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1/e211150_v1.00.xsd +85 -0
- package/packages/nfe/schemas/PL_010_V1/e212110_v1.00.xsd +70 -0
- package/packages/nfe/schemas/PL_010_V1/e212120_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1/e411500_v1.00.xsd +134 -0
- package/packages/nfe/schemas/PL_010_V1/e411501_v1.00.xsd +134 -0
- package/packages/nfe/schemas/PL_010_V1/e411502_v1.00.xsd +95 -0
- package/packages/nfe/schemas/PL_010_V1/e411503_v1.00.xsd +95 -0
- package/packages/nfe/schemas/PL_010_V1/e412120_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_010_V1/e412130_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_010_V1/e610130_v1.00.xsd +128 -0
- package/packages/nfe/schemas/PL_010_V1/e610131_v1.00.xsd +68 -0
- package/packages/nfe/schemas/PL_010_V1/e790700_v1.00.xsd +148 -0
- package/packages/nfe/schemas/PL_010_V1/e990900_v1.00.xsd +87 -0
- package/packages/nfe/schemas/PL_010_V1/e990910_v1.00.xsd +81 -0
- package/packages/nfe/schemas/PL_010_V1/envAverb_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/envCCe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/envCancelPProrrogNFe_v1.0.xsd +50 -0
- package/packages/nfe/schemas/PL_010_V1/envComprovanteEntregaNFe_v1.00.xsd +11 -0
- package/packages/nfe/schemas/PL_010_V1/envConfRecebto_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/envEPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/envEventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/envEventoCancEConf_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/envEventoCancEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/envEventoCancInsucessoNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/envEventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/envEventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/envEventoEConf_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/envEventoEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/envEventoInsucessoNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/envEvento_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/envFiscoNfe_v1.0.xsd +179 -0
- package/packages/nfe/schemas/PL_010_V1/envPProrrogNFe_v1.0.xsd +65 -0
- package/packages/nfe/schemas/PL_010_V1/envRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/envSuframaInternaliza_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/envSuframaVistoria_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/enviNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/enviNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/eventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/eventoCancEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/eventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/eventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/eventoEPEC_v0.01.xsd +267 -0
- package/packages/nfe/schemas/PL_010_V1/eventoEPEC_v1.00.xsd +231 -0
- package/packages/nfe/schemas/PL_010_V1/eventoEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/eventoRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/inutNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/inutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteAverb_v1.00.xsd +468 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteCCe_v1.00.xsd +382 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteCcgConsGTIN_v1.00.xsd +94 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteComprovanteEntregaNFe_v1.00.xsd +487 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteConfRecebto_v1.00.xsd +369 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteConsNFeDest_v1.01.xsd +483 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteConsSitNFe_v3.10.xsd +502 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteConsSitNFe_v4.00.xsd +502 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteConsStatServ_v3.10.xsd +98 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteConsStatServ_v4.00.xsd +98 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteConsultaCadastro_v2.00.xsd +404 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteDownloadNFe_v1.00.xsd +149 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEPEC_v1.00.xsd +423 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEventoAtorInteressado_v1.00.xsd +384 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEventoCancEConf_v1.00.xsd +296 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEventoCancEntregaNFe_v1.00.xsd +307 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEventoCancInsucessoNFe_v1.00.xsd +297 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEventoCancNFe_v1.00.xsd +358 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEventoCancSubst_v1.00.xsd +366 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEventoEConf_v1.00.xsd +296 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEventoEntregaNFe_v1.00.xsd +321 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEventoInsucessoNFe_v1.00.xsd +297 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteEvento_v1.00.xsd +335 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteInutNFe_v3.10.xsd +193 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteInutNFe_v4.00.xsd +193 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteInutNFe_v4.00_MT.xsd +200 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteNFe_v3.10.xsd +6060 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteNFe_v4.00.xsd +7557 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteRemIndus_v1.00.xsd +344 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteSuframaInternaliza_v1.00.xsd +642 -0
- package/packages/nfe/schemas/PL_010_V1/leiauteSuframaVistoria_v1.00.xsd +648 -0
- package/packages/nfe/schemas/PL_010_V1/nfe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/nfe_v4.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/procAverbNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/procCCeNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/procComprovanteEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/procConfRecebtoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoCancEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoCancEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoCancInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procEventoNFe_v99.99.xsd +37 -0
- package/packages/nfe/schemas/PL_010_V1/procInutNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procInutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/procRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/prod_leiauteNFe_v4.00.xsd +6736 -0
- package/packages/nfe/schemas/PL_010_V1/resEvento_v1.00.xsd +94 -0
- package/packages/nfe/schemas/PL_010_V1/resEvento_v1.01.xsd +108 -0
- package/packages/nfe/schemas/PL_010_V1/resNFe_v1.00.xsd +110 -0
- package/packages/nfe/schemas/PL_010_V1/resNFe_v1.01.xsd +122 -0
- package/packages/nfe/schemas/PL_010_V1/retComprovanteEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/retConsCad_v2.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retConsGTIN_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retConsReciNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retConsReciNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retConsSitNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retConsSitNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retConsStatServ_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retConsStatServ_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retDistDFeInt_v1.00.xsd +84 -0
- package/packages/nfe/schemas/PL_010_V1/retDistDFeInt_v1.01.xsd +99 -0
- package/packages/nfe/schemas/PL_010_V1/retDownloadNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvAverb_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvAverb_v1.00_1.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvCCe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvCancelPProrrogNFe_v1.0.xsd +231 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvConfRecebto_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvEPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvEventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvEventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvEventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvEvento_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvFiscoNFe_v1.0.xsd +234 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvSuframaInternaliza_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnvSuframaVistoria_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnviNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEnviNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEventoCancEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEventoCancEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEventoCancInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEventoEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEventoEPEC_v0.01.xsd +207 -0
- package/packages/nfe/schemas/PL_010_V1/retEventoEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retEventoInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retInutNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retInutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/retPProrrogNFe_v1.0.xsd +233 -0
- package/packages/nfe/schemas/PL_010_V1/retconsNFeDest_v1.01.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1/tiposBasico_v1.03.xsd +872 -0
- package/packages/nfe/schemas/PL_010_V1/tiposBasico_v3.10.xsd +571 -0
- package/packages/nfe/schemas/PL_010_V1/tiposBasico_v4.00.xsd +598 -0
- package/packages/nfe/schemas/PL_010_V1/tiposBasicosCcgConsGTIN_v1.00.xsd +84 -0
- package/packages/nfe/schemas/PL_010_V1/tiposDistDFe_v1.00.xsd +217 -0
- package/packages/nfe/schemas/PL_010_V1/tiposDistDFe_v1.01.xsd +222 -0
- package/packages/nfe/schemas/PL_010_V1/xmldsig-core-schema_v1.01.xsd +98 -0
- package/packages/nfe/schemas/PL_010_V1.21/110150_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_010_V1.21/Averb_v1.00.xsd +11 -0
- package/packages/nfe/schemas/PL_010_V1.21/CCe_v1.00.xsd +11 -0
- package/packages/nfe/schemas/PL_010_V1.21/DFeTiposBasicos_v1.00.xsd +1097 -0
- package/packages/nfe/schemas/PL_010_V1.21/EPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/EPP1.xml +13 -0
- package/packages/nfe/schemas/PL_010_V1.21/ERP1.xml +19 -0
- package/packages/nfe/schemas/PL_010_V1.21/EventoCancEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/EventoCancInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/EventoEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/EventoInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/MT_inutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/SuframaInternaliza_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/SuframaVistoria_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/confRecebto_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/consCad_v2.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/consGTIN_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/consNFeDest_v1.01.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/consReciNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/consReciNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/consSitNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/consSitNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/consStatServ_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/consStatServ_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/distDFeInt_v1.00.xsd +71 -0
- package/packages/nfe/schemas/PL_010_V1.21/distDFeInt_v1.01.xsd +97 -0
- package/packages/nfe/schemas/PL_010_V1.21/downloadNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110001_v1.00.xsd +73 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110110_v1.00.xsd +58 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110111_v1.00.xsd +42 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110112_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110130_v1.00.xsd +102 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110131_v1.00.xsd +51 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110140NFCe_v1.00.xsd +118 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110140NFe_v1.00.xsd +124 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110140_v1.00.xsd +124 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110150_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110192_v1.00.xsd +106 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110193_v1.00.xsd +40 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110750_v1.00.xsd +138 -0
- package/packages/nfe/schemas/PL_010_V1.21/e110751_v1.00.xsd +39 -0
- package/packages/nfe/schemas/PL_010_V1.21/e111500_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1.21/e111501_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1.21/e111502_v1.00.xsd +50 -0
- package/packages/nfe/schemas/PL_010_V1.21/e111503_v1.00.xsd +50 -0
- package/packages/nfe/schemas/PL_010_V1.21/e112110_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1.21/e112120_v1.00 .xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1.21/e112130_v1.00.xsd +119 -0
- package/packages/nfe/schemas/PL_010_V1.21/e112140_v1.00.xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1.21/e210200_v1.00.xsd +31 -0
- package/packages/nfe/schemas/PL_010_V1.21/e210210_v1.00.xsd +31 -0
- package/packages/nfe/schemas/PL_010_V1.21/e210220_v1.00.xsd +44 -0
- package/packages/nfe/schemas/PL_010_V1.21/e210240_v1.00.xsd +44 -0
- package/packages/nfe/schemas/PL_010_V1.21/e211110_v1.00.xsd +134 -0
- package/packages/nfe/schemas/PL_010_V1.21/e211120_v1.00.xsd +124 -0
- package/packages/nfe/schemas/PL_010_V1.21/e211124_v1.00.xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1.21/e211128_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1.21/e211130_v1.00.xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1.21/e211140_v1.00.xsd +107 -0
- package/packages/nfe/schemas/PL_010_V1.21/e211150_v1.00.xsd +85 -0
- package/packages/nfe/schemas/PL_010_V1.21/e212110_v1.00.xsd +70 -0
- package/packages/nfe/schemas/PL_010_V1.21/e212120_v1.00.xsd +69 -0
- package/packages/nfe/schemas/PL_010_V1.21/e411500_v1.00.xsd +134 -0
- package/packages/nfe/schemas/PL_010_V1.21/e411501_v1.00.xsd +134 -0
- package/packages/nfe/schemas/PL_010_V1.21/e411502_v1.00.xsd +95 -0
- package/packages/nfe/schemas/PL_010_V1.21/e411503_v1.00.xsd +95 -0
- package/packages/nfe/schemas/PL_010_V1.21/e412120_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_010_V1.21/e412130_v1.00.xsd +88 -0
- package/packages/nfe/schemas/PL_010_V1.21/e610130_v1.00.xsd +128 -0
- package/packages/nfe/schemas/PL_010_V1.21/e610131_v1.00.xsd +68 -0
- package/packages/nfe/schemas/PL_010_V1.21/e790700_v1.00.xsd +148 -0
- package/packages/nfe/schemas/PL_010_V1.21/e990900_v1.00.xsd +87 -0
- package/packages/nfe/schemas/PL_010_V1.21/e990910_v1.00.xsd +81 -0
- package/packages/nfe/schemas/PL_010_V1.21/envAverb_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/envCCe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/envCancelPProrrogNFe_v1.0.xsd +50 -0
- package/packages/nfe/schemas/PL_010_V1.21/envComprovanteEntregaNFe_v1.00.xsd +11 -0
- package/packages/nfe/schemas/PL_010_V1.21/envConfRecebto_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEventoCancEConf_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEventoCancEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEventoCancInsucessoNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEventoEConf_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEventoEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEventoInsucessoNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/envEvento_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/envFiscoNfe_v1.0.xsd +179 -0
- package/packages/nfe/schemas/PL_010_V1.21/envPProrrogNFe_v1.0.xsd +65 -0
- package/packages/nfe/schemas/PL_010_V1.21/envRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/envSuframaInternaliza_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/envSuframaVistoria_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/enviNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/enviNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/eventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/eventoCancEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/eventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/eventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/eventoEPEC_v0.01.xsd +267 -0
- package/packages/nfe/schemas/PL_010_V1.21/eventoEPEC_v1.00.xsd +231 -0
- package/packages/nfe/schemas/PL_010_V1.21/eventoEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/eventoRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/inutNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/inutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteAverb_v1.00.xsd +468 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteCCe_v1.00.xsd +382 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteCcgConsGTIN_v1.00.xsd +94 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteComprovanteEntregaNFe_v1.00.xsd +487 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteConfRecebto_v1.00.xsd +369 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteConsNFeDest_v1.01.xsd +483 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteConsSitNFe_v3.10.xsd +502 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteConsSitNFe_v4.00.xsd +502 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteConsStatServ_v3.10.xsd +98 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteConsStatServ_v4.00.xsd +98 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteConsultaCadastro_v2.00.xsd +404 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteDownloadNFe_v1.00.xsd +149 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEPEC_v1.00.xsd +423 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEventoAtorInteressado_v1.00.xsd +384 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEventoCancEConf_v1.00.xsd +296 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEventoCancEntregaNFe_v1.00.xsd +307 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEventoCancInsucessoNFe_v1.00.xsd +297 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEventoCancNFe_v1.00.xsd +358 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEventoCancSubst_v1.00.xsd +366 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEventoEConf_v1.00.xsd +296 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEventoEntregaNFe_v1.00.xsd +321 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEventoInsucessoNFe_v1.00.xsd +297 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteEvento_v1.00.xsd +335 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteInutNFe_v3.10.xsd +193 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteInutNFe_v4.00.xsd +193 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteInutNFe_v4.00_MT.xsd +200 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteNFe_v3.10.xsd +6060 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteNFe_v4.00.xsd +7558 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteRemIndus_v1.00.xsd +344 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteSuframaInternaliza_v1.00.xsd +642 -0
- package/packages/nfe/schemas/PL_010_V1.21/leiauteSuframaVistoria_v1.00.xsd +648 -0
- package/packages/nfe/schemas/PL_010_V1.21/nfe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/nfe_v4.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/procAverbNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/procCCeNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/procComprovanteEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/procConfRecebtoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoCancEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoCancEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoCancInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procEventoNFe_v99.99.xsd +37 -0
- package/packages/nfe/schemas/PL_010_V1.21/procInutNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procInutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/procRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/prod_leiauteNFe_v4.00.xsd +6736 -0
- package/packages/nfe/schemas/PL_010_V1.21/resEvento_v1.00.xsd +94 -0
- package/packages/nfe/schemas/PL_010_V1.21/resEvento_v1.01.xsd +108 -0
- package/packages/nfe/schemas/PL_010_V1.21/resNFe_v1.00.xsd +110 -0
- package/packages/nfe/schemas/PL_010_V1.21/resNFe_v1.01.xsd +122 -0
- package/packages/nfe/schemas/PL_010_V1.21/retComprovanteEntregaNFe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/retConsCad_v2.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retConsGTIN_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retConsReciNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retConsReciNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retConsSitNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retConsSitNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retConsStatServ_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retConsStatServ_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retDistDFeInt_v1.00.xsd +84 -0
- package/packages/nfe/schemas/PL_010_V1.21/retDistDFeInt_v1.01.xsd +99 -0
- package/packages/nfe/schemas/PL_010_V1.21/retDownloadNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvAverb_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvAverb_v1.00_1.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvCCe_v1.00.xsd +10 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvCancelPProrrogNFe_v1.0.xsd +231 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvConfRecebto_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvEPEC_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvEventoAtorInteressado_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvEventoCancNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvEventoCancSubst_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvEvento_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvFiscoNFe_v1.0.xsd +234 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvRemIndus_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvSuframaInternaliza_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnvSuframaVistoria_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnviNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEnviNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEventoCancEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEventoCancEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEventoCancInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEventoEConf_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEventoEPEC_v0.01.xsd +207 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEventoEntregaNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retEventoInsucessoNFe_v1.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retInutNFe_v3.10.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retInutNFe_v4.00.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/retPProrrogNFe_v1.0.xsd +233 -0
- package/packages/nfe/schemas/PL_010_V1.21/retconsNFeDest_v1.01.xsd +9 -0
- package/packages/nfe/schemas/PL_010_V1.21/tiposBasico_v1.03.xsd +872 -0
- package/packages/nfe/schemas/PL_010_V1.21/tiposBasico_v3.10.xsd +571 -0
- package/packages/nfe/schemas/PL_010_V1.21/tiposBasico_v4.00.xsd +598 -0
- package/packages/nfe/schemas/PL_010_V1.21/tiposBasicosCcgConsGTIN_v1.00.xsd +84 -0
- package/packages/nfe/schemas/PL_010_V1.21/tiposDistDFe_v1.00.xsd +217 -0
- package/packages/nfe/schemas/PL_010_V1.21/tiposDistDFe_v1.01.xsd +222 -0
- package/packages/nfe/schemas/PL_010_V1.21/xmldsig-core-schema_v1.01.xsd +98 -0
- package/dist/src-QBEIGHGM.mjs +0 -8
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";var cQ=Object.create;var ug=Object.defineProperty;var lQ=Object.getOwnPropertyDescriptor;var fQ=Object.getOwnPropertyNames;var hQ=Object.getPrototypeOf,pQ=Object.prototype.hasOwnProperty;var o=(r,e)=>ug(r,"name",{value:e,configurable:!0});var as=(r,e)=>()=>(r&&(e=r(r=0)),e);var Q=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),yN=(r,e)=>{for(var t in e)ug(r,t,{get:e[t],enumerable:!0})},_k=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of fQ(e))!pQ.call(r,s)&&s!==t&&ug(r,s,{get:()=>e[s],enumerable:!(n=lQ(e,s))||n.enumerable});return r};var Wr=(r,e,t)=>(t=r!=null?cQ(hQ(r)):{},_k(e||!r||!r.__esModule?ug(t,"default",{value:r,enumerable:!0}):t,r)),dQ=r=>_k(ug({},"__esModule",{value:!0}),r);var Xt=Q((kye,s4)=>{"use strict";s4.exports={options:{usePureJavaScript:!1}}});var o4=Q((Lye,a4)=>{"use strict";var cT={};a4.exports=cT;var i4={};cT.encode=function(r,e,t){if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');if(t!==void 0&&typeof t!="number")throw new TypeError('"maxline" must be a number.');var n="";if(!(r instanceof Uint8Array))n=gZ(r,e);else{var s=0,i=e.length,a=e.charAt(0),u=[0];for(s=0;s<r.length;++s){for(var c=0,f=r[s];c<u.length;++c)f+=u[c]<<8,u[c]=f%i,f=f/i|0;for(;f>0;)u.push(f%i),f=f/i|0}for(s=0;r[s]===0&&s<r.length-1;++s)n+=a;for(s=u.length-1;s>=0;--s)n+=e[u[s]]}if(t){var h=new RegExp(".{1,"+t+"}","g");n=n.match(h).join(`\r
|
|
2
|
+
`)}return n};cT.decode=function(r,e){if(typeof r!="string")throw new TypeError('"input" must be a string.');if(typeof e!="string")throw new TypeError('"alphabet" must be a string.');var t=i4[e];if(!t){t=i4[e]=[];for(var n=0;n<e.length;++n)t[e.charCodeAt(n)]=n}r=r.replace(/\s/g,"");for(var s=e.length,i=e.charAt(0),a=[0],n=0;n<r.length;n++){var u=t[r.charCodeAt(n)];if(u===void 0)return;for(var c=0,f=u;c<a.length;++c)f+=a[c]*s,a[c]=f&255,f>>=8;for(;f>0;)a.push(f&255),f>>=8}for(var h=0;r[h]===i&&h<r.length-1;++h)a.push(0);return typeof Buffer<"u"?Buffer.from(a.reverse()):new Uint8Array(a.reverse())};function gZ(r,e){var t=0,n=e.length,s=e.charAt(0),i=[0];for(t=0;t<r.length();++t){for(var a=0,u=r.at(t);a<i.length;++a)u+=i[a]<<8,i[a]=u%n,u=u/n|0;for(;u>0;)i.push(u%n),u=u/n|0}var c="";for(t=0;r.at(t)===0&&t<r.length()-1;++t)c+=s;for(t=i.length-1;t>=0;--t)c+=e[i[t]];return c}o(gZ,"_encodeWithByteBuffer")});var hr=Q((Uye,f4)=>{"use strict";var u4=Xt(),c4=o4(),ne=f4.exports=u4.util=u4.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){ne.nextTick=process.nextTick,typeof setImmediate=="function"?ne.setImmediate=setImmediate:ne.setImmediate=ne.nextTick;return}if(typeof setImmediate=="function"){ne.setImmediate=function(){return setImmediate.apply(void 0,arguments)},ne.nextTick=function(u){return setImmediate(u)};return}if(ne.setImmediate=function(u){setTimeout(u,0)},typeof window<"u"&&typeof window.postMessage=="function"){let u=function(c){if(c.source===window&&c.data===r){c.stopPropagation();var f=e.slice();e.length=0,f.forEach(function(h){h()})}};var a=u;o(u,"handler");var r="forge.setImmediate",e=[];ne.setImmediate=function(c){e.push(c),e.length===1&&window.postMessage(r,"*")},window.addEventListener("message",u,!0)}if(typeof MutationObserver<"u"){var t=Date.now(),n=!0,s=document.createElement("div"),e=[];new MutationObserver(function(){var c=e.slice();e.length=0,c.forEach(function(f){f()})}).observe(s,{attributes:!0});var i=ne.setImmediate;ne.setImmediate=function(c){Date.now()-t>15?(t=Date.now(),i(c)):(e.push(c),e.length===1&&s.setAttribute("a",n=!n))}}ne.nextTick=ne.setImmediate})();ne.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;ne.globalScope=(function(){return ne.isNodejs?global:typeof self>"u"?window:self})();ne.isArray=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"};ne.isArrayBuffer=function(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer};ne.isArrayBufferView=function(r){return r&&ne.isArrayBuffer(r.buffer)&&r.byteLength!==void 0};function hg(r){if(!(r===8||r===16||r===24||r===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+r)}o(hg,"_checkBitsParam");ne.ByteBuffer=lT;function lT(r){if(this.data="",this.read=0,typeof r=="string")this.data=r;else if(ne.isArrayBuffer(r)||ne.isArrayBufferView(r))if(typeof Buffer<"u"&&r instanceof Buffer)this.data=r.toString("binary");else{var e=new Uint8Array(r);try{this.data=String.fromCharCode.apply(null,e)}catch{for(var t=0;t<e.length;++t)this.putByte(e[t])}}else(r instanceof lT||typeof r=="object"&&typeof r.data=="string"&&typeof r.read=="number")&&(this.data=r.data,this.read=r.read);this._constructedStringLength=0}o(lT,"ByteStringBuffer");ne.ByteStringBuffer=lT;var vZ=4096;ne.ByteStringBuffer.prototype._optimizeConstructedString=function(r){this._constructedStringLength+=r,this._constructedStringLength>vZ&&(this.data.substr(0,1),this._constructedStringLength=0)};ne.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};ne.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};ne.ByteStringBuffer.prototype.putByte=function(r){return this.putBytes(String.fromCharCode(r))};ne.ByteStringBuffer.prototype.fillWithByte=function(r,e){r=String.fromCharCode(r);for(var t=this.data;e>0;)e&1&&(t+=r),e>>>=1,e>0&&(r+=r);return this.data=t,this._optimizeConstructedString(e),this};ne.ByteStringBuffer.prototype.putBytes=function(r){return this.data+=r,this._optimizeConstructedString(r.length),this};ne.ByteStringBuffer.prototype.putString=function(r){return this.putBytes(ne.encodeUtf8(r))};ne.ByteStringBuffer.prototype.putInt16=function(r){return this.putBytes(String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};ne.ByteStringBuffer.prototype.putInt24=function(r){return this.putBytes(String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};ne.ByteStringBuffer.prototype.putInt32=function(r){return this.putBytes(String.fromCharCode(r>>24&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255))};ne.ByteStringBuffer.prototype.putInt16Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255))};ne.ByteStringBuffer.prototype.putInt24Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r>>16&255))};ne.ByteStringBuffer.prototype.putInt32Le=function(r){return this.putBytes(String.fromCharCode(r&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>24&255))};ne.ByteStringBuffer.prototype.putInt=function(r,e){hg(e);var t="";do e-=8,t+=String.fromCharCode(r>>e&255);while(e>0);return this.putBytes(t)};ne.ByteStringBuffer.prototype.putSignedInt=function(r,e){return r<0&&(r+=2<<e-1),this.putInt(r,e)};ne.ByteStringBuffer.prototype.putBuffer=function(r){return this.putBytes(r.getBytes())};ne.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};ne.ByteStringBuffer.prototype.getInt16=function(){var r=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,r};ne.ByteStringBuffer.prototype.getInt24=function(){var r=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,r};ne.ByteStringBuffer.prototype.getInt32=function(){var r=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,r};ne.ByteStringBuffer.prototype.getInt16Le=function(){var r=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,r};ne.ByteStringBuffer.prototype.getInt24Le=function(){var r=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,r};ne.ByteStringBuffer.prototype.getInt32Le=function(){var r=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,r};ne.ByteStringBuffer.prototype.getInt=function(r){hg(r);var e=0;do e=(e<<8)+this.data.charCodeAt(this.read++),r-=8;while(r>0);return e};ne.ByteStringBuffer.prototype.getSignedInt=function(r){var e=this.getInt(r),t=2<<r-2;return e>=t&&(e-=t<<1),e};ne.ByteStringBuffer.prototype.getBytes=function(r){var e;return r?(r=Math.min(this.length(),r),e=this.data.slice(this.read,this.read+r),this.read+=r):r===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};ne.ByteStringBuffer.prototype.bytes=function(r){return typeof r>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+r)};ne.ByteStringBuffer.prototype.at=function(r){return this.data.charCodeAt(this.read+r)};ne.ByteStringBuffer.prototype.setAt=function(r,e){return this.data=this.data.substr(0,this.read+r)+String.fromCharCode(e)+this.data.substr(this.read+r+1),this};ne.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};ne.ByteStringBuffer.prototype.copy=function(){var r=ne.createBuffer(this.data);return r.read=this.read,r};ne.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};ne.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};ne.ByteStringBuffer.prototype.truncate=function(r){var e=Math.max(0,this.length()-r);return this.data=this.data.substr(this.read,e),this.read=0,this};ne.ByteStringBuffer.prototype.toHex=function(){for(var r="",e=this.read;e<this.data.length;++e){var t=this.data.charCodeAt(e);t<16&&(r+="0"),r+=t.toString(16)}return r};ne.ByteStringBuffer.prototype.toString=function(){return ne.decodeUtf8(this.bytes())};function yZ(r,e){e=e||{},this.read=e.readOffset||0,this.growSize=e.growSize||1024;var t=ne.isArrayBuffer(r),n=ne.isArrayBufferView(r);if(t||n){t?this.data=new DataView(r):this.data=new DataView(r.buffer,r.byteOffset,r.byteLength),this.write="writeOffset"in e?e.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,r!=null&&this.putBytes(r),"writeOffset"in e&&(this.write=e.writeOffset)}o(yZ,"DataBuffer");ne.DataBuffer=yZ;ne.DataBuffer.prototype.length=function(){return this.write-this.read};ne.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};ne.DataBuffer.prototype.accommodate=function(r,e){if(this.length()>=r)return this;e=Math.max(e||this.growSize,r);var t=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(t),this.data=new DataView(n.buffer),this};ne.DataBuffer.prototype.putByte=function(r){return this.accommodate(1),this.data.setUint8(this.write++,r),this};ne.DataBuffer.prototype.fillWithByte=function(r,e){this.accommodate(e);for(var t=0;t<e;++t)this.data.setUint8(r);return this};ne.DataBuffer.prototype.putBytes=function(r,e){if(ne.isArrayBufferView(r)){var t=new Uint8Array(r.buffer,r.byteOffset,r.byteLength),n=t.byteLength-t.byteOffset;this.accommodate(n);var s=new Uint8Array(this.data.buffer,this.write);return s.set(t),this.write+=n,this}if(ne.isArrayBuffer(r)){var t=new Uint8Array(r);this.accommodate(t.byteLength);var s=new Uint8Array(this.data.buffer);return s.set(t,this.write),this.write+=t.byteLength,this}if(r instanceof ne.DataBuffer||typeof r=="object"&&typeof r.read=="number"&&typeof r.write=="number"&&ne.isArrayBufferView(r.data)){var t=new Uint8Array(r.data.byteLength,r.read,r.length());this.accommodate(t.byteLength);var s=new Uint8Array(r.data.byteLength,this.write);return s.set(t),this.write+=t.byteLength,this}if(r instanceof ne.ByteStringBuffer&&(r=r.data,e="binary"),e=e||"binary",typeof r=="string"){var i;if(e==="hex")return this.accommodate(Math.ceil(r.length/2)),i=new Uint8Array(this.data.buffer,this.write),this.write+=ne.binary.hex.decode(r,i,this.write),this;if(e==="base64")return this.accommodate(Math.ceil(r.length/4)*3),i=new Uint8Array(this.data.buffer,this.write),this.write+=ne.binary.base64.decode(r,i,this.write),this;if(e==="utf8"&&(r=ne.encodeUtf8(r),e="binary"),e==="binary"||e==="raw")return this.accommodate(r.length),i=new Uint8Array(this.data.buffer,this.write),this.write+=ne.binary.raw.decode(i),this;if(e==="utf16")return this.accommodate(r.length*2),i=new Uint16Array(this.data.buffer,this.write),this.write+=ne.text.utf16.encode(i),this;throw new Error("Invalid encoding: "+e)}throw Error("Invalid parameter: "+r)};ne.DataBuffer.prototype.putBuffer=function(r){return this.putBytes(r),r.clear(),this};ne.DataBuffer.prototype.putString=function(r){return this.putBytes(r,"utf16")};ne.DataBuffer.prototype.putInt16=function(r){return this.accommodate(2),this.data.setInt16(this.write,r),this.write+=2,this};ne.DataBuffer.prototype.putInt24=function(r){return this.accommodate(3),this.data.setInt16(this.write,r>>8&65535),this.data.setInt8(this.write,r>>16&255),this.write+=3,this};ne.DataBuffer.prototype.putInt32=function(r){return this.accommodate(4),this.data.setInt32(this.write,r),this.write+=4,this};ne.DataBuffer.prototype.putInt16Le=function(r){return this.accommodate(2),this.data.setInt16(this.write,r,!0),this.write+=2,this};ne.DataBuffer.prototype.putInt24Le=function(r){return this.accommodate(3),this.data.setInt8(this.write,r>>16&255),this.data.setInt16(this.write,r>>8&65535,!0),this.write+=3,this};ne.DataBuffer.prototype.putInt32Le=function(r){return this.accommodate(4),this.data.setInt32(this.write,r,!0),this.write+=4,this};ne.DataBuffer.prototype.putInt=function(r,e){hg(e),this.accommodate(e/8);do e-=8,this.data.setInt8(this.write++,r>>e&255);while(e>0);return this};ne.DataBuffer.prototype.putSignedInt=function(r,e){return hg(e),this.accommodate(e/8),r<0&&(r+=2<<e-1),this.putInt(r,e)};ne.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};ne.DataBuffer.prototype.getInt16=function(){var r=this.data.getInt16(this.read);return this.read+=2,r};ne.DataBuffer.prototype.getInt24=function(){var r=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,r};ne.DataBuffer.prototype.getInt32=function(){var r=this.data.getInt32(this.read);return this.read+=4,r};ne.DataBuffer.prototype.getInt16Le=function(){var r=this.data.getInt16(this.read,!0);return this.read+=2,r};ne.DataBuffer.prototype.getInt24Le=function(){var r=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,r};ne.DataBuffer.prototype.getInt32Le=function(){var r=this.data.getInt32(this.read,!0);return this.read+=4,r};ne.DataBuffer.prototype.getInt=function(r){hg(r);var e=0;do e=(e<<8)+this.data.getInt8(this.read++),r-=8;while(r>0);return e};ne.DataBuffer.prototype.getSignedInt=function(r){var e=this.getInt(r),t=2<<r-2;return e>=t&&(e-=t<<1),e};ne.DataBuffer.prototype.getBytes=function(r){var e;return r?(r=Math.min(this.length(),r),e=this.data.slice(this.read,this.read+r),this.read+=r):r===0?e="":(e=this.read===0?this.data:this.data.slice(this.read),this.clear()),e};ne.DataBuffer.prototype.bytes=function(r){return typeof r>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+r)};ne.DataBuffer.prototype.at=function(r){return this.data.getUint8(this.read+r)};ne.DataBuffer.prototype.setAt=function(r,e){return this.data.setUint8(r,e),this};ne.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};ne.DataBuffer.prototype.copy=function(){return new ne.DataBuffer(this)};ne.DataBuffer.prototype.compact=function(){if(this.read>0){var r=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(r.byteLength);e.set(r),this.data=new DataView(e),this.write-=this.read,this.read=0}return this};ne.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};ne.DataBuffer.prototype.truncate=function(r){return this.write=Math.max(0,this.length()-r),this.read=Math.min(this.read,this.write),this};ne.DataBuffer.prototype.toHex=function(){for(var r="",e=this.read;e<this.data.byteLength;++e){var t=this.data.getUint8(e);t<16&&(r+="0"),r+=t.toString(16)}return r};ne.DataBuffer.prototype.toString=function(r){var e=new Uint8Array(this.data,this.read,this.length());if(r=r||"utf8",r==="binary"||r==="raw")return ne.binary.raw.encode(e);if(r==="hex")return ne.binary.hex.encode(e);if(r==="base64")return ne.binary.base64.encode(e);if(r==="utf8")return ne.text.utf8.decode(e);if(r==="utf16")return ne.text.utf16.decode(e);throw new Error("Invalid encoding: "+r)};ne.createBuffer=function(r,e){return e=e||"raw",r!==void 0&&e==="utf8"&&(r=ne.encodeUtf8(r)),new ne.ByteBuffer(r)};ne.fillString=function(r,e){for(var t="";e>0;)e&1&&(t+=r),e>>>=1,e>0&&(r+=r);return t};ne.xorBytes=function(r,e,t){for(var n="",s="",i="",a=0,u=0;t>0;--t,++a)s=r.charCodeAt(a)^e.charCodeAt(a),u>=10&&(n+=i,i="",u=0),i+=String.fromCharCode(s),++u;return n+=i,n};ne.hexToBytes=function(r){var e="",t=0;for(r.length&!0&&(t=1,e+=String.fromCharCode(parseInt(r[0],16)));t<r.length;t+=2)e+=String.fromCharCode(parseInt(r.substr(t,2),16));return e};ne.bytesToHex=function(r){return ne.createBuffer(r).toHex()};ne.int32ToBytes=function(r){return String.fromCharCode(r>>24&255)+String.fromCharCode(r>>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(r&255)};var ju="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Fu=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],l4="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";ne.encode64=function(r,e){for(var t="",n="",s,i,a,u=0;u<r.length;)s=r.charCodeAt(u++),i=r.charCodeAt(u++),a=r.charCodeAt(u++),t+=ju.charAt(s>>2),t+=ju.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=ju.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":ju.charAt(a&63)),e&&t.length>e&&(n+=t.substr(0,e)+`\r
|
|
3
|
+
`,t=t.substr(e));return n+=t,n};ne.decode64=function(r){r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e="",t,n,s,i,a=0;a<r.length;)t=Fu[r.charCodeAt(a++)-43],n=Fu[r.charCodeAt(a++)-43],s=Fu[r.charCodeAt(a++)-43],i=Fu[r.charCodeAt(a++)-43],e+=String.fromCharCode(t<<2|n>>4),s!==64&&(e+=String.fromCharCode((n&15)<<4|s>>2),i!==64&&(e+=String.fromCharCode((s&3)<<6|i)));return e};ne.encodeUtf8=function(r){return unescape(encodeURIComponent(r))};ne.decodeUtf8=function(r){return decodeURIComponent(escape(r))};ne.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:c4.encode,decode:c4.decode}};ne.binary.raw.encode=function(r){return String.fromCharCode.apply(null,r)};ne.binary.raw.decode=function(r,e,t){var n=e;n||(n=new Uint8Array(r.length)),t=t||0;for(var s=t,i=0;i<r.length;++i)n[s++]=r.charCodeAt(i);return e?s-t:n};ne.binary.hex.encode=ne.bytesToHex;ne.binary.hex.decode=function(r,e,t){var n=e;n||(n=new Uint8Array(Math.ceil(r.length/2))),t=t||0;var s=0,i=t;for(r.length&1&&(s=1,n[i++]=parseInt(r[0],16));s<r.length;s+=2)n[i++]=parseInt(r.substr(s,2),16);return e?i-t:n};ne.binary.base64.encode=function(r,e){for(var t="",n="",s,i,a,u=0;u<r.byteLength;)s=r[u++],i=r[u++],a=r[u++],t+=ju.charAt(s>>2),t+=ju.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=ju.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":ju.charAt(a&63)),e&&t.length>e&&(n+=t.substr(0,e)+`\r
|
|
4
|
+
`,t=t.substr(e));return n+=t,n};ne.binary.base64.decode=function(r,e,t){var n=e;n||(n=new Uint8Array(Math.ceil(r.length/4)*3)),r=r.replace(/[^A-Za-z0-9\+\/\=]/g,""),t=t||0;for(var s,i,a,u,c=0,f=t;c<r.length;)s=Fu[r.charCodeAt(c++)-43],i=Fu[r.charCodeAt(c++)-43],a=Fu[r.charCodeAt(c++)-43],u=Fu[r.charCodeAt(c++)-43],n[f++]=s<<2|i>>4,a!==64&&(n[f++]=(i&15)<<4|a>>2,u!==64&&(n[f++]=(a&3)<<6|u));return e?f-t:n.subarray(0,f)};ne.binary.base58.encode=function(r,e){return ne.binary.baseN.encode(r,l4,e)};ne.binary.base58.decode=function(r,e){return ne.binary.baseN.decode(r,l4,e)};ne.text={utf8:{},utf16:{}};ne.text.utf8.encode=function(r,e,t){r=ne.encodeUtf8(r);var n=e;n||(n=new Uint8Array(r.length)),t=t||0;for(var s=t,i=0;i<r.length;++i)n[s++]=r.charCodeAt(i);return e?s-t:n};ne.text.utf8.decode=function(r){return ne.decodeUtf8(String.fromCharCode.apply(null,r))};ne.text.utf16.encode=function(r,e,t){var n=e;n||(n=new Uint8Array(r.length*2));var s=new Uint16Array(n.buffer);t=t||0;for(var i=t,a=t,u=0;u<r.length;++u)s[a++]=r.charCodeAt(u),i+=2;return e?i-t:n};ne.text.utf16.decode=function(r){return String.fromCharCode.apply(null,new Uint16Array(r.buffer))};ne.deflate=function(r,e,t){if(e=ne.decode64(r.deflate(ne.encode64(e)).rval),t){var n=2,s=e.charCodeAt(1);s&32&&(n=6),e=e.substring(n,e.length-4)}return e};ne.inflate=function(r,e,t){var n=r.inflate(ne.encode64(e)).rval;return n===null?null:ne.decode64(n)};var fT=o(function(r,e,t){if(!r)throw new Error("WebStorage not available.");var n;if(t===null?n=r.removeItem(e):(t=ne.encode64(JSON.stringify(t)),n=r.setItem(e,t)),typeof n<"u"&&n.rval!==!0){var s=new Error(n.error.message);throw s.id=n.error.id,s.name=n.error.name,s}},"_setStorageObject"),hT=o(function(r,e){if(!r)throw new Error("WebStorage not available.");var t=r.getItem(e);if(r.init)if(t.rval===null){if(t.error){var n=new Error(t.error.message);throw n.id=t.error.id,n.name=t.error.name,n}t=null}else t=t.rval;return t!==null&&(t=JSON.parse(ne.decode64(t))),t},"_getStorageObject"),xZ=o(function(r,e,t,n){var s=hT(r,e);s===null&&(s={}),s[t]=n,fT(r,e,s)},"_setItem"),wZ=o(function(r,e,t){var n=hT(r,e);return n!==null&&(n=t in n?n[t]:null),n},"_getItem"),SZ=o(function(r,e,t){var n=hT(r,e);if(n!==null&&t in n){delete n[t];var s=!0;for(var i in n){s=!1;break}s&&(n=null),fT(r,e,n)}},"_removeItem"),bZ=o(function(r,e){fT(r,e,null)},"_clearItems"),qw=o(function(r,e,t){var n=null;typeof t>"u"&&(t=["web","flash"]);var s,i=!1,a=null;for(var u in t){s=t[u];try{if(s==="flash"||s==="both"){if(e[0]===null)throw new Error("Flash local storage not available.");n=r.apply(this,e),i=s==="flash"}(s==="web"||s==="both")&&(e[0]=localStorage,n=r.apply(this,e),i=!0)}catch(c){a=c}if(i)break}if(!i)throw a;return n},"_callStorageFunction");ne.setItem=function(r,e,t,n,s){qw(xZ,arguments,s)};ne.getItem=function(r,e,t,n){return qw(wZ,arguments,n)};ne.removeItem=function(r,e,t,n){qw(SZ,arguments,n)};ne.clearItems=function(r,e,t){qw(bZ,arguments,t)};ne.isEmpty=function(r){for(var e in r)if(r.hasOwnProperty(e))return!1;return!0};ne.format=function(r){for(var e=/%./g,t,n,s=0,i=[],a=0;t=e.exec(r);){n=r.substring(a,e.lastIndex-2),n.length>0&&i.push(n),a=e.lastIndex;var u=t[0][1];switch(u){case"s":case"o":s<arguments.length?i.push(arguments[s+++1]):i.push("<?>");break;case"%":i.push("%");break;default:i.push("<%"+u+"?>")}}return i.push(r.substring(a)),i.join("")};ne.formatNumber=function(r,e,t,n){var s=r,i=isNaN(e=Math.abs(e))?2:e,a=t===void 0?",":t,u=n===void 0?".":n,c=s<0?"-":"",f=parseInt(s=Math.abs(+s||0).toFixed(i),10)+"",h=f.length>3?f.length%3:0;return c+(h?f.substr(0,h)+u:"")+f.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+u)+(i?a+Math.abs(s-f).toFixed(i).slice(2):"")};ne.formatSize=function(r){return r>=1073741824?r=ne.formatNumber(r/1073741824,2,".","")+" GiB":r>=1048576?r=ne.formatNumber(r/1048576,2,".","")+" MiB":r>=1024?r=ne.formatNumber(r/1024,0)+" KiB":r=ne.formatNumber(r,0)+" bytes",r};ne.bytesFromIP=function(r){return r.indexOf(".")!==-1?ne.bytesFromIPv4(r):r.indexOf(":")!==-1?ne.bytesFromIPv6(r):null};ne.bytesFromIPv4=function(r){if(r=r.split("."),r.length!==4)return null;for(var e=ne.createBuffer(),t=0;t<r.length;++t){var n=parseInt(r[t],10);if(isNaN(n))return null;e.putByte(n)}return e.getBytes()};ne.bytesFromIPv6=function(r){var e=0;r=r.split(":").filter(function(a){return a.length===0&&++e,!0});for(var t=(8-r.length+e)*2,n=ne.createBuffer(),s=0;s<8;++s){if(!r[s]||r[s].length===0){n.fillWithByte(0,t),t=0;continue}var i=ne.hexToBytes(r[s]);i.length<2&&n.putByte(0),n.putBytes(i)}return n.getBytes()};ne.bytesToIP=function(r){return r.length===4?ne.bytesToIPv4(r):r.length===16?ne.bytesToIPv6(r):null};ne.bytesToIPv4=function(r){if(r.length!==4)return null;for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e.join(".")};ne.bytesToIPv6=function(r){if(r.length!==16)return null;for(var e=[],t=[],n=0,s=0;s<r.length;s+=2){for(var i=ne.bytesToHex(r[s]+r[s+1]);i[0]==="0"&&i!=="0";)i=i.substr(1);if(i==="0"){var a=t[t.length-1],u=e.length;!a||u!==a.end+1?t.push({start:u,end:u}):(a.end=u,a.end-a.start>t[n].end-t[n].start&&(n=t.length-1))}e.push(i)}if(t.length>0){var c=t[n];c.end-c.start>0&&(e.splice(c.start,c.end-c.start+1,""),c.start===0&&e.unshift(""),c.end===7&&e.push(""))}return e.join(":")};ne.estimateCores=function(r,e){if(typeof r=="function"&&(e=r,r={}),r=r||{},"cores"in ne&&!r.update)return e(null,ne.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return ne.cores=navigator.hardwareConcurrency,e(null,ne.cores);if(typeof Worker>"u")return ne.cores=1,e(null,ne.cores);if(typeof Blob>"u")return ne.cores=2,e(null,ne.cores);var t=URL.createObjectURL(new Blob(["(",(function(){self.addEventListener("message",function(a){for(var u=Date.now(),c=u+4;Date.now()<c;);self.postMessage({st:u,et:c})})}).toString(),")()"],{type:"application/javascript"}));n([],5,16);function n(a,u,c){if(u===0){var f=Math.floor(a.reduce(function(h,m){return h+m},0)/a.length);return ne.cores=Math.max(1,f),URL.revokeObjectURL(t),e(null,ne.cores)}s(c,function(h,m){a.push(i(c,m)),n(a,u-1,c)})}o(n,"sample");function s(a,u){for(var c=[],f=[],h=0;h<a;++h){var m=new Worker(t);m.addEventListener("message",function(g){if(f.push(g.data),f.length===a){for(var x=0;x<a;++x)c[x].terminate();u(null,f)}}),c.push(m)}for(var h=0;h<a;++h)c[h].postMessage(h)}o(s,"map");function i(a,u){for(var c=[],f=0;f<a;++f)for(var h=u[f],m=c[f]=[],g=0;g<a;++g)if(f!==g){var x=u[g];(h.st>x.st&&h.st<x.et||x.st>h.st&&x.st<h.et)&&m.push(g)}return c.reduce(function(v,w){return Math.max(v,w.length)},0)}o(i,"reduce")}});var Hw=Q((Fye,h4)=>{"use strict";var Bn=Xt();hr();h4.exports=Bn.cipher=Bn.cipher||{};Bn.cipher.algorithms=Bn.cipher.algorithms||{};Bn.cipher.createCipher=function(r,e){var t=r;if(typeof t=="string"&&(t=Bn.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new Bn.cipher.BlockCipher({algorithm:t,key:e,decrypt:!1})};Bn.cipher.createDecipher=function(r,e){var t=r;if(typeof t=="string"&&(t=Bn.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new Bn.cipher.BlockCipher({algorithm:t,key:e,decrypt:!0})};Bn.cipher.registerAlgorithm=function(r,e){r=r.toUpperCase(),Bn.cipher.algorithms[r]=e};Bn.cipher.getAlgorithm=function(r){return r=r.toUpperCase(),r in Bn.cipher.algorithms?Bn.cipher.algorithms[r]:null};var pT=Bn.cipher.BlockCipher=function(r){this.algorithm=r.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=r.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=r.decrypt,this.algorithm.initialize(r)};pT.prototype.start=function(r){r=r||{};var e={};for(var t in r)e[t]=r[t];e.decrypt=this._decrypt,this._finish=!1,this._input=Bn.util.createBuffer(),this.output=r.output||Bn.util.createBuffer(),this.mode.start(e)};pT.prototype.update=function(r){for(r&&this._input.putBuffer(r);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};pT.prototype.finish=function(r){r&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(t){return r(this.blockSize,t,!1)},this.mode.unpad=function(t){return r(this.blockSize,t,!0)});var e={};return e.decrypt=this._decrypt,e.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,e)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,e))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,e))}});var mT=Q((Mye,p4)=>{"use strict";var Dn=Xt();hr();Dn.cipher=Dn.cipher||{};var Yt=p4.exports=Dn.cipher.modes=Dn.cipher.modes||{};Yt.ecb=function(r){r=r||{},this.name="ECB",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Yt.ecb.prototype.start=function(r){};Yt.ecb.prototype.encrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=r.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n])};Yt.ecb.prototype.decrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=r.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n])};Yt.ecb.prototype.pad=function(r,e){var t=r.length()===this.blockSize?this.blockSize:this.blockSize-r.length();return r.fillWithByte(t,t),!0};Yt.ecb.prototype.unpad=function(r,e){if(e.overflow>0)return!1;var t=r.length(),n=r.at(t-1);return n>this.blockSize<<2?!1:(r.truncate(n),!0)};Yt.cbc=function(r){r=r||{},this.name="CBC",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};Yt.cbc.prototype.start=function(r){if(r.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in r)this._iv=Kw(r.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};Yt.cbc.prototype.encrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^r.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._outBlock[n]);this._prev=this._outBlock};Yt.cbc.prototype.decrypt=function(r,e,t){if(r.length()<this.blockSize&&!(t&&r.length()>0))return!0;for(var n=0;n<this._ints;++n)this._inBlock[n]=r.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var n=0;n<this._ints;++n)e.putInt32(this._prev[n]^this._outBlock[n]);this._prev=this._inBlock.slice(0)};Yt.cbc.prototype.pad=function(r,e){var t=r.length()===this.blockSize?this.blockSize:this.blockSize-r.length();return r.fillWithByte(t,t),!0};Yt.cbc.prototype.unpad=function(r,e){if(e.overflow>0)return!1;var t=r.length(),n=r.at(t-1);return n>this.blockSize<<2?!1:(r.truncate(n),!0)};Yt.cfb=function(r){r=r||{},this.name="CFB",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Dn.util.createBuffer(),this._partialBytes=0};Yt.cfb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=Kw(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Yt.cfb.prototype.encrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)this._inBlock[s]=r.getInt32()^this._outBlock[s],e.putInt32(this._inBlock[s]);return}var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialBlock[s]=r.getInt32()^this._outBlock[s],this._partialOutput.putInt32(this._partialBlock[s]);if(i>0)r.read-=this.blockSize;else for(var s=0;s<this._ints;++s)this._inBlock[s]=this._partialBlock[s];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Yt.cfb.prototype.decrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)this._inBlock[s]=r.getInt32(),e.putInt32(this._inBlock[s]^this._outBlock[s]);return}var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialBlock[s]=r.getInt32(),this._partialOutput.putInt32(this._partialBlock[s]^this._outBlock[s]);if(i>0)r.read-=this.blockSize;else for(var s=0;s<this._ints;++s)this._inBlock[s]=this._partialBlock[s];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Yt.ofb=function(r){r=r||{},this.name="OFB",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Dn.util.createBuffer(),this._partialBytes=0};Yt.ofb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=Kw(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Yt.ofb.prototype.encrypt=function(r,e,t){var n=r.length();if(r.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)e.putInt32(r.getInt32()^this._outBlock[s]),this._inBlock[s]=this._outBlock[s];return}var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(r.getInt32()^this._outBlock[s]);if(i>0)r.read-=this.blockSize;else for(var s=0;s<this._ints;++s)this._inBlock[s]=this._outBlock[s];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};Yt.ofb.prototype.decrypt=Yt.ofb.prototype.encrypt;Yt.ctr=function(r){r=r||{},this.name="CTR",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Dn.util.createBuffer(),this._partialBytes=0};Yt.ctr.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=Kw(r.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};Yt.ctr.prototype.encrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize)for(var s=0;s<this._ints;++s)e.putInt32(r.getInt32()^this._outBlock[s]);else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(r.getInt32()^this._outBlock[s]);if(i>0&&(r.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}$w(this._inBlock)};Yt.ctr.prototype.decrypt=Yt.ctr.prototype.encrypt;Yt.gcm=function(r){r=r||{},this.name="GCM",this.cipher=r.cipher,this.blockSize=r.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Dn.util.createBuffer(),this._partialBytes=0,this._R=3774873600};Yt.gcm.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");var e=Dn.util.createBuffer(r.iv);this._cipherLength=0;var t;if("additionalData"in r?t=Dn.util.createBuffer(r.additionalData):t=Dn.util.createBuffer(),"tagLength"in r?this._tagLength=r.tagLength:this._tagLength=128,this._tag=null,r.decrypt&&(this._tag=Dn.util.createBuffer(r.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=e.length();if(n===12)this._j0=[e.getInt32(),e.getInt32(),e.getInt32(),1];else{for(this._j0=[0,0,0,0];e.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(dT(n*8)))}this._inBlock=this._j0.slice(0),$w(this._inBlock),this._partialBytes=0,t=Dn.util.createBuffer(t),this._aDataLength=dT(t.length()*8);var s=t.length()%this.blockSize;for(s&&t.fillWithByte(0,this.blockSize-s),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])};Yt.gcm.prototype.encrypt=function(r,e,t){var n=r.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var s=0;s<this._ints;++s)e.putInt32(this._outBlock[s]^=r.getInt32());this._cipherLength+=this.blockSize}else{var i=(this.blockSize-n)%this.blockSize;i>0&&(i=this.blockSize-i),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(r.getInt32()^this._outBlock[s]);if(i<=0||t){if(t){var a=n%this.blockSize;this._cipherLength+=a,this._partialOutput.truncate(this.blockSize-a)}else this._cipherLength+=this.blockSize;for(var s=0;s<this._ints;++s)this._outBlock[s]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!t)return r.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),$w(this._inBlock)};Yt.gcm.prototype.decrypt=function(r,e,t){var n=r.length();if(n<this.blockSize&&!(t&&n>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),$w(this._inBlock),this._hashBlock[0]=r.getInt32(),this._hashBlock[1]=r.getInt32(),this._hashBlock[2]=r.getInt32(),this._hashBlock[3]=r.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var s=0;s<this._ints;++s)e.putInt32(this._outBlock[s]^this._hashBlock[s]);n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize};Yt.gcm.prototype.afterFinish=function(r,e){var t=!0;e.decrypt&&e.overflow&&r.truncate(this.blockSize-e.overflow),this.tag=Dn.util.createBuffer();var n=this._aDataLength.concat(dT(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,n);var s=[];this.cipher.encrypt(this._j0,s);for(var i=0;i<this._ints;++i)this.tag.putInt32(this._s[i]^s[i]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),e.decrypt&&this.tag.bytes()!==this._tag&&(t=!1),t};Yt.gcm.prototype.multiply=function(r,e){for(var t=[0,0,0,0],n=e.slice(0),s=0;s<128;++s){var i=r[s/32|0]&1<<31-s%32;i&&(t[0]^=n[0],t[1]^=n[1],t[2]^=n[2],t[3]^=n[3]),this.pow(n,n)}return t};Yt.gcm.prototype.pow=function(r,e){for(var t=r[3]&1,n=3;n>0;--n)e[n]=r[n]>>>1|(r[n-1]&1)<<31;e[0]=r[0]>>>1,t&&(e[0]^=this._R)};Yt.gcm.prototype.tableMultiply=function(r){for(var e=[0,0,0,0],t=0;t<32;++t){var n=t/8|0,s=r[n]>>>(7-t%8)*4&15,i=this._m[t][s];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e};Yt.gcm.prototype.ghash=function(r,e,t){return e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3],this.tableMultiply(e)};Yt.gcm.prototype.generateHashTable=function(r,e){for(var t=8/e,n=4*t,s=16*t,i=new Array(s),a=0;a<s;++a){var u=[0,0,0,0],c=a/n|0,f=(n-1-a%n)*e;u[c]=1<<e-1<<f,i[a]=this.generateSubHashTable(this.multiply(u,r),e)}return i};Yt.gcm.prototype.generateSubHashTable=function(r,e){var t=1<<e,n=t>>>1,s=new Array(t);s[n]=r.slice(0);for(var i=n>>>1;i>0;)this.pow(s[2*i],s[i]=[]),i>>=1;for(i=2;i<n;){for(var a=1;a<i;++a){var u=s[i],c=s[a];s[i+a]=[u[0]^c[0],u[1]^c[1],u[2]^c[2],u[3]^c[3]]}i*=2}for(s[0]=[0,0,0,0],i=n+1;i<t;++i){var f=s[i^n];s[i]=[r[0]^f[0],r[1]^f[1],r[2]^f[2],r[3]^f[3]]}return s};function Kw(r,e){if(typeof r=="string"&&(r=Dn.util.createBuffer(r)),Dn.util.isArray(r)&&r.length>4){var t=r;r=Dn.util.createBuffer();for(var n=0;n<t.length;++n)r.putByte(t[n])}if(r.length()<e)throw new Error("Invalid IV length; got "+r.length()+" bytes and expected "+e+" bytes.");if(!Dn.util.isArray(r)){for(var s=[],i=e/4,n=0;n<i;++n)s.push(r.getInt32());r=s}return r}o(Kw,"transformIV");function $w(r){r[r.length-1]=r[r.length-1]+1&4294967295}o($w,"inc32");function dT(r){return[r/4294967296|0,r&4294967295]}o(dT,"from64To32")});var Mu=Q((Hye,v4)=>{"use strict";var Rr=Xt();Hw();mT();hr();v4.exports=Rr.aes=Rr.aes||{};Rr.aes.startEncrypting=function(r,e,t,n){var s=Xw({key:r,output:t,decrypt:!1,mode:n});return s.start(e),s};Rr.aes.createEncryptionCipher=function(r,e){return Xw({key:r,output:null,decrypt:!1,mode:e})};Rr.aes.startDecrypting=function(r,e,t,n){var s=Xw({key:r,output:t,decrypt:!0,mode:n});return s.start(e),s};Rr.aes.createDecryptionCipher=function(r,e){return Xw({key:r,output:null,decrypt:!0,mode:e})};Rr.aes.Algorithm=function(r,e){yT||m4();var t=this;t.name=r,t.mode=new e({blockSize:16,cipher:{encrypt:o(function(n,s){return vT(t._w,n,s,!1)},"encrypt"),decrypt:o(function(n,s){return vT(t._w,n,s,!0)},"decrypt")}}),t._init=!1};Rr.aes.Algorithm.prototype.initialize=function(r){if(!this._init){var e=r.key,t;if(typeof e=="string"&&(e.length===16||e.length===24||e.length===32))e=Rr.util.createBuffer(e);else if(Rr.util.isArray(e)&&(e.length===16||e.length===24||e.length===32)){t=e,e=Rr.util.createBuffer();for(var n=0;n<t.length;++n)e.putByte(t[n])}if(!Rr.util.isArray(e)){t=e,e=[];var s=t.length();if(s===16||s===24||s===32){s=s>>>2;for(var n=0;n<s;++n)e.push(t.getInt32())}}if(!Rr.util.isArray(e)||!(e.length===4||e.length===6||e.length===8))throw new Error("Invalid key parameter.");var i=this.mode.name,a=["CFB","OFB","CTR","GCM"].indexOf(i)!==-1;this._w=g4(e,r.decrypt&&!a),this._init=!0}};Rr.aes._expandKey=function(r,e){return yT||m4(),g4(r,e)};Rr.aes._updateBlock=vT;Ep("AES-ECB",Rr.cipher.modes.ecb);Ep("AES-CBC",Rr.cipher.modes.cbc);Ep("AES-CFB",Rr.cipher.modes.cfb);Ep("AES-OFB",Rr.cipher.modes.ofb);Ep("AES-CTR",Rr.cipher.modes.ctr);Ep("AES-GCM",Rr.cipher.modes.gcm);function Ep(r,e){var t=o(function(){return new Rr.aes.Algorithm(r,e)},"factory");Rr.cipher.registerAlgorithm(r,t)}o(Ep,"registerAlgorithm");var yT=!1,bp=4,Ss,gT,d4,Kl,sa;function m4(){yT=!0,d4=[0,1,2,4,8,16,32,64,128,27,54];for(var r=new Array(256),e=0;e<128;++e)r[e]=e<<1,r[e+128]=e+128<<1^283;Ss=new Array(256),gT=new Array(256),Kl=new Array(4),sa=new Array(4);for(var e=0;e<4;++e)Kl[e]=new Array(256),sa[e]=new Array(256);for(var t=0,n=0,s,i,a,u,c,f,h,e=0;e<256;++e){u=n^n<<1^n<<2^n<<3^n<<4,u=u>>8^u&255^99,Ss[t]=u,gT[u]=t,c=r[u],s=r[t],i=r[s],a=r[i],f=c<<24^u<<16^u<<8^(u^c),h=(s^i^a)<<24^(t^a)<<16^(t^i^a)<<8^(t^s^a);for(var m=0;m<4;++m)Kl[m][t]=f,sa[m][u]=h,f=f<<24|f>>>8,h=h<<24|h>>>8;t===0?t=n=1:(t=s^r[r[r[s^a]]],n^=r[r[n]])}}o(m4,"initialize");function g4(r,e){for(var t=r.slice(0),n,s=1,i=t.length,a=i+6+1,u=bp*a,c=i;c<u;++c)n=t[c-1],c%i===0?(n=Ss[n>>>16&255]<<24^Ss[n>>>8&255]<<16^Ss[n&255]<<8^Ss[n>>>24]^d4[s]<<24,s++):i>6&&c%i===4&&(n=Ss[n>>>24]<<24^Ss[n>>>16&255]<<16^Ss[n>>>8&255]<<8^Ss[n&255]),t[c]=t[c-i]^n;if(e){var f,h=sa[0],m=sa[1],g=sa[2],x=sa[3],v=t.slice(0);u=t.length;for(var c=0,w=u-bp;c<u;c+=bp,w-=bp)if(c===0||c===u-bp)v[c]=t[w],v[c+1]=t[w+3],v[c+2]=t[w+2],v[c+3]=t[w+1];else for(var S=0;S<bp;++S)f=t[w+S],v[c+(3&-S)]=h[Ss[f>>>24]]^m[Ss[f>>>16&255]]^g[Ss[f>>>8&255]]^x[Ss[f&255]];t=v}return t}o(g4,"_expandKey");function vT(r,e,t,n){var s=r.length/4-1,i,a,u,c,f;n?(i=sa[0],a=sa[1],u=sa[2],c=sa[3],f=gT):(i=Kl[0],a=Kl[1],u=Kl[2],c=Kl[3],f=Ss);var h,m,g,x,v,w,S;h=e[0]^r[0],m=e[n?3:1]^r[1],g=e[2]^r[2],x=e[n?1:3]^r[3];for(var A=3,N=1;N<s;++N)v=i[h>>>24]^a[m>>>16&255]^u[g>>>8&255]^c[x&255]^r[++A],w=i[m>>>24]^a[g>>>16&255]^u[x>>>8&255]^c[h&255]^r[++A],S=i[g>>>24]^a[x>>>16&255]^u[h>>>8&255]^c[m&255]^r[++A],x=i[x>>>24]^a[h>>>16&255]^u[m>>>8&255]^c[g&255]^r[++A],h=v,m=w,g=S;t[0]=f[h>>>24]<<24^f[m>>>16&255]<<16^f[g>>>8&255]<<8^f[x&255]^r[++A],t[n?3:1]=f[m>>>24]<<24^f[g>>>16&255]<<16^f[x>>>8&255]<<8^f[h&255]^r[++A],t[2]=f[g>>>24]<<24^f[x>>>16&255]<<16^f[h>>>8&255]<<8^f[m&255]^r[++A],t[n?1:3]=f[x>>>24]<<24^f[h>>>16&255]<<16^f[m>>>8&255]<<8^f[g&255]^r[++A]}o(vT,"_updateBlock");function Xw(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="AES-"+e,n;r.decrypt?n=Rr.cipher.createDecipher(t,r.key):n=Rr.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof Rr.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(Xw,"_createCipher")});var qu=Q(($ye,y4)=>{"use strict";var pg=Xt();pg.pki=pg.pki||{};var xT=y4.exports=pg.pki.oids=pg.oids=pg.oids||{};function Ue(r,e){xT[r]=e,xT[e]=r}o(Ue,"_IN");function Sr(r,e){xT[r]=e}o(Sr,"_I_");Ue("1.2.840.113549.1.1.1","rsaEncryption");Ue("1.2.840.113549.1.1.4","md5WithRSAEncryption");Ue("1.2.840.113549.1.1.5","sha1WithRSAEncryption");Ue("1.2.840.113549.1.1.7","RSAES-OAEP");Ue("1.2.840.113549.1.1.8","mgf1");Ue("1.2.840.113549.1.1.9","pSpecified");Ue("1.2.840.113549.1.1.10","RSASSA-PSS");Ue("1.2.840.113549.1.1.11","sha256WithRSAEncryption");Ue("1.2.840.113549.1.1.12","sha384WithRSAEncryption");Ue("1.2.840.113549.1.1.13","sha512WithRSAEncryption");Ue("1.3.101.112","EdDSA25519");Ue("1.2.840.10040.4.3","dsa-with-sha1");Ue("1.3.14.3.2.7","desCBC");Ue("1.3.14.3.2.26","sha1");Ue("1.3.14.3.2.29","sha1WithRSASignature");Ue("2.16.840.1.101.3.4.2.1","sha256");Ue("2.16.840.1.101.3.4.2.2","sha384");Ue("2.16.840.1.101.3.4.2.3","sha512");Ue("2.16.840.1.101.3.4.2.4","sha224");Ue("2.16.840.1.101.3.4.2.5","sha512-224");Ue("2.16.840.1.101.3.4.2.6","sha512-256");Ue("1.2.840.113549.2.2","md2");Ue("1.2.840.113549.2.5","md5");Ue("1.2.840.113549.1.7.1","data");Ue("1.2.840.113549.1.7.2","signedData");Ue("1.2.840.113549.1.7.3","envelopedData");Ue("1.2.840.113549.1.7.4","signedAndEnvelopedData");Ue("1.2.840.113549.1.7.5","digestedData");Ue("1.2.840.113549.1.7.6","encryptedData");Ue("1.2.840.113549.1.9.1","emailAddress");Ue("1.2.840.113549.1.9.2","unstructuredName");Ue("1.2.840.113549.1.9.3","contentType");Ue("1.2.840.113549.1.9.4","messageDigest");Ue("1.2.840.113549.1.9.5","signingTime");Ue("1.2.840.113549.1.9.6","counterSignature");Ue("1.2.840.113549.1.9.7","challengePassword");Ue("1.2.840.113549.1.9.8","unstructuredAddress");Ue("1.2.840.113549.1.9.14","extensionRequest");Ue("1.2.840.113549.1.9.20","friendlyName");Ue("1.2.840.113549.1.9.21","localKeyId");Ue("1.2.840.113549.1.9.22.1","x509Certificate");Ue("1.2.840.113549.1.12.10.1.1","keyBag");Ue("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");Ue("1.2.840.113549.1.12.10.1.3","certBag");Ue("1.2.840.113549.1.12.10.1.4","crlBag");Ue("1.2.840.113549.1.12.10.1.5","secretBag");Ue("1.2.840.113549.1.12.10.1.6","safeContentsBag");Ue("1.2.840.113549.1.5.13","pkcs5PBES2");Ue("1.2.840.113549.1.5.12","pkcs5PBKDF2");Ue("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");Ue("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");Ue("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");Ue("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");Ue("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");Ue("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");Ue("1.2.840.113549.2.7","hmacWithSHA1");Ue("1.2.840.113549.2.8","hmacWithSHA224");Ue("1.2.840.113549.2.9","hmacWithSHA256");Ue("1.2.840.113549.2.10","hmacWithSHA384");Ue("1.2.840.113549.2.11","hmacWithSHA512");Ue("1.2.840.113549.3.7","des-EDE3-CBC");Ue("2.16.840.1.101.3.4.1.2","aes128-CBC");Ue("2.16.840.1.101.3.4.1.22","aes192-CBC");Ue("2.16.840.1.101.3.4.1.42","aes256-CBC");Ue("2.5.4.3","commonName");Ue("2.5.4.4","surname");Ue("2.5.4.5","serialNumber");Ue("2.5.4.6","countryName");Ue("2.5.4.7","localityName");Ue("2.5.4.8","stateOrProvinceName");Ue("2.5.4.9","streetAddress");Ue("2.5.4.10","organizationName");Ue("2.5.4.11","organizationalUnitName");Ue("2.5.4.12","title");Ue("2.5.4.13","description");Ue("2.5.4.15","businessCategory");Ue("2.5.4.17","postalCode");Ue("2.5.4.42","givenName");Ue("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");Ue("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");Ue("2.16.840.1.113730.1.1","nsCertType");Ue("2.16.840.1.113730.1.13","nsComment");Sr("2.5.29.1","authorityKeyIdentifier");Sr("2.5.29.2","keyAttributes");Sr("2.5.29.3","certificatePolicies");Sr("2.5.29.4","keyUsageRestriction");Sr("2.5.29.5","policyMapping");Sr("2.5.29.6","subtreesConstraint");Sr("2.5.29.7","subjectAltName");Sr("2.5.29.8","issuerAltName");Sr("2.5.29.9","subjectDirectoryAttributes");Sr("2.5.29.10","basicConstraints");Sr("2.5.29.11","nameConstraints");Sr("2.5.29.12","policyConstraints");Sr("2.5.29.13","basicConstraints");Ue("2.5.29.14","subjectKeyIdentifier");Ue("2.5.29.15","keyUsage");Sr("2.5.29.16","privateKeyUsagePeriod");Ue("2.5.29.17","subjectAltName");Ue("2.5.29.18","issuerAltName");Ue("2.5.29.19","basicConstraints");Sr("2.5.29.20","cRLNumber");Sr("2.5.29.21","cRLReason");Sr("2.5.29.22","expirationDate");Sr("2.5.29.23","instructionCode");Sr("2.5.29.24","invalidityDate");Sr("2.5.29.25","cRLDistributionPoints");Sr("2.5.29.26","issuingDistributionPoint");Sr("2.5.29.27","deltaCRLIndicator");Sr("2.5.29.28","issuingDistributionPoint");Sr("2.5.29.29","certificateIssuer");Sr("2.5.29.30","nameConstraints");Ue("2.5.29.31","cRLDistributionPoints");Ue("2.5.29.32","certificatePolicies");Sr("2.5.29.33","policyMappings");Sr("2.5.29.34","policyConstraints");Ue("2.5.29.35","authorityKeyIdentifier");Sr("2.5.29.36","policyConstraints");Ue("2.5.29.37","extKeyUsage");Sr("2.5.29.46","freshestCRL");Sr("2.5.29.54","inhibitAnyPolicy");Ue("1.3.6.1.4.1.11129.2.4.2","timestampList");Ue("1.3.6.1.5.5.7.1.1","authorityInfoAccess");Ue("1.3.6.1.5.5.7.3.1","serverAuth");Ue("1.3.6.1.5.5.7.3.2","clientAuth");Ue("1.3.6.1.5.5.7.3.3","codeSigning");Ue("1.3.6.1.5.5.7.3.4","emailProtection");Ue("1.3.6.1.5.5.7.3.8","timeStamping")});var ia=Q((Gye,w4)=>{"use strict";var Fr=Xt();hr();qu();var Qe=w4.exports=Fr.asn1=Fr.asn1||{};Qe.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};Qe.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};Qe.create=function(r,e,t,n,s){if(Fr.util.isArray(n)){for(var i=[],a=0;a<n.length;++a)n[a]!==void 0&&i.push(n[a]);n=i}var u={tagClass:r,type:e,constructed:t,composed:t||Fr.util.isArray(n),value:n};return s&&"bitStringContents"in s&&(u.bitStringContents=s.bitStringContents,u.original=Qe.copy(u)),u};Qe.copy=function(r,e){var t;if(Fr.util.isArray(r)){t=[];for(var n=0;n<r.length;++n)t.push(Qe.copy(r[n],e));return t}return typeof r=="string"?r:(t={tagClass:r.tagClass,type:r.type,constructed:r.constructed,composed:r.composed,value:Qe.copy(r.value,e)},e&&!e.excludeBitStringContents&&(t.bitStringContents=r.bitStringContents),t)};Qe.equals=function(r,e,t){if(Fr.util.isArray(r)){if(!Fr.util.isArray(e)||r.length!==e.length)return!1;for(var n=0;n<r.length;++n)if(!Qe.equals(r[n],e[n]))return!1;return!0}if(typeof r!=typeof e)return!1;if(typeof r=="string")return r===e;var s=r.tagClass===e.tagClass&&r.type===e.type&&r.constructed===e.constructed&&r.composed===e.composed&&Qe.equals(r.value,e.value);return t&&t.includeBitStringContents&&(s=s&&r.bitStringContents===e.bitStringContents),s};Qe.getBerValueLength=function(r){var e=r.getByte();if(e!==128){var t,n=e&128;return n?t=r.getInt((e&127)<<3):t=e,t}};function dg(r,e,t){if(t>e){var n=new Error("Too few bytes to parse DER.");throw n.available=r.length(),n.remaining=e,n.requested=t,n}}o(dg,"_checkBufferLength");var EZ=o(function(r,e){var t=r.getByte();if(e--,t!==128){var n,s=t&128;if(!s)n=t;else{var i=t&127;dg(r,e,i),n=r.getInt(i<<3)}if(n<0)throw new Error("Negative length: "+n);return n}},"_getValueLength");Qe.fromDer=function(r,e){e===void 0&&(e={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof e=="boolean"&&(e={strict:e,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in e||(e.strict=!0),"parseAllBytes"in e||(e.parseAllBytes=!0),"decodeBitStrings"in e||(e.decodeBitStrings=!0),typeof r=="string"&&(r=Fr.util.createBuffer(r));var t=r.length(),n=Gw(r,r.length(),0,e);if(e.parseAllBytes&&r.length()!==0){var s=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw s.byteCount=t,s.remaining=r.length(),s}return n};function Gw(r,e,t,n){var s;dg(r,e,2);var i=r.getByte();e--;var a=i&192,u=i&31;s=r.length();var c=EZ(r,e);if(e-=s-r.length(),c!==void 0&&c>e){if(n.strict){var f=new Error("Too few bytes to read ASN.1 value.");throw f.available=r.length(),f.remaining=e,f.requested=c,f}c=e}var h,m,g=(i&32)===32;if(g)if(h=[],c===void 0)for(;;){if(dg(r,e,2),r.bytes(2)==="\0\0"){r.getBytes(2),e-=2;break}s=r.length(),h.push(Gw(r,e,t+1,n)),e-=s-r.length()}else for(;c>0;)s=r.length(),h.push(Gw(r,c,t+1,n)),e-=s-r.length(),c-=s-r.length();if(h===void 0&&a===Qe.Class.UNIVERSAL&&u===Qe.Type.BITSTRING&&(m=r.bytes(c)),h===void 0&&n.decodeBitStrings&&a===Qe.Class.UNIVERSAL&&u===Qe.Type.BITSTRING&&c>1){var x=r.read,v=e,w=0;if(u===Qe.Type.BITSTRING&&(dg(r,e,1),w=r.getByte(),e--),w===0)try{s=r.length();var S={strict:!0,decodeBitStrings:!0},A=Gw(r,e,t+1,S),N=s-r.length();e-=N,u==Qe.Type.BITSTRING&&N++;var b=A.tagClass;N===c&&(b===Qe.Class.UNIVERSAL||b===Qe.Class.CONTEXT_SPECIFIC)&&(h=[A])}catch{}h===void 0&&(r.read=x,e=v)}if(h===void 0){if(c===void 0){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");c=e}if(u===Qe.Type.BMPSTRING)for(h="";c>0;c-=2)dg(r,e,2),h+=String.fromCharCode(r.getInt16()),e-=2;else h=r.getBytes(c),e-=c}var E=m===void 0?null:{bitStringContents:m};return Qe.create(a,u,g,h,E)}o(Gw,"_fromDer");Qe.toDer=function(r){var e=Fr.util.createBuffer(),t=r.tagClass|r.type,n=Fr.util.createBuffer(),s=!1;if("bitStringContents"in r&&(s=!0,r.original&&(s=Qe.equals(r,r.original))),s)n.putBytes(r.bitStringContents);else if(r.composed){r.constructed?t|=32:n.putByte(0);for(var i=0;i<r.value.length;++i)r.value[i]!==void 0&&n.putBuffer(Qe.toDer(r.value[i]))}else if(r.type===Qe.Type.BMPSTRING)for(var i=0;i<r.value.length;++i)n.putInt16(r.value.charCodeAt(i));else r.type===Qe.Type.INTEGER&&r.value.length>1&&(r.value.charCodeAt(0)===0&&(r.value.charCodeAt(1)&128)===0||r.value.charCodeAt(0)===255&&(r.value.charCodeAt(1)&128)===128)?n.putBytes(r.value.substr(1)):n.putBytes(r.value);if(e.putByte(t),n.length()<=127)e.putByte(n.length()&127);else{var a=n.length(),u="";do u+=String.fromCharCode(a&255),a=a>>>8;while(a>0);e.putByte(u.length|128);for(var i=u.length-1;i>=0;--i)e.putByte(u.charCodeAt(i))}return e.putBuffer(n),e};Qe.oidToDer=function(r){var e=r.split("."),t=Fr.util.createBuffer();t.putByte(40*parseInt(e[0],10)+parseInt(e[1],10));for(var n,s,i,a,u=2;u<e.length;++u){n=!0,s=[],i=parseInt(e[u],10);do a=i&127,i=i>>>7,n||(a|=128),s.push(a),n=!1;while(i>0);for(var c=s.length-1;c>=0;--c)t.putByte(s[c])}return t};Qe.derToOid=function(r){var e;typeof r=="string"&&(r=Fr.util.createBuffer(r));var t=r.getByte();e=Math.floor(t/40)+"."+t%40;for(var n=0;r.length()>0;)t=r.getByte(),n=n<<7,t&128?n+=t&127:(e+="."+(n+t),n=0);return e};Qe.utcTimeToDate=function(r){var e=new Date,t=parseInt(r.substr(0,2),10);t=t>=50?1900+t:2e3+t;var n=parseInt(r.substr(2,2),10)-1,s=parseInt(r.substr(4,2),10),i=parseInt(r.substr(6,2),10),a=parseInt(r.substr(8,2),10),u=0;if(r.length>11){var c=r.charAt(10),f=10;c!=="+"&&c!=="-"&&(u=parseInt(r.substr(10,2),10),f+=2)}if(e.setUTCFullYear(t,n,s),e.setUTCHours(i,a,u,0),f&&(c=r.charAt(f),c==="+"||c==="-")){var h=parseInt(r.substr(f+1,2),10),m=parseInt(r.substr(f+4,2),10),g=h*60+m;g*=6e4,c==="+"?e.setTime(+e-g):e.setTime(+e+g)}return e};Qe.generalizedTimeToDate=function(r){var e=new Date,t=parseInt(r.substr(0,4),10),n=parseInt(r.substr(4,2),10)-1,s=parseInt(r.substr(6,2),10),i=parseInt(r.substr(8,2),10),a=parseInt(r.substr(10,2),10),u=parseInt(r.substr(12,2),10),c=0,f=0,h=!1;r.charAt(r.length-1)==="Z"&&(h=!0);var m=r.length-5,g=r.charAt(m);if(g==="+"||g==="-"){var x=parseInt(r.substr(m+1,2),10),v=parseInt(r.substr(m+4,2),10);f=x*60+v,f*=6e4,g==="+"&&(f*=-1),h=!0}return r.charAt(14)==="."&&(c=parseFloat(r.substr(14),10)*1e3),h?(e.setUTCFullYear(t,n,s),e.setUTCHours(i,a,u,c),e.setTime(+e+f)):(e.setFullYear(t,n,s),e.setHours(i,a,u,c)),e};Qe.dateToUtcTime=function(r){if(typeof r=="string")return r;var e="",t=[];t.push((""+r.getUTCFullYear()).substr(2)),t.push(""+(r.getUTCMonth()+1)),t.push(""+r.getUTCDate()),t.push(""+r.getUTCHours()),t.push(""+r.getUTCMinutes()),t.push(""+r.getUTCSeconds());for(var n=0;n<t.length;++n)t[n].length<2&&(e+="0"),e+=t[n];return e+="Z",e};Qe.dateToGeneralizedTime=function(r){if(typeof r=="string")return r;var e="",t=[];t.push(""+r.getUTCFullYear()),t.push(""+(r.getUTCMonth()+1)),t.push(""+r.getUTCDate()),t.push(""+r.getUTCHours()),t.push(""+r.getUTCMinutes()),t.push(""+r.getUTCSeconds());for(var n=0;n<t.length;++n)t[n].length<2&&(e+="0"),e+=t[n];return e+="Z",e};Qe.integerToDer=function(r){var e=Fr.util.createBuffer();if(r>=-128&&r<128)return e.putSignedInt(r,8);if(r>=-32768&&r<32768)return e.putSignedInt(r,16);if(r>=-8388608&&r<8388608)return e.putSignedInt(r,24);if(r>=-2147483648&&r<2147483648)return e.putSignedInt(r,32);var t=new Error("Integer too large; max is 32-bits.");throw t.integer=r,t};Qe.derToInteger=function(r){typeof r=="string"&&(r=Fr.util.createBuffer(r));var e=r.length()*8;if(e>32)throw new Error("Integer too large; max is 32-bits.");return r.getSignedInt(e)};Qe.validate=function(r,e,t,n){var s=!1;if((r.tagClass===e.tagClass||typeof e.tagClass>"u")&&(r.type===e.type||typeof e.type>"u"))if(r.constructed===e.constructed||typeof e.constructed>"u"){if(s=!0,e.value&&Fr.util.isArray(e.value))for(var i=0,a=0;s&&a<e.value.length;++a)s=e.value[a].optional||!1,r.value[i]&&(s=Qe.validate(r.value[i],e.value[a],t,n),s?++i:e.value[a].optional&&(s=!0)),!s&&n&&n.push("["+e.name+'] Tag class "'+e.tagClass+'", type "'+e.type+'" expected value length "'+e.value.length+'", got "'+r.value.length+'"');if(s&&t&&(e.capture&&(t[e.capture]=r.value),e.captureAsn1&&(t[e.captureAsn1]=r),e.captureBitStringContents&&"bitStringContents"in r&&(t[e.captureBitStringContents]=r.bitStringContents),e.captureBitStringValue&&"bitStringContents"in r)){var u;if(r.bitStringContents.length<2)t[e.captureBitStringValue]="";else{var c=r.bitStringContents.charCodeAt(0);if(c!==0)throw new Error("captureBitStringValue only supported for zero unused bits");t[e.captureBitStringValue]=r.bitStringContents.slice(1)}}}else n&&n.push("["+e.name+'] Expected constructed "'+e.constructed+'", got "'+r.constructed+'"');else n&&(r.tagClass!==e.tagClass&&n.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+r.tagClass+'"'),r.type!==e.type&&n.push("["+e.name+'] Expected type "'+e.type+'", got "'+r.type+'"'));return s};var x4=/[^\\u0000-\\u00ff]/;Qe.prettyPrint=function(r,e,t){var n="";e=e||0,t=t||2,e>0&&(n+=`
|
|
5
|
+
`);for(var s="",i=0;i<e*t;++i)s+=" ";switch(n+=s+"Tag: ",r.tagClass){case Qe.Class.UNIVERSAL:n+="Universal:";break;case Qe.Class.APPLICATION:n+="Application:";break;case Qe.Class.CONTEXT_SPECIFIC:n+="Context-Specific:";break;case Qe.Class.PRIVATE:n+="Private:";break}if(r.tagClass===Qe.Class.UNIVERSAL)switch(n+=r.type,r.type){case Qe.Type.NONE:n+=" (None)";break;case Qe.Type.BOOLEAN:n+=" (Boolean)";break;case Qe.Type.INTEGER:n+=" (Integer)";break;case Qe.Type.BITSTRING:n+=" (Bit string)";break;case Qe.Type.OCTETSTRING:n+=" (Octet string)";break;case Qe.Type.NULL:n+=" (Null)";break;case Qe.Type.OID:n+=" (Object Identifier)";break;case Qe.Type.ODESC:n+=" (Object Descriptor)";break;case Qe.Type.EXTERNAL:n+=" (External or Instance of)";break;case Qe.Type.REAL:n+=" (Real)";break;case Qe.Type.ENUMERATED:n+=" (Enumerated)";break;case Qe.Type.EMBEDDED:n+=" (Embedded PDV)";break;case Qe.Type.UTF8:n+=" (UTF8)";break;case Qe.Type.ROID:n+=" (Relative Object Identifier)";break;case Qe.Type.SEQUENCE:n+=" (Sequence)";break;case Qe.Type.SET:n+=" (Set)";break;case Qe.Type.PRINTABLESTRING:n+=" (Printable String)";break;case Qe.Type.IA5String:n+=" (IA5String (ASCII))";break;case Qe.Type.UTCTIME:n+=" (UTC time)";break;case Qe.Type.GENERALIZEDTIME:n+=" (Generalized time)";break;case Qe.Type.BMPSTRING:n+=" (BMP String)";break}else n+=r.type;if(n+=`
|
|
6
|
+
`,n+=s+"Constructed: "+r.constructed+`
|
|
7
|
+
`,r.composed){for(var a=0,u="",i=0;i<r.value.length;++i)r.value[i]!==void 0&&(a+=1,u+=Qe.prettyPrint(r.value[i],e+1,t),i+1<r.value.length&&(u+=","));n+=s+"Sub values: "+a+u}else{if(n+=s+"Value: ",r.type===Qe.Type.OID){var c=Qe.derToOid(r.value);n+=c,Fr.pki&&Fr.pki.oids&&c in Fr.pki.oids&&(n+=" ("+Fr.pki.oids[c]+") ")}if(r.type===Qe.Type.INTEGER)try{n+=Qe.derToInteger(r.value)}catch{n+="0x"+Fr.util.bytesToHex(r.value)}else if(r.type===Qe.Type.BITSTRING){if(r.value.length>1?n+="0x"+Fr.util.bytesToHex(r.value.slice(1)):n+="(none)",r.value.length>0){var f=r.value.charCodeAt(0);f==1?n+=" (1 unused bit shown)":f>1&&(n+=" ("+f+" unused bits shown)")}}else if(r.type===Qe.Type.OCTETSTRING)x4.test(r.value)||(n+="("+r.value+") "),n+="0x"+Fr.util.bytesToHex(r.value);else if(r.type===Qe.Type.UTF8)try{n+=Fr.util.decodeUtf8(r.value)}catch(h){if(h.message==="URI malformed")n+="0x"+Fr.util.bytesToHex(r.value)+" (malformed UTF8)";else throw h}else r.type===Qe.Type.PRINTABLESTRING||r.type===Qe.Type.IA5String?n+=r.value:x4.test(r.value)?n+="0x"+Fr.util.bytesToHex(r.value):r.value.length===0?n+="[null]":n+=r.value}return n}});var Pa=Q((zye,S4)=>{"use strict";var Ww=Xt();S4.exports=Ww.md=Ww.md||{};Ww.md.algorithms=Ww.md.algorithms||{}});var Ap=Q((Jye,b4)=>{"use strict";var Oo=Xt();Pa();hr();var AZ=b4.exports=Oo.hmac=Oo.hmac||{};AZ.create=function(){var r=null,e=null,t=null,n=null,s={};return s.start=function(i,a){if(i!==null)if(typeof i=="string")if(i=i.toLowerCase(),i in Oo.md.algorithms)e=Oo.md.algorithms[i].create();else throw new Error('Unknown hash algorithm "'+i+'"');else e=i;if(a===null)a=r;else{if(typeof a=="string")a=Oo.util.createBuffer(a);else if(Oo.util.isArray(a)){var u=a;a=Oo.util.createBuffer();for(var c=0;c<u.length;++c)a.putByte(u[c])}var f=a.length();f>e.blockLength&&(e.start(),e.update(a.bytes()),a=e.digest()),t=Oo.util.createBuffer(),n=Oo.util.createBuffer(),f=a.length();for(var c=0;c<f;++c){var u=a.at(c);t.putByte(54^u),n.putByte(92^u)}if(f<e.blockLength)for(var u=e.blockLength-f,c=0;c<u;++c)t.putByte(54),n.putByte(92);r=a,t=t.bytes(),n=n.bytes()}e.start(),e.update(t)},s.update=function(i){e.update(i)},s.getMac=function(){var i=e.digest().bytes();return e.start(),e.update(n),e.update(i),e.digest()},s.digest=s.getMac,s}});var Jw=Q((Yye,N4)=>{"use strict";var ka=Xt();Pa();hr();var A4=N4.exports=ka.md5=ka.md5||{};ka.md.md5=ka.md.algorithms.md5=A4;A4.create=function(){C4||CZ();var r=null,e=ka.util.createBuffer(),t=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var s=n.messageLengthSize/4,i=0;i<s;++i)n.fullMessageLength.push(0);return e=ka.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=ka.util.encodeUtf8(s));var a=s.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=a[1],a[1]=a[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(s),E4(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=ka.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(wT.substr(0,n.blockLength-a));for(var u,c=0,f=n.fullMessageLength.length-1;f>=0;--f)u=n.fullMessageLength[f]*8+c,c=u/4294967296>>>0,s.putInt32Le(u>>>0);var h={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3};E4(h,t,s);var m=ka.util.createBuffer();return m.putInt32Le(h.h0),m.putInt32Le(h.h1),m.putInt32Le(h.h2),m.putInt32Le(h.h3),m},n};var wT=null,zw=null,mg=null,Cp=null,C4=!1;function CZ(){wT="\x80",wT+=ka.util.fillString("\0",64),zw=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],mg=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],Cp=new Array(64);for(var r=0;r<64;++r)Cp[r]=Math.floor(Math.abs(Math.sin(r+1))*4294967296);C4=!0}o(CZ,"_init");function E4(r,e,t){for(var n,s,i,a,u,c,f,h,m=t.length();m>=64;){for(s=r.h0,i=r.h1,a=r.h2,u=r.h3,h=0;h<16;++h)e[h]=t.getInt32Le(),c=u^i&(a^u),n=s+c+Cp[h]+e[h],f=mg[h],s=u,u=a,a=i,i+=n<<f|n>>>32-f;for(;h<32;++h)c=a^u&(i^a),n=s+c+Cp[h]+e[zw[h]],f=mg[h],s=u,u=a,a=i,i+=n<<f|n>>>32-f;for(;h<48;++h)c=i^a^u,n=s+c+Cp[h]+e[zw[h]],f=mg[h],s=u,u=a,a=i,i+=n<<f|n>>>32-f;for(;h<64;++h)c=a^(i|~u),n=s+c+Cp[h]+e[zw[h]],f=mg[h],s=u,u=a,a=i,i+=n<<f|n>>>32-f;r.h0=r.h0+s|0,r.h1=r.h1+i|0,r.h2=r.h2+a|0,r.h3=r.h3+u|0,m-=64}}o(E4,"_update")});var $l=Q((Zye,I4)=>{"use strict";var Qw=Xt();hr();var T4=I4.exports=Qw.pem=Qw.pem||{};T4.encode=function(r,e){e=e||{};var t="-----BEGIN "+r.type+`-----\r
|
|
8
|
+
`,n;if(r.procType&&(n={name:"Proc-Type",values:[String(r.procType.version),r.procType.type]},t+=Yw(n)),r.contentDomain&&(n={name:"Content-Domain",values:[r.contentDomain]},t+=Yw(n)),r.dekInfo&&(n={name:"DEK-Info",values:[r.dekInfo.algorithm]},r.dekInfo.parameters&&n.values.push(r.dekInfo.parameters),t+=Yw(n)),r.headers)for(var s=0;s<r.headers.length;++s)t+=Yw(r.headers[s]);return r.procType&&(t+=`\r
|
|
9
|
+
`),t+=Qw.util.encode64(r.body,e.maxline||64)+`\r
|
|
10
|
+
`,t+="-----END "+r.type+`-----\r
|
|
11
|
+
`,t};T4.decode=function(r){for(var e=[],t=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,n=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,s=/\r?\n/,i;i=t.exec(r),!!i;){var a=i[1];a==="NEW CERTIFICATE REQUEST"&&(a="CERTIFICATE REQUEST");var u={type:a,procType:null,contentDomain:null,dekInfo:null,headers:[],body:Qw.util.decode64(i[3])};if(e.push(u),!!i[2]){for(var c=i[2].split(s),f=0;i&&f<c.length;){for(var h=c[f].replace(/\s+$/,""),m=f+1;m<c.length;++m){var g=c[m];if(!/\s/.test(g[0]))break;h+=g,f=m}if(i=h.match(n),i){for(var x={name:i[1],values:[]},v=i[2].split(","),w=0;w<v.length;++w)x.values.push(NZ(v[w]));if(u.procType)if(!u.contentDomain&&x.name==="Content-Domain")u.contentDomain=v[0]||"";else if(!u.dekInfo&&x.name==="DEK-Info"){if(x.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');u.dekInfo={algorithm:v[0],parameters:v[1]||null}}else u.headers.push(x);else{if(x.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(x.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');u.procType={version:v[0],type:v[1]}}}++f}if(u.procType==="ENCRYPTED"&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(e.length===0)throw new Error("Invalid PEM formatted message.");return e};function Yw(r){for(var e=r.name+": ",t=[],n=o(function(c,f){return" "+f},"insertSpace"),s=0;s<r.values.length;++s)t.push(r.values[s].replace(/^(\S+\r\n)/,n));e+=t.join(",")+`\r
|
|
12
|
+
`;for(var i=0,a=-1,s=0;s<e.length;++s,++i)if(i>65&&a!==-1){var u=e[a];u===","?(++a,e=e.substr(0,a)+`\r
|
|
13
|
+
`+e.substr(a)):e=e.substr(0,a)+`\r
|
|
14
|
+
`+u+e.substr(a+1),i=s-a-1,a=-1,++s}else(e[s]===" "||e[s]===" "||e[s]===",")&&(a=s);return e}o(Yw,"foldHeader");function NZ(r){return r.replace(/^\s+/,"")}o(NZ,"ltrim")});var gg=Q((txe,B4)=>{"use strict";var $r=Xt();Hw();mT();hr();B4.exports=$r.des=$r.des||{};$r.des.startEncrypting=function(r,e,t,n){var s=Zw({key:r,output:t,decrypt:!1,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};$r.des.createEncryptionCipher=function(r,e){return Zw({key:r,output:null,decrypt:!1,mode:e})};$r.des.startDecrypting=function(r,e,t,n){var s=Zw({key:r,output:t,decrypt:!0,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};$r.des.createDecryptionCipher=function(r,e){return Zw({key:r,output:null,decrypt:!0,mode:e})};$r.des.Algorithm=function(r,e){var t=this;t.name=r,t.mode=new e({blockSize:8,cipher:{encrypt:o(function(n,s){return _4(t._keys,n,s,!1)},"encrypt"),decrypt:o(function(n,s){return _4(t._keys,n,s,!0)},"decrypt")}}),t._init=!1};$r.des.Algorithm.prototype.initialize=function(r){if(!this._init){var e=$r.util.createBuffer(r.key);if(this.name.indexOf("3DES")===0&&e.length()!==24)throw new Error("Invalid Triple-DES key size: "+e.length()*8);this._keys=kZ(e),this._init=!0}};La("DES-ECB",$r.cipher.modes.ecb);La("DES-CBC",$r.cipher.modes.cbc);La("DES-CFB",$r.cipher.modes.cfb);La("DES-OFB",$r.cipher.modes.ofb);La("DES-CTR",$r.cipher.modes.ctr);La("3DES-ECB",$r.cipher.modes.ecb);La("3DES-CBC",$r.cipher.modes.cbc);La("3DES-CFB",$r.cipher.modes.cfb);La("3DES-OFB",$r.cipher.modes.ofb);La("3DES-CTR",$r.cipher.modes.ctr);function La(r,e){var t=o(function(){return new $r.des.Algorithm(r,e)},"factory");$r.cipher.registerAlgorithm(r,t)}o(La,"registerAlgorithm");var TZ=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],IZ=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],_Z=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],BZ=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],DZ=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],RZ=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],OZ=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],PZ=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function kZ(r){for(var e=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],t=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],s=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],i=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],a=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],f=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],h=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],m=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],g=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],x=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],v=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],w=r.length()>8?3:1,S=[],A=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],N=0,b,E=0;E<w;E++){var C=r.getInt32(),_=r.getInt32();b=(C>>>4^_)&252645135,_^=b,C^=b<<4,b=(_>>>-16^C)&65535,C^=b,_^=b<<-16,b=(C>>>2^_)&858993459,_^=b,C^=b<<2,b=(_>>>-16^C)&65535,C^=b,_^=b<<-16,b=(C>>>1^_)&1431655765,_^=b,C^=b<<1,b=(_>>>8^C)&16711935,C^=b,_^=b<<8,b=(C>>>1^_)&1431655765,_^=b,C^=b<<1,b=C<<8|_>>>20&240,C=_<<24|_<<8&16711680|_>>>8&65280|_>>>24&240,_=b;for(var M=0;M<A.length;++M){A[M]?(C=C<<2|C>>>26,_=_<<2|_>>>26):(C=C<<1|C>>>27,_=_<<1|_>>>27),C&=-15,_&=-15;var R=e[C>>>28]|t[C>>>24&15]|n[C>>>20&15]|s[C>>>16&15]|i[C>>>12&15]|a[C>>>8&15]|u[C>>>4&15],q=c[_>>>28]|f[_>>>24&15]|h[_>>>20&15]|m[_>>>16&15]|g[_>>>12&15]|x[_>>>8&15]|v[_>>>4&15];b=(q>>>16^R)&65535,S[N++]=R^b,S[N++]=q^b<<16}}return S}o(kZ,"_createKeys");function _4(r,e,t,n){var s=r.length===32?3:9,i;s===3?i=n?[30,-2,-2]:[0,32,2]:i=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var a,u=e[0],c=e[1];a=(u>>>4^c)&252645135,c^=a,u^=a<<4,a=(u>>>16^c)&65535,c^=a,u^=a<<16,a=(c>>>2^u)&858993459,u^=a,c^=a<<2,a=(c>>>8^u)&16711935,u^=a,c^=a<<8,a=(u>>>1^c)&1431655765,c^=a,u^=a<<1,u=u<<1|u>>>31,c=c<<1|c>>>31;for(var f=0;f<s;f+=3){for(var h=i[f+1],m=i[f+2],g=i[f];g!=h;g+=m){var x=c^r[g],v=(c>>>4|c<<28)^r[g+1];a=u,u=c,c=a^(IZ[x>>>24&63]|BZ[x>>>16&63]|RZ[x>>>8&63]|PZ[x&63]|TZ[v>>>24&63]|_Z[v>>>16&63]|DZ[v>>>8&63]|OZ[v&63])}a=u,u=c,c=a}u=u>>>1|u<<31,c=c>>>1|c<<31,a=(u>>>1^c)&1431655765,c^=a,u^=a<<1,a=(c>>>8^u)&16711935,u^=a,c^=a<<8,a=(c>>>2^u)&858993459,u^=a,c^=a<<2,a=(u>>>16^c)&65535,c^=a,u^=a<<16,a=(u>>>4^c)&252645135,c^=a,u^=a<<4,t[0]=u,t[1]=c}o(_4,"_updateBlock");function Zw(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="DES-"+e,n;r.decrypt?n=$r.cipher.createDecipher(t,r.key):n=$r.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof $r.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(Zw,"_createCipher")});var eS=Q((nxe,D4)=>{"use strict";var bs=Xt();Ap();Pa();hr();var LZ=bs.pkcs5=bs.pkcs5||{},Po;bs.util.isNodejs&&!bs.options.usePureJavaScript&&(Po=require("crypto"));D4.exports=bs.pbkdf2=LZ.pbkdf2=function(r,e,t,n,s,i){if(typeof s=="function"&&(i=s,s=null),bs.util.isNodejs&&!bs.options.usePureJavaScript&&Po.pbkdf2&&(s===null||typeof s!="object")&&(Po.pbkdf2Sync.length>4||!s||s==="sha1"))return typeof s!="string"&&(s="sha1"),r=Buffer.from(r,"binary"),e=Buffer.from(e,"binary"),i?Po.pbkdf2Sync.length===4?Po.pbkdf2(r,e,t,n,function(b,E){if(b)return i(b);i(null,E.toString("binary"))}):Po.pbkdf2(r,e,t,n,s,function(b,E){if(b)return i(b);i(null,E.toString("binary"))}):Po.pbkdf2Sync.length===4?Po.pbkdf2Sync(r,e,t,n).toString("binary"):Po.pbkdf2Sync(r,e,t,n,s).toString("binary");if((typeof s>"u"||s===null)&&(s="sha1"),typeof s=="string"){if(!(s in bs.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=bs.md[s].create()}var a=s.digestLength;if(n>4294967295*a){var u=new Error("Derived key is too long.");if(i)return i(u);throw u}var c=Math.ceil(n/a),f=n-(c-1)*a,h=bs.hmac.create();h.start(s,r);var m="",g,x,v;if(!i){for(var w=1;w<=c;++w){h.start(null,null),h.update(e),h.update(bs.util.int32ToBytes(w)),g=v=h.digest().getBytes();for(var S=2;S<=t;++S)h.start(null,null),h.update(v),x=h.digest().getBytes(),g=bs.util.xorBytes(g,x,a),v=x;m+=w<c?g:g.substr(0,f)}return m}var w=1,S;function A(){if(w>c)return i(null,m);h.start(null,null),h.update(e),h.update(bs.util.int32ToBytes(w)),g=v=h.digest().getBytes(),S=2,N()}o(A,"outer");function N(){if(S<=t)return h.start(null,null),h.update(v),x=h.digest().getBytes(),g=bs.util.xorBytes(g,x,a),v=x,++S,bs.util.setImmediate(N);m+=w<c?g:g.substr(0,f),++w,A()}o(N,"inner"),A()}});var bT=Q((ixe,L4)=>{"use strict";var Va=Xt();Pa();hr();var O4=L4.exports=Va.sha256=Va.sha256||{};Va.md.sha256=Va.md.algorithms.sha256=O4;O4.create=function(){P4||VZ();var r=null,e=Va.util.createBuffer(),t=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var s=n.messageLengthSize/4,i=0;i<s;++i)n.fullMessageLength.push(0);return e=Va.util.createBuffer(),r={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=Va.util.encodeUtf8(s));var a=s.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=a[1],a[1]=a[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(s),R4(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=Va.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(ST.substr(0,n.blockLength-a));for(var u,c,f=n.fullMessageLength[0]*8,h=0;h<n.fullMessageLength.length-1;++h)u=n.fullMessageLength[h+1]*8,c=u/4294967296>>>0,f+=c,s.putInt32(f>>>0),f=u>>>0;s.putInt32(f);var m={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3,h4:r.h4,h5:r.h5,h6:r.h6,h7:r.h7};R4(m,t,s);var g=Va.util.createBuffer();return g.putInt32(m.h0),g.putInt32(m.h1),g.putInt32(m.h2),g.putInt32(m.h3),g.putInt32(m.h4),g.putInt32(m.h5),g.putInt32(m.h6),g.putInt32(m.h7),g},n};var ST=null,P4=!1,k4=null;function VZ(){ST="\x80",ST+=Va.util.fillString("\0",64),k4=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],P4=!0}o(VZ,"_init");function R4(r,e,t){for(var n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,N=t.length();N>=64;){for(f=0;f<16;++f)e[f]=t.getInt32();for(;f<64;++f)n=e[f-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,s=e[f-15],s=(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3,e[f]=n+e[f-7]+s+e[f-16]|0;for(h=r.h0,m=r.h1,g=r.h2,x=r.h3,v=r.h4,w=r.h5,S=r.h6,A=r.h7,f=0;f<64;++f)a=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),u=S^v&(w^S),i=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),c=h&m|g&(h^m),n=A+a+u+k4[f]+e[f],s=i+c,A=S,S=w,w=v,v=x+n>>>0,x=g,g=m,m=h,h=n+s>>>0;r.h0=r.h0+h|0,r.h1=r.h1+m|0,r.h2=r.h2+g|0,r.h3=r.h3+x|0,r.h4=r.h4+v|0,r.h5=r.h5+w|0,r.h6=r.h6+S|0,r.h7=r.h7+A|0,N-=64}}o(R4,"_update")});var ET=Q((oxe,V4)=>{"use strict";var Ua=Xt();hr();var tS=null;Ua.util.isNodejs&&!Ua.options.usePureJavaScript&&!process.versions["node-webkit"]&&(tS=require("crypto"));var UZ=V4.exports=Ua.prng=Ua.prng||{};UZ.create=function(r){for(var e={plugin:r,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},t=r.md,n=new Array(32),s=0;s<32;++s)n[s]=t.create();e.pools=n,e.pool=0,e.generate=function(f,h){if(!h)return e.generateSync(f);var m=e.plugin.cipher,g=e.plugin.increment,x=e.plugin.formatKey,v=e.plugin.formatSeed,w=Ua.util.createBuffer();e.key=null,S();function S(A){if(A)return h(A);if(w.length()>=f)return h(null,w.getBytes(f));if(e.generated>1048575&&(e.key=null),e.key===null)return Ua.util.nextTick(function(){i(S)});var N=m(e.key,e.seed);e.generated+=N.length,w.putBytes(N),e.key=x(m(e.key,g(e.seed))),e.seed=v(m(e.key,e.seed)),Ua.util.setImmediate(S)}o(S,"generate")},e.generateSync=function(f){var h=e.plugin.cipher,m=e.plugin.increment,g=e.plugin.formatKey,x=e.plugin.formatSeed;e.key=null;for(var v=Ua.util.createBuffer();v.length()<f;){e.generated>1048575&&(e.key=null),e.key===null&&a();var w=h(e.key,e.seed);e.generated+=w.length,v.putBytes(w),e.key=g(h(e.key,m(e.seed))),e.seed=x(h(e.key,e.seed))}return v.getBytes(f)};function i(f){if(e.pools[0].messageLength>=32)return u(),f();var h=32-e.pools[0].messageLength<<5;e.seedFile(h,function(m,g){if(m)return f(m);e.collect(g),u(),f()})}o(i,"_reseed");function a(){if(e.pools[0].messageLength>=32)return u();var f=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(f)),u()}o(a,"_reseedSync");function u(){e.reseeds=e.reseeds===4294967295?0:e.reseeds+1;var f=e.plugin.md.create();f.update(e.keyBytes);for(var h=1,m=0;m<32;++m)e.reseeds%h===0&&(f.update(e.pools[m].digest().getBytes()),e.pools[m].start()),h=h<<1;e.keyBytes=f.digest().getBytes(),f.start(),f.update(e.keyBytes);var g=f.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(g),e.generated=0}o(u,"_seed");function c(f){var h=null,m=Ua.util.globalScope,g=m.crypto||m.msCrypto;g&&g.getRandomValues&&(h=o(function(C){return g.getRandomValues(C)},"getRandomValues"));var x=Ua.util.createBuffer();if(h)for(;x.length()<f;){var v=Math.max(1,Math.min(f-x.length(),65536)/4),w=new Uint32Array(Math.floor(v));try{h(w);for(var S=0;S<w.length;++S)x.putInt32(w[S])}catch(C){if(!(typeof QuotaExceededError<"u"&&C instanceof QuotaExceededError))throw C}}if(x.length()<f)for(var A,N,b,E=Math.floor(Math.random()*65536);x.length()<f;){N=16807*(E&65535),A=16807*(E>>16),N+=(A&32767)<<16,N+=A>>15,N=(N&2147483647)+(N>>31),E=N&4294967295;for(var S=0;S<3;++S)b=E>>>(S<<3),b^=Math.floor(Math.random()*256),x.putByte(b&255)}return x.getBytes(f)}return o(c,"defaultSeedFile"),tS?(e.seedFile=function(f,h){tS.randomBytes(f,function(m,g){if(m)return h(m);h(null,g.toString())})},e.seedFileSync=function(f){return tS.randomBytes(f).toString()}):(e.seedFile=function(f,h){try{h(null,c(f))}catch(m){h(m)}},e.seedFileSync=c),e.collect=function(f){for(var h=f.length,m=0;m<h;++m)e.pools[e.pool].update(f.substr(m,1)),e.pool=e.pool===31?0:e.pool+1},e.collectInt=function(f,h){for(var m="",g=0;g<h;g+=8)m+=String.fromCharCode(f>>g&255);e.collect(m)},e.registerWorker=function(f){if(f===self)e.seedFile=function(m,g){function x(v){var w=v.data;w.forge&&w.forge.prng&&(self.removeEventListener("message",x),g(w.forge.prng.err,w.forge.prng.bytes))}o(x,"listener"),self.addEventListener("message",x),self.postMessage({forge:{prng:{needed:m}}})};else{var h=o(function(m){var g=m.data;g.forge&&g.forge.prng&&e.seedFile(g.forge.prng.needed,function(x,v){f.postMessage({forge:{prng:{err:x,bytes:v}}})})},"listener");f.addEventListener("message",h)}},e}});var Ti=Q((cxe,AT)=>{"use strict";var Rn=Xt();Mu();bT();ET();hr();(function(){if(Rn.random&&Rn.random.getBytes){AT.exports=Rn.random;return}(function(r){var e={},t=new Array(4),n=Rn.util.createBuffer();e.formatKey=function(m){var g=Rn.util.createBuffer(m);return m=new Array(4),m[0]=g.getInt32(),m[1]=g.getInt32(),m[2]=g.getInt32(),m[3]=g.getInt32(),Rn.aes._expandKey(m,!1)},e.formatSeed=function(m){var g=Rn.util.createBuffer(m);return m=new Array(4),m[0]=g.getInt32(),m[1]=g.getInt32(),m[2]=g.getInt32(),m[3]=g.getInt32(),m},e.cipher=function(m,g){return Rn.aes._updateBlock(m,g,t,!1),n.putInt32(t[0]),n.putInt32(t[1]),n.putInt32(t[2]),n.putInt32(t[3]),n.getBytes()},e.increment=function(m){return++m[3],m},e.md=Rn.md.sha256;function s(){var m=Rn.prng.create(e);return m.getBytes=function(g,x){return m.generate(g,x)},m.getBytesSync=function(g){return m.generate(g)},m}o(s,"spawnPrng");var i=s(),a=null,u=Rn.util.globalScope,c=u.crypto||u.msCrypto;if(c&&c.getRandomValues&&(a=o(function(m){return c.getRandomValues(m)},"getRandomValues")),Rn.options.usePureJavaScript||!Rn.util.isNodejs&&!a){if(typeof window>"u"||window.document,i.collectInt(+new Date,32),typeof navigator<"u"){var f="";for(var h in navigator)try{typeof navigator[h]=="string"&&(f+=navigator[h])}catch{}i.collect(f),f=null}r&&(r().mousemove(function(m){i.collectInt(m.clientX,16),i.collectInt(m.clientY,16)}),r().keypress(function(m){i.collectInt(m.charCode,8)}))}if(!Rn.random)Rn.random=i;else for(var h in i)Rn.random[h]=i[h];Rn.random.createInstance=s,AT.exports=Rn.random})(typeof jQuery<"u"?jQuery:null)})()});var NT=Q((fxe,F4)=>{"use strict";var ks=Xt();hr();var CT=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],U4=[1,2,3,5],jZ=o(function(r,e){return r<<e&65535|(r&65535)>>16-e},"rol"),FZ=o(function(r,e){return(r&65535)>>e|r<<16-e&65535},"ror");F4.exports=ks.rc2=ks.rc2||{};ks.rc2.expandKey=function(r,e){typeof r=="string"&&(r=ks.util.createBuffer(r)),e=e||128;var t=r,n=r.length(),s=e,i=Math.ceil(s/8),a=255>>(s&7),u;for(u=n;u<128;u++)t.putByte(CT[t.at(u-1)+t.at(u-n)&255]);for(t.setAt(128-i,CT[t.at(128-i)&a]),u=127-i;u>=0;u--)t.setAt(u,CT[t.at(u+1)^t.at(u+i)]);return t};var j4=o(function(r,e,t){var n=!1,s=null,i=null,a=null,u,c,f,h,m=[];for(r=ks.rc2.expandKey(r,e),f=0;f<64;f++)m.push(r.getInt16Le());t?(u=o(function(v){for(f=0;f<4;f++)v[f]+=m[h]+(v[(f+3)%4]&v[(f+2)%4])+(~v[(f+3)%4]&v[(f+1)%4]),v[f]=jZ(v[f],U4[f]),h++},"mixRound"),c=o(function(v){for(f=0;f<4;f++)v[f]+=m[v[(f+3)%4]&63]},"mashRound")):(u=o(function(v){for(f=3;f>=0;f--)v[f]=FZ(v[f],U4[f]),v[f]-=m[h]+(v[(f+3)%4]&v[(f+2)%4])+(~v[(f+3)%4]&v[(f+1)%4]),h--},"mixRound"),c=o(function(v){for(f=3;f>=0;f--)v[f]-=m[v[(f+3)%4]&63]},"mashRound"));var g=o(function(v){var w=[];for(f=0;f<4;f++){var S=s.getInt16Le();a!==null&&(t?S^=a.getInt16Le():a.putInt16Le(S)),w.push(S&65535)}h=t?0:63;for(var A=0;A<v.length;A++)for(var N=0;N<v[A][0];N++)v[A][1](w);for(f=0;f<4;f++)a!==null&&(t?a.putInt16Le(w[f]):w[f]^=a.getInt16Le()),i.putInt16Le(w[f])},"runPlan"),x=null;return x={start:o(function(v,w){v&&typeof v=="string"&&(v=ks.util.createBuffer(v)),n=!1,s=ks.util.createBuffer(),i=w||new ks.util.createBuffer,a=v,x.output=i},"start"),update:o(function(v){for(n||s.putBuffer(v);s.length()>=8;)g([[5,u],[1,c],[6,u],[1,c],[5,u]])},"update"),finish:o(function(v){var w=!0;if(t)if(v)w=v(8,s,!t);else{var S=s.length()===8?8:8-s.length();s.fillWithByte(S,S)}if(w&&(n=!0,x.update()),!t&&(w=s.length()===0,w))if(v)w=v(8,i,!t);else{var A=i.length(),N=i.at(A-1);N>A?w=!1:i.truncate(N)}return w},"finish")},x},"createCipher");ks.rc2.startEncrypting=function(r,e,t){var n=ks.rc2.createEncryptionCipher(r,128);return n.start(e,t),n};ks.rc2.createEncryptionCipher=function(r,e){return j4(r,e,!0)};ks.rc2.startDecrypting=function(r,e,t){var n=ks.rc2.createDecryptionCipher(r,128);return n.start(e,t),n};ks.rc2.createDecryptionCipher=function(r,e){return j4(r,e,!1)}});var yg=Q((pxe,W4)=>{"use strict";var TT=Xt();W4.exports=TT.jsbn=TT.jsbn||{};var ko,MZ=0xdeadbeefcafe,M4=(MZ&16777215)==15715070;function Pe(r,e,t){this.data=[],r!=null&&(typeof r=="number"?this.fromNumber(r,e,t):e==null&&typeof r!="string"?this.fromString(r,256):this.fromString(r,e))}o(Pe,"BigInteger");TT.jsbn.BigInteger=Pe;function pr(){return new Pe(null)}o(pr,"nbi");function qZ(r,e,t,n,s,i){for(;--i>=0;){var a=e*this.data[r++]+t.data[n]+s;s=Math.floor(a/67108864),t.data[n++]=a&67108863}return s}o(qZ,"am1");function HZ(r,e,t,n,s,i){for(var a=e&32767,u=e>>15;--i>=0;){var c=this.data[r]&32767,f=this.data[r++]>>15,h=u*c+f*a;c=a*c+((h&32767)<<15)+t.data[n]+(s&1073741823),s=(c>>>30)+(h>>>15)+u*f+(s>>>30),t.data[n++]=c&1073741823}return s}o(HZ,"am2");function q4(r,e,t,n,s,i){for(var a=e&16383,u=e>>14;--i>=0;){var c=this.data[r]&16383,f=this.data[r++]>>14,h=u*c+f*a;c=a*c+((h&16383)<<14)+t.data[n]+s,s=(c>>28)+(h>>14)+u*f,t.data[n++]=c&268435455}return s}o(q4,"am3");typeof navigator>"u"?(Pe.prototype.am=q4,ko=28):M4&&navigator.appName=="Microsoft Internet Explorer"?(Pe.prototype.am=HZ,ko=30):M4&&navigator.appName!="Netscape"?(Pe.prototype.am=qZ,ko=26):(Pe.prototype.am=q4,ko=28);Pe.prototype.DB=ko;Pe.prototype.DM=(1<<ko)-1;Pe.prototype.DV=1<<ko;var IT=52;Pe.prototype.FV=Math.pow(2,IT);Pe.prototype.F1=IT-ko;Pe.prototype.F2=2*ko-IT;var KZ="0123456789abcdefghijklmnopqrstuvwxyz",rS=new Array,Np,Ii;Np=48;for(Ii=0;Ii<=9;++Ii)rS[Np++]=Ii;Np=97;for(Ii=10;Ii<36;++Ii)rS[Np++]=Ii;Np=65;for(Ii=10;Ii<36;++Ii)rS[Np++]=Ii;function H4(r){return KZ.charAt(r)}o(H4,"int2char");function K4(r,e){var t=rS[r.charCodeAt(e)];return t??-1}o(K4,"intAt");function $Z(r){for(var e=this.t-1;e>=0;--e)r.data[e]=this.data[e];r.t=this.t,r.s=this.s}o($Z,"bnpCopyTo");function XZ(r){this.t=1,this.s=r<0?-1:0,r>0?this.data[0]=r:r<-1?this.data[0]=r+this.DV:this.t=0}o(XZ,"bnpFromInt");function Hu(r){var e=pr();return e.fromInt(r),e}o(Hu,"nbv");function GZ(r,e){var t;if(e==16)t=4;else if(e==8)t=3;else if(e==256)t=8;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else{this.fromRadix(r,e);return}this.t=0,this.s=0;for(var n=r.length,s=!1,i=0;--n>=0;){var a=t==8?r[n]&255:K4(r,n);if(a<0){r.charAt(n)=="-"&&(s=!0);continue}s=!1,i==0?this.data[this.t++]=a:i+t>this.DB?(this.data[this.t-1]|=(a&(1<<this.DB-i)-1)<<i,this.data[this.t++]=a>>this.DB-i):this.data[this.t-1]|=a<<i,i+=t,i>=this.DB&&(i-=this.DB)}t==8&&(r[0]&128)!=0&&(this.s=-1,i>0&&(this.data[this.t-1]|=(1<<this.DB-i)-1<<i)),this.clamp(),s&&Pe.ZERO.subTo(this,this)}o(GZ,"bnpFromString");function WZ(){for(var r=this.s&this.DM;this.t>0&&this.data[this.t-1]==r;)--this.t}o(WZ,"bnpClamp");function zZ(r){if(this.s<0)return"-"+this.negate().toString(r);var e;if(r==16)e=4;else if(r==8)e=3;else if(r==2)e=1;else if(r==32)e=5;else if(r==4)e=2;else return this.toRadix(r);var t=(1<<e)-1,n,s=!1,i="",a=this.t,u=this.DB-a*this.DB%e;if(a-- >0)for(u<this.DB&&(n=this.data[a]>>u)>0&&(s=!0,i=H4(n));a>=0;)u<e?(n=(this.data[a]&(1<<u)-1)<<e-u,n|=this.data[--a]>>(u+=this.DB-e)):(n=this.data[a]>>(u-=e)&t,u<=0&&(u+=this.DB,--a)),n>0&&(s=!0),s&&(i+=H4(n));return s?i:"0"}o(zZ,"bnToString");function JZ(){var r=pr();return Pe.ZERO.subTo(this,r),r}o(JZ,"bnNegate");function YZ(){return this.s<0?this.negate():this}o(YZ,"bnAbs");function QZ(r){var e=this.s-r.s;if(e!=0)return e;var t=this.t;if(e=t-r.t,e!=0)return this.s<0?-e:e;for(;--t>=0;)if((e=this.data[t]-r.data[t])!=0)return e;return 0}o(QZ,"bnCompareTo");function nS(r){var e=1,t;return(t=r>>>16)!=0&&(r=t,e+=16),(t=r>>8)!=0&&(r=t,e+=8),(t=r>>4)!=0&&(r=t,e+=4),(t=r>>2)!=0&&(r=t,e+=2),(t=r>>1)!=0&&(r=t,e+=1),e}o(nS,"nbits");function ZZ(){return this.t<=0?0:this.DB*(this.t-1)+nS(this.data[this.t-1]^this.s&this.DM)}o(ZZ,"bnBitLength");function eee(r,e){var t;for(t=this.t-1;t>=0;--t)e.data[t+r]=this.data[t];for(t=r-1;t>=0;--t)e.data[t]=0;e.t=this.t+r,e.s=this.s}o(eee,"bnpDLShiftTo");function tee(r,e){for(var t=r;t<this.t;++t)e.data[t-r]=this.data[t];e.t=Math.max(this.t-r,0),e.s=this.s}o(tee,"bnpDRShiftTo");function ree(r,e){var t=r%this.DB,n=this.DB-t,s=(1<<n)-1,i=Math.floor(r/this.DB),a=this.s<<t&this.DM,u;for(u=this.t-1;u>=0;--u)e.data[u+i+1]=this.data[u]>>n|a,a=(this.data[u]&s)<<t;for(u=i-1;u>=0;--u)e.data[u]=0;e.data[i]=a,e.t=this.t+i+1,e.s=this.s,e.clamp()}o(ree,"bnpLShiftTo");function nee(r,e){e.s=this.s;var t=Math.floor(r/this.DB);if(t>=this.t){e.t=0;return}var n=r%this.DB,s=this.DB-n,i=(1<<n)-1;e.data[0]=this.data[t]>>n;for(var a=t+1;a<this.t;++a)e.data[a-t-1]|=(this.data[a]&i)<<s,e.data[a-t]=this.data[a]>>n;n>0&&(e.data[this.t-t-1]|=(this.s&i)<<s),e.t=this.t-t,e.clamp()}o(nee,"bnpRShiftTo");function see(r,e){for(var t=0,n=0,s=Math.min(r.t,this.t);t<s;)n+=this.data[t]-r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;if(r.t<this.t){for(n-=r.s;t<this.t;)n+=this.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;t<r.t;)n-=r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n-=r.s}e.s=n<0?-1:0,n<-1?e.data[t++]=this.DV+n:n>0&&(e.data[t++]=n),e.t=t,e.clamp()}o(see,"bnpSubTo");function iee(r,e){var t=this.abs(),n=r.abs(),s=t.t;for(e.t=s+n.t;--s>=0;)e.data[s]=0;for(s=0;s<n.t;++s)e.data[s+t.t]=t.am(0,n.data[s],e,s,0,t.t);e.s=0,e.clamp(),this.s!=r.s&&Pe.ZERO.subTo(e,e)}o(iee,"bnpMultiplyTo");function aee(r){for(var e=this.abs(),t=r.t=2*e.t;--t>=0;)r.data[t]=0;for(t=0;t<e.t-1;++t){var n=e.am(t,e.data[t],r,2*t,0,1);(r.data[t+e.t]+=e.am(t+1,2*e.data[t],r,2*t+1,n,e.t-t-1))>=e.DV&&(r.data[t+e.t]-=e.DV,r.data[t+e.t+1]=1)}r.t>0&&(r.data[r.t-1]+=e.am(t,e.data[t],r,2*t,0,1)),r.s=0,r.clamp()}o(aee,"bnpSquareTo");function oee(r,e,t){var n=r.abs();if(!(n.t<=0)){var s=this.abs();if(s.t<n.t){e?.fromInt(0),t!=null&&this.copyTo(t);return}t==null&&(t=pr());var i=pr(),a=this.s,u=r.s,c=this.DB-nS(n.data[n.t-1]);c>0?(n.lShiftTo(c,i),s.lShiftTo(c,t)):(n.copyTo(i),s.copyTo(t));var f=i.t,h=i.data[f-1];if(h!=0){var m=h*(1<<this.F1)+(f>1?i.data[f-2]>>this.F2:0),g=this.FV/m,x=(1<<this.F1)/m,v=1<<this.F2,w=t.t,S=w-f,A=e??pr();for(i.dlShiftTo(S,A),t.compareTo(A)>=0&&(t.data[t.t++]=1,t.subTo(A,t)),Pe.ONE.dlShiftTo(f,A),A.subTo(i,i);i.t<f;)i.data[i.t++]=0;for(;--S>=0;){var N=t.data[--w]==h?this.DM:Math.floor(t.data[w]*g+(t.data[w-1]+v)*x);if((t.data[w]+=i.am(0,N,t,S,0,f))<N)for(i.dlShiftTo(S,A),t.subTo(A,t);t.data[w]<--N;)t.subTo(A,t)}e!=null&&(t.drShiftTo(f,e),a!=u&&Pe.ZERO.subTo(e,e)),t.t=f,t.clamp(),c>0&&t.rShiftTo(c,t),a<0&&Pe.ZERO.subTo(t,t)}}}o(oee,"bnpDivRemTo");function uee(r){var e=pr();return this.abs().divRemTo(r,null,e),this.s<0&&e.compareTo(Pe.ZERO)>0&&r.subTo(e,e),e}o(uee,"bnMod");function Xl(r){this.m=r}o(Xl,"Classic");function cee(r){return r.s<0||r.compareTo(this.m)>=0?r.mod(this.m):r}o(cee,"cConvert");function lee(r){return r}o(lee,"cRevert");function fee(r){r.divRemTo(this.m,null,r)}o(fee,"cReduce");function hee(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(hee,"cMulTo");function pee(r,e){r.squareTo(e),this.reduce(e)}o(pee,"cSqrTo");Xl.prototype.convert=cee;Xl.prototype.revert=lee;Xl.prototype.reduce=fee;Xl.prototype.mulTo=hee;Xl.prototype.sqrTo=pee;function dee(){if(this.t<1)return 0;var r=this.data[0];if((r&1)==0)return 0;var e=r&3;return e=e*(2-(r&15)*e)&15,e=e*(2-(r&255)*e)&255,e=e*(2-((r&65535)*e&65535))&65535,e=e*(2-r*e%this.DV)%this.DV,e>0?this.DV-e:-e}o(dee,"bnpInvDigit");function Gl(r){this.m=r,this.mp=r.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<r.DB-15)-1,this.mt2=2*r.t}o(Gl,"Montgomery");function mee(r){var e=pr();return r.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),r.s<0&&e.compareTo(Pe.ZERO)>0&&this.m.subTo(e,e),e}o(mee,"montConvert");function gee(r){var e=pr();return r.copyTo(e),this.reduce(e),e}o(gee,"montRevert");function vee(r){for(;r.t<=this.mt2;)r.data[r.t++]=0;for(var e=0;e<this.m.t;++e){var t=r.data[e]&32767,n=t*this.mpl+((t*this.mph+(r.data[e]>>15)*this.mpl&this.um)<<15)&r.DM;for(t=e+this.m.t,r.data[t]+=this.m.am(0,n,r,e,0,this.m.t);r.data[t]>=r.DV;)r.data[t]-=r.DV,r.data[++t]++}r.clamp(),r.drShiftTo(this.m.t,r),r.compareTo(this.m)>=0&&r.subTo(this.m,r)}o(vee,"montReduce");function yee(r,e){r.squareTo(e),this.reduce(e)}o(yee,"montSqrTo");function xee(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(xee,"montMulTo");Gl.prototype.convert=mee;Gl.prototype.revert=gee;Gl.prototype.reduce=vee;Gl.prototype.mulTo=xee;Gl.prototype.sqrTo=yee;function wee(){return(this.t>0?this.data[0]&1:this.s)==0}o(wee,"bnpIsEven");function See(r,e){if(r>4294967295||r<1)return Pe.ONE;var t=pr(),n=pr(),s=e.convert(this),i=nS(r)-1;for(s.copyTo(t);--i>=0;)if(e.sqrTo(t,n),(r&1<<i)>0)e.mulTo(n,s,t);else{var a=t;t=n,n=a}return e.revert(t)}o(See,"bnpExp");function bee(r,e){var t;return r<256||e.isEven()?t=new Xl(e):t=new Gl(e),this.exp(r,t)}o(bee,"bnModPowInt");Pe.prototype.copyTo=$Z;Pe.prototype.fromInt=XZ;Pe.prototype.fromString=GZ;Pe.prototype.clamp=WZ;Pe.prototype.dlShiftTo=eee;Pe.prototype.drShiftTo=tee;Pe.prototype.lShiftTo=ree;Pe.prototype.rShiftTo=nee;Pe.prototype.subTo=see;Pe.prototype.multiplyTo=iee;Pe.prototype.squareTo=aee;Pe.prototype.divRemTo=oee;Pe.prototype.invDigit=dee;Pe.prototype.isEven=wee;Pe.prototype.exp=See;Pe.prototype.toString=zZ;Pe.prototype.negate=JZ;Pe.prototype.abs=YZ;Pe.prototype.compareTo=QZ;Pe.prototype.bitLength=ZZ;Pe.prototype.mod=uee;Pe.prototype.modPowInt=bee;Pe.ZERO=Hu(0);Pe.ONE=Hu(1);function Eee(){var r=pr();return this.copyTo(r),r}o(Eee,"bnClone");function Aee(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}o(Aee,"bnIntValue");function Cee(){return this.t==0?this.s:this.data[0]<<24>>24}o(Cee,"bnByteValue");function Nee(){return this.t==0?this.s:this.data[0]<<16>>16}o(Nee,"bnShortValue");function Tee(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}o(Tee,"bnpChunkSize");function Iee(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}o(Iee,"bnSigNum");function _ee(r){if(r==null&&(r=10),this.signum()==0||r<2||r>36)return"0";var e=this.chunkSize(r),t=Math.pow(r,e),n=Hu(t),s=pr(),i=pr(),a="";for(this.divRemTo(n,s,i);s.signum()>0;)a=(t+i.intValue()).toString(r).substr(1)+a,s.divRemTo(n,s,i);return i.intValue().toString(r)+a}o(_ee,"bnpToRadix");function Bee(r,e){this.fromInt(0),e==null&&(e=10);for(var t=this.chunkSize(e),n=Math.pow(e,t),s=!1,i=0,a=0,u=0;u<r.length;++u){var c=K4(r,u);if(c<0){r.charAt(u)=="-"&&this.signum()==0&&(s=!0);continue}a=e*a+c,++i>=t&&(this.dMultiply(n),this.dAddOffset(a,0),i=0,a=0)}i>0&&(this.dMultiply(Math.pow(e,i)),this.dAddOffset(a,0)),s&&Pe.ZERO.subTo(this,this)}o(Bee,"bnpFromRadix");function Dee(r,e,t){if(typeof e=="number")if(r<2)this.fromInt(1);else for(this.fromNumber(r,t),this.testBit(r-1)||this.bitwiseTo(Pe.ONE.shiftLeft(r-1),_T,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>r&&this.subTo(Pe.ONE.shiftLeft(r-1),this);else{var n=new Array,s=r&7;n.length=(r>>3)+1,e.nextBytes(n),s>0?n[0]&=(1<<s)-1:n[0]=0,this.fromString(n,256)}}o(Dee,"bnpFromNumber");function Ree(){var r=this.t,e=new Array;e[0]=this.s;var t=this.DB-r*this.DB%8,n,s=0;if(r-- >0)for(t<this.DB&&(n=this.data[r]>>t)!=(this.s&this.DM)>>t&&(e[s++]=n|this.s<<this.DB-t);r>=0;)t<8?(n=(this.data[r]&(1<<t)-1)<<8-t,n|=this.data[--r]>>(t+=this.DB-8)):(n=this.data[r]>>(t-=8)&255,t<=0&&(t+=this.DB,--r)),(n&128)!=0&&(n|=-256),s==0&&(this.s&128)!=(n&128)&&++s,(s>0||n!=this.s)&&(e[s++]=n);return e}o(Ree,"bnToByteArray");function Oee(r){return this.compareTo(r)==0}o(Oee,"bnEquals");function Pee(r){return this.compareTo(r)<0?this:r}o(Pee,"bnMin");function kee(r){return this.compareTo(r)>0?this:r}o(kee,"bnMax");function Lee(r,e,t){var n,s,i=Math.min(r.t,this.t);for(n=0;n<i;++n)t.data[n]=e(this.data[n],r.data[n]);if(r.t<this.t){for(s=r.s&this.DM,n=i;n<this.t;++n)t.data[n]=e(this.data[n],s);t.t=this.t}else{for(s=this.s&this.DM,n=i;n<r.t;++n)t.data[n]=e(s,r.data[n]);t.t=r.t}t.s=e(this.s,r.s),t.clamp()}o(Lee,"bnpBitwiseTo");function Vee(r,e){return r&e}o(Vee,"op_and");function Uee(r){var e=pr();return this.bitwiseTo(r,Vee,e),e}o(Uee,"bnAnd");function _T(r,e){return r|e}o(_T,"op_or");function jee(r){var e=pr();return this.bitwiseTo(r,_T,e),e}o(jee,"bnOr");function $4(r,e){return r^e}o($4,"op_xor");function Fee(r){var e=pr();return this.bitwiseTo(r,$4,e),e}o(Fee,"bnXor");function X4(r,e){return r&~e}o(X4,"op_andnot");function Mee(r){var e=pr();return this.bitwiseTo(r,X4,e),e}o(Mee,"bnAndNot");function qee(){for(var r=pr(),e=0;e<this.t;++e)r.data[e]=this.DM&~this.data[e];return r.t=this.t,r.s=~this.s,r}o(qee,"bnNot");function Hee(r){var e=pr();return r<0?this.rShiftTo(-r,e):this.lShiftTo(r,e),e}o(Hee,"bnShiftLeft");function Kee(r){var e=pr();return r<0?this.lShiftTo(-r,e):this.rShiftTo(r,e),e}o(Kee,"bnShiftRight");function $ee(r){if(r==0)return-1;var e=0;return(r&65535)==0&&(r>>=16,e+=16),(r&255)==0&&(r>>=8,e+=8),(r&15)==0&&(r>>=4,e+=4),(r&3)==0&&(r>>=2,e+=2),(r&1)==0&&++e,e}o($ee,"lbit");function Xee(){for(var r=0;r<this.t;++r)if(this.data[r]!=0)return r*this.DB+$ee(this.data[r]);return this.s<0?this.t*this.DB:-1}o(Xee,"bnGetLowestSetBit");function Gee(r){for(var e=0;r!=0;)r&=r-1,++e;return e}o(Gee,"cbit");function Wee(){for(var r=0,e=this.s&this.DM,t=0;t<this.t;++t)r+=Gee(this.data[t]^e);return r}o(Wee,"bnBitCount");function zee(r){var e=Math.floor(r/this.DB);return e>=this.t?this.s!=0:(this.data[e]&1<<r%this.DB)!=0}o(zee,"bnTestBit");function Jee(r,e){var t=Pe.ONE.shiftLeft(r);return this.bitwiseTo(t,e,t),t}o(Jee,"bnpChangeBit");function Yee(r){return this.changeBit(r,_T)}o(Yee,"bnSetBit");function Qee(r){return this.changeBit(r,X4)}o(Qee,"bnClearBit");function Zee(r){return this.changeBit(r,$4)}o(Zee,"bnFlipBit");function ete(r,e){for(var t=0,n=0,s=Math.min(r.t,this.t);t<s;)n+=this.data[t]+r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;if(r.t<this.t){for(n+=r.s;t<this.t;)n+=this.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;t<r.t;)n+=r.data[t],e.data[t++]=n&this.DM,n>>=this.DB;n+=r.s}e.s=n<0?-1:0,n>0?e.data[t++]=n:n<-1&&(e.data[t++]=this.DV+n),e.t=t,e.clamp()}o(ete,"bnpAddTo");function tte(r){var e=pr();return this.addTo(r,e),e}o(tte,"bnAdd");function rte(r){var e=pr();return this.subTo(r,e),e}o(rte,"bnSubtract");function nte(r){var e=pr();return this.multiplyTo(r,e),e}o(nte,"bnMultiply");function ste(r){var e=pr();return this.divRemTo(r,e,null),e}o(ste,"bnDivide");function ite(r){var e=pr();return this.divRemTo(r,null,e),e}o(ite,"bnRemainder");function ate(r){var e=pr(),t=pr();return this.divRemTo(r,e,t),new Array(e,t)}o(ate,"bnDivideAndRemainder");function ote(r){this.data[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()}o(ote,"bnpDMultiply");function ute(r,e){if(r!=0){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=r;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}}o(ute,"bnpDAddOffset");function vg(){}o(vg,"NullExp");function G4(r){return r}o(G4,"nNop");function cte(r,e,t){r.multiplyTo(e,t)}o(cte,"nMulTo");function lte(r,e){r.squareTo(e)}o(lte,"nSqrTo");vg.prototype.convert=G4;vg.prototype.revert=G4;vg.prototype.mulTo=cte;vg.prototype.sqrTo=lte;function fte(r){return this.exp(r,new vg)}o(fte,"bnPow");function hte(r,e,t){var n=Math.min(this.t+r.t,e);for(t.s=0,t.t=n;n>0;)t.data[--n]=0;var s;for(s=t.t-this.t;n<s;++n)t.data[n+this.t]=this.am(0,r.data[n],t,n,0,this.t);for(s=Math.min(r.t,e);n<s;++n)this.am(0,r.data[n],t,n,0,e-n);t.clamp()}o(hte,"bnpMultiplyLowerTo");function pte(r,e,t){--e;var n=t.t=this.t+r.t-e;for(t.s=0;--n>=0;)t.data[n]=0;for(n=Math.max(e-this.t,0);n<r.t;++n)t.data[this.t+n-e]=this.am(e-n,r.data[n],t,0,0,this.t+n-e);t.clamp(),t.drShiftTo(1,t)}o(pte,"bnpMultiplyUpperTo");function Tp(r){this.r2=pr(),this.q3=pr(),Pe.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r),this.m=r}o(Tp,"Barrett");function dte(r){if(r.s<0||r.t>2*this.m.t)return r.mod(this.m);if(r.compareTo(this.m)<0)return r;var e=pr();return r.copyTo(e),this.reduce(e),e}o(dte,"barrettConvert");function mte(r){return r}o(mte,"barrettRevert");function gte(r){for(r.drShiftTo(this.m.t-1,this.r2),r.t>this.m.t+1&&(r.t=this.m.t+1,r.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);r.compareTo(this.r2)<0;)r.dAddOffset(1,this.m.t+1);for(r.subTo(this.r2,r);r.compareTo(this.m)>=0;)r.subTo(this.m,r)}o(gte,"barrettReduce");function vte(r,e){r.squareTo(e),this.reduce(e)}o(vte,"barrettSqrTo");function yte(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(yte,"barrettMulTo");Tp.prototype.convert=dte;Tp.prototype.revert=mte;Tp.prototype.reduce=gte;Tp.prototype.mulTo=yte;Tp.prototype.sqrTo=vte;function xte(r,e){var t=r.bitLength(),n,s=Hu(1),i;if(t<=0)return s;t<18?n=1:t<48?n=3:t<144?n=4:t<768?n=5:n=6,t<8?i=new Xl(e):e.isEven()?i=new Tp(e):i=new Gl(e);var a=new Array,u=3,c=n-1,f=(1<<n)-1;if(a[1]=i.convert(this),n>1){var h=pr();for(i.sqrTo(a[1],h);u<=f;)a[u]=pr(),i.mulTo(h,a[u-2],a[u]),u+=2}var m=r.t-1,g,x=!0,v=pr(),w;for(t=nS(r.data[m])-1;m>=0;){for(t>=c?g=r.data[m]>>t-c&f:(g=(r.data[m]&(1<<t+1)-1)<<c-t,m>0&&(g|=r.data[m-1]>>this.DB+t-c)),u=n;(g&1)==0;)g>>=1,--u;if((t-=u)<0&&(t+=this.DB,--m),x)a[g].copyTo(s),x=!1;else{for(;u>1;)i.sqrTo(s,v),i.sqrTo(v,s),u-=2;u>0?i.sqrTo(s,v):(w=s,s=v,v=w),i.mulTo(v,a[g],s)}for(;m>=0&&(r.data[m]&1<<t)==0;)i.sqrTo(s,v),w=s,s=v,v=w,--t<0&&(t=this.DB-1,--m)}return i.revert(s)}o(xte,"bnModPow");function wte(r){var e=this.s<0?this.negate():this.clone(),t=r.s<0?r.negate():r.clone();if(e.compareTo(t)<0){var n=e;e=t,t=n}var s=e.getLowestSetBit(),i=t.getLowestSetBit();if(i<0)return e;for(s<i&&(i=s),i>0&&(e.rShiftTo(i,e),t.rShiftTo(i,t));e.signum()>0;)(s=e.getLowestSetBit())>0&&e.rShiftTo(s,e),(s=t.getLowestSetBit())>0&&t.rShiftTo(s,t),e.compareTo(t)>=0?(e.subTo(t,e),e.rShiftTo(1,e)):(t.subTo(e,t),t.rShiftTo(1,t));return i>0&&t.lShiftTo(i,t),t}o(wte,"bnGCD");function Ste(r){if(r<=0)return 0;var e=this.DV%r,t=this.s<0?r-1:0;if(this.t>0)if(e==0)t=this.data[0]%r;else for(var n=this.t-1;n>=0;--n)t=(e*t+this.data[n])%r;return t}o(Ste,"bnpModInt");function bte(r){var e=r.isEven();if(this.isEven()&&e||r.signum()==0)return Pe.ZERO;for(var t=r.clone(),n=this.clone(),s=Hu(1),i=Hu(0),a=Hu(0),u=Hu(1);t.signum()!=0;){for(;t.isEven();)t.rShiftTo(1,t),e?((!s.isEven()||!i.isEven())&&(s.addTo(this,s),i.subTo(r,i)),s.rShiftTo(1,s)):i.isEven()||i.subTo(r,i),i.rShiftTo(1,i);for(;n.isEven();)n.rShiftTo(1,n),e?((!a.isEven()||!u.isEven())&&(a.addTo(this,a),u.subTo(r,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(r,u),u.rShiftTo(1,u);t.compareTo(n)>=0?(t.subTo(n,t),e&&s.subTo(a,s),i.subTo(u,i)):(n.subTo(t,n),e&&a.subTo(s,a),u.subTo(i,u))}if(n.compareTo(Pe.ONE)!=0)return Pe.ZERO;if(u.compareTo(r)>=0)return u.subtract(r);if(u.signum()<0)u.addTo(r,u);else return u;return u.signum()<0?u.add(r):u}o(bte,"bnModInverse");var aa=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],Ete=(1<<26)/aa[aa.length-1];function Ate(r){var e,t=this.abs();if(t.t==1&&t.data[0]<=aa[aa.length-1]){for(e=0;e<aa.length;++e)if(t.data[0]==aa[e])return!0;return!1}if(t.isEven())return!1;for(e=1;e<aa.length;){for(var n=aa[e],s=e+1;s<aa.length&&n<Ete;)n*=aa[s++];for(n=t.modInt(n);e<s;)if(n%aa[e++]==0)return!1}return t.millerRabin(r)}o(Ate,"bnIsProbablePrime");function Cte(r){var e=this.subtract(Pe.ONE),t=e.getLowestSetBit();if(t<=0)return!1;for(var n=e.shiftRight(t),s=Nte(),i,a=0;a<r;++a){do i=new Pe(this.bitLength(),s);while(i.compareTo(Pe.ONE)<=0||i.compareTo(e)>=0);var u=i.modPow(n,this);if(u.compareTo(Pe.ONE)!=0&&u.compareTo(e)!=0){for(var c=1;c++<t&&u.compareTo(e)!=0;)if(u=u.modPowInt(2,this),u.compareTo(Pe.ONE)==0)return!1;if(u.compareTo(e)!=0)return!1}}return!0}o(Cte,"bnpMillerRabin");function Nte(){return{nextBytes:o(function(r){for(var e=0;e<r.length;++e)r[e]=Math.floor(Math.random()*256)},"nextBytes")}}o(Nte,"bnGetPrng");Pe.prototype.chunkSize=Tee;Pe.prototype.toRadix=_ee;Pe.prototype.fromRadix=Bee;Pe.prototype.fromNumber=Dee;Pe.prototype.bitwiseTo=Lee;Pe.prototype.changeBit=Jee;Pe.prototype.addTo=ete;Pe.prototype.dMultiply=ote;Pe.prototype.dAddOffset=ute;Pe.prototype.multiplyLowerTo=hte;Pe.prototype.multiplyUpperTo=pte;Pe.prototype.modInt=Ste;Pe.prototype.millerRabin=Cte;Pe.prototype.clone=Eee;Pe.prototype.intValue=Aee;Pe.prototype.byteValue=Cee;Pe.prototype.shortValue=Nee;Pe.prototype.signum=Iee;Pe.prototype.toByteArray=Ree;Pe.prototype.equals=Oee;Pe.prototype.min=Pee;Pe.prototype.max=kee;Pe.prototype.and=Uee;Pe.prototype.or=jee;Pe.prototype.xor=Fee;Pe.prototype.andNot=Mee;Pe.prototype.not=qee;Pe.prototype.shiftLeft=Hee;Pe.prototype.shiftRight=Kee;Pe.prototype.getLowestSetBit=Xee;Pe.prototype.bitCount=Wee;Pe.prototype.testBit=zee;Pe.prototype.setBit=Yee;Pe.prototype.clearBit=Qee;Pe.prototype.flipBit=Zee;Pe.prototype.add=tte;Pe.prototype.subtract=rte;Pe.prototype.multiply=nte;Pe.prototype.divide=ste;Pe.prototype.remainder=ite;Pe.prototype.divideAndRemainder=ate;Pe.prototype.modPow=xte;Pe.prototype.modInverse=bte;Pe.prototype.pow=fte;Pe.prototype.gcd=wte;Pe.prototype.isProbablePrime=Ate});var Ip=Q((mxe,Q4)=>{"use strict";var ja=Xt();Pa();hr();var J4=Q4.exports=ja.sha1=ja.sha1||{};ja.md.sha1=ja.md.algorithms.sha1=J4;J4.create=function(){Y4||Tte();var r=null,e=ja.util.createBuffer(),t=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var s=n.messageLengthSize/4,i=0;i<s;++i)n.fullMessageLength.push(0);return e=ja.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=ja.util.encodeUtf8(s));var a=s.length;n.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var u=n.fullMessageLength.length-1;u>=0;--u)n.fullMessageLength[u]+=a[1],a[1]=a[0]+(n.fullMessageLength[u]/4294967296>>>0),n.fullMessageLength[u]=n.fullMessageLength[u]>>>0,a[0]=a[1]/4294967296>>>0;return e.putBytes(s),z4(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=ja.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(BT.substr(0,n.blockLength-a));for(var u,c,f=n.fullMessageLength[0]*8,h=0;h<n.fullMessageLength.length-1;++h)u=n.fullMessageLength[h+1]*8,c=u/4294967296>>>0,f+=c,s.putInt32(f>>>0),f=u>>>0;s.putInt32(f);var m={h0:r.h0,h1:r.h1,h2:r.h2,h3:r.h3,h4:r.h4};z4(m,t,s);var g=ja.util.createBuffer();return g.putInt32(m.h0),g.putInt32(m.h1),g.putInt32(m.h2),g.putInt32(m.h3),g.putInt32(m.h4),g},n};var BT=null,Y4=!1;function Tte(){BT="\x80",BT+=ja.util.fillString("\0",64),Y4=!0}o(Tte,"_init");function z4(r,e,t){for(var n,s,i,a,u,c,f,h,m=t.length();m>=64;){for(s=r.h0,i=r.h1,a=r.h2,u=r.h3,c=r.h4,h=0;h<16;++h)n=t.getInt32(),e[h]=n,f=u^i&(a^u),n=(s<<5|s>>>27)+f+c+1518500249+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<20;++h)n=e[h-3]^e[h-8]^e[h-14]^e[h-16],n=n<<1|n>>>31,e[h]=n,f=u^i&(a^u),n=(s<<5|s>>>27)+f+c+1518500249+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<32;++h)n=e[h-3]^e[h-8]^e[h-14]^e[h-16],n=n<<1|n>>>31,e[h]=n,f=i^a^u,n=(s<<5|s>>>27)+f+c+1859775393+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<40;++h)n=e[h-6]^e[h-16]^e[h-28]^e[h-32],n=n<<2|n>>>30,e[h]=n,f=i^a^u,n=(s<<5|s>>>27)+f+c+1859775393+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<60;++h)n=e[h-6]^e[h-16]^e[h-28]^e[h-32],n=n<<2|n>>>30,e[h]=n,f=i&a|u&(i^a),n=(s<<5|s>>>27)+f+c+2400959708+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;for(;h<80;++h)n=e[h-6]^e[h-16]^e[h-28]^e[h-32],n=n<<2|n>>>30,e[h]=n,f=i^a^u,n=(s<<5|s>>>27)+f+c+3395469782+n,c=u,u=a,a=(i<<30|i>>>2)>>>0,i=s,s=n;r.h0=r.h0+s|0,r.h1=r.h1+i|0,r.h2=r.h2+a|0,r.h3=r.h3+u|0,r.h4=r.h4+c|0,m-=64}}o(z4,"_update")});var DT=Q((vxe,eL)=>{"use strict";var Fa=Xt();hr();Ti();Ip();var Z4=eL.exports=Fa.pkcs1=Fa.pkcs1||{};Z4.encode_rsa_oaep=function(r,e,t){var n,s,i,a;typeof t=="string"?(n=t,s=arguments[3]||void 0,i=arguments[4]||void 0):t&&(n=t.label||void 0,s=t.seed||void 0,i=t.md||void 0,t.mgf1&&t.mgf1.md&&(a=t.mgf1.md)),i?i.start():i=Fa.md.sha1.create(),a||(a=i);var u=Math.ceil(r.n.bitLength()/8),c=u-2*i.digestLength-2;if(e.length>c){var f=new Error("RSAES-OAEP input message length is too long.");throw f.length=e.length,f.maxLength=c,f}n||(n=""),i.update(n,"raw");for(var h=i.digest(),m="",g=c-e.length,x=0;x<g;x++)m+="\0";var v=h.getBytes()+m+""+e;if(!s)s=Fa.random.getBytes(i.digestLength);else if(s.length!==i.digestLength){var f=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw f.seedLength=s.length,f.digestLength=i.digestLength,f}var w=sS(s,u-i.digestLength-1,a),S=Fa.util.xorBytes(v,w,v.length),A=sS(S,i.digestLength,a),N=Fa.util.xorBytes(s,A,s.length);return"\0"+N+S};Z4.decode_rsa_oaep=function(r,e,t){var n,s,i;typeof t=="string"?(n=t,s=arguments[3]||void 0):t&&(n=t.label||void 0,s=t.md||void 0,t.mgf1&&t.mgf1.md&&(i=t.mgf1.md));var a=Math.ceil(r.n.bitLength()/8);if(e.length!==a){var S=new Error("RSAES-OAEP encoded message length is invalid.");throw S.length=e.length,S.expectedLength=a,S}if(s===void 0?s=Fa.md.sha1.create():s.start(),i||(i=s),a<2*s.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");n||(n=""),s.update(n,"raw");for(var u=s.digest().getBytes(),c=e.charAt(0),f=e.substring(1,s.digestLength+1),h=e.substring(1+s.digestLength),m=sS(h,s.digestLength,i),g=Fa.util.xorBytes(f,m,f.length),x=sS(g,a-s.digestLength-1,i),v=Fa.util.xorBytes(h,x,h.length),w=v.substring(0,s.digestLength),S=c!=="\0",A=0;A<s.digestLength;++A)S|=u.charAt(A)!==w.charAt(A);for(var N=1,b=s.digestLength,E=s.digestLength;E<v.length;E++){var C=v.charCodeAt(E),_=C&1^1,M=N?65534:0;S|=C&M,N=N&_,b+=N}if(S||v.charCodeAt(b)!==1)throw new Error("Invalid RSAES-OAEP padding.");return v.substring(b+1)};function sS(r,e,t){t||(t=Fa.md.sha1.create());for(var n="",s=Math.ceil(e/t.digestLength),i=0;i<s;++i){var a=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,i&255);t.start(),t.update(r+a),n+=t.digest().getBytes()}return n.substring(0,e)}o(sS,"rsa_mgf1")});var OT=Q((xxe,RT)=>{"use strict";var Ku=Xt();hr();yg();Ti();(function(){if(Ku.prime){RT.exports=Ku.prime;return}var r=RT.exports=Ku.prime=Ku.prime||{},e=Ku.jsbn.BigInteger,t=[6,4,2,4,2,4,6,2],n=new e(null);n.fromInt(30);var s=o(function(m,g){return m|g},"op_or");r.generateProbablePrime=function(m,g,x){typeof g=="function"&&(x=g,g={}),g=g||{};var v=g.algorithm||"PRIMEINC";typeof v=="string"&&(v={name:v}),v.options=v.options||{};var w=g.prng||Ku.random,S={nextBytes:o(function(A){for(var N=w.getBytesSync(A.length),b=0;b<A.length;++b)A[b]=N.charCodeAt(b)},"nextBytes")};if(v.name==="PRIMEINC")return i(m,S,v.options,x);throw new Error("Invalid prime generation algorithm: "+v.name)};function i(m,g,x,v){return"workers"in x?c(m,g,x,v):a(m,g,x,v)}o(i,"primeincFindPrime");function a(m,g,x,v){var w=f(m,g),S=0,A=h(w.bitLength());"millerRabinTests"in x&&(A=x.millerRabinTests);var N=10;"maxBlockTime"in x&&(N=x.maxBlockTime),u(w,m,g,S,A,N,v)}o(a,"primeincFindPrimeWithoutWorkers");function u(m,g,x,v,w,S,A){var N=+new Date;do{if(m.bitLength()>g&&(m=f(g,x)),m.isProbablePrime(w))return A(null,m);m.dAddOffset(t[v++%8],0)}while(S<0||+new Date-N<S);Ku.util.setImmediate(function(){u(m,g,x,v,w,S,A)})}o(u,"_primeinc");function c(m,g,x,v){if(typeof Worker>"u")return a(m,g,x,v);var w=f(m,g),S=x.workers,A=x.workLoad||100,N=A*30/8,b=x.workerScript||"forge/prime.worker.js";if(S===-1)return Ku.util.estimateCores(function(C,_){C&&(_=2),S=_-1,E()});E();function E(){S=Math.max(1,S);for(var C=[],_=0;_<S;++_)C[_]=new Worker(b);for(var M=S,_=0;_<S;++_)C[_].addEventListener("message",q);var R=!1;function q(H){if(!R){--M;var K=H.data;if(K.found){for(var G=0;G<C.length;++G)C[G].terminate();return R=!0,v(null,new e(K.prime,16))}w.bitLength()>m&&(w=f(m,g));var pe=w.toString(16);H.target.postMessage({hex:pe,workLoad:A}),w.dAddOffset(N,0)}}o(q,"workerMessage")}o(E,"generate")}o(c,"primeincFindPrimeWithWorkers");function f(m,g){var x=new e(m,g),v=m-1;return x.testBit(v)||x.bitwiseTo(e.ONE.shiftLeft(v),s,x),x.dAddOffset(31-x.mod(n).byteValue(),0),x}o(f,"generateRandom");function h(m){return m<=100?27:m<=150?18:m<=200?15:m<=250?12:m<=300?9:m<=350?8:m<=400?7:m<=500?6:m<=600?5:m<=800?4:m<=1250?3:2}o(h,"getMillerRabinTests")})()});var xg=Q((Sxe,oL)=>{"use strict";var vt=Xt();ia();yg();qu();DT();OT();Ti();hr();typeof or>"u"&&(or=vt.jsbn.BigInteger);var or,PT=vt.util.isNodejs?require("crypto"):null,de=vt.asn1,_i=vt.util;vt.pki=vt.pki||{};oL.exports=vt.pki.rsa=vt.rsa=vt.rsa||{};var Ut=vt.pki,Ite=[6,4,2,4,2,4,6,2],_te={name:"PrivateKeyInfo",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:de.Class.UNIVERSAL,type:de.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:de.Class.UNIVERSAL,type:de.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},Bte={name:"RSAPrivateKey",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},Dte={name:"RSAPublicKey",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:de.Class.UNIVERSAL,type:de.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},Rte=vt.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:de.Class.UNIVERSAL,type:de.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:de.Class.UNIVERSAL,type:de.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},Ote={name:"DigestInfo",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:de.Class.UNIVERSAL,type:de.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:de.Class.UNIVERSAL,type:de.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:de.Class.UNIVERSAL,type:de.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:de.Class.UNIVERSAL,type:de.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},Pte=o(function(r){var e;if(r.algorithm in Ut.oids)e=Ut.oids[r.algorithm];else{var t=new Error("Unknown message digest algorithm.");throw t.algorithm=r.algorithm,t}var n=de.oidToDer(e).getBytes(),s=de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[]),i=de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[]);i.value.push(de.create(de.Class.UNIVERSAL,de.Type.OID,!1,n)),i.value.push(de.create(de.Class.UNIVERSAL,de.Type.NULL,!1,""));var a=de.create(de.Class.UNIVERSAL,de.Type.OCTETSTRING,!1,r.digest().getBytes());return s.value.push(i),s.value.push(a),de.toDer(s).getBytes()},"emsaPkcs1v15encode"),iL=o(function(r,e,t){if(t)return r.modPow(e.e,e.n);if(!e.p||!e.q)return r.modPow(e.d,e.n);e.dP||(e.dP=e.d.mod(e.p.subtract(or.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(or.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));var n;do n=new or(vt.util.bytesToHex(vt.random.getBytes(e.n.bitLength()/8)),16);while(n.compareTo(e.n)>=0||!n.gcd(e.n).equals(or.ONE));r=r.multiply(n.modPow(e.e,e.n)).mod(e.n);for(var s=r.mod(e.p).modPow(e.dP,e.p),i=r.mod(e.q).modPow(e.dQ,e.q);s.compareTo(i)<0;)s=s.add(e.p);var a=s.subtract(i).multiply(e.qInv).mod(e.p).multiply(e.q).add(i);return a=a.multiply(n.modInverse(e.n)).mod(e.n),a},"_modPow");Ut.rsa.encrypt=function(r,e,t){var n=t,s,i=Math.ceil(e.n.bitLength()/8);t!==!1&&t!==!0?(n=t===2,s=aL(r,e,t)):(s=vt.util.createBuffer(),s.putBytes(r));for(var a=new or(s.toHex(),16),u=iL(a,e,n),c=u.toString(16),f=vt.util.createBuffer(),h=i-Math.ceil(c.length/2);h>0;)f.putByte(0),--h;return f.putBytes(vt.util.hexToBytes(c)),f.getBytes()};Ut.rsa.decrypt=function(r,e,t,n){var s=Math.ceil(e.n.bitLength()/8);if(r.length!==s){var i=new Error("Encrypted message length is invalid.");throw i.length=r.length,i.expected=s,i}var a=new or(vt.util.createBuffer(r).toHex(),16);if(a.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var u=iL(a,e,t),c=u.toString(16),f=vt.util.createBuffer(),h=s-Math.ceil(c.length/2);h>0;)f.putByte(0),--h;return f.putBytes(vt.util.hexToBytes(c)),n!==!1?iS(f.getBytes(),e,t):f.getBytes()};Ut.rsa.createKeyPairGenerationState=function(r,e,t){typeof r=="string"&&(r=parseInt(r,10)),r=r||2048,t=t||{};var n=t.prng||vt.random,s={nextBytes:o(function(u){for(var c=n.getBytesSync(u.length),f=0;f<u.length;++f)u[f]=c.charCodeAt(f)},"nextBytes")},i=t.algorithm||"PRIMEINC",a;if(i==="PRIMEINC")a={algorithm:i,state:0,bits:r,rng:s,eInt:e||65537,e:new or(null),p:null,q:null,qBits:r>>1,pBits:r-(r>>1),pqState:0,num:null,keys:null},a.e.fromInt(a.eInt);else throw new Error("Invalid key generation algorithm: "+i);return a};Ut.rsa.stepKeyPairGenerationState=function(r,e){"algorithm"in r||(r.algorithm="PRIMEINC");var t=new or(null);t.fromInt(30);for(var n=0,s=o(function(m,g){return m|g},"op_or"),i=+new Date,a,u=0;r.keys===null&&(e<=0||u<e);){if(r.state===0){var c=r.p===null?r.pBits:r.qBits,f=c-1;r.pqState===0?(r.num=new or(c,r.rng),r.num.testBit(f)||r.num.bitwiseTo(or.ONE.shiftLeft(f),s,r.num),r.num.dAddOffset(31-r.num.mod(t).byteValue(),0),n=0,++r.pqState):r.pqState===1?r.num.bitLength()>c?r.pqState=0:r.num.isProbablePrime(Lte(r.num.bitLength()))?++r.pqState:r.num.dAddOffset(Ite[n++%8],0):r.pqState===2?r.pqState=r.num.subtract(or.ONE).gcd(r.e).compareTo(or.ONE)===0?3:0:r.pqState===3&&(r.pqState=0,r.p===null?r.p=r.num:r.q=r.num,r.p!==null&&r.q!==null&&++r.state,r.num=null)}else if(r.state===1)r.p.compareTo(r.q)<0&&(r.num=r.p,r.p=r.q,r.q=r.num),++r.state;else if(r.state===2)r.p1=r.p.subtract(or.ONE),r.q1=r.q.subtract(or.ONE),r.phi=r.p1.multiply(r.q1),++r.state;else if(r.state===3)r.phi.gcd(r.e).compareTo(or.ONE)===0?++r.state:(r.p=null,r.q=null,r.state=0);else if(r.state===4)r.n=r.p.multiply(r.q),r.n.bitLength()===r.bits?++r.state:(r.q=null,r.state=0);else if(r.state===5){var h=r.e.modInverse(r.phi);r.keys={privateKey:Ut.rsa.setPrivateKey(r.n,r.e,h,r.p,r.q,h.mod(r.p1),h.mod(r.q1),r.q.modInverse(r.p)),publicKey:Ut.rsa.setPublicKey(r.n,r.e)}}a=+new Date,u+=a-i,i=a}return r.keys!==null};Ut.rsa.generateKeyPair=function(r,e,t,n){if(arguments.length===1?typeof r=="object"?(t=r,r=void 0):typeof r=="function"&&(n=r,r=void 0):arguments.length===2?typeof r=="number"?typeof e=="function"?(n=e,e=void 0):typeof e!="number"&&(t=e,e=void 0):(t=r,n=e,r=void 0,e=void 0):arguments.length===3&&(typeof e=="number"?typeof t=="function"&&(n=t,t=void 0):(n=t,t=e,e=void 0)),t=t||{},r===void 0&&(r=t.bits||2048),e===void 0&&(e=t.e||65537),!vt.options.usePureJavaScript&&!t.prng&&r>=256&&r<=16384&&(e===65537||e===3)){if(n){if(tL("generateKeyPair"))return PT.generateKeyPair("rsa",{modulusLength:r,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(u,c,f){if(u)return n(u);n(null,{privateKey:Ut.privateKeyFromPem(f),publicKey:Ut.publicKeyFromPem(c)})});if(rL("generateKey")&&rL("exportKey"))return _i.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:sL(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(u){return _i.globalScope.crypto.subtle.exportKey("pkcs8",u.privateKey)}).then(void 0,function(u){n(u)}).then(function(u){if(u){var c=Ut.privateKeyFromAsn1(de.fromDer(vt.util.createBuffer(u)));n(null,{privateKey:c,publicKey:Ut.setRsaPublicKey(c.n,c.e)})}});if(nL("generateKey")&&nL("exportKey")){var s=_i.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:sL(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);s.oncomplete=function(u){var c=u.target.result,f=_i.globalScope.msCrypto.subtle.exportKey("pkcs8",c.privateKey);f.oncomplete=function(h){var m=h.target.result,g=Ut.privateKeyFromAsn1(de.fromDer(vt.util.createBuffer(m)));n(null,{privateKey:g,publicKey:Ut.setRsaPublicKey(g.n,g.e)})},f.onerror=function(h){n(h)}},s.onerror=function(u){n(u)};return}}else if(tL("generateKeyPairSync")){var i=PT.generateKeyPairSync("rsa",{modulusLength:r,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Ut.privateKeyFromPem(i.privateKey),publicKey:Ut.publicKeyFromPem(i.publicKey)}}}var a=Ut.rsa.createKeyPairGenerationState(r,e,t);if(!n)return Ut.rsa.stepKeyPairGenerationState(a,0),a.keys;kte(a,t,n)};Ut.setRsaPublicKey=Ut.rsa.setPublicKey=function(r,e){var t={n:r,e};return t.encrypt=function(n,s,i){if(typeof s=="string"?s=s.toUpperCase():s===void 0&&(s="RSAES-PKCS1-V1_5"),s==="RSAES-PKCS1-V1_5")s={encode:o(function(u,c,f){return aL(u,c,2).getBytes()},"encode")};else if(s==="RSA-OAEP"||s==="RSAES-OAEP")s={encode:o(function(u,c){return vt.pkcs1.encode_rsa_oaep(c,u,i)},"encode")};else if(["RAW","NONE","NULL",null].indexOf(s)!==-1)s={encode:o(function(u){return u},"encode")};else if(typeof s=="string")throw new Error('Unsupported encryption scheme: "'+s+'".');var a=s.encode(n,t,!0);return Ut.rsa.encrypt(a,t,!0)},t.verify=function(n,s,i,a){typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSASSA-PKCS1-V1_5"),a===void 0&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),i==="RSASSA-PKCS1-V1_5"?i={verify:o(function(c,f){f=iS(f,t,!0);var h=de.fromDer(f,{parseAllBytes:a._parseAllDigestBytes}),m={},g=[];if(!de.validate(h,Ote,m,g)){var x=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw x.errors=g,x}var v=de.derToOid(m.algorithmIdentifier);if(!(v===vt.oids.md2||v===vt.oids.md5||v===vt.oids.sha1||v===vt.oids.sha224||v===vt.oids.sha256||v===vt.oids.sha384||v===vt.oids.sha512||v===vt.oids["sha512-224"]||v===vt.oids["sha512-256"])){var x=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw x.oid=v,x}if((v===vt.oids.md2||v===vt.oids.md5)&&!("parameters"in m))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return c===m.digest},"verify")}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:o(function(c,f){return f=iS(f,t,!0),c===f},"verify")});var u=Ut.rsa.decrypt(s,t,!0,!1);return i.verify(n,u,t.n.bitLength())},t};Ut.setRsaPrivateKey=Ut.rsa.setPrivateKey=function(r,e,t,n,s,i,a,u){var c={n:r,e,d:t,p:n,q:s,dP:i,dQ:a,qInv:u};return c.decrypt=function(f,h,m){typeof h=="string"?h=h.toUpperCase():h===void 0&&(h="RSAES-PKCS1-V1_5");var g=Ut.rsa.decrypt(f,c,!1,!1);if(h==="RSAES-PKCS1-V1_5")h={decode:iS};else if(h==="RSA-OAEP"||h==="RSAES-OAEP")h={decode:o(function(x,v){return vt.pkcs1.decode_rsa_oaep(v,x,m)},"decode")};else if(["RAW","NONE","NULL",null].indexOf(h)!==-1)h={decode:o(function(x){return x},"decode")};else throw new Error('Unsupported encryption scheme: "'+h+'".');return h.decode(g,c,!1)},c.sign=function(f,h){var m=!1;typeof h=="string"&&(h=h.toUpperCase()),h===void 0||h==="RSASSA-PKCS1-V1_5"?(h={encode:Pte},m=1):(h==="NONE"||h==="NULL"||h===null)&&(h={encode:o(function(){return f},"encode")},m=1);var g=h.encode(f,c.n.bitLength());return Ut.rsa.encrypt(g,c,m)},c};Ut.wrapRsaPrivateKey=function(r){return de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,de.integerToDer(0).getBytes()),de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.OID,!1,de.oidToDer(Ut.oids.rsaEncryption).getBytes()),de.create(de.Class.UNIVERSAL,de.Type.NULL,!1,"")]),de.create(de.Class.UNIVERSAL,de.Type.OCTETSTRING,!1,de.toDer(r).getBytes())])};Ut.privateKeyFromAsn1=function(r){var e={},t=[];if(de.validate(r,_te,e,t)&&(r=de.fromDer(vt.util.createBuffer(e.privateKey))),e={},t=[],!de.validate(r,Bte,e,t)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=t,n}var s,i,a,u,c,f,h,m;return s=vt.util.createBuffer(e.privateKeyModulus).toHex(),i=vt.util.createBuffer(e.privateKeyPublicExponent).toHex(),a=vt.util.createBuffer(e.privateKeyPrivateExponent).toHex(),u=vt.util.createBuffer(e.privateKeyPrime1).toHex(),c=vt.util.createBuffer(e.privateKeyPrime2).toHex(),f=vt.util.createBuffer(e.privateKeyExponent1).toHex(),h=vt.util.createBuffer(e.privateKeyExponent2).toHex(),m=vt.util.createBuffer(e.privateKeyCoefficient).toHex(),Ut.setRsaPrivateKey(new or(s,16),new or(i,16),new or(a,16),new or(u,16),new or(c,16),new or(f,16),new or(h,16),new or(m,16))};Ut.privateKeyToAsn1=Ut.privateKeyToRSAPrivateKey=function(r){return de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,de.integerToDer(0).getBytes()),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.n)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.e)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.d)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.p)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.q)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.dP)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.dQ)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.qInv))])};Ut.publicKeyFromAsn1=function(r){var e={},t=[];if(de.validate(r,Rte,e,t)){var n=de.derToOid(e.publicKeyOid);if(n!==Ut.oids.rsaEncryption){var s=new Error("Cannot read public key. Unknown OID.");throw s.oid=n,s}r=e.rsaPublicKey}if(t=[],!de.validate(r,Dte,e,t)){var s=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw s.errors=t,s}var i=vt.util.createBuffer(e.publicKeyModulus).toHex(),a=vt.util.createBuffer(e.publicKeyExponent).toHex();return Ut.setRsaPublicKey(new or(i,16),new or(a,16))};Ut.publicKeyToAsn1=Ut.publicKeyToSubjectPublicKeyInfo=function(r){return de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.OID,!1,de.oidToDer(Ut.oids.rsaEncryption).getBytes()),de.create(de.Class.UNIVERSAL,de.Type.NULL,!1,"")]),de.create(de.Class.UNIVERSAL,de.Type.BITSTRING,!1,[Ut.publicKeyToRSAPublicKey(r)])])};Ut.publicKeyToRSAPublicKey=function(r){return de.create(de.Class.UNIVERSAL,de.Type.SEQUENCE,!0,[de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.n)),de.create(de.Class.UNIVERSAL,de.Type.INTEGER,!1,Ma(r.e))])};function aL(r,e,t){var n=vt.util.createBuffer(),s=Math.ceil(e.n.bitLength()/8);if(r.length>s-11){var i=new Error("Message is too long for PKCS#1 v1.5 padding.");throw i.length=r.length,i.max=s-11,i}n.putByte(0),n.putByte(t);var a=s-3-r.length,u;if(t===0||t===1){u=t===0?0:255;for(var c=0;c<a;++c)n.putByte(u)}else for(;a>0;){for(var f=0,h=vt.random.getBytes(a),c=0;c<a;++c)u=h.charCodeAt(c),u===0?++f:n.putByte(u);a=f}return n.putByte(0),n.putBytes(r),n}o(aL,"_encodePkcs1_v1_5");function iS(r,e,t,n){var s=Math.ceil(e.n.bitLength()/8),i=vt.util.createBuffer(r),a=i.getByte(),u=i.getByte();if(a!==0||t&&u!==0&&u!==1||!t&&u!=2||t&&u===0&&typeof n>"u")throw new Error("Encryption block is invalid.");var c=0;if(u===0){c=s-3-n;for(var f=0;f<c;++f)if(i.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(u===1)for(c=0;i.length()>1;){if(i.getByte()!==255){--i.read;break}++c}else if(u===2)for(c=0;i.length()>1;){if(i.getByte()===0){--i.read;break}++c}var h=i.getByte();if(h!==0||c!==s-3-i.length())throw new Error("Encryption block is invalid.");return i.getBytes()}o(iS,"_decodePkcs1_v1_5");function kte(r,e,t){typeof e=="function"&&(t=e,e={}),e=e||{};var n={algorithm:{name:e.algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};"prng"in e&&(n.prng=e.prng),s();function s(){i(r.pBits,function(u,c){if(u)return t(u);if(r.p=c,r.q!==null)return a(u,r.q);i(r.qBits,a)})}o(s,"generate");function i(u,c){vt.prime.generateProbablePrime(u,n,c)}o(i,"getPrime");function a(u,c){if(u)return t(u);if(r.q=c,r.p.compareTo(r.q)<0){var f=r.p;r.p=r.q,r.q=f}if(r.p.subtract(or.ONE).gcd(r.e).compareTo(or.ONE)!==0){r.p=null,s();return}if(r.q.subtract(or.ONE).gcd(r.e).compareTo(or.ONE)!==0){r.q=null,i(r.qBits,a);return}if(r.p1=r.p.subtract(or.ONE),r.q1=r.q.subtract(or.ONE),r.phi=r.p1.multiply(r.q1),r.phi.gcd(r.e).compareTo(or.ONE)!==0){r.p=r.q=null,s();return}if(r.n=r.p.multiply(r.q),r.n.bitLength()!==r.bits){r.q=null,i(r.qBits,a);return}var h=r.e.modInverse(r.phi);r.keys={privateKey:Ut.rsa.setPrivateKey(r.n,r.e,h,r.p,r.q,h.mod(r.p1),h.mod(r.q1),r.q.modInverse(r.p)),publicKey:Ut.rsa.setPublicKey(r.n,r.e)},t(null,r.keys)}o(a,"finish")}o(kte,"_generateKeyPair");function Ma(r){var e=r.toString(16);e[0]>="8"&&(e="00"+e);var t=vt.util.hexToBytes(e);return t.length>1&&(t.charCodeAt(0)===0&&(t.charCodeAt(1)&128)===0||t.charCodeAt(0)===255&&(t.charCodeAt(1)&128)===128)?t.substr(1):t}o(Ma,"_bnToBytes");function Lte(r){return r<=100?27:r<=150?18:r<=200?15:r<=250?12:r<=300?9:r<=350?8:r<=400?7:r<=500?6:r<=600?5:r<=800?4:r<=1250?3:2}o(Lte,"_getMillerRabinTests");function tL(r){return vt.util.isNodejs&&typeof PT[r]=="function"}o(tL,"_detectNodeCrypto");function rL(r){return typeof _i.globalScope<"u"&&typeof _i.globalScope.crypto=="object"&&typeof _i.globalScope.crypto.subtle=="object"&&typeof _i.globalScope.crypto.subtle[r]=="function"}o(rL,"_detectSubtleCrypto");function nL(r){return typeof _i.globalScope<"u"&&typeof _i.globalScope.msCrypto=="object"&&typeof _i.globalScope.msCrypto.subtle=="object"&&typeof _i.globalScope.msCrypto.subtle[r]=="function"}o(nL,"_detectSubtleMsCrypto");function sL(r){for(var e=vt.util.hexToBytes(r.toString(16)),t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}o(sL,"_intToUint8Array")});var kT=Q((Exe,hL)=>{"use strict";var st=Xt();Mu();ia();gg();Pa();qu();eS();$l();Ti();NT();xg();hr();typeof uL>"u"&&(uL=st.jsbn.BigInteger);var uL,Se=st.asn1,qt=st.pki=st.pki||{};hL.exports=qt.pbe=st.pbe=st.pbe||{};var Wl=qt.oids,Vte={name:"EncryptedPrivateKeyInfo",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},Ute={name:"PBES2Algorithms",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:Se.Class.UNIVERSAL,type:Se.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:Se.Class.UNIVERSAL,type:Se.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},jte={name:"pkcs-12PbeParams",tagClass:Se.Class.UNIVERSAL,type:Se.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:Se.Class.UNIVERSAL,type:Se.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:Se.Class.UNIVERSAL,type:Se.Type.INTEGER,constructed:!1,capture:"iterations"}]};qt.encryptPrivateKeyInfo=function(r,e,t){t=t||{},t.saltSize=t.saltSize||8,t.count=t.count||2048,t.algorithm=t.algorithm||"aes128",t.prfAlgorithm=t.prfAlgorithm||"sha1";var n=st.random.getBytesSync(t.saltSize),s=t.count,i=Se.integerToDer(s),a,u,c;if(t.algorithm.indexOf("aes")===0||t.algorithm==="des"){var f,h,m;switch(t.algorithm){case"aes128":a=16,f=16,h=Wl["aes128-CBC"],m=st.aes.createEncryptionCipher;break;case"aes192":a=24,f=16,h=Wl["aes192-CBC"],m=st.aes.createEncryptionCipher;break;case"aes256":a=32,f=16,h=Wl["aes256-CBC"],m=st.aes.createEncryptionCipher;break;case"des":a=8,f=8,h=Wl.desCBC,m=st.des.createEncryptionCipher;break;default:var g=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw g.algorithm=t.algorithm,g}var x="hmacWith"+t.prfAlgorithm.toUpperCase(),v=fL(x),w=st.pkcs5.pbkdf2(e,n,s,a,v),S=st.random.getBytesSync(f),A=m(w);A.start(S),A.update(Se.toDer(r)),A.finish(),c=A.output.getBytes();var N=Fte(n,i,a,x);u=Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(Wl.pkcs5PBES2).getBytes()),Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(Wl.pkcs5PBKDF2).getBytes()),N]),Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(h).getBytes()),Se.create(Se.Class.UNIVERSAL,Se.Type.OCTETSTRING,!1,S)])])])}else if(t.algorithm==="3des"){a=24;var b=new st.util.ByteBuffer(n),w=qt.pbe.generatePkcs12Key(e,b,1,s,a),S=qt.pbe.generatePkcs12Key(e,b,2,s,a),A=st.des.createEncryptionCipher(w);A.start(S),A.update(Se.toDer(r)),A.finish(),c=A.output.getBytes(),u=Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(Wl["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OCTETSTRING,!1,n),Se.create(Se.Class.UNIVERSAL,Se.Type.INTEGER,!1,i.getBytes())])])}else{var g=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw g.algorithm=t.algorithm,g}var E=Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[u,Se.create(Se.Class.UNIVERSAL,Se.Type.OCTETSTRING,!1,c)]);return E};qt.decryptPrivateKeyInfo=function(r,e){var t=null,n={},s=[];if(!Se.validate(r,Vte,n,s)){var i=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=s,i}var a=Se.derToOid(n.encryptionOid),u=qt.pbe.getCipher(a,n.encryptionParams,e),c=st.util.createBuffer(n.encryptedData);return u.update(c),u.finish()&&(t=Se.fromDer(u.output)),t};qt.encryptedPrivateKeyToPem=function(r,e){var t={type:"ENCRYPTED PRIVATE KEY",body:Se.toDer(r).getBytes()};return st.pem.encode(t,{maxline:e})};qt.encryptedPrivateKeyFromPem=function(r){var e=st.pem.decode(r)[0];if(e.type!=="ENCRYPTED PRIVATE KEY"){var t=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return Se.fromDer(e.body)};qt.encryptRsaPrivateKey=function(r,e,t){if(t=t||{},!t.legacy){var n=qt.wrapRsaPrivateKey(qt.privateKeyToAsn1(r));return n=qt.encryptPrivateKeyInfo(n,e,t),qt.encryptedPrivateKeyToPem(n)}var s,i,a,u;switch(t.algorithm){case"aes128":s="AES-128-CBC",a=16,i=st.random.getBytesSync(16),u=st.aes.createEncryptionCipher;break;case"aes192":s="AES-192-CBC",a=24,i=st.random.getBytesSync(16),u=st.aes.createEncryptionCipher;break;case"aes256":s="AES-256-CBC",a=32,i=st.random.getBytesSync(16),u=st.aes.createEncryptionCipher;break;case"3des":s="DES-EDE3-CBC",a=24,i=st.random.getBytesSync(8),u=st.des.createEncryptionCipher;break;case"des":s="DES-CBC",a=8,i=st.random.getBytesSync(8),u=st.des.createEncryptionCipher;break;default:var c=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+t.algorithm+'".');throw c.algorithm=t.algorithm,c}var f=st.pbe.opensslDeriveBytes(e,i.substr(0,8),a),h=u(f);h.start(i),h.update(Se.toDer(qt.privateKeyToAsn1(r))),h.finish();var m={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:st.util.bytesToHex(i).toUpperCase()},body:h.output.getBytes()};return st.pem.encode(m)};qt.decryptRsaPrivateKey=function(r,e){var t=null,n=st.pem.decode(r)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var s=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw s.headerType=s,s}if(n.procType&&n.procType.type==="ENCRYPTED"){var i,a;switch(n.dekInfo.algorithm){case"DES-CBC":i=8,a=st.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,a=st.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,a=st.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,a=st.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,a=st.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,a=o(function(m){return st.rc2.createDecryptionCipher(m,40)},"cipherFn");break;case"RC2-64-CBC":i=8,a=o(function(m){return st.rc2.createDecryptionCipher(m,64)},"cipherFn");break;case"RC2-128-CBC":i=16,a=o(function(m){return st.rc2.createDecryptionCipher(m,128)},"cipherFn");break;default:var s=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw s.algorithm=n.dekInfo.algorithm,s}var u=st.util.hexToBytes(n.dekInfo.parameters),c=st.pbe.opensslDeriveBytes(e,u.substr(0,8),i),f=a(c);if(f.start(u),f.update(st.util.createBuffer(n.body)),f.finish())t=f.output.getBytes();else return t}else t=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?t=qt.decryptPrivateKeyInfo(Se.fromDer(t),e):t=Se.fromDer(t),t!==null&&(t=qt.privateKeyFromAsn1(t)),t};qt.pbe.generatePkcs12Key=function(r,e,t,n,s,i){var a,u;if(typeof i>"u"||i===null){if(!("sha1"in st.md))throw new Error('"sha1" hash algorithm unavailable.');i=st.md.sha1.create()}var c=i.digestLength,f=i.blockLength,h=new st.util.ByteBuffer,m=new st.util.ByteBuffer;if(r!=null){for(u=0;u<r.length;u++)m.putInt16(r.charCodeAt(u));m.putInt16(0)}var g=m.length(),x=e.length(),v=new st.util.ByteBuffer;v.fillWithByte(t,f);var w=f*Math.ceil(x/f),S=new st.util.ByteBuffer;for(u=0;u<w;u++)S.putByte(e.at(u%x));var A=f*Math.ceil(g/f),N=new st.util.ByteBuffer;for(u=0;u<A;u++)N.putByte(m.at(u%g));var b=S;b.putBuffer(N);for(var E=Math.ceil(s/c),C=1;C<=E;C++){var _=new st.util.ByteBuffer;_.putBytes(v.bytes()),_.putBytes(b.bytes());for(var M=0;M<n;M++)i.start(),i.update(_.getBytes()),_=i.digest();var R=new st.util.ByteBuffer;for(u=0;u<f;u++)R.putByte(_.at(u%c));var q=Math.ceil(x/f)+Math.ceil(g/f),H=new st.util.ByteBuffer;for(a=0;a<q;a++){var K=new st.util.ByteBuffer(b.getBytes(f)),G=511;for(u=R.length()-1;u>=0;u--)G=G>>8,G+=R.at(u)+K.at(u),K.setAt(u,G&255);H.putBuffer(K)}b=H,h.putBuffer(_)}return h.truncate(h.length()-s),h};qt.pbe.getCipher=function(r,e,t){switch(r){case qt.oids.pkcs5PBES2:return qt.pbe.getCipherForPBES2(r,e,t);case qt.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case qt.oids["pbewithSHAAnd40BitRC2-CBC"]:return qt.pbe.getCipherForPKCS12PBE(r,e,t);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=r,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}};qt.pbe.getCipherForPBES2=function(r,e,t){var n={},s=[];if(!Se.validate(e,Ute,n,s)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=s,i}if(r=Se.derToOid(n.kdfOid),r!==qt.oids.pkcs5PBKDF2){var i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw i.oid=r,i.supportedOids=["pkcs5PBKDF2"],i}if(r=Se.derToOid(n.encOid),r!==qt.oids["aes128-CBC"]&&r!==qt.oids["aes192-CBC"]&&r!==qt.oids["aes256-CBC"]&&r!==qt.oids["des-EDE3-CBC"]&&r!==qt.oids.desCBC){var i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw i.oid=r,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i}var a=n.kdfSalt,u=st.util.createBuffer(n.kdfIterationCount);u=u.getInt(u.length()<<3);var c,f;switch(qt.oids[r]){case"aes128-CBC":c=16,f=st.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,f=st.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,f=st.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,f=st.des.createDecryptionCipher;break;case"desCBC":c=8,f=st.des.createDecryptionCipher;break}var h=lL(n.prfOid),m=st.pkcs5.pbkdf2(t,a,u,c,h),g=n.encIv,x=f(m);return x.start(g),x};qt.pbe.getCipherForPKCS12PBE=function(r,e,t){var n={},s=[];if(!Se.validate(e,jte,n,s)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=s,i}var a=st.util.createBuffer(n.salt),u=st.util.createBuffer(n.iterations);u=u.getInt(u.length()<<3);var c,f,h;switch(r){case qt.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,f=8,h=st.des.startDecrypting;break;case qt.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,f=8,h=o(function(w,S){var A=st.rc2.createDecryptionCipher(w,40);return A.start(S,null),A},"cipherFn");break;default:var i=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw i.oid=r,i}var m=lL(n.prfOid),g=qt.pbe.generatePkcs12Key(t,a,1,u,c,m);m.start();var x=qt.pbe.generatePkcs12Key(t,a,2,u,f,m);return h(g,x)};qt.pbe.opensslDeriveBytes=function(r,e,t,n){if(typeof n>"u"||n===null){if(!("md5"in st.md))throw new Error('"md5" hash algorithm unavailable.');n=st.md.md5.create()}e===null&&(e="");for(var s=[cL(n,r+e)],i=16,a=1;i<t;++a,i+=16)s.push(cL(n,s[a-1]+r+e));return s.join("").substr(0,t)};function cL(r,e){return r.start().update(e).digest().getBytes()}o(cL,"hash");function lL(r){var e;if(!r)e="hmacWithSHA1";else if(e=qt.oids[Se.derToOid(r)],!e){var t=new Error("Unsupported PRF OID.");throw t.oid=r,t.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],t}return fL(e)}o(lL,"prfOidToMessageDigest");function fL(r){var e=st.md;switch(r){case"hmacWithSHA224":e=st.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":r=r.substr(8).toLowerCase();break;default:var t=new Error("Unsupported PRF algorithm.");throw t.algorithm=r,t.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],t}if(!e||!(r in e))throw new Error("Unknown hash algorithm: "+r);return e[r].create()}o(fL,"prfAlgorithmToMessageDigest");function Fte(r,e,t,n){var s=Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OCTETSTRING,!1,r),Se.create(Se.Class.UNIVERSAL,Se.Type.INTEGER,!1,e.getBytes())]);return n!=="hmacWithSHA1"&&s.value.push(Se.create(Se.Class.UNIVERSAL,Se.Type.INTEGER,!1,st.util.hexToBytes(t.toString(16))),Se.create(Se.Class.UNIVERSAL,Se.Type.SEQUENCE,!0,[Se.create(Se.Class.UNIVERSAL,Se.Type.OID,!1,Se.oidToDer(qt.oids[n]).getBytes()),Se.create(Se.Class.UNIVERSAL,Se.Type.NULL,!1,"")])),s}o(Fte,"createPbkdf2Params")});var LT=Q((Cxe,mL)=>{"use strict";var _p=Xt();ia();hr();var tt=_p.asn1,Bp=mL.exports=_p.pkcs7asn1=_p.pkcs7asn1||{};_p.pkcs7=_p.pkcs7||{};_p.pkcs7.asn1=Bp;var pL={name:"ContentInfo",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:tt.Class.UNIVERSAL,type:tt.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:tt.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};Bp.contentInfoValidator=pL;var dL={name:"EncryptedContentInfo",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:tt.Class.UNIVERSAL,type:tt.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:tt.Class.UNIVERSAL,type:tt.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:tt.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:tt.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};Bp.envelopedDataValidator={name:"EnvelopedData",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:tt.Class.UNIVERSAL,type:tt.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(dL)};Bp.encryptedDataValidator={name:"EncryptedData",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:tt.Class.UNIVERSAL,type:tt.Type.INTEGER,constructed:!1,capture:"version"}].concat(dL)};var Mte={name:"SignerInfo",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:tt.Class.UNIVERSAL,type:tt.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:tt.Class.UNIVERSAL,type:tt.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:tt.Class.UNIVERSAL,type:tt.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:tt.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:tt.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:tt.Class.UNIVERSAL,type:tt.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:tt.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};Bp.signedDataValidator={name:"SignedData",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:tt.Class.UNIVERSAL,type:tt.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},pL,{name:"SignedData.Certificates",tagClass:tt.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:tt.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SET,capture:"signerInfos",optional:!0,value:[Mte]}]};Bp.recipientInfoValidator={name:"RecipientInfo",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:tt.Class.UNIVERSAL,type:tt.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:tt.Class.UNIVERSAL,type:tt.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:tt.Class.UNIVERSAL,type:tt.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:tt.Class.UNIVERSAL,type:tt.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:tt.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:tt.Class.UNIVERSAL,type:tt.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var VT=Q((Nxe,gL)=>{"use strict";var zl=Xt();hr();zl.mgf=zl.mgf||{};var qte=gL.exports=zl.mgf.mgf1=zl.mgf1=zl.mgf1||{};qte.create=function(r){var e={generate:o(function(t,n){for(var s=new zl.util.ByteBuffer,i=Math.ceil(n/r.digestLength),a=0;a<i;a++){var u=new zl.util.ByteBuffer;u.putInt32(a),r.start(),r.update(t+u.getBytes()),s.putBuffer(r.digest())}return s.truncate(s.length()-n),s.getBytes()},"generate")};return e}});var yL=Q((Ixe,vL)=>{"use strict";var aS=Xt();VT();vL.exports=aS.mgf=aS.mgf||{};aS.mgf.mgf1=aS.mgf1});var oS=Q((_xe,xL)=>{"use strict";var Jl=Xt();Ti();hr();var Hte=xL.exports=Jl.pss=Jl.pss||{};Hte.create=function(r){arguments.length===3&&(r={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e=r.md,t=r.mgf,n=e.digestLength,s=r.salt||null;typeof s=="string"&&(s=Jl.util.createBuffer(s));var i;if("saltLength"in r)i=r.saltLength;else if(s!==null)i=s.length();else throw new Error("Salt length not specified or specific salt not given.");if(s!==null&&s.length()!==i)throw new Error("Given salt length does not match length of given salt.");var a=r.prng||Jl.random,u={};return u.encode=function(c,f){var h,m=f-1,g=Math.ceil(m/8),x=c.digest().getBytes();if(g<n+i+2)throw new Error("Message is too long to encrypt.");var v;s===null?v=a.getBytesSync(i):v=s.bytes();var w=new Jl.util.ByteBuffer;w.fillWithByte(0,8),w.putBytes(x),w.putBytes(v),e.start(),e.update(w.getBytes());var S=e.digest().getBytes(),A=new Jl.util.ByteBuffer;A.fillWithByte(0,g-i-n-2),A.putByte(1),A.putBytes(v);var N=A.getBytes(),b=g-n-1,E=t.generate(S,b),C="";for(h=0;h<b;h++)C+=String.fromCharCode(N.charCodeAt(h)^E.charCodeAt(h));var _=65280>>8*g-m&255;return C=String.fromCharCode(C.charCodeAt(0)&~_)+C.substr(1),C+S+"\xBC"},u.verify=function(c,f,h){var m,g=h-1,x=Math.ceil(g/8);if(f=f.substr(-x),x<n+i+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(f.charCodeAt(x-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var v=x-n-1,w=f.substr(0,v),S=f.substr(v,n),A=65280>>8*x-g&255;if((w.charCodeAt(0)&A)!==0)throw new Error("Bits beyond keysize not zero as expected.");var N=t.generate(S,v),b="";for(m=0;m<v;m++)b+=String.fromCharCode(w.charCodeAt(m)^N.charCodeAt(m));b=String.fromCharCode(b.charCodeAt(0)&~A)+b.substr(1);var E=x-n-i-2;for(m=0;m<E;m++)if(b.charCodeAt(m)!==0)throw new Error("Leftmost octets not zero as expected");if(b.charCodeAt(E)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var C=b.substr(-i),_=new Jl.util.ByteBuffer;_.fillWithByte(0,8),_.putBytes(c),_.putBytes(C),e.start(),e.update(_.getBytes());var M=e.digest().getBytes();return S===M},u}});var lS=Q((Bxe,AL)=>{"use strict";var yt=Xt();Mu();ia();gg();Pa();yL();qu();$l();oS();xg();hr();var k=yt.asn1,$e=AL.exports=yt.pki=yt.pki||{},ur=$e.oids,rn={};rn.CN=ur.commonName;rn.commonName="CN";rn.C=ur.countryName;rn.countryName="C";rn.L=ur.localityName;rn.localityName="L";rn.ST=ur.stateOrProvinceName;rn.stateOrProvinceName="ST";rn.O=ur.organizationName;rn.organizationName="O";rn.OU=ur.organizationalUnitName;rn.organizationalUnitName="OU";rn.E=ur.emailAddress;rn.emailAddress="E";var SL=yt.pki.rsa.publicKeyValidator,Kte={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},SL,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},$te={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},Xte={name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},SL,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},Gte={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[Xte,{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};$e.RDNAttributesAsArray=function(r,e){for(var t=[],n,s,i,a=0;a<r.value.length;++a){n=r.value[a];for(var u=0;u<n.value.length;++u)i={},s=n.value[u],i.type=k.derToOid(s.value[0].value),i.value=s.value[1].value,i.valueTagClass=s.value[1].type,i.type in ur&&(i.name=ur[i.type],i.name in rn&&(i.shortName=rn[i.name])),e&&(e.update(i.type),e.update(i.value)),t.push(i)}return t};$e.CRIAttributesAsArray=function(r){for(var e=[],t=0;t<r.length;++t)for(var n=r[t],s=k.derToOid(n.value[0].value),i=n.value[1].value,a=0;a<i.length;++a){var u={};if(u.type=s,u.value=i[a].value,u.valueTagClass=i[a].type,u.type in ur&&(u.name=ur[u.type],u.name in rn&&(u.shortName=rn[u.name])),u.type===ur.extensionRequest){u.extensions=[];for(var c=0;c<u.value.length;++c)u.extensions.push($e.certificateExtensionFromAsn1(u.value[c]))}e.push(u)}return e};function $u(r,e){typeof e=="string"&&(e={shortName:e});for(var t=null,n,s=0;t===null&&s<r.attributes.length;++s)n=r.attributes[s],(e.type&&e.type===n.type||e.name&&e.name===n.name||e.shortName&&e.shortName===n.shortName)&&(t=n);return t}o($u,"_getAttribute");var uS=o(function(r,e,t){var n={};if(r!==ur["RSASSA-PSS"])return n;t&&(n={hash:{algorithmOid:ur.sha1},mgf:{algorithmOid:ur.mgf1,hash:{algorithmOid:ur.sha1}},saltLength:20});var s={},i=[];if(!k.validate(e,$te,s,i)){var a=new Error("Cannot read RSASSA-PSS parameter block.");throw a.errors=i,a}return s.hashOid!==void 0&&(n.hash=n.hash||{},n.hash.algorithmOid=k.derToOid(s.hashOid)),s.maskGenOid!==void 0&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=k.derToOid(s.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=k.derToOid(s.maskGenHashOid)),s.saltLength!==void 0&&(n.saltLength=s.saltLength.charCodeAt(0)),n},"_readSignatureParameters"),cS=o(function(r){switch(ur[r.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return yt.md.sha1.create();case"md5WithRSAEncryption":return yt.md.md5.create();case"sha256WithRSAEncryption":return yt.md.sha256.create();case"sha384WithRSAEncryption":return yt.md.sha384.create();case"sha512WithRSAEncryption":return yt.md.sha512.create();case"RSASSA-PSS":return yt.md.sha256.create();default:var e=new Error("Could not compute "+r.type+" digest. Unknown signature OID.");throw e.signatureOid=r.signatureOid,e}},"_createSignatureDigest"),bL=o(function(r){var e=r.certificate,t;switch(e.signatureOid){case ur.sha1WithRSAEncryption:case ur.sha1WithRSASignature:break;case ur["RSASSA-PSS"]:var n,s;if(n=ur[e.signatureParameters.mgf.hash.algorithmOid],n===void 0||yt.md[n]===void 0){var i=new Error("Unsupported MGF hash function.");throw i.oid=e.signatureParameters.mgf.hash.algorithmOid,i.name=n,i}if(s=ur[e.signatureParameters.mgf.algorithmOid],s===void 0||yt.mgf[s]===void 0){var i=new Error("Unsupported MGF function.");throw i.oid=e.signatureParameters.mgf.algorithmOid,i.name=s,i}if(s=yt.mgf[s].create(yt.md[n].create()),n=ur[e.signatureParameters.hash.algorithmOid],n===void 0||yt.md[n]===void 0){var i=new Error("Unsupported RSASSA-PSS hash function.");throw i.oid=e.signatureParameters.hash.algorithmOid,i.name=n,i}t=yt.pss.create(yt.md[n].create(),s,e.signatureParameters.saltLength);break}return e.publicKey.verify(r.md.digest().getBytes(),r.signature,t)},"_verifySignature");$e.certificateFromPem=function(r,e,t){var n=yt.pem.decode(r)[0];if(n.type!=="CERTIFICATE"&&n.type!=="X509 CERTIFICATE"&&n.type!=="TRUSTED CERTIFICATE"){var s=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw s.headerType=n.type,s}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var i=k.fromDer(n.body,t);return $e.certificateFromAsn1(i,e)};$e.certificateToPem=function(r,e){var t={type:"CERTIFICATE",body:k.toDer($e.certificateToAsn1(r)).getBytes()};return yt.pem.encode(t,{maxline:e})};$e.publicKeyFromPem=function(r){var e=yt.pem.decode(r)[0];if(e.type!=="PUBLIC KEY"&&e.type!=="RSA PUBLIC KEY"){var t=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var n=k.fromDer(e.body);return $e.publicKeyFromAsn1(n)};$e.publicKeyToPem=function(r,e){var t={type:"PUBLIC KEY",body:k.toDer($e.publicKeyToAsn1(r)).getBytes()};return yt.pem.encode(t,{maxline:e})};$e.publicKeyToRSAPublicKeyPem=function(r,e){var t={type:"RSA PUBLIC KEY",body:k.toDer($e.publicKeyToRSAPublicKey(r)).getBytes()};return yt.pem.encode(t,{maxline:e})};$e.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||yt.md.sha1.create(),n=e.type||"RSAPublicKey",s;switch(n){case"RSAPublicKey":s=k.toDer($e.publicKeyToRSAPublicKey(r)).getBytes();break;case"SubjectPublicKeyInfo":s=k.toDer($e.publicKeyToAsn1(r)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+e.type+'".')}t.start(),t.update(s);var i=t.digest();if(e.encoding==="hex"){var a=i.toHex();return e.delimiter?a.match(/.{2}/g).join(e.delimiter):a}else{if(e.encoding==="binary")return i.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".')}return i};$e.certificationRequestFromPem=function(r,e,t){var n=yt.pem.decode(r)[0];if(n.type!=="CERTIFICATE REQUEST"){var s=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw s.headerType=n.type,s}if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var i=k.fromDer(n.body,t);return $e.certificationRequestFromAsn1(i,e)};$e.certificationRequestToPem=function(r,e){var t={type:"CERTIFICATE REQUEST",body:k.toDer($e.certificationRequestToAsn1(r)).getBytes()};return yt.pem.encode(t,{maxline:e})};$e.createCertificate=function(){var r={};return r.version=2,r.serialNumber="00",r.signatureOid=null,r.signature=null,r.siginfo={},r.siginfo.algorithmOid=null,r.validity={},r.validity.notBefore=new Date,r.validity.notAfter=new Date,r.issuer={},r.issuer.getField=function(e){return $u(r.issuer,e)},r.issuer.addField=function(e){Bi([e]),r.issuer.attributes.push(e)},r.issuer.attributes=[],r.issuer.hash=null,r.subject={},r.subject.getField=function(e){return $u(r.subject,e)},r.subject.addField=function(e){Bi([e]),r.subject.attributes.push(e)},r.subject.attributes=[],r.subject.hash=null,r.extensions=[],r.publicKey=null,r.md=null,r.setSubject=function(e,t){Bi(e),r.subject.attributes=e,delete r.subject.uniqueId,t&&(r.subject.uniqueId=t),r.subject.hash=null},r.setIssuer=function(e,t){Bi(e),r.issuer.attributes=e,delete r.issuer.uniqueId,t&&(r.issuer.uniqueId=t),r.issuer.hash=null},r.setExtensions=function(e){for(var t=0;t<e.length;++t)EL(e[t],{cert:r});r.extensions=e},r.getExtension=function(e){typeof e=="string"&&(e={name:e});for(var t=null,n,s=0;t===null&&s<r.extensions.length;++s)n=r.extensions[s],(e.id&&n.id===e.id||e.name&&n.name===e.name)&&(t=n);return t},r.sign=function(e,t){r.md=t||yt.md.sha1.create();var n=ur[r.md.algorithm+"WithRSAEncryption"];if(!n){var s=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw s.algorithm=r.md.algorithm,s}r.signatureOid=r.siginfo.algorithmOid=n,r.tbsCertificate=$e.getTBSCertificate(r);var i=k.toDer(r.tbsCertificate);r.md.update(i.getBytes()),r.signature=e.sign(r.md)},r.verify=function(e){var t=!1;if(!r.issued(e)){var n=e.issuer,s=r.subject,i=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw i.expectedIssuer=s.attributes,i.actualIssuer=n.attributes,i}var a=e.md;if(a===null){a=cS({signatureOid:e.signatureOid,type:"certificate"});var u=e.tbsCertificate||$e.getTBSCertificate(e),c=k.toDer(u);a.update(c.getBytes())}return a!==null&&(t=bL({certificate:r,md:a,signature:e.signature})),t},r.isIssuer=function(e){var t=!1,n=r.issuer,s=e.subject;if(n.hash&&s.hash)t=n.hash===s.hash;else if(n.attributes.length===s.attributes.length){t=!0;for(var i,a,u=0;t&&u<n.attributes.length;++u)i=n.attributes[u],a=s.attributes[u],(i.type!==a.type||i.value!==a.value)&&(t=!1)}return t},r.issued=function(e){return e.isIssuer(r)},r.generateSubjectKeyIdentifier=function(){return $e.getPublicKeyFingerprint(r.publicKey,{type:"RSAPublicKey"})},r.verifySubjectKeyIdentifier=function(){for(var e=ur.subjectKeyIdentifier,t=0;t<r.extensions.length;++t){var n=r.extensions[t];if(n.id===e){var s=r.generateSubjectKeyIdentifier().getBytes();return yt.util.hexToBytes(n.subjectKeyIdentifier)===s}}return!1},r};$e.certificateFromAsn1=function(r,e){var t={},n=[];if(!k.validate(r,Kte,t,n)){var s=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw s.errors=n,s}var i=k.derToOid(t.publicKeyOid);if(i!==$e.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=$e.createCertificate();a.version=t.certVersion?t.certVersion.charCodeAt(0):0;var u=yt.util.createBuffer(t.certSerialNumber);a.serialNumber=u.toHex(),a.signatureOid=yt.asn1.derToOid(t.certSignatureOid),a.signatureParameters=uS(a.signatureOid,t.certSignatureParams,!0),a.siginfo.algorithmOid=yt.asn1.derToOid(t.certinfoSignatureOid),a.siginfo.parameters=uS(a.siginfo.algorithmOid,t.certinfoSignatureParams,!1),a.signature=t.certSignature;var c=[];if(t.certValidity1UTCTime!==void 0&&c.push(k.utcTimeToDate(t.certValidity1UTCTime)),t.certValidity2GeneralizedTime!==void 0&&c.push(k.generalizedTimeToDate(t.certValidity2GeneralizedTime)),t.certValidity3UTCTime!==void 0&&c.push(k.utcTimeToDate(t.certValidity3UTCTime)),t.certValidity4GeneralizedTime!==void 0&&c.push(k.generalizedTimeToDate(t.certValidity4GeneralizedTime)),c.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(c.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(a.validity.notBefore=c[0],a.validity.notAfter=c[1],a.tbsCertificate=t.tbsCertificate,e){a.md=cS({signatureOid:a.signatureOid,type:"certificate"});var f=k.toDer(a.tbsCertificate);a.md.update(f.getBytes())}var h=yt.md.sha1.create(),m=k.toDer(t.certIssuer);h.update(m.getBytes()),a.issuer.getField=function(v){return $u(a.issuer,v)},a.issuer.addField=function(v){Bi([v]),a.issuer.attributes.push(v)},a.issuer.attributes=$e.RDNAttributesAsArray(t.certIssuer),t.certIssuerUniqueId&&(a.issuer.uniqueId=t.certIssuerUniqueId),a.issuer.hash=h.digest().toHex();var g=yt.md.sha1.create(),x=k.toDer(t.certSubject);return g.update(x.getBytes()),a.subject.getField=function(v){return $u(a.subject,v)},a.subject.addField=function(v){Bi([v]),a.subject.attributes.push(v)},a.subject.attributes=$e.RDNAttributesAsArray(t.certSubject),t.certSubjectUniqueId&&(a.subject.uniqueId=t.certSubjectUniqueId),a.subject.hash=g.digest().toHex(),t.certExtensions?a.extensions=$e.certificateExtensionsFromAsn1(t.certExtensions):a.extensions=[],a.publicKey=$e.publicKeyFromAsn1(t.subjectPublicKeyInfo),a};$e.certificateExtensionsFromAsn1=function(r){for(var e=[],t=0;t<r.value.length;++t)for(var n=r.value[t],s=0;s<n.value.length;++s)e.push($e.certificateExtensionFromAsn1(n.value[s]));return e};$e.certificateExtensionFromAsn1=function(r){var e={};if(e.id=k.derToOid(r.value[0].value),e.critical=!1,r.value[1].type===k.Type.BOOLEAN?(e.critical=r.value[1].value.charCodeAt(0)!==0,e.value=r.value[2].value):e.value=r.value[1].value,e.id in ur){if(e.name=ur[e.id],e.name==="keyUsage"){var t=k.fromDer(e.value),n=0,s=0;t.value.length>1&&(n=t.value.charCodeAt(1),s=t.value.length>2?t.value.charCodeAt(2):0),e.digitalSignature=(n&128)===128,e.nonRepudiation=(n&64)===64,e.keyEncipherment=(n&32)===32,e.dataEncipherment=(n&16)===16,e.keyAgreement=(n&8)===8,e.keyCertSign=(n&4)===4,e.cRLSign=(n&2)===2,e.encipherOnly=(n&1)===1,e.decipherOnly=(s&128)===128}else if(e.name==="basicConstraints"){var t=k.fromDer(e.value);t.value.length>0&&t.value[0].type===k.Type.BOOLEAN?e.cA=t.value[0].value.charCodeAt(0)!==0:e.cA=!1;var i=null;t.value.length>0&&t.value[0].type===k.Type.INTEGER?i=t.value[0].value:t.value.length>1&&(i=t.value[1].value),i!==null&&(e.pathLenConstraint=k.derToInteger(i))}else if(e.name==="extKeyUsage")for(var t=k.fromDer(e.value),a=0;a<t.value.length;++a){var u=k.derToOid(t.value[a].value);u in ur?e[ur[u]]=!0:e[u]=!0}else if(e.name==="nsCertType"){var t=k.fromDer(e.value),n=0;t.value.length>1&&(n=t.value.charCodeAt(1)),e.client=(n&128)===128,e.server=(n&64)===64,e.email=(n&32)===32,e.objsign=(n&16)===16,e.reserved=(n&8)===8,e.sslCA=(n&4)===4,e.emailCA=(n&2)===2,e.objCA=(n&1)===1}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.altNames=[];for(var c,t=k.fromDer(e.value),f=0;f<t.value.length;++f){c=t.value[f];var h={type:c.type,value:c.value};switch(e.altNames.push(h),c.type){case 1:case 2:case 6:break;case 7:h.ip=yt.util.bytesToIP(c.value);break;case 8:h.oid=k.derToOid(c.value);break;default:}}}else if(e.name==="subjectKeyIdentifier"){var t=k.fromDer(e.value);e.subjectKeyIdentifier=yt.util.bytesToHex(t.value)}}return e};$e.certificationRequestFromAsn1=function(r,e){var t={},n=[];if(!k.validate(r,Gte,t,n)){var s=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw s.errors=n,s}var i=k.derToOid(t.publicKeyOid);if(i!==$e.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=$e.createCertificationRequest();if(a.version=t.csrVersion?t.csrVersion.charCodeAt(0):0,a.signatureOid=yt.asn1.derToOid(t.csrSignatureOid),a.signatureParameters=uS(a.signatureOid,t.csrSignatureParams,!0),a.siginfo.algorithmOid=yt.asn1.derToOid(t.csrSignatureOid),a.siginfo.parameters=uS(a.siginfo.algorithmOid,t.csrSignatureParams,!1),a.signature=t.csrSignature,a.certificationRequestInfo=t.certificationRequestInfo,e){a.md=cS({signatureOid:a.signatureOid,type:"certification request"});var u=k.toDer(a.certificationRequestInfo);a.md.update(u.getBytes())}var c=yt.md.sha1.create();return a.subject.getField=function(f){return $u(a.subject,f)},a.subject.addField=function(f){Bi([f]),a.subject.attributes.push(f)},a.subject.attributes=$e.RDNAttributesAsArray(t.certificationRequestInfoSubject,c),a.subject.hash=c.digest().toHex(),a.publicKey=$e.publicKeyFromAsn1(t.subjectPublicKeyInfo),a.getAttribute=function(f){return $u(a,f)},a.addAttribute=function(f){Bi([f]),a.attributes.push(f)},a.attributes=$e.CRIAttributesAsArray(t.certificationRequestInfoAttributes||[]),a};$e.createCertificationRequest=function(){var r={};return r.version=0,r.signatureOid=null,r.signature=null,r.siginfo={},r.siginfo.algorithmOid=null,r.subject={},r.subject.getField=function(e){return $u(r.subject,e)},r.subject.addField=function(e){Bi([e]),r.subject.attributes.push(e)},r.subject.attributes=[],r.subject.hash=null,r.publicKey=null,r.attributes=[],r.getAttribute=function(e){return $u(r,e)},r.addAttribute=function(e){Bi([e]),r.attributes.push(e)},r.md=null,r.setSubject=function(e){Bi(e),r.subject.attributes=e,r.subject.hash=null},r.setAttributes=function(e){Bi(e),r.attributes=e},r.sign=function(e,t){r.md=t||yt.md.sha1.create();var n=ur[r.md.algorithm+"WithRSAEncryption"];if(!n){var s=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw s.algorithm=r.md.algorithm,s}r.signatureOid=r.siginfo.algorithmOid=n,r.certificationRequestInfo=$e.getCertificationRequestInfo(r);var i=k.toDer(r.certificationRequestInfo);r.md.update(i.getBytes()),r.signature=e.sign(r.md)},r.verify=function(){var e=!1,t=r.md;if(t===null){t=cS({signatureOid:r.signatureOid,type:"certification request"});var n=r.certificationRequestInfo||$e.getCertificationRequestInfo(r),s=k.toDer(n);t.update(s.getBytes())}return t!==null&&(e=bL({certificate:r,md:t,signature:r.signature})),e},r};function Dp(r){for(var e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),t,n,s=r.attributes,i=0;i<s.length;++i){t=s[i];var a=t.value,u=k.Type.PRINTABLESTRING;"valueTagClass"in t&&(u=t.valueTagClass,u===k.Type.UTF8&&(a=yt.util.encodeUtf8(a))),n=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(t.type).getBytes()),k.create(k.Class.UNIVERSAL,u,!1,a)])]),e.value.push(n)}return e}o(Dp,"_dnToAsn1");function Bi(r){for(var e,t=0;t<r.length;++t){if(e=r[t],typeof e.name>"u"&&(e.type&&e.type in $e.oids?e.name=$e.oids[e.type]:e.shortName&&e.shortName in rn&&(e.name=$e.oids[rn[e.shortName]])),typeof e.type>"u")if(e.name&&e.name in $e.oids)e.type=$e.oids[e.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=e,n}if(typeof e.shortName>"u"&&e.name&&e.name in rn&&(e.shortName=rn[e.name]),e.type===ur.extensionRequest&&(e.valueConstructed=!0,e.valueTagClass=k.Type.SEQUENCE,!e.value&&e.extensions)){e.value=[];for(var s=0;s<e.extensions.length;++s)e.value.push($e.certificateExtensionToAsn1(EL(e.extensions[s])))}if(typeof e.value>"u"){var n=new Error("Attribute value not specified.");throw n.attribute=e,n}}}o(Bi,"_fillMissingFields");function EL(r,e){if(e=e||{},typeof r.name>"u"&&r.id&&r.id in $e.oids&&(r.name=$e.oids[r.id]),typeof r.id>"u")if(r.name&&r.name in $e.oids)r.id=$e.oids[r.name];else{var t=new Error("Extension ID not specified.");throw t.extension=r,t}if(typeof r.value<"u")return r;if(r.name==="keyUsage"){var n=0,s=0,i=0;r.digitalSignature&&(s|=128,n=7),r.nonRepudiation&&(s|=64,n=6),r.keyEncipherment&&(s|=32,n=5),r.dataEncipherment&&(s|=16,n=4),r.keyAgreement&&(s|=8,n=3),r.keyCertSign&&(s|=4,n=2),r.cRLSign&&(s|=2,n=1),r.encipherOnly&&(s|=1,n=0),r.decipherOnly&&(i|=128,n=7);var a=String.fromCharCode(n);i!==0?a+=String.fromCharCode(s)+String.fromCharCode(i):s!==0&&(a+=String.fromCharCode(s)),r.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,a)}else if(r.name==="basicConstraints")r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),r.cA&&r.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in r&&r.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(r.pathLenConstraint).getBytes()));else if(r.name==="extKeyUsage"){r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var u=r.value.value;for(var c in r)r[c]===!0&&(c in ur?u.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(ur[c]).getBytes())):c.indexOf(".")!==-1&&u.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(c).getBytes())))}else if(r.name==="nsCertType"){var n=0,s=0;r.client&&(s|=128,n=7),r.server&&(s|=64,n=6),r.email&&(s|=32,n=5),r.objsign&&(s|=16,n=4),r.reserved&&(s|=8,n=3),r.sslCA&&(s|=4,n=2),r.emailCA&&(s|=2,n=1),r.objCA&&(s|=1,n=0);var a=String.fromCharCode(n);s!==0&&(a+=String.fromCharCode(s)),r.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,a)}else if(r.name==="subjectAltName"||r.name==="issuerAltName"){r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);for(var f,h=0;h<r.altNames.length;++h){f=r.altNames[h];var a=f.value;if(f.type===7&&f.ip){if(a=yt.util.bytesFromIP(f.ip),a===null){var t=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw t.extension=r,t}}else f.type===8&&(f.oid?a=k.oidToDer(k.oidToDer(f.oid)):a=k.oidToDer(a));r.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,f.type,!1,a))}}else if(r.name==="nsComment"&&e.cert){if(!/^[\x00-\x7F]*$/.test(r.comment)||r.comment.length<1||r.comment.length>128)throw new Error('Invalid "nsComment" content.');r.value=k.create(k.Class.UNIVERSAL,k.Type.IA5STRING,!1,r.comment)}else if(r.name==="subjectKeyIdentifier"&&e.cert){var m=e.cert.generateSubjectKeyIdentifier();r.subjectKeyIdentifier=m.toHex(),r.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,m.getBytes())}else if(r.name==="authorityKeyIdentifier"&&e.cert){r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var u=r.value.value;if(r.keyIdentifier){var g=r.keyIdentifier===!0?e.cert.generateSubjectKeyIdentifier().getBytes():r.keyIdentifier;u.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!1,g))}if(r.authorityCertIssuer){var x=[k.create(k.Class.CONTEXT_SPECIFIC,4,!0,[Dp(r.authorityCertIssuer===!0?e.cert.issuer:r.authorityCertIssuer)])];u.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,x))}if(r.serialNumber){var v=yt.util.hexToBytes(r.serialNumber===!0?e.cert.serialNumber:r.serialNumber);u.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!1,v))}}else if(r.name==="cRLDistributionPoints"){r.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);for(var u=r.value.value,w=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),S=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]),f,h=0;h<r.altNames.length;++h){f=r.altNames[h];var a=f.value;if(f.type===7&&f.ip){if(a=yt.util.bytesFromIP(f.ip),a===null){var t=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw t.extension=r,t}}else f.type===8&&(f.oid?a=k.oidToDer(k.oidToDer(f.oid)):a=k.oidToDer(a));S.value.push(k.create(k.Class.CONTEXT_SPECIFIC,f.type,!1,a))}w.value.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[S])),u.push(w)}if(typeof r.value>"u"){var t=new Error("Extension value not specified.");throw t.extension=r,t}return r}o(EL,"_fillMissingExtensionFields");function UT(r,e){switch(r){case ur["RSASSA-PSS"]:var t=[];return e.hash.algorithmOid!==void 0&&t.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])),e.mgf.algorithmOid!==void 0&&t.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])])),e.saltLength!==void 0&&t.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(e.saltLength).getBytes())])),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,t);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")}}o(UT,"_signatureParametersToAsn1");function Wte(r){var e=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(r.attributes.length===0)return e;for(var t=r.attributes,n=0;n<t.length;++n){var s=t[n],i=s.value,a=k.Type.UTF8;"valueTagClass"in s&&(a=s.valueTagClass),a===k.Type.UTF8&&(i=yt.util.encodeUtf8(i));var u=!1;"valueConstructed"in s&&(u=s.valueConstructed);var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(s.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,a,u,i)])]);e.value.push(c)}return e}o(Wte,"_CRIAttributesToAsn1");var zte=new Date("1950-01-01T00:00:00Z"),Jte=new Date("2050-01-01T00:00:00Z");function wL(r){return r>=zte&&r<Jte?k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(r)):k.create(k.Class.UNIVERSAL,k.Type.GENERALIZEDTIME,!1,k.dateToGeneralizedTime(r))}o(wL,"_dateToAsn1");$e.getTBSCertificate=function(r){var e=wL(r.validity.notBefore),t=wL(r.validity.notAfter),n=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(r.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,yt.util.hexToBytes(r.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r.siginfo.algorithmOid).getBytes()),UT(r.siginfo.algorithmOid,r.siginfo.parameters)]),Dp(r.issuer),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[e,t]),Dp(r.subject),$e.publicKeyToAsn1(r.publicKey)]);return r.issuer.uniqueId&&n.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,"\0"+r.issuer.uniqueId)])),r.subject.uniqueId&&n.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,"\0"+r.subject.uniqueId)])),r.extensions.length>0&&n.value.push($e.certificateExtensionsToAsn1(r.extensions)),n};$e.getCertificationRequestInfo=function(r){var e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(r.version).getBytes()),Dp(r.subject),$e.publicKeyToAsn1(r.publicKey),Wte(r)]);return e};$e.distinguishedNameToAsn1=function(r){return Dp(r)};$e.certificateToAsn1=function(r){var e=r.tbsCertificate||$e.getTBSCertificate(r);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[e,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r.signatureOid).getBytes()),UT(r.signatureOid,r.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,"\0"+r.signature)])};$e.certificateExtensionsToAsn1=function(r){var e=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),t=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);e.value.push(t);for(var n=0;n<r.length;++n)t.value.push($e.certificateExtensionToAsn1(r[n]));return e};$e.certificateExtensionToAsn1=function(r){var e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);e.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r.id).getBytes())),r.critical&&e.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,"\xFF"));var t=r.value;return typeof r.value!="string"&&(t=k.toDer(t).getBytes()),e.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,t)),e};$e.certificationRequestToAsn1=function(r){var e=r.certificationRequestInfo||$e.getCertificationRequestInfo(r);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[e,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(r.signatureOid).getBytes()),UT(r.signatureOid,r.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,"\0"+r.signature)])};$e.createCaStore=function(r){var e={certs:{}};e.getIssuer=function(a){var u=t(a.issuer);return u},e.addCertificate=function(a){if(typeof a=="string"&&(a=yt.pki.certificateFromPem(a)),n(a.subject),!e.hasCertificate(a))if(a.subject.hash in e.certs){var u=e.certs[a.subject.hash];yt.util.isArray(u)||(u=[u]),u.push(a),e.certs[a.subject.hash]=u}else e.certs[a.subject.hash]=a},e.hasCertificate=function(a){typeof a=="string"&&(a=yt.pki.certificateFromPem(a));var u=t(a.subject);if(!u)return!1;yt.util.isArray(u)||(u=[u]);for(var c=k.toDer($e.certificateToAsn1(a)).getBytes(),f=0;f<u.length;++f){var h=k.toDer($e.certificateToAsn1(u[f])).getBytes();if(c===h)return!0}return!1},e.listAllCertificates=function(){var a=[];for(var u in e.certs)if(e.certs.hasOwnProperty(u)){var c=e.certs[u];if(!yt.util.isArray(c))a.push(c);else for(var f=0;f<c.length;++f)a.push(c[f])}return a},e.removeCertificate=function(a){var u;if(typeof a=="string"&&(a=yt.pki.certificateFromPem(a)),n(a.subject),!e.hasCertificate(a))return null;var c=t(a.subject);if(!yt.util.isArray(c))return u=e.certs[a.subject.hash],delete e.certs[a.subject.hash],u;for(var f=k.toDer($e.certificateToAsn1(a)).getBytes(),h=0;h<c.length;++h){var m=k.toDer($e.certificateToAsn1(c[h])).getBytes();f===m&&(u=c[h],c.splice(h,1))}return c.length===0&&delete e.certs[a.subject.hash],u};function t(a){return n(a),e.certs[a.hash]||null}o(t,"getBySubject");function n(a){if(!a.hash){var u=yt.md.sha1.create();a.attributes=$e.RDNAttributesAsArray(Dp(a),u),a.hash=u.digest().toHex()}}if(o(n,"ensureSubjectHasHash"),r)for(var s=0;s<r.length;++s){var i=r[s];e.addCertificate(i)}return e};$e.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};$e.verifyCertificateChain=function(r,e,t){typeof t=="function"&&(t={verify:t}),t=t||{},e=e.slice(0);var n=e.slice(0),s=t.validityCheckDate;typeof s>"u"&&(s=new Date);var i=!0,a=null,u=0;do{var c=e.shift(),f=null,h=!1;if(s&&(s<c.validity.notBefore||s>c.validity.notAfter)&&(a={message:"Certificate is not valid yet or has expired.",error:$e.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:s}),a===null){if(f=e[0]||r.getIssuer(c),f===null&&c.isIssuer(c)&&(h=!0,f=c),f){var m=f;yt.util.isArray(m)||(m=[m]);for(var g=!1;!g&&m.length>0;){f=m.shift();try{g=f.verify(c)}catch{}}g||(a={message:"Certificate signature is invalid.",error:$e.certificateError.bad_certificate})}a===null&&(!f||h)&&!r.hasCertificate(c)&&(a={message:"Certificate is not trusted.",error:$e.certificateError.unknown_ca})}if(a===null&&f&&!c.isIssuer(f)&&(a={message:"Certificate issuer is invalid.",error:$e.certificateError.bad_certificate}),a===null)for(var x={keyUsage:!0,basicConstraints:!0},v=0;a===null&&v<c.extensions.length;++v){var w=c.extensions[v];w.critical&&!(w.name in x)&&(a={message:"Certificate has an unsupported critical extension.",error:$e.certificateError.unsupported_certificate})}if(a===null&&(!i||e.length===0&&(!f||h))){var S=c.getExtension("basicConstraints"),A=c.getExtension("keyUsage");if(A!==null&&(!A.keyCertSign||S===null)&&(a={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:$e.certificateError.bad_certificate}),a===null&&S!==null&&!S.cA&&(a={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:$e.certificateError.bad_certificate}),a===null&&A!==null&&"pathLenConstraint"in S){var N=u-1;N>S.pathLenConstraint&&(a={message:"Certificate basicConstraints pathLenConstraint violated.",error:$e.certificateError.bad_certificate})}}var b=a===null?!0:a.error,E=t.verify?t.verify(b,u,n):b;if(E===!0)a=null;else throw b===!0&&(a={message:"The application rejected the certificate.",error:$e.certificateError.bad_certificate}),(E||E===0)&&(typeof E=="object"&&!yt.util.isArray(E)?(E.message&&(a.message=E.message),E.error&&(a.error=E.error)):typeof E=="string"&&(a.error=E)),a;i=!1,++u}while(e.length>0);return!0}});var FT=Q((Rxe,NL)=>{"use strict";var Or=Xt();ia();Ap();qu();LT();kT();Ti();xg();Ip();hr();lS();var Y=Or.asn1,Qt=Or.pki,Sg=NL.exports=Or.pkcs12=Or.pkcs12||{},CL={name:"ContentInfo",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:Y.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},Yte={name:"PFX",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,capture:"version"},CL,{name:"PFX.macData",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:Y.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:Y.Class.UNIVERSAL,type:Y.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},Qte={name:"SafeBag",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:Y.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},Zte={name:"Attribute",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SET,constructed:!0,capture:"values"}]},ere={name:"CertBag",tagClass:Y.Class.UNIVERSAL,type:Y.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:Y.Class.UNIVERSAL,type:Y.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:Y.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:Y.Class.UNIVERSAL,type:Y.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function wg(r,e,t,n){for(var s=[],i=0;i<r.length;i++)for(var a=0;a<r[i].safeBags.length;a++){var u=r[i].safeBags[a];if(!(n!==void 0&&u.type!==n)){if(e===null){s.push(u);continue}u.attributes[e]!==void 0&&u.attributes[e].indexOf(t)>=0&&s.push(u)}}return s}o(wg,"_getBagsByAttribute");Sg.pkcs12FromAsn1=function(r,e,t){typeof e=="string"?(t=e,e=!0):e===void 0&&(e=!0);var n={},s=[];if(!Y.validate(r,Yte,n,s)){var i=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw i.errors=i,i}var a={version:n.version.charCodeAt(0),safeContents:[],getBags:o(function(S){var A={},N;return"localKeyId"in S?N=S.localKeyId:"localKeyIdHex"in S&&(N=Or.util.hexToBytes(S.localKeyIdHex)),N===void 0&&!("friendlyName"in S)&&"bagType"in S&&(A[S.bagType]=wg(a.safeContents,null,null,S.bagType)),N!==void 0&&(A.localKeyId=wg(a.safeContents,"localKeyId",N,S.bagType)),"friendlyName"in S&&(A.friendlyName=wg(a.safeContents,"friendlyName",S.friendlyName,S.bagType)),A},"getBags"),getBagsByFriendlyName:o(function(S,A){return wg(a.safeContents,"friendlyName",S,A)},"getBagsByFriendlyName"),getBagsByLocalKeyId:o(function(S,A){return wg(a.safeContents,"localKeyId",S,A)},"getBagsByLocalKeyId")};if(n.version.charCodeAt(0)!==3){var i=new Error("PKCS#12 PFX of version other than 3 not supported.");throw i.version=n.version.charCodeAt(0),i}if(Y.derToOid(n.contentType)!==Qt.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=Y.derToOid(n.contentType),i}var u=n.content.value[0];if(u.tagClass!==Y.Class.UNIVERSAL||u.type!==Y.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(u=jT(u),n.mac){var c=null,f=0,h=Y.derToOid(n.macAlgorithm);switch(h){case Qt.oids.sha1:c=Or.md.sha1.create(),f=20;break;case Qt.oids.sha256:c=Or.md.sha256.create(),f=32;break;case Qt.oids.sha384:c=Or.md.sha384.create(),f=48;break;case Qt.oids.sha512:c=Or.md.sha512.create(),f=64;break;case Qt.oids.md5:c=Or.md.md5.create(),f=16;break}if(c===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+h);var m=new Or.util.ByteBuffer(n.macSalt),g="macIterations"in n?parseInt(Or.util.bytesToHex(n.macIterations),16):1,x=Sg.generateKey(t,m,3,g,f,c),v=Or.hmac.create();v.start(c,x),v.update(u.value);var w=v.getMac();if(w.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return tre(a,u.value,e,t),a};function jT(r){if(r.composed||r.constructed){for(var e=Or.util.createBuffer(),t=0;t<r.value.length;++t)e.putBytes(r.value[t].value);r.composed=r.constructed=!1,r.value=e.getBytes()}return r}o(jT,"_decodePkcs7Data");function tre(r,e,t,n){if(e=Y.fromDer(e,t),e.tagClass!==Y.Class.UNIVERSAL||e.type!==Y.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var s=0;s<e.value.length;s++){var i=e.value[s],a={},u=[];if(!Y.validate(i,CL,a,u)){var c=new Error("Cannot read ContentInfo.");throw c.errors=u,c}var f={encrypted:!1},h=null,m=a.content.value[0];switch(Y.derToOid(a.contentType)){case Qt.oids.data:if(m.tagClass!==Y.Class.UNIVERSAL||m.type!==Y.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");h=jT(m).value;break;case Qt.oids.encryptedData:h=rre(m,n),f.encrypted=!0;break;default:var c=new Error("Unsupported PKCS#12 contentType.");throw c.contentType=Y.derToOid(a.contentType),c}f.safeBags=nre(h,t,n),r.safeContents.push(f)}}o(tre,"_decodeAuthenticatedSafe");function rre(r,e){var t={},n=[];if(!Y.validate(r,Or.pkcs7.asn1.encryptedDataValidator,t,n)){var s=new Error("Cannot read EncryptedContentInfo.");throw s.errors=n,s}var i=Y.derToOid(t.contentType);if(i!==Qt.oids.data){var s=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw s.oid=i,s}i=Y.derToOid(t.encAlgorithm);var a=Qt.pbe.getCipher(i,t.encParameter,e),u=jT(t.encryptedContentAsn1),c=Or.util.createBuffer(u.value);if(a.update(c),!a.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return a.output.getBytes()}o(rre,"_decryptSafeContents");function nre(r,e,t){if(!e&&r.length===0)return[];if(r=Y.fromDer(r,e),r.tagClass!==Y.Class.UNIVERSAL||r.type!==Y.Type.SEQUENCE||r.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var n=[],s=0;s<r.value.length;s++){var i=r.value[s],a={},u=[];if(!Y.validate(i,Qte,a,u)){var c=new Error("Cannot read SafeBag.");throw c.errors=u,c}var f={type:Y.derToOid(a.bagId),attributes:sre(a.bagAttributes)};n.push(f);var h,m,g=a.bagValue.value[0];switch(f.type){case Qt.oids.pkcs8ShroudedKeyBag:if(g=Qt.decryptPrivateKeyInfo(g,t),g===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case Qt.oids.keyBag:try{f.key=Qt.privateKeyFromAsn1(g)}catch{f.key=null,f.asn1=g}continue;case Qt.oids.certBag:h=ere,m=o(function(){if(Y.derToOid(a.certId)!==Qt.oids.x509Certificate){var v=new Error("Unsupported certificate type, only X.509 supported.");throw v.oid=Y.derToOid(a.certId),v}var w=Y.fromDer(a.cert,e);try{f.cert=Qt.certificateFromAsn1(w,!0)}catch{f.cert=null,f.asn1=w}},"decoder");break;default:var c=new Error("Unsupported PKCS#12 SafeBag type.");throw c.oid=f.type,c}if(h!==void 0&&!Y.validate(g,h,a,u)){var c=new Error("Cannot read PKCS#12 "+h.name);throw c.errors=u,c}m()}return n}o(nre,"_decodeSafeContents");function sre(r){var e={};if(r!==void 0)for(var t=0;t<r.length;++t){var n={},s=[];if(!Y.validate(r[t],Zte,n,s)){var i=new Error("Cannot read PKCS#12 BagAttribute.");throw i.errors=s,i}var a=Y.derToOid(n.oid);if(Qt.oids[a]!==void 0){e[Qt.oids[a]]=[];for(var u=0;u<n.values.length;++u)e[Qt.oids[a]].push(n.values[u].value)}}return e}o(sre,"_decodeBagAttributes");Sg.toPkcs12Asn1=function(r,e,t,n){n=n||{},n.saltSize=n.saltSize||8,n.count=n.count||2048,n.algorithm=n.algorithm||n.encAlgorithm||"aes128","useMac"in n||(n.useMac=!0),"localKeyId"in n||(n.localKeyId=null),"generateLocalKeyId"in n||(n.generateLocalKeyId=!0);var s=n.localKeyId,i;if(s!==null)s=Or.util.hexToBytes(s);else if(n.generateLocalKeyId)if(e){var a=Or.util.isArray(e)?e[0]:e;typeof a=="string"&&(a=Qt.certificateFromPem(a));var u=Or.md.sha1.create();u.update(Y.toDer(Qt.certificateToAsn1(a)).getBytes()),s=u.digest().getBytes()}else s=Or.random.getBytes(20);var c=[];s!==null&&c.push(Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.localKeyId).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.SET,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,s)])])),"friendlyName"in n&&c.push(Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.friendlyName).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.SET,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.BMPSTRING,!1,n.friendlyName)])])),c.length>0&&(i=Y.create(Y.Class.UNIVERSAL,Y.Type.SET,!0,c));var f=[],h=[];e!==null&&(Or.util.isArray(e)?h=e:h=[e]);for(var m=[],g=0;g<h.length;++g){e=h[g],typeof e=="string"&&(e=Qt.certificateFromPem(e));var x=g===0?i:void 0,v=Qt.certificateToAsn1(e),w=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.certBag).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.x509Certificate).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,Y.toDer(v).getBytes())])])]),x]);m.push(w)}if(m.length>0){var S=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,m),A=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.data).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,Y.toDer(S).getBytes())])]);f.push(A)}var N=null;if(r!==null){var b=Qt.wrapRsaPrivateKey(Qt.privateKeyToAsn1(r));t===null?N=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.keyBag).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[b]),i]):N=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.pkcs8ShroudedKeyBag).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Qt.encryptPrivateKeyInfo(b,t,n)]),i]);var E=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[N]),C=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.data).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,Y.toDer(E).getBytes())])]);f.push(C)}var _=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,f),M;if(n.useMac){var u=Or.md.sha1.create(),R=new Or.util.ByteBuffer(Or.random.getBytes(n.saltSize)),q=n.count,r=Sg.generateKey(t,R,3,q,20),H=Or.hmac.create();H.start(u,r),H.update(Y.toDer(_).getBytes());var K=H.getMac();M=Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.sha1).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.NULL,!1,"")]),Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,K.getBytes())]),Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,R.getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Y.integerToDer(q).getBytes())])}return Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.INTEGER,!1,Y.integerToDer(3).getBytes()),Y.create(Y.Class.UNIVERSAL,Y.Type.SEQUENCE,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OID,!1,Y.oidToDer(Qt.oids.data).getBytes()),Y.create(Y.Class.CONTEXT_SPECIFIC,0,!0,[Y.create(Y.Class.UNIVERSAL,Y.Type.OCTETSTRING,!1,Y.toDer(_).getBytes())])]),M])};Sg.generateKey=Or.pbe.generatePkcs12Key});var qT=Q((Pxe,TL)=>{"use strict";var Xu=Xt();ia();qu();kT();$l();eS();FT();oS();xg();hr();lS();var MT=Xu.asn1,Rp=TL.exports=Xu.pki=Xu.pki||{};Rp.pemToDer=function(r){var e=Xu.pem.decode(r)[0];if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Xu.util.createBuffer(e.body)};Rp.privateKeyFromPem=function(r){var e=Xu.pem.decode(r)[0];if(e.type!=="PRIVATE KEY"&&e.type!=="RSA PRIVATE KEY"){var t=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=MT.fromDer(e.body);return Rp.privateKeyFromAsn1(n)};Rp.privateKeyToPem=function(r,e){var t={type:"RSA PRIVATE KEY",body:MT.toDer(Rp.privateKeyToAsn1(r)).getBytes()};return Xu.pem.encode(t,{maxline:e})};Rp.privateKeyInfoToPem=function(r,e){var t={type:"PRIVATE KEY",body:MT.toDer(r).getBytes()};return Xu.pem.encode(t,{maxline:e})}});var WT=Q((kxe,kL)=>{"use strict";var ke=Xt();ia();Ap();Jw();$l();qT();Ti();Ip();hr();var dS=o(function(r,e,t,n){var s=ke.util.createBuffer(),i=r.length>>1,a=i+(r.length&1),u=r.substr(0,a),c=r.substr(i,a),f=ke.util.createBuffer(),h=ke.hmac.create();t=e+t;var m=Math.ceil(n/16),g=Math.ceil(n/20);h.start("MD5",u);var x=ke.util.createBuffer();f.putBytes(t);for(var v=0;v<m;++v)h.start(null,null),h.update(f.getBytes()),f.putBuffer(h.digest()),h.start(null,null),h.update(f.bytes()+t),x.putBuffer(h.digest());h.start("SHA1",c);var w=ke.util.createBuffer();f.clear(),f.putBytes(t);for(var v=0;v<g;++v)h.start(null,null),h.update(f.getBytes()),f.putBuffer(h.digest()),h.start(null,null),h.update(f.bytes()+t),w.putBuffer(h.digest());return s.putBytes(ke.util.xorBytes(x.getBytes(),w.getBytes(),n)),s},"prf_TLS1"),ire=o(function(r,e,t){var n=ke.hmac.create();n.start("SHA1",r);var s=ke.util.createBuffer();return s.putInt32(e[0]),s.putInt32(e[1]),s.putByte(t.type),s.putByte(t.version.major),s.putByte(t.version.minor),s.putInt16(t.length),s.putBytes(t.fragment.bytes()),n.update(s.getBytes()),n.digest().getBytes()},"hmac_sha1"),are=o(function(r,e,t){var n=!1;try{var s=r.deflate(e.fragment.getBytes());e.fragment=ke.util.createBuffer(s),e.length=s.length,n=!0}catch{}return n},"deflate"),ore=o(function(r,e,t){var n=!1;try{var s=r.inflate(e.fragment.getBytes());e.fragment=ke.util.createBuffer(s),e.length=s.length,n=!0}catch{}return n},"inflate"),oi=o(function(r,e){var t=0;switch(e){case 1:t=r.getByte();break;case 2:t=r.getInt16();break;case 3:t=r.getInt24();break;case 4:t=r.getInt32();break}return ke.util.createBuffer(r.getBytes(t))},"readVector"),Di=o(function(r,e,t){r.putInt(t.length(),e<<3),r.putBuffer(t)},"writeVector"),U={};U.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};U.SupportedVersions=[U.Versions.TLS_1_1,U.Versions.TLS_1_0];U.Version=U.SupportedVersions[0];U.MaxFragment=15360;U.ConnectionEnd={server:0,client:1};U.PRFAlgorithm={tls_prf_sha256:0};U.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};U.CipherType={stream:0,block:1,aead:2};U.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};U.CompressionMethod={none:0,deflate:1};U.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};U.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};U.Alert={};U.Alert.Level={warning:1,fatal:2};U.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};U.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};U.CipherSuites={};U.getCipherSuite=function(r){var e=null;for(var t in U.CipherSuites){var n=U.CipherSuites[t];if(n.id[0]===r.charCodeAt(0)&&n.id[1]===r.charCodeAt(1)){e=n;break}}return e};U.handleUnexpected=function(r,e){var t=!r.open&&r.entity===U.ConnectionEnd.client;t||r.error(r,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.unexpected_message}})};U.handleHelloRequest=function(r,e,t){!r.handshaking&&r.handshakes>0&&(U.queue(r,U.createAlert(r,{level:U.Alert.Level.warning,description:U.Alert.Description.no_renegotiation})),U.flush(r)),r.process()};U.parseHelloMessage=function(r,e,t){var n=null,s=r.entity===U.ConnectionEnd.client;if(t<38)r.error(r,{message:s?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});else{var i=e.fragment,a=i.length();if(n={version:{major:i.getByte(),minor:i.getByte()},random:ke.util.createBuffer(i.getBytes(32)),session_id:oi(i,1),extensions:[]},s?(n.cipher_suite=i.getBytes(2),n.compression_method=i.getByte()):(n.cipher_suites=oi(i,2),n.compression_methods=oi(i,1)),a=t-(a-i.length()),a>0){for(var u=oi(i,2);u.length()>0;)n.extensions.push({type:[u.getByte(),u.getByte()],data:oi(u,2)});if(!s)for(var c=0;c<n.extensions.length;++c){var f=n.extensions[c];if(f.type[0]===0&&f.type[1]===0)for(var h=oi(f.data,2);h.length()>0;){var m=h.getByte();if(m!==0)break;r.session.extensions.server_name.serverNameList.push(oi(h,2).getBytes())}}}if(r.session.version&&(n.version.major!==r.session.version.major||n.version.minor!==r.session.version.minor))return r.error(r,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.protocol_version}});if(s)r.session.cipherSuite=U.getCipherSuite(n.cipher_suite);else for(var g=ke.util.createBuffer(n.cipher_suites.bytes());g.length()>0&&(r.session.cipherSuite=U.getCipherSuite(g.getBytes(2)),r.session.cipherSuite===null););if(r.session.cipherSuite===null)return r.error(r,{message:"No cipher suites in common.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.handshake_failure},cipherSuite:ke.util.bytesToHex(n.cipher_suite)});s?r.session.compressionMethod=n.compression_method:r.session.compressionMethod=U.CompressionMethod.none}return n};U.createSecurityParameters=function(r,e){var t=r.entity===U.ConnectionEnd.client,n=e.random.bytes(),s=t?r.session.sp.client_random:n,i=t?n:U.createRandom().getBytes();r.session.sp={entity:r.entity,prf_algorithm:U.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:r.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:s,server_random:i}};U.handleServerHello=function(r,e,t){var n=U.parseHelloMessage(r,e,t);if(!r.fail){if(n.version.minor<=r.version.minor)r.version.minor=n.version.minor;else return r.error(r,{message:"Incompatible TLS version.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.protocol_version}});r.session.version=r.version;var s=n.session_id.bytes();s.length>0&&s===r.session.id?(r.expect=BL,r.session.resuming=!0,r.session.sp.server_random=n.random.bytes()):(r.expect=cre,r.session.resuming=!1,U.createSecurityParameters(r,n)),r.session.id=s,r.process()}};U.handleClientHello=function(r,e,t){var n=U.parseHelloMessage(r,e,t);if(!r.fail){var s=n.session_id.bytes(),i=null;if(r.sessionCache&&(i=r.sessionCache.getSession(s),i===null?s="":(i.version.major!==n.version.major||i.version.minor>n.version.minor)&&(i=null,s="")),s.length===0&&(s=ke.random.getBytes(32)),r.session.id=s,r.session.clientHelloVersion=n.version,r.session.sp={},i)r.version=r.session.version=i.version,r.session.sp=i.sp;else{for(var a,u=1;u<U.SupportedVersions.length&&(a=U.SupportedVersions[u],!(a.minor<=n.version.minor));++u);r.version={major:a.major,minor:a.minor},r.session.version=r.version}i!==null?(r.expect=XT,r.session.resuming=!0,r.session.sp.client_random=n.random.bytes()):(r.expect=r.verifyClient!==!1?gre:$T,r.session.resuming=!1,U.createSecurityParameters(r,n)),r.open=!0,U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createServerHello(r)})),r.session.resuming?(U.queue(r,U.createRecord(r,{type:U.ContentType.change_cipher_spec,data:U.createChangeCipherSpec()})),r.state.pending=U.createConnectionState(r),r.state.current.write=r.state.pending.write,U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createFinished(r)}))):(U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createCertificate(r)})),r.fail||(U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createServerKeyExchange(r)})),r.verifyClient!==!1&&U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createCertificateRequest(r)})),U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createServerHelloDone(r)})))),U.flush(r),r.process()}};U.handleCertificate=function(r,e,t){if(t<3)return r.error(r,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});var n=e.fragment,s={certificate_list:oi(n,3)},i,a,u=[];try{for(;s.certificate_list.length()>0;)i=oi(s.certificate_list,3),a=ke.asn1.fromDer(i),i=ke.pki.certificateFromAsn1(a,!0),u.push(i)}catch(f){return r.error(r,{message:"Could not parse certificate list.",cause:f,send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.bad_certificate}})}var c=r.entity===U.ConnectionEnd.client;(c||r.verifyClient===!0)&&u.length===0?r.error(r,{message:c?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}}):u.length===0?r.expect=c?IL:$T:(c?r.session.serverCertificate=u[0]:r.session.clientCertificate=u[0],U.verifyCertificateChain(r,u)&&(r.expect=c?IL:$T)),r.process()};U.handleServerKeyExchange=function(r,e,t){if(t>0)return r.error(r,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.unsupported_certificate}});r.expect=lre,r.process()};U.handleClientKeyExchange=function(r,e,t){if(t<48)return r.error(r,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.unsupported_certificate}});var n=e.fragment,s={enc_pre_master_secret:oi(n,2).getBytes()},i=null;if(r.getPrivateKey)try{i=r.getPrivateKey(r,r.session.serverCertificate),i=ke.pki.privateKeyFromPem(i)}catch(c){r.error(r,{message:"Could not get private key.",cause:c,send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}})}if(i===null)return r.error(r,{message:"No private key set.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}});try{var a=r.session.sp;a.pre_master_secret=i.decrypt(s.enc_pre_master_secret);var u=r.session.clientHelloVersion;if(u.major!==a.pre_master_secret.charCodeAt(0)||u.minor!==a.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{a.pre_master_secret=ke.random.getBytes(48)}r.expect=XT,r.session.clientCertificate!==null&&(r.expect=vre),r.process()};U.handleCertificateRequest=function(r,e,t){if(t<3)return r.error(r,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});var n=e.fragment,s={certificate_types:oi(n,1),certificate_authorities:oi(n,2)};r.session.certificateRequest=s,r.expect=fre,r.process()};U.handleCertificateVerify=function(r,e,t){if(t<2)return r.error(r,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});var n=e.fragment;n.read-=4;var s=n.bytes();n.read+=4;var i={signature:oi(n,2).getBytes()},a=ke.util.createBuffer();a.putBuffer(r.session.md5.digest()),a.putBuffer(r.session.sha1.digest()),a=a.getBytes();try{var u=r.session.clientCertificate;if(!u.publicKey.verify(a,i.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");r.session.md5.update(s),r.session.sha1.update(s)}catch{return r.error(r,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.handshake_failure}})}r.expect=XT,r.process()};U.handleServerHelloDone=function(r,e,t){if(t>0)return r.error(r,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.record_overflow}});if(r.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.insufficient_security}},s=0,i=r.verify(r,n.alert.description,s,[]);if(i!==!0)return(i||i===0)&&(typeof i=="object"&&!ke.util.isArray(i)?(i.message&&(n.message=i.message),i.alert&&(n.alert.description=i.alert)):typeof i=="number"&&(n.alert.description=i)),r.error(r,n)}r.session.certificateRequest!==null&&(e=U.createRecord(r,{type:U.ContentType.handshake,data:U.createCertificate(r)}),U.queue(r,e)),e=U.createRecord(r,{type:U.ContentType.handshake,data:U.createClientKeyExchange(r)}),U.queue(r,e),r.expect=dre;var a=o(function(u,c){u.session.certificateRequest!==null&&u.session.clientCertificate!==null&&U.queue(u,U.createRecord(u,{type:U.ContentType.handshake,data:U.createCertificateVerify(u,c)})),U.queue(u,U.createRecord(u,{type:U.ContentType.change_cipher_spec,data:U.createChangeCipherSpec()})),u.state.pending=U.createConnectionState(u),u.state.current.write=u.state.pending.write,U.queue(u,U.createRecord(u,{type:U.ContentType.handshake,data:U.createFinished(u)})),u.expect=BL,U.flush(u),u.process()},"callback");if(r.session.certificateRequest===null||r.session.clientCertificate===null)return a(r,null);U.getClientSignature(r,a)};U.handleChangeCipherSpec=function(r,e){if(e.fragment.getByte()!==1)return r.error(r,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.illegal_parameter}});var t=r.entity===U.ConnectionEnd.client;(r.session.resuming&&t||!r.session.resuming&&!t)&&(r.state.pending=U.createConnectionState(r)),r.state.current.read=r.state.pending.read,(!r.session.resuming&&t||r.session.resuming&&!t)&&(r.state.pending=null),r.expect=t?hre:yre,r.process()};U.handleFinished=function(r,e,t){var n=e.fragment;n.read-=4;var s=n.bytes();n.read+=4;var i=e.fragment.getBytes();n=ke.util.createBuffer(),n.putBuffer(r.session.md5.digest()),n.putBuffer(r.session.sha1.digest());var a=r.entity===U.ConnectionEnd.client,u=a?"server finished":"client finished",c=r.session.sp,f=12,h=dS;if(n=h(c.master_secret,u,n.getBytes(),f),n.getBytes()!==i)return r.error(r,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.decrypt_error}});r.session.md5.update(s),r.session.sha1.update(s),(r.session.resuming&&a||!r.session.resuming&&!a)&&(U.queue(r,U.createRecord(r,{type:U.ContentType.change_cipher_spec,data:U.createChangeCipherSpec()})),r.state.current.write=r.state.pending.write,r.state.pending=null,U.queue(r,U.createRecord(r,{type:U.ContentType.handshake,data:U.createFinished(r)}))),r.expect=a?pre:xre,r.handshaking=!1,++r.handshakes,r.peerCertificate=a?r.session.serverCertificate:r.session.clientCertificate,U.flush(r),r.isConnected=!0,r.connected(r),r.process()};U.handleAlert=function(r,e){var t=e.fragment,n={level:t.getByte(),description:t.getByte()},s;switch(n.description){case U.Alert.Description.close_notify:s="Connection closed.";break;case U.Alert.Description.unexpected_message:s="Unexpected message.";break;case U.Alert.Description.bad_record_mac:s="Bad record MAC.";break;case U.Alert.Description.decryption_failed:s="Decryption failed.";break;case U.Alert.Description.record_overflow:s="Record overflow.";break;case U.Alert.Description.decompression_failure:s="Decompression failed.";break;case U.Alert.Description.handshake_failure:s="Handshake failure.";break;case U.Alert.Description.bad_certificate:s="Bad certificate.";break;case U.Alert.Description.unsupported_certificate:s="Unsupported certificate.";break;case U.Alert.Description.certificate_revoked:s="Certificate revoked.";break;case U.Alert.Description.certificate_expired:s="Certificate expired.";break;case U.Alert.Description.certificate_unknown:s="Certificate unknown.";break;case U.Alert.Description.illegal_parameter:s="Illegal parameter.";break;case U.Alert.Description.unknown_ca:s="Unknown certificate authority.";break;case U.Alert.Description.access_denied:s="Access denied.";break;case U.Alert.Description.decode_error:s="Decode error.";break;case U.Alert.Description.decrypt_error:s="Decrypt error.";break;case U.Alert.Description.export_restriction:s="Export restriction.";break;case U.Alert.Description.protocol_version:s="Unsupported protocol version.";break;case U.Alert.Description.insufficient_security:s="Insufficient security.";break;case U.Alert.Description.internal_error:s="Internal error.";break;case U.Alert.Description.user_canceled:s="User canceled.";break;case U.Alert.Description.no_renegotiation:s="Renegotiation not supported.";break;default:s="Unknown error.";break}if(n.description===U.Alert.Description.close_notify)return r.close();r.error(r,{message:s,send:!1,origin:r.entity===U.ConnectionEnd.client?"server":"client",alert:n}),r.process()};U.handleHandshake=function(r,e){var t=e.fragment,n=t.getByte(),s=t.getInt24();if(s>t.length())return r.fragmented=e,e.fragment=ke.util.createBuffer(),t.read-=4,r.process();r.fragmented=null,t.read-=4;var i=t.bytes(s+4);t.read+=4,n in pS[r.entity][r.expect]?(r.entity===U.ConnectionEnd.server&&!r.open&&!r.fail&&(r.handshaking=!0,r.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:ke.md.md5.create(),sha1:ke.md.sha1.create()}),n!==U.HandshakeType.hello_request&&n!==U.HandshakeType.certificate_verify&&n!==U.HandshakeType.finished&&(r.session.md5.update(i),r.session.sha1.update(i)),pS[r.entity][r.expect][n](r,e,s)):U.handleUnexpected(r,e)};U.handleApplicationData=function(r,e){r.data.putBuffer(e.fragment),r.dataReady(r),r.process()};U.handleHeartbeat=function(r,e){var t=e.fragment,n=t.getByte(),s=t.getInt16(),i=t.getBytes(s);if(n===U.HeartbeatMessageType.heartbeat_request){if(r.handshaking||s>i.length)return r.process();U.queue(r,U.createRecord(r,{type:U.ContentType.heartbeat,data:U.createHeartbeat(U.HeartbeatMessageType.heartbeat_response,i)})),U.flush(r)}else if(n===U.HeartbeatMessageType.heartbeat_response){if(i!==r.expectedHeartbeatPayload)return r.process();r.heartbeatReceived&&r.heartbeatReceived(r,ke.util.createBuffer(i))}r.process()};var ure=0,cre=1,IL=2,lre=3,fre=4,BL=5,hre=6,pre=7,dre=8,mre=0,gre=1,$T=2,vre=3,XT=4,yre=5,xre=6,V=U.handleUnexpected,DL=U.handleChangeCipherSpec,$n=U.handleAlert,Es=U.handleHandshake,RL=U.handleApplicationData,Xn=U.handleHeartbeat,GT=[];GT[U.ConnectionEnd.client]=[[V,$n,Es,V,Xn],[V,$n,Es,V,Xn],[V,$n,Es,V,Xn],[V,$n,Es,V,Xn],[V,$n,Es,V,Xn],[DL,$n,V,V,Xn],[V,$n,Es,V,Xn],[V,$n,Es,RL,Xn],[V,$n,Es,V,Xn]];GT[U.ConnectionEnd.server]=[[V,$n,Es,V,Xn],[V,$n,Es,V,Xn],[V,$n,Es,V,Xn],[V,$n,Es,V,Xn],[DL,$n,V,V,Xn],[V,$n,Es,V,Xn],[V,$n,Es,RL,Xn],[V,$n,Es,V,Xn]];var Gu=U.handleHelloRequest,wre=U.handleServerHello,OL=U.handleCertificate,_L=U.handleServerKeyExchange,HT=U.handleCertificateRequest,fS=U.handleServerHelloDone,PL=U.handleFinished,pS=[];pS[U.ConnectionEnd.client]=[[V,V,wre,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],[Gu,V,V,V,V,V,V,V,V,V,V,OL,_L,HT,fS,V,V,V,V,V,V],[Gu,V,V,V,V,V,V,V,V,V,V,V,_L,HT,fS,V,V,V,V,V,V],[Gu,V,V,V,V,V,V,V,V,V,V,V,V,HT,fS,V,V,V,V,V,V],[Gu,V,V,V,V,V,V,V,V,V,V,V,V,V,fS,V,V,V,V,V,V],[Gu,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],[Gu,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,PL],[Gu,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],[Gu,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V]];var Sre=U.handleClientHello,bre=U.handleClientKeyExchange,Ere=U.handleCertificateVerify;pS[U.ConnectionEnd.server]=[[V,Sre,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],[V,V,V,V,V,V,V,V,V,V,V,OL,V,V,V,V,V,V,V,V,V],[V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,bre,V,V,V,V],[V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,Ere,V,V,V,V,V],[V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],[V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,PL],[V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V],[V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V,V]];U.generateKeys=function(r,e){var t=dS,n=e.client_random+e.server_random;r.session.resuming||(e.master_secret=t(e.pre_master_secret,"master secret",n,48).bytes(),e.pre_master_secret=null),n=e.server_random+e.client_random;var s=2*e.mac_key_length+2*e.enc_key_length,i=r.version.major===U.Versions.TLS_1_0.major&&r.version.minor===U.Versions.TLS_1_0.minor;i&&(s+=2*e.fixed_iv_length);var a=t(e.master_secret,"key expansion",n,s),u={client_write_MAC_key:a.getBytes(e.mac_key_length),server_write_MAC_key:a.getBytes(e.mac_key_length),client_write_key:a.getBytes(e.enc_key_length),server_write_key:a.getBytes(e.enc_key_length)};return i&&(u.client_write_IV=a.getBytes(e.fixed_iv_length),u.server_write_IV=a.getBytes(e.fixed_iv_length)),u};U.createConnectionState=function(r){var e=r.entity===U.ConnectionEnd.client,t=o(function(){var i={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:o(function(a){return!0},"cipherFunction"),compressionState:null,compressFunction:o(function(a){return!0},"compressFunction"),updateSequenceNumber:o(function(){i.sequenceNumber[1]===4294967295?(i.sequenceNumber[1]=0,++i.sequenceNumber[0]):++i.sequenceNumber[1]},"updateSequenceNumber")};return i},"createMode"),n={read:t(),write:t()};if(n.read.update=function(i,a){return n.read.cipherFunction(a,n.read)?n.read.compressFunction(i,a,n.read)||i.error(i,{message:"Could not decompress record.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.decompression_failure}}):i.error(i,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.bad_record_mac}}),!i.fail},n.write.update=function(i,a){return n.write.compressFunction(i,a,n.write)?n.write.cipherFunction(a,n.write)||i.error(i,{message:"Could not encrypt record.",send:!1,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}}):i.error(i,{message:"Could not compress record.",send:!1,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}}),!i.fail},r.session){var s=r.session.sp;switch(r.session.cipherSuite.initSecurityParameters(s),s.keys=U.generateKeys(r,s),n.read.macKey=e?s.keys.server_write_MAC_key:s.keys.client_write_MAC_key,n.write.macKey=e?s.keys.client_write_MAC_key:s.keys.server_write_MAC_key,r.session.cipherSuite.initConnectionState(n,r,s),s.compression_algorithm){case U.CompressionMethod.none:break;case U.CompressionMethod.deflate:n.read.compressFunction=ore,n.write.compressFunction=are;break;default:throw new Error("Unsupported compression algorithm.")}}return n};U.createRandom=function(){var r=new Date,e=+r+r.getTimezoneOffset()*6e4,t=ke.util.createBuffer();return t.putInt32(e),t.putBytes(ke.random.getBytes(28)),t};U.createRecord=function(r,e){if(!e.data)return null;var t={type:e.type,version:{major:r.version.major,minor:r.version.minor},length:e.data.length(),fragment:e.data};return t};U.createAlert=function(r,e){var t=ke.util.createBuffer();return t.putByte(e.level),t.putByte(e.description),U.createRecord(r,{type:U.ContentType.alert,data:t})};U.createClientHello=function(r){r.session.clientHelloVersion={major:r.version.major,minor:r.version.minor};for(var e=ke.util.createBuffer(),t=0;t<r.cipherSuites.length;++t){var n=r.cipherSuites[t];e.putByte(n.id[0]),e.putByte(n.id[1])}var s=e.length(),i=ke.util.createBuffer();i.putByte(U.CompressionMethod.none);var a=i.length(),u=ke.util.createBuffer();if(r.virtualHost){var c=ke.util.createBuffer();c.putByte(0),c.putByte(0);var f=ke.util.createBuffer();f.putByte(0),Di(f,2,ke.util.createBuffer(r.virtualHost));var h=ke.util.createBuffer();Di(h,2,f),Di(c,2,h),u.putBuffer(c)}var m=u.length();m>0&&(m+=2);var g=r.session.id,x=g.length+1+2+4+28+2+s+1+a+m,v=ke.util.createBuffer();return v.putByte(U.HandshakeType.client_hello),v.putInt24(x),v.putByte(r.version.major),v.putByte(r.version.minor),v.putBytes(r.session.sp.client_random),Di(v,1,ke.util.createBuffer(g)),Di(v,2,e),Di(v,1,i),m>0&&Di(v,2,u),v};U.createServerHello=function(r){var e=r.session.id,t=e.length+1+2+4+28+2+1,n=ke.util.createBuffer();return n.putByte(U.HandshakeType.server_hello),n.putInt24(t),n.putByte(r.version.major),n.putByte(r.version.minor),n.putBytes(r.session.sp.server_random),Di(n,1,ke.util.createBuffer(e)),n.putByte(r.session.cipherSuite.id[0]),n.putByte(r.session.cipherSuite.id[1]),n.putByte(r.session.compressionMethod),n};U.createCertificate=function(r){var e=r.entity===U.ConnectionEnd.client,t=null;if(r.getCertificate){var n;e?n=r.session.certificateRequest:n=r.session.extensions.server_name.serverNameList,t=r.getCertificate(r,n)}var s=ke.util.createBuffer();if(t!==null)try{ke.util.isArray(t)||(t=[t]);for(var i=null,a=0;a<t.length;++a){var u=ke.pem.decode(t[a])[0];if(u.type!=="CERTIFICATE"&&u.type!=="X509 CERTIFICATE"&&u.type!=="TRUSTED CERTIFICATE"){var c=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw c.headerType=u.type,c}if(u.procType&&u.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var f=ke.util.createBuffer(u.body);i===null&&(i=ke.asn1.fromDer(f.bytes(),!1));var h=ke.util.createBuffer();Di(h,3,f),s.putBuffer(h)}t=ke.pki.certificateFromAsn1(i),e?r.session.clientCertificate=t:r.session.serverCertificate=t}catch(x){return r.error(r,{message:"Could not send certificate list.",cause:x,send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.bad_certificate}})}var m=3+s.length(),g=ke.util.createBuffer();return g.putByte(U.HandshakeType.certificate),g.putInt24(m),Di(g,3,s),g};U.createClientKeyExchange=function(r){var e=ke.util.createBuffer();e.putByte(r.session.clientHelloVersion.major),e.putByte(r.session.clientHelloVersion.minor),e.putBytes(ke.random.getBytes(46));var t=r.session.sp;t.pre_master_secret=e.getBytes();var n=r.session.serverCertificate.publicKey;e=n.encrypt(t.pre_master_secret);var s=e.length+2,i=ke.util.createBuffer();return i.putByte(U.HandshakeType.client_key_exchange),i.putInt24(s),i.putInt16(e.length),i.putBytes(e),i};U.createServerKeyExchange=function(r){var e=0,t=ke.util.createBuffer();return e>0&&(t.putByte(U.HandshakeType.server_key_exchange),t.putInt24(e)),t};U.getClientSignature=function(r,e){var t=ke.util.createBuffer();t.putBuffer(r.session.md5.digest()),t.putBuffer(r.session.sha1.digest()),t=t.getBytes(),r.getSignature=r.getSignature||function(n,s,i){var a=null;if(n.getPrivateKey)try{a=n.getPrivateKey(n,n.session.clientCertificate),a=ke.pki.privateKeyFromPem(a)}catch(u){n.error(n,{message:"Could not get private key.",cause:u,send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}})}a===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.internal_error}}):s=a.sign(s,null),i(n,s)},r.getSignature(r,t,e)};U.createCertificateVerify=function(r,e){var t=e.length+2,n=ke.util.createBuffer();return n.putByte(U.HandshakeType.certificate_verify),n.putInt24(t),n.putInt16(e.length),n.putBytes(e),n};U.createCertificateRequest=function(r){var e=ke.util.createBuffer();e.putByte(1);var t=ke.util.createBuffer();for(var n in r.caStore.certs){var s=r.caStore.certs[n],i=ke.pki.distinguishedNameToAsn1(s.subject),a=ke.asn1.toDer(i);t.putInt16(a.length()),t.putBuffer(a)}var u=1+e.length()+2+t.length(),c=ke.util.createBuffer();return c.putByte(U.HandshakeType.certificate_request),c.putInt24(u),Di(c,1,e),Di(c,2,t),c};U.createServerHelloDone=function(r){var e=ke.util.createBuffer();return e.putByte(U.HandshakeType.server_hello_done),e.putInt24(0),e};U.createChangeCipherSpec=function(){var r=ke.util.createBuffer();return r.putByte(1),r};U.createFinished=function(r){var e=ke.util.createBuffer();e.putBuffer(r.session.md5.digest()),e.putBuffer(r.session.sha1.digest());var t=r.entity===U.ConnectionEnd.client,n=r.session.sp,s=12,i=dS,a=t?"client finished":"server finished";e=i(n.master_secret,a,e.getBytes(),s);var u=ke.util.createBuffer();return u.putByte(U.HandshakeType.finished),u.putInt24(e.length()),u.putBuffer(e),u};U.createHeartbeat=function(r,e,t){typeof t>"u"&&(t=e.length);var n=ke.util.createBuffer();n.putByte(r),n.putInt16(t),n.putBytes(e);var s=n.length(),i=Math.max(16,s-t-3);return n.putBytes(ke.random.getBytes(i)),n};U.queue=function(r,e){if(e&&!(e.fragment.length()===0&&(e.type===U.ContentType.handshake||e.type===U.ContentType.alert||e.type===U.ContentType.change_cipher_spec))){if(e.type===U.ContentType.handshake){var t=e.fragment.bytes();r.session.md5.update(t),r.session.sha1.update(t),t=null}var n;if(e.fragment.length()<=U.MaxFragment)n=[e];else{n=[];for(var s=e.fragment.bytes();s.length>U.MaxFragment;)n.push(U.createRecord(r,{type:e.type,data:ke.util.createBuffer(s.slice(0,U.MaxFragment))})),s=s.slice(U.MaxFragment);s.length>0&&n.push(U.createRecord(r,{type:e.type,data:ke.util.createBuffer(s)}))}for(var i=0;i<n.length&&!r.fail;++i){var a=n[i],u=r.state.current.write;u.update(r,a)&&r.records.push(a)}}};U.flush=function(r){for(var e=0;e<r.records.length;++e){var t=r.records[e];r.tlsData.putByte(t.type),r.tlsData.putByte(t.version.major),r.tlsData.putByte(t.version.minor),r.tlsData.putInt16(t.fragment.length()),r.tlsData.putBuffer(r.records[e].fragment)}return r.records=[],r.tlsDataReady(r)};var KT=o(function(r){switch(r){case!0:return!0;case ke.pki.certificateError.bad_certificate:return U.Alert.Description.bad_certificate;case ke.pki.certificateError.unsupported_certificate:return U.Alert.Description.unsupported_certificate;case ke.pki.certificateError.certificate_revoked:return U.Alert.Description.certificate_revoked;case ke.pki.certificateError.certificate_expired:return U.Alert.Description.certificate_expired;case ke.pki.certificateError.certificate_unknown:return U.Alert.Description.certificate_unknown;case ke.pki.certificateError.unknown_ca:return U.Alert.Description.unknown_ca;default:return U.Alert.Description.bad_certificate}},"_certErrorToAlertDesc"),Are=o(function(r){switch(r){case!0:return!0;case U.Alert.Description.bad_certificate:return ke.pki.certificateError.bad_certificate;case U.Alert.Description.unsupported_certificate:return ke.pki.certificateError.unsupported_certificate;case U.Alert.Description.certificate_revoked:return ke.pki.certificateError.certificate_revoked;case U.Alert.Description.certificate_expired:return ke.pki.certificateError.certificate_expired;case U.Alert.Description.certificate_unknown:return ke.pki.certificateError.certificate_unknown;case U.Alert.Description.unknown_ca:return ke.pki.certificateError.unknown_ca;default:return ke.pki.certificateError.bad_certificate}},"_alertDescToCertError");U.verifyCertificateChain=function(r,e){try{var t={};for(var n in r.verifyOptions)t[n]=r.verifyOptions[n];t.verify=function(i,a,u){var c=KT(i),f=r.verify(r,i,a,u);if(f!==!0){if(typeof f=="object"&&!ke.util.isArray(f)){var h=new Error("The application rejected the certificate.");throw h.send=!0,h.alert={level:U.Alert.Level.fatal,description:U.Alert.Description.bad_certificate},f.message&&(h.message=f.message),f.alert&&(h.alert.description=f.alert),h}f!==i&&(f=Are(f))}return f},ke.pki.verifyCertificateChain(r.caStore,e,t)}catch(i){var s=i;(typeof s!="object"||ke.util.isArray(s))&&(s={send:!0,alert:{level:U.Alert.Level.fatal,description:KT(i)}}),"send"in s||(s.send=!0),"alert"in s||(s.alert={level:U.Alert.Level.fatal,description:KT(s.error)}),r.error(r,s)}return!r.fail};U.createSessionCache=function(r,e){var t=null;if(r&&r.getSession&&r.setSession&&r.order)t=r;else{t={},t.cache=r||{},t.capacity=Math.max(e||100,1),t.order=[];for(var n in r)t.order.length<=e?t.order.push(n):delete r[n];t.getSession=function(s){var i=null,a=null;if(s?a=ke.util.bytesToHex(s):t.order.length>0&&(a=t.order[0]),a!==null&&a in t.cache){i=t.cache[a],delete t.cache[a];for(var u in t.order)if(t.order[u]===a){t.order.splice(u,1);break}}return i},t.setSession=function(s,i){if(t.order.length===t.capacity){var a=t.order.shift();delete t.cache[a]}var a=ke.util.bytesToHex(s);t.order.push(a),t.cache[a]=i}}return t};U.createConnection=function(r){var e=null;r.caStore?ke.util.isArray(r.caStore)?e=ke.pki.createCaStore(r.caStore):e=r.caStore:e=ke.pki.createCaStore();var t=r.cipherSuites||null;if(t===null){t=[];for(var n in U.CipherSuites)t.push(U.CipherSuites[n])}var s=r.server?U.ConnectionEnd.server:U.ConnectionEnd.client,i=r.sessionCache?U.createSessionCache(r.sessionCache):null,a={version:{major:U.Version.major,minor:U.Version.minor},entity:s,sessionId:r.sessionId,caStore:e,sessionCache:i,cipherSuites:t,connected:r.connected,virtualHost:r.virtualHost||null,verifyClient:r.verifyClient||!1,verify:r.verify||function(h,m,g,x){return m},verifyOptions:r.verifyOptions||{},getCertificate:r.getCertificate||null,getPrivateKey:r.getPrivateKey||null,getSignature:r.getSignature||null,input:ke.util.createBuffer(),tlsData:ke.util.createBuffer(),data:ke.util.createBuffer(),tlsDataReady:r.tlsDataReady,dataReady:r.dataReady,heartbeatReceived:r.heartbeatReceived,closed:r.closed,error:o(function(h,m){m.origin=m.origin||(h.entity===U.ConnectionEnd.client?"client":"server"),m.send&&(U.queue(h,U.createAlert(h,m.alert)),U.flush(h));var g=m.fatal!==!1;g&&(h.fail=!0),r.error(h,m),g&&h.close(!1)},"error"),deflate:r.deflate||null,inflate:r.inflate||null};a.reset=function(h){a.version={major:U.Version.major,minor:U.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=a.entity===U.ConnectionEnd.client?ure:mre,a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(h||typeof h>"u"),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=U.createConnectionState(a)},a.reset();var u=o(function(h,m){var g=m.type-U.ContentType.change_cipher_spec,x=GT[h.entity][h.expect];g in x?x[g](h,m):U.handleUnexpected(h,m)},"_update"),c=o(function(h){var m=0,g=h.input,x=g.length();if(x<5)m=5-x;else{h.record={type:g.getByte(),version:{major:g.getByte(),minor:g.getByte()},length:g.getInt16(),fragment:ke.util.createBuffer(),ready:!1};var v=h.record.version.major===h.version.major;v&&h.session&&h.session.version&&(v=h.record.version.minor===h.version.minor),v||h.error(h,{message:"Incompatible TLS version.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.protocol_version}})}return m},"_readRecordHeader"),f=o(function(h){var m=0,g=h.input,x=g.length();if(x<h.record.length)m=h.record.length-x;else{h.record.fragment.putBytes(g.getBytes(h.record.length)),g.compact();var v=h.state.current.read;v.update(h,h.record)&&(h.fragmented!==null&&(h.fragmented.type===h.record.type?(h.fragmented.fragment.putBuffer(h.record.fragment),h.record=h.fragmented):h.error(h,{message:"Invalid fragmented record.",send:!0,alert:{level:U.Alert.Level.fatal,description:U.Alert.Description.unexpected_message}})),h.record.ready=!0)}return m},"_readRecord");return a.handshake=function(h){if(a.entity!==U.ConnectionEnd.client)a.error(a,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(a.handshaking)a.error(a,{message:"Handshake already in progress.",fatal:!1});else{a.fail&&!a.open&&a.handshakes===0&&(a.fail=!1),a.handshaking=!0,h=h||"";var m=null;h.length>0&&(a.sessionCache&&(m=a.sessionCache.getSession(h)),m===null&&(h="")),h.length===0&&a.sessionCache&&(m=a.sessionCache.getSession(),m!==null&&(h=m.id)),a.session={id:h,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:ke.md.md5.create(),sha1:ke.md.sha1.create()},m&&(a.version=m.version,a.session.sp=m.sp),a.session.sp.client_random=U.createRandom().getBytes(),a.open=!0,U.queue(a,U.createRecord(a,{type:U.ContentType.handshake,data:U.createClientHello(a)})),U.flush(a)}},a.process=function(h){var m=0;return h&&a.input.putBytes(h),a.fail||(a.record!==null&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),a.record===null&&(m=c(a)),!a.fail&&a.record!==null&&!a.record.ready&&(m=f(a)),!a.fail&&a.record!==null&&a.record.ready&&u(a,a.record)),m},a.prepare=function(h){return U.queue(a,U.createRecord(a,{type:U.ContentType.application_data,data:ke.util.createBuffer(h)})),U.flush(a)},a.prepareHeartbeatRequest=function(h,m){return h instanceof ke.util.ByteBuffer&&(h=h.bytes()),typeof m>"u"&&(m=h.length),a.expectedHeartbeatPayload=h,U.queue(a,U.createRecord(a,{type:U.ContentType.heartbeat,data:U.createHeartbeat(U.HeartbeatMessageType.heartbeat_request,h,m)})),U.flush(a)},a.close=function(h){if(!a.fail&&a.sessionCache&&a.session){var m={id:a.session.id,version:a.session.version,sp:a.session.sp};m.sp.keys=null,a.sessionCache.setSession(m.id,m)}a.open&&(a.open=!1,a.input.clear(),(a.isConnected||a.handshaking)&&(a.isConnected=a.handshaking=!1,U.queue(a,U.createAlert(a,{level:U.Alert.Level.warning,description:U.Alert.Description.close_notify})),U.flush(a)),a.closed(a)),a.reset(h)},a};kL.exports=ke.tls=ke.tls||{};for(hS in U)typeof U[hS]!="function"&&(ke.tls[hS]=U[hS]);var hS;ke.tls.prf_tls1=dS;ke.tls.hmac_sha1=ire;ke.tls.createSessionCache=U.createSessionCache;ke.tls.createConnection=U.createConnection});var UL=Q((Vxe,VL)=>{"use strict";var Wu=Xt();Mu();WT();var Ri=VL.exports=Wu.tls;Ri.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:o(function(r){r.bulk_cipher_algorithm=Ri.BulkCipherAlgorithm.aes,r.cipher_type=Ri.CipherType.block,r.enc_key_length=16,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=Ri.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},"initSecurityParameters"),initConnectionState:LL};Ri.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:o(function(r){r.bulk_cipher_algorithm=Ri.BulkCipherAlgorithm.aes,r.cipher_type=Ri.CipherType.block,r.enc_key_length=32,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=Ri.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},"initSecurityParameters"),initConnectionState:LL};function LL(r,e,t){var n=e.entity===Wu.tls.ConnectionEnd.client;r.read.cipherState={init:!1,cipher:Wu.cipher.createDecipher("AES-CBC",n?t.keys.server_write_key:t.keys.client_write_key),iv:n?t.keys.server_write_IV:t.keys.client_write_IV},r.write.cipherState={init:!1,cipher:Wu.cipher.createCipher("AES-CBC",n?t.keys.client_write_key:t.keys.server_write_key),iv:n?t.keys.client_write_IV:t.keys.server_write_IV},r.read.cipherFunction=Ire,r.write.cipherFunction=Cre,r.read.macLength=r.write.macLength=t.mac_length,r.read.macFunction=r.write.macFunction=Ri.hmac_sha1}o(LL,"initConnectionState");function Cre(r,e){var t=!1,n=e.macFunction(e.macKey,e.sequenceNumber,r);r.fragment.putBytes(n),e.updateSequenceNumber();var s;r.version.minor===Ri.Versions.TLS_1_0.minor?s=e.cipherState.init?null:e.cipherState.iv:s=Wu.random.getBytesSync(16),e.cipherState.init=!0;var i=e.cipherState.cipher;return i.start({iv:s}),r.version.minor>=Ri.Versions.TLS_1_1.minor&&i.output.putBytes(s),i.update(r.fragment),i.finish(Nre)&&(r.fragment=i.output,r.length=r.fragment.length(),t=!0),t}o(Cre,"encrypt_aes_cbc_sha1");function Nre(r,e,t){if(!t){var n=r-e.length()%r;e.fillWithByte(n-1,n)}return!0}o(Nre,"encrypt_aes_cbc_sha1_padding");function Tre(r,e,t){var n=!0;if(t){for(var s=e.length(),i=e.last(),a=s-1-i;a<s-1;++a)n=n&&e.at(a)==i;n&&e.truncate(i+1)}return n}o(Tre,"decrypt_aes_cbc_sha1_padding");function Ire(r,e){var t=!1,n;r.version.minor===Ri.Versions.TLS_1_0.minor?n=e.cipherState.init?null:e.cipherState.iv:n=r.fragment.getBytes(16),e.cipherState.init=!0;var s=e.cipherState.cipher;s.start({iv:n}),s.update(r.fragment),t=s.finish(Tre);var i=e.macLength,a=Wu.random.getBytesSync(i),u=s.output.length();u>=i?(r.fragment=s.output.getBytes(u-i),a=s.output.getBytes(i)):r.fragment=s.output.getBytes(),r.fragment=Wu.util.createBuffer(r.fragment),r.length=r.fragment.length();var c=e.macFunction(e.macKey,e.sequenceNumber,r);return e.updateSequenceNumber(),t=_re(e.macKey,a,c)&&t,t}o(Ire,"decrypt_aes_cbc_sha1");function _re(r,e,t){var n=Wu.hmac.create();return n.start("SHA1",r),n.update(e),e=n.digest().getBytes(),n.start(null,null),n.update(t),t=n.digest().getBytes(),e===t}o(_re,"compareMacs")});var YT=Q((jxe,qL)=>{"use strict";var Mr=Xt();Pa();hr();var bg=qL.exports=Mr.sha512=Mr.sha512||{};Mr.md.sha512=Mr.md.algorithms.sha512=bg;var FL=Mr.sha384=Mr.sha512.sha384=Mr.sha512.sha384||{};FL.create=function(){return bg.create("SHA-384")};Mr.md.sha384=Mr.md.algorithms.sha384=FL;Mr.sha512.sha256=Mr.sha512.sha256||{create:o(function(){return bg.create("SHA-512/256")},"create")};Mr.md["sha512/256"]=Mr.md.algorithms["sha512/256"]=Mr.sha512.sha256;Mr.sha512.sha224=Mr.sha512.sha224||{create:o(function(){return bg.create("SHA-512/224")},"create")};Mr.md["sha512/224"]=Mr.md.algorithms["sha512/224"]=Mr.sha512.sha224;bg.create=function(r){if(ML||Bre(),typeof r>"u"&&(r="SHA-512"),!(r in Yl))throw new Error("Invalid SHA-512 algorithm: "+r);for(var e=Yl[r],t=null,n=Mr.util.createBuffer(),s=new Array(80),i=0;i<80;++i)s[i]=new Array(2);var a=64;switch(r){case"SHA-384":a=48;break;case"SHA-512/256":a=32;break;case"SHA-512/224":a=28;break}var u={algorithm:r.replace("-","").toLowerCase(),blockLength:128,digestLength:a,messageLength:0,fullMessageLength:null,messageLengthSize:16};return u.start=function(){u.messageLength=0,u.fullMessageLength=u.messageLength128=[];for(var c=u.messageLengthSize/4,f=0;f<c;++f)u.fullMessageLength.push(0);n=Mr.util.createBuffer(),t=new Array(e.length);for(var f=0;f<e.length;++f)t[f]=e[f].slice(0);return u},u.start(),u.update=function(c,f){f==="utf8"&&(c=Mr.util.encodeUtf8(c));var h=c.length;u.messageLength+=h,h=[h/4294967296>>>0,h>>>0];for(var m=u.fullMessageLength.length-1;m>=0;--m)u.fullMessageLength[m]+=h[1],h[1]=h[0]+(u.fullMessageLength[m]/4294967296>>>0),u.fullMessageLength[m]=u.fullMessageLength[m]>>>0,h[0]=h[1]/4294967296>>>0;return n.putBytes(c),jL(t,s,n),(n.read>2048||n.length()===0)&&n.compact(),u},u.digest=function(){var c=Mr.util.createBuffer();c.putBytes(n.bytes());var f=u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize,h=f&u.blockLength-1;c.putBytes(zT.substr(0,u.blockLength-h));for(var m,g,x=u.fullMessageLength[0]*8,v=0;v<u.fullMessageLength.length-1;++v)m=u.fullMessageLength[v+1]*8,g=m/4294967296>>>0,x+=g,c.putInt32(x>>>0),x=m>>>0;c.putInt32(x);for(var w=new Array(t.length),v=0;v<t.length;++v)w[v]=t[v].slice(0);jL(w,s,c);var S=Mr.util.createBuffer(),A;r==="SHA-512"?A=w.length:r==="SHA-384"?A=w.length-2:A=w.length-4;for(var v=0;v<A;++v)S.putInt32(w[v][0]),(v!==A-1||r!=="SHA-512/224")&&S.putInt32(w[v][1]);return S},u};var zT=null,ML=!1,JT=null,Yl=null;function Bre(){zT="\x80",zT+=Mr.util.fillString("\0",128),JT=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],Yl={},Yl["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],Yl["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],Yl["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],Yl["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],ML=!0}o(Bre,"_init");function jL(r,e,t){for(var n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,N,b,E,C,_,M,R,q,H,K,G,pe,le,ue,ee,he,we,Ke,Ae,xe,je=t.length();je>=128;){for(ue=0;ue<16;++ue)e[ue][0]=t.getInt32()>>>0,e[ue][1]=t.getInt32()>>>0;for(;ue<80;++ue)we=e[ue-2],ee=we[0],he=we[1],n=((ee>>>19|he<<13)^(he>>>29|ee<<3)^ee>>>6)>>>0,s=((ee<<13|he>>>19)^(he<<3|ee>>>29)^(ee<<26|he>>>6))>>>0,Ae=e[ue-15],ee=Ae[0],he=Ae[1],i=((ee>>>1|he<<31)^(ee>>>8|he<<24)^ee>>>7)>>>0,a=((ee<<31|he>>>1)^(ee<<24|he>>>8)^(ee<<25|he>>>7))>>>0,Ke=e[ue-7],xe=e[ue-16],he=s+Ke[1]+a+xe[1],e[ue][0]=n+Ke[0]+i+xe[0]+(he/4294967296>>>0)>>>0,e[ue][1]=he>>>0;for(w=r[0][0],S=r[0][1],A=r[1][0],N=r[1][1],b=r[2][0],E=r[2][1],C=r[3][0],_=r[3][1],M=r[4][0],R=r[4][1],q=r[5][0],H=r[5][1],K=r[6][0],G=r[6][1],pe=r[7][0],le=r[7][1],ue=0;ue<80;++ue)f=((M>>>14|R<<18)^(M>>>18|R<<14)^(R>>>9|M<<23))>>>0,h=((M<<18|R>>>14)^(M<<14|R>>>18)^(R<<23|M>>>9))>>>0,m=(K^M&(q^K))>>>0,g=(G^R&(H^G))>>>0,u=((w>>>28|S<<4)^(S>>>2|w<<30)^(S>>>7|w<<25))>>>0,c=((w<<4|S>>>28)^(S<<30|w>>>2)^(S<<25|w>>>7))>>>0,x=(w&A|b&(w^A))>>>0,v=(S&N|E&(S^N))>>>0,he=le+h+g+JT[ue][1]+e[ue][1],n=pe+f+m+JT[ue][0]+e[ue][0]+(he/4294967296>>>0)>>>0,s=he>>>0,he=c+v,i=u+x+(he/4294967296>>>0)>>>0,a=he>>>0,pe=K,le=G,K=q,G=H,q=M,H=R,he=_+s,M=C+n+(he/4294967296>>>0)>>>0,R=he>>>0,C=b,_=E,b=A,E=N,A=w,N=S,he=s+a,w=n+i+(he/4294967296>>>0)>>>0,S=he>>>0;he=r[0][1]+S,r[0][0]=r[0][0]+w+(he/4294967296>>>0)>>>0,r[0][1]=he>>>0,he=r[1][1]+N,r[1][0]=r[1][0]+A+(he/4294967296>>>0)>>>0,r[1][1]=he>>>0,he=r[2][1]+E,r[2][0]=r[2][0]+b+(he/4294967296>>>0)>>>0,r[2][1]=he>>>0,he=r[3][1]+_,r[3][0]=r[3][0]+C+(he/4294967296>>>0)>>>0,r[3][1]=he>>>0,he=r[4][1]+R,r[4][0]=r[4][0]+M+(he/4294967296>>>0)>>>0,r[4][1]=he>>>0,he=r[5][1]+H,r[5][0]=r[5][0]+q+(he/4294967296>>>0)>>>0,r[5][1]=he>>>0,he=r[6][1]+G,r[6][0]=r[6][0]+K+(he/4294967296>>>0)>>>0,r[6][1]=he>>>0,he=r[7][1]+le,r[7][0]=r[7][0]+pe+(he/4294967296>>>0)>>>0,r[7][1]=he>>>0,je-=128}}o(jL,"_update")});var HL=Q(QT=>{"use strict";var Dre=Xt();ia();var On=Dre.asn1;QT.privateKeyValidator={name:"PrivateKeyInfo",tagClass:On.Class.UNIVERSAL,type:On.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:On.Class.UNIVERSAL,type:On.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:On.Class.UNIVERSAL,type:On.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:On.Class.UNIVERSAL,type:On.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:On.Class.UNIVERSAL,type:On.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};QT.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:On.Class.UNIVERSAL,type:On.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:On.Class.UNIVERSAL,type:On.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:On.Class.UNIVERSAL,type:On.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:On.Class.UNIVERSAL,type:On.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var r8=Q((qxe,t8)=>{"use strict";var Gn=Xt();yg();Ti();YT();hr();var zL=HL(),Rre=zL.publicKeyValidator,Ore=zL.privateKeyValidator;typeof KL>"u"&&(KL=Gn.jsbn.BigInteger);var KL,tI=Gn.util.ByteBuffer,Ls=typeof Buffer>"u"?Uint8Array:Buffer;Gn.pki=Gn.pki||{};t8.exports=Gn.pki.ed25519=Gn.ed25519=Gn.ed25519||{};var Zt=Gn.ed25519;Zt.constants={};Zt.constants.PUBLIC_KEY_BYTE_LENGTH=32;Zt.constants.PRIVATE_KEY_BYTE_LENGTH=64;Zt.constants.SEED_BYTE_LENGTH=32;Zt.constants.SIGN_BYTE_LENGTH=64;Zt.constants.HASH_BYTE_LENGTH=64;Zt.generateKeyPair=function(r){r=r||{};var e=r.seed;if(e===void 0)e=Gn.random.getBytesSync(Zt.constants.SEED_BYTE_LENGTH);else if(typeof e=="string"){if(e.length!==Zt.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+Zt.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(e instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');e=Lo({message:e,encoding:"binary"});for(var t=new Ls(Zt.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Ls(Zt.constants.PRIVATE_KEY_BYTE_LENGTH),s=0;s<32;++s)n[s]=e[s];return Vre(t,n),{publicKey:t,privateKey:n}};Zt.privateKeyFromAsn1=function(r){var e={},t=[],n=Gn.asn1.validate(r,Ore,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Gn.asn1.derToOid(e.privateKeyOid),a=Gn.oids.EdDSA25519;if(i!==a)throw new Error('Invalid OID "'+i+'"; OID must be "'+a+'".');var u=e.privateKey,c=Lo({message:Gn.asn1.fromDer(u).value,encoding:"binary"});return{privateKeyBytes:c}};Zt.publicKeyFromAsn1=function(r){var e={},t=[],n=Gn.asn1.validate(r,Rre,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Gn.asn1.derToOid(e.publicKeyOid),a=Gn.oids.EdDSA25519;if(i!==a)throw new Error('Invalid OID "'+i+'"; OID must be "'+a+'".');var u=e.ed25519PublicKey;if(u.length!==Zt.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return Lo({message:u,encoding:"binary"})};Zt.publicKeyFromPrivateKey=function(r){r=r||{};var e=Lo({message:r.privateKey,encoding:"binary"});if(e.length!==Zt.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Zt.constants.PRIVATE_KEY_BYTE_LENGTH);for(var t=new Ls(Zt.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<t.length;++n)t[n]=e[32+n];return t};Zt.sign=function(r){r=r||{};var e=Lo(r),t=Lo({message:r.privateKey,encoding:"binary"});if(t.length===Zt.constants.SEED_BYTE_LENGTH){var n=Zt.generateKeyPair({seed:t});t=n.privateKey}else if(t.length!==Zt.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Zt.constants.SEED_BYTE_LENGTH+" or "+Zt.constants.PRIVATE_KEY_BYTE_LENGTH);var s=new Ls(Zt.constants.SIGN_BYTE_LENGTH+e.length);Ure(s,e,e.length,t);for(var i=new Ls(Zt.constants.SIGN_BYTE_LENGTH),a=0;a<i.length;++a)i[a]=s[a];return i};Zt.verify=function(r){r=r||{};var e=Lo(r);if(r.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var t=Lo({message:r.signature,encoding:"binary"});if(t.length!==Zt.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+Zt.constants.SIGN_BYTE_LENGTH);var n=Lo({message:r.publicKey,encoding:"binary"});if(n.length!==Zt.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+Zt.constants.PUBLIC_KEY_BYTE_LENGTH);var s=new Ls(Zt.constants.SIGN_BYTE_LENGTH+e.length),i=new Ls(Zt.constants.SIGN_BYTE_LENGTH+e.length),a;for(a=0;a<Zt.constants.SIGN_BYTE_LENGTH;++a)s[a]=t[a];for(a=0;a<e.length;++a)s[a+Zt.constants.SIGN_BYTE_LENGTH]=e[a];return jre(i,s,s.length,n)>=0};function Lo(r){var e=r.message;if(e instanceof Uint8Array||e instanceof Ls)return e;var t=r.encoding;if(e===void 0)if(r.md)e=r.md.digest().getBytes(),t="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof e=="string"&&!t)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof e=="string"){if(typeof Buffer<"u")return Buffer.from(e,t);e=new tI(e,t)}else if(!(e instanceof tI))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new Ls(e.length()),s=0;s<n.length;++s)n[s]=e.at(s);return n}o(Lo,"messageToNativeBuffer");var rI=Nt(),mS=Nt([1]),Pre=Nt([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),kre=Nt([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),$L=Nt([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),XL=Nt([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),ZT=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),Lre=Nt([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Eg(r,e){var t=Gn.md.sha512.create(),n=new tI(r);t.update(n.getBytes(e),"binary");var s=t.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(s,"binary");for(var i=new Ls(Zt.constants.HASH_BYTE_LENGTH),a=0;a<64;++a)i[a]=s.charCodeAt(a);return i}o(Eg,"sha512");function Vre(r,e){var t=[Nt(),Nt(),Nt(),Nt()],n,s=Eg(e,32);for(s[0]&=248,s[31]&=127,s[31]|=64,aI(t,s),iI(r,t),n=0;n<32;++n)e[n+32]=r[n];return 0}o(Vre,"crypto_sign_keypair");function Ure(r,e,t,n){var s,i,a=new Float64Array(64),u=[Nt(),Nt(),Nt(),Nt()],c=Eg(n,32);c[0]&=248,c[31]&=127,c[31]|=64;var f=t+64;for(s=0;s<t;++s)r[64+s]=e[s];for(s=0;s<32;++s)r[32+s]=c[32+s];var h=Eg(r.subarray(32),t+32);for(nI(h),aI(u,h),iI(r,u),s=32;s<64;++s)r[s]=n[s];var m=Eg(r,t+64);for(nI(m),s=32;s<64;++s)a[s]=0;for(s=0;s<32;++s)a[s]=h[s];for(s=0;s<32;++s)for(i=0;i<32;i++)a[s+i]+=m[s]*c[i];return JL(r.subarray(32),a),f}o(Ure,"crypto_sign");function jre(r,e,t,n){var s,i,a=new Ls(32),u=[Nt(),Nt(),Nt(),Nt()],c=[Nt(),Nt(),Nt(),Nt()];if(i=-1,t<64||Fre(c,n))return-1;for(s=0;s<t;++s)r[s]=e[s];for(s=0;s<32;++s)r[s+32]=n[s];var f=Eg(r,t);if(nI(f),ZL(u,c,f),aI(c,e.subarray(32)),sI(u,c),iI(a,u),t-=64,YL(e,0,a,0)){for(s=0;s<t;++s)r[s]=0;return-1}for(s=0;s<t;++s)r[s]=e[s+64];return i=t,i}o(jre,"crypto_sign_open");function JL(r,e){var t,n,s,i;for(n=63;n>=32;--n){for(t=0,s=n-32,i=n-12;s<i;++s)e[s]+=t-16*e[n]*ZT[s-(n-32)],t=e[s]+128>>8,e[s]-=t*256;e[s]+=t,e[n]=0}for(t=0,s=0;s<32;++s)e[s]+=t-(e[31]>>4)*ZT[s],t=e[s]>>8,e[s]&=255;for(s=0;s<32;++s)e[s]-=t*ZT[s];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,r[n]=e[n]&255}o(JL,"modL");function nI(r){for(var e=new Float64Array(64),t=0;t<64;++t)e[t]=r[t],r[t]=0;JL(r,e)}o(nI,"reduce");function sI(r,e){var t=Nt(),n=Nt(),s=Nt(),i=Nt(),a=Nt(),u=Nt(),c=Nt(),f=Nt(),h=Nt();Pp(t,r[1],r[0]),Pp(h,e[1],e[0]),_r(t,t,h),Op(n,r[0],r[1]),Op(h,e[0],e[1]),_r(n,n,h),_r(s,r[3],e[3]),_r(s,s,kre),_r(i,r[2],e[2]),Op(i,i,i),Pp(a,n,t),Pp(u,i,s),Op(c,i,s),Op(f,n,t),_r(r[0],a,u),_r(r[1],f,c),_r(r[2],c,u),_r(r[3],a,f)}o(sI,"add");function GL(r,e,t){for(var n=0;n<4;++n)e8(r[n],e[n],t)}o(GL,"cswap");function iI(r,e){var t=Nt(),n=Nt(),s=Nt();Kre(s,e[2]),_r(t,e[0],s),_r(n,e[1],s),gS(r,n),r[31]^=QL(t)<<7}o(iI,"pack");function gS(r,e){var t,n,s,i=Nt(),a=Nt();for(t=0;t<16;++t)a[t]=e[t];for(eI(a),eI(a),eI(a),n=0;n<2;++n){for(i[0]=a[0]-65517,t=1;t<15;++t)i[t]=a[t]-65535-(i[t-1]>>16&1),i[t-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),s=i[15]>>16&1,i[14]&=65535,e8(a,i,1-s)}for(t=0;t<16;t++)r[2*t]=a[t]&255,r[2*t+1]=a[t]>>8}o(gS,"pack25519");function Fre(r,e){var t=Nt(),n=Nt(),s=Nt(),i=Nt(),a=Nt(),u=Nt(),c=Nt();return zu(r[2],mS),Mre(r[1],e),Ql(s,r[1]),_r(i,s,Pre),Pp(s,s,r[2]),Op(i,r[2],i),Ql(a,i),Ql(u,a),_r(c,u,a),_r(t,c,s),_r(t,t,i),qre(t,t),_r(t,t,s),_r(t,t,i),_r(t,t,i),_r(r[0],t,i),Ql(n,r[0]),_r(n,n,i),WL(n,s)&&_r(r[0],r[0],Lre),Ql(n,r[0]),_r(n,n,i),WL(n,s)?-1:(QL(r[0])===e[31]>>7&&Pp(r[0],rI,r[0]),_r(r[3],r[0],r[1]),0)}o(Fre,"unpackneg");function Mre(r,e){var t;for(t=0;t<16;++t)r[t]=e[2*t]+(e[2*t+1]<<8);r[15]&=32767}o(Mre,"unpack25519");function qre(r,e){var t=Nt(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=250;n>=0;--n)Ql(t,t),n!==1&&_r(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(qre,"pow2523");function WL(r,e){var t=new Ls(32),n=new Ls(32);return gS(t,r),gS(n,e),YL(t,0,n,0)}o(WL,"neq25519");function YL(r,e,t,n){return Hre(r,e,t,n,32)}o(YL,"crypto_verify_32");function Hre(r,e,t,n,s){var i,a=0;for(i=0;i<s;++i)a|=r[e+i]^t[n+i];return(1&a-1>>>8)-1}o(Hre,"vn");function QL(r){var e=new Ls(32);return gS(e,r),e[0]&1}o(QL,"par25519");function ZL(r,e,t){var n,s;for(zu(r[0],rI),zu(r[1],mS),zu(r[2],mS),zu(r[3],rI),s=255;s>=0;--s)n=t[s/8|0]>>(s&7)&1,GL(r,e,n),sI(e,r),sI(r,r),GL(r,e,n)}o(ZL,"scalarmult");function aI(r,e){var t=[Nt(),Nt(),Nt(),Nt()];zu(t[0],$L),zu(t[1],XL),zu(t[2],mS),_r(t[3],$L,XL),ZL(r,t,e)}o(aI,"scalarbase");function zu(r,e){var t;for(t=0;t<16;t++)r[t]=e[t]|0}o(zu,"set25519");function Kre(r,e){var t=Nt(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=253;n>=0;--n)Ql(t,t),n!==2&&n!==4&&_r(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(Kre,"inv25519");function eI(r){var e,t,n=1;for(e=0;e<16;++e)t=r[e]+n+65535,n=Math.floor(t/65536),r[e]=t-n*65536;r[0]+=n-1+37*(n-1)}o(eI,"car25519");function e8(r,e,t){for(var n,s=~(t-1),i=0;i<16;++i)n=s&(r[i]^e[i]),r[i]^=n,e[i]^=n}o(e8,"sel25519");function Nt(r){var e,t=new Float64Array(16);if(r)for(e=0;e<r.length;++e)t[e]=r[e];return t}o(Nt,"gf");function Op(r,e,t){for(var n=0;n<16;++n)r[n]=e[n]+t[n]}o(Op,"A");function Pp(r,e,t){for(var n=0;n<16;++n)r[n]=e[n]-t[n]}o(Pp,"Z");function Ql(r,e){_r(r,e,e)}o(Ql,"S");function _r(r,e,t){var n,s,i=0,a=0,u=0,c=0,f=0,h=0,m=0,g=0,x=0,v=0,w=0,S=0,A=0,N=0,b=0,E=0,C=0,_=0,M=0,R=0,q=0,H=0,K=0,G=0,pe=0,le=0,ue=0,ee=0,he=0,we=0,Ke=0,Ae=t[0],xe=t[1],je=t[2],ze=t[3],Ye=t[4],ct=t[5],P=t[6],D=t[7],se=t[8],z=t[9],Xe=t[10],Re=t[11],Ce=t[12],lt=t[13],sr=t[14],Fe=t[15];n=e[0],i+=n*Ae,a+=n*xe,u+=n*je,c+=n*ze,f+=n*Ye,h+=n*ct,m+=n*P,g+=n*D,x+=n*se,v+=n*z,w+=n*Xe,S+=n*Re,A+=n*Ce,N+=n*lt,b+=n*sr,E+=n*Fe,n=e[1],a+=n*Ae,u+=n*xe,c+=n*je,f+=n*ze,h+=n*Ye,m+=n*ct,g+=n*P,x+=n*D,v+=n*se,w+=n*z,S+=n*Xe,A+=n*Re,N+=n*Ce,b+=n*lt,E+=n*sr,C+=n*Fe,n=e[2],u+=n*Ae,c+=n*xe,f+=n*je,h+=n*ze,m+=n*Ye,g+=n*ct,x+=n*P,v+=n*D,w+=n*se,S+=n*z,A+=n*Xe,N+=n*Re,b+=n*Ce,E+=n*lt,C+=n*sr,_+=n*Fe,n=e[3],c+=n*Ae,f+=n*xe,h+=n*je,m+=n*ze,g+=n*Ye,x+=n*ct,v+=n*P,w+=n*D,S+=n*se,A+=n*z,N+=n*Xe,b+=n*Re,E+=n*Ce,C+=n*lt,_+=n*sr,M+=n*Fe,n=e[4],f+=n*Ae,h+=n*xe,m+=n*je,g+=n*ze,x+=n*Ye,v+=n*ct,w+=n*P,S+=n*D,A+=n*se,N+=n*z,b+=n*Xe,E+=n*Re,C+=n*Ce,_+=n*lt,M+=n*sr,R+=n*Fe,n=e[5],h+=n*Ae,m+=n*xe,g+=n*je,x+=n*ze,v+=n*Ye,w+=n*ct,S+=n*P,A+=n*D,N+=n*se,b+=n*z,E+=n*Xe,C+=n*Re,_+=n*Ce,M+=n*lt,R+=n*sr,q+=n*Fe,n=e[6],m+=n*Ae,g+=n*xe,x+=n*je,v+=n*ze,w+=n*Ye,S+=n*ct,A+=n*P,N+=n*D,b+=n*se,E+=n*z,C+=n*Xe,_+=n*Re,M+=n*Ce,R+=n*lt,q+=n*sr,H+=n*Fe,n=e[7],g+=n*Ae,x+=n*xe,v+=n*je,w+=n*ze,S+=n*Ye,A+=n*ct,N+=n*P,b+=n*D,E+=n*se,C+=n*z,_+=n*Xe,M+=n*Re,R+=n*Ce,q+=n*lt,H+=n*sr,K+=n*Fe,n=e[8],x+=n*Ae,v+=n*xe,w+=n*je,S+=n*ze,A+=n*Ye,N+=n*ct,b+=n*P,E+=n*D,C+=n*se,_+=n*z,M+=n*Xe,R+=n*Re,q+=n*Ce,H+=n*lt,K+=n*sr,G+=n*Fe,n=e[9],v+=n*Ae,w+=n*xe,S+=n*je,A+=n*ze,N+=n*Ye,b+=n*ct,E+=n*P,C+=n*D,_+=n*se,M+=n*z,R+=n*Xe,q+=n*Re,H+=n*Ce,K+=n*lt,G+=n*sr,pe+=n*Fe,n=e[10],w+=n*Ae,S+=n*xe,A+=n*je,N+=n*ze,b+=n*Ye,E+=n*ct,C+=n*P,_+=n*D,M+=n*se,R+=n*z,q+=n*Xe,H+=n*Re,K+=n*Ce,G+=n*lt,pe+=n*sr,le+=n*Fe,n=e[11],S+=n*Ae,A+=n*xe,N+=n*je,b+=n*ze,E+=n*Ye,C+=n*ct,_+=n*P,M+=n*D,R+=n*se,q+=n*z,H+=n*Xe,K+=n*Re,G+=n*Ce,pe+=n*lt,le+=n*sr,ue+=n*Fe,n=e[12],A+=n*Ae,N+=n*xe,b+=n*je,E+=n*ze,C+=n*Ye,_+=n*ct,M+=n*P,R+=n*D,q+=n*se,H+=n*z,K+=n*Xe,G+=n*Re,pe+=n*Ce,le+=n*lt,ue+=n*sr,ee+=n*Fe,n=e[13],N+=n*Ae,b+=n*xe,E+=n*je,C+=n*ze,_+=n*Ye,M+=n*ct,R+=n*P,q+=n*D,H+=n*se,K+=n*z,G+=n*Xe,pe+=n*Re,le+=n*Ce,ue+=n*lt,ee+=n*sr,he+=n*Fe,n=e[14],b+=n*Ae,E+=n*xe,C+=n*je,_+=n*ze,M+=n*Ye,R+=n*ct,q+=n*P,H+=n*D,K+=n*se,G+=n*z,pe+=n*Xe,le+=n*Re,ue+=n*Ce,ee+=n*lt,he+=n*sr,we+=n*Fe,n=e[15],E+=n*Ae,C+=n*xe,_+=n*je,M+=n*ze,R+=n*Ye,q+=n*ct,H+=n*P,K+=n*D,G+=n*se,pe+=n*z,le+=n*Xe,ue+=n*Re,ee+=n*Ce,he+=n*lt,we+=n*sr,Ke+=n*Fe,i+=38*C,a+=38*_,u+=38*M,c+=38*R,f+=38*q,h+=38*H,m+=38*K,g+=38*G,x+=38*pe,v+=38*le,w+=38*ue,S+=38*ee,A+=38*he,N+=38*we,b+=38*Ke,s=1,n=i+s+65535,s=Math.floor(n/65536),i=n-s*65536,n=a+s+65535,s=Math.floor(n/65536),a=n-s*65536,n=u+s+65535,s=Math.floor(n/65536),u=n-s*65536,n=c+s+65535,s=Math.floor(n/65536),c=n-s*65536,n=f+s+65535,s=Math.floor(n/65536),f=n-s*65536,n=h+s+65535,s=Math.floor(n/65536),h=n-s*65536,n=m+s+65535,s=Math.floor(n/65536),m=n-s*65536,n=g+s+65535,s=Math.floor(n/65536),g=n-s*65536,n=x+s+65535,s=Math.floor(n/65536),x=n-s*65536,n=v+s+65535,s=Math.floor(n/65536),v=n-s*65536,n=w+s+65535,s=Math.floor(n/65536),w=n-s*65536,n=S+s+65535,s=Math.floor(n/65536),S=n-s*65536,n=A+s+65535,s=Math.floor(n/65536),A=n-s*65536,n=N+s+65535,s=Math.floor(n/65536),N=n-s*65536,n=b+s+65535,s=Math.floor(n/65536),b=n-s*65536,n=E+s+65535,s=Math.floor(n/65536),E=n-s*65536,i+=s-1+37*(s-1),s=1,n=i+s+65535,s=Math.floor(n/65536),i=n-s*65536,n=a+s+65535,s=Math.floor(n/65536),a=n-s*65536,n=u+s+65535,s=Math.floor(n/65536),u=n-s*65536,n=c+s+65535,s=Math.floor(n/65536),c=n-s*65536,n=f+s+65535,s=Math.floor(n/65536),f=n-s*65536,n=h+s+65535,s=Math.floor(n/65536),h=n-s*65536,n=m+s+65535,s=Math.floor(n/65536),m=n-s*65536,n=g+s+65535,s=Math.floor(n/65536),g=n-s*65536,n=x+s+65535,s=Math.floor(n/65536),x=n-s*65536,n=v+s+65535,s=Math.floor(n/65536),v=n-s*65536,n=w+s+65535,s=Math.floor(n/65536),w=n-s*65536,n=S+s+65535,s=Math.floor(n/65536),S=n-s*65536,n=A+s+65535,s=Math.floor(n/65536),A=n-s*65536,n=N+s+65535,s=Math.floor(n/65536),N=n-s*65536,n=b+s+65535,s=Math.floor(n/65536),b=n-s*65536,n=E+s+65535,s=Math.floor(n/65536),E=n-s*65536,i+=s-1+37*(s-1),r[0]=i,r[1]=a,r[2]=u,r[3]=c,r[4]=f,r[5]=h,r[6]=m,r[7]=g,r[8]=x,r[9]=v,r[10]=w,r[11]=S,r[12]=A,r[13]=N,r[14]=b,r[15]=E}o(_r,"M")});var a8=Q((Kxe,i8)=>{"use strict";var ui=Xt();hr();Ti();yg();i8.exports=ui.kem=ui.kem||{};var n8=ui.jsbn.BigInteger;ui.kem.rsa={};ui.kem.rsa.create=function(r,e){e=e||{};var t=e.prng||ui.random,n={};return n.encrypt=function(s,i){var a=Math.ceil(s.n.bitLength()/8),u;do u=new n8(ui.util.bytesToHex(t.getBytesSync(a)),16).mod(s.n);while(u.compareTo(n8.ONE)<=0);u=ui.util.hexToBytes(u.toString(16));var c=a-u.length;c>0&&(u=ui.util.fillString("\0",c)+u);var f=s.encrypt(u,"NONE"),h=r.generate(u,i);return{encapsulation:f,key:h}},n.decrypt=function(s,i,a){var u=s.decrypt(i,"NONE");return r.generate(u,a)},n};ui.kem.kdf1=function(r,e){s8(this,r,0,e||r.digestLength)};ui.kem.kdf2=function(r,e){s8(this,r,1,e||r.digestLength)};function s8(r,e,t,n){r.generate=function(s,i){for(var a=new ui.util.ByteBuffer,u=Math.ceil(i/n)+t,c=new ui.util.ByteBuffer,f=t;f<u;++f){c.putInt32(f),e.start(),e.update(s+c.getBytes());var h=e.digest();a.putBytes(h.getBytes(n))}return a.truncate(a.length()-i),a.getBytes()}}o(s8,"_createKDF")});var l8=Q((Xxe,c8)=>{"use strict";var nr=Xt();hr();c8.exports=nr.log=nr.log||{};nr.log.levels=["none","error","warning","info","debug","verbose","max"];var vS={},cI=[],Cg=null;nr.log.LEVEL_LOCKED=2;nr.log.NO_LEVEL_CHECK=4;nr.log.INTERPOLATE=8;for(qa=0;qa<nr.log.levels.length;++qa)oI=nr.log.levels[qa],vS[oI]={index:qa,name:oI.toUpperCase()};var oI,qa;nr.log.logMessage=function(r){for(var e=vS[r.level].index,t=0;t<cI.length;++t){var n=cI[t];if(n.flags&nr.log.NO_LEVEL_CHECK)n.f(r);else{var s=vS[n.level].index;e<=s&&n.f(n,r)}}};nr.log.prepareStandard=function(r){"standard"in r||(r.standard=vS[r.level].name+" ["+r.category+"] "+r.message)};nr.log.prepareFull=function(r){if(!("full"in r)){var e=[r.message];e=e.concat([]),r.full=nr.util.format.apply(this,e)}};nr.log.prepareStandardFull=function(r){"standardFull"in r||(nr.log.prepareStandard(r),r.standardFull=r.standard)};for(uI=["error","warning","info","debug","verbose"],qa=0;qa<uI.length;++qa)(function(e){nr.log[e]=function(t,n){var s=Array.prototype.slice.call(arguments).slice(2),i={timestamp:new Date,level:e,category:t,message:n,arguments:s};nr.log.logMessage(i)}})(uI[qa]);var uI,qa;nr.log.makeLogger=function(r){var e={flags:0,f:r};return nr.log.setLevel(e,"none"),e};nr.log.setLevel=function(r,e){var t=!1;if(r&&!(r.flags&nr.log.LEVEL_LOCKED))for(var n=0;n<nr.log.levels.length;++n){var s=nr.log.levels[n];if(e==s){r.level=e,t=!0;break}}return t};nr.log.lock=function(r,e){typeof e>"u"||e?r.flags|=nr.log.LEVEL_LOCKED:r.flags&=~nr.log.LEVEL_LOCKED};nr.log.addLogger=function(r){cI.push(r)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(o8={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},Ng=o(function(r,e){nr.log.prepareStandard(e);var t=o8[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),t.apply(console,n)},"f"),kp=nr.log.makeLogger(Ng)):(Ng=o(function(e,t){nr.log.prepareStandardFull(t),console.log(t.standardFull)},"f"),kp=nr.log.makeLogger(Ng)),nr.log.setLevel(kp,"debug"),nr.log.addLogger(kp),Cg=kp):console={log:o(function(){},"log")};var kp,o8,Ng;Cg!==null&&typeof window<"u"&&window.location&&(Ag=new URL(window.location.href).searchParams,Ag.has("console.level")&&nr.log.setLevel(Cg,Ag.get("console.level").slice(-1)[0]),Ag.has("console.lock")&&(u8=Ag.get("console.lock").slice(-1)[0],u8=="true"&&nr.log.lock(Cg)));var Ag,u8;nr.log.consoleLogger=Cg});var h8=Q((Wxe,f8)=>{"use strict";f8.exports=Pa();Jw();Ip();bT();YT()});var m8=Q((zxe,d8)=>{"use strict";var We=Xt();Mu();ia();gg();qu();$l();LT();Ti();hr();lS();var te=We.asn1,As=d8.exports=We.pkcs7=We.pkcs7||{};As.messageFromPem=function(r){var e=We.pem.decode(r)[0];if(e.type!=="PKCS7"){var t=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw t.headerType=e.type,t}if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=te.fromDer(e.body);return As.messageFromAsn1(n)};As.messageToPem=function(r,e){var t={type:"PKCS7",body:te.toDer(r.toAsn1()).getBytes()};return We.pem.encode(t,{maxline:e})};As.messageFromAsn1=function(r){var e={},t=[];if(!te.validate(r,As.asn1.contentInfoValidator,e,t)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=t,n}var s=te.derToOid(e.contentType),i;switch(s){case We.pki.oids.envelopedData:i=As.createEnvelopedData();break;case We.pki.oids.encryptedData:i=As.createEncryptedData();break;case We.pki.oids.signedData:i=As.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+s+" is not (yet) supported.")}return i.fromAsn1(e.content.value[0]),i};As.createSignedData=function(){var r=null;return r={type:We.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:o(function(n){if(fI(r,n,As.asn1.signedDataValidator),r.certificates=[],r.crls=[],r.digestAlgorithmIdentifiers=[],r.contentInfo=null,r.signerInfos=[],r.rawCapture.certificates)for(var s=r.rawCapture.certificates.value,i=0;i<s.length;++i)r.certificates.push(We.pki.certificateFromAsn1(s[i]))},"fromAsn1"),toAsn1:o(function(){r.contentInfo||r.sign();for(var n=[],s=0;s<r.certificates.length;++s)n.push(We.pki.certificateToAsn1(r.certificates[s]));var i=[],a=te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,te.integerToDer(r.version).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SET,!0,r.digestAlgorithmIdentifiers),r.contentInfo])]);return n.length>0&&a.value[0].value.push(te.create(te.Class.CONTEXT_SPECIFIC,0,!0,n)),i.length>0&&a.value[0].value.push(te.create(te.Class.CONTEXT_SPECIFIC,1,!0,i)),a.value[0].value.push(te.create(te.Class.UNIVERSAL,te.Type.SET,!0,r.signerInfos)),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.type).getBytes()),a])},"toAsn1"),addSigner:o(function(n){var s=n.issuer,i=n.serialNumber;if(n.certificate){var a=n.certificate;typeof a=="string"&&(a=We.pki.certificateFromPem(a)),s=a.issuer.attributes,i=a.serialNumber}var u=n.key;if(!u)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof u=="string"&&(u=We.pki.privateKeyFromPem(u));var c=n.digestAlgorithm||We.pki.oids.sha1;switch(c){case We.pki.oids.sha1:case We.pki.oids.sha256:case We.pki.oids.sha384:case We.pki.oids.sha512:case We.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+c)}var f=n.authenticatedAttributes||[];if(f.length>0){for(var h=!1,m=!1,g=0;g<f.length;++g){var x=f[g];if(!h&&x.type===We.pki.oids.contentType){if(h=!0,m)break;continue}if(!m&&x.type===We.pki.oids.messageDigest){if(m=!0,h)break;continue}}if(!h||!m)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}r.signers.push({key:u,version:1,issuer:s,serialNumber:i,digestAlgorithm:c,signatureAlgorithm:We.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:f,unauthenticatedAttributes:[]})},"addSigner"),sign:o(function(n){if(n=n||{},(typeof r.content!="object"||r.contentInfo===null)&&(r.contentInfo=te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(We.pki.oids.data).getBytes())]),"content"in r)){var s;r.content instanceof We.util.ByteBuffer?s=r.content.bytes():typeof r.content=="string"&&(s=We.util.encodeUtf8(r.content)),n.detached?r.detachedContent=te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,s):r.contentInfo.value.push(te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,s)]))}if(r.signers.length!==0){var i=e();t(i)}},"sign"),verify:o(function(){throw new Error("PKCS#7 signature verification not yet implemented.")},"verify"),addCertificate:o(function(n){typeof n=="string"&&(n=We.pki.certificateFromPem(n)),r.certificates.push(n)},"addCertificate"),addCertificateRevokationList:o(function(n){throw new Error("PKCS#7 CRL support not yet implemented.")},"addCertificateRevokationList")},r;function e(){for(var n={},s=0;s<r.signers.length;++s){var i=r.signers[s],a=i.digestAlgorithm;a in n||(n[a]=We.md[We.pki.oids[a]].create()),i.authenticatedAttributes.length===0?i.md=n[a]:i.md=We.md[We.pki.oids[a]].create()}r.digestAlgorithmIdentifiers=[];for(var a in n)r.digestAlgorithmIdentifiers.push(te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(a).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.NULL,!1,"")]));return n}o(e,"addDigestAlgorithmIds");function t(n){var s;if(r.detachedContent?s=r.detachedContent:(s=r.contentInfo.value[1],s=s.value[0]),!s)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var i=te.derToOid(r.contentInfo.value[0].value),a=te.toDer(s);a.getByte(),te.getBerValueLength(a),a=a.getBytes();for(var u in n)n[u].start().update(a);for(var c=new Date,f=0;f<r.signers.length;++f){var h=r.signers[f];if(h.authenticatedAttributes.length===0){if(i!==We.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{h.authenticatedAttributesAsn1=te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var m=te.create(te.Class.UNIVERSAL,te.Type.SET,!0,[]),g=0;g<h.authenticatedAttributes.length;++g){var x=h.authenticatedAttributes[g];x.type===We.pki.oids.messageDigest?x.value=n[h.digestAlgorithm].digest():x.type===We.pki.oids.signingTime&&(x.value||(x.value=c)),m.value.push(lI(x)),h.authenticatedAttributesAsn1.value.push(lI(x))}a=te.toDer(m).getBytes(),h.md.start().update(a)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}r.signerInfos=Jre(r.signers)}o(t,"addSignerInfos")};As.createEncryptedData=function(){var r=null;return r={type:We.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:We.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){fI(r,e,As.asn1.encryptedDataValidator)},"fromAsn1"),decrypt:o(function(e){e!==void 0&&(r.encryptedContent.key=e),p8(r)},"decrypt")},r};As.createEnvelopedData=function(){var r=null;return r={type:We.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:We.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){var t=fI(r,e,As.asn1.envelopedDataValidator);r.recipients=Gre(t.recipientInfos.value)},"fromAsn1"),toAsn1:o(function(){return te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.type).getBytes()),te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,te.integerToDer(r.version).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SET,!0,Wre(r.recipients)),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,Yre(r.encryptedContent))])])])},"toAsn1"),findRecipient:o(function(e){for(var t=e.issuer.attributes,n=0;n<r.recipients.length;++n){var s=r.recipients[n],i=s.issuer;if(s.serialNumber===e.serialNumber&&i.length===t.length){for(var a=!0,u=0;u<t.length;++u)if(i[u].type!==t[u].type||i[u].value!==t[u].value){a=!1;break}if(a)return s}}return null},"findRecipient"),decrypt:o(function(e,t){if(r.encryptedContent.key===void 0&&e!==void 0&&t!==void 0)switch(e.encryptedContent.algorithm){case We.pki.oids.rsaEncryption:case We.pki.oids.desCBC:var n=t.decrypt(e.encryptedContent.content);r.encryptedContent.key=We.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+e.encryptedContent.algorithm)}p8(r)},"decrypt"),addRecipient:o(function(e){r.recipients.push({version:0,issuer:e.issuer.attributes,serialNumber:e.serialNumber,encryptedContent:{algorithm:We.pki.oids.rsaEncryption,key:e.publicKey}})},"addRecipient"),encrypt:o(function(e,t){if(r.encryptedContent.content===void 0){t=t||r.encryptedContent.algorithm,e=e||r.encryptedContent.key;var n,s,i;switch(t){case We.pki.oids["aes128-CBC"]:n=16,s=16,i=We.aes.createEncryptionCipher;break;case We.pki.oids["aes192-CBC"]:n=24,s=16,i=We.aes.createEncryptionCipher;break;case We.pki.oids["aes256-CBC"]:n=32,s=16,i=We.aes.createEncryptionCipher;break;case We.pki.oids["des-EDE3-CBC"]:n=24,s=8,i=We.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+t)}if(e===void 0)e=We.util.createBuffer(We.random.getBytes(n));else if(e.length()!=n)throw new Error("Symmetric key has wrong length; got "+e.length()+" bytes, expected "+n+".");r.encryptedContent.algorithm=t,r.encryptedContent.key=e,r.encryptedContent.parameter=We.util.createBuffer(We.random.getBytes(s));var a=i(e);if(a.start(r.encryptedContent.parameter.copy()),a.update(r.content),!a.finish())throw new Error("Symmetric encryption failed.");r.encryptedContent.content=a.output}for(var u=0;u<r.recipients.length;++u){var c=r.recipients[u];if(c.encryptedContent.content===void 0)switch(c.encryptedContent.algorithm){case We.pki.oids.rsaEncryption:c.encryptedContent.content=c.encryptedContent.key.encrypt(r.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm)}}},"encrypt")},r};function $re(r){var e={},t=[];if(!te.validate(r,As.asn1.recipientInfoValidator,e,t)){var n=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw n.errors=t,n}return{version:e.version.charCodeAt(0),issuer:We.pki.RDNAttributesAsArray(e.issuer),serialNumber:We.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:te.derToOid(e.encAlgorithm),parameter:e.encParameter?e.encParameter.value:void 0,content:e.encKey}}}o($re,"_recipientFromAsn1");function Xre(r){return te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,te.integerToDer(r.version).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[We.pki.distinguishedNameToAsn1({attributes:r.issuer}),te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,We.util.hexToBytes(r.serialNumber))]),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.encryptedContent.algorithm).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.NULL,!1,"")]),te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.encryptedContent.content)])}o(Xre,"_recipientToAsn1");function Gre(r){for(var e=[],t=0;t<r.length;++t)e.push($re(r[t]));return e}o(Gre,"_recipientsFromAsn1");function Wre(r){for(var e=[],t=0;t<r.length;++t)e.push(Xre(r[t]));return e}o(Wre,"_recipientsToAsn1");function zre(r){var e=te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,te.integerToDer(r.version).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[We.pki.distinguishedNameToAsn1({attributes:r.issuer}),te.create(te.Class.UNIVERSAL,te.Type.INTEGER,!1,We.util.hexToBytes(r.serialNumber))]),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.digestAlgorithm).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.NULL,!1,"")])]);if(r.authenticatedAttributesAsn1&&e.value.push(r.authenticatedAttributesAsn1),e.value.push(te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.signatureAlgorithm).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.NULL,!1,"")])),e.value.push(te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.signature)),r.unauthenticatedAttributes.length>0){for(var t=te.create(te.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<r.unauthenticatedAttributes.length;++n){var s=r.unauthenticatedAttributes[n];t.values.push(lI(s))}e.value.push(t)}return e}o(zre,"_signerToAsn1");function Jre(r){for(var e=[],t=0;t<r.length;++t)e.push(zre(r[t]));return e}o(Jre,"_signersToAsn1");function lI(r){var e;if(r.type===We.pki.oids.contentType)e=te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.value).getBytes());else if(r.type===We.pki.oids.messageDigest)e=te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.value.bytes());else if(r.type===We.pki.oids.signingTime){var t=new Date("1950-01-01T00:00:00Z"),n=new Date("2050-01-01T00:00:00Z"),s=r.value;if(typeof s=="string"){var i=Date.parse(s);isNaN(i)?s.length===13?s=te.utcTimeToDate(s):s=te.generalizedTimeToDate(s):s=new Date(i)}s>=t&&s<n?e=te.create(te.Class.UNIVERSAL,te.Type.UTCTIME,!1,te.dateToUtcTime(s)):e=te.create(te.Class.UNIVERSAL,te.Type.GENERALIZEDTIME,!1,te.dateToGeneralizedTime(s))}return te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.type).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SET,!0,[e])])}o(lI,"_attributeToAsn1");function Yre(r){return[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(We.pki.oids.data).getBytes()),te.create(te.Class.UNIVERSAL,te.Type.SEQUENCE,!0,[te.create(te.Class.UNIVERSAL,te.Type.OID,!1,te.oidToDer(r.algorithm).getBytes()),r.parameter?te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.parameter.getBytes()):void 0]),te.create(te.Class.CONTEXT_SPECIFIC,0,!0,[te.create(te.Class.UNIVERSAL,te.Type.OCTETSTRING,!1,r.content.getBytes())])]}o(Yre,"_encryptedContentToAsn1");function fI(r,e,t){var n={},s=[];if(!te.validate(e,t,n,s)){var i=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw i.errors=i,i}var a=te.derToOid(n.contentType);if(a!==We.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var u="";if(We.util.isArray(n.encryptedContent))for(var c=0;c<n.encryptedContent.length;++c){if(n.encryptedContent[c].type!==te.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");u+=n.encryptedContent[c].value}else u=n.encryptedContent;r.encryptedContent={algorithm:te.derToOid(n.encAlgorithm),parameter:We.util.createBuffer(n.encParameter.value),content:We.util.createBuffer(u)}}if(n.content){var u="";if(We.util.isArray(n.content))for(var c=0;c<n.content.length;++c){if(n.content[c].type!==te.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");u+=n.content[c].value}else u=n.content;r.content=We.util.createBuffer(u)}return r.version=n.version.charCodeAt(0),r.rawCapture=n,n}o(fI,"_fromAsn1");function p8(r){if(r.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(r.content===void 0){var e;switch(r.encryptedContent.algorithm){case We.pki.oids["aes128-CBC"]:case We.pki.oids["aes192-CBC"]:case We.pki.oids["aes256-CBC"]:e=We.aes.createDecryptionCipher(r.encryptedContent.key);break;case We.pki.oids.desCBC:case We.pki.oids["des-EDE3-CBC"]:e=We.des.createDecryptionCipher(r.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+r.encryptedContent.algorithm)}if(e.start(r.encryptedContent.parameter),e.update(r.encryptedContent.content),!e.finish())throw new Error("Symmetric decryption failed.");r.content=e.output}}o(p8,"_decryptContent")});var v8=Q((Yxe,g8)=>{"use strict";var vn=Xt();Mu();Ap();Jw();Ip();hr();var xS=g8.exports=vn.ssh=vn.ssh||{};xS.privateKeyToPutty=function(r,e,t){t=t||"",e=e||"";var n="ssh-rsa",s=e===""?"none":"aes256-cbc",i="PuTTY-User-Key-File-2: "+n+`\r
|
|
15
|
+
`;i+="Encryption: "+s+`\r
|
|
16
|
+
`,i+="Comment: "+t+`\r
|
|
17
|
+
`;var a=vn.util.createBuffer();Lp(a,n),Ha(a,r.e),Ha(a,r.n);var u=vn.util.encode64(a.bytes(),64),c=Math.floor(u.length/66)+1;i+="Public-Lines: "+c+`\r
|
|
18
|
+
`,i+=u;var f=vn.util.createBuffer();Ha(f,r.d),Ha(f,r.p),Ha(f,r.q),Ha(f,r.qInv);var h;if(!e)h=vn.util.encode64(f.bytes(),64);else{var m=f.length()+16-1;m-=m%16;var g=yS(f.bytes());g.truncate(g.length()-m+f.length()),f.putBuffer(g);var x=vn.util.createBuffer();x.putBuffer(yS("\0\0\0\0",e)),x.putBuffer(yS("\0\0\0",e));var v=vn.aes.createEncryptionCipher(x.truncate(8),"CBC");v.start(vn.util.createBuffer().fillWithByte(0,16)),v.update(f.copy()),v.finish();var w=v.output;w.truncate(16),h=vn.util.encode64(w.bytes(),64)}c=Math.floor(h.length/66)+1,i+=`\r
|
|
19
|
+
Private-Lines: `+c+`\r
|
|
20
|
+
`,i+=h;var S=yS("putty-private-key-file-mac-key",e),A=vn.util.createBuffer();Lp(A,n),Lp(A,s),Lp(A,t),A.putInt32(a.length()),A.putBuffer(a),A.putInt32(f.length()),A.putBuffer(f);var N=vn.hmac.create();return N.start("sha1",S),N.update(A.bytes()),i+=`\r
|
|
21
|
+
Private-MAC: `+N.digest().toHex()+`\r
|
|
22
|
+
`,i};xS.publicKeyToOpenSSH=function(r,e){var t="ssh-rsa";e=e||"";var n=vn.util.createBuffer();return Lp(n,t),Ha(n,r.e),Ha(n,r.n),t+" "+vn.util.encode64(n.bytes())+" "+e};xS.privateKeyToOpenSSH=function(r,e){return e?vn.pki.encryptRsaPrivateKey(r,e,{legacy:!0,algorithm:"aes128"}):vn.pki.privateKeyToPem(r)};xS.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||vn.md.md5.create(),n="ssh-rsa",s=vn.util.createBuffer();Lp(s,n),Ha(s,r.e),Ha(s,r.n),t.start(),t.update(s.getBytes());var i=t.digest();if(e.encoding==="hex"){var a=i.toHex();return e.delimiter?a.match(/.{2}/g).join(e.delimiter):a}else{if(e.encoding==="binary")return i.getBytes();if(e.encoding)throw new Error('Unknown encoding "'+e.encoding+'".')}return i};function Ha(r,e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=vn.util.hexToBytes(t);r.putInt32(n.length),r.putBytes(n)}o(Ha,"_addBigIntegerToBuffer");function Lp(r,e){r.putInt32(e.length),r.putString(e)}o(Lp,"_addStringToBuffer");function yS(){for(var r=vn.md.sha1.create(),e=arguments.length,t=0;t<e;++t)r.update(arguments[t]);return r.digest()}o(yS,"_sha1")});var x8=Q((Zxe,y8)=>{"use strict";y8.exports=Xt();Mu();UL();ia();Hw();gg();r8();Ap();a8();l8();h8();VT();eS();$l();DT();FT();m8();qT();OT();ET();oS();Ti();NT();v8();WT();hr()});var A8=Q((swe,E8)=>{"use strict";var Vp=1e3,Up=Vp*60,jp=Up*60,tf=jp*24,Qre=tf*7,Zre=tf*365.25;E8.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return ene(r);if(t==="number"&&isFinite(r))return e.long?rne(r):tne(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function ene(r){if(r=String(r),!(r.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(e){var t=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return t*Zre;case"weeks":case"week":case"w":return t*Qre;case"days":case"day":case"d":return t*tf;case"hours":case"hour":case"hrs":case"hr":case"h":return t*jp;case"minutes":case"minute":case"mins":case"min":case"m":return t*Up;case"seconds":case"second":case"secs":case"sec":case"s":return t*Vp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}o(ene,"parse");function tne(r){var e=Math.abs(r);return e>=tf?Math.round(r/tf)+"d":e>=jp?Math.round(r/jp)+"h":e>=Up?Math.round(r/Up)+"m":e>=Vp?Math.round(r/Vp)+"s":r+"ms"}o(tne,"fmtShort");function rne(r){var e=Math.abs(r);return e>=tf?SS(r,e,tf,"day"):e>=jp?SS(r,e,jp,"hour"):e>=Up?SS(r,e,Up,"minute"):e>=Vp?SS(r,e,Vp,"second"):r+" ms"}o(rne,"fmtLong");function SS(r,e,t,n){var s=e>=t*1.5;return Math.round(r/t)+" "+n+(s?"s":"")}o(SS,"plural")});var mI=Q((awe,C8)=>{"use strict";function nne(r){t.debug=t,t.default=t,t.coerce=c,t.disable=a,t.enable=s,t.enabled=u,t.humanize=A8(),t.destroy=f,Object.keys(r).forEach(h=>{t[h]=r[h]}),t.names=[],t.skips=[],t.formatters={};function e(h){let m=0;for(let g=0;g<h.length;g++)m=(m<<5)-m+h.charCodeAt(g),m|=0;return t.colors[Math.abs(m)%t.colors.length]}o(e,"selectColor"),t.selectColor=e;function t(h){let m,g=null,x,v;function w(...S){if(!w.enabled)return;let A=w,N=Number(new Date),b=N-(m||N);A.diff=b,A.prev=m,A.curr=N,m=N,S[0]=t.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let E=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(_,M)=>{if(_==="%%")return"%";E++;let R=t.formatters[M];if(typeof R=="function"){let q=S[E];_=R.call(A,q),S.splice(E,1),E--}return _}),t.formatArgs.call(A,S),(A.log||t.log).apply(A,S)}return o(w,"debug"),w.namespace=h,w.useColors=t.useColors(),w.color=t.selectColor(h),w.extend=n,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:o(()=>g!==null?g:(x!==t.namespaces&&(x=t.namespaces,v=t.enabled(h)),v),"get"),set:o(S=>{g=S},"set")}),typeof t.init=="function"&&t.init(w),w}o(t,"createDebug");function n(h,m){let g=t(this.namespace+(typeof m>"u"?":":m)+h);return g.log=this.log,g}o(n,"extend");function s(h){t.save(h),t.namespaces=h,t.names=[],t.skips=[];let m=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of m)g[0]==="-"?t.skips.push(g.slice(1)):t.names.push(g)}o(s,"enable");function i(h,m){let g=0,x=0,v=-1,w=0;for(;g<h.length;)if(x<m.length&&(m[x]===h[g]||m[x]==="*"))m[x]==="*"?(v=x,w=g,x++):(g++,x++);else if(v!==-1)x=v+1,w++,g=w;else return!1;for(;x<m.length&&m[x]==="*";)x++;return x===m.length}o(i,"matchesTemplate");function a(){let h=[...t.names,...t.skips.map(m=>"-"+m)].join(",");return t.enable(""),h}o(a,"disable");function u(h){for(let m of t.skips)if(i(h,m))return!1;for(let m of t.names)if(i(h,m))return!0;return!1}o(u,"enabled");function c(h){return h instanceof Error?h.stack||h.message:h}o(c,"coerce");function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o(f,"destroy"),t.enable(t.load()),t}o(nne,"setup");C8.exports=nne});var N8=Q((Vs,bS)=>{"use strict";Vs.formatArgs=ine;Vs.save=ane;Vs.load=one;Vs.useColors=sne;Vs.storage=une();Vs.destroy=(()=>{let r=!1;return()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Vs.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function sne(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let r;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(r=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(r[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(sne,"useColors");function ine(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+bS.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;r.splice(1,0,e,"color: inherit");let t=0,n=0;r[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(t++,s==="%c"&&(n=t))}),r.splice(n,0,e)}o(ine,"formatArgs");Vs.log=console.debug||console.log||(()=>{});function ane(r){try{r?Vs.storage.setItem("debug",r):Vs.storage.removeItem("debug")}catch{}}o(ane,"save");function one(){let r;try{r=Vs.storage.getItem("debug")||Vs.storage.getItem("DEBUG")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}o(one,"load");function une(){try{return localStorage}catch{}}o(une,"localstorage");bS.exports=mI()(Vs);var{formatters:cne}=bS.exports;cne.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var I8=Q((cwe,T8)=>{"use strict";T8.exports=(r,e=process.argv)=>{let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),s=e.indexOf("--");return n!==-1&&(s===-1||n<s)}});var D8=Q((lwe,B8)=>{"use strict";var lne=require("os"),_8=require("tty"),Oi=I8(),{env:Pn}=process,Ju;Oi("no-color")||Oi("no-colors")||Oi("color=false")||Oi("color=never")?Ju=0:(Oi("color")||Oi("colors")||Oi("color=true")||Oi("color=always"))&&(Ju=1);"FORCE_COLOR"in Pn&&(Pn.FORCE_COLOR==="true"?Ju=1:Pn.FORCE_COLOR==="false"?Ju=0:Ju=Pn.FORCE_COLOR.length===0?1:Math.min(parseInt(Pn.FORCE_COLOR,10),3));function gI(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}o(gI,"translateLevel");function vI(r,e){if(Ju===0)return 0;if(Oi("color=16m")||Oi("color=full")||Oi("color=truecolor"))return 3;if(Oi("color=256"))return 2;if(r&&!e&&Ju===void 0)return 0;let t=Ju||0;if(Pn.TERM==="dumb")return t;if(process.platform==="win32"){let n=lne.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Pn)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Pn)||Pn.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in Pn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Pn.TEAMCITY_VERSION)?1:0;if(Pn.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Pn){let n=parseInt((Pn.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Pn.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Pn.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Pn.TERM)||"COLORTERM"in Pn?1:t}o(vI,"supportsColor");function fne(r){let e=vI(r,r&&r.isTTY);return gI(e)}o(fne,"getSupportLevel");B8.exports={supportsColor:fne,stdout:gI(vI(!0,_8.isatty(1))),stderr:gI(vI(!0,_8.isatty(2)))}});var O8=Q((kn,AS)=>{"use strict";var hne=require("tty"),ES=require("util");kn.init=xne;kn.log=gne;kn.formatArgs=dne;kn.save=vne;kn.load=yne;kn.useColors=pne;kn.destroy=ES.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");kn.colors=[6,2,3,4,5,1];try{let r=D8();r&&(r.stderr||r).level>=2&&(kn.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}kn.inspectOpts=Object.keys(process.env).filter(r=>/^debug_/i.test(r)).reduce((r,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(s,i)=>i.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),r[t]=n,r},{});function pne(){return"colors"in kn.inspectOpts?!!kn.inspectOpts.colors:hne.isatty(process.stderr.fd)}o(pne,"useColors");function dne(r){let{namespace:e,useColors:t}=this;if(t){let n=this.color,s="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${s};1m${e} \x1B[0m`;r[0]=i+r[0].split(`
|
|
23
|
+
`).join(`
|
|
24
|
+
`+i),r.push(s+"m+"+AS.exports.humanize(this.diff)+"\x1B[0m")}else r[0]=mne()+e+" "+r[0]}o(dne,"formatArgs");function mne(){return kn.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(mne,"getDate");function gne(...r){return process.stderr.write(ES.formatWithOptions(kn.inspectOpts,...r)+`
|
|
25
|
+
`)}o(gne,"log");function vne(r){r?process.env.DEBUG=r:delete process.env.DEBUG}o(vne,"save");function yne(){return process.env.DEBUG}o(yne,"load");function xne(r){r.inspectOpts={};let e=Object.keys(kn.inspectOpts);for(let t=0;t<e.length;t++)r.inspectOpts[e[t]]=kn.inspectOpts[e[t]]}o(xne,"init");AS.exports=mI()(kn);var{formatters:R8}=AS.exports;R8.o=function(r){return this.inspectOpts.colors=this.useColors,ES.inspect(r,this.inspectOpts).split(`
|
|
26
|
+
`).map(e=>e.trim()).join(" ")};R8.O=function(r){return this.inspectOpts.colors=this.useColors,ES.inspect(r,this.inspectOpts)}});var Fp=Q((pwe,yI)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?yI.exports=N8():yI.exports=O8()});var k8=Q((dwe,P8)=>{"use strict";var{PassThrough:wne}=require("stream");P8.exports=r=>{r={...r};let{array:e}=r,{encoding:t}=r,n=t==="buffer",s=!1;e?s=!(t||n):t=t||"utf8",n&&(t=null);let i=new wne({objectMode:s});t&&i.setEncoding(t);let a=0,u=[];return i.on("data",c=>{u.push(c),s?a=u.length:a+=c.length}),i.getBufferedValue=()=>e?u:n?Buffer.concat(u,a):u.join(""),i.getBufferedLength=()=>a,i}});var V8=Q((gwe,Ig)=>{"use strict";var{constants:Sne}=require("buffer"),bne=require("stream"),{promisify:Ene}=require("util"),Ane=k8(),Cne=Ene(bne.pipeline),L8=class extends Error{static{o(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function xI(r,e){if(!r)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:t}=e,n=Ane(e);return await new Promise((s,i)=>{let a=o(u=>{u&&n.getBufferedLength()<=Sne.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),i(u)},"rejectPromise");(async()=>{try{await Cne(r,n),s()}catch(u){a(u)}})(),n.on("data",()=>{n.getBufferedLength()>t&&a(new L8)})}),n.getBufferedValue()}o(xI,"getStream");Ig.exports=xI;Ig.exports.buffer=(r,e)=>xI(r,{...e,encoding:"buffer"});Ig.exports.array=(r,e)=>xI(r,{...e,array:!0});Ig.exports.MaxBufferError=L8});var Uo=Q((Mp,_g)=>{"use strict";(function(){var r,e="4.17.21",t=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",i="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",f=1,h=2,m=4,g=1,x=2,v=1,w=2,S=4,A=8,N=16,b=32,E=64,C=128,_=256,M=512,R=30,q="...",H=800,K=16,G=1,pe=2,le=3,ue=1/0,ee=9007199254740991,he=17976931348623157e292,we=NaN,Ke=4294967295,Ae=Ke-1,xe=Ke>>>1,je=[["ary",C],["bind",v],["bindKey",w],["curry",A],["curryRight",N],["flip",M],["partial",b],["partialRight",E],["rearg",_]],ze="[object Arguments]",Ye="[object Array]",ct="[object AsyncFunction]",P="[object Boolean]",D="[object Date]",se="[object DOMException]",z="[object Error]",Xe="[object Function]",Re="[object GeneratorFunction]",Ce="[object Map]",lt="[object Number]",sr="[object Null]",Fe="[object Object]",ir="[object Promise]",Zs="[object Proxy]",Ge="[object RegExp]",Hr="[object Set]",gn="[object String]",rs="[object Symbol]",Is="[object Undefined]",gs="[object WeakMap]",pt="[object WeakSet]",Ze="[object ArrayBuffer]",Mn="[object DataView]",vs="[object Float32Array]",Ca="[object Float64Array]",Na="[object Int8Array]",Rt="[object Int16Array]",rp="[object Int32Array]",np="[object Uint8Array]",Dl="[object Uint8ClampedArray]",$0="[object Uint16Array]",ei="[object Uint32Array]",d=/\b__p \+= '';/g,I=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,re=/&(?:amp|lt|gt|quot|#39);/g,ae=/[&<>"']/g,X=RegExp(re.source),nt=RegExp(ae.source),Lt=/<%-([\s\S]+?)%>/g,zt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,Bt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qn=/^\w*$/,yi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fr=/[\\^$.*+?()[\]{}|]/g,Ta=RegExp(fr.source),X0=/^\s+/,jx=/\s/,nC=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sC=/\{\n\/\* \[wrapped with (.+)\] \*/,iC=/,? & /,aC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qe=/[()=,{}\[\]\/\s]/,tr=/\\(\\)?/g,ns=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Qi=/\w*$/,oC=/^[-+]0x[0-9a-f]+$/i,JK=/^0b[01]+$/i,YK=/^\[object .+?Constructor\]$/,QK=/^0o[0-7]+$/i,ZK=/^(?:0|[1-9]\d*)$/,e$=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fx=/($^)/,t$=/['\n\r\u2028\u2029\\]/g,Mx="\\ud800-\\udfff",r$="\\u0300-\\u036f",n$="\\ufe20-\\ufe2f",s$="\\u20d0-\\u20ff",sP=r$+n$+s$,iP="\\u2700-\\u27bf",aP="a-z\\xdf-\\xf6\\xf8-\\xff",i$="\\xac\\xb1\\xd7\\xf7",a$="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",o$="\\u2000-\\u206f",u$=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",oP="A-Z\\xc0-\\xd6\\xd8-\\xde",uP="\\ufe0e\\ufe0f",cP=i$+a$+o$+u$,uC="['\u2019]",c$="["+Mx+"]",lP="["+cP+"]",qx="["+sP+"]",fP="\\d+",l$="["+iP+"]",hP="["+aP+"]",pP="[^"+Mx+cP+fP+iP+aP+oP+"]",cC="\\ud83c[\\udffb-\\udfff]",f$="(?:"+qx+"|"+cC+")",dP="[^"+Mx+"]",lC="(?:\\ud83c[\\udde6-\\uddff]){2}",fC="[\\ud800-\\udbff][\\udc00-\\udfff]",sp="["+oP+"]",mP="\\u200d",gP="(?:"+hP+"|"+pP+")",h$="(?:"+sp+"|"+pP+")",vP="(?:"+uC+"(?:d|ll|m|re|s|t|ve))?",yP="(?:"+uC+"(?:D|LL|M|RE|S|T|VE))?",xP=f$+"?",wP="["+uP+"]?",p$="(?:"+mP+"(?:"+[dP,lC,fC].join("|")+")"+wP+xP+")*",d$="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",m$="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",SP=wP+xP+p$,g$="(?:"+[l$,lC,fC].join("|")+")"+SP,v$="(?:"+[dP+qx+"?",qx,lC,fC,c$].join("|")+")",y$=RegExp(uC,"g"),x$=RegExp(qx,"g"),hC=RegExp(cC+"(?="+cC+")|"+v$+SP,"g"),w$=RegExp([sp+"?"+hP+"+"+vP+"(?="+[lP,sp,"$"].join("|")+")",h$+"+"+yP+"(?="+[lP,sp+gP,"$"].join("|")+")",sp+"?"+gP+"+"+vP,sp+"+"+yP,m$,d$,fP,g$].join("|"),"g"),S$=RegExp("["+mP+Mx+sP+uP+"]"),b$=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,E$=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],A$=-1,jr={};jr[vs]=jr[Ca]=jr[Na]=jr[Rt]=jr[rp]=jr[np]=jr[Dl]=jr[$0]=jr[ei]=!0,jr[ze]=jr[Ye]=jr[Ze]=jr[P]=jr[Mn]=jr[D]=jr[z]=jr[Xe]=jr[Ce]=jr[lt]=jr[Fe]=jr[Ge]=jr[Hr]=jr[gn]=jr[gs]=!1;var Dr={};Dr[ze]=Dr[Ye]=Dr[Ze]=Dr[Mn]=Dr[P]=Dr[D]=Dr[vs]=Dr[Ca]=Dr[Na]=Dr[Rt]=Dr[rp]=Dr[Ce]=Dr[lt]=Dr[Fe]=Dr[Ge]=Dr[Hr]=Dr[gn]=Dr[rs]=Dr[np]=Dr[Dl]=Dr[$0]=Dr[ei]=!0,Dr[z]=Dr[Xe]=Dr[gs]=!1;var C$={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},N$={"&":"&","<":"<",">":">",'"':""","'":"'"},T$={"&":"&","<":"<",">":">",""":'"',"'":"'"},I$={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_$=parseFloat,B$=parseInt,bP=typeof global=="object"&&global&&global.Object===Object&&global,D$=typeof self=="object"&&self&&self.Object===Object&&self,In=bP||D$||Function("return this")(),pC=typeof Mp=="object"&&Mp&&!Mp.nodeType&&Mp,Rl=pC&&typeof _g=="object"&&_g&&!_g.nodeType&&_g,EP=Rl&&Rl.exports===pC,dC=EP&&bP.process,xi=(function(){try{var ie=Rl&&Rl.require&&Rl.require("util").types;return ie||dC&&dC.binding&&dC.binding("util")}catch{}})(),AP=xi&&xi.isArrayBuffer,CP=xi&&xi.isDate,NP=xi&&xi.isMap,TP=xi&&xi.isRegExp,IP=xi&&xi.isSet,_P=xi&&xi.isTypedArray;function ti(ie,Ee,ye){switch(ye.length){case 0:return ie.call(Ee);case 1:return ie.call(Ee,ye[0]);case 2:return ie.call(Ee,ye[0],ye[1]);case 3:return ie.call(Ee,ye[0],ye[1],ye[2])}return ie.apply(Ee,ye)}o(ti,"apply");function R$(ie,Ee,ye,ut){for(var Ot=-1,xr=ie==null?0:ie.length;++Ot<xr;){var bn=ie[Ot];Ee(ut,bn,ye(bn),ie)}return ut}o(R$,"arrayAggregator");function wi(ie,Ee){for(var ye=-1,ut=ie==null?0:ie.length;++ye<ut&&Ee(ie[ye],ye,ie)!==!1;);return ie}o(wi,"arrayEach");function O$(ie,Ee){for(var ye=ie==null?0:ie.length;ye--&&Ee(ie[ye],ye,ie)!==!1;);return ie}o(O$,"arrayEachRight");function BP(ie,Ee){for(var ye=-1,ut=ie==null?0:ie.length;++ye<ut;)if(!Ee(ie[ye],ye,ie))return!1;return!0}o(BP,"arrayEvery");function Cu(ie,Ee){for(var ye=-1,ut=ie==null?0:ie.length,Ot=0,xr=[];++ye<ut;){var bn=ie[ye];Ee(bn,ye,ie)&&(xr[Ot++]=bn)}return xr}o(Cu,"arrayFilter");function Hx(ie,Ee){var ye=ie==null?0:ie.length;return!!ye&&ip(ie,Ee,0)>-1}o(Hx,"arrayIncludes");function mC(ie,Ee,ye){for(var ut=-1,Ot=ie==null?0:ie.length;++ut<Ot;)if(ye(Ee,ie[ut]))return!0;return!1}o(mC,"arrayIncludesWith");function Kr(ie,Ee){for(var ye=-1,ut=ie==null?0:ie.length,Ot=Array(ut);++ye<ut;)Ot[ye]=Ee(ie[ye],ye,ie);return Ot}o(Kr,"arrayMap");function Nu(ie,Ee){for(var ye=-1,ut=Ee.length,Ot=ie.length;++ye<ut;)ie[Ot+ye]=Ee[ye];return ie}o(Nu,"arrayPush");function gC(ie,Ee,ye,ut){var Ot=-1,xr=ie==null?0:ie.length;for(ut&&xr&&(ye=ie[++Ot]);++Ot<xr;)ye=Ee(ye,ie[Ot],Ot,ie);return ye}o(gC,"arrayReduce");function P$(ie,Ee,ye,ut){var Ot=ie==null?0:ie.length;for(ut&&Ot&&(ye=ie[--Ot]);Ot--;)ye=Ee(ye,ie[Ot],Ot,ie);return ye}o(P$,"arrayReduceRight");function vC(ie,Ee){for(var ye=-1,ut=ie==null?0:ie.length;++ye<ut;)if(Ee(ie[ye],ye,ie))return!0;return!1}o(vC,"arraySome");var k$=yC("length");function L$(ie){return ie.split("")}o(L$,"asciiToArray");function V$(ie){return ie.match(aC)||[]}o(V$,"asciiWords");function DP(ie,Ee,ye){var ut;return ye(ie,function(Ot,xr,bn){if(Ee(Ot,xr,bn))return ut=xr,!1}),ut}o(DP,"baseFindKey");function Kx(ie,Ee,ye,ut){for(var Ot=ie.length,xr=ye+(ut?1:-1);ut?xr--:++xr<Ot;)if(Ee(ie[xr],xr,ie))return xr;return-1}o(Kx,"baseFindIndex");function ip(ie,Ee,ye){return Ee===Ee?z$(ie,Ee,ye):Kx(ie,RP,ye)}o(ip,"baseIndexOf");function U$(ie,Ee,ye,ut){for(var Ot=ye-1,xr=ie.length;++Ot<xr;)if(ut(ie[Ot],Ee))return Ot;return-1}o(U$,"baseIndexOfWith");function RP(ie){return ie!==ie}o(RP,"baseIsNaN");function OP(ie,Ee){var ye=ie==null?0:ie.length;return ye?wC(ie,Ee)/ye:we}o(OP,"baseMean");function yC(ie){return function(Ee){return Ee==null?r:Ee[ie]}}o(yC,"baseProperty");function xC(ie){return function(Ee){return ie==null?r:ie[Ee]}}o(xC,"basePropertyOf");function PP(ie,Ee,ye,ut,Ot){return Ot(ie,function(xr,bn,Tr){ye=ut?(ut=!1,xr):Ee(ye,xr,bn,Tr)}),ye}o(PP,"baseReduce");function j$(ie,Ee){var ye=ie.length;for(ie.sort(Ee);ye--;)ie[ye]=ie[ye].value;return ie}o(j$,"baseSortBy");function wC(ie,Ee){for(var ye,ut=-1,Ot=ie.length;++ut<Ot;){var xr=Ee(ie[ut]);xr!==r&&(ye=ye===r?xr:ye+xr)}return ye}o(wC,"baseSum");function SC(ie,Ee){for(var ye=-1,ut=Array(ie);++ye<ie;)ut[ye]=Ee(ye);return ut}o(SC,"baseTimes");function F$(ie,Ee){return Kr(Ee,function(ye){return[ye,ie[ye]]})}o(F$,"baseToPairs");function kP(ie){return ie&&ie.slice(0,jP(ie)+1).replace(X0,"")}o(kP,"baseTrim");function ri(ie){return function(Ee){return ie(Ee)}}o(ri,"baseUnary");function bC(ie,Ee){return Kr(Ee,function(ye){return ie[ye]})}o(bC,"baseValues");function G0(ie,Ee){return ie.has(Ee)}o(G0,"cacheHas");function LP(ie,Ee){for(var ye=-1,ut=ie.length;++ye<ut&&ip(Ee,ie[ye],0)>-1;);return ye}o(LP,"charsStartIndex");function VP(ie,Ee){for(var ye=ie.length;ye--&&ip(Ee,ie[ye],0)>-1;);return ye}o(VP,"charsEndIndex");function M$(ie,Ee){for(var ye=ie.length,ut=0;ye--;)ie[ye]===Ee&&++ut;return ut}o(M$,"countHolders");var q$=xC(C$),H$=xC(N$);function K$(ie){return"\\"+I$[ie]}o(K$,"escapeStringChar");function $$(ie,Ee){return ie==null?r:ie[Ee]}o($$,"getValue");function ap(ie){return S$.test(ie)}o(ap,"hasUnicode");function X$(ie){return b$.test(ie)}o(X$,"hasUnicodeWord");function G$(ie){for(var Ee,ye=[];!(Ee=ie.next()).done;)ye.push(Ee.value);return ye}o(G$,"iteratorToArray");function EC(ie){var Ee=-1,ye=Array(ie.size);return ie.forEach(function(ut,Ot){ye[++Ee]=[Ot,ut]}),ye}o(EC,"mapToArray");function UP(ie,Ee){return function(ye){return ie(Ee(ye))}}o(UP,"overArg");function Tu(ie,Ee){for(var ye=-1,ut=ie.length,Ot=0,xr=[];++ye<ut;){var bn=ie[ye];(bn===Ee||bn===c)&&(ie[ye]=c,xr[Ot++]=ye)}return xr}o(Tu,"replaceHolders");function $x(ie){var Ee=-1,ye=Array(ie.size);return ie.forEach(function(ut){ye[++Ee]=ut}),ye}o($x,"setToArray");function W$(ie){var Ee=-1,ye=Array(ie.size);return ie.forEach(function(ut){ye[++Ee]=[ut,ut]}),ye}o(W$,"setToPairs");function z$(ie,Ee,ye){for(var ut=ye-1,Ot=ie.length;++ut<Ot;)if(ie[ut]===Ee)return ut;return-1}o(z$,"strictIndexOf");function J$(ie,Ee,ye){for(var ut=ye+1;ut--;)if(ie[ut]===Ee)return ut;return ut}o(J$,"strictLastIndexOf");function op(ie){return ap(ie)?Q$(ie):k$(ie)}o(op,"stringSize");function Zi(ie){return ap(ie)?Z$(ie):L$(ie)}o(Zi,"stringToArray");function jP(ie){for(var Ee=ie.length;Ee--&&jx.test(ie.charAt(Ee)););return Ee}o(jP,"trimmedEndIndex");var Y$=xC(T$);function Q$(ie){for(var Ee=hC.lastIndex=0;hC.test(ie);)++Ee;return Ee}o(Q$,"unicodeSize");function Z$(ie){return ie.match(hC)||[]}o(Z$,"unicodeToArray");function eX(ie){return ie.match(w$)||[]}o(eX,"unicodeWords");var tX=o(function ie(Ee){Ee=Ee==null?In:Iu.defaults(In.Object(),Ee,Iu.pick(In,E$));var ye=Ee.Array,ut=Ee.Date,Ot=Ee.Error,xr=Ee.Function,bn=Ee.Math,Tr=Ee.Object,AC=Ee.RegExp,rX=Ee.String,Si=Ee.TypeError,Xx=ye.prototype,nX=xr.prototype,up=Tr.prototype,Gx=Ee["__core-js_shared__"],Wx=nX.toString,Er=up.hasOwnProperty,sX=0,FP=(function(){var l=/[^.]+$/.exec(Gx&&Gx.keys&&Gx.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),zx=up.toString,iX=Wx.call(Tr),aX=In._,oX=AC("^"+Wx.call(Er).replace(fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jx=EP?Ee.Buffer:r,_u=Ee.Symbol,Yx=Ee.Uint8Array,MP=Jx?Jx.allocUnsafe:r,Qx=UP(Tr.getPrototypeOf,Tr),qP=Tr.create,HP=up.propertyIsEnumerable,Zx=Xx.splice,KP=_u?_u.isConcatSpreadable:r,W0=_u?_u.iterator:r,Ol=_u?_u.toStringTag:r,ew=(function(){try{var l=Ul(Tr,"defineProperty");return l({},"",{}),l}catch{}})(),uX=Ee.clearTimeout!==In.clearTimeout&&Ee.clearTimeout,cX=ut&&ut.now!==In.Date.now&&ut.now,lX=Ee.setTimeout!==In.setTimeout&&Ee.setTimeout,tw=bn.ceil,rw=bn.floor,CC=Tr.getOwnPropertySymbols,fX=Jx?Jx.isBuffer:r,$P=Ee.isFinite,hX=Xx.join,pX=UP(Tr.keys,Tr),En=bn.max,ss=bn.min,dX=ut.now,mX=Ee.parseInt,XP=bn.random,gX=Xx.reverse,NC=Ul(Ee,"DataView"),z0=Ul(Ee,"Map"),TC=Ul(Ee,"Promise"),cp=Ul(Ee,"Set"),J0=Ul(Ee,"WeakMap"),Y0=Ul(Tr,"create"),nw=J0&&new J0,lp={},vX=jl(NC),yX=jl(z0),xX=jl(TC),wX=jl(cp),SX=jl(J0),sw=_u?_u.prototype:r,Q0=sw?sw.valueOf:r,GP=sw?sw.toString:r;function j(l){if(tn(l)&&!Vt(l)&&!(l instanceof rr)){if(l instanceof bi)return l;if(Er.call(l,"__wrapped__"))return W3(l)}return new bi(l)}o(j,"lodash");var fp=(function(){function l(){}return o(l,"object"),function(p){if(!Gr(p))return{};if(qP)return qP(p);l.prototype=p;var y=new l;return l.prototype=r,y}})();function iw(){}o(iw,"baseLodash");function bi(l,p){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=r}o(bi,"LodashWrapper"),j.templateSettings={escape:Lt,evaluate:zt,interpolate:et,variable:"",imports:{_:j}},j.prototype=iw.prototype,j.prototype.constructor=j,bi.prototype=fp(iw.prototype),bi.prototype.constructor=bi;function rr(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ke,this.__views__=[]}o(rr,"LazyWrapper");function bX(){var l=new rr(this.__wrapped__);return l.__actions__=_s(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=_s(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=_s(this.__views__),l}o(bX,"lazyClone");function EX(){if(this.__filtered__){var l=new rr(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}o(EX,"lazyReverse");function AX(){var l=this.__wrapped__.value(),p=this.__dir__,y=Vt(l),T=p<0,O=y?l.length:0,F=LG(0,O,this.__views__),J=F.start,Z=F.end,ce=Z-J,Ne=T?Z:J-1,Be=this.__iteratees__,Le=Be.length,Je=0,ht=ss(ce,this.__takeCount__);if(!y||!T&&O==ce&&ht==ce)return v3(l,this.__actions__);var At=[];e:for(;ce--&&Je<ht;){Ne+=p;for(var $t=-1,Ct=l[Ne];++$t<Le;){var Jt=Be[$t],ar=Jt.iteratee,ii=Jt.type,ws=ar(Ct);if(ii==pe)Ct=ws;else if(!ws){if(ii==G)continue e;break e}}At[Je++]=Ct}return At}o(AX,"lazyValue"),rr.prototype=fp(iw.prototype),rr.prototype.constructor=rr;function Pl(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var T=l[p];this.set(T[0],T[1])}}o(Pl,"Hash");function CX(){this.__data__=Y0?Y0(null):{},this.size=0}o(CX,"hashClear");function NX(l){var p=this.has(l)&&delete this.__data__[l];return this.size-=p?1:0,p}o(NX,"hashDelete");function TX(l){var p=this.__data__;if(Y0){var y=p[l];return y===a?r:y}return Er.call(p,l)?p[l]:r}o(TX,"hashGet");function IX(l){var p=this.__data__;return Y0?p[l]!==r:Er.call(p,l)}o(IX,"hashHas");function _X(l,p){var y=this.__data__;return this.size+=this.has(l)?0:1,y[l]=Y0&&p===r?a:p,this}o(_X,"hashSet"),Pl.prototype.clear=CX,Pl.prototype.delete=NX,Pl.prototype.get=TX,Pl.prototype.has=IX,Pl.prototype.set=_X;function Eo(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var T=l[p];this.set(T[0],T[1])}}o(Eo,"ListCache");function BX(){this.__data__=[],this.size=0}o(BX,"listCacheClear");function DX(l){var p=this.__data__,y=aw(p,l);if(y<0)return!1;var T=p.length-1;return y==T?p.pop():Zx.call(p,y,1),--this.size,!0}o(DX,"listCacheDelete");function RX(l){var p=this.__data__,y=aw(p,l);return y<0?r:p[y][1]}o(RX,"listCacheGet");function OX(l){return aw(this.__data__,l)>-1}o(OX,"listCacheHas");function PX(l,p){var y=this.__data__,T=aw(y,l);return T<0?(++this.size,y.push([l,p])):y[T][1]=p,this}o(PX,"listCacheSet"),Eo.prototype.clear=BX,Eo.prototype.delete=DX,Eo.prototype.get=RX,Eo.prototype.has=OX,Eo.prototype.set=PX;function Ao(l){var p=-1,y=l==null?0:l.length;for(this.clear();++p<y;){var T=l[p];this.set(T[0],T[1])}}o(Ao,"MapCache");function kX(){this.size=0,this.__data__={hash:new Pl,map:new(z0||Eo),string:new Pl}}o(kX,"mapCacheClear");function LX(l){var p=yw(this,l).delete(l);return this.size-=p?1:0,p}o(LX,"mapCacheDelete");function VX(l){return yw(this,l).get(l)}o(VX,"mapCacheGet");function UX(l){return yw(this,l).has(l)}o(UX,"mapCacheHas");function jX(l,p){var y=yw(this,l),T=y.size;return y.set(l,p),this.size+=y.size==T?0:1,this}o(jX,"mapCacheSet"),Ao.prototype.clear=kX,Ao.prototype.delete=LX,Ao.prototype.get=VX,Ao.prototype.has=UX,Ao.prototype.set=jX;function kl(l){var p=-1,y=l==null?0:l.length;for(this.__data__=new Ao;++p<y;)this.add(l[p])}o(kl,"SetCache");function FX(l){return this.__data__.set(l,a),this}o(FX,"setCacheAdd");function MX(l){return this.__data__.has(l)}o(MX,"setCacheHas"),kl.prototype.add=kl.prototype.push=FX,kl.prototype.has=MX;function ea(l){var p=this.__data__=new Eo(l);this.size=p.size}o(ea,"Stack");function qX(){this.__data__=new Eo,this.size=0}o(qX,"stackClear");function HX(l){var p=this.__data__,y=p.delete(l);return this.size=p.size,y}o(HX,"stackDelete");function KX(l){return this.__data__.get(l)}o(KX,"stackGet");function $X(l){return this.__data__.has(l)}o($X,"stackHas");function XX(l,p){var y=this.__data__;if(y instanceof Eo){var T=y.__data__;if(!z0||T.length<t-1)return T.push([l,p]),this.size=++y.size,this;y=this.__data__=new Ao(T)}return y.set(l,p),this.size=y.size,this}o(XX,"stackSet"),ea.prototype.clear=qX,ea.prototype.delete=HX,ea.prototype.get=KX,ea.prototype.has=$X,ea.prototype.set=XX;function WP(l,p){var y=Vt(l),T=!y&&Fl(l),O=!y&&!T&&Pu(l),F=!y&&!T&&!O&&mp(l),J=y||T||O||F,Z=J?SC(l.length,rX):[],ce=Z.length;for(var Ne in l)(p||Er.call(l,Ne))&&!(J&&(Ne=="length"||O&&(Ne=="offset"||Ne=="parent")||F&&(Ne=="buffer"||Ne=="byteLength"||Ne=="byteOffset")||Io(Ne,ce)))&&Z.push(Ne);return Z}o(WP,"arrayLikeKeys");function zP(l){var p=l.length;return p?l[UC(0,p-1)]:r}o(zP,"arraySample");function GX(l,p){return xw(_s(l),Ll(p,0,l.length))}o(GX,"arraySampleSize");function WX(l){return xw(_s(l))}o(WX,"arrayShuffle");function IC(l,p,y){(y!==r&&!ta(l[p],y)||y===r&&!(p in l))&&Co(l,p,y)}o(IC,"assignMergeValue");function Z0(l,p,y){var T=l[p];(!(Er.call(l,p)&&ta(T,y))||y===r&&!(p in l))&&Co(l,p,y)}o(Z0,"assignValue");function aw(l,p){for(var y=l.length;y--;)if(ta(l[y][0],p))return y;return-1}o(aw,"assocIndexOf");function zX(l,p,y,T){return Bu(l,function(O,F,J){p(T,O,y(O),J)}),T}o(zX,"baseAggregator");function JP(l,p){return l&&_a(p,_n(p),l)}o(JP,"baseAssign");function JX(l,p){return l&&_a(p,Ds(p),l)}o(JX,"baseAssignIn");function Co(l,p,y){p=="__proto__"&&ew?ew(l,p,{configurable:!0,enumerable:!0,value:y,writable:!0}):l[p]=y}o(Co,"baseAssignValue");function _C(l,p){for(var y=-1,T=p.length,O=ye(T),F=l==null;++y<T;)O[y]=F?r:cN(l,p[y]);return O}o(_C,"baseAt");function Ll(l,p,y){return l===l&&(y!==r&&(l=l<=y?l:y),p!==r&&(l=l>=p?l:p)),l}o(Ll,"baseClamp");function Ei(l,p,y,T,O,F){var J,Z=p&f,ce=p&h,Ne=p&m;if(y&&(J=O?y(l,T,O,F):y(l)),J!==r)return J;if(!Gr(l))return l;var Be=Vt(l);if(Be){if(J=UG(l),!Z)return _s(l,J)}else{var Le=is(l),Je=Le==Xe||Le==Re;if(Pu(l))return w3(l,Z);if(Le==Fe||Le==ze||Je&&!O){if(J=ce||Je?{}:j3(l),!Z)return ce?TG(l,JX(J,l)):NG(l,JP(J,l))}else{if(!Dr[Le])return O?l:{};J=jG(l,Le,Z)}}F||(F=new ea);var ht=F.get(l);if(ht)return ht;F.set(l,J),dk(l)?l.forEach(function(Ct){J.add(Ei(Ct,p,y,Ct,l,F))}):hk(l)&&l.forEach(function(Ct,Jt){J.set(Jt,Ei(Ct,p,y,Jt,l,F))});var At=Ne?ce?zC:WC:ce?Ds:_n,$t=Be?r:At(l);return wi($t||l,function(Ct,Jt){$t&&(Jt=Ct,Ct=l[Jt]),Z0(J,Jt,Ei(Ct,p,y,Jt,l,F))}),J}o(Ei,"baseClone");function YX(l){var p=_n(l);return function(y){return YP(y,l,p)}}o(YX,"baseConforms");function YP(l,p,y){var T=y.length;if(l==null)return!T;for(l=Tr(l);T--;){var O=y[T],F=p[O],J=l[O];if(J===r&&!(O in l)||!F(J))return!1}return!0}o(YP,"baseConformsTo");function QP(l,p,y){if(typeof l!="function")throw new Si(s);return ag(function(){l.apply(r,y)},p)}o(QP,"baseDelay");function eg(l,p,y,T){var O=-1,F=Hx,J=!0,Z=l.length,ce=[],Ne=p.length;if(!Z)return ce;y&&(p=Kr(p,ri(y))),T?(F=mC,J=!1):p.length>=t&&(F=G0,J=!1,p=new kl(p));e:for(;++O<Z;){var Be=l[O],Le=y==null?Be:y(Be);if(Be=T||Be!==0?Be:0,J&&Le===Le){for(var Je=Ne;Je--;)if(p[Je]===Le)continue e;ce.push(Be)}else F(p,Le,T)||ce.push(Be)}return ce}o(eg,"baseDifference");var Bu=C3(Ia),ZP=C3(DC,!0);function QX(l,p){var y=!0;return Bu(l,function(T,O,F){return y=!!p(T,O,F),y}),y}o(QX,"baseEvery");function ow(l,p,y){for(var T=-1,O=l.length;++T<O;){var F=l[T],J=p(F);if(J!=null&&(Z===r?J===J&&!si(J):y(J,Z)))var Z=J,ce=F}return ce}o(ow,"baseExtremum");function ZX(l,p,y,T){var O=l.length;for(y=Mt(y),y<0&&(y=-y>O?0:O+y),T=T===r||T>O?O:Mt(T),T<0&&(T+=O),T=y>T?0:gk(T);y<T;)l[y++]=p;return l}o(ZX,"baseFill");function e3(l,p){var y=[];return Bu(l,function(T,O,F){p(T,O,F)&&y.push(T)}),y}o(e3,"baseFilter");function Hn(l,p,y,T,O){var F=-1,J=l.length;for(y||(y=MG),O||(O=[]);++F<J;){var Z=l[F];p>0&&y(Z)?p>1?Hn(Z,p-1,y,T,O):Nu(O,Z):T||(O[O.length]=Z)}return O}o(Hn,"baseFlatten");var BC=N3(),t3=N3(!0);function Ia(l,p){return l&&BC(l,p,_n)}o(Ia,"baseForOwn");function DC(l,p){return l&&t3(l,p,_n)}o(DC,"baseForOwnRight");function uw(l,p){return Cu(p,function(y){return _o(l[y])})}o(uw,"baseFunctions");function Vl(l,p){p=Ru(p,l);for(var y=0,T=p.length;l!=null&&y<T;)l=l[Ba(p[y++])];return y&&y==T?l:r}o(Vl,"baseGet");function r3(l,p,y){var T=p(l);return Vt(l)?T:Nu(T,y(l))}o(r3,"baseGetAllKeys");function ys(l){return l==null?l===r?Is:sr:Ol&&Ol in Tr(l)?kG(l):WG(l)}o(ys,"baseGetTag");function RC(l,p){return l>p}o(RC,"baseGt");function eG(l,p){return l!=null&&Er.call(l,p)}o(eG,"baseHas");function tG(l,p){return l!=null&&p in Tr(l)}o(tG,"baseHasIn");function rG(l,p,y){return l>=ss(p,y)&&l<En(p,y)}o(rG,"baseInRange");function OC(l,p,y){for(var T=y?mC:Hx,O=l[0].length,F=l.length,J=F,Z=ye(F),ce=1/0,Ne=[];J--;){var Be=l[J];J&&p&&(Be=Kr(Be,ri(p))),ce=ss(Be.length,ce),Z[J]=!y&&(p||O>=120&&Be.length>=120)?new kl(J&&Be):r}Be=l[0];var Le=-1,Je=Z[0];e:for(;++Le<O&&Ne.length<ce;){var ht=Be[Le],At=p?p(ht):ht;if(ht=y||ht!==0?ht:0,!(Je?G0(Je,At):T(Ne,At,y))){for(J=F;--J;){var $t=Z[J];if(!($t?G0($t,At):T(l[J],At,y)))continue e}Je&&Je.push(At),Ne.push(ht)}}return Ne}o(OC,"baseIntersection");function nG(l,p,y,T){return Ia(l,function(O,F,J){p(T,y(O),F,J)}),T}o(nG,"baseInverter");function tg(l,p,y){p=Ru(p,l),l=H3(l,p);var T=l==null?l:l[Ba(Ci(p))];return T==null?r:ti(T,l,y)}o(tg,"baseInvoke");function n3(l){return tn(l)&&ys(l)==ze}o(n3,"baseIsArguments");function sG(l){return tn(l)&&ys(l)==Ze}o(sG,"baseIsArrayBuffer");function iG(l){return tn(l)&&ys(l)==D}o(iG,"baseIsDate");function rg(l,p,y,T,O){return l===p?!0:l==null||p==null||!tn(l)&&!tn(p)?l!==l&&p!==p:aG(l,p,y,T,rg,O)}o(rg,"baseIsEqual");function aG(l,p,y,T,O,F){var J=Vt(l),Z=Vt(p),ce=J?Ye:is(l),Ne=Z?Ye:is(p);ce=ce==ze?Fe:ce,Ne=Ne==ze?Fe:Ne;var Be=ce==Fe,Le=Ne==Fe,Je=ce==Ne;if(Je&&Pu(l)){if(!Pu(p))return!1;J=!0,Be=!1}if(Je&&!Be)return F||(F=new ea),J||mp(l)?L3(l,p,y,T,O,F):OG(l,p,ce,y,T,O,F);if(!(y&g)){var ht=Be&&Er.call(l,"__wrapped__"),At=Le&&Er.call(p,"__wrapped__");if(ht||At){var $t=ht?l.value():l,Ct=At?p.value():p;return F||(F=new ea),O($t,Ct,y,T,F)}}return Je?(F||(F=new ea),PG(l,p,y,T,O,F)):!1}o(aG,"baseIsEqualDeep");function oG(l){return tn(l)&&is(l)==Ce}o(oG,"baseIsMap");function PC(l,p,y,T){var O=y.length,F=O,J=!T;if(l==null)return!F;for(l=Tr(l);O--;){var Z=y[O];if(J&&Z[2]?Z[1]!==l[Z[0]]:!(Z[0]in l))return!1}for(;++O<F;){Z=y[O];var ce=Z[0],Ne=l[ce],Be=Z[1];if(J&&Z[2]){if(Ne===r&&!(ce in l))return!1}else{var Le=new ea;if(T)var Je=T(Ne,Be,ce,l,p,Le);if(!(Je===r?rg(Be,Ne,g|x,T,Le):Je))return!1}}return!0}o(PC,"baseIsMatch");function s3(l){if(!Gr(l)||HG(l))return!1;var p=_o(l)?oX:YK;return p.test(jl(l))}o(s3,"baseIsNative");function uG(l){return tn(l)&&ys(l)==Ge}o(uG,"baseIsRegExp");function cG(l){return tn(l)&&is(l)==Hr}o(cG,"baseIsSet");function lG(l){return tn(l)&&Cw(l.length)&&!!jr[ys(l)]}o(lG,"baseIsTypedArray");function i3(l){return typeof l=="function"?l:l==null?Rs:typeof l=="object"?Vt(l)?u3(l[0],l[1]):o3(l):Tk(l)}o(i3,"baseIteratee");function kC(l){if(!ig(l))return pX(l);var p=[];for(var y in Tr(l))Er.call(l,y)&&y!="constructor"&&p.push(y);return p}o(kC,"baseKeys");function fG(l){if(!Gr(l))return GG(l);var p=ig(l),y=[];for(var T in l)T=="constructor"&&(p||!Er.call(l,T))||y.push(T);return y}o(fG,"baseKeysIn");function LC(l,p){return l<p}o(LC,"baseLt");function a3(l,p){var y=-1,T=Bs(l)?ye(l.length):[];return Bu(l,function(O,F,J){T[++y]=p(O,F,J)}),T}o(a3,"baseMap");function o3(l){var p=YC(l);return p.length==1&&p[0][2]?M3(p[0][0],p[0][1]):function(y){return y===l||PC(y,l,p)}}o(o3,"baseMatches");function u3(l,p){return ZC(l)&&F3(p)?M3(Ba(l),p):function(y){var T=cN(y,l);return T===r&&T===p?lN(y,l):rg(p,T,g|x)}}o(u3,"baseMatchesProperty");function cw(l,p,y,T,O){l!==p&&BC(p,function(F,J){if(O||(O=new ea),Gr(F))hG(l,p,J,y,cw,T,O);else{var Z=T?T(tN(l,J),F,J+"",l,p,O):r;Z===r&&(Z=F),IC(l,J,Z)}},Ds)}o(cw,"baseMerge");function hG(l,p,y,T,O,F,J){var Z=tN(l,y),ce=tN(p,y),Ne=J.get(ce);if(Ne){IC(l,y,Ne);return}var Be=F?F(Z,ce,y+"",l,p,J):r,Le=Be===r;if(Le){var Je=Vt(ce),ht=!Je&&Pu(ce),At=!Je&&!ht&&mp(ce);Be=ce,Je||ht||At?Vt(Z)?Be=Z:cn(Z)?Be=_s(Z):ht?(Le=!1,Be=w3(ce,!0)):At?(Le=!1,Be=S3(ce,!0)):Be=[]:og(ce)||Fl(ce)?(Be=Z,Fl(Z)?Be=vk(Z):(!Gr(Z)||_o(Z))&&(Be=j3(ce))):Le=!1}Le&&(J.set(ce,Be),O(Be,ce,T,F,J),J.delete(ce)),IC(l,y,Be)}o(hG,"baseMergeDeep");function c3(l,p){var y=l.length;if(y)return p+=p<0?y:0,Io(p,y)?l[p]:r}o(c3,"baseNth");function l3(l,p,y){p.length?p=Kr(p,function(F){return Vt(F)?function(J){return Vl(J,F.length===1?F[0]:F)}:F}):p=[Rs];var T=-1;p=Kr(p,ri(wt()));var O=a3(l,function(F,J,Z){var ce=Kr(p,function(Ne){return Ne(F)});return{criteria:ce,index:++T,value:F}});return j$(O,function(F,J){return CG(F,J,y)})}o(l3,"baseOrderBy");function pG(l,p){return f3(l,p,function(y,T){return lN(l,T)})}o(pG,"basePick");function f3(l,p,y){for(var T=-1,O=p.length,F={};++T<O;){var J=p[T],Z=Vl(l,J);y(Z,J)&&ng(F,Ru(J,l),Z)}return F}o(f3,"basePickBy");function dG(l){return function(p){return Vl(p,l)}}o(dG,"basePropertyDeep");function VC(l,p,y,T){var O=T?U$:ip,F=-1,J=p.length,Z=l;for(l===p&&(p=_s(p)),y&&(Z=Kr(l,ri(y)));++F<J;)for(var ce=0,Ne=p[F],Be=y?y(Ne):Ne;(ce=O(Z,Be,ce,T))>-1;)Z!==l&&Zx.call(Z,ce,1),Zx.call(l,ce,1);return l}o(VC,"basePullAll");function h3(l,p){for(var y=l?p.length:0,T=y-1;y--;){var O=p[y];if(y==T||O!==F){var F=O;Io(O)?Zx.call(l,O,1):MC(l,O)}}return l}o(h3,"basePullAt");function UC(l,p){return l+rw(XP()*(p-l+1))}o(UC,"baseRandom");function mG(l,p,y,T){for(var O=-1,F=En(tw((p-l)/(y||1)),0),J=ye(F);F--;)J[T?F:++O]=l,l+=y;return J}o(mG,"baseRange");function jC(l,p){var y="";if(!l||p<1||p>ee)return y;do p%2&&(y+=l),p=rw(p/2),p&&(l+=l);while(p);return y}o(jC,"baseRepeat");function Wt(l,p){return rN(q3(l,p,Rs),l+"")}o(Wt,"baseRest");function gG(l){return zP(gp(l))}o(gG,"baseSample");function vG(l,p){var y=gp(l);return xw(y,Ll(p,0,y.length))}o(vG,"baseSampleSize");function ng(l,p,y,T){if(!Gr(l))return l;p=Ru(p,l);for(var O=-1,F=p.length,J=F-1,Z=l;Z!=null&&++O<F;){var ce=Ba(p[O]),Ne=y;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return l;if(O!=J){var Be=Z[ce];Ne=T?T(Be,ce,Z):r,Ne===r&&(Ne=Gr(Be)?Be:Io(p[O+1])?[]:{})}Z0(Z,ce,Ne),Z=Z[ce]}return l}o(ng,"baseSet");var p3=nw?function(l,p){return nw.set(l,p),l}:Rs,yG=ew?function(l,p){return ew(l,"toString",{configurable:!0,enumerable:!1,value:hN(p),writable:!0})}:Rs;function xG(l){return xw(gp(l))}o(xG,"baseShuffle");function Ai(l,p,y){var T=-1,O=l.length;p<0&&(p=-p>O?0:O+p),y=y>O?O:y,y<0&&(y+=O),O=p>y?0:y-p>>>0,p>>>=0;for(var F=ye(O);++T<O;)F[T]=l[T+p];return F}o(Ai,"baseSlice");function wG(l,p){var y;return Bu(l,function(T,O,F){return y=p(T,O,F),!y}),!!y}o(wG,"baseSome");function lw(l,p,y){var T=0,O=l==null?T:l.length;if(typeof p=="number"&&p===p&&O<=xe){for(;T<O;){var F=T+O>>>1,J=l[F];J!==null&&!si(J)&&(y?J<=p:J<p)?T=F+1:O=F}return O}return FC(l,p,Rs,y)}o(lw,"baseSortedIndex");function FC(l,p,y,T){var O=0,F=l==null?0:l.length;if(F===0)return 0;p=y(p);for(var J=p!==p,Z=p===null,ce=si(p),Ne=p===r;O<F;){var Be=rw((O+F)/2),Le=y(l[Be]),Je=Le!==r,ht=Le===null,At=Le===Le,$t=si(Le);if(J)var Ct=T||At;else Ne?Ct=At&&(T||Je):Z?Ct=At&&Je&&(T||!ht):ce?Ct=At&&Je&&!ht&&(T||!$t):ht||$t?Ct=!1:Ct=T?Le<=p:Le<p;Ct?O=Be+1:F=Be}return ss(F,Ae)}o(FC,"baseSortedIndexBy");function d3(l,p){for(var y=-1,T=l.length,O=0,F=[];++y<T;){var J=l[y],Z=p?p(J):J;if(!y||!ta(Z,ce)){var ce=Z;F[O++]=J===0?0:J}}return F}o(d3,"baseSortedUniq");function m3(l){return typeof l=="number"?l:si(l)?we:+l}o(m3,"baseToNumber");function ni(l){if(typeof l=="string")return l;if(Vt(l))return Kr(l,ni)+"";if(si(l))return GP?GP.call(l):"";var p=l+"";return p=="0"&&1/l==-ue?"-0":p}o(ni,"baseToString");function Du(l,p,y){var T=-1,O=Hx,F=l.length,J=!0,Z=[],ce=Z;if(y)J=!1,O=mC;else if(F>=t){var Ne=p?null:DG(l);if(Ne)return $x(Ne);J=!1,O=G0,ce=new kl}else ce=p?[]:Z;e:for(;++T<F;){var Be=l[T],Le=p?p(Be):Be;if(Be=y||Be!==0?Be:0,J&&Le===Le){for(var Je=ce.length;Je--;)if(ce[Je]===Le)continue e;p&&ce.push(Le),Z.push(Be)}else O(ce,Le,y)||(ce!==Z&&ce.push(Le),Z.push(Be))}return Z}o(Du,"baseUniq");function MC(l,p){return p=Ru(p,l),l=H3(l,p),l==null||delete l[Ba(Ci(p))]}o(MC,"baseUnset");function g3(l,p,y,T){return ng(l,p,y(Vl(l,p)),T)}o(g3,"baseUpdate");function fw(l,p,y,T){for(var O=l.length,F=T?O:-1;(T?F--:++F<O)&&p(l[F],F,l););return y?Ai(l,T?0:F,T?F+1:O):Ai(l,T?F+1:0,T?O:F)}o(fw,"baseWhile");function v3(l,p){var y=l;return y instanceof rr&&(y=y.value()),gC(p,function(T,O){return O.func.apply(O.thisArg,Nu([T],O.args))},y)}o(v3,"baseWrapperValue");function qC(l,p,y){var T=l.length;if(T<2)return T?Du(l[0]):[];for(var O=-1,F=ye(T);++O<T;)for(var J=l[O],Z=-1;++Z<T;)Z!=O&&(F[O]=eg(F[O]||J,l[Z],p,y));return Du(Hn(F,1),p,y)}o(qC,"baseXor");function y3(l,p,y){for(var T=-1,O=l.length,F=p.length,J={};++T<O;){var Z=T<F?p[T]:r;y(J,l[T],Z)}return J}o(y3,"baseZipObject");function HC(l){return cn(l)?l:[]}o(HC,"castArrayLikeObject");function KC(l){return typeof l=="function"?l:Rs}o(KC,"castFunction");function Ru(l,p){return Vt(l)?l:ZC(l,p)?[l]:G3(wr(l))}o(Ru,"castPath");var SG=Wt;function Ou(l,p,y){var T=l.length;return y=y===r?T:y,!p&&y>=T?l:Ai(l,p,y)}o(Ou,"castSlice");var x3=uX||function(l){return In.clearTimeout(l)};function w3(l,p){if(p)return l.slice();var y=l.length,T=MP?MP(y):new l.constructor(y);return l.copy(T),T}o(w3,"cloneBuffer");function $C(l){var p=new l.constructor(l.byteLength);return new Yx(p).set(new Yx(l)),p}o($C,"cloneArrayBuffer");function bG(l,p){var y=p?$C(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.byteLength)}o(bG,"cloneDataView");function EG(l){var p=new l.constructor(l.source,Qi.exec(l));return p.lastIndex=l.lastIndex,p}o(EG,"cloneRegExp");function AG(l){return Q0?Tr(Q0.call(l)):{}}o(AG,"cloneSymbol");function S3(l,p){var y=p?$C(l.buffer):l.buffer;return new l.constructor(y,l.byteOffset,l.length)}o(S3,"cloneTypedArray");function b3(l,p){if(l!==p){var y=l!==r,T=l===null,O=l===l,F=si(l),J=p!==r,Z=p===null,ce=p===p,Ne=si(p);if(!Z&&!Ne&&!F&&l>p||F&&J&&ce&&!Z&&!Ne||T&&J&&ce||!y&&ce||!O)return 1;if(!T&&!F&&!Ne&&l<p||Ne&&y&&O&&!T&&!F||Z&&y&&O||!J&&O||!ce)return-1}return 0}o(b3,"compareAscending");function CG(l,p,y){for(var T=-1,O=l.criteria,F=p.criteria,J=O.length,Z=y.length;++T<J;){var ce=b3(O[T],F[T]);if(ce){if(T>=Z)return ce;var Ne=y[T];return ce*(Ne=="desc"?-1:1)}}return l.index-p.index}o(CG,"compareMultiple");function E3(l,p,y,T){for(var O=-1,F=l.length,J=y.length,Z=-1,ce=p.length,Ne=En(F-J,0),Be=ye(ce+Ne),Le=!T;++Z<ce;)Be[Z]=p[Z];for(;++O<J;)(Le||O<F)&&(Be[y[O]]=l[O]);for(;Ne--;)Be[Z++]=l[O++];return Be}o(E3,"composeArgs");function A3(l,p,y,T){for(var O=-1,F=l.length,J=-1,Z=y.length,ce=-1,Ne=p.length,Be=En(F-Z,0),Le=ye(Be+Ne),Je=!T;++O<Be;)Le[O]=l[O];for(var ht=O;++ce<Ne;)Le[ht+ce]=p[ce];for(;++J<Z;)(Je||O<F)&&(Le[ht+y[J]]=l[O++]);return Le}o(A3,"composeArgsRight");function _s(l,p){var y=-1,T=l.length;for(p||(p=ye(T));++y<T;)p[y]=l[y];return p}o(_s,"copyArray");function _a(l,p,y,T){var O=!y;y||(y={});for(var F=-1,J=p.length;++F<J;){var Z=p[F],ce=T?T(y[Z],l[Z],Z,y,l):r;ce===r&&(ce=l[Z]),O?Co(y,Z,ce):Z0(y,Z,ce)}return y}o(_a,"copyObject");function NG(l,p){return _a(l,QC(l),p)}o(NG,"copySymbols");function TG(l,p){return _a(l,V3(l),p)}o(TG,"copySymbolsIn");function hw(l,p){return function(y,T){var O=Vt(y)?R$:zX,F=p?p():{};return O(y,l,wt(T,2),F)}}o(hw,"createAggregator");function hp(l){return Wt(function(p,y){var T=-1,O=y.length,F=O>1?y[O-1]:r,J=O>2?y[2]:r;for(F=l.length>3&&typeof F=="function"?(O--,F):r,J&&xs(y[0],y[1],J)&&(F=O<3?r:F,O=1),p=Tr(p);++T<O;){var Z=y[T];Z&&l(p,Z,T,F)}return p})}o(hp,"createAssigner");function C3(l,p){return function(y,T){if(y==null)return y;if(!Bs(y))return l(y,T);for(var O=y.length,F=p?O:-1,J=Tr(y);(p?F--:++F<O)&&T(J[F],F,J)!==!1;);return y}}o(C3,"createBaseEach");function N3(l){return function(p,y,T){for(var O=-1,F=Tr(p),J=T(p),Z=J.length;Z--;){var ce=J[l?Z:++O];if(y(F[ce],ce,F)===!1)break}return p}}o(N3,"createBaseFor");function IG(l,p,y){var T=p&v,O=sg(l);function F(){var J=this&&this!==In&&this instanceof F?O:l;return J.apply(T?y:this,arguments)}return o(F,"wrapper"),F}o(IG,"createBind");function T3(l){return function(p){p=wr(p);var y=ap(p)?Zi(p):r,T=y?y[0]:p.charAt(0),O=y?Ou(y,1).join(""):p.slice(1);return T[l]()+O}}o(T3,"createCaseFirst");function pp(l){return function(p){return gC(Ck(Ak(p).replace(y$,"")),l,"")}}o(pp,"createCompounder");function sg(l){return function(){var p=arguments;switch(p.length){case 0:return new l;case 1:return new l(p[0]);case 2:return new l(p[0],p[1]);case 3:return new l(p[0],p[1],p[2]);case 4:return new l(p[0],p[1],p[2],p[3]);case 5:return new l(p[0],p[1],p[2],p[3],p[4]);case 6:return new l(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new l(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var y=fp(l.prototype),T=l.apply(y,p);return Gr(T)?T:y}}o(sg,"createCtor");function _G(l,p,y){var T=sg(l);function O(){for(var F=arguments.length,J=ye(F),Z=F,ce=dp(O);Z--;)J[Z]=arguments[Z];var Ne=F<3&&J[0]!==ce&&J[F-1]!==ce?[]:Tu(J,ce);if(F-=Ne.length,F<y)return R3(l,p,pw,O.placeholder,r,J,Ne,r,r,y-F);var Be=this&&this!==In&&this instanceof O?T:l;return ti(Be,this,J)}return o(O,"wrapper"),O}o(_G,"createCurry");function I3(l){return function(p,y,T){var O=Tr(p);if(!Bs(p)){var F=wt(y,3);p=_n(p),y=o(function(Z){return F(O[Z],Z,O)},"predicate")}var J=l(p,y,T);return J>-1?O[F?p[J]:J]:r}}o(I3,"createFind");function _3(l){return To(function(p){var y=p.length,T=y,O=bi.prototype.thru;for(l&&p.reverse();T--;){var F=p[T];if(typeof F!="function")throw new Si(s);if(O&&!J&&vw(F)=="wrapper")var J=new bi([],!0)}for(T=J?T:y;++T<y;){F=p[T];var Z=vw(F),ce=Z=="wrapper"?JC(F):r;ce&&eN(ce[0])&&ce[1]==(C|A|b|_)&&!ce[4].length&&ce[9]==1?J=J[vw(ce[0])].apply(J,ce[3]):J=F.length==1&&eN(F)?J[Z]():J.thru(F)}return function(){var Ne=arguments,Be=Ne[0];if(J&&Ne.length==1&&Vt(Be))return J.plant(Be).value();for(var Le=0,Je=y?p[Le].apply(this,Ne):Be;++Le<y;)Je=p[Le].call(this,Je);return Je}})}o(_3,"createFlow");function pw(l,p,y,T,O,F,J,Z,ce,Ne){var Be=p&C,Le=p&v,Je=p&w,ht=p&(A|N),At=p&M,$t=Je?r:sg(l);function Ct(){for(var Jt=arguments.length,ar=ye(Jt),ii=Jt;ii--;)ar[ii]=arguments[ii];if(ht)var ws=dp(Ct),ai=M$(ar,ws);if(T&&(ar=E3(ar,T,O,ht)),F&&(ar=A3(ar,F,J,ht)),Jt-=ai,ht&&Jt<Ne){var ln=Tu(ar,ws);return R3(l,p,pw,Ct.placeholder,y,ar,ln,Z,ce,Ne-Jt)}var ra=Le?y:this,Do=Je?ra[l]:l;return Jt=ar.length,Z?ar=zG(ar,Z):At&&Jt>1&&ar.reverse(),Be&&ce<Jt&&(ar.length=ce),this&&this!==In&&this instanceof Ct&&(Do=$t||sg(Do)),Do.apply(ra,ar)}return o(Ct,"wrapper"),Ct}o(pw,"createHybrid");function B3(l,p){return function(y,T){return nG(y,l,p(T),{})}}o(B3,"createInverter");function dw(l,p){return function(y,T){var O;if(y===r&&T===r)return p;if(y!==r&&(O=y),T!==r){if(O===r)return T;typeof y=="string"||typeof T=="string"?(y=ni(y),T=ni(T)):(y=m3(y),T=m3(T)),O=l(y,T)}return O}}o(dw,"createMathOperation");function XC(l){return To(function(p){return p=Kr(p,ri(wt())),Wt(function(y){var T=this;return l(p,function(O){return ti(O,T,y)})})})}o(XC,"createOver");function mw(l,p){p=p===r?" ":ni(p);var y=p.length;if(y<2)return y?jC(p,l):p;var T=jC(p,tw(l/op(p)));return ap(p)?Ou(Zi(T),0,l).join(""):T.slice(0,l)}o(mw,"createPadding");function BG(l,p,y,T){var O=p&v,F=sg(l);function J(){for(var Z=-1,ce=arguments.length,Ne=-1,Be=T.length,Le=ye(Be+ce),Je=this&&this!==In&&this instanceof J?F:l;++Ne<Be;)Le[Ne]=T[Ne];for(;ce--;)Le[Ne++]=arguments[++Z];return ti(Je,O?y:this,Le)}return o(J,"wrapper"),J}o(BG,"createPartial");function D3(l){return function(p,y,T){return T&&typeof T!="number"&&xs(p,y,T)&&(y=T=r),p=Bo(p),y===r?(y=p,p=0):y=Bo(y),T=T===r?p<y?1:-1:Bo(T),mG(p,y,T,l)}}o(D3,"createRange");function gw(l){return function(p,y){return typeof p=="string"&&typeof y=="string"||(p=Ni(p),y=Ni(y)),l(p,y)}}o(gw,"createRelationalOperation");function R3(l,p,y,T,O,F,J,Z,ce,Ne){var Be=p&A,Le=Be?J:r,Je=Be?r:J,ht=Be?F:r,At=Be?r:F;p|=Be?b:E,p&=~(Be?E:b),p&S||(p&=~(v|w));var $t=[l,p,O,ht,Le,At,Je,Z,ce,Ne],Ct=y.apply(r,$t);return eN(l)&&K3(Ct,$t),Ct.placeholder=T,$3(Ct,l,p)}o(R3,"createRecurry");function GC(l){var p=bn[l];return function(y,T){if(y=Ni(y),T=T==null?0:ss(Mt(T),292),T&&$P(y)){var O=(wr(y)+"e").split("e"),F=p(O[0]+"e"+(+O[1]+T));return O=(wr(F)+"e").split("e"),+(O[0]+"e"+(+O[1]-T))}return p(y)}}o(GC,"createRound");var DG=cp&&1/$x(new cp([,-0]))[1]==ue?function(l){return new cp(l)}:mN;function O3(l){return function(p){var y=is(p);return y==Ce?EC(p):y==Hr?W$(p):F$(p,l(p))}}o(O3,"createToPairs");function No(l,p,y,T,O,F,J,Z){var ce=p&w;if(!ce&&typeof l!="function")throw new Si(s);var Ne=T?T.length:0;if(Ne||(p&=~(b|E),T=O=r),J=J===r?J:En(Mt(J),0),Z=Z===r?Z:Mt(Z),Ne-=O?O.length:0,p&E){var Be=T,Le=O;T=O=r}var Je=ce?r:JC(l),ht=[l,p,y,T,O,Be,Le,F,J,Z];if(Je&&XG(ht,Je),l=ht[0],p=ht[1],y=ht[2],T=ht[3],O=ht[4],Z=ht[9]=ht[9]===r?ce?0:l.length:En(ht[9]-Ne,0),!Z&&p&(A|N)&&(p&=~(A|N)),!p||p==v)var At=IG(l,p,y);else p==A||p==N?At=_G(l,p,Z):(p==b||p==(v|b))&&!O.length?At=BG(l,p,y,T):At=pw.apply(r,ht);var $t=Je?p3:K3;return $3($t(At,ht),l,p)}o(No,"createWrap");function P3(l,p,y,T){return l===r||ta(l,up[y])&&!Er.call(T,y)?p:l}o(P3,"customDefaultsAssignIn");function k3(l,p,y,T,O,F){return Gr(l)&&Gr(p)&&(F.set(p,l),cw(l,p,r,k3,F),F.delete(p)),l}o(k3,"customDefaultsMerge");function RG(l){return og(l)?r:l}o(RG,"customOmitClone");function L3(l,p,y,T,O,F){var J=y&g,Z=l.length,ce=p.length;if(Z!=ce&&!(J&&ce>Z))return!1;var Ne=F.get(l),Be=F.get(p);if(Ne&&Be)return Ne==p&&Be==l;var Le=-1,Je=!0,ht=y&x?new kl:r;for(F.set(l,p),F.set(p,l);++Le<Z;){var At=l[Le],$t=p[Le];if(T)var Ct=J?T($t,At,Le,p,l,F):T(At,$t,Le,l,p,F);if(Ct!==r){if(Ct)continue;Je=!1;break}if(ht){if(!vC(p,function(Jt,ar){if(!G0(ht,ar)&&(At===Jt||O(At,Jt,y,T,F)))return ht.push(ar)})){Je=!1;break}}else if(!(At===$t||O(At,$t,y,T,F))){Je=!1;break}}return F.delete(l),F.delete(p),Je}o(L3,"equalArrays");function OG(l,p,y,T,O,F,J){switch(y){case Mn:if(l.byteLength!=p.byteLength||l.byteOffset!=p.byteOffset)return!1;l=l.buffer,p=p.buffer;case Ze:return!(l.byteLength!=p.byteLength||!F(new Yx(l),new Yx(p)));case P:case D:case lt:return ta(+l,+p);case z:return l.name==p.name&&l.message==p.message;case Ge:case gn:return l==p+"";case Ce:var Z=EC;case Hr:var ce=T&g;if(Z||(Z=$x),l.size!=p.size&&!ce)return!1;var Ne=J.get(l);if(Ne)return Ne==p;T|=x,J.set(l,p);var Be=L3(Z(l),Z(p),T,O,F,J);return J.delete(l),Be;case rs:if(Q0)return Q0.call(l)==Q0.call(p)}return!1}o(OG,"equalByTag");function PG(l,p,y,T,O,F){var J=y&g,Z=WC(l),ce=Z.length,Ne=WC(p),Be=Ne.length;if(ce!=Be&&!J)return!1;for(var Le=ce;Le--;){var Je=Z[Le];if(!(J?Je in p:Er.call(p,Je)))return!1}var ht=F.get(l),At=F.get(p);if(ht&&At)return ht==p&&At==l;var $t=!0;F.set(l,p),F.set(p,l);for(var Ct=J;++Le<ce;){Je=Z[Le];var Jt=l[Je],ar=p[Je];if(T)var ii=J?T(ar,Jt,Je,p,l,F):T(Jt,ar,Je,l,p,F);if(!(ii===r?Jt===ar||O(Jt,ar,y,T,F):ii)){$t=!1;break}Ct||(Ct=Je=="constructor")}if($t&&!Ct){var ws=l.constructor,ai=p.constructor;ws!=ai&&"constructor"in l&&"constructor"in p&&!(typeof ws=="function"&&ws instanceof ws&&typeof ai=="function"&&ai instanceof ai)&&($t=!1)}return F.delete(l),F.delete(p),$t}o(PG,"equalObjects");function To(l){return rN(q3(l,r,Y3),l+"")}o(To,"flatRest");function WC(l){return r3(l,_n,QC)}o(WC,"getAllKeys");function zC(l){return r3(l,Ds,V3)}o(zC,"getAllKeysIn");var JC=nw?function(l){return nw.get(l)}:mN;function vw(l){for(var p=l.name+"",y=lp[p],T=Er.call(lp,p)?y.length:0;T--;){var O=y[T],F=O.func;if(F==null||F==l)return O.name}return p}o(vw,"getFuncName");function dp(l){var p=Er.call(j,"placeholder")?j:l;return p.placeholder}o(dp,"getHolder");function wt(){var l=j.iteratee||pN;return l=l===pN?i3:l,arguments.length?l(arguments[0],arguments[1]):l}o(wt,"getIteratee");function yw(l,p){var y=l.__data__;return qG(p)?y[typeof p=="string"?"string":"hash"]:y.map}o(yw,"getMapData");function YC(l){for(var p=_n(l),y=p.length;y--;){var T=p[y],O=l[T];p[y]=[T,O,F3(O)]}return p}o(YC,"getMatchData");function Ul(l,p){var y=$$(l,p);return s3(y)?y:r}o(Ul,"getNative");function kG(l){var p=Er.call(l,Ol),y=l[Ol];try{l[Ol]=r;var T=!0}catch{}var O=zx.call(l);return T&&(p?l[Ol]=y:delete l[Ol]),O}o(kG,"getRawTag");var QC=CC?function(l){return l==null?[]:(l=Tr(l),Cu(CC(l),function(p){return HP.call(l,p)}))}:gN,V3=CC?function(l){for(var p=[];l;)Nu(p,QC(l)),l=Qx(l);return p}:gN,is=ys;(NC&&is(new NC(new ArrayBuffer(1)))!=Mn||z0&&is(new z0)!=Ce||TC&&is(TC.resolve())!=ir||cp&&is(new cp)!=Hr||J0&&is(new J0)!=gs)&&(is=o(function(l){var p=ys(l),y=p==Fe?l.constructor:r,T=y?jl(y):"";if(T)switch(T){case vX:return Mn;case yX:return Ce;case xX:return ir;case wX:return Hr;case SX:return gs}return p},"getTag"));function LG(l,p,y){for(var T=-1,O=y.length;++T<O;){var F=y[T],J=F.size;switch(F.type){case"drop":l+=J;break;case"dropRight":p-=J;break;case"take":p=ss(p,l+J);break;case"takeRight":l=En(l,p-J);break}}return{start:l,end:p}}o(LG,"getView");function VG(l){var p=l.match(sC);return p?p[1].split(iC):[]}o(VG,"getWrapDetails");function U3(l,p,y){p=Ru(p,l);for(var T=-1,O=p.length,F=!1;++T<O;){var J=Ba(p[T]);if(!(F=l!=null&&y(l,J)))break;l=l[J]}return F||++T!=O?F:(O=l==null?0:l.length,!!O&&Cw(O)&&Io(J,O)&&(Vt(l)||Fl(l)))}o(U3,"hasPath");function UG(l){var p=l.length,y=new l.constructor(p);return p&&typeof l[0]=="string"&&Er.call(l,"index")&&(y.index=l.index,y.input=l.input),y}o(UG,"initCloneArray");function j3(l){return typeof l.constructor=="function"&&!ig(l)?fp(Qx(l)):{}}o(j3,"initCloneObject");function jG(l,p,y){var T=l.constructor;switch(p){case Ze:return $C(l);case P:case D:return new T(+l);case Mn:return bG(l,y);case vs:case Ca:case Na:case Rt:case rp:case np:case Dl:case $0:case ei:return S3(l,y);case Ce:return new T;case lt:case gn:return new T(l);case Ge:return EG(l);case Hr:return new T;case rs:return AG(l)}}o(jG,"initCloneByTag");function FG(l,p){var y=p.length;if(!y)return l;var T=y-1;return p[T]=(y>1?"& ":"")+p[T],p=p.join(y>2?", ":" "),l.replace(nC,`{
|
|
27
|
+
/* [wrapped with `+p+`] */
|
|
28
|
+
`)}o(FG,"insertWrapDetails");function MG(l){return Vt(l)||Fl(l)||!!(KP&&l&&l[KP])}o(MG,"isFlattenable");function Io(l,p){var y=typeof l;return p=p??ee,!!p&&(y=="number"||y!="symbol"&&ZK.test(l))&&l>-1&&l%1==0&&l<p}o(Io,"isIndex");function xs(l,p,y){if(!Gr(y))return!1;var T=typeof p;return(T=="number"?Bs(y)&&Io(p,y.length):T=="string"&&p in y)?ta(y[p],l):!1}o(xs,"isIterateeCall");function ZC(l,p){if(Vt(l))return!1;var y=typeof l;return y=="number"||y=="symbol"||y=="boolean"||l==null||si(l)?!0:qn.test(l)||!Bt.test(l)||p!=null&&l in Tr(p)}o(ZC,"isKey");function qG(l){var p=typeof l;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?l!=="__proto__":l===null}o(qG,"isKeyable");function eN(l){var p=vw(l),y=j[p];if(typeof y!="function"||!(p in rr.prototype))return!1;if(l===y)return!0;var T=JC(y);return!!T&&l===T[0]}o(eN,"isLaziable");function HG(l){return!!FP&&FP in l}o(HG,"isMasked");var KG=Gx?_o:vN;function ig(l){var p=l&&l.constructor,y=typeof p=="function"&&p.prototype||up;return l===y}o(ig,"isPrototype");function F3(l){return l===l&&!Gr(l)}o(F3,"isStrictComparable");function M3(l,p){return function(y){return y==null?!1:y[l]===p&&(p!==r||l in Tr(y))}}o(M3,"matchesStrictComparable");function $G(l){var p=Ew(l,function(T){return y.size===u&&y.clear(),T}),y=p.cache;return p}o($G,"memoizeCapped");function XG(l,p){var y=l[1],T=p[1],O=y|T,F=O<(v|w|C),J=T==C&&y==A||T==C&&y==_&&l[7].length<=p[8]||T==(C|_)&&p[7].length<=p[8]&&y==A;if(!(F||J))return l;T&v&&(l[2]=p[2],O|=y&v?0:S);var Z=p[3];if(Z){var ce=l[3];l[3]=ce?E3(ce,Z,p[4]):Z,l[4]=ce?Tu(l[3],c):p[4]}return Z=p[5],Z&&(ce=l[5],l[5]=ce?A3(ce,Z,p[6]):Z,l[6]=ce?Tu(l[5],c):p[6]),Z=p[7],Z&&(l[7]=Z),T&C&&(l[8]=l[8]==null?p[8]:ss(l[8],p[8])),l[9]==null&&(l[9]=p[9]),l[0]=p[0],l[1]=O,l}o(XG,"mergeData");function GG(l){var p=[];if(l!=null)for(var y in Tr(l))p.push(y);return p}o(GG,"nativeKeysIn");function WG(l){return zx.call(l)}o(WG,"objectToString");function q3(l,p,y){return p=En(p===r?l.length-1:p,0),function(){for(var T=arguments,O=-1,F=En(T.length-p,0),J=ye(F);++O<F;)J[O]=T[p+O];O=-1;for(var Z=ye(p+1);++O<p;)Z[O]=T[O];return Z[p]=y(J),ti(l,this,Z)}}o(q3,"overRest");function H3(l,p){return p.length<2?l:Vl(l,Ai(p,0,-1))}o(H3,"parent");function zG(l,p){for(var y=l.length,T=ss(p.length,y),O=_s(l);T--;){var F=p[T];l[T]=Io(F,y)?O[F]:r}return l}o(zG,"reorder");function tN(l,p){if(!(p==="constructor"&&typeof l[p]=="function")&&p!="__proto__")return l[p]}o(tN,"safeGet");var K3=X3(p3),ag=lX||function(l,p){return In.setTimeout(l,p)},rN=X3(yG);function $3(l,p,y){var T=p+"";return rN(l,FG(T,JG(VG(T),y)))}o($3,"setWrapToString");function X3(l){var p=0,y=0;return function(){var T=dX(),O=K-(T-y);if(y=T,O>0){if(++p>=H)return arguments[0]}else p=0;return l.apply(r,arguments)}}o(X3,"shortOut");function xw(l,p){var y=-1,T=l.length,O=T-1;for(p=p===r?T:p;++y<p;){var F=UC(y,O),J=l[F];l[F]=l[y],l[y]=J}return l.length=p,l}o(xw,"shuffleSelf");var G3=$G(function(l){var p=[];return l.charCodeAt(0)===46&&p.push(""),l.replace(yi,function(y,T,O,F){p.push(O?F.replace(tr,"$1"):T||y)}),p});function Ba(l){if(typeof l=="string"||si(l))return l;var p=l+"";return p=="0"&&1/l==-ue?"-0":p}o(Ba,"toKey");function jl(l){if(l!=null){try{return Wx.call(l)}catch{}try{return l+""}catch{}}return""}o(jl,"toSource");function JG(l,p){return wi(je,function(y){var T="_."+y[0];p&y[1]&&!Hx(l,T)&&l.push(T)}),l.sort()}o(JG,"updateWrapDetails");function W3(l){if(l instanceof rr)return l.clone();var p=new bi(l.__wrapped__,l.__chain__);return p.__actions__=_s(l.__actions__),p.__index__=l.__index__,p.__values__=l.__values__,p}o(W3,"wrapperClone");function YG(l,p,y){(y?xs(l,p,y):p===r)?p=1:p=En(Mt(p),0);var T=l==null?0:l.length;if(!T||p<1)return[];for(var O=0,F=0,J=ye(tw(T/p));O<T;)J[F++]=Ai(l,O,O+=p);return J}o(YG,"chunk");function QG(l){for(var p=-1,y=l==null?0:l.length,T=0,O=[];++p<y;){var F=l[p];F&&(O[T++]=F)}return O}o(QG,"compact");function ZG(){var l=arguments.length;if(!l)return[];for(var p=ye(l-1),y=arguments[0],T=l;T--;)p[T-1]=arguments[T];return Nu(Vt(y)?_s(y):[y],Hn(p,1))}o(ZG,"concat");var eW=Wt(function(l,p){return cn(l)?eg(l,Hn(p,1,cn,!0)):[]}),tW=Wt(function(l,p){var y=Ci(p);return cn(y)&&(y=r),cn(l)?eg(l,Hn(p,1,cn,!0),wt(y,2)):[]}),rW=Wt(function(l,p){var y=Ci(p);return cn(y)&&(y=r),cn(l)?eg(l,Hn(p,1,cn,!0),r,y):[]});function nW(l,p,y){var T=l==null?0:l.length;return T?(p=y||p===r?1:Mt(p),Ai(l,p<0?0:p,T)):[]}o(nW,"drop");function sW(l,p,y){var T=l==null?0:l.length;return T?(p=y||p===r?1:Mt(p),p=T-p,Ai(l,0,p<0?0:p)):[]}o(sW,"dropRight");function iW(l,p){return l&&l.length?fw(l,wt(p,3),!0,!0):[]}o(iW,"dropRightWhile");function aW(l,p){return l&&l.length?fw(l,wt(p,3),!0):[]}o(aW,"dropWhile");function oW(l,p,y,T){var O=l==null?0:l.length;return O?(y&&typeof y!="number"&&xs(l,p,y)&&(y=0,T=O),ZX(l,p,y,T)):[]}o(oW,"fill");function z3(l,p,y){var T=l==null?0:l.length;if(!T)return-1;var O=y==null?0:Mt(y);return O<0&&(O=En(T+O,0)),Kx(l,wt(p,3),O)}o(z3,"findIndex");function J3(l,p,y){var T=l==null?0:l.length;if(!T)return-1;var O=T-1;return y!==r&&(O=Mt(y),O=y<0?En(T+O,0):ss(O,T-1)),Kx(l,wt(p,3),O,!0)}o(J3,"findLastIndex");function Y3(l){var p=l==null?0:l.length;return p?Hn(l,1):[]}o(Y3,"flatten");function uW(l){var p=l==null?0:l.length;return p?Hn(l,ue):[]}o(uW,"flattenDeep");function cW(l,p){var y=l==null?0:l.length;return y?(p=p===r?1:Mt(p),Hn(l,p)):[]}o(cW,"flattenDepth");function lW(l){for(var p=-1,y=l==null?0:l.length,T={};++p<y;){var O=l[p];T[O[0]]=O[1]}return T}o(lW,"fromPairs");function Q3(l){return l&&l.length?l[0]:r}o(Q3,"head");function fW(l,p,y){var T=l==null?0:l.length;if(!T)return-1;var O=y==null?0:Mt(y);return O<0&&(O=En(T+O,0)),ip(l,p,O)}o(fW,"indexOf");function hW(l){var p=l==null?0:l.length;return p?Ai(l,0,-1):[]}o(hW,"initial");var pW=Wt(function(l){var p=Kr(l,HC);return p.length&&p[0]===l[0]?OC(p):[]}),dW=Wt(function(l){var p=Ci(l),y=Kr(l,HC);return p===Ci(y)?p=r:y.pop(),y.length&&y[0]===l[0]?OC(y,wt(p,2)):[]}),mW=Wt(function(l){var p=Ci(l),y=Kr(l,HC);return p=typeof p=="function"?p:r,p&&y.pop(),y.length&&y[0]===l[0]?OC(y,r,p):[]});function gW(l,p){return l==null?"":hX.call(l,p)}o(gW,"join");function Ci(l){var p=l==null?0:l.length;return p?l[p-1]:r}o(Ci,"last");function vW(l,p,y){var T=l==null?0:l.length;if(!T)return-1;var O=T;return y!==r&&(O=Mt(y),O=O<0?En(T+O,0):ss(O,T-1)),p===p?J$(l,p,O):Kx(l,RP,O,!0)}o(vW,"lastIndexOf");function yW(l,p){return l&&l.length?c3(l,Mt(p)):r}o(yW,"nth");var xW=Wt(Z3);function Z3(l,p){return l&&l.length&&p&&p.length?VC(l,p):l}o(Z3,"pullAll");function wW(l,p,y){return l&&l.length&&p&&p.length?VC(l,p,wt(y,2)):l}o(wW,"pullAllBy");function SW(l,p,y){return l&&l.length&&p&&p.length?VC(l,p,r,y):l}o(SW,"pullAllWith");var bW=To(function(l,p){var y=l==null?0:l.length,T=_C(l,p);return h3(l,Kr(p,function(O){return Io(O,y)?+O:O}).sort(b3)),T});function EW(l,p){var y=[];if(!(l&&l.length))return y;var T=-1,O=[],F=l.length;for(p=wt(p,3);++T<F;){var J=l[T];p(J,T,l)&&(y.push(J),O.push(T))}return h3(l,O),y}o(EW,"remove");function nN(l){return l==null?l:gX.call(l)}o(nN,"reverse");function AW(l,p,y){var T=l==null?0:l.length;return T?(y&&typeof y!="number"&&xs(l,p,y)?(p=0,y=T):(p=p==null?0:Mt(p),y=y===r?T:Mt(y)),Ai(l,p,y)):[]}o(AW,"slice");function CW(l,p){return lw(l,p)}o(CW,"sortedIndex");function NW(l,p,y){return FC(l,p,wt(y,2))}o(NW,"sortedIndexBy");function TW(l,p){var y=l==null?0:l.length;if(y){var T=lw(l,p);if(T<y&&ta(l[T],p))return T}return-1}o(TW,"sortedIndexOf");function IW(l,p){return lw(l,p,!0)}o(IW,"sortedLastIndex");function _W(l,p,y){return FC(l,p,wt(y,2),!0)}o(_W,"sortedLastIndexBy");function BW(l,p){var y=l==null?0:l.length;if(y){var T=lw(l,p,!0)-1;if(ta(l[T],p))return T}return-1}o(BW,"sortedLastIndexOf");function DW(l){return l&&l.length?d3(l):[]}o(DW,"sortedUniq");function RW(l,p){return l&&l.length?d3(l,wt(p,2)):[]}o(RW,"sortedUniqBy");function OW(l){var p=l==null?0:l.length;return p?Ai(l,1,p):[]}o(OW,"tail");function PW(l,p,y){return l&&l.length?(p=y||p===r?1:Mt(p),Ai(l,0,p<0?0:p)):[]}o(PW,"take");function kW(l,p,y){var T=l==null?0:l.length;return T?(p=y||p===r?1:Mt(p),p=T-p,Ai(l,p<0?0:p,T)):[]}o(kW,"takeRight");function LW(l,p){return l&&l.length?fw(l,wt(p,3),!1,!0):[]}o(LW,"takeRightWhile");function VW(l,p){return l&&l.length?fw(l,wt(p,3)):[]}o(VW,"takeWhile");var UW=Wt(function(l){return Du(Hn(l,1,cn,!0))}),jW=Wt(function(l){var p=Ci(l);return cn(p)&&(p=r),Du(Hn(l,1,cn,!0),wt(p,2))}),FW=Wt(function(l){var p=Ci(l);return p=typeof p=="function"?p:r,Du(Hn(l,1,cn,!0),r,p)});function MW(l){return l&&l.length?Du(l):[]}o(MW,"uniq");function qW(l,p){return l&&l.length?Du(l,wt(p,2)):[]}o(qW,"uniqBy");function HW(l,p){return p=typeof p=="function"?p:r,l&&l.length?Du(l,r,p):[]}o(HW,"uniqWith");function sN(l){if(!(l&&l.length))return[];var p=0;return l=Cu(l,function(y){if(cn(y))return p=En(y.length,p),!0}),SC(p,function(y){return Kr(l,yC(y))})}o(sN,"unzip");function ek(l,p){if(!(l&&l.length))return[];var y=sN(l);return p==null?y:Kr(y,function(T){return ti(p,r,T)})}o(ek,"unzipWith");var KW=Wt(function(l,p){return cn(l)?eg(l,p):[]}),$W=Wt(function(l){return qC(Cu(l,cn))}),XW=Wt(function(l){var p=Ci(l);return cn(p)&&(p=r),qC(Cu(l,cn),wt(p,2))}),GW=Wt(function(l){var p=Ci(l);return p=typeof p=="function"?p:r,qC(Cu(l,cn),r,p)}),WW=Wt(sN);function zW(l,p){return y3(l||[],p||[],Z0)}o(zW,"zipObject");function JW(l,p){return y3(l||[],p||[],ng)}o(JW,"zipObjectDeep");var YW=Wt(function(l){var p=l.length,y=p>1?l[p-1]:r;return y=typeof y=="function"?(l.pop(),y):r,ek(l,y)});function tk(l){var p=j(l);return p.__chain__=!0,p}o(tk,"chain");function QW(l,p){return p(l),l}o(QW,"tap");function ww(l,p){return p(l)}o(ww,"thru");var ZW=To(function(l){var p=l.length,y=p?l[0]:0,T=this.__wrapped__,O=o(function(F){return _C(F,l)},"interceptor");return p>1||this.__actions__.length||!(T instanceof rr)||!Io(y)?this.thru(O):(T=T.slice(y,+y+(p?1:0)),T.__actions__.push({func:ww,args:[O],thisArg:r}),new bi(T,this.__chain__).thru(function(F){return p&&!F.length&&F.push(r),F}))});function ez(){return tk(this)}o(ez,"wrapperChain");function tz(){return new bi(this.value(),this.__chain__)}o(tz,"wrapperCommit");function rz(){this.__values__===r&&(this.__values__=mk(this.value()));var l=this.__index__>=this.__values__.length,p=l?r:this.__values__[this.__index__++];return{done:l,value:p}}o(rz,"wrapperNext");function nz(){return this}o(nz,"wrapperToIterator");function sz(l){for(var p,y=this;y instanceof iw;){var T=W3(y);T.__index__=0,T.__values__=r,p?O.__wrapped__=T:p=T;var O=T;y=y.__wrapped__}return O.__wrapped__=l,p}o(sz,"wrapperPlant");function iz(){var l=this.__wrapped__;if(l instanceof rr){var p=l;return this.__actions__.length&&(p=new rr(this)),p=p.reverse(),p.__actions__.push({func:ww,args:[nN],thisArg:r}),new bi(p,this.__chain__)}return this.thru(nN)}o(iz,"wrapperReverse");function az(){return v3(this.__wrapped__,this.__actions__)}o(az,"wrapperValue");var oz=hw(function(l,p,y){Er.call(l,y)?++l[y]:Co(l,y,1)});function uz(l,p,y){var T=Vt(l)?BP:QX;return y&&xs(l,p,y)&&(p=r),T(l,wt(p,3))}o(uz,"every");function cz(l,p){var y=Vt(l)?Cu:e3;return y(l,wt(p,3))}o(cz,"filter");var lz=I3(z3),fz=I3(J3);function hz(l,p){return Hn(Sw(l,p),1)}o(hz,"flatMap");function pz(l,p){return Hn(Sw(l,p),ue)}o(pz,"flatMapDeep");function dz(l,p,y){return y=y===r?1:Mt(y),Hn(Sw(l,p),y)}o(dz,"flatMapDepth");function rk(l,p){var y=Vt(l)?wi:Bu;return y(l,wt(p,3))}o(rk,"forEach");function nk(l,p){var y=Vt(l)?O$:ZP;return y(l,wt(p,3))}o(nk,"forEachRight");var mz=hw(function(l,p,y){Er.call(l,y)?l[y].push(p):Co(l,y,[p])});function gz(l,p,y,T){l=Bs(l)?l:gp(l),y=y&&!T?Mt(y):0;var O=l.length;return y<0&&(y=En(O+y,0)),Nw(l)?y<=O&&l.indexOf(p,y)>-1:!!O&&ip(l,p,y)>-1}o(gz,"includes");var vz=Wt(function(l,p,y){var T=-1,O=typeof p=="function",F=Bs(l)?ye(l.length):[];return Bu(l,function(J){F[++T]=O?ti(p,J,y):tg(J,p,y)}),F}),yz=hw(function(l,p,y){Co(l,y,p)});function Sw(l,p){var y=Vt(l)?Kr:a3;return y(l,wt(p,3))}o(Sw,"map");function xz(l,p,y,T){return l==null?[]:(Vt(p)||(p=p==null?[]:[p]),y=T?r:y,Vt(y)||(y=y==null?[]:[y]),l3(l,p,y))}o(xz,"orderBy");var wz=hw(function(l,p,y){l[y?0:1].push(p)},function(){return[[],[]]});function Sz(l,p,y){var T=Vt(l)?gC:PP,O=arguments.length<3;return T(l,wt(p,4),y,O,Bu)}o(Sz,"reduce");function bz(l,p,y){var T=Vt(l)?P$:PP,O=arguments.length<3;return T(l,wt(p,4),y,O,ZP)}o(bz,"reduceRight");function Ez(l,p){var y=Vt(l)?Cu:e3;return y(l,Aw(wt(p,3)))}o(Ez,"reject");function Az(l){var p=Vt(l)?zP:gG;return p(l)}o(Az,"sample");function Cz(l,p,y){(y?xs(l,p,y):p===r)?p=1:p=Mt(p);var T=Vt(l)?GX:vG;return T(l,p)}o(Cz,"sampleSize");function Nz(l){var p=Vt(l)?WX:xG;return p(l)}o(Nz,"shuffle");function Tz(l){if(l==null)return 0;if(Bs(l))return Nw(l)?op(l):l.length;var p=is(l);return p==Ce||p==Hr?l.size:kC(l).length}o(Tz,"size");function Iz(l,p,y){var T=Vt(l)?vC:wG;return y&&xs(l,p,y)&&(p=r),T(l,wt(p,3))}o(Iz,"some");var _z=Wt(function(l,p){if(l==null)return[];var y=p.length;return y>1&&xs(l,p[0],p[1])?p=[]:y>2&&xs(p[0],p[1],p[2])&&(p=[p[0]]),l3(l,Hn(p,1),[])}),bw=cX||function(){return In.Date.now()};function Bz(l,p){if(typeof p!="function")throw new Si(s);return l=Mt(l),function(){if(--l<1)return p.apply(this,arguments)}}o(Bz,"after");function sk(l,p,y){return p=y?r:p,p=l&&p==null?l.length:p,No(l,C,r,r,r,r,p)}o(sk,"ary");function ik(l,p){var y;if(typeof p!="function")throw new Si(s);return l=Mt(l),function(){return--l>0&&(y=p.apply(this,arguments)),l<=1&&(p=r),y}}o(ik,"before");var iN=Wt(function(l,p,y){var T=v;if(y.length){var O=Tu(y,dp(iN));T|=b}return No(l,T,p,y,O)}),ak=Wt(function(l,p,y){var T=v|w;if(y.length){var O=Tu(y,dp(ak));T|=b}return No(p,T,l,y,O)});function ok(l,p,y){p=y?r:p;var T=No(l,A,r,r,r,r,r,p);return T.placeholder=ok.placeholder,T}o(ok,"curry");function uk(l,p,y){p=y?r:p;var T=No(l,N,r,r,r,r,r,p);return T.placeholder=uk.placeholder,T}o(uk,"curryRight");function ck(l,p,y){var T,O,F,J,Z,ce,Ne=0,Be=!1,Le=!1,Je=!0;if(typeof l!="function")throw new Si(s);p=Ni(p)||0,Gr(y)&&(Be=!!y.leading,Le="maxWait"in y,F=Le?En(Ni(y.maxWait)||0,p):F,Je="trailing"in y?!!y.trailing:Je);function ht(ln){var ra=T,Do=O;return T=O=r,Ne=ln,J=l.apply(Do,ra),J}o(ht,"invokeFunc");function At(ln){return Ne=ln,Z=ag(Jt,p),Be?ht(ln):J}o(At,"leadingEdge");function $t(ln){var ra=ln-ce,Do=ln-Ne,Ik=p-ra;return Le?ss(Ik,F-Do):Ik}o($t,"remainingWait");function Ct(ln){var ra=ln-ce,Do=ln-Ne;return ce===r||ra>=p||ra<0||Le&&Do>=F}o(Ct,"shouldInvoke");function Jt(){var ln=bw();if(Ct(ln))return ar(ln);Z=ag(Jt,$t(ln))}o(Jt,"timerExpired");function ar(ln){return Z=r,Je&&T?ht(ln):(T=O=r,J)}o(ar,"trailingEdge");function ii(){Z!==r&&x3(Z),Ne=0,T=ce=O=Z=r}o(ii,"cancel");function ws(){return Z===r?J:ar(bw())}o(ws,"flush");function ai(){var ln=bw(),ra=Ct(ln);if(T=arguments,O=this,ce=ln,ra){if(Z===r)return At(ce);if(Le)return x3(Z),Z=ag(Jt,p),ht(ce)}return Z===r&&(Z=ag(Jt,p)),J}return o(ai,"debounced"),ai.cancel=ii,ai.flush=ws,ai}o(ck,"debounce");var Dz=Wt(function(l,p){return QP(l,1,p)}),Rz=Wt(function(l,p,y){return QP(l,Ni(p)||0,y)});function Oz(l){return No(l,M)}o(Oz,"flip");function Ew(l,p){if(typeof l!="function"||p!=null&&typeof p!="function")throw new Si(s);var y=o(function(){var T=arguments,O=p?p.apply(this,T):T[0],F=y.cache;if(F.has(O))return F.get(O);var J=l.apply(this,T);return y.cache=F.set(O,J)||F,J},"memoized");return y.cache=new(Ew.Cache||Ao),y}o(Ew,"memoize"),Ew.Cache=Ao;function Aw(l){if(typeof l!="function")throw new Si(s);return function(){var p=arguments;switch(p.length){case 0:return!l.call(this);case 1:return!l.call(this,p[0]);case 2:return!l.call(this,p[0],p[1]);case 3:return!l.call(this,p[0],p[1],p[2])}return!l.apply(this,p)}}o(Aw,"negate");function Pz(l){return ik(2,l)}o(Pz,"once");var kz=SG(function(l,p){p=p.length==1&&Vt(p[0])?Kr(p[0],ri(wt())):Kr(Hn(p,1),ri(wt()));var y=p.length;return Wt(function(T){for(var O=-1,F=ss(T.length,y);++O<F;)T[O]=p[O].call(this,T[O]);return ti(l,this,T)})}),aN=Wt(function(l,p){var y=Tu(p,dp(aN));return No(l,b,r,p,y)}),lk=Wt(function(l,p){var y=Tu(p,dp(lk));return No(l,E,r,p,y)}),Lz=To(function(l,p){return No(l,_,r,r,r,p)});function Vz(l,p){if(typeof l!="function")throw new Si(s);return p=p===r?p:Mt(p),Wt(l,p)}o(Vz,"rest");function Uz(l,p){if(typeof l!="function")throw new Si(s);return p=p==null?0:En(Mt(p),0),Wt(function(y){var T=y[p],O=Ou(y,0,p);return T&&Nu(O,T),ti(l,this,O)})}o(Uz,"spread");function jz(l,p,y){var T=!0,O=!0;if(typeof l!="function")throw new Si(s);return Gr(y)&&(T="leading"in y?!!y.leading:T,O="trailing"in y?!!y.trailing:O),ck(l,p,{leading:T,maxWait:p,trailing:O})}o(jz,"throttle");function Fz(l){return sk(l,1)}o(Fz,"unary");function Mz(l,p){return aN(KC(p),l)}o(Mz,"wrap");function qz(){if(!arguments.length)return[];var l=arguments[0];return Vt(l)?l:[l]}o(qz,"castArray");function Hz(l){return Ei(l,m)}o(Hz,"clone");function Kz(l,p){return p=typeof p=="function"?p:r,Ei(l,m,p)}o(Kz,"cloneWith");function $z(l){return Ei(l,f|m)}o($z,"cloneDeep");function Xz(l,p){return p=typeof p=="function"?p:r,Ei(l,f|m,p)}o(Xz,"cloneDeepWith");function Gz(l,p){return p==null||YP(l,p,_n(p))}o(Gz,"conformsTo");function ta(l,p){return l===p||l!==l&&p!==p}o(ta,"eq");var Wz=gw(RC),zz=gw(function(l,p){return l>=p}),Fl=n3((function(){return arguments})())?n3:function(l){return tn(l)&&Er.call(l,"callee")&&!HP.call(l,"callee")},Vt=ye.isArray,Jz=AP?ri(AP):sG;function Bs(l){return l!=null&&Cw(l.length)&&!_o(l)}o(Bs,"isArrayLike");function cn(l){return tn(l)&&Bs(l)}o(cn,"isArrayLikeObject");function Yz(l){return l===!0||l===!1||tn(l)&&ys(l)==P}o(Yz,"isBoolean");var Pu=fX||vN,Qz=CP?ri(CP):iG;function Zz(l){return tn(l)&&l.nodeType===1&&!og(l)}o(Zz,"isElement");function eJ(l){if(l==null)return!0;if(Bs(l)&&(Vt(l)||typeof l=="string"||typeof l.splice=="function"||Pu(l)||mp(l)||Fl(l)))return!l.length;var p=is(l);if(p==Ce||p==Hr)return!l.size;if(ig(l))return!kC(l).length;for(var y in l)if(Er.call(l,y))return!1;return!0}o(eJ,"isEmpty");function tJ(l,p){return rg(l,p)}o(tJ,"isEqual");function rJ(l,p,y){y=typeof y=="function"?y:r;var T=y?y(l,p):r;return T===r?rg(l,p,r,y):!!T}o(rJ,"isEqualWith");function oN(l){if(!tn(l))return!1;var p=ys(l);return p==z||p==se||typeof l.message=="string"&&typeof l.name=="string"&&!og(l)}o(oN,"isError");function nJ(l){return typeof l=="number"&&$P(l)}o(nJ,"isFinite");function _o(l){if(!Gr(l))return!1;var p=ys(l);return p==Xe||p==Re||p==ct||p==Zs}o(_o,"isFunction");function fk(l){return typeof l=="number"&&l==Mt(l)}o(fk,"isInteger");function Cw(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=ee}o(Cw,"isLength");function Gr(l){var p=typeof l;return l!=null&&(p=="object"||p=="function")}o(Gr,"isObject");function tn(l){return l!=null&&typeof l=="object"}o(tn,"isObjectLike");var hk=NP?ri(NP):oG;function sJ(l,p){return l===p||PC(l,p,YC(p))}o(sJ,"isMatch");function iJ(l,p,y){return y=typeof y=="function"?y:r,PC(l,p,YC(p),y)}o(iJ,"isMatchWith");function aJ(l){return pk(l)&&l!=+l}o(aJ,"isNaN");function oJ(l){if(KG(l))throw new Ot(n);return s3(l)}o(oJ,"isNative");function uJ(l){return l===null}o(uJ,"isNull");function cJ(l){return l==null}o(cJ,"isNil");function pk(l){return typeof l=="number"||tn(l)&&ys(l)==lt}o(pk,"isNumber");function og(l){if(!tn(l)||ys(l)!=Fe)return!1;var p=Qx(l);if(p===null)return!0;var y=Er.call(p,"constructor")&&p.constructor;return typeof y=="function"&&y instanceof y&&Wx.call(y)==iX}o(og,"isPlainObject");var uN=TP?ri(TP):uG;function lJ(l){return fk(l)&&l>=-ee&&l<=ee}o(lJ,"isSafeInteger");var dk=IP?ri(IP):cG;function Nw(l){return typeof l=="string"||!Vt(l)&&tn(l)&&ys(l)==gn}o(Nw,"isString");function si(l){return typeof l=="symbol"||tn(l)&&ys(l)==rs}o(si,"isSymbol");var mp=_P?ri(_P):lG;function fJ(l){return l===r}o(fJ,"isUndefined");function hJ(l){return tn(l)&&is(l)==gs}o(hJ,"isWeakMap");function pJ(l){return tn(l)&&ys(l)==pt}o(pJ,"isWeakSet");var dJ=gw(LC),mJ=gw(function(l,p){return l<=p});function mk(l){if(!l)return[];if(Bs(l))return Nw(l)?Zi(l):_s(l);if(W0&&l[W0])return G$(l[W0]());var p=is(l),y=p==Ce?EC:p==Hr?$x:gp;return y(l)}o(mk,"toArray");function Bo(l){if(!l)return l===0?l:0;if(l=Ni(l),l===ue||l===-ue){var p=l<0?-1:1;return p*he}return l===l?l:0}o(Bo,"toFinite");function Mt(l){var p=Bo(l),y=p%1;return p===p?y?p-y:p:0}o(Mt,"toInteger");function gk(l){return l?Ll(Mt(l),0,Ke):0}o(gk,"toLength");function Ni(l){if(typeof l=="number")return l;if(si(l))return we;if(Gr(l)){var p=typeof l.valueOf=="function"?l.valueOf():l;l=Gr(p)?p+"":p}if(typeof l!="string")return l===0?l:+l;l=kP(l);var y=JK.test(l);return y||QK.test(l)?B$(l.slice(2),y?2:8):oC.test(l)?we:+l}o(Ni,"toNumber");function vk(l){return _a(l,Ds(l))}o(vk,"toPlainObject");function gJ(l){return l?Ll(Mt(l),-ee,ee):l===0?l:0}o(gJ,"toSafeInteger");function wr(l){return l==null?"":ni(l)}o(wr,"toString");var vJ=hp(function(l,p){if(ig(p)||Bs(p)){_a(p,_n(p),l);return}for(var y in p)Er.call(p,y)&&Z0(l,y,p[y])}),yk=hp(function(l,p){_a(p,Ds(p),l)}),Tw=hp(function(l,p,y,T){_a(p,Ds(p),l,T)}),yJ=hp(function(l,p,y,T){_a(p,_n(p),l,T)}),xJ=To(_C);function wJ(l,p){var y=fp(l);return p==null?y:JP(y,p)}o(wJ,"create");var SJ=Wt(function(l,p){l=Tr(l);var y=-1,T=p.length,O=T>2?p[2]:r;for(O&&xs(p[0],p[1],O)&&(T=1);++y<T;)for(var F=p[y],J=Ds(F),Z=-1,ce=J.length;++Z<ce;){var Ne=J[Z],Be=l[Ne];(Be===r||ta(Be,up[Ne])&&!Er.call(l,Ne))&&(l[Ne]=F[Ne])}return l}),bJ=Wt(function(l){return l.push(r,k3),ti(xk,r,l)});function EJ(l,p){return DP(l,wt(p,3),Ia)}o(EJ,"findKey");function AJ(l,p){return DP(l,wt(p,3),DC)}o(AJ,"findLastKey");function CJ(l,p){return l==null?l:BC(l,wt(p,3),Ds)}o(CJ,"forIn");function NJ(l,p){return l==null?l:t3(l,wt(p,3),Ds)}o(NJ,"forInRight");function TJ(l,p){return l&&Ia(l,wt(p,3))}o(TJ,"forOwn");function IJ(l,p){return l&&DC(l,wt(p,3))}o(IJ,"forOwnRight");function _J(l){return l==null?[]:uw(l,_n(l))}o(_J,"functions");function BJ(l){return l==null?[]:uw(l,Ds(l))}o(BJ,"functionsIn");function cN(l,p,y){var T=l==null?r:Vl(l,p);return T===r?y:T}o(cN,"get");function DJ(l,p){return l!=null&&U3(l,p,eG)}o(DJ,"has");function lN(l,p){return l!=null&&U3(l,p,tG)}o(lN,"hasIn");var RJ=B3(function(l,p,y){p!=null&&typeof p.toString!="function"&&(p=zx.call(p)),l[p]=y},hN(Rs)),OJ=B3(function(l,p,y){p!=null&&typeof p.toString!="function"&&(p=zx.call(p)),Er.call(l,p)?l[p].push(y):l[p]=[y]},wt),PJ=Wt(tg);function _n(l){return Bs(l)?WP(l):kC(l)}o(_n,"keys");function Ds(l){return Bs(l)?WP(l,!0):fG(l)}o(Ds,"keysIn");function kJ(l,p){var y={};return p=wt(p,3),Ia(l,function(T,O,F){Co(y,p(T,O,F),T)}),y}o(kJ,"mapKeys");function LJ(l,p){var y={};return p=wt(p,3),Ia(l,function(T,O,F){Co(y,O,p(T,O,F))}),y}o(LJ,"mapValues");var VJ=hp(function(l,p,y){cw(l,p,y)}),xk=hp(function(l,p,y,T){cw(l,p,y,T)}),UJ=To(function(l,p){var y={};if(l==null)return y;var T=!1;p=Kr(p,function(F){return F=Ru(F,l),T||(T=F.length>1),F}),_a(l,zC(l),y),T&&(y=Ei(y,f|h|m,RG));for(var O=p.length;O--;)MC(y,p[O]);return y});function jJ(l,p){return wk(l,Aw(wt(p)))}o(jJ,"omitBy");var FJ=To(function(l,p){return l==null?{}:pG(l,p)});function wk(l,p){if(l==null)return{};var y=Kr(zC(l),function(T){return[T]});return p=wt(p),f3(l,y,function(T,O){return p(T,O[0])})}o(wk,"pickBy");function MJ(l,p,y){p=Ru(p,l);var T=-1,O=p.length;for(O||(O=1,l=r);++T<O;){var F=l==null?r:l[Ba(p[T])];F===r&&(T=O,F=y),l=_o(F)?F.call(l):F}return l}o(MJ,"result");function qJ(l,p,y){return l==null?l:ng(l,p,y)}o(qJ,"set");function HJ(l,p,y,T){return T=typeof T=="function"?T:r,l==null?l:ng(l,p,y,T)}o(HJ,"setWith");var Sk=O3(_n),bk=O3(Ds);function KJ(l,p,y){var T=Vt(l),O=T||Pu(l)||mp(l);if(p=wt(p,4),y==null){var F=l&&l.constructor;O?y=T?new F:[]:Gr(l)?y=_o(F)?fp(Qx(l)):{}:y={}}return(O?wi:Ia)(l,function(J,Z,ce){return p(y,J,Z,ce)}),y}o(KJ,"transform");function $J(l,p){return l==null?!0:MC(l,p)}o($J,"unset");function XJ(l,p,y){return l==null?l:g3(l,p,KC(y))}o(XJ,"update");function GJ(l,p,y,T){return T=typeof T=="function"?T:r,l==null?l:g3(l,p,KC(y),T)}o(GJ,"updateWith");function gp(l){return l==null?[]:bC(l,_n(l))}o(gp,"values");function WJ(l){return l==null?[]:bC(l,Ds(l))}o(WJ,"valuesIn");function zJ(l,p,y){return y===r&&(y=p,p=r),y!==r&&(y=Ni(y),y=y===y?y:0),p!==r&&(p=Ni(p),p=p===p?p:0),Ll(Ni(l),p,y)}o(zJ,"clamp");function JJ(l,p,y){return p=Bo(p),y===r?(y=p,p=0):y=Bo(y),l=Ni(l),rG(l,p,y)}o(JJ,"inRange");function YJ(l,p,y){if(y&&typeof y!="boolean"&&xs(l,p,y)&&(p=y=r),y===r&&(typeof p=="boolean"?(y=p,p=r):typeof l=="boolean"&&(y=l,l=r)),l===r&&p===r?(l=0,p=1):(l=Bo(l),p===r?(p=l,l=0):p=Bo(p)),l>p){var T=l;l=p,p=T}if(y||l%1||p%1){var O=XP();return ss(l+O*(p-l+_$("1e-"+((O+"").length-1))),p)}return UC(l,p)}o(YJ,"random");var QJ=pp(function(l,p,y){return p=p.toLowerCase(),l+(y?Ek(p):p)});function Ek(l){return fN(wr(l).toLowerCase())}o(Ek,"capitalize");function Ak(l){return l=wr(l),l&&l.replace(e$,q$).replace(x$,"")}o(Ak,"deburr");function ZJ(l,p,y){l=wr(l),p=ni(p);var T=l.length;y=y===r?T:Ll(Mt(y),0,T);var O=y;return y-=p.length,y>=0&&l.slice(y,O)==p}o(ZJ,"endsWith");function eY(l){return l=wr(l),l&&nt.test(l)?l.replace(ae,H$):l}o(eY,"escape");function tY(l){return l=wr(l),l&&Ta.test(l)?l.replace(fr,"\\$&"):l}o(tY,"escapeRegExp");var rY=pp(function(l,p,y){return l+(y?"-":"")+p.toLowerCase()}),nY=pp(function(l,p,y){return l+(y?" ":"")+p.toLowerCase()}),sY=T3("toLowerCase");function iY(l,p,y){l=wr(l),p=Mt(p);var T=p?op(l):0;if(!p||T>=p)return l;var O=(p-T)/2;return mw(rw(O),y)+l+mw(tw(O),y)}o(iY,"pad");function aY(l,p,y){l=wr(l),p=Mt(p);var T=p?op(l):0;return p&&T<p?l+mw(p-T,y):l}o(aY,"padEnd");function oY(l,p,y){l=wr(l),p=Mt(p);var T=p?op(l):0;return p&&T<p?mw(p-T,y)+l:l}o(oY,"padStart");function uY(l,p,y){return y||p==null?p=0:p&&(p=+p),mX(wr(l).replace(X0,""),p||0)}o(uY,"parseInt1");function cY(l,p,y){return(y?xs(l,p,y):p===r)?p=1:p=Mt(p),jC(wr(l),p)}o(cY,"repeat");function lY(){var l=arguments,p=wr(l[0]);return l.length<3?p:p.replace(l[1],l[2])}o(lY,"replace");var fY=pp(function(l,p,y){return l+(y?"_":"")+p.toLowerCase()});function hY(l,p,y){return y&&typeof y!="number"&&xs(l,p,y)&&(p=y=r),y=y===r?Ke:y>>>0,y?(l=wr(l),l&&(typeof p=="string"||p!=null&&!uN(p))&&(p=ni(p),!p&&ap(l))?Ou(Zi(l),0,y):l.split(p,y)):[]}o(hY,"split");var pY=pp(function(l,p,y){return l+(y?" ":"")+fN(p)});function dY(l,p,y){return l=wr(l),y=y==null?0:Ll(Mt(y),0,l.length),p=ni(p),l.slice(y,y+p.length)==p}o(dY,"startsWith");function mY(l,p,y){var T=j.templateSettings;y&&xs(l,p,y)&&(p=r),l=wr(l),p=Tw({},p,T,P3);var O=Tw({},p.imports,T.imports,P3),F=_n(O),J=bC(O,F),Z,ce,Ne=0,Be=p.interpolate||Fx,Le="__p += '",Je=AC((p.escape||Fx).source+"|"+Be.source+"|"+(Be===et?ns:Fx).source+"|"+(p.evaluate||Fx).source+"|$","g"),ht="//# sourceURL="+(Er.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++A$+"]")+`
|
|
29
|
+
`;l.replace(Je,function(Ct,Jt,ar,ii,ws,ai){return ar||(ar=ii),Le+=l.slice(Ne,ai).replace(t$,K$),Jt&&(Z=!0,Le+=`' +
|
|
30
|
+
__e(`+Jt+`) +
|
|
31
|
+
'`),ws&&(ce=!0,Le+=`';
|
|
32
|
+
`+ws+`;
|
|
33
|
+
__p += '`),ar&&(Le+=`' +
|
|
34
|
+
((__t = (`+ar+`)) == null ? '' : __t) +
|
|
35
|
+
'`),Ne=ai+Ct.length,Ct}),Le+=`';
|
|
36
|
+
`;var At=Er.call(p,"variable")&&p.variable;if(!At)Le=`with (obj) {
|
|
37
|
+
`+Le+`
|
|
38
|
+
}
|
|
39
|
+
`;else if(qe.test(At))throw new Ot(i);Le=(ce?Le.replace(d,""):Le).replace(I,"$1").replace($,"$1;"),Le="function("+(At||"obj")+`) {
|
|
40
|
+
`+(At?"":`obj || (obj = {});
|
|
41
|
+
`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
|
|
42
|
+
function print() { __p += __j.call(arguments, '') }
|
|
43
|
+
`:`;
|
|
44
|
+
`)+Le+`return __p
|
|
45
|
+
}`;var $t=Nk(function(){return xr(F,ht+"return "+Le).apply(r,J)});if($t.source=Le,oN($t))throw $t;return $t}o(mY,"template");function gY(l){return wr(l).toLowerCase()}o(gY,"toLower");function vY(l){return wr(l).toUpperCase()}o(vY,"toUpper");function yY(l,p,y){if(l=wr(l),l&&(y||p===r))return kP(l);if(!l||!(p=ni(p)))return l;var T=Zi(l),O=Zi(p),F=LP(T,O),J=VP(T,O)+1;return Ou(T,F,J).join("")}o(yY,"trim");function xY(l,p,y){if(l=wr(l),l&&(y||p===r))return l.slice(0,jP(l)+1);if(!l||!(p=ni(p)))return l;var T=Zi(l),O=VP(T,Zi(p))+1;return Ou(T,0,O).join("")}o(xY,"trimEnd");function wY(l,p,y){if(l=wr(l),l&&(y||p===r))return l.replace(X0,"");if(!l||!(p=ni(p)))return l;var T=Zi(l),O=LP(T,Zi(p));return Ou(T,O).join("")}o(wY,"trimStart");function SY(l,p){var y=R,T=q;if(Gr(p)){var O="separator"in p?p.separator:O;y="length"in p?Mt(p.length):y,T="omission"in p?ni(p.omission):T}l=wr(l);var F=l.length;if(ap(l)){var J=Zi(l);F=J.length}if(y>=F)return l;var Z=y-op(T);if(Z<1)return T;var ce=J?Ou(J,0,Z).join(""):l.slice(0,Z);if(O===r)return ce+T;if(J&&(Z+=ce.length-Z),uN(O)){if(l.slice(Z).search(O)){var Ne,Be=ce;for(O.global||(O=AC(O.source,wr(Qi.exec(O))+"g")),O.lastIndex=0;Ne=O.exec(Be);)var Le=Ne.index;ce=ce.slice(0,Le===r?Z:Le)}}else if(l.indexOf(ni(O),Z)!=Z){var Je=ce.lastIndexOf(O);Je>-1&&(ce=ce.slice(0,Je))}return ce+T}o(SY,"truncate");function bY(l){return l=wr(l),l&&X.test(l)?l.replace(re,Y$):l}o(bY,"unescape");var EY=pp(function(l,p,y){return l+(y?" ":"")+p.toUpperCase()}),fN=T3("toUpperCase");function Ck(l,p,y){return l=wr(l),p=y?r:p,p===r?X$(l)?eX(l):V$(l):l.match(p)||[]}o(Ck,"words");var Nk=Wt(function(l,p){try{return ti(l,r,p)}catch(y){return oN(y)?y:new Ot(y)}}),AY=To(function(l,p){return wi(p,function(y){y=Ba(y),Co(l,y,iN(l[y],l))}),l});function CY(l){var p=l==null?0:l.length,y=wt();return l=p?Kr(l,function(T){if(typeof T[1]!="function")throw new Si(s);return[y(T[0]),T[1]]}):[],Wt(function(T){for(var O=-1;++O<p;){var F=l[O];if(ti(F[0],this,T))return ti(F[1],this,T)}})}o(CY,"cond");function NY(l){return YX(Ei(l,f))}o(NY,"conforms");function hN(l){return function(){return l}}o(hN,"constant");function TY(l,p){return l==null||l!==l?p:l}o(TY,"defaultTo");var IY=_3(),_Y=_3(!0);function Rs(l){return l}o(Rs,"identity");function pN(l){return i3(typeof l=="function"?l:Ei(l,f))}o(pN,"iteratee");function BY(l){return o3(Ei(l,f))}o(BY,"matches");function DY(l,p){return u3(l,Ei(p,f))}o(DY,"matchesProperty");var RY=Wt(function(l,p){return function(y){return tg(y,l,p)}}),OY=Wt(function(l,p){return function(y){return tg(l,y,p)}});function dN(l,p,y){var T=_n(p),O=uw(p,T);y==null&&!(Gr(p)&&(O.length||!T.length))&&(y=p,p=l,l=this,O=uw(p,_n(p)));var F=!(Gr(y)&&"chain"in y)||!!y.chain,J=_o(l);return wi(O,function(Z){var ce=p[Z];l[Z]=ce,J&&(l.prototype[Z]=function(){var Ne=this.__chain__;if(F||Ne){var Be=l(this.__wrapped__),Le=Be.__actions__=_s(this.__actions__);return Le.push({func:ce,args:arguments,thisArg:l}),Be.__chain__=Ne,Be}return ce.apply(l,Nu([this.value()],arguments))})}),l}o(dN,"mixin");function PY(){return In._===this&&(In._=aX),this}o(PY,"noConflict");function mN(){}o(mN,"noop");function kY(l){return l=Mt(l),Wt(function(p){return c3(p,l)})}o(kY,"nthArg");var LY=XC(Kr),VY=XC(BP),UY=XC(vC);function Tk(l){return ZC(l)?yC(Ba(l)):dG(l)}o(Tk,"property");function jY(l){return function(p){return l==null?r:Vl(l,p)}}o(jY,"propertyOf");var FY=D3(),MY=D3(!0);function gN(){return[]}o(gN,"stubArray");function vN(){return!1}o(vN,"stubFalse");function qY(){return{}}o(qY,"stubObject");function HY(){return""}o(HY,"stubString");function KY(){return!0}o(KY,"stubTrue");function $Y(l,p){if(l=Mt(l),l<1||l>ee)return[];var y=Ke,T=ss(l,Ke);p=wt(p),l-=Ke;for(var O=SC(T,p);++y<l;)p(y);return O}o($Y,"times");function XY(l){return Vt(l)?Kr(l,Ba):si(l)?[l]:_s(G3(wr(l)))}o(XY,"toPath");function GY(l){var p=++sX;return wr(l)+p}o(GY,"uniqueId");var WY=dw(function(l,p){return l+p},0),zY=GC("ceil"),JY=dw(function(l,p){return l/p},1),YY=GC("floor");function QY(l){return l&&l.length?ow(l,Rs,RC):r}o(QY,"max");function ZY(l,p){return l&&l.length?ow(l,wt(p,2),RC):r}o(ZY,"maxBy");function eQ(l){return OP(l,Rs)}o(eQ,"mean");function tQ(l,p){return OP(l,wt(p,2))}o(tQ,"meanBy");function rQ(l){return l&&l.length?ow(l,Rs,LC):r}o(rQ,"min");function nQ(l,p){return l&&l.length?ow(l,wt(p,2),LC):r}o(nQ,"minBy");var sQ=dw(function(l,p){return l*p},1),iQ=GC("round"),aQ=dw(function(l,p){return l-p},0);function oQ(l){return l&&l.length?wC(l,Rs):0}o(oQ,"sum");function uQ(l,p){return l&&l.length?wC(l,wt(p,2)):0}return o(uQ,"sumBy"),j.after=Bz,j.ary=sk,j.assign=vJ,j.assignIn=yk,j.assignInWith=Tw,j.assignWith=yJ,j.at=xJ,j.before=ik,j.bind=iN,j.bindAll=AY,j.bindKey=ak,j.castArray=qz,j.chain=tk,j.chunk=YG,j.compact=QG,j.concat=ZG,j.cond=CY,j.conforms=NY,j.constant=hN,j.countBy=oz,j.create=wJ,j.curry=ok,j.curryRight=uk,j.debounce=ck,j.defaults=SJ,j.defaultsDeep=bJ,j.defer=Dz,j.delay=Rz,j.difference=eW,j.differenceBy=tW,j.differenceWith=rW,j.drop=nW,j.dropRight=sW,j.dropRightWhile=iW,j.dropWhile=aW,j.fill=oW,j.filter=cz,j.flatMap=hz,j.flatMapDeep=pz,j.flatMapDepth=dz,j.flatten=Y3,j.flattenDeep=uW,j.flattenDepth=cW,j.flip=Oz,j.flow=IY,j.flowRight=_Y,j.fromPairs=lW,j.functions=_J,j.functionsIn=BJ,j.groupBy=mz,j.initial=hW,j.intersection=pW,j.intersectionBy=dW,j.intersectionWith=mW,j.invert=RJ,j.invertBy=OJ,j.invokeMap=vz,j.iteratee=pN,j.keyBy=yz,j.keys=_n,j.keysIn=Ds,j.map=Sw,j.mapKeys=kJ,j.mapValues=LJ,j.matches=BY,j.matchesProperty=DY,j.memoize=Ew,j.merge=VJ,j.mergeWith=xk,j.method=RY,j.methodOf=OY,j.mixin=dN,j.negate=Aw,j.nthArg=kY,j.omit=UJ,j.omitBy=jJ,j.once=Pz,j.orderBy=xz,j.over=LY,j.overArgs=kz,j.overEvery=VY,j.overSome=UY,j.partial=aN,j.partialRight=lk,j.partition=wz,j.pick=FJ,j.pickBy=wk,j.property=Tk,j.propertyOf=jY,j.pull=xW,j.pullAll=Z3,j.pullAllBy=wW,j.pullAllWith=SW,j.pullAt=bW,j.range=FY,j.rangeRight=MY,j.rearg=Lz,j.reject=Ez,j.remove=EW,j.rest=Vz,j.reverse=nN,j.sampleSize=Cz,j.set=qJ,j.setWith=HJ,j.shuffle=Nz,j.slice=AW,j.sortBy=_z,j.sortedUniq=DW,j.sortedUniqBy=RW,j.split=hY,j.spread=Uz,j.tail=OW,j.take=PW,j.takeRight=kW,j.takeRightWhile=LW,j.takeWhile=VW,j.tap=QW,j.throttle=jz,j.thru=ww,j.toArray=mk,j.toPairs=Sk,j.toPairsIn=bk,j.toPath=XY,j.toPlainObject=vk,j.transform=KJ,j.unary=Fz,j.union=UW,j.unionBy=jW,j.unionWith=FW,j.uniq=MW,j.uniqBy=qW,j.uniqWith=HW,j.unset=$J,j.unzip=sN,j.unzipWith=ek,j.update=XJ,j.updateWith=GJ,j.values=gp,j.valuesIn=WJ,j.without=KW,j.words=Ck,j.wrap=Mz,j.xor=$W,j.xorBy=XW,j.xorWith=GW,j.zip=WW,j.zipObject=zW,j.zipObjectDeep=JW,j.zipWith=YW,j.entries=Sk,j.entriesIn=bk,j.extend=yk,j.extendWith=Tw,dN(j,j),j.add=WY,j.attempt=Nk,j.camelCase=QJ,j.capitalize=Ek,j.ceil=zY,j.clamp=zJ,j.clone=Hz,j.cloneDeep=$z,j.cloneDeepWith=Xz,j.cloneWith=Kz,j.conformsTo=Gz,j.deburr=Ak,j.defaultTo=TY,j.divide=JY,j.endsWith=ZJ,j.eq=ta,j.escape=eY,j.escapeRegExp=tY,j.every=uz,j.find=lz,j.findIndex=z3,j.findKey=EJ,j.findLast=fz,j.findLastIndex=J3,j.findLastKey=AJ,j.floor=YY,j.forEach=rk,j.forEachRight=nk,j.forIn=CJ,j.forInRight=NJ,j.forOwn=TJ,j.forOwnRight=IJ,j.get=cN,j.gt=Wz,j.gte=zz,j.has=DJ,j.hasIn=lN,j.head=Q3,j.identity=Rs,j.includes=gz,j.indexOf=fW,j.inRange=JJ,j.invoke=PJ,j.isArguments=Fl,j.isArray=Vt,j.isArrayBuffer=Jz,j.isArrayLike=Bs,j.isArrayLikeObject=cn,j.isBoolean=Yz,j.isBuffer=Pu,j.isDate=Qz,j.isElement=Zz,j.isEmpty=eJ,j.isEqual=tJ,j.isEqualWith=rJ,j.isError=oN,j.isFinite=nJ,j.isFunction=_o,j.isInteger=fk,j.isLength=Cw,j.isMap=hk,j.isMatch=sJ,j.isMatchWith=iJ,j.isNaN=aJ,j.isNative=oJ,j.isNil=cJ,j.isNull=uJ,j.isNumber=pk,j.isObject=Gr,j.isObjectLike=tn,j.isPlainObject=og,j.isRegExp=uN,j.isSafeInteger=lJ,j.isSet=dk,j.isString=Nw,j.isSymbol=si,j.isTypedArray=mp,j.isUndefined=fJ,j.isWeakMap=hJ,j.isWeakSet=pJ,j.join=gW,j.kebabCase=rY,j.last=Ci,j.lastIndexOf=vW,j.lowerCase=nY,j.lowerFirst=sY,j.lt=dJ,j.lte=mJ,j.max=QY,j.maxBy=ZY,j.mean=eQ,j.meanBy=tQ,j.min=rQ,j.minBy=nQ,j.stubArray=gN,j.stubFalse=vN,j.stubObject=qY,j.stubString=HY,j.stubTrue=KY,j.multiply=sQ,j.nth=yW,j.noConflict=PY,j.noop=mN,j.now=bw,j.pad=iY,j.padEnd=aY,j.padStart=oY,j.parseInt=uY,j.random=YJ,j.reduce=Sz,j.reduceRight=bz,j.repeat=cY,j.replace=lY,j.result=MJ,j.round=iQ,j.runInContext=ie,j.sample=Az,j.size=Tz,j.snakeCase=fY,j.some=Iz,j.sortedIndex=CW,j.sortedIndexBy=NW,j.sortedIndexOf=TW,j.sortedLastIndex=IW,j.sortedLastIndexBy=_W,j.sortedLastIndexOf=BW,j.startCase=pY,j.startsWith=dY,j.subtract=aQ,j.sum=oQ,j.sumBy=uQ,j.template=mY,j.times=$Y,j.toFinite=Bo,j.toInteger=Mt,j.toLength=gk,j.toLower=gY,j.toNumber=Ni,j.toSafeInteger=gJ,j.toString=wr,j.toUpper=vY,j.trim=yY,j.trimEnd=xY,j.trimStart=wY,j.truncate=SY,j.unescape=bY,j.uniqueId=GY,j.upperCase=EY,j.upperFirst=fN,j.each=rk,j.eachRight=nk,j.first=Q3,dN(j,(function(){var l={};return Ia(j,function(p,y){Er.call(j.prototype,y)||(l[y]=p)}),l})(),{chain:!1}),j.VERSION=e,wi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){j[l].placeholder=j}),wi(["drop","take"],function(l,p){rr.prototype[l]=function(y){y=y===r?1:En(Mt(y),0);var T=this.__filtered__&&!p?new rr(this):this.clone();return T.__filtered__?T.__takeCount__=ss(y,T.__takeCount__):T.__views__.push({size:ss(y,Ke),type:l+(T.__dir__<0?"Right":"")}),T},rr.prototype[l+"Right"]=function(y){return this.reverse()[l](y).reverse()}}),wi(["filter","map","takeWhile"],function(l,p){var y=p+1,T=y==G||y==le;rr.prototype[l]=function(O){var F=this.clone();return F.__iteratees__.push({iteratee:wt(O,3),type:y}),F.__filtered__=F.__filtered__||T,F}}),wi(["head","last"],function(l,p){var y="take"+(p?"Right":"");rr.prototype[l]=function(){return this[y](1).value()[0]}}),wi(["initial","tail"],function(l,p){var y="drop"+(p?"":"Right");rr.prototype[l]=function(){return this.__filtered__?new rr(this):this[y](1)}}),rr.prototype.compact=function(){return this.filter(Rs)},rr.prototype.find=function(l){return this.filter(l).head()},rr.prototype.findLast=function(l){return this.reverse().find(l)},rr.prototype.invokeMap=Wt(function(l,p){return typeof l=="function"?new rr(this):this.map(function(y){return tg(y,l,p)})}),rr.prototype.reject=function(l){return this.filter(Aw(wt(l)))},rr.prototype.slice=function(l,p){l=Mt(l);var y=this;return y.__filtered__&&(l>0||p<0)?new rr(y):(l<0?y=y.takeRight(-l):l&&(y=y.drop(l)),p!==r&&(p=Mt(p),y=p<0?y.dropRight(-p):y.take(p-l)),y)},rr.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},rr.prototype.toArray=function(){return this.take(Ke)},Ia(rr.prototype,function(l,p){var y=/^(?:filter|find|map|reject)|While$/.test(p),T=/^(?:head|last)$/.test(p),O=j[T?"take"+(p=="last"?"Right":""):p],F=T||/^find/.test(p);O&&(j.prototype[p]=function(){var J=this.__wrapped__,Z=T?[1]:arguments,ce=J instanceof rr,Ne=Z[0],Be=ce||Vt(J),Le=o(function(Jt){var ar=O.apply(j,Nu([Jt],Z));return T&&Je?ar[0]:ar},"interceptor");Be&&y&&typeof Ne=="function"&&Ne.length!=1&&(ce=Be=!1);var Je=this.__chain__,ht=!!this.__actions__.length,At=F&&!Je,$t=ce&&!ht;if(!F&&Be){J=$t?J:new rr(this);var Ct=l.apply(J,Z);return Ct.__actions__.push({func:ww,args:[Le],thisArg:r}),new bi(Ct,Je)}return At&&$t?l.apply(this,Z):(Ct=this.thru(Le),At?T?Ct.value()[0]:Ct.value():Ct)})}),wi(["pop","push","shift","sort","splice","unshift"],function(l){var p=Xx[l],y=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",T=/^(?:pop|shift)$/.test(l);j.prototype[l]=function(){var O=arguments;if(T&&!this.__chain__){var F=this.value();return p.apply(Vt(F)?F:[],O)}return this[y](function(J){return p.apply(Vt(J)?J:[],O)})}}),Ia(rr.prototype,function(l,p){var y=j[p];if(y){var T=y.name+"";Er.call(lp,T)||(lp[T]=[]),lp[T].push({name:p,func:y})}}),lp[pw(r,w).name]=[{name:"wrapper",func:r}],rr.prototype.clone=bX,rr.prototype.reverse=EX,rr.prototype.value=AX,j.prototype.at=ZW,j.prototype.chain=ez,j.prototype.commit=tz,j.prototype.next=rz,j.prototype.plant=sz,j.prototype.reverse=iz,j.prototype.toJSON=j.prototype.valueOf=j.prototype.value=az,j.prototype.first=j.prototype.head,W0&&(j.prototype[W0]=nz),j},"runInContext"),Iu=tX();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(In._=Iu,define(function(){return Iu})):Rl?((Rl.exports=Iu)._=Iu,pC._=Iu):In._=Iu}).call(Mp)});var F8=Q((xwe,j8)=>{"use strict";var U8=require("stream").Stream,Nne=require("util");j8.exports=oa;function oa(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(oa,"DelayedStream");Nne.inherits(oa,U8);oa.create=function(r,e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];t.source=r;var s=r.emit;return r.emit=function(){return t._handleEmit(arguments),s.apply(r,arguments)},r.on("error",function(){}),t.pauseStream&&r.pause(),t};Object.defineProperty(oa.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});oa.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};oa.prototype.resume=function(){this._released||this.release(),this.source.resume()};oa.prototype.pause=function(){this.source.pause()};oa.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach((function(r){this.emit.apply(this,r)}).bind(this)),this._bufferedEvents=[]};oa.prototype.pipe=function(){var r=U8.prototype.pipe.apply(this,arguments);return this.resume(),r};oa.prototype._handleEmit=function(r){if(this._released){this.emit.apply(this,r);return}r[0]==="data"&&(this.dataSize+=r[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(r)};oa.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var r="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(r))}}});var K8=Q((Swe,H8)=>{"use strict";var Tne=require("util"),q8=require("stream").Stream,M8=F8();H8.exports=nn;function nn(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}o(nn,"CombinedStream");Tne.inherits(nn,q8);nn.create=function(r){var e=new this;r=r||{};for(var t in r)e[t]=r[t];return e};nn.isStreamLike=function(r){return typeof r!="function"&&typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"&&!Buffer.isBuffer(r)};nn.prototype.append=function(r){var e=nn.isStreamLike(r);if(e){if(!(r instanceof M8)){var t=M8.create(r,{maxDataSize:1/0,pauseStream:this.pauseStreams});r.on("data",this._checkDataSize.bind(this)),r=t}this._handleErrors(r),this.pauseStreams&&r.pause()}return this._streams.push(r),this};nn.prototype.pipe=function(r,e){return q8.prototype.pipe.call(this,r,e),this.resume(),r};nn.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};nn.prototype._realGetNext=function(){var r=this._streams.shift();if(typeof r>"u"){this.end();return}if(typeof r!="function"){this._pipeNext(r);return}var e=r;e((function(t){var n=nn.isStreamLike(t);n&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),this._pipeNext(t)}).bind(this))};nn.prototype._pipeNext=function(r){this._currentStream=r;var e=nn.isStreamLike(r);if(e){r.on("end",this._getNext.bind(this)),r.pipe(this,{end:!1});return}var t=r;this.write(t),this._getNext()};nn.prototype._handleErrors=function(r){var e=this;r.on("error",function(t){e._emitError(t)})};nn.prototype.write=function(r){this.emit("data",r)};nn.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};nn.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};nn.prototype.end=function(){this._reset(),this.emit("end")};nn.prototype.destroy=function(){this._reset(),this.emit("close")};nn.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};nn.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var r="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(r))}};nn.prototype._updateDataSize=function(){this.dataSize=0;var r=this;this._streams.forEach(function(e){e.dataSize&&(r.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};nn.prototype._emitError=function(r){this._reset(),this.emit("error",r)}});var $8=Q((Ewe,Ine)=>{Ine.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var G8=Q((Awe,X8)=>{"use strict";X8.exports=$8()});var J8=Q(Us=>{"use strict";var CS=G8(),_ne=require("path").extname,W8=/^\s*([^;\s]*)(?:;|\s|$)/,Bne=/^text\//i;Us.charset=z8;Us.charsets={lookup:z8};Us.contentType=Dne;Us.extension=Rne;Us.extensions=Object.create(null);Us.lookup=One;Us.types=Object.create(null);Pne(Us.extensions,Us.types);function z8(r){if(!r||typeof r!="string")return!1;var e=W8.exec(r),t=e&&CS[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&Bne.test(e[1])?"UTF-8":!1}o(z8,"charset");function Dne(r){if(!r||typeof r!="string")return!1;var e=r.indexOf("/")===-1?Us.lookup(r):r;if(!e)return!1;if(e.indexOf("charset")===-1){var t=Us.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}o(Dne,"contentType");function Rne(r){if(!r||typeof r!="string")return!1;var e=W8.exec(r),t=e&&Us.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}o(Rne,"extension");function One(r){if(!r||typeof r!="string")return!1;var e=_ne("x."+r).toLowerCase().substr(1);return e&&Us.types[e]||!1}o(One,"lookup");function Pne(r,e){var t=["nginx","apache",void 0,"iana"];Object.keys(CS).forEach(o(function(s){var i=CS[s],a=i.extensions;if(!(!a||!a.length)){r[s]=a;for(var u=0;u<a.length;u++){var c=a[u];if(e[c]){var f=t.indexOf(CS[e[c]].source),h=t.indexOf(i.source);if(e[c]!=="application/octet-stream"&&(f>h||f===h&&e[c].substr(0,12)==="application/"))continue}e[c]=s}}},"forEachMimeType"))}o(Pne,"populateMaps")});var Q8=Q((Twe,Y8)=>{"use strict";Y8.exports=kne;function kne(r){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(r):setTimeout(r,0)}o(kne,"defer")});var wI=Q((_we,e5)=>{"use strict";var Z8=Q8();e5.exports=Lne;function Lne(r){var e=!1;return Z8(function(){e=!0}),o(function(n,s){e?r(n,s):Z8(o(function(){r(n,s)},"nextTick_callback"))},"async_callback")}o(Lne,"async")});var SI=Q((Dwe,t5)=>{"use strict";t5.exports=Vne;function Vne(r){Object.keys(r.jobs).forEach(Une.bind(r)),r.jobs={}}o(Vne,"abort");function Une(r){typeof this.jobs[r]=="function"&&this.jobs[r]()}o(Une,"clean")});var bI=Q((Owe,n5)=>{"use strict";var r5=wI(),jne=SI();n5.exports=Fne;function Fne(r,e,t,n){var s=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[s]=Mne(e,s,r[s],function(i,a){s in t.jobs&&(delete t.jobs[s],i?jne(t):t.results[s]=a,n(i,t.results))})}o(Fne,"iterate");function Mne(r,e,t,n){var s;return r.length==2?s=r(t,r5(n)):s=r(t,e,r5(n)),s}o(Mne,"runJob")});var EI=Q((kwe,s5)=>{"use strict";s5.exports=qne;function qne(r,e){var t=!Array.isArray(r),n={index:0,keyedList:t||e?Object.keys(r):null,jobs:{},results:t?{}:[],size:t?Object.keys(r).length:r.length};return e&&n.keyedList.sort(t?e:function(s,i){return e(r[s],r[i])}),n}o(qne,"state")});var AI=Q((Vwe,i5)=>{"use strict";var Hne=SI(),Kne=wI();i5.exports=$ne;function $ne(r){Object.keys(this.jobs).length&&(this.index=this.size,Hne(this),Kne(r)(null,this.results))}o($ne,"terminator")});var o5=Q((jwe,a5)=>{"use strict";var Xne=bI(),Gne=EI(),Wne=AI();a5.exports=zne;function zne(r,e,t){for(var n=Gne(r);n.index<(n.keyedList||r).length;)Xne(r,e,n,function(s,i){if(s){t(s,i);return}if(Object.keys(n.jobs).length===0){t(null,n.results);return}}),n.index++;return Wne.bind(n,t)}o(zne,"parallel")});var CI=Q((Mwe,NS)=>{"use strict";var u5=bI(),Jne=EI(),Yne=AI();NS.exports=Qne;NS.exports.ascending=c5;NS.exports.descending=Zne;function Qne(r,e,t,n){var s=Jne(r,t);return u5(r,e,s,o(function i(a,u){if(a){n(a,u);return}if(s.index++,s.index<(s.keyedList||r).length){u5(r,e,s,i);return}n(null,s.results)},"iteratorHandler")),Yne.bind(s,n)}o(Qne,"serialOrdered");function c5(r,e){return r<e?-1:r>e?1:0}o(c5,"ascending");function Zne(r,e){return-1*c5(r,e)}o(Zne,"descending")});var f5=Q((Hwe,l5)=>{"use strict";var ese=CI();l5.exports=tse;function tse(r,e,t){return ese(r,e,null,t)}o(tse,"serial")});var p5=Q(($we,h5)=>{"use strict";h5.exports={parallel:o5(),serial:f5(),serialOrdered:CI()}});var NI=Q((Xwe,d5)=>{"use strict";d5.exports=Object});var g5=Q((Gwe,m5)=>{"use strict";m5.exports=Error});var y5=Q((Wwe,v5)=>{"use strict";v5.exports=EvalError});var w5=Q((zwe,x5)=>{"use strict";x5.exports=RangeError});var b5=Q((Jwe,S5)=>{"use strict";S5.exports=ReferenceError});var A5=Q((Ywe,E5)=>{"use strict";E5.exports=SyntaxError});var TS=Q((Qwe,C5)=>{"use strict";C5.exports=TypeError});var T5=Q((Zwe,N5)=>{"use strict";N5.exports=URIError});var _5=Q((eSe,I5)=>{"use strict";I5.exports=Math.abs});var D5=Q((tSe,B5)=>{"use strict";B5.exports=Math.floor});var O5=Q((rSe,R5)=>{"use strict";R5.exports=Math.max});var k5=Q((nSe,P5)=>{"use strict";P5.exports=Math.min});var V5=Q((sSe,L5)=>{"use strict";L5.exports=Math.pow});var j5=Q((iSe,U5)=>{"use strict";U5.exports=Math.round});var M5=Q((aSe,F5)=>{"use strict";F5.exports=Number.isNaN||o(function(e){return e!==e},"isNaN")});var H5=Q((uSe,q5)=>{"use strict";var rse=M5();q5.exports=o(function(e){return rse(e)||e===0?e:e<0?-1:1},"sign")});var $5=Q((lSe,K5)=>{"use strict";K5.exports=Object.getOwnPropertyDescriptor});var TI=Q((fSe,X5)=>{"use strict";var IS=$5();if(IS)try{IS([],"length")}catch{IS=null}X5.exports=IS});var W5=Q((hSe,G5)=>{"use strict";var _S=Object.defineProperty||!1;if(_S)try{_S({},"a",{value:1})}catch{_S=!1}G5.exports=_S});var II=Q((pSe,z5)=>{"use strict";z5.exports=o(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var s=42;e[t]=s;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(e,t);if(u.value!==s||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var Q5=Q((mSe,Y5)=>{"use strict";var J5=typeof Symbol<"u"&&Symbol,nse=II();Y5.exports=o(function(){return typeof J5!="function"||typeof Symbol!="function"||typeof J5("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:nse()},"hasNativeSymbols")});var _I=Q((vSe,Z5)=>{"use strict";Z5.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var BI=Q((ySe,eV)=>{"use strict";var sse=NI();eV.exports=sse.getPrototypeOf||null});var nV=Q((xSe,rV)=>{"use strict";var ise="Function.prototype.bind called on incompatible ",ase=Object.prototype.toString,ose=Math.max,use="[object Function]",tV=o(function(e,t){for(var n=[],s=0;s<e.length;s+=1)n[s]=e[s];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},"concatty"),cse=o(function(e,t){for(var n=[],s=t||0,i=0;s<e.length;s+=1,i+=1)n[i]=e[s];return n},"slicy"),lse=o(function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t},"joiny");rV.exports=o(function(e){var t=this;if(typeof t!="function"||ase.apply(t)!==use)throw new TypeError(ise+t);for(var n=cse(arguments,1),s,i=o(function(){if(this instanceof s){var h=t.apply(this,tV(n,arguments));return Object(h)===h?h:this}return t.apply(e,tV(n,arguments))},"binder"),a=ose(0,t.length-n.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(s=Function("binder","return function ("+lse(u,",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var f=o(function(){},"Empty");f.prototype=t.prototype,s.prototype=new f,f.prototype=null}return s},"bind")});var Bg=Q((SSe,sV)=>{"use strict";var fse=nV();sV.exports=Function.prototype.bind||fse});var BS=Q((bSe,iV)=>{"use strict";iV.exports=Function.prototype.call});var DI=Q((ESe,aV)=>{"use strict";aV.exports=Function.prototype.apply});var uV=Q((ASe,oV)=>{"use strict";oV.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var lV=Q((CSe,cV)=>{"use strict";var hse=Bg(),pse=DI(),dse=BS(),mse=uV();cV.exports=mse||hse.call(dse,pse)});var hV=Q((NSe,fV)=>{"use strict";var gse=Bg(),vse=TS(),yse=BS(),xse=lV();fV.exports=o(function(e){if(e.length<1||typeof e[0]!="function")throw new vse("a function is required");return xse(gse,yse,e)},"callBindBasic")});var yV=Q((ISe,vV)=>{"use strict";var wse=hV(),pV=TI(),mV;try{mV=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var RI=!!mV&&pV&&pV(Object.prototype,"__proto__"),gV=Object,dV=gV.getPrototypeOf;vV.exports=RI&&typeof RI.get=="function"?wse([RI.get]):typeof dV=="function"?o(function(e){return dV(e==null?e:gV(e))},"getDunder"):!1});var EV=Q((BSe,bV)=>{"use strict";var xV=_I(),wV=BI(),SV=yV();bV.exports=xV?o(function(e){return xV(e)},"getProto"):wV?o(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return wV(e)},"getProto"):SV?o(function(e){return SV(e)},"getProto"):null});var DS=Q((RSe,AV)=>{"use strict";var Sse=Function.prototype.call,bse=Object.prototype.hasOwnProperty,Ese=Bg();AV.exports=Ese.call(Sse,bse)});var DV=Q((OSe,BV)=>{"use strict";var er,Ase=NI(),Cse=g5(),Nse=y5(),Tse=w5(),Ise=b5(),$p=A5(),Kp=TS(),_se=T5(),Bse=_5(),Dse=D5(),Rse=O5(),Ose=k5(),Pse=V5(),kse=j5(),Lse=H5(),IV=Function,OI=o(function(r){try{return IV('"use strict"; return ('+r+").constructor;")()}catch{}},"getEvalledConstructor"),Dg=TI(),Vse=W5(),PI=o(function(){throw new Kp},"throwTypeError"),Use=Dg?(function(){try{return arguments.callee,PI}catch{try{return Dg(arguments,"callee").get}catch{return PI}}})():PI,qp=Q5()(),Ln=EV(),jse=BI(),Fse=_I(),_V=DI(),Rg=BS(),Hp={},Mse=typeof Uint8Array>"u"||!Ln?er:Ln(Uint8Array),rf={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?er:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?er:ArrayBuffer,"%ArrayIteratorPrototype%":qp&&Ln?Ln([][Symbol.iterator]()):er,"%AsyncFromSyncIteratorPrototype%":er,"%AsyncFunction%":Hp,"%AsyncGenerator%":Hp,"%AsyncGeneratorFunction%":Hp,"%AsyncIteratorPrototype%":Hp,"%Atomics%":typeof Atomics>"u"?er:Atomics,"%BigInt%":typeof BigInt>"u"?er:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?er:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?er:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?er:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Cse,"%eval%":eval,"%EvalError%":Nse,"%Float16Array%":typeof Float16Array>"u"?er:Float16Array,"%Float32Array%":typeof Float32Array>"u"?er:Float32Array,"%Float64Array%":typeof Float64Array>"u"?er:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?er:FinalizationRegistry,"%Function%":IV,"%GeneratorFunction%":Hp,"%Int8Array%":typeof Int8Array>"u"?er:Int8Array,"%Int16Array%":typeof Int16Array>"u"?er:Int16Array,"%Int32Array%":typeof Int32Array>"u"?er:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qp&&Ln?Ln(Ln([][Symbol.iterator]())):er,"%JSON%":typeof JSON=="object"?JSON:er,"%Map%":typeof Map>"u"?er:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qp||!Ln?er:Ln(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Ase,"%Object.getOwnPropertyDescriptor%":Dg,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?er:Promise,"%Proxy%":typeof Proxy>"u"?er:Proxy,"%RangeError%":Tse,"%ReferenceError%":Ise,"%Reflect%":typeof Reflect>"u"?er:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?er:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qp||!Ln?er:Ln(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?er:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qp&&Ln?Ln(""[Symbol.iterator]()):er,"%Symbol%":qp?Symbol:er,"%SyntaxError%":$p,"%ThrowTypeError%":Use,"%TypedArray%":Mse,"%TypeError%":Kp,"%Uint8Array%":typeof Uint8Array>"u"?er:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?er:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?er:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?er:Uint32Array,"%URIError%":_se,"%WeakMap%":typeof WeakMap>"u"?er:WeakMap,"%WeakRef%":typeof WeakRef>"u"?er:WeakRef,"%WeakSet%":typeof WeakSet>"u"?er:WeakSet,"%Function.prototype.call%":Rg,"%Function.prototype.apply%":_V,"%Object.defineProperty%":Vse,"%Object.getPrototypeOf%":jse,"%Math.abs%":Bse,"%Math.floor%":Dse,"%Math.max%":Rse,"%Math.min%":Ose,"%Math.pow%":Pse,"%Math.round%":kse,"%Math.sign%":Lse,"%Reflect.getPrototypeOf%":Fse};if(Ln)try{null.error}catch(r){CV=Ln(Ln(r)),rf["%Error.prototype%"]=CV}var CV,qse=o(function r(e){var t;if(e==="%AsyncFunction%")t=OI("async function () {}");else if(e==="%GeneratorFunction%")t=OI("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=OI("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=r("%AsyncGenerator%");s&&Ln&&(t=Ln(s.prototype))}return rf[e]=t,t},"doEval"),NV={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Og=Bg(),RS=DS(),Hse=Og.call(Rg,Array.prototype.concat),Kse=Og.call(_V,Array.prototype.splice),TV=Og.call(Rg,String.prototype.replace),OS=Og.call(Rg,String.prototype.slice),$se=Og.call(Rg,RegExp.prototype.exec),Xse=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Gse=/\\(\\)?/g,Wse=o(function(e){var t=OS(e,0,1),n=OS(e,-1);if(t==="%"&&n!=="%")throw new $p("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new $p("invalid intrinsic syntax, expected opening `%`");var s=[];return TV(e,Xse,function(i,a,u,c){s[s.length]=u?TV(c,Gse,"$1"):a||i}),s},"stringToPath"),zse=o(function(e,t){var n=e,s;if(RS(NV,n)&&(s=NV[n],n="%"+s[0]+"%"),RS(rf,n)){var i=rf[n];if(i===Hp&&(i=qse(n)),typeof i>"u"&&!t)throw new Kp("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:i}}throw new $p("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");BV.exports=o(function(e,t){if(typeof e!="string"||e.length===0)throw new Kp("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Kp('"allowMissing" argument must be a boolean');if($se(/^%?[^%]*%?$/,e)===null)throw new $p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Wse(e),s=n.length>0?n[0]:"",i=zse("%"+s+"%",t),a=i.name,u=i.value,c=!1,f=i.alias;f&&(s=f[0],Kse(n,Hse([0,1],f)));for(var h=1,m=!0;h<n.length;h+=1){var g=n[h],x=OS(g,0,1),v=OS(g,-1);if((x==='"'||x==="'"||x==="`"||v==='"'||v==="'"||v==="`")&&x!==v)throw new $p("property names with quotes must have matching quotes");if((g==="constructor"||!m)&&(c=!0),s+="."+g,a="%"+s+"%",RS(rf,a))u=rf[a];else if(u!=null){if(!(g in u)){if(!t)throw new Kp("base intrinsic for "+e+" exists, but the property is not available.");return}if(Dg&&h+1>=n.length){var w=Dg(u,g);m=!!w,m&&"get"in w&&!("originalValue"in w.get)?u=w.get:u=u[g]}else m=RS(u,g),u=u[g];m&&!c&&(rf[a]=u)}}return u},"GetIntrinsic")});var OV=Q((kSe,RV)=>{"use strict";var Jse=II();RV.exports=o(function(){return Jse()&&!!Symbol.toStringTag},"hasToStringTagShams")});var LV=Q((VSe,kV)=>{"use strict";var Yse=DV(),PV=Yse("%Object.defineProperty%",!0),Qse=OV()(),Zse=DS(),eie=TS(),PS=Qse?Symbol.toStringTag:null;kV.exports=o(function(e,t){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,s=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof s<"u"&&typeof s!="boolean")throw new eie("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");PS&&(n||!Zse(e,PS))&&(PV?PV(e,PS,{configurable:!s,enumerable:!1,value:t,writable:!1}):e[PS]=t)},"setToStringTag")});var UV=Q((jSe,VV)=>{"use strict";VV.exports=function(r,e){return Object.keys(e).forEach(function(t){r[t]=r[t]||e[t]}),r}});var FV=Q((FSe,jV)=>{"use strict";var UI=K8(),tie=require("util"),kI=require("path"),rie=require("http"),nie=require("https"),sie=require("url").parse,iie=require("fs"),aie=require("stream").Stream,oie=require("crypto"),LI=J8(),uie=p5(),cie=LV(),Yu=DS(),VI=UV();function cr(r){if(!(this instanceof cr))return new cr(r);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],UI.call(this),r=r||{};for(var e in r)this[e]=r[e]}o(cr,"FormData");tie.inherits(cr,UI);cr.LINE_BREAK=`\r
|
|
46
|
+
`;cr.DEFAULT_CONTENT_TYPE="application/octet-stream";cr.prototype.append=function(r,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var n=UI.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var s=this._multiPartHeader(r,e,t),i=this._multiPartFooter();n(s),n(e),n(i),this._trackLength(s,e,t)};cr.prototype._trackLength=function(r,e,t){var n=0;t.knownLength!=null?n+=Number(t.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(r)+cr.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Yu(e,"httpVersion"))&&!(e instanceof aie))&&(t.knownLength||this._valuesToMeasure.push(e))};cr.prototype._lengthRetriever=function(r,e){Yu(r,"fd")?r.end!=null&&r.end!=1/0&&r.start!=null?e(null,r.end+1-(r.start?r.start:0)):iie.stat(r.path,function(t,n){if(t){e(t);return}var s=n.size-(r.start?r.start:0);e(null,s)}):Yu(r,"httpVersion")?e(null,Number(r.headers["content-length"])):Yu(r,"httpModule")?(r.on("response",function(t){r.pause(),e(null,Number(t.headers["content-length"]))}),r.resume()):e("Unknown stream")};cr.prototype._multiPartHeader=function(r,e,t){if(typeof t.header=="string")return t.header;var n=this._getContentDisposition(e,t),s=this._getContentType(e,t),i="",a={"Content-Disposition":["form-data",'name="'+r+'"'].concat(n||[]),"Content-Type":[].concat(s||[])};typeof t.header=="object"&&VI(a,t.header);var u;for(var c in a)if(Yu(a,c)){if(u=a[c],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(i+=c+": "+u.join("; ")+cr.LINE_BREAK)}return"--"+this.getBoundary()+cr.LINE_BREAK+i+cr.LINE_BREAK};cr.prototype._getContentDisposition=function(r,e){var t;if(typeof e.filepath=="string"?t=kI.normalize(e.filepath).replace(/\\/g,"/"):e.filename||r&&(r.name||r.path)?t=kI.basename(e.filename||r&&(r.name||r.path)):r&&r.readable&&Yu(r,"httpVersion")&&(t=kI.basename(r.client._httpMessage.path||"")),t)return'filename="'+t+'"'};cr.prototype._getContentType=function(r,e){var t=e.contentType;return!t&&r&&r.name&&(t=LI.lookup(r.name)),!t&&r&&r.path&&(t=LI.lookup(r.path)),!t&&r&&r.readable&&Yu(r,"httpVersion")&&(t=r.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=LI.lookup(e.filepath||e.filename)),!t&&r&&typeof r=="object"&&(t=cr.DEFAULT_CONTENT_TYPE),t};cr.prototype._multiPartFooter=function(){return(function(r){var e=cr.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),r(e)}).bind(this)};cr.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+cr.LINE_BREAK};cr.prototype.getHeaders=function(r){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in r)Yu(r,e)&&(t[e.toLowerCase()]=r[e]);return t};cr.prototype.setBoundary=function(r){if(typeof r!="string")throw new TypeError("FormData boundary must be a string");this._boundary=r};cr.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};cr.prototype.getBuffer=function(){for(var r=new Buffer.alloc(0),e=this.getBoundary(),t=0,n=this._streams.length;t<n;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?r=Buffer.concat([r,this._streams[t]]):r=Buffer.concat([r,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(r=Buffer.concat([r,Buffer.from(cr.LINE_BREAK)])));return Buffer.concat([r,Buffer.from(this._lastBoundary())])};cr.prototype._generateBoundary=function(){this._boundary="--------------------------"+oie.randomBytes(12).toString("hex")};cr.prototype.getLengthSync=function(){var r=this._overheadLength+this._valueLength;return this._streams.length&&(r+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),r};cr.prototype.hasKnownLength=function(){var r=!0;return this._valuesToMeasure.length&&(r=!1),r};cr.prototype.getLength=function(r){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(r.bind(this,null,e));return}uie.parallel(this._valuesToMeasure,this._lengthRetriever,function(t,n){if(t){r(t);return}n.forEach(function(s){e+=s}),r(null,e)})};cr.prototype.submit=function(r,e){var t,n,s={method:"post"};return typeof r=="string"?(r=sie(r),n=VI({port:r.port,path:r.pathname,host:r.hostname,protocol:r.protocol},s)):(n=VI(r,s),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(r.headers),n.protocol==="https:"?t=nie.request(n):t=rie.request(n),this.getLength((function(i,a){if(i&&i!=="Unknown stream"){this._error(i);return}if(a&&t.setHeader("Content-Length",a),this.pipe(t),e){var u,c=o(function(f,h){return t.removeListener("error",c),t.removeListener("response",u),e.call(this,f,h)},"callback");u=c.bind(this,null),t.on("error",c),t.on("response",u)}}).bind(this)),t};cr.prototype._error=function(r){this.error||(this.error=r,this.pause(),this.emit("error",r))};cr.prototype.toString=function(){return"[object FormData]"};cie(cr,"FormData");jV.exports=cr});var qV=Q(MV=>{"use strict";var lie=require("url").parse,fie={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},hie=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function pie(r){var e=typeof r=="string"?lie(r):r||{},t=e.protocol,n=e.host,s=e.port;if(typeof n!="string"||!n||typeof t!="string"||(t=t.split(":",1)[0],n=n.replace(/:\d*$/,""),s=parseInt(s)||fie[t]||0,!die(n,s)))return"";var i=Xp("npm_config_"+t+"_proxy")||Xp(t+"_proxy")||Xp("npm_config_proxy")||Xp("all_proxy");return i&&i.indexOf("://")===-1&&(i=t+"://"+i),i}o(pie,"getProxyForUrl");function die(r,e){var t=(Xp("npm_config_no_proxy")||Xp("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(n){if(!n)return!0;var s=n.match(/^(.+):(\d+)$/),i=s?s[1]:n,a=s?parseInt(s[2]):0;return a&&a!==e?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!hie.call(r,i)):r!==i}):!0}o(die,"shouldProxy");function Xp(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}o(Xp,"getEnv");MV.getProxyForUrl=pie});var KV=Q((KSe,HV)=>{"use strict";var Pg;HV.exports=function(){if(!Pg){try{Pg=Fp()("follow-redirects")}catch{}typeof Pg!="function"&&(Pg=o(function(){},"debug"))}Pg.apply(null,arguments)}});var zV=Q((XSe,JI)=>{"use strict";var Lg=require("url"),kg=Lg.URL,mie=require("http"),gie=require("https"),HI=require("stream").Writable,KI=require("assert"),$V=KV();o((function(){var e=typeof process<"u",t=typeof window<"u"&&typeof document<"u",n=sf(Error.captureStackTrace);!e&&(t||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")}),"detectUnsupportedEnvironment")();var $I=!1;try{KI(new kg(""))}catch(r){$I=r.code==="ERR_INVALID_URL"}var vie=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],XI=["abort","aborted","connect","error","socket","timeout"],GI=Object.create(null);XI.forEach(function(r){GI[r]=function(e,t,n){this._redirectable.emit(r,e,t,n)}});var FI=Vg("ERR_INVALID_URL","Invalid URL",TypeError),MI=Vg("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),yie=Vg("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",MI),xie=Vg("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),wie=Vg("ERR_STREAM_WRITE_AFTER_END","write after end"),Sie=HI.prototype.destroy||GV;function js(r,e){HI.call(this),this._sanitizeOptions(r),this._options=r,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(n){try{t._processResponse(n)}catch(s){t.emit("error",s instanceof MI?s:new MI({cause:s}))}},this._performRequest()}o(js,"RedirectableRequest");js.prototype=Object.create(HI.prototype);js.prototype.abort=function(){zI(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};js.prototype.destroy=function(r){return zI(this._currentRequest,r),Sie.call(this,r),this};js.prototype.write=function(r,e,t){if(this._ending)throw new wie;if(!nf(r)&&!Aie(r))throw new TypeError("data should be a string, Buffer or Uint8Array");if(sf(e)&&(t=e,e=null),r.length===0){t&&t();return}this._requestBodyLength+r.length<=this._options.maxBodyLength?(this._requestBodyLength+=r.length,this._requestBodyBuffers.push({data:r,encoding:e}),this._currentRequest.write(r,e,t)):(this.emit("error",new xie),this.abort())};js.prototype.end=function(r,e,t){if(sf(r)?(t=r,r=e=null):sf(e)&&(t=e,e=null),!r)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var n=this,s=this._currentRequest;this.write(r,e,function(){n._ended=!0,s.end(null,null,t)}),this._ending=!0}};js.prototype.setHeader=function(r,e){this._options.headers[r]=e,this._currentRequest.setHeader(r,e)};js.prototype.removeHeader=function(r){delete this._options.headers[r],this._currentRequest.removeHeader(r)};js.prototype.setTimeout=function(r,e){var t=this;function n(a){a.setTimeout(r),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}o(n,"destroyOnTimeout");function s(a){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),i()},r),n(a)}o(s,"startTimer");function i(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",i),t.removeListener("error",i),t.removeListener("response",i),t.removeListener("close",i),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",s)}return o(i,"clearTimer"),e&&this.on("timeout",e),this.socket?s(this.socket):this._currentRequest.once("socket",s),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(r){js.prototype[r]=function(e,t){return this._currentRequest[r](e,t)}});["aborted","connection","socket"].forEach(function(r){Object.defineProperty(js.prototype,r,{get:o(function(){return this._currentRequest[r]},"get")})});js.prototype._sanitizeOptions=function(r){if(r.headers||(r.headers={}),r.host&&(r.hostname||(r.hostname=r.host),delete r.host),!r.pathname&&r.path){var e=r.path.indexOf("?");e<0?r.pathname=r.path:(r.pathname=r.path.substring(0,e),r.search=r.path.substring(e))}};js.prototype._performRequest=function(){var r=this._options.protocol,e=this._options.nativeProtocols[r];if(!e)throw new TypeError("Unsupported protocol "+r);if(this._options.agents){var t=r.slice(0,-1);this._options.agent=this._options.agents[t]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var s of XI)n.on(s,GI[s]);if(this._currentUrl=/^\//.test(this._options.path)?Lg.format(this._options):this._options.path,this._isRedirect){var i=0,a=this,u=this._requestBodyBuffers;o((function c(f){if(n===a._currentRequest)if(f)a.emit("error",f);else if(i<u.length){var h=u[i++];n.finished||n.write(h.data,h.encoding,c)}else a._ended&&n.end()}),"writeNext")()}};js.prototype._processResponse=function(r){var e=r.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:r.headers,statusCode:e});var t=r.headers.location;if(!t||this._options.followRedirects===!1||e<300||e>=400){r.responseUrl=this._currentUrl,r.redirects=this._redirects,this.emit("response",r),this._requestBodyBuffers=[];return}if(zI(this._currentRequest),r.destroy(),++this._redirectCount>this._options.maxRedirects)throw new yie;var n,s=this._options.beforeRedirect;s&&(n=Object.assign({Host:r.req.getHeader("host")},this._options.headers));var i=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],jI(/^content-/i,this._options.headers));var a=jI(/^host$/i,this._options.headers),u=WI(this._currentUrl),c=a||u.host,f=/^\w+:/.test(t)?this._currentUrl:Lg.format(Object.assign(u,{host:c})),h=bie(t,f);if($V("redirecting to",h.href),this._isRedirect=!0,qI(h,this._options),(h.protocol!==u.protocol&&h.protocol!=="https:"||h.host!==c&&!Eie(h.host,c))&&jI(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),sf(s)){var m={headers:r.headers,statusCode:e},g={url:f,method:i,headers:n};s(this._options,m,g),this._sanitizeOptions(this._options)}this._performRequest()};function XV(r){var e={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(r).forEach(function(n){var s=n+":",i=t[s]=r[n],a=e[n]=Object.create(i);function u(f,h,m){return Cie(f)?f=qI(f):nf(f)?f=qI(WI(f)):(m=h,h=WV(f),f={protocol:s}),sf(h)&&(m=h,h=null),h=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},f,h),h.nativeProtocols=t,!nf(h.host)&&!nf(h.hostname)&&(h.hostname="::1"),KI.equal(h.protocol,s,"protocol mismatch"),$V("options",h),new js(h,m)}o(u,"request");function c(f,h,m){var g=a.request(f,h,m);return g.end(),g}o(c,"get"),Object.defineProperties(a,{request:{value:u,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}o(XV,"wrap");function GV(){}o(GV,"noop");function WI(r){var e;if($I)e=new kg(r);else if(e=WV(Lg.parse(r)),!nf(e.protocol))throw new FI({input:r});return e}o(WI,"parseUrl");function bie(r,e){return $I?new kg(r,e):WI(Lg.resolve(e,r))}o(bie,"resolveUrl");function WV(r){if(/^\[/.test(r.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(r.hostname))throw new FI({input:r.href||r});if(/^\[/.test(r.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(r.host))throw new FI({input:r.href||r});return r}o(WV,"validateUrl");function qI(r,e){var t=e||{};for(var n of vie)t[n]=r[n];return t.hostname.startsWith("[")&&(t.hostname=t.hostname.slice(1,-1)),t.port!==""&&(t.port=Number(t.port)),t.path=t.search?t.pathname+t.search:t.pathname,t}o(qI,"spreadUrlObject");function jI(r,e){var t;for(var n in e)r.test(n)&&(t=e[n],delete e[n]);return t===null||typeof t>"u"?void 0:String(t).trim()}o(jI,"removeMatchingHeaders");function Vg(r,e,t){function n(s){sf(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,s||{}),this.code=r,this.message=this.cause?e+": "+this.cause.message:e}return o(n,"CustomError"),n.prototype=new(t||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+r+"]",enumerable:!1}}),n}o(Vg,"createErrorType");function zI(r,e){for(var t of XI)r.removeListener(t,GI[t]);r.on("error",GV),r.destroy(e)}o(zI,"destroyRequest");function Eie(r,e){KI(nf(r)&&nf(e));var t=r.length-e.length-1;return t>0&&r[t]==="."&&r.endsWith(e)}o(Eie,"isSubdomain");function nf(r){return typeof r=="string"||r instanceof String}o(nf,"isString");function sf(r){return typeof r=="function"}o(sf,"isFunction");function Aie(r){return typeof r=="object"&&"length"in r}o(Aie,"isBuffer");function Cie(r){return kg&&r instanceof kg}o(Cie,"isURL");JI.exports=XV({http:mie,https:gie});JI.exports.wrap=XV});var x_=Q((WSe,KU)=>{"use strict";var Nie=FV(),Tie=require("crypto"),Iie=require("url"),_ie=qV(),Bie=require("http"),Die=require("https"),Rie=require("util"),Oie=zV(),Pie=require("zlib"),yU=require("stream"),kie=require("events");function $a(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}o($a,"_interopDefaultLegacy");var xU=$a(Nie),Lie=$a(Tie),Vie=$a(Iie),Uie=$a(_ie),jie=$a(Bie),Fie=$a(Die),wU=$a(Rie),Mie=$a(Oie),Zu=$a(Pie),Qu=$a(yU);function SU(r,e){return o(function(){return r.apply(e,arguments)},"wrap")}o(SU,"bind");var{toString:qie}=Object.prototype,{getPrototypeOf:h_}=Object,{iterator:HS,toStringTag:bU}=Symbol,KS=(r=>e=>{let t=qie.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ua=o(r=>(r=r.toLowerCase(),e=>KS(e)===r),"kindOfTest"),$S=o(r=>e=>typeof e===r,"typeOfTest"),{isArray:Qp}=Array,Wp=$S("undefined");function Fg(r){return r!==null&&!Wp(r)&&r.constructor!==null&&!Wp(r.constructor)&&Fs(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}o(Fg,"isBuffer");var EU=ua("ArrayBuffer");function Hie(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&EU(r.buffer),e}o(Hie,"isArrayBufferView");var Kie=$S("string"),Fs=$S("function"),AU=$S("number"),Mg=o(r=>r!==null&&typeof r=="object","isObject"),$ie=o(r=>r===!0||r===!1,"isBoolean"),LS=o(r=>{if(KS(r)!=="object")return!1;let e=h_(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(bU in r)&&!(HS in r)},"isPlainObject"),Xie=o(r=>{if(!Mg(r)||Fg(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},"isEmptyObject"),Gie=ua("Date"),Wie=ua("File"),zie=ua("Blob"),Jie=ua("FileList"),Yie=o(r=>Mg(r)&&Fs(r.pipe),"isStream"),Qie=o(r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Fs(r.append)&&((e=KS(r))==="formdata"||e==="object"&&Fs(r.toString)&&r.toString()==="[object FormData]"))},"isFormData"),Zie=ua("URLSearchParams"),[eae,tae,rae,nae]=["ReadableStream","Request","Response","Headers"].map(ua),sae=o(r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function qg(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),Qp(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(Fg(r))return;let i=t?Object.getOwnPropertyNames(r):Object.keys(r),a=i.length,u;for(n=0;n<a;n++)u=i[n],e.call(null,r[u],u,r)}}o(qg,"forEach");function CU(r,e){if(Fg(r))return null;e=e.toLowerCase();let t=Object.keys(r),n=t.length,s;for(;n-- >0;)if(s=t[n],e===s.toLowerCase())return s;return null}o(CU,"findKey");var af=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,NU=o(r=>!Wp(r)&&r!==af,"isContextDefined");function r_(){let{caseless:r,skipUndefined:e}=NU(this)&&this||{},t={},n=o((s,i)=>{let a=r&&CU(t,i)||i;LS(t[a])&&LS(s)?t[a]=r_(t[a],s):LS(s)?t[a]=r_({},s):Qp(s)?t[a]=s.slice():(!e||!Wp(s))&&(t[a]=s)},"assignValue");for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&qg(arguments[s],n);return t}o(r_,"merge");var iae=o((r,e,t,{allOwnKeys:n}={})=>(qg(e,(s,i)=>{t&&Fs(s)?r[i]=SU(s,t):r[i]=s},{allOwnKeys:n}),r),"extend"),aae=o(r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),"stripBOM"),oae=o((r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},"inherits"),uae=o((r,e,t,n)=>{let s,i,a,u={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),i=s.length;i-- >0;)a=s[i],(!n||n(a,r,e))&&!u[a]&&(e[a]=r[a],u[a]=!0);r=t!==!1&&h_(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},"toFlatObject"),cae=o((r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let n=r.indexOf(e,t);return n!==-1&&n===t},"endsWith"),lae=o(r=>{if(!r)return null;if(Qp(r))return r;let e=r.length;if(!AU(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},"toArray"),fae=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&h_(Uint8Array)),hae=o((r,e)=>{let n=(r&&r[HS]).call(r),s;for(;(s=n.next())&&!s.done;){let i=s.value;e.call(r,i[0],i[1])}},"forEachEntry"),pae=o((r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},"matchAll"),dae=ua("HTMLFormElement"),mae=o(r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,o(function(t,n,s){return n.toUpperCase()+s},"replacer")),"toCamelCase"),JV=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),gae=ua("RegExp"),TU=o((r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};qg(t,(s,i)=>{let a;(a=e(s,i,r))!==!1&&(n[i]=a||s)}),Object.defineProperties(r,n)},"reduceDescriptors"),vae=o(r=>{TU(r,(e,t)=>{if(Fs(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(Fs(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},"freezeMethods"),yae=o((r,e)=>{let t={},n=o(s=>{s.forEach(i=>{t[i]=!0})},"define");return Qp(r)?n(r):n(String(r).split(e)),t},"toObjectSet"),xae=o(()=>{},"noop"),wae=o((r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,"toFiniteNumber");function Sae(r){return!!(r&&Fs(r.append)&&r[bU]==="FormData"&&r[HS])}o(Sae,"isSpecCompliantForm");var bae=o(r=>{let e=new Array(10),t=o((n,s)=>{if(Mg(n)){if(e.indexOf(n)>=0)return;if(Fg(n))return n;if(!("toJSON"in n)){e[s]=n;let i=Qp(n)?[]:{};return qg(n,(a,u)=>{let c=t(a,s+1);!Wp(c)&&(i[u]=c)}),e[s]=void 0,i}}return n},"visit");return t(r,0)},"toJSONObject"),Eae=ua("AsyncFunction"),Aae=o(r=>r&&(Mg(r)||Fs(r))&&Fs(r.then)&&Fs(r.catch),"isThenable"),IU=((r,e)=>r?setImmediate:e?((t,n)=>(af.addEventListener("message",({source:s,data:i})=>{s===af&&i===t&&n.length&&n.shift()()},!1),s=>{n.push(s),af.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Fs(af.postMessage)),Cae=typeof queueMicrotask<"u"?queueMicrotask.bind(af):typeof process<"u"&&process.nextTick||IU,Nae=o(r=>r!=null&&Fs(r[HS]),"isIterable"),fe={isArray:Qp,isArrayBuffer:EU,isBuffer:Fg,isFormData:Qie,isArrayBufferView:Hie,isString:Kie,isNumber:AU,isBoolean:$ie,isObject:Mg,isPlainObject:LS,isEmptyObject:Xie,isReadableStream:eae,isRequest:tae,isResponse:rae,isHeaders:nae,isUndefined:Wp,isDate:Gie,isFile:Wie,isBlob:zie,isRegExp:gae,isFunction:Fs,isStream:Yie,isURLSearchParams:Zie,isTypedArray:fae,isFileList:Jie,forEach:qg,merge:r_,extend:iae,trim:sae,stripBOM:aae,inherits:oae,toFlatObject:uae,kindOf:KS,kindOfTest:ua,endsWith:cae,toArray:lae,forEachEntry:hae,matchAll:pae,isHTMLForm:dae,hasOwnProperty:JV,hasOwnProp:JV,reduceDescriptors:TU,freezeMethods:vae,toObjectSet:yae,toCamelCase:mae,noop:xae,toFiniteNumber:wae,findKey:CU,global:af,isContextDefined:NU,isSpecCompliantForm:Sae,toJSONObject:bae,isAsyncFn:Eae,isThenable:Aae,setImmediate:IU,asap:Cae,isIterable:Nae};function it(r,e,t,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}o(it,"AxiosError");fe.inherits(it,Error,{toJSON:o(function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:fe.toJSONObject(this.config),code:this.code,status:this.status}},"toJSON")});var _U=it.prototype,BU={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{BU[r]={value:r}});Object.defineProperties(it,BU);Object.defineProperty(_U,"isAxiosError",{value:!0});it.from=(r,e,t,n,s,i)=>{let a=Object.create(_U);fe.toFlatObject(r,a,o(function(h){return h!==Error.prototype},"filter"),f=>f!=="isAxiosError");let u=r&&r.message?r.message:"Error",c=e==null&&r?r.code:e;return it.call(a,u,c,t,n,s),r&&a.cause==null&&Object.defineProperty(a,"cause",{value:r,configurable:!0}),a.name=r&&r.name||"Error",i&&Object.assign(a,i),a};function n_(r){return fe.isPlainObject(r)||fe.isArray(r)}o(n_,"isVisitable");function DU(r){return fe.endsWith(r,"[]")?r.slice(0,-2):r}o(DU,"removeBrackets");function YV(r,e,t){return r?r.concat(e).map(o(function(s,i){return s=DU(s),!t&&i?"["+s+"]":s},"each")).join(t?".":""):e}o(YV,"renderKey");function Tae(r){return fe.isArray(r)&&!r.some(n_)}o(Tae,"isFlatArray");var Iae=fe.toFlatObject(fe,{},null,o(function(e){return/^is[A-Z]/.test(e)},"filter"));function XS(r,e,t){if(!fe.isObject(r))throw new TypeError("target must be an object");e=e||new(xU.default||FormData),t=fe.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,o(function(w,S){return!fe.isUndefined(S[w])},"defined"));let n=t.metaTokens,s=t.visitor||h,i=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&fe.isSpecCompliantForm(e);if(!fe.isFunction(s))throw new TypeError("visitor must be a function");function f(v){if(v===null)return"";if(fe.isDate(v))return v.toISOString();if(fe.isBoolean(v))return v.toString();if(!c&&fe.isBlob(v))throw new it("Blob is not supported. Use a Buffer instead.");return fe.isArrayBuffer(v)||fe.isTypedArray(v)?c&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}o(f,"convertValue");function h(v,w,S){let A=v;if(v&&!S&&typeof v=="object"){if(fe.endsWith(w,"{}"))w=n?w:w.slice(0,-2),v=JSON.stringify(v);else if(fe.isArray(v)&&Tae(v)||(fe.isFileList(v)||fe.endsWith(w,"[]"))&&(A=fe.toArray(v)))return w=DU(w),A.forEach(o(function(b,E){!(fe.isUndefined(b)||b===null)&&e.append(a===!0?YV([w],E,i):a===null?w:w+"[]",f(b))},"each")),!1}return n_(v)?!0:(e.append(YV(S,w,i),f(v)),!1)}o(h,"defaultVisitor");let m=[],g=Object.assign(Iae,{defaultVisitor:h,convertValue:f,isVisitable:n_});function x(v,w){if(!fe.isUndefined(v)){if(m.indexOf(v)!==-1)throw Error("Circular reference detected in "+w.join("."));m.push(v),fe.forEach(v,o(function(A,N){(!(fe.isUndefined(A)||A===null)&&s.call(e,A,fe.isString(N)?N.trim():N,w,g))===!0&&x(A,w?w.concat(N):[N])},"each")),m.pop()}}if(o(x,"build"),!fe.isObject(r))throw new TypeError("data must be an object");return x(r),e}o(XS,"toFormData");function QV(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,o(function(n){return e[n]},"replacer"))}o(QV,"encode$1");function RU(r,e){this._pairs=[],r&&XS(r,this,e)}o(RU,"AxiosURLSearchParams");var OU=RU.prototype;OU.append=o(function(e,t){this._pairs.push([e,t])},"append");OU.toString=o(function(e){let t=e?function(n){return e.call(this,n,QV)}:QV;return this._pairs.map(o(function(s){return t(s[0])+"="+t(s[1])},"each"),"").join("&")},"toString");function _ae(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}o(_ae,"encode");function p_(r,e,t){if(!e)return r;let n=t&&t.encode||_ae;fe.isFunction(t)&&(t={serialize:t});let s=t&&t.serialize,i;if(s?i=s(e,t):i=fe.isURLSearchParams(e)?e.toString():new RU(e,t).toString(n),i){let a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r}o(p_,"buildURL");var s_=class{static{o(this,"InterceptorManager")}constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){fe.forEach(this.handlers,o(function(n){n!==null&&e(n)},"forEachHandler"))}},ZV=s_,d_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Bae=Vie.default.URLSearchParams,YI="abcdefghijklmnopqrstuvwxyz",eU="0123456789",PU={DIGIT:eU,ALPHA:YI,ALPHA_DIGIT:YI+YI.toUpperCase()+eU},Dae=o((r=16,e=PU.ALPHA_DIGIT)=>{let t="",{length:n}=e,s=new Uint32Array(r);Lie.default.randomFillSync(s);for(let i=0;i<r;i++)t+=e[s[i]%n];return t},"generateString"),Rae={isNode:!0,classes:{URLSearchParams:Bae,FormData:xU.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:PU,generateString:Dae,protocols:["http","https","file","data"]},m_=typeof window<"u"&&typeof document<"u",i_=typeof navigator=="object"&&navigator||void 0,Oae=m_&&(!i_||["ReactNative","NativeScript","NS"].indexOf(i_.product)<0),Pae=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kae=m_&&window.location.href||"http://localhost",Lae=Object.freeze({__proto__:null,hasBrowserEnv:m_,hasStandardBrowserWebWorkerEnv:Pae,hasStandardBrowserEnv:Oae,navigator:i_,origin:kae}),sn={...Lae,...Rae};function Vae(r,e){return XS(r,new sn.classes.URLSearchParams,{visitor:o(function(t,n,s,i){return sn.isNode&&fe.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},"visitor"),...e})}o(Vae,"toURLEncodedForm");function Uae(r){return fe.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}o(Uae,"parsePropPath");function jae(r){let e={},t=Object.keys(r),n,s=t.length,i;for(n=0;n<s;n++)i=t[n],e[i]=r[i];return e}o(jae,"arrayToObject");function kU(r){function e(t,n,s,i){let a=t[i++];if(a==="__proto__")return!0;let u=Number.isFinite(+a),c=i>=t.length;return a=!a&&fe.isArray(s)?s.length:a,c?(fe.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!u):((!s[a]||!fe.isObject(s[a]))&&(s[a]=[]),e(t,n,s[a],i)&&fe.isArray(s[a])&&(s[a]=jae(s[a])),!u)}if(o(e,"buildPath"),fe.isFormData(r)&&fe.isFunction(r.entries)){let t={};return fe.forEachEntry(r,(n,s)=>{e(Uae(n),s,t,0)}),t}return null}o(kU,"formDataToJSON");function Fae(r,e,t){if(fe.isString(r))try{return(e||JSON.parse)(r),fe.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}o(Fae,"stringifySafely");var g_={transitional:d_,adapter:["xhr","http","fetch"],transformRequest:[o(function(e,t){let n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=fe.isObject(e);if(i&&fe.isHTMLForm(e)&&(e=new FormData(e)),fe.isFormData(e))return s?JSON.stringify(kU(e)):e;if(fe.isArrayBuffer(e)||fe.isBuffer(e)||fe.isStream(e)||fe.isFile(e)||fe.isBlob(e)||fe.isReadableStream(e))return e;if(fe.isArrayBufferView(e))return e.buffer;if(fe.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Vae(e,this.formSerializer).toString();if((u=fe.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return XS(u?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),Fae(e)):e},"transformRequest")],transformResponse:[o(function(e){let t=this.transitional||g_.transitional,n=t&&t.forcedJSONParsing,s=this.responseType==="json";if(fe.isResponse(e)||fe.isReadableStream(e))return e;if(e&&fe.isString(e)&&(n&&!this.responseType||s)){let a=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(u){if(a)throw u.name==="SyntaxError"?it.from(u,it.ERR_BAD_RESPONSE,this,null,this.response):u}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:sn.classes.FormData,Blob:sn.classes.Blob},validateStatus:o(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};fe.forEach(["delete","get","head","post","put","patch"],r=>{g_.headers[r]={}});var v_=g_,Mae=fe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qae=o(r=>{let e={},t,n,s;return r&&r.split(`
|
|
47
|
+
`).forEach(o(function(a){s=a.indexOf(":"),t=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!t||e[t]&&Mae[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)},"parser")),e},"parseHeaders"),tU=Symbol("internals");function Ug(r){return r&&String(r).trim().toLowerCase()}o(Ug,"normalizeHeader");function VS(r){return r===!1||r==null?r:fe.isArray(r)?r.map(VS):String(r)}o(VS,"normalizeValue");function Hae(r){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}o(Hae,"parseTokens");var Kae=o(r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim()),"isValidHeaderName");function QI(r,e,t,n,s){if(fe.isFunction(n))return n.call(this,e,t);if(s&&(e=t),!!fe.isString(e)){if(fe.isString(n))return e.indexOf(n)!==-1;if(fe.isRegExp(n))return n.test(e)}}o(QI,"matchHeaderValue");function $ae(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}o($ae,"formatHeader");function Xae(r,e){let t=fe.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:o(function(s,i,a){return this[n].call(this,e,s,i,a)},"value"),configurable:!0})})}o(Xae,"buildAccessors");var zp=class{static{o(this,"AxiosHeaders")}constructor(e){e&&this.set(e)}set(e,t,n){let s=this;function i(u,c,f){let h=Ug(c);if(!h)throw new Error("header name must be a non-empty string");let m=fe.findKey(s,h);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||c]=VS(u))}o(i,"setHeader");let a=o((u,c)=>fe.forEach(u,(f,h)=>i(f,h,c)),"setHeaders");if(fe.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(fe.isString(e)&&(e=e.trim())&&!Kae(e))a(qae(e),t);else if(fe.isObject(e)&&fe.isIterable(e)){let u={},c,f;for(let h of e){if(!fe.isArray(h))throw TypeError("Object iterator must return a key-value pair");u[f=h[0]]=(c=u[f])?fe.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}a(u,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Ug(e),e){let n=fe.findKey(this,e);if(n){let s=this[n];if(!t)return s;if(t===!0)return Hae(s);if(fe.isFunction(t))return t.call(this,s,n);if(fe.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ug(e),e){let n=fe.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||QI(this,this[n],n,t)))}return!1}delete(e,t){let n=this,s=!1;function i(a){if(a=Ug(a),a){let u=fe.findKey(n,a);u&&(!t||QI(n,n[u],u,t))&&(delete n[u],s=!0)}}return o(i,"deleteHeader"),fe.isArray(e)?e.forEach(i):i(e),s}clear(e){let t=Object.keys(this),n=t.length,s=!1;for(;n--;){let i=t[n];(!e||QI(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){let t=this,n={};return fe.forEach(this,(s,i)=>{let a=fe.findKey(n,i);if(a){t[a]=VS(s),delete t[i];return}let u=e?$ae(i):String(i).trim();u!==i&&delete t[i],t[u]=VS(s),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return fe.forEach(this,(n,s)=>{n!=null&&n!==!1&&(t[s]=e&&fe.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
48
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(s=>n.set(s)),n}static accessor(e){let n=(this[tU]=this[tU]={accessors:{}}).accessors,s=this.prototype;function i(a){let u=Ug(a);n[u]||(Xae(s,a),n[u]=!0)}return o(i,"defineAccessor"),fe.isArray(e)?e.forEach(i):i(e),this}};zp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);fe.reduceDescriptors(zp.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:o(()=>r,"get"),set(n){this[t]=n}}});fe.freezeMethods(zp);var Ms=zp;function ZI(r,e){let t=this||v_,n=e||t,s=Ms.from(n.headers),i=n.data;return fe.forEach(r,o(function(u){i=u.call(t,i,s.normalize(),e?e.status:void 0)},"transform")),s.normalize(),i}o(ZI,"transformData");function LU(r){return!!(r&&r.__CANCEL__)}o(LU,"isCancel");function ec(r,e,t){it.call(this,r??"canceled",it.ERR_CANCELED,e,t),this.name="CanceledError"}o(ec,"CanceledError");fe.inherits(ec,it,{__CANCEL__:!0});function Gp(r,e,t){let n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new it("Request failed with status code "+t.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}o(Gp,"settle");function Gae(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}o(Gae,"isAbsoluteURL");function Wae(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}o(Wae,"combineURLs");function y_(r,e,t){let n=!Gae(e);return r&&(n||t==!1)?Wae(r,e):e}o(y_,"buildFullPath");var FS="1.12.2";function VU(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}o(VU,"parseProtocol");var zae=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Jae(r,e,t){let n=t&&t.Blob||sn.classes.Blob,s=VU(r);if(e===void 0&&n&&(e=!0),s==="data"){r=s.length?r.slice(s.length+1):r;let i=zae.exec(r);if(!i)throw new it("Invalid URL",it.ERR_INVALID_URL);let a=i[1],u=i[2],c=i[3],f=Buffer.from(decodeURIComponent(c),u?"base64":"utf8");if(e){if(!n)throw new it("Blob is not supported",it.ERR_NOT_SUPPORT);return new n([f],{type:a})}return f}throw new it("Unsupported protocol "+s,it.ERR_NOT_SUPPORT)}o(Jae,"fromDataURI");var e_=Symbol("internals"),a_=class extends Qu.default.Transform{static{o(this,"AxiosTransformStream")}constructor(e){e=fe.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,s)=>!fe.isUndefined(s[n])),super({readableHighWaterMark:e.chunkSize});let t=this[e_]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){let t=this[e_];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let s=this[e_],i=s.maxRate,a=this.readableHighWaterMark,u=s.timeWindow,c=1e3/u,f=i/c,h=s.minChunkSize!==!1?Math.max(s.minChunkSize,f*.01):0,m=o((x,v)=>{let w=Buffer.byteLength(x);s.bytesSeen+=w,s.bytes+=w,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(x)?process.nextTick(v):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(v)}},"pushChunk"),g=o((x,v)=>{let w=Buffer.byteLength(x),S=null,A=a,N,b=0;if(i){let E=Date.now();(!s.ts||(b=E-s.ts)>=u)&&(s.ts=E,N=f-s.bytes,s.bytes=N<0?-N:0,b=0),N=f-s.bytes}if(i){if(N<=0)return setTimeout(()=>{v(null,x)},u-b);N<A&&(A=N)}A&&w>A&&w-A>h&&(S=x.subarray(A),x=x.subarray(0,A)),m(x,S?()=>{process.nextTick(v,null,S)}:v)},"transformChunk");g(e,o(function x(v,w){if(v)return n(v);w?g(w,x):n(null)},"transformNextChunk"))}},rU=a_,{asyncIterator:nU}=Symbol,Yae=o(async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[nU]?yield*r[nU]():yield r},"readBlob"),UU=Yae,Qae=sn.ALPHABET.ALPHA_DIGIT+"-_",jg=typeof TextEncoder=="function"?new TextEncoder:new wU.default.TextEncoder,of=`\r
|
|
49
|
+
`,Zae=jg.encode(of),eoe=2,o_=class{static{o(this,"FormDataPart")}constructor(e,t){let{escapeName:n}=this.constructor,s=fe.isString(t),i=`Content-Disposition: form-data; name="${n(e)}"${!s&&t.name?`; filename="${n(t.name)}"`:""}${of}`;s?t=jg.encode(String(t).replace(/\r?\n|\r\n?/g,of)):i+=`Content-Type: ${t.type||"application/octet-stream"}${of}`,this.headers=jg.encode(i+of),this.contentLength=s?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+eoe,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;fe.isTypedArray(e)?yield e:yield*UU(e),yield Zae}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},toe=o((r,e,t)=>{let{tag:n="form-data-boundary",size:s=25,boundary:i=n+"-"+sn.generateString(s,Qae)}=t||{};if(!fe.isFormData(r))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let a=jg.encode("--"+i+of),u=jg.encode("--"+i+"--"+of),c=u.byteLength,f=Array.from(r.entries()).map(([m,g])=>{let x=new o_(m,g);return c+=x.size,x});c+=a.byteLength*f.length,c=fe.toFiniteNumber(c);let h={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(h["Content-Length"]=c),e&&e(h),yU.Readable.from((async function*(){for(let m of f)yield a,yield*m.encode();yield u})())},"formDataToStream"),roe=toe,u_=class extends Qu.default.Transform{static{o(this,"ZlibHeaderTransformStream")}__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let s=Buffer.alloc(2);s[0]=120,s[1]=156,this.push(s,t)}this.__transform(e,t,n)}},noe=u_,soe=o((r,e)=>fe.isAsyncFn(r)?function(...t){let n=t.pop();r.apply(this,t).then(s=>{try{e?n(null,...e(s)):n(null,s)}catch(i){n(i)}},n)}:r,"callbackify"),ioe=soe;function aoe(r,e){r=r||10;let t=new Array(r),n=new Array(r),s=0,i=0,a;return e=e!==void 0?e:1e3,o(function(c){let f=Date.now(),h=n[i];a||(a=f),t[s]=c,n[s]=f;let m=i,g=0;for(;m!==s;)g+=t[m++],m=m%r;if(s=(s+1)%r,s===i&&(i=(i+1)%r),f-a<e)return;let x=h&&f-h;return x?Math.round(g*1e3/x):void 0},"push")}o(aoe,"speedometer");function ooe(r,e){let t=0,n=1e3/e,s,i,a=o((f,h=Date.now())=>{t=h,s=null,i&&(clearTimeout(i),i=null),r(...f)},"invoke");return[o((...f)=>{let h=Date.now(),m=h-t;m>=n?a(f,h):(s=f,i||(i=setTimeout(()=>{i=null,a(s)},n-m)))},"throttled"),o(()=>s&&a(s),"flush")]}o(ooe,"throttle");var Jp=o((r,e,t=3)=>{let n=0,s=aoe(50,250);return ooe(i=>{let a=i.loaded,u=i.lengthComputable?i.total:void 0,c=a-n,f=s(c),h=a<=u;n=a;let m={loaded:a,total:u,progress:u?a/u:void 0,bytes:c,rate:f||void 0,estimated:f&&u&&h?(u-a)/f:void 0,event:i,lengthComputable:u!=null,[e?"download":"upload"]:!0};r(m)},t)},"progressEventReducer"),MS=o((r,e)=>{let t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},"progressEventDecorator"),qS=o(r=>(...e)=>fe.asap(()=>r(...e)),"asyncDecorator");function uoe(r){if(!r||typeof r!="string"||!r.startsWith("data:"))return 0;let e=r.indexOf(",");if(e<0)return 0;let t=r.slice(5,e),n=r.slice(e+1);if(/;base64/i.test(t)){let i=n.length,a=n.length;for(let g=0;g<a;g++)if(n.charCodeAt(g)===37&&g+2<a){let x=n.charCodeAt(g+1),v=n.charCodeAt(g+2);(x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(i-=2,g+=2)}let u=0,c=a-1,f=o(g=>g>=2&&n.charCodeAt(g-2)===37&&n.charCodeAt(g-1)===51&&(n.charCodeAt(g)===68||n.charCodeAt(g)===100),"tailIsPct3D");c>=0&&(n.charCodeAt(c)===61?(u++,c--):f(c)&&(u++,c-=3)),u===1&&c>=0&&(n.charCodeAt(c)===61||f(c))&&u++;let m=Math.floor(i/4)*3-(u||0);return m>0?m:0}return Buffer.byteLength(n,"utf8")}o(uoe,"estimateDataURLDecodedBytes");var sU={flush:Zu.default.constants.Z_SYNC_FLUSH,finishFlush:Zu.default.constants.Z_SYNC_FLUSH},coe={flush:Zu.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Zu.default.constants.BROTLI_OPERATION_FLUSH},iU=fe.isFunction(Zu.default.createBrotliDecompress),{http:loe,https:foe}=Mie.default,hoe=/https:?/,aU=sn.protocols.map(r=>r+":"),oU=o((r,[e,t])=>(r.on("end",t).on("error",t),e),"flushOnFinish");function poe(r,e){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,e)}o(poe,"dispatchBeforeRedirect");function jU(r,e,t){let n=e;if(!n&&n!==!1){let s=Uie.default.getProxyForUrl(t);s&&(n=new URL(s))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){(n.auth.username||n.auth.password)&&(n.auth=(n.auth.username||"")+":"+(n.auth.password||""));let i=Buffer.from(n.auth,"utf8").toString("base64");r.headers["Proxy-Authorization"]="Basic "+i}r.headers.host=r.hostname+(r.port?":"+r.port:"");let s=n.hostname||n.host;r.hostname=s,r.host=s,r.port=n.port,r.path=t,n.protocol&&(r.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}r.beforeRedirects.proxy=o(function(i){jU(i,e,i.href)},"beforeRedirect")}o(jU,"setProxy");var doe=typeof process<"u"&&fe.kindOf(process)==="process",moe=o(r=>new Promise((e,t)=>{let n,s,i=o((c,f)=>{s||(s=!0,n&&n(c,f))},"done"),a=o(c=>{i(c),e(c)},"_resolve"),u=o(c=>{i(c,!0),t(c)},"_reject");r(a,u,c=>n=c).catch(u)}),"wrapAsync"),goe=o(({address:r,family:e})=>{if(!fe.isString(r))throw TypeError("address must be a string");return{address:r,family:e||(r.indexOf(".")<0?6:4)}},"resolveFamily"),uU=o((r,e)=>goe(fe.isObject(r)?r:{address:r,family:e}),"buildAddressEntry"),voe=doe&&o(function(e){return moe(o(async function(n,s,i){let{data:a,lookup:u,family:c}=e,{responseType:f,responseEncoding:h}=e,m=e.method.toUpperCase(),g,x=!1,v;if(u){let he=ioe(u,we=>fe.isArray(we)?we:[we]);u=o((we,Ke,Ae)=>{he(we,Ke,(xe,je,ze)=>{if(xe)return Ae(xe);let Ye=fe.isArray(je)?je.map(ct=>uU(ct)):[uU(je,ze)];Ke.all?Ae(xe,Ye):Ae(xe,Ye[0].address,Ye[0].family)})},"lookup")}let w=new kie.EventEmitter,S=o(()=>{e.cancelToken&&e.cancelToken.unsubscribe(A),e.signal&&e.signal.removeEventListener("abort",A),w.removeAllListeners()},"onFinished");i((he,we)=>{g=!0,we&&(x=!0,S())});function A(he){w.emit("abort",!he||he.type?new ec(null,e,v):he)}o(A,"abort"),w.once("abort",s),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(A),e.signal&&(e.signal.aborted?A():e.signal.addEventListener("abort",A)));let N=y_(e.baseURL,e.url,e.allowAbsoluteUrls),b=new URL(N,sn.hasBrowserEnv?sn.origin:void 0),E=b.protocol||aU[0];if(E==="data:"){if(e.maxContentLength>-1){let we=String(e.url||N||"");if(uoe(we)>e.maxContentLength)return s(new it("maxContentLength size of "+e.maxContentLength+" exceeded",it.ERR_BAD_RESPONSE,e))}let he;if(m!=="GET")return Gp(n,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{he=Jae(e.url,f==="blob",{Blob:e.env&&e.env.Blob})}catch(we){throw it.from(we,it.ERR_BAD_REQUEST,e)}return f==="text"?(he=he.toString(h),(!h||h==="utf8")&&(he=fe.stripBOM(he))):f==="stream"&&(he=Qu.default.Readable.from(he)),Gp(n,s,{data:he,status:200,statusText:"OK",headers:new Ms,config:e})}if(aU.indexOf(E)===-1)return s(new it("Unsupported protocol "+E,it.ERR_BAD_REQUEST,e));let C=Ms.from(e.headers).normalize();C.set("User-Agent","axios/"+FS,!1);let{onUploadProgress:_,onDownloadProgress:M}=e,R=e.maxRate,q,H;if(fe.isSpecCompliantForm(a)){let he=C.getContentType(/boundary=([-_\w\d]{10,70})/i);a=roe(a,we=>{C.set(we)},{tag:`axios-${FS}-boundary`,boundary:he&&he[1]||void 0})}else if(fe.isFormData(a)&&fe.isFunction(a.getHeaders)){if(C.set(a.getHeaders()),!C.hasContentLength())try{let he=await wU.default.promisify(a.getLength).call(a);Number.isFinite(he)&&he>=0&&C.setContentLength(he)}catch{}}else if(fe.isBlob(a)||fe.isFile(a))a.size&&C.setContentType(a.type||"application/octet-stream"),C.setContentLength(a.size||0),a=Qu.default.Readable.from(UU(a));else if(a&&!fe.isStream(a)){if(!Buffer.isBuffer(a))if(fe.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(fe.isString(a))a=Buffer.from(a,"utf-8");else return s(new it("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",it.ERR_BAD_REQUEST,e));if(C.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return s(new it("Request body larger than maxBodyLength limit",it.ERR_BAD_REQUEST,e))}let K=fe.toFiniteNumber(C.getContentLength());fe.isArray(R)?(q=R[0],H=R[1]):q=H=R,a&&(_||q)&&(fe.isStream(a)||(a=Qu.default.Readable.from(a,{objectMode:!1})),a=Qu.default.pipeline([a,new rU({maxRate:fe.toFiniteNumber(q)})],fe.noop),_&&a.on("progress",oU(a,MS(K,Jp(qS(_),!1,3)))));let G;if(e.auth){let he=e.auth.username||"",we=e.auth.password||"";G=he+":"+we}if(!G&&b.username){let he=b.username,we=b.password;G=he+":"+we}G&&C.delete("authorization");let pe;try{pe=p_(b.pathname+b.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(he){let we=new Error(he.message);return we.config=e,we.url=e.url,we.exists=!0,s(we)}C.set("Accept-Encoding","gzip, compress, deflate"+(iU?", br":""),!1);let le={path:pe,method:m,headers:C.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:G,protocol:E,family:c,beforeRedirect:poe,beforeRedirects:{}};!fe.isUndefined(u)&&(le.lookup=u),e.socketPath?le.socketPath=e.socketPath:(le.hostname=b.hostname.startsWith("[")?b.hostname.slice(1,-1):b.hostname,le.port=b.port,jU(le,e.proxy,E+"//"+b.hostname+(b.port?":"+b.port:"")+le.path));let ue,ee=hoe.test(le.protocol);if(le.agent=ee?e.httpsAgent:e.httpAgent,e.transport?ue=e.transport:e.maxRedirects===0?ue=ee?Fie.default:jie.default:(e.maxRedirects&&(le.maxRedirects=e.maxRedirects),e.beforeRedirect&&(le.beforeRedirects.config=e.beforeRedirect),ue=ee?foe:loe),e.maxBodyLength>-1?le.maxBodyLength=e.maxBodyLength:le.maxBodyLength=1/0,e.insecureHTTPParser&&(le.insecureHTTPParser=e.insecureHTTPParser),v=ue.request(le,o(function(we){if(v.destroyed)return;let Ke=[we],Ae=+we.headers["content-length"];if(M||H){let ct=new rU({maxRate:fe.toFiniteNumber(H)});M&&ct.on("progress",oU(ct,MS(Ae,Jp(qS(M),!0,3)))),Ke.push(ct)}let xe=we,je=we.req||v;if(e.decompress!==!1&&we.headers["content-encoding"])switch((m==="HEAD"||we.statusCode===204)&&delete we.headers["content-encoding"],(we.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Ke.push(Zu.default.createUnzip(sU)),delete we.headers["content-encoding"];break;case"deflate":Ke.push(new noe),Ke.push(Zu.default.createUnzip(sU)),delete we.headers["content-encoding"];break;case"br":iU&&(Ke.push(Zu.default.createBrotliDecompress(coe)),delete we.headers["content-encoding"])}xe=Ke.length>1?Qu.default.pipeline(Ke,fe.noop):Ke[0];let ze=Qu.default.finished(xe,()=>{ze(),S()}),Ye={status:we.statusCode,statusText:we.statusMessage,headers:new Ms(we.headers),config:e,request:je};if(f==="stream")Ye.data=xe,Gp(n,s,Ye);else{let ct=[],P=0;xe.on("data",o(function(se){ct.push(se),P+=se.length,e.maxContentLength>-1&&P>e.maxContentLength&&(x=!0,xe.destroy(),s(new it("maxContentLength size of "+e.maxContentLength+" exceeded",it.ERR_BAD_RESPONSE,e,je)))},"handleStreamData")),xe.on("aborted",o(function(){if(x)return;let se=new it("stream has been aborted",it.ERR_BAD_RESPONSE,e,je);xe.destroy(se),s(se)},"handlerStreamAborted")),xe.on("error",o(function(se){v.destroyed||s(it.from(se,null,e,je))},"handleStreamError")),xe.on("end",o(function(){try{let se=ct.length===1?ct[0]:Buffer.concat(ct);f!=="arraybuffer"&&(se=se.toString(h),(!h||h==="utf8")&&(se=fe.stripBOM(se))),Ye.data=se}catch(se){return s(it.from(se,null,e,Ye.request,Ye))}Gp(n,s,Ye)},"handleStreamEnd"))}w.once("abort",ct=>{xe.destroyed||(xe.emit("error",ct),xe.destroy())})},"handleResponse")),w.once("abort",he=>{s(he),v.destroy(he)}),v.on("error",o(function(we){s(it.from(we,null,e,v))},"handleRequestError")),v.on("socket",o(function(we){we.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let he=parseInt(e.timeout,10);if(Number.isNaN(he)){s(new it("error trying to parse `config.timeout` to int",it.ERR_BAD_OPTION_VALUE,e,v));return}v.setTimeout(he,o(function(){if(g)return;let Ke=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",Ae=e.transitional||d_;e.timeoutErrorMessage&&(Ke=e.timeoutErrorMessage),s(new it(Ke,Ae.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,v)),A()},"handleRequestTimeout"))}if(fe.isStream(a)){let he=!1,we=!1;a.on("end",()=>{he=!0}),a.once("error",Ke=>{we=!0,v.destroy(Ke)}),a.on("close",()=>{!he&&!we&&A(new ec("Request stream has been aborted",e,v))}),a.pipe(v)}else v.end(a)},"dispatchHttpRequest"))},"httpAdapter"),yoe=sn.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,sn.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(sn.origin),sn.navigator&&/(msie|trident)/i.test(sn.navigator.userAgent)):()=>!0,xoe=sn.hasStandardBrowserEnv?{write(r,e,t,n,s,i){let a=[r+"="+encodeURIComponent(e)];fe.isNumber(t)&&a.push("expires="+new Date(t).toGMTString()),fe.isString(n)&&a.push("path="+n),fe.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(r){let e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}},cU=o(r=>r instanceof Ms?{...r}:r,"headersToObject");function uf(r,e){e=e||{};let t={};function n(f,h,m,g){return fe.isPlainObject(f)&&fe.isPlainObject(h)?fe.merge.call({caseless:g},f,h):fe.isPlainObject(h)?fe.merge({},h):fe.isArray(h)?h.slice():h}o(n,"getMergedValue");function s(f,h,m,g){if(fe.isUndefined(h)){if(!fe.isUndefined(f))return n(void 0,f,m,g)}else return n(f,h,m,g)}o(s,"mergeDeepProperties");function i(f,h){if(!fe.isUndefined(h))return n(void 0,h)}o(i,"valueFromConfig2");function a(f,h){if(fe.isUndefined(h)){if(!fe.isUndefined(f))return n(void 0,f)}else return n(void 0,h)}o(a,"defaultToConfig2");function u(f,h,m){if(m in e)return n(f,h);if(m in r)return n(void 0,f)}o(u,"mergeDirectKeys");let c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:o((f,h,m)=>s(cU(f),cU(h),m,!0),"headers")};return fe.forEach(Object.keys({...r,...e}),o(function(h){let m=c[h]||s,g=m(r[h],e[h],h);fe.isUndefined(g)&&m!==u||(t[h]=g)},"computeConfigValue")),t}o(uf,"mergeConfig");var FU=o(r=>{let e=uf({},r),{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:u}=e;if(e.headers=a=Ms.from(a),e.url=p_(y_(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),fe.isFormData(t)){if(sn.hasStandardBrowserEnv||sn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(fe.isFunction(t.getHeaders)){let c=t.getHeaders(),f=["content-type","content-length"];Object.entries(c).forEach(([h,m])=>{f.includes(h.toLowerCase())&&a.set(h,m)})}}if(sn.hasStandardBrowserEnv&&(n&&fe.isFunction(n)&&(n=n(e)),n||n!==!1&&yoe(e.url))){let c=s&&i&&xoe.read(i);c&&a.set(s,c)}return e},"resolveConfig"),woe=typeof XMLHttpRequest<"u",Soe=woe&&function(r){return new Promise(o(function(t,n){let s=FU(r),i=s.data,a=Ms.from(s.headers).normalize(),{responseType:u,onUploadProgress:c,onDownloadProgress:f}=s,h,m,g,x,v;function w(){x&&x(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}o(w,"done");let S=new XMLHttpRequest;S.open(s.method.toUpperCase(),s.url,!0),S.timeout=s.timeout;function A(){if(!S)return;let b=Ms.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),C={data:!u||u==="text"||u==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:b,config:r,request:S};Gp(o(function(M){t(M),w()},"_resolve"),o(function(M){n(M),w()},"_reject"),C),S=null}o(A,"onloadend"),"onloadend"in S?S.onloadend=A:S.onreadystatechange=o(function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(A)},"handleLoad"),S.onabort=o(function(){S&&(n(new it("Request aborted",it.ECONNABORTED,r,S)),S=null)},"handleAbort"),S.onerror=o(function(E){let C=E&&E.message?E.message:"Network Error",_=new it(C,it.ERR_NETWORK,r,S);_.event=E||null,n(_),S=null},"handleError"),S.ontimeout=o(function(){let E=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",C=s.transitional||d_;s.timeoutErrorMessage&&(E=s.timeoutErrorMessage),n(new it(E,C.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,r,S)),S=null},"handleTimeout"),i===void 0&&a.setContentType(null),"setRequestHeader"in S&&fe.forEach(a.toJSON(),o(function(E,C){S.setRequestHeader(C,E)},"setRequestHeader")),fe.isUndefined(s.withCredentials)||(S.withCredentials=!!s.withCredentials),u&&u!=="json"&&(S.responseType=s.responseType),f&&([g,v]=Jp(f,!0),S.addEventListener("progress",g)),c&&S.upload&&([m,x]=Jp(c),S.upload.addEventListener("progress",m),S.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(h=o(b=>{S&&(n(!b||b.type?new ec(null,r,S):b),S.abort(),S=null)},"onCanceled"),s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));let N=VU(s.url);if(N&&sn.protocols.indexOf(N)===-1){n(new it("Unsupported protocol "+N+":",it.ERR_BAD_REQUEST,r));return}S.send(i||null)},"dispatchXhrRequest"))},boe=o((r,e)=>{let{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,s,i=o(function(f){if(!s){s=!0,u();let h=f instanceof Error?f:this.reason;n.abort(h instanceof it?h:new ec(h instanceof Error?h.message:h))}},"onabort"),a=e&&setTimeout(()=>{a=null,i(new it(`timeout ${e} of ms exceeded`,it.ETIMEDOUT))},e),u=o(()=>{r&&(a&&clearTimeout(a),a=null,r.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),r=null)},"unsubscribe");r.forEach(f=>f.addEventListener("abort",i));let{signal:c}=n;return c.unsubscribe=()=>fe.asap(u),c}},"composeSignals"),Eoe=boe,Aoe=o(function*(r,e){let t=r.byteLength;if(!e||t<e){yield r;return}let n=0,s;for(;n<t;)s=n+e,yield r.slice(n,s),n=s},"streamChunk"),Coe=o(async function*(r,e){for await(let t of Noe(r))yield*Aoe(t,e)},"readBytes"),Noe=o(async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let e=r.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},"readStream"),lU=o((r,e,t,n)=>{let s=Coe(r,e),i=0,a,u=o(c=>{a||(a=!0,n&&n(c))},"_onFinish");return new ReadableStream({async pull(c){try{let{done:f,value:h}=await s.next();if(f){u(),c.close();return}let m=h.byteLength;if(t){let g=i+=m;t(g)}c.enqueue(new Uint8Array(h))}catch(f){throw u(f),f}},cancel(c){return u(c),s.return()}},{highWaterMark:2})},"trackStream"),fU=64*1024,{isFunction:kS}=fe,Toe=(({Request:r,Response:e})=>({Request:r,Response:e}))(fe.global),{ReadableStream:hU,TextEncoder:pU}=fe.global,dU=o((r,...e)=>{try{return!!r(...e)}catch{return!1}},"test"),Ioe=o(r=>{r=fe.merge.call({skipUndefined:!0},Toe,r);let{fetch:e,Request:t,Response:n}=r,s=e?kS(e):typeof fetch=="function",i=kS(t),a=kS(n);if(!s)return!1;let u=s&&kS(hU),c=s&&(typeof pU=="function"?(v=>w=>v.encode(w))(new pU):async v=>new Uint8Array(await new t(v).arrayBuffer())),f=i&&u&&dU(()=>{let v=!1,w=new t(sn.origin,{body:new hU,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!w}),h=a&&u&&dU(()=>fe.isReadableStream(new n("").body)),m={stream:h&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!m[v]&&(m[v]=(w,S)=>{let A=w&&w[v];if(A)return A.call(w);throw new it(`Response type '${v}' is not supported`,it.ERR_NOT_SUPPORT,S)})});let g=o(async v=>{if(v==null)return 0;if(fe.isBlob(v))return v.size;if(fe.isSpecCompliantForm(v))return(await new t(sn.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(fe.isArrayBufferView(v)||fe.isArrayBuffer(v))return v.byteLength;if(fe.isURLSearchParams(v)&&(v=v+""),fe.isString(v))return(await c(v)).byteLength},"getBodyLength"),x=o(async(v,w)=>{let S=fe.toFiniteNumber(v.getContentLength());return S??g(w)},"resolveBodyLength");return async v=>{let{url:w,method:S,data:A,signal:N,cancelToken:b,timeout:E,onDownloadProgress:C,onUploadProgress:_,responseType:M,headers:R,withCredentials:q="same-origin",fetchOptions:H}=FU(v),K=e||fetch;M=M?(M+"").toLowerCase():"text";let G=Eoe([N,b&&b.toAbortSignal()],E),pe=null,le=G&&G.unsubscribe&&(()=>{G.unsubscribe()}),ue;try{if(_&&f&&S!=="get"&&S!=="head"&&(ue=await x(R,A))!==0){let xe=new t(w,{method:"POST",body:A,duplex:"half"}),je;if(fe.isFormData(A)&&(je=xe.headers.get("content-type"))&&R.setContentType(je),xe.body){let[ze,Ye]=MS(ue,Jp(qS(_)));A=lU(xe.body,fU,ze,Ye)}}fe.isString(q)||(q=q?"include":"omit");let ee=i&&"credentials"in t.prototype,he={...H,signal:G,method:S.toUpperCase(),headers:R.normalize().toJSON(),body:A,duplex:"half",credentials:ee?q:void 0};pe=i&&new t(w,he);let we=await(i?K(pe,H):K(w,he)),Ke=h&&(M==="stream"||M==="response");if(h&&(C||Ke&&le)){let xe={};["status","statusText","headers"].forEach(ct=>{xe[ct]=we[ct]});let je=fe.toFiniteNumber(we.headers.get("content-length")),[ze,Ye]=C&&MS(je,Jp(qS(C),!0))||[];we=new n(lU(we.body,fU,ze,()=>{Ye&&Ye(),le&&le()}),xe)}M=M||"text";let Ae=await m[fe.findKey(m,M)||"text"](we,v);return!Ke&&le&&le(),await new Promise((xe,je)=>{Gp(xe,je,{data:Ae,headers:Ms.from(we.headers),status:we.status,statusText:we.statusText,config:v,request:pe})})}catch(ee){throw le&&le(),ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new it("Network Error",it.ERR_NETWORK,v,pe),{cause:ee.cause||ee}):it.from(ee,ee&&ee.code,v,pe)}}},"factory"),_oe=new Map,MU=o(r=>{let e=r?r.env:{},{fetch:t,Request:n,Response:s}=e,i=[n,s,t],a=i.length,u=a,c,f,h=_oe;for(;u--;)c=i[u],f=h.get(c),f===void 0&&h.set(c,f=u?new Map:Ioe(e)),h=f;return f},"getFetch");MU();var c_={http:voe,xhr:Soe,fetch:{get:MU}};fe.forEach(c_,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var mU=o(r=>`- ${r}`,"renderReason"),Boe=o(r=>fe.isFunction(r)||r===null||r===!1,"isResolvedHandle"),qU={getAdapter:o((r,e)=>{r=fe.isArray(r)?r:[r];let{length:t}=r,n,s,i={};for(let a=0;a<t;a++){n=r[a];let u;if(s=n,!Boe(n)&&(s=c_[(u=String(n)).toLowerCase()],s===void 0))throw new it(`Unknown adapter '${u}'`);if(s&&(fe.isFunction(s)||(s=s.get(e))))break;i[u||"#"+a]=s}if(!s){let a=Object.entries(i).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
|
|
50
|
+
`+a.map(mU).join(`
|
|
51
|
+
`):" "+mU(a[0]):"as no adapter specified";throw new it("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return s},"getAdapter"),adapters:c_};function t_(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ec(null,r)}o(t_,"throwIfCancellationRequested");function gU(r){return t_(r),r.headers=Ms.from(r.headers),r.data=ZI.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),qU.getAdapter(r.adapter||v_.adapter,r)(r).then(o(function(n){return t_(r),n.data=ZI.call(r,r.transformResponse,n),n.headers=Ms.from(n.headers),n},"onAdapterResolution"),o(function(n){return LU(n)||(t_(r),n&&n.response&&(n.response.data=ZI.call(r,r.transformResponse,n.response),n.response.headers=Ms.from(n.response.headers))),Promise.reject(n)},"onAdapterRejection"))}o(gU,"dispatchRequest");var GS={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{GS[r]=o(function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r},"validator")});var vU={};GS.transitional=o(function(e,t,n){function s(i,a){return"[Axios v"+FS+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return o(s,"formatMessage"),(i,a,u)=>{if(e===!1)throw new it(s(a," has been removed"+(t?" in "+t:"")),it.ERR_DEPRECATED);return t&&!vU[a]&&(vU[a]=!0,console.warn(s(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(i,a,u):!0}},"transitional");GS.spelling=o(function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)},"spelling");function Doe(r,e,t){if(typeof r!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);let n=Object.keys(r),s=n.length;for(;s-- >0;){let i=n[s],a=e[i];if(a){let u=r[i],c=u===void 0||a(u,i,r);if(c!==!0)throw new it("option "+i+" must be "+c,it.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new it("Unknown option "+i,it.ERR_BAD_OPTION)}}o(Doe,"assertOptions");var US={assertOptions:Doe,validators:GS},Ka=US.validators,Yp=class{static{o(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new ZV,response:new ZV}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;let i=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
52
|
+
`+i):n.stack=i}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=uf(this.defaults,t);let{transitional:n,paramsSerializer:s,headers:i}=t;n!==void 0&&US.assertOptions(n,{silentJSONParsing:Ka.transitional(Ka.boolean),forcedJSONParsing:Ka.transitional(Ka.boolean),clarifyTimeoutError:Ka.transitional(Ka.boolean)},!1),s!=null&&(fe.isFunction(s)?t.paramsSerializer={serialize:s}:US.assertOptions(s,{encode:Ka.function,serialize:Ka.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),US.assertOptions(t,{baseUrl:Ka.spelling("baseURL"),withXsrfToken:Ka.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=i&&fe.merge(i.common,i[t.method]);i&&fe.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),t.headers=Ms.concat(a,i);let u=[],c=!0;this.interceptors.request.forEach(o(function(w){typeof w.runWhen=="function"&&w.runWhen(t)===!1||(c=c&&w.synchronous,u.unshift(w.fulfilled,w.rejected))},"unshiftRequestInterceptors"));let f=[];this.interceptors.response.forEach(o(function(w){f.push(w.fulfilled,w.rejected)},"pushResponseInterceptors"));let h,m=0,g;if(!c){let v=[gU.bind(this),void 0];for(v.unshift(...u),v.push(...f),g=v.length,h=Promise.resolve(t);m<g;)h=h.then(v[m++],v[m++]);return h}g=u.length;let x=t;for(;m<g;){let v=u[m++],w=u[m++];try{x=v(x)}catch(S){w.call(this,S);break}}try{h=gU.call(this,x)}catch(v){return Promise.reject(v)}for(m=0,g=f.length;m<g;)h=h.then(f[m++],f[m++]);return h}getUri(e){e=uf(this.defaults,e);let t=y_(e.baseURL,e.url,e.allowAbsoluteUrls);return p_(t,e.params,e.paramsSerializer)}};fe.forEach(["delete","get","head","options"],o(function(e){Yp.prototype[e]=function(t,n){return this.request(uf(n||{},{method:e,url:t,data:(n||{}).data}))}},"forEachMethodNoData"));fe.forEach(["post","put","patch"],o(function(e){function t(n){return o(function(i,a,u){return this.request(uf(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))},"httpMethod")}o(t,"generateHTTPMethod"),Yp.prototype[e]=t(),Yp.prototype[e+"Form"]=t(!0)},"forEachMethodWithData"));var jS=Yp,l_=class r{static{o(this,"CancelToken")}constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(o(function(i){t=i},"promiseExecutor"));let n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i,a=new Promise(u=>{n.subscribe(u),i=u}).then(s);return a.cancel=o(function(){n.unsubscribe(i)},"reject"),a},e(o(function(i,a,u){n.reason||(n.reason=new ec(i,a,u),t(n.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=o(n=>{e.abort(n)},"abort");return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new r(o(function(s){e=s},"executor")),cancel:e}}},Roe=l_;function Ooe(r){return o(function(t){return r.apply(null,t)},"wrap")}o(Ooe,"spread");function Poe(r){return fe.isObject(r)&&r.isAxiosError===!0}o(Poe,"isAxiosError");var f_={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(f_).forEach(([r,e])=>{f_[e]=r});var koe=f_;function HU(r){let e=new jS(r),t=SU(jS.prototype.request,e);return fe.extend(t,jS.prototype,e,{allOwnKeys:!0}),fe.extend(t,e,null,{allOwnKeys:!0}),t.create=o(function(s){return HU(uf(r,s))},"create"),t}o(HU,"createInstance");var yn=HU(v_);yn.Axios=jS;yn.CanceledError=ec;yn.CancelToken=Roe;yn.isCancel=LU;yn.VERSION=FS;yn.toFormData=XS;yn.AxiosError=it;yn.Cancel=yn.CanceledError;yn.all=o(function(e){return Promise.all(e)},"all");yn.spread=Ooe;yn.isAxiosError=Poe;yn.mergeConfig=uf;yn.AxiosHeaders=Ms;yn.formToJSON=r=>kU(fe.isHTMLForm(r)?new FormData(r):r);yn.getAdapter=qU.getAdapter;yn.HttpStatusCode=koe;yn.default=yn;KU.exports=yn});var $U=Q((JSe,Pr)=>{"use strict";Pr.exports.NTLMFLAG_NEGOTIATE_UNICODE=1;Pr.exports.NTLMFLAG_NEGOTIATE_OEM=2;Pr.exports.NTLMFLAG_REQUEST_TARGET=4;Pr.exports.NTLMFLAG_NEGOTIATE_SIGN=16;Pr.exports.NTLMFLAG_NEGOTIATE_SEAL=32;Pr.exports.NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE=64;Pr.exports.NTLMFLAG_NEGOTIATE_LM_KEY=128;Pr.exports.NTLMFLAG_NEGOTIATE_NETWARE=256;Pr.exports.NTLMFLAG_NEGOTIATE_NTLM_KEY=512;Pr.exports.NTLMFLAG_NEGOTIATE_ANONYMOUS=2048;Pr.exports.NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED=4096;Pr.exports.NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED=8192;Pr.exports.NTLMFLAG_NEGOTIATE_LOCAL_CALL=16384;Pr.exports.NTLMFLAG_NEGOTIATE_ALWAYS_SIGN=32768;Pr.exports.NTLMFLAG_TARGET_TYPE_DOMAIN=65536;Pr.exports.NTLMFLAG_TARGET_TYPE_SERVER=1<<17;Pr.exports.NTLMFLAG_TARGET_TYPE_SHARE=1<<18;Pr.exports.NTLMFLAG_NEGOTIATE_NTLM2_KEY=1<<19;Pr.exports.NTLMFLAG_REQUEST_INIT_RESPONSE=1<<20;Pr.exports.NTLMFLAG_REQUEST_ACCEPT_RESPONSE=1<<21;Pr.exports.NTLMFLAG_REQUEST_NONNT_SESSION_KEY=1<<22;Pr.exports.NTLMFLAG_NEGOTIATE_TARGET_INFO=1<<23;Pr.exports.NTLMFLAG_NEGOTIATE_128=1<<29;Pr.exports.NTLMFLAG_NEGOTIATE_KEY_EXCHANGE=1<<30;Pr.exports.NTLMFLAG_NEGOTIATE_56=1<<31});var w_=Q(Pi=>{"use strict";Pi.readUInt32BE=o(function(e,t){var n=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return n>>>0},"readUInt32BE");Pi.writeUInt32BE=o(function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=t&255},"writeUInt32BE");Pi.ip=o(function(e,t,n,s){for(var i=0,a=0,u=6;u>=0;u-=2){for(var c=0;c<=24;c+=8)i<<=1,i|=t>>>c+u&1;for(var c=0;c<=24;c+=8)i<<=1,i|=e>>>c+u&1}for(var u=6;u>=0;u-=2){for(var c=1;c<=25;c+=8)a<<=1,a|=t>>>c+u&1;for(var c=1;c<=25;c+=8)a<<=1,a|=e>>>c+u&1}n[s+0]=i>>>0,n[s+1]=a>>>0},"ip");Pi.rip=o(function(e,t,n,s){for(var i=0,a=0,u=0;u<4;u++)for(var c=24;c>=0;c-=8)i<<=1,i|=t>>>c+u&1,i<<=1,i|=e>>>c+u&1;for(var u=4;u<8;u++)for(var c=24;c>=0;c-=8)a<<=1,a|=t>>>c+u&1,a<<=1,a|=e>>>c+u&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"rip");Pi.pc1=o(function(e,t,n,s){for(var i=0,a=0,u=7;u>=5;u--){for(var c=0;c<=24;c+=8)i<<=1,i|=t>>c+u&1;for(var c=0;c<=24;c+=8)i<<=1,i|=e>>c+u&1}for(var c=0;c<=24;c+=8)i<<=1,i|=t>>c+u&1;for(var u=1;u<=3;u++){for(var c=0;c<=24;c+=8)a<<=1,a|=t>>c+u&1;for(var c=0;c<=24;c+=8)a<<=1,a|=e>>c+u&1}for(var c=0;c<=24;c+=8)a<<=1,a|=e>>c+u&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"pc1");Pi.r28shl=o(function(e,t){return e<<t&268435455|e>>>28-t},"r28shl");var WS=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Pi.pc2=o(function(e,t,n,s){for(var i=0,a=0,u=WS.length>>>1,c=0;c<u;c++)i<<=1,i|=e>>>WS[c]&1;for(var c=u;c<WS.length;c++)a<<=1,a|=t>>>WS[c]&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"pc2");Pi.expand=o(function(e,t,n){var s=0,i=0;s=(e&1)<<5|e>>>27;for(var a=23;a>=15;a-=4)s<<=6,s|=e>>>a&63;for(var a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(e&31)<<1|e>>>31,t[n+0]=s>>>0,t[n+1]=i>>>0},"expand");var XU=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Pi.substitute=o(function(e,t){for(var n=0,s=0;s<4;s++){var i=e>>>18-s*6&63,a=XU[s*64+i];n<<=4,n|=a}for(var s=0;s<4;s++){var i=t>>>18-s*6&63,a=XU[256+s*64+i];n<<=4,n|=a}return n>>>0},"substitute");var GU=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Pi.permute=o(function(e){for(var t=0,n=0;n<GU.length;n++)t<<=1,t|=e>>>GU[n]&1;return t>>>0},"permute");Pi.padSplit=o(function(e,t,n){for(var s=e.toString(2);s.length<t;)s="0"+s;for(var i=[],a=0;a<t;a+=n)i.push(s.slice(a,a+n));return i.join(" ")},"padSplit")});var Hg=Q((ZSe,zU)=>{"use strict";zU.exports=WU;function WU(r,e){if(!r)throw new Error(e||"Assertion failed")}o(WU,"assert");WU.equal=o(function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},"assertEqual")});var zS=Q((tbe,JU)=>{"use strict";var Loe=Hg();function ki(r){this.options=r,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=r.padding!==!1}o(ki,"Cipher");JU.exports=ki;ki.prototype._init=o(function(){},"_init");ki.prototype.update=o(function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)},"update");ki.prototype._buffer=o(function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),s=0;s<n;s++)this.buffer[this.bufferOff+s]=e[t+s];return this.bufferOff+=n,n},"_buffer");ki.prototype._flushBuffer=o(function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},"_flushBuffer");ki.prototype._updateEncrypt=o(function(e){var t=0,n=0,s=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(s*this.blockSize);this.bufferOff!==0&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},"_updateEncrypt");ki.prototype._updateDecrypt=o(function(e){for(var t=0,n=0,s=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(s*this.blockSize);s>0;s--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},"_updateDecrypt");ki.prototype.final=o(function(e){var t;e&&(t=this.update(e));var n;return this.type==="encrypt"?n=this._finalEncrypt():n=this._finalDecrypt(),t?t.concat(n):n},"final");ki.prototype._pad=o(function(e,t){if(t===0)return!1;for(;t<e.length;)e[t++]=0;return!0},"_pad");ki.prototype._finalEncrypt=o(function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},"_finalEncrypt");ki.prototype._unpad=o(function(e){return e},"_unpad");ki.prototype._finalDecrypt=o(function(){Loe.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)},"_finalDecrypt")});var YU=Q((nbe,S_)=>{"use strict";typeof Object.create=="function"?S_.exports=o(function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):S_.exports=o(function(e,t){if(t){e.super_=t;var n=o(function(){},"TempCtor");n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},"inherits")});var JS=Q((ibe,E_)=>{"use strict";try{if(b_=require("util"),typeof b_.inherits!="function")throw"";E_.exports=b_.inherits}catch{E_.exports=YU()}var b_});var A_=Q((abe,e6)=>{"use strict";var QU=Hg(),Voe=JS(),Cn=w_(),ZU=zS();function Uoe(){this.tmp=new Array(2),this.keys=null}o(Uoe,"DESState");function Xa(r){ZU.call(this,r);var e=new Uoe;this._desState=e,this.deriveKeys(e,r.key)}o(Xa,"DES");Voe(Xa,ZU);e6.exports=Xa;Xa.create=o(function(e){return new Xa(e)},"create");var joe=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Xa.prototype.deriveKeys=o(function(e,t){e.keys=new Array(32),QU.equal(t.length,this.blockSize,"Invalid key length");var n=Cn.readUInt32BE(t,0),s=Cn.readUInt32BE(t,4);Cn.pc1(n,s,e.tmp,0),n=e.tmp[0],s=e.tmp[1];for(var i=0;i<e.keys.length;i+=2){var a=joe[i>>>1];n=Cn.r28shl(n,a),s=Cn.r28shl(s,a),Cn.pc2(n,s,e.keys,i)}},"deriveKeys");Xa.prototype._update=o(function(e,t,n,s){var i=this._desState,a=Cn.readUInt32BE(e,t),u=Cn.readUInt32BE(e,t+4);Cn.ip(a,u,i.tmp,0),a=i.tmp[0],u=i.tmp[1],this.type==="encrypt"?this._encrypt(i,a,u,i.tmp,0):this._decrypt(i,a,u,i.tmp,0),a=i.tmp[0],u=i.tmp[1],Cn.writeUInt32BE(n,a,s),Cn.writeUInt32BE(n,u,s+4)},"_update");Xa.prototype._pad=o(function(e,t){if(this.padding===!1)return!1;for(var n=e.length-t,s=t;s<e.length;s++)e[s]=n;return!0},"_pad");Xa.prototype._unpad=o(function(e){if(this.padding===!1)return e;for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)QU.equal(e[n],t);return e.slice(0,e.length-t)},"_unpad");Xa.prototype._encrypt=o(function(e,t,n,s,i){for(var a=t,u=n,c=0;c<e.keys.length;c+=2){var f=e.keys[c],h=e.keys[c+1];Cn.expand(u,e.tmp,0),f^=e.tmp[0],h^=e.tmp[1];var m=Cn.substitute(f,h),g=Cn.permute(m),x=u;u=(a^g)>>>0,a=x}Cn.rip(u,a,s,i)},"_encrypt");Xa.prototype._decrypt=o(function(e,t,n,s,i){for(var a=n,u=t,c=e.keys.length-2;c>=0;c-=2){var f=e.keys[c],h=e.keys[c+1];Cn.expand(a,e.tmp,0),f^=e.tmp[0],h^=e.tmp[1];var m=Cn.substitute(f,h),g=Cn.permute(m),x=a;a=(u^g)>>>0,u=x}Cn.rip(a,u,s,i)},"_decrypt")});var r6=Q(t6=>{"use strict";var Foe=Hg(),Moe=JS(),YS={};function qoe(r){Foe.equal(r.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=r[e]}o(qoe,"CBCState");function Hoe(r){function e(i){r.call(this,i),this._cbcInit()}o(e,"CBC"),Moe(e,r);for(var t=Object.keys(YS),n=0;n<t.length;n++){var s=t[n];e.prototype[s]=YS[s]}return e.create=o(function(a){return new e(a)},"create"),e}o(Hoe,"instantiate");t6.instantiate=Hoe;YS._cbcInit=o(function(){var e=new qoe(this.options.iv);this._cbcState=e},"_cbcInit");YS._update=o(function(e,t,n,s){var i=this._cbcState,a=this.constructor.super_.prototype,u=i.iv;if(this.type==="encrypt"){for(var c=0;c<this.blockSize;c++)u[c]^=e[t+c];a._update.call(this,u,0,n,s);for(var c=0;c<this.blockSize;c++)u[c]=n[s+c]}else{a._update.call(this,e,t,n,s);for(var c=0;c<this.blockSize;c++)n[s+c]^=u[c];for(var c=0;c<this.blockSize;c++)u[c]=e[t+c]}},"_update")});var i6=Q((lbe,s6)=>{"use strict";var Koe=Hg(),$oe=JS(),n6=zS(),tc=A_();function Xoe(r,e){Koe.equal(e.length,24,"Invalid key length");var t=e.slice(0,8),n=e.slice(8,16),s=e.slice(16,24);r==="encrypt"?this.ciphers=[tc.create({type:"encrypt",key:t}),tc.create({type:"decrypt",key:n}),tc.create({type:"encrypt",key:s})]:this.ciphers=[tc.create({type:"decrypt",key:s}),tc.create({type:"encrypt",key:n}),tc.create({type:"decrypt",key:t})]}o(Xoe,"EDEState");function cf(r){n6.call(this,r);var e=new Xoe(this.type,this.options.key);this._edeState=e}o(cf,"EDE");$oe(cf,n6);s6.exports=cf;cf.create=o(function(e){return new cf(e)},"create");cf.prototype._update=o(function(e,t,n,s){var i=this._edeState;i.ciphers[0]._update(e,t,n,s),i.ciphers[1]._update(n,s,n,s),i.ciphers[2]._update(n,s,n,s)},"_update");cf.prototype._pad=tc.prototype._pad;cf.prototype._unpad=tc.prototype._unpad});var a6=Q(Zp=>{"use strict";Zp.utils=w_();Zp.Cipher=zS();Zp.DES=A_();Zp.CBC=r6();Zp.EDE=i6()});var o6=Q((pbe,QS)=>{"use strict";(function(){"use strict";var r=typeof window=="object"?window:{},e=!r.JS_MD4_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;e&&(r=global);var t=!r.JS_MD4_NO_COMMON_JS&&typeof QS=="object"&&QS.exports,n=typeof define=="function"&&define.amd,s=!r.JS_MD4_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",i="0123456789abcdef".split(""),a=[128,32768,8388608,-2147483648],u=[0,8,16,24],c=["hex","array","digest","buffer","arrayBuffer"],f=[],h;if(s){var m=new ArrayBuffer(68);h=new Uint8Array(m),f=new Uint32Array(m)}var g=o(function(A){return function(N){return new w(!0).update(N)[A]()}},"createOutputMethod"),x=o(function(){var A=g("hex");e&&(A=v(A)),A.create=function(){return new w},A.update=function(E){return A.create().update(E)};for(var N=0;N<c.length;++N){var b=c[N];A[b]=g(b)}return A},"createMethod"),v=o(function(A){var N=require("crypto"),b=require("buffer").Buffer,E=o(function(C){if(typeof C=="string")return N.createHash("md4").update(C,"utf8").digest("hex");if(s&&C instanceof ArrayBuffer)C=new Uint8Array(C);else if(C.length===void 0)return A(C);return N.createHash("md4").update(new b(C)).digest("hex")},"nodeMethod");return E},"nodeWrap");function w(A){if(A)f[0]=f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0,this.blocks=f,this.buffer8=h;else if(s){var N=new ArrayBuffer(68);this.buffer8=new Uint8Array(N),this.blocks=new Uint32Array(N)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=0,this.finalized=this.hashed=!1,this.first=!0}o(w,"Md4"),w.prototype.update=function(A){if(!this.finalized){var N=typeof A!="string";N&&s&&A instanceof ArrayBuffer&&(A=new Uint8Array(A));for(var b,E=0,C,_=A.length||0,M=this.blocks,R=this.buffer8;E<_;){if(this.hashed&&(this.hashed=!1,M[0]=M[16],M[16]=M[1]=M[2]=M[3]=M[4]=M[5]=M[6]=M[7]=M[8]=M[9]=M[10]=M[11]=M[12]=M[13]=M[14]=M[15]=0),N)if(s)for(C=this.start;E<_&&C<64;++E)R[C++]=A[E];else for(C=this.start;E<_&&C<64;++E)M[C>>2]|=A[E]<<u[C++&3];else if(s)for(C=this.start;E<_&&C<64;++E)b=A.charCodeAt(E),b<128?R[C++]=b:b<2048?(R[C++]=192|b>>6,R[C++]=128|b&63):b<55296||b>=57344?(R[C++]=224|b>>12,R[C++]=128|b>>6&63,R[C++]=128|b&63):(b=65536+((b&1023)<<10|A.charCodeAt(++E)&1023),R[C++]=240|b>>18,R[C++]=128|b>>12&63,R[C++]=128|b>>6&63,R[C++]=128|b&63);else for(C=this.start;E<_&&C<64;++E)b=A.charCodeAt(E),b<128?M[C>>2]|=b<<u[C++&3]:b<2048?(M[C>>2]|=(192|b>>6)<<u[C++&3],M[C>>2]|=(128|b&63)<<u[C++&3]):b<55296||b>=57344?(M[C>>2]|=(224|b>>12)<<u[C++&3],M[C>>2]|=(128|b>>6&63)<<u[C++&3],M[C>>2]|=(128|b&63)<<u[C++&3]):(b=65536+((b&1023)<<10|A.charCodeAt(++E)&1023),M[C>>2]|=(240|b>>18)<<u[C++&3],M[C>>2]|=(128|b>>12&63)<<u[C++&3],M[C>>2]|=(128|b>>6&63)<<u[C++&3],M[C>>2]|=(128|b&63)<<u[C++&3]);this.lastByteIndex=C,this.bytes+=C-this.start,C>=64?(this.start=C-64,this.hash(),this.hashed=!0):this.start=C}return this}},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var A=this.blocks,N=this.lastByteIndex;A[N>>2]|=a[N&3],N>=56&&(this.hashed||this.hash(),A[0]=A[16],A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),A[14]=this.bytes<<3,this.hash()}},w.prototype.hash=function(){var A,N,b,E,C,_,M,R,q=this.blocks;this.first?(A=q[0]-1,A=A<<3|A>>>29,E=(A&4023233417|~A&2562383102)+q[1]+271733878,E=E<<7|E>>>25,b=(E&A|~E&4023233417)+q[2]-1732584194,b=b<<11|b>>>21,N=(b&E|~b&A)+q[3]-271733879,N=N<<19|N>>>13):(A=this.h0,N=this.h1,b=this.h2,E=this.h3,A+=(N&b|~N&E)+q[0],A=A<<3|A>>>29,E+=(A&N|~A&b)+q[1],E=E<<7|E>>>25,b+=(E&A|~E&N)+q[2],b=b<<11|b>>>21,N+=(b&E|~b&A)+q[3],N=N<<19|N>>>13),A+=(N&b|~N&E)+q[4],A=A<<3|A>>>29,E+=(A&N|~A&b)+q[5],E=E<<7|E>>>25,b+=(E&A|~E&N)+q[6],b=b<<11|b>>>21,N+=(b&E|~b&A)+q[7],N=N<<19|N>>>13,A+=(N&b|~N&E)+q[8],A=A<<3|A>>>29,E+=(A&N|~A&b)+q[9],E=E<<7|E>>>25,b+=(E&A|~E&N)+q[10],b=b<<11|b>>>21,N+=(b&E|~b&A)+q[11],N=N<<19|N>>>13,A+=(N&b|~N&E)+q[12],A=A<<3|A>>>29,E+=(A&N|~A&b)+q[13],E=E<<7|E>>>25,b+=(E&A|~E&N)+q[14],b=b<<11|b>>>21,N+=(b&E|~b&A)+q[15],N=N<<19|N>>>13,_=N&b,A+=(_|N&E|b&E)+q[0]+1518500249,A=A<<3|A>>>29,C=A&N,E+=(C|A&b|_)+q[4]+1518500249,E=E<<5|E>>>27,R=E&A,b+=(R|E&N|C)+q[8]+1518500249,b=b<<9|b>>>23,M=b&E,N+=(M|b&A|R)+q[12]+1518500249,N=N<<13|N>>>19,_=N&b,A+=(_|N&E|M)+q[1]+1518500249,A=A<<3|A>>>29,C=A&N,E+=(C|A&b|_)+q[5]+1518500249,E=E<<5|E>>>27,R=E&A,b+=(R|E&N|C)+q[9]+1518500249,b=b<<9|b>>>23,M=b&E,N+=(M|b&A|R)+q[13]+1518500249,N=N<<13|N>>>19,_=N&b,A+=(_|N&E|M)+q[2]+1518500249,A=A<<3|A>>>29,C=A&N,E+=(C|A&b|_)+q[6]+1518500249,E=E<<5|E>>>27,R=E&A,b+=(R|E&N|C)+q[10]+1518500249,b=b<<9|b>>>23,M=b&E,N+=(M|b&A|R)+q[14]+1518500249,N=N<<13|N>>>19,_=N&b,A+=(_|N&E|M)+q[3]+1518500249,A=A<<3|A>>>29,C=A&N,E+=(C|A&b|_)+q[7]+1518500249,E=E<<5|E>>>27,R=E&A,b+=(R|E&N|C)+q[11]+1518500249,b=b<<9|b>>>23,N+=(b&E|b&A|R)+q[15]+1518500249,N=N<<13|N>>>19,_=N^b,A+=(_^E)+q[0]+1859775393,A=A<<3|A>>>29,E+=(_^A)+q[8]+1859775393,E=E<<9|E>>>23,R=E^A,b+=(R^N)+q[4]+1859775393,b=b<<11|b>>>21,N+=(R^b)+q[12]+1859775393,N=N<<15|N>>>17,_=N^b,A+=(_^E)+q[2]+1859775393,A=A<<3|A>>>29,E+=(_^A)+q[10]+1859775393,E=E<<9|E>>>23,R=E^A,b+=(R^N)+q[6]+1859775393,b=b<<11|b>>>21,N+=(R^b)+q[14]+1859775393,N=N<<15|N>>>17,_=N^b,A+=(_^E)+q[1]+1859775393,A=A<<3|A>>>29,E+=(_^A)+q[9]+1859775393,E=E<<9|E>>>23,R=E^A,b+=(R^N)+q[5]+1859775393,b=b<<11|b>>>21,N+=(R^b)+q[13]+1859775393,N=N<<15|N>>>17,_=N^b,A+=(_^E)+q[3]+1859775393,A=A<<3|A>>>29,E+=(_^A)+q[11]+1859775393,E=E<<9|E>>>23,R=E^A,b+=(R^N)+q[7]+1859775393,b=b<<11|b>>>21,N+=(R^b)+q[15]+1859775393,N=N<<15|N>>>17,this.first?(this.h0=A+1732584193<<0,this.h1=N-271733879<<0,this.h2=b-1732584194<<0,this.h3=E+271733878<<0,this.first=!1):(this.h0=this.h0+A<<0,this.h1=this.h1+N<<0,this.h2=this.h2+b<<0,this.h3=this.h3+E<<0)},w.prototype.hex=function(){this.finalize();var A=this.h0,N=this.h1,b=this.h2,E=this.h3;return i[A>>4&15]+i[A&15]+i[A>>12&15]+i[A>>8&15]+i[A>>20&15]+i[A>>16&15]+i[A>>28&15]+i[A>>24&15]+i[N>>4&15]+i[N&15]+i[N>>12&15]+i[N>>8&15]+i[N>>20&15]+i[N>>16&15]+i[N>>28&15]+i[N>>24&15]+i[b>>4&15]+i[b&15]+i[b>>12&15]+i[b>>8&15]+i[b>>20&15]+i[b>>16&15]+i[b>>28&15]+i[b>>24&15]+i[E>>4&15]+i[E&15]+i[E>>12&15]+i[E>>8&15]+i[E>>20&15]+i[E>>16&15]+i[E>>28&15]+i[E>>24&15]},w.prototype.toString=w.prototype.hex,w.prototype.digest=function(){this.finalize();var A=this.h0,N=this.h1,b=this.h2,E=this.h3;return[A&255,A>>8&255,A>>16&255,A>>24&255,N&255,N>>8&255,N>>16&255,N>>24&255,b&255,b>>8&255,b>>16&255,b>>24&255,E&255,E>>8&255,E>>16&255,E>>24&255]},w.prototype.array=w.prototype.digest,w.prototype.arrayBuffer=function(){this.finalize();var A=new ArrayBuffer(16),N=new Uint32Array(A);return N[0]=this.h0,N[1]=this.h1,N[2]=this.h2,N[3]=this.h3,A},w.prototype.buffer=w.prototype.arrayBuffer;var S=x();t?QS.exports=S:(r.md4=S,n&&define(function(){return S}))})()});var l6=Q((gbe,c6)=>{"use strict";var C_=require("crypto"),mbe=a6(),Goe=o6();function Woe(r,e){var t=new Buffer.alloc(24),n=new Buffer.alloc(21).fill(0);return e.copy(n),rc(n.slice(0,7),r).copy(t),rc(n.slice(7,14),r).copy(t,8),rc(n.slice(14),r).copy(t,16),t}o(Woe,"createLMResponse");function zoe(r){var e=new Buffer.alloc(16),t=new Buffer.alloc(14),n=new Buffer.from("KGS!@#$%","ascii");return r.length>14?(e.fill(0),e):(t.fill(0),t.write(r.toUpperCase(),0,"ascii"),Buffer.concat([rc(t.slice(0,7),n),rc(t.slice(7),n)]))}o(zoe,"createLMHash");function rc(r,e){var t=new Buffer.alloc(8);t[0]=r[0]&254,t[1]=r[0]<<7&255|r[1]>>1,t[2]=r[1]<<6&255|r[2]>>2,t[3]=r[2]<<5&255|r[3]>>3,t[4]=r[3]<<4&255|r[4]>>4,t[5]=r[4]<<3&255|r[5]>>5,t[6]=r[5]<<2&255|r[6]>>6,t[7]=r[6]<<1&255;for(var n=0;n<8;n++){for(var s=0,i=1;i<8;i++)s+=(t[n]>>i)%2;t[n]|=s%2===0?1:0}var a=a.DES.create({type:"encrypt",ley:t});return a.update(e)}o(rc,"calculateDES");function Joe(r,e){var t=new Buffer.alloc(24),n=new Buffer.alloc(21).fill(0);return e.copy(n),rc(n.slice(0,7),r).copy(t),rc(n.slice(7,14),r).copy(t,8),rc(n.slice(14),r).copy(t,16),t}o(Joe,"createNTLMResponse");function Yoe(r){var e=Goe.create();return e.update(new Buffer.from(r,"ucs2")),e.buffer()}o(Yoe,"createNTLMHash");function u6(r,e,t){var n=C_.createHmac("md5",r);return n.update(new Buffer.from(e.toUpperCase()+t,"ucs2")),n.digest()}o(u6,"createNTLMv2Hash");function Qoe(r,e,t,n,s){var i=new Buffer.alloc(24),a=u6(t,e,s),u=C_.createHmac("md5",a);r.challenge.copy(i,8),i.write(n||N_(16),16,"hex"),u.update(i.slice(8));var c=u.digest();return c.copy(i),i}o(Qoe,"createLMv2Response");function Zoe(r,e,t,n,s){var i=new Buffer.alloc(48+r.targetInfo.buffer.length),a=u6(t,e,s),u=C_.createHmac("md5",a);r.challenge.copy(i,8),i.writeUInt32BE(16842752,16),i.writeUInt32LE(0,20);var c=((Date.now()+116444736e5)*1e4).toString(16),f=+("0x"+c.substring(Math.max(0,c.length-8))),h=+("0x"+c.substring(0,Math.max(0,c.length-8)));i.writeUInt32LE(f,24,!1),i.writeUInt32LE(h,28,!1),i.write(n||N_(16),32,"hex"),i.writeUInt32LE(0,40),r.targetInfo.buffer.copy(i,44),i.writeUInt32LE(0,44+r.targetInfo.buffer.length),u.update(i.slice(8));var m=u.digest();return m.copy(i),i}o(Zoe,"createNTLMv2Response");function N_(r){for(var e="";e.length<r;)e+=Math.floor(Math.random()*16).toString(16);return e}o(N_,"createPseudoRandomValue");c6.exports={createLMHash:zoe,createNTLMHash:Yoe,createLMResponse:Woe,createNTLMResponse:Joe,createLMv2Response:Qoe,createNTLMv2Response:Zoe,createPseudoRandomValue:N_}});var p6=Q((ybe,h6)=>{"use strict";var f6=require("os"),sc=$U(),nc=l6(),ic="NTLMSSP\0";function eue(r,e){var t=32,n=0,s=new Buffer.alloc(1024);return r=r===void 0?f6.hostname():r,e=e===void 0?"":e,s.write(ic,n,ic.length,"ascii"),n+=ic.length,s.writeUInt32LE(1,n),n+=4,s.writeUInt32LE(sc.NTLMFLAG_NEGOTIATE_OEM|sc.NTLMFLAG_REQUEST_TARGET|sc.NTLMFLAG_NEGOTIATE_NTLM_KEY|sc.NTLMFLAG_NEGOTIATE_NTLM2_KEY|sc.NTLMFLAG_NEGOTIATE_ALWAYS_SIGN,n),n+=4,s.writeUInt16LE(e.length,n),n+=2,s.writeUInt16LE(e.length,n),n+=2,s.writeUInt32LE(e.length===0?0:t,n),n+=4,e.length>0&&(t+=s.write(e,t,"ascii")),s.writeUInt16LE(r.length,n),n+=2,s.writeUInt16LE(r.length,n),n+=2,s.writeUInt32LE(r.length===0?0:t,n),n+=4,r.length>0&&(t+=s.write(r,t,"ascii")),"NTLM "+s.toString("base64",0,t)}o(eue,"createType1Message");function tue(r){if(r===void 0)throw new Error("Invalid argument");if(Object.prototype.toString.call(r)!=="[object String]")if(r.hasOwnProperty("headers")&&r.headers.hasOwnProperty("www-authenticate"))r=r.headers["www-authenticate"];else throw new Error("Invalid argument");var e=/^NTLM ([^,\s]+)/.exec(r);e&&(r=e[1]);var t=new Buffer.from(r,"base64"),n={};if(t.toString("ascii",0,ic.length)!==ic)throw new Error("Invalid message signature: "+r);if(t.readUInt32LE(ic.length)!==2)throw new Error("Invalid message type (no type 2)");return n.flags=t.readUInt32LE(20),n.encoding=n.flags&sc.NTLMFLAG_NEGOTIATE_OEM?"ascii":"ucs2",n.version=n.flags&sc.NTLMFLAG_NEGOTIATE_NTLM2_KEY?2:1,n.challenge=t.slice(24,32),n.targetName=(function(){var s=t.readUInt16LE(12),i=t.readUInt32LE(16);if(s===0)return"";if(i+s>t.length||i<32)throw new Error("Bad type 2 message");return t.toString(n.encoding,i,i+s)})(),n.flags&sc.NTLMFLAG_NEGOTIATE_TARGET_INFO&&(n.targetInfo=(function(){var s={},i=t.readUInt16LE(40),a=t.readUInt32LE(44),u=new Buffer.alloc(i);if(t.copy(u,0,a,a+i),i===0)return s;if(a+i>t.length||a<32)throw new Error("Bad type 2 message");for(var c=a;c<a+i;){var f=t.readUInt16LE(c);c+=2;var h=t.readUInt16LE(c);if(c+=2,f===0)break;var m=void 0;switch(f){case 1:m="SERVER";break;case 2:m="DOMAIN";break;case 3:m="FQDN";break;case 4:m="DNS";break;case 5:m="PARENT_DNS";break;default:m="";break}m&&(s[m]=t.toString("ucs2",c,c+h)),c+=h}return{parsed:s,buffer:u}})()),n}o(tue,"decodeType2Message");function rue(r,e,t,n,s){var i=52,a=new Buffer.alloc(1024);if(n===void 0&&(n=f6.hostname()),s===void 0&&(s=r.targetName),a.write(ic,0,ic.length,"ascii"),a.writeUInt32LE(3,8),r.version===2){i=64;var u=nc.createNTLMHash(t),c=nc.createPseudoRandomValue(16),f=nc.createLMv2Response(r,e,u,c,s),h=nc.createNTLMv2Response(r,e,u,c,s);a.writeUInt16LE(f.length,12),a.writeUInt16LE(f.length,14),a.writeUInt32LE(i,16),f.copy(a,i),i+=f.length,a.writeUInt16LE(h.length,20),a.writeUInt16LE(h.length,22),a.writeUInt32LE(i,24),h.copy(a,i),i+=h.length}else{var m=nc.createLMHash(t),u=nc.createNTLMHash(t),g=nc.createLMResponse(r.challenge,m),x=nc.createNTLMResponse(r.challenge,u);a.writeUInt16LE(g.length,12),a.writeUInt16LE(g.length,14),a.writeUInt32LE(i,16),g.copy(a,i),i+=g.length,a.writeUInt16LE(x.length,20),a.writeUInt16LE(x.length,22),a.writeUInt32LE(i,24),x.copy(a,i),i+=x.length}return a.writeUInt16LE(r.encoding==="ascii"?s.length:s.length*2,28),a.writeUInt16LE(r.encoding==="ascii"?s.length:s.length*2,30),a.writeUInt32LE(i,32),i+=a.write(s,i,r.encoding),a.writeUInt16LE(r.encoding==="ascii"?e.length:e.length*2,36),a.writeUInt16LE(r.encoding==="ascii"?e.length:e.length*2,38),a.writeUInt32LE(i,40),i+=a.write(e,i,r.encoding),a.writeUInt16LE(r.encoding==="ascii"?n.length:n.length*2,44),a.writeUInt16LE(r.encoding==="ascii"?n.length:n.length*2,46),a.writeUInt32LE(i,48),i+=a.write(n,i,r.encoding),r.version===2&&(a.writeUInt16LE(0,52),a.writeUInt16LE(0,54),a.writeUInt32LE(0,56),a.writeUInt32LE(r.flags,60)),"NTLM "+a.toString("base64",0,i)}o(rue,"createType3Message");h6.exports={createType1Message:eue,decodeType2Message:tue,createType3Message:rue}});var v6=Q((wbe,g6)=>{"use strict";var nue=require("util"),sue=require("stream"),d6=sue.Writable,m6=m6||function(r){setTimeout(r,0)};g6.exports=Kg;nue.inherits(Kg,d6);function Kg(r){if(!(this instanceof Kg))return new Kg(r);r=r||{},d6.call(this,r)}o(Kg,"DevNull");Kg.prototype._write=function(r,e,t){m6(t)}});var x6=Q(Wn=>{"use strict";var iue=Wn&&Wn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),aue=Wn&&Wn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),ZS=Wn&&Wn.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&iue(t,e,n[s]);return aue(t,e),t}})(),oue=Wn&&Wn.__awaiter||function(r,e,t,n){function s(i){return i instanceof t?i:new t(function(a){a(i)})}return o(s,"adopt"),new(t||(t=Promise))(function(i,a){function u(h){try{f(n.next(h))}catch(m){a(m)}}o(u,"fulfilled");function c(h){try{f(n.throw(h))}catch(m){a(m)}}o(c,"rejected");function f(h){h.done?i(h.value):s(h.value).then(u,c)}o(f,"step"),f((n=n.apply(r,e||[])).next())})},uue=Wn&&Wn.__generator||function(r,e){var t={label:0,sent:o(function(){if(i[0]&1)throw i[1];return i[1]},"sent"),trys:[],ops:[]},n,s,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(f){return function(h){return c([f,h])}}function c(f){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(t=0)),t;)try{if(n=1,s&&(i=f[0]&2?s.return:f[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,f[1])).done)return i;switch(s=0,i&&(f=[f[0]&2,i.value]),f[0]){case 0:case 1:i=f;break;case 4:return t.label++,{value:f[1],done:!1};case 5:t.label++,s=f[1],f=[0];continue;case 7:f=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(f[0]===6||f[0]===2)){t=0;continue}if(f[0]===3&&(!i||f[1]>i[0]&&f[1]<i[3])){t.label=f[1];break}if(f[0]===6&&t.label<i[1]){t.label=i[1],i=f;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(f);break}i[2]&&t.ops.pop(),t.trys.pop();continue}f=e.call(r,t)}catch(h){f=[6,h],s=0}finally{n=i=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},cue=Wn&&Wn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.AxiosError=void 0;Wn.NtlmClient=pue;var y6=ZS(x_());Object.defineProperty(Wn,"AxiosError",{enumerable:!0,get:o(function(){return y6.AxiosError},"get")});var T_=ZS(p6()),lue=ZS(require("https")),fue=ZS(require("http")),hue=cue(v6());function pue(r,e){var t=this,n=e??{};n.httpAgent||(n.httpAgent=new fue.Agent({keepAlive:!0})),n.httpsAgent||(n.httpsAgent=new lue.Agent({keepAlive:!0}));var s=y6.default.create(n);return s.interceptors.response.use(function(i){return i},function(i){return oue(t,void 0,void 0,function(){var a,u,c,f,h,m,g,x;return uue(this,function(v){switch(v.label){case 0:return a=i.response,a&&a.status===401&&a.headers["www-authenticate"]&&a.headers["www-authenticate"].includes("NTLM")&&(!a.config.headers["X-retry"]||a.config.headers["X-retry"]!=="false")?(u=((g=a.headers["www-authenticate"].split(",").find(function(w){return w.match(/ *NTLM/)}))===null||g===void 0?void 0:g.trim())||"",a.config.headers||(a.config.headers={}),u.length<50?(c=T_.createType1Message(r.workstation,r.domain),a.config.headers.Authorization=c):(f=T_.decodeType2Message((u.match(/^NTLM\s+(.+?)(,|\s+|$)/)||[])[1]),h=T_.createType3Message(f,r.username,r.password,r.workstation,r.domain),a.config.headers["X-retry"]="false",a.config.headers.Authorization=h),a.config.responseType!=="stream"?[3,2]:(m=(x=i.response)===null||x===void 0?void 0:x.data,m&&!m.readableEnded?[4,new Promise(function(w){m.pipe((0,hue.default)()),m.once("close",w)})]:[3,2])):[3,3];case 1:v.sent(),v.label=2;case 2:return[2,s(a.config)];case 3:throw i}})})}),s}o(pue,"NtlmClient")});var $g=Q(ac=>{"use strict";ac.removeLeadingAndTrailingHTTPWhitespace=r=>r.replace(/^[ \t\n\r]+/u,"").replace(/[ \t\n\r]+$/u,"");ac.removeTrailingHTTPWhitespace=r=>r.replace(/[ \t\n\r]+$/u,"");ac.isHTTPWhitespaceChar=r=>r===" "||r===" "||r===`
|
|
53
|
+
`||r==="\r";ac.solelyContainsHTTPTokenCodePoints=r=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(r);ac.soleyContainsHTTPQuotedStringTokenCodePoints=r=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(r);ac.asciiLowercase=r=>r.replace(/[A-Z]/ug,e=>e.toLowerCase());ac.collectAnHTTPQuotedString=(r,e)=>{let t="";for(e++;;){for(;e<r.length&&r[e]!=='"'&&r[e]!=="\\";)t+=r[e],++e;if(e>=r.length)break;let n=r[e];if(++e,n==="\\"){if(e>=r.length){t+="\\";break}t+=r[e],++e}else break}return[t,e]}});var S6=Q((Nbe,w6)=>{"use strict";var{asciiLowercase:eb,solelyContainsHTTPTokenCodePoints:due,soleyContainsHTTPQuotedStringTokenCodePoints:mue}=$g();w6.exports=class{static{o(this,"MIMETypeParameters")}constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=eb(String(e)),this._map.get(e)}has(e){return e=eb(String(e)),this._map.has(e)}set(e,t){if(e=eb(String(e)),t=String(t),!due(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!mue(t))throw new Error(`Invalid MIME type parameter value "${t}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,t)}clear(){this._map.clear()}delete(e){return e=eb(String(e)),this._map.delete(e)}forEach(e,t){this._map.forEach(e,t)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}});var A6=Q((Ibe,E6)=>{"use strict";var{removeLeadingAndTrailingHTTPWhitespace:gue,removeTrailingHTTPWhitespace:b6,isHTTPWhitespaceChar:vue,solelyContainsHTTPTokenCodePoints:I_,soleyContainsHTTPQuotedStringTokenCodePoints:yue,asciiLowercase:__,collectAnHTTPQuotedString:xue}=$g();E6.exports=r=>{r=gue(r);let e=0,t="";for(;e<r.length&&r[e]!=="/";)t+=r[e],++e;if(t.length===0||!I_(t)||e>=r.length)return null;++e;let n="";for(;e<r.length&&r[e]!==";";)n+=r[e],++e;if(n=b6(n),n.length===0||!I_(n))return null;let s={type:__(t),subtype:__(n),parameters:new Map};for(;e<r.length;){for(++e;vue(r[e]);)++e;let i="";for(;e<r.length&&r[e]!==";"&&r[e]!=="=";)i+=r[e],++e;if(i=__(i),e<r.length){if(r[e]===";")continue;++e}let a=null;if(r[e]==='"')for([a,e]=xue(r,e);e<r.length&&r[e]!==";";)++e;else{for(a="";e<r.length&&r[e]!==";";)a+=r[e],++e;if(a=b6(a),a==="")continue}i.length>0&&I_(i)&&yue(a)&&!s.parameters.has(i)&&s.parameters.set(i,a)}return s}});var N6=Q((_be,C6)=>{"use strict";var{solelyContainsHTTPTokenCodePoints:wue}=$g();C6.exports=r=>{let e=`${r.type}/${r.subtype}`;if(r.parameters.size===0)return e;for(let[t,n]of r.parameters)e+=";",e+=t,e+="=",(!wue(n)||n.length===0)&&(n=n.replace(/(["\\])/ug,"\\$1"),n=`"${n}"`),e+=n;return e}});var B6=Q((Dbe,_6)=>{"use strict";var Sue=S6(),bue=A6(),Eue=N6(),{asciiLowercase:T6,solelyContainsHTTPTokenCodePoints:I6}=$g();_6.exports=class{static{o(this,"MIMEType")}constructor(e){e=String(e);let t=bue(e);if(t===null)throw new Error(`Could not parse MIME type string "${e}"`);this._type=t.type,this._subtype=t.subtype,this._parameters=new Sue(t.parameters)}static parse(e){try{return new this(e)}catch{return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(e=T6(String(e)),e.length===0)throw new Error("Invalid type: must be a non-empty string");if(!I6(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(e=T6(String(e)),e.length===0)throw new Error("Invalid subtype: must be a non-empty string");if(!I6(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return Eue(this)}isJavaScript({prohibitParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return!e||this._parameters.size===0;default:return!1}default:return!1}}isXML(){return this._subtype==="xml"&&(this._type==="text"||this._type==="application")||this._subtype.endsWith("+xml")}isHTML(){return this._subtype==="html"&&this._type==="text"}}});var B_,D6,R6,Aue,tb,D_=as(()=>{"use strict";B_=Wr(require("fs"),1),D6=Wr(require("crypto"),1),R6=require("events"),Aue=class extends R6.EventEmitter{static{o(this,"PersistentFile")}constructor({filepath:e,newFilename:t,originalFilename:n,mimetype:s,hashAlgorithm:i}){super(),this.lastModifiedDate=null,Object.assign(this,{filepath:e,newFilename:t,originalFilename:n,mimetype:s,hashAlgorithm:i}),this.size=0,this._writeStream=null,typeof this.hashAlgorithm=="string"?this.hash=D6.default.createHash(this.hashAlgorithm):this.hash=null}open(){this._writeStream=B_.default.createWriteStream(this.filepath),this._writeStream.on("error",e=>{this.emit("error",e)})}toJSON(){let e={size:this.size,filepath:this.filepath,newFilename:this.newFilename,mimetype:this.mimetype,mtime:this.lastModifiedDate,length:this.length,originalFilename:this.originalFilename};return this.hash&&this.hash!==""&&(e.hash=this.hash),e}toString(){return`PersistentFile: ${this.newFilename}, Original: ${this.originalFilename}, Path: ${this.filepath}`}write(e,t){if(this.hash&&this.hash.update(e),this._writeStream.closed){t();return}this._writeStream.write(e,()=>{this.lastModifiedDate=new Date,this.size+=e.length,this.emit("progress",this.size),t()})}end(e){this.hash&&(this.hash=this.hash.digest("hex")),this._writeStream.end(()=>{this.emit("end"),e()})}destroy(){this._writeStream.destroy();let e=this.filepath;setTimeout(function(){B_.default.unlink(e,()=>{})},1)}},tb=Aue});var O6,P6,Cue,rb,R_=as(()=>{"use strict";O6=require("crypto"),P6=require("events"),Cue=class extends P6.EventEmitter{static{o(this,"VolatileFile")}constructor({filepath:e,newFilename:t,originalFilename:n,mimetype:s,hashAlgorithm:i,createFileWriteStream:a}){super(),this.lastModifiedDate=null,Object.assign(this,{filepath:e,newFilename:t,originalFilename:n,mimetype:s,hashAlgorithm:i,createFileWriteStream:a}),this.size=0,this._writeStream=null,typeof this.hashAlgorithm=="string"?this.hash=(0,O6.createHash)(this.hashAlgorithm):this.hash=null}open(){this._writeStream=this.createFileWriteStream(this),this._writeStream.on("error",e=>{this.emit("error",e)})}destroy(){this._writeStream.destroy()}toJSON(){let e={size:this.size,newFilename:this.newFilename,length:this.length,originalFilename:this.originalFilename,mimetype:this.mimetype};return this.hash&&this.hash!==""&&(e.hash=this.hash),e}toString(){return`VolatileFile: ${this.originalFilename}`}write(e,t){if(this.hash&&this.hash.update(e),this._writeStream.closed||this._writeStream.destroyed){t();return}this._writeStream.write(e,()=>{this.size+=e.length,this.emit("progress",this.size),t()})}end(e){this.hash&&(this.hash=this.hash.digest("hex")),this._writeStream.end(()=>{this.emit("end"),e()})}},rb=Cue});var rj=Q(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.toBig=Pt.shrSL=Pt.shrSH=Pt.rotrSL=Pt.rotrSH=Pt.rotrBL=Pt.rotrBH=Pt.rotr32L=Pt.rotr32H=Pt.rotlSL=Pt.rotlSH=Pt.rotlBL=Pt.rotlBH=Pt.add5L=Pt.add5H=Pt.add4L=Pt.add4H=Pt.add3L=Pt.add3H=void 0;Pt.add=z6;Pt.fromBig=P_;Pt.split=k6;var nb=BigInt(2**32-1),O_=BigInt(32);function P_(r,e=!1){return e?{h:Number(r&nb),l:Number(r>>O_&nb)}:{h:Number(r>>O_&nb)|0,l:Number(r&nb)|0}}o(P_,"fromBig");function k6(r,e=!1){let t=r.length,n=new Uint32Array(t),s=new Uint32Array(t);for(let i=0;i<t;i++){let{h:a,l:u}=P_(r[i],e);[n[i],s[i]]=[a,u]}return[n,s]}o(k6,"split");var L6=o((r,e)=>BigInt(r>>>0)<<O_|BigInt(e>>>0),"toBig");Pt.toBig=L6;var V6=o((r,e,t)=>r>>>t,"shrSH");Pt.shrSH=V6;var U6=o((r,e,t)=>r<<32-t|e>>>t,"shrSL");Pt.shrSL=U6;var j6=o((r,e,t)=>r>>>t|e<<32-t,"rotrSH");Pt.rotrSH=j6;var F6=o((r,e,t)=>r<<32-t|e>>>t,"rotrSL");Pt.rotrSL=F6;var M6=o((r,e,t)=>r<<64-t|e>>>t-32,"rotrBH");Pt.rotrBH=M6;var q6=o((r,e,t)=>r>>>t-32|e<<64-t,"rotrBL");Pt.rotrBL=q6;var H6=o((r,e)=>e,"rotr32H");Pt.rotr32H=H6;var K6=o((r,e)=>r,"rotr32L");Pt.rotr32L=K6;var $6=o((r,e,t)=>r<<t|e>>>32-t,"rotlSH");Pt.rotlSH=$6;var X6=o((r,e,t)=>e<<t|r>>>32-t,"rotlSL");Pt.rotlSL=X6;var G6=o((r,e,t)=>e<<t-32|r>>>64-t,"rotlBH");Pt.rotlBH=G6;var W6=o((r,e,t)=>r<<t-32|e>>>64-t,"rotlBL");Pt.rotlBL=W6;function z6(r,e,t,n){let s=(e>>>0)+(n>>>0);return{h:r+t+(s/2**32|0)|0,l:s|0}}o(z6,"add");var J6=o((r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),"add3L");Pt.add3L=J6;var Y6=o((r,e,t,n)=>e+t+n+(r/2**32|0)|0,"add3H");Pt.add3H=Y6;var Q6=o((r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),"add4L");Pt.add4L=Q6;var Z6=o((r,e,t,n,s)=>e+t+n+s+(r/2**32|0)|0,"add4H");Pt.add4H=Z6;var ej=o((r,e,t,n,s)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(s>>>0),"add5L");Pt.add5L=ej;var tj=o((r,e,t,n,s,i)=>e+t+n+s+i+(r/2**32|0)|0,"add5H");Pt.add5H=tj;var Nue={fromBig:P_,split:k6,toBig:L6,shrSH:V6,shrSL:U6,rotrSH:j6,rotrSL:F6,rotrBH:M6,rotrBL:q6,rotr32H:H6,rotr32L:K6,rotlSH:$6,rotlSL:X6,rotlBH:G6,rotlBL:W6,add:z6,add3L:J6,add3H:Y6,add4L:Q6,add4H:Z6,add5H:tj,add5L:ej};Pt.default=Nue});var nj=Q(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});sb.crypto=void 0;var oc=require("crypto");sb.crypto=oc&&typeof oc=="object"&&"webcrypto"in oc?oc.webcrypto:oc&&typeof oc=="object"&&"randomBytes"in oc?oc:void 0});var fj=Q(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.wrapXOFConstructorWithOpts=bt.wrapConstructorWithOpts=bt.wrapConstructor=bt.Hash=bt.nextTick=bt.swap32IfBE=bt.byteSwapIfBE=bt.swap8IfBE=bt.isLE=void 0;bt.isBytes=ij;bt.anumber=k_;bt.abytes=td;bt.ahash=Tue;bt.aexists=Iue;bt.aoutput=_ue;bt.u8=Bue;bt.u32=Due;bt.clean=Rue;bt.createView=Oue;bt.rotr=Pue;bt.rotl=kue;bt.byteSwap=L_;bt.byteSwap32=aj;bt.bytesToHex=Vue;bt.hexToBytes=Uue;bt.asyncLoop=Fue;bt.utf8ToBytes=V_;bt.bytesToUtf8=Mue;bt.toBytes=ib;bt.kdfInputToBytes=que;bt.concatBytes=Hue;bt.checkOpts=Kue;bt.createHasher=uj;bt.createOptHasher=cj;bt.createXOFer=lj;bt.randomBytes=Xue;var ed=nj();function ij(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}o(ij,"isBytes");function k_(r){if(!Number.isSafeInteger(r)||r<0)throw new Error("positive integer expected, got "+r)}o(k_,"anumber");function td(r,...e){if(!ij(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error("Uint8Array expected of length "+e+", got length="+r.length)}o(td,"abytes");function Tue(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");k_(r.outputLen),k_(r.blockLen)}o(Tue,"ahash");function Iue(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}o(Iue,"aexists");function _ue(r,e){td(r);let t=e.outputLen;if(r.length<t)throw new Error("digestInto() expects output buffer of length at least "+t)}o(_ue,"aoutput");function Bue(r){return new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}o(Bue,"u8");function Due(r){return new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4))}o(Due,"u32");function Rue(...r){for(let e=0;e<r.length;e++)r[e].fill(0)}o(Rue,"clean");function Oue(r){return new DataView(r.buffer,r.byteOffset,r.byteLength)}o(Oue,"createView");function Pue(r,e){return r<<32-e|r>>>e}o(Pue,"rotr");function kue(r,e){return r<<e|r>>>32-e>>>0}o(kue,"rotl");bt.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function L_(r){return r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255}o(L_,"byteSwap");bt.swap8IfBE=bt.isLE?r=>r:r=>L_(r);bt.byteSwapIfBE=bt.swap8IfBE;function aj(r){for(let e=0;e<r.length;e++)r[e]=L_(r[e]);return r}o(aj,"byteSwap32");bt.swap32IfBE=bt.isLE?r=>r:aj;var oj=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Lue=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function Vue(r){if(td(r),oj)return r.toHex();let e="";for(let t=0;t<r.length;t++)e+=Lue[r[t]];return e}o(Vue,"bytesToHex");var jo={_0:48,_9:57,A:65,F:70,a:97,f:102};function sj(r){if(r>=jo._0&&r<=jo._9)return r-jo._0;if(r>=jo.A&&r<=jo.F)return r-(jo.A-10);if(r>=jo.a&&r<=jo.f)return r-(jo.a-10)}o(sj,"asciiToBase16");function Uue(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);if(oj)return Uint8Array.fromHex(r);let e=r.length,t=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(t);for(let s=0,i=0;s<t;s++,i+=2){let a=sj(r.charCodeAt(i)),u=sj(r.charCodeAt(i+1));if(a===void 0||u===void 0){let c=r[i]+r[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}n[s]=a*16+u}return n}o(Uue,"hexToBytes");var jue=o(async()=>{},"nextTick");bt.nextTick=jue;async function Fue(r,e,t){let n=Date.now();for(let s=0;s<r;s++){t(s);let i=Date.now()-n;i>=0&&i<e||(await(0,bt.nextTick)(),n+=i)}}o(Fue,"asyncLoop");function V_(r){if(typeof r!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(r))}o(V_,"utf8ToBytes");function Mue(r){return new TextDecoder().decode(r)}o(Mue,"bytesToUtf8");function ib(r){return typeof r=="string"&&(r=V_(r)),td(r),r}o(ib,"toBytes");function que(r){return typeof r=="string"&&(r=V_(r)),td(r),r}o(que,"kdfInputToBytes");function Hue(...r){let e=0;for(let n=0;n<r.length;n++){let s=r[n];td(s),e+=s.length}let t=new Uint8Array(e);for(let n=0,s=0;n<r.length;n++){let i=r[n];t.set(i,s),s+=i.length}return t}o(Hue,"concatBytes");function Kue(r,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(r,e)}o(Kue,"checkOpts");var $ue=class{static{o(this,"Hash")}};bt.Hash=$ue;function uj(r){let e=o(n=>r().update(ib(n)).digest(),"hashC"),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}o(uj,"createHasher");function cj(r){let e=o((n,s)=>r(s).update(ib(n)).digest(),"hashC"),t=r({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=n=>r(n),e}o(cj,"createOptHasher");function lj(r){let e=o((n,s)=>r(s).update(ib(n)).digest(),"hashC"),t=r({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=n=>r(n),e}o(lj,"createXOFer");bt.wrapConstructor=uj;bt.wrapConstructorWithOpts=cj;bt.wrapXOFConstructorWithOpts=lj;function Xue(r=32){if(ed.crypto&&typeof ed.crypto.getRandomValues=="function")return ed.crypto.getRandomValues(new Uint8Array(r));if(ed.crypto&&typeof ed.crypto.randomBytes=="function")return Uint8Array.from(ed.crypto.randomBytes(r));throw new Error("crypto.getRandomValues must be defined")}o(Xue,"randomBytes")});var Sj=Q(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.shake256=qr.shake128=qr.keccak_512=qr.keccak_384=qr.keccak_256=qr.keccak_224=qr.sha3_512=qr.sha3_384=qr.sha3_256=qr.sha3_224=qr.Keccak=void 0;qr.keccakP=yj;var Gg=rj(),us=fj(),Gue=BigInt(0),Xg=BigInt(1),Wue=BigInt(2),zue=BigInt(7),Jue=BigInt(256),Yue=BigInt(113),dj=[],mj=[],gj=[];for(let r=0,e=Xg,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],dj.push(2*(5*n+t)),mj.push((r+1)*(r+2)/2%64);let s=Gue;for(let i=0;i<7;i++)e=(e<<Xg^(e>>zue)*Yue)%Jue,e&Wue&&(s^=Xg<<(Xg<<BigInt(i))-Xg);gj.push(s)}var vj=(0,Gg.split)(gj,!0),Que=vj[0],Zue=vj[1],hj=o((r,e,t)=>t>32?(0,Gg.rotlBH)(r,e,t):(0,Gg.rotlSH)(r,e,t),"rotlH"),pj=o((r,e,t)=>t>32?(0,Gg.rotlBL)(r,e,t):(0,Gg.rotlSL)(r,e,t),"rotlL");function yj(r,e=24){let t=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let a=0;a<10;a++)t[a]=r[a]^r[a+10]^r[a+20]^r[a+30]^r[a+40];for(let a=0;a<10;a+=2){let u=(a+8)%10,c=(a+2)%10,f=t[c],h=t[c+1],m=hj(f,h,1)^t[u],g=pj(f,h,1)^t[u+1];for(let x=0;x<50;x+=10)r[a+x]^=m,r[a+x+1]^=g}let s=r[2],i=r[3];for(let a=0;a<24;a++){let u=mj[a],c=hj(s,i,u),f=pj(s,i,u),h=dj[a];s=r[h],i=r[h+1],r[h]=c,r[h+1]=f}for(let a=0;a<50;a+=10){for(let u=0;u<10;u++)t[u]=r[a+u];for(let u=0;u<10;u++)r[a+u]^=~t[(u+2)%10]&t[(u+4)%10]}r[0]^=Que[n],r[1]^=Zue[n]}(0,us.clean)(t)}o(yj,"keccakP");var U_=class xj extends us.Hash{static{o(this,"Keccak")}constructor(e,t,n,s=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=s,this.rounds=i,(0,us.anumber)(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,us.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,us.swap32IfBE)(this.state32),yj(this.state32,this.rounds),(0,us.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(e){(0,us.aexists)(this),e=(0,us.toBytes)(e),(0,us.abytes)(e);let{blockLen:t,state:n}=this,s=e.length;for(let i=0;i<s;){let a=Math.min(t-this.pos,s-i);for(let u=0;u<a;u++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:s}=this;e[n]^=t,(t&128)!==0&&n===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){(0,us.aexists)(this,!1),(0,us.abytes)(e),this.finish();let t=this.state,{blockLen:n}=this;for(let s=0,i=e.length;s<i;){this.posOut>=n&&this.keccak();let a=Math.min(n-this.posOut,i-s);e.set(t.subarray(this.posOut,this.posOut+a),s),this.posOut+=a,s+=a}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,us.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,us.aoutput)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,us.clean)(this.state)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:s,rounds:i,enableXOF:a}=this;return e||(e=new xj(t,n,s,a,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=a,e.destroyed=this.destroyed,e}};qr.Keccak=U_;var uc=o((r,e,t)=>(0,us.createHasher)(()=>new U_(e,r,t)),"gen");qr.sha3_224=uc(6,144,224/8);qr.sha3_256=uc(6,136,256/8);qr.sha3_384=uc(6,104,384/8);qr.sha3_512=uc(6,72,512/8);qr.keccak_224=uc(1,144,224/8);qr.keccak_256=uc(1,136,256/8);qr.keccak_384=uc(1,104,384/8);qr.keccak_512=uc(1,72,512/8);var wj=o((r,e,t)=>(0,us.createXOFer)((n={})=>new U_(e,r,n.dkLen===void 0?t:n.dkLen,!0)),"genShake");qr.shake128=wj(31,168,128/8);qr.shake256=wj(31,136,256/8)});var _j=Q((Gbe,cc)=>{"use strict";var{sha3_512:ece}=Sj(),Ej=24,Wg=32,j_=o((r=4,e=Math.random)=>{let t="";for(;t.length<r;)t=t+Math.floor(e()*36).toString(36);return t},"createEntropy");function Aj(r){let e=8n,t=0n;for(let n of r.values()){let s=BigInt(n);t=(t<<e)+s}return t}o(Aj,"bufToBigInt");var Cj=o((r="")=>Aj(ece(r)).toString(36).slice(1),"hash"),bj=Array.from({length:26},(r,e)=>String.fromCharCode(e+97)),tce=o(r=>bj[Math.floor(r()*bj.length)],"randomLetter"),Nj=o(({globalObj:r=typeof global<"u"?global:typeof window<"u"?window:{},random:e=Math.random}={})=>{let t=Object.keys(r).toString(),n=t.length?t+j_(Wg,e):j_(Wg,e);return Cj(n).substring(0,Wg)},"createFingerprint"),Tj=o(r=>()=>r++,"createCounter"),rce=476782367,Ij=o(({random:r=Math.random,counter:e=Tj(Math.floor(r()*rce)),length:t=Ej,fingerprint:n=Nj({random:r})}={})=>o(function(){let i=tce(r),a=Date.now().toString(36),u=e().toString(36),c=j_(t,r),f=`${a+c+u+n}`;return`${i+Cj(f).substring(1,t)}`},"cuid2"),"init"),nce=Ij(),sce=o((r,{minLength:e=2,maxLength:t=Wg}={})=>{let n=r.length,s=/^[0-9a-z]+$/;try{if(typeof r=="string"&&n>=e&&n<=t&&s.test(r))return!0}finally{}return!1},"isCuid");cc.exports.getConstants=()=>({defaultLength:Ej,bigLength:Wg});cc.exports.init=Ij;cc.exports.createId=nce;cc.exports.bufToBigInt=Aj;cc.exports.createCounter=Tj;cc.exports.createFingerprint=Nj;cc.exports.isCuid=sce});var Bj=Q((zbe,zg)=>{"use strict";var{createId:ice,init:ace,getConstants:oce,isCuid:uce}=_j();zg.exports.createId=ice;zg.exports.init=ace;zg.exports.getConstants=oce;zg.exports.isCuid=uce});var F_=Q((Jbe,Rj)=>{"use strict";Rj.exports=Dj;function Dj(r,e){if(r&&e)return Dj(r)(e);if(typeof r!="function")throw new TypeError("need wrapper function");return Object.keys(r).forEach(function(n){t[n]=r[n]}),t;function t(){for(var n=new Array(arguments.length),s=0;s<n.length;s++)n[s]=arguments[s];var i=r.apply(this,n),a=n[n.length-1];return typeof i=="function"&&i!==a&&Object.keys(a).forEach(function(u){i[u]=a[u]}),i}o(t,"wrapper")}o(Dj,"wrappy")});var Vj=Q((Qbe,Lj)=>{"use strict";var ab,cce=typeof setImmediate=="function";Lj.exports=Pj;function Pj(r){Wa.length||(kj(),M_=!0),Wa[Wa.length]=r}o(Pj,"rawAsap");var Wa=[],M_=!1,Ga=0,lce=1024;function Oj(){for(;Ga<Wa.length;){var r=Ga;if(Ga=Ga+1,Wa[r].call(),Ga>lce){for(var e=0,t=Wa.length-Ga;e<t;e++)Wa[e]=Wa[e+Ga];Wa.length-=Ga,Ga=0}}Wa.length=0,Ga=0,M_=!1}o(Oj,"flush");Pj.requestFlush=kj;function kj(){var r=process.domain;r&&(ab||(ab=require("domain")),ab.active=process.domain=null),M_&&cce?setImmediate(Oj):process.nextTick(Oj),r&&(ab.active=process.domain=r)}o(kj,"requestFlush")});var Mj=Q((eEe,Fj)=>{"use strict";var Uj=Vj(),q_=[];Fj.exports=fce;function fce(r){var e;q_.length?e=q_.pop():e=new jj,e.task=r,e.domain=process.domain,Uj(e)}o(fce,"asap");function jj(){this.task=null,this.domain=null}o(jj,"RawTask");jj.prototype.call=function(){this.domain&&this.domain.enter();var r=!0;try{this.task.call(),r=!1,this.domain&&this.domain.exit()}finally{r&&Uj.requestFlush(),this.task=null,this.domain=null,q_.push(this)}}});var Kj=Q((rEe,Hj)=>{"use strict";var hce=F_();Hj.exports=hce(pce);var qj=Mj();function pce(r){var e=!0;return qj(function(){e=!1}),o(function(){var n=arguments,s=this;e?qj(function(){r.apply(s,n)}):r.apply(s,n)},"zalgoSafe")}o(pce,"dezalgo")});var Gj=Q((sEe,H_)=>{"use strict";var $j=F_();H_.exports=$j(ob);H_.exports.strict=$j(Xj);ob.proto=ob(function(){Object.defineProperty(Function.prototype,"once",{value:o(function(){return ob(this)},"value"),configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:o(function(){return Xj(this)},"value"),configurable:!0})});function ob(r){var e=o(function(){return e.called?e.value:(e.called=!0,e.value=r.apply(this,arguments))},"f");return e.called=!1,e}o(ob,"once");function Xj(r){var e=o(function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=r.apply(this,arguments)},"f"),t=r.name||"Function wrapped with `once`";return e.onceError=t+" shouldn't be called more than once",e.called=!1,e}o(Xj,"onceStrict")});var rd={};yN(rd,{aborted:()=>X_,biggerThanMaxFileSize:()=>aB,biggerThanTotalMaxFileSize:()=>Z_,cannotCreateDir:()=>uB,default:()=>zr,filenameNotString:()=>z_,malformedMultipart:()=>rB,maxFieldsExceeded:()=>Y_,maxFieldsSizeExceeded:()=>J_,maxFilesExceeded:()=>iB,missingContentType:()=>tB,missingMultipartBoundary:()=>nB,missingPlugin:()=>K_,noEmptyFiles:()=>eB,noParser:()=>G_,pluginFailed:()=>oB,pluginFunction:()=>$_,smallerThanMinFileSize:()=>Q_,uninitializedParser:()=>W_,unknownTransferEncoding:()=>sB});var K_,$_,X_,G_,W_,z_,J_,Y_,Q_,Z_,eB,tB,rB,nB,sB,iB,aB,oB,uB,dce,zr,lf=as(()=>{"use strict";K_=1e3,$_=1001,X_=1002,G_=1003,W_=1004,z_=1005,J_=1006,Y_=1007,Q_=1008,Z_=1009,eB=1010,tB=1011,rB=1012,nB=1013,sB=1014,iB=1015,aB=1016,oB=1017,uB=1018,dce=class extends Error{static{o(this,"FormidableError")}constructor(r,e,t=500){super(r),this.code=e,this.httpCode=t}},zr=dce});var Wj,mce,Jg,cB=as(()=>{"use strict";Wj=require("stream"),mce=class extends Wj.Transform{static{o(this,"DummyParser")}constructor(e,t={}){super(),this.globalOptions={...t},this.incomingForm=e}_flush(e){this.incomingForm.ended=!0,this.incomingForm._maybeEnd(),e()}},Jg=mce});function wce(r){return r|32}var Jj,ci,lr,zj,lc,ub,cb,gce,Yg,vce,yce,xce,Yj,Qj,nd,lb=as(()=>{"use strict";Jj=require("stream");lf();lf();ci=0,lr={PARSER_UNINITIALIZED:ci++,START:ci++,START_BOUNDARY:ci++,HEADER_FIELD_START:ci++,HEADER_FIELD:ci++,HEADER_VALUE_START:ci++,HEADER_VALUE:ci++,HEADER_VALUE_ALMOST_DONE:ci++,HEADERS_ALMOST_DONE:ci++,PART_DATA_START:ci++,PART_DATA:ci++,PART_END:ci++,END:ci++},zj=1,lc={PART_BOUNDARY:zj,LAST_BOUNDARY:zj*=2},ub=10,cb=13,gce=32,Yg=45,vce=58,yce=97,xce=122;o(wce,"lower");Yj={};Object.keys(lr).forEach(r=>{Yj[r]=lr[r]});Qj=class Zj extends Jj.Transform{static{o(this,"MultipartParser")}constructor(e={}){super({readableObjectMode:!0}),this.boundary=null,this.boundaryChars=null,this.lookbehind=null,this.bufferLength=0,this.state=lr.PARSER_UNINITIALIZED,this.globalOptions={...e},this.index=null,this.flags=0}_endUnexpected(){return new zr(`MultipartParser.end(): stream ended unexpectedly: ${this.explain()}`,1012,400)}_flush(e){this.state===lr.HEADER_FIELD_START&&this.index===0||this.state===lr.PART_DATA&&this.index===this.boundary.length?(this._handleCallback("partEnd"),this._handleCallback("end"),e()):this.state!==lr.END?e(this._endUnexpected()):e()}initWithBoundary(e){this.boundary=Buffer.from(`\r
|
|
54
|
+
--${e}`),this.lookbehind=Buffer.alloc(this.boundary.length+8),this.state=lr.START,this.boundaryChars={};for(let t=0;t<this.boundary.length;t++)this.boundaryChars[this.boundary[t]]=!0}_handleCallback(e,t,n,s){n!==void 0&&n===s||this.push({name:e,buffer:t,start:n,end:s})}_transform(e,t,n){let s=0,i=this.index,{index:a,state:u,flags:c}=this,{lookbehind:f,boundary:h,boundaryChars:m}=this,g=h.length,x=g-1;this.bufferLength=e.length;let v=null,w=null,S=o((b,E)=>{this[`${b}Mark`]=typeof E=="number"?E:s},"setMark"),A=o(b=>{delete this[`${b}Mark`]},"clearMarkSymbol"),N=o((b,E)=>{let C=`${b}Mark`;C in this&&(E?(this._handleCallback(b,e,this[C],s),A(b)):(this._handleCallback(b,e,this[C],e.length),S(b,0)))},"dataCallback");for(s=0;s<this.bufferLength;s++)switch(v=e[s],u){case lr.PARSER_UNINITIALIZED:n(this._endUnexpected());return;case lr.START:a=0,u=lr.START_BOUNDARY;case lr.START_BOUNDARY:if(a===h.length-2){if(v===Yg)c|=lc.LAST_BOUNDARY;else if(v!==cb){n(this._endUnexpected());return}a++;break}else if(a-1===h.length-2){if(c&lc.LAST_BOUNDARY&&v===Yg)this._handleCallback("end"),u=lr.END,c=0;else if(!(c&lc.LAST_BOUNDARY)&&v===ub)a=0,this._handleCallback("partBegin"),u=lr.HEADER_FIELD_START;else{n(this._endUnexpected());return}break}v!==h[a+2]&&(a=-2),v===h[a+2]&&a++;break;case lr.HEADER_FIELD_START:u=lr.HEADER_FIELD,S("headerField"),a=0;case lr.HEADER_FIELD:if(v===cb){A("headerField"),u=lr.HEADERS_ALMOST_DONE;break}if(a++,v===Yg)break;if(v===vce){if(a===1){n(this._endUnexpected());return}N("headerField",!0),u=lr.HEADER_VALUE_START;break}if(w=wce(v),w<yce||w>xce){n(this._endUnexpected());return}break;case lr.HEADER_VALUE_START:if(v===gce)break;S("headerValue"),u=lr.HEADER_VALUE;case lr.HEADER_VALUE:v===cb&&(N("headerValue",!0),this._handleCallback("headerEnd"),u=lr.HEADER_VALUE_ALMOST_DONE);break;case lr.HEADER_VALUE_ALMOST_DONE:if(v!==ub){n(this._endUnexpected());return}u=lr.HEADER_FIELD_START;break;case lr.HEADERS_ALMOST_DONE:if(v!==ub){n(this._endUnexpected());return}this._handleCallback("headersEnd"),u=lr.PART_DATA_START;break;case lr.PART_DATA_START:u=lr.PART_DATA,S("partData");case lr.PART_DATA:if(i=a,a===0){for(s+=x;s<this.bufferLength&&!(e[s]in m);)s+=g;s-=x,v=e[s]}if(a<h.length)h[a]===v?(a===0&&N("partData",!0),a++):a=0;else if(a===h.length)a++,v===cb?c|=lc.PART_BOUNDARY:v===Yg?c|=lc.LAST_BOUNDARY:a=0;else if(a-1===h.length)if(c&lc.PART_BOUNDARY){if(a=0,v===ub){c&=~lc.PART_BOUNDARY,this._handleCallback("partEnd"),this._handleCallback("partBegin"),u=lr.HEADER_FIELD_START;break}}else c&lc.LAST_BOUNDARY&&v===Yg?(this._handleCallback("partEnd"),this._handleCallback("end"),u=lr.END,c=0):a=0;a>0?f[a-1]=v:i>0&&(this._handleCallback("partData",f,0,i),i=0,S("partData"),s--);break;case lr.END:break;default:n(this._endUnexpected());return}return N("headerField"),N("headerValue"),N("partData"),this.index=a,this.state=u,this.flags=c,n(),this.bufferLength}explain(){return`state = ${Zj.stateToString(this.state)}`}};Qj.stateToString=r=>{for(let e in lr)if(lr[e]===r)return e};nd=Object.assign(Qj,{STATES:Yj})});var eF,Sce,fb,lB=as(()=>{"use strict";eF=require("stream"),Sce=class extends eF.PassThrough{static{o(this,"OctetStreamParser")}constructor(e={}){super(),this.globalOptions={...e}}},fb=Sce});async function Qg(r,e){let t=this||r;return/octet-stream/i.test(t.headers["content-type"])&&await Ece.call(t,t,e),t}async function Ece(r,e){this.type=bce;let t=this.headers["x-file-name"],n=this.headers["content-type"],s={originalFilename:t,mimetype:n},i=this._getNewName(s),a=this._joinDirectoryName(i),u=await this._newFile({newFilename:i,filepath:a,originalFilename:t,mimetype:n});this.emit("fileBegin",t,u),u.open(),this.openedFiles.push(u),this._flushing+=1,this._parser=new fb(this.options);let c=0;return this._parser.on("data",f=>{this.pause(),c+=1,u.write(f,()=>{c-=1,this.resume(),this.ended&&this._parser.emit("doneWritingFile")})}),this._parser.on("end",()=>{this._flushing-=1,this.ended=!0;let f=o(()=>{u.end(()=>{this.emit("file","file",u),this._maybeEnd()})},"done");c===0?f():this._parser.once("doneWritingFile",f)}),this}var bce,tF=as(()=>{"use strict";lB();bce="octet-stream";o(Qg,"plugin");o(Ece,"init")});var rF,Ace,hb,fB=as(()=>{"use strict";rF=require("stream"),Ace=class extends rF.Transform{static{o(this,"QuerystringParser")}constructor(e={}){super({readableObjectMode:!0}),this.globalOptions={...e},this.buffer="",this.bufferLength=0}_transform(e,t,n){this.buffer+=e.toString("ascii"),this.bufferLength=this.buffer.length,n()}_flush(e){let t=new URLSearchParams(this.buffer);for(let[n,s]of t)this.push({key:n,value:s});this.buffer="",e()}},hb=Ace});function Zg(r,e){let t=this||r;return/urlencoded/i.test(t.headers["content-type"])&&Nce.call(t,t,e),t}function Nce(r,e){this.type=Cce;let t=new hb(this.options);return t.on("data",({key:n,value:s})=>{this.emit("field",n,s)}),t.once("end",()=>{this.ended=!0,this._maybeEnd()}),this._parser=t,this}var Cce,nF=as(()=>{"use strict";fB();Cce="urlencoded";o(Zg,"plugin");o(Nce,"init")});function ev(r,e){let t=this||r;if(/multipart/i.test(t.headers["content-type"])){let s=t.headers["content-type"].match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(s)Ice(s[1]||s[2]).call(t,t,e);else{let i=new zr("bad content-type header, no multipart boundary",1013,400);t._error(i)}}return t}function Ice(r){return o(function(){this.type=Tce;let t=new nd(this.options),n,s,i;t.initWithBoundary(r),t.on("data",async({name:a,buffer:u,start:c,end:f})=>{if(a==="partBegin")i=new sF.Stream,i.readable=!0,i.headers={},i.name=null,i.originalFilename=null,i.mimetype=null,i.transferEncoding=this.options.encoding,i.transferBuffer="",n="",s="";else if(a==="headerField")n+=u.toString(this.options.encoding,c,f);else if(a==="headerValue")s+=u.toString(this.options.encoding,c,f);else if(a==="headerEnd"){n=n.toLowerCase(),i.headers[n]=s;let h=s.match(/\bname=("([^"]*)"|([^\(\)<>@,;:\\"\/\[\]\?=\{\}\s\t/]+))/i);n==="content-disposition"?(h&&(i.name=h[2]||h[3]||""),i.originalFilename=this._getFileName(s)):n==="content-type"?i.mimetype=s:n==="content-transfer-encoding"&&(i.transferEncoding=s.toLowerCase()),n="",s=""}else if(a==="headersEnd"){switch(i.transferEncoding){case"binary":case"7bit":case"8bit":case"utf-8":{let h=o(g=>{g.name==="partData"&&i.emit("data",g.buffer.slice(g.start,g.end))},"dataPropagation"),m=o(g=>{g.name==="partEnd"&&(i.emit("end"),t.off("data",h),t.off("data",m))},"dataStopPropagation");t.on("data",h),t.on("data",m);break}case"base64":{let h=o(g=>{if(g.name==="partData"){i.transferBuffer+=g.buffer.slice(g.start,g.end).toString("ascii");let x=parseInt(i.transferBuffer.length/4,10)*4;i.emit("data",Buffer.from(i.transferBuffer.substring(0,x),"base64")),i.transferBuffer=i.transferBuffer.substring(x)}},"dataPropagation"),m=o(g=>{g.name==="partEnd"&&(i.emit("data",Buffer.from(i.transferBuffer,"base64")),i.emit("end"),t.off("data",h),t.off("data",m))},"dataStopPropagation");t.on("data",h),t.on("data",m);break}default:return this._error(new zr("unknown transfer-encoding",1014,501))}this._parser.pause(),await this.onPart(i),this._parser.resume()}else a==="end"&&(this.ended=!0,this._maybeEnd())}),this._parser=t},"initMultipart")}var sF,Tce,iF=as(()=>{"use strict";sF=require("stream");lb();lf();lf();Tce="multipart";o(ev,"plugin");o(Ice,"createInitMultipart")});var aF,_ce,pb,hB=as(()=>{"use strict";aF=require("stream"),_ce=class extends aF.Transform{static{o(this,"JSONParser")}constructor(e={}){super({readableObjectMode:!0}),this.chunks=[],this.globalOptions={...e}}_transform(e,t,n){this.chunks.push(String(e)),n()}_flush(e){try{let t=JSON.parse(this.chunks.join(""));this.push(t)}catch(t){e(t);return}this.chunks=null,e()}},pb=_ce});function tv(r,e){let t=this||r;return/json/i.test(t.headers["content-type"])&&Dce.call(t,t,e),t}function Dce(r,e){this.type=Bce;let t=new pb(this.options);t.on("data",n=>{this.fields=n}),t.once("end",()=>{this.ended=!0,this._maybeEnd()}),this._parser=t}var Bce,oF=as(()=>{"use strict";hB();Bce="json";o(tv,"plugin");o(Dce,"init")});var pB=as(()=>{"use strict";tF();nF();iF();oF()});function uF(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var cF,lF,fF,hF,rv,fc,pF,dF,Rce,Oce,db,Pce,kce,Lce,Vce,dB,mF=as(()=>{"use strict";cF=Wr(Bj(),1),lF=Wr(Kj(),1),fF=require("events"),hF=Wr(require("fs/promises"),1),rv=Wr(require("os"),1),fc=Wr(require("path"),1),pF=require("string_decoder"),dF=Wr(Gj(),1);lf();D_();R_();cB();lb();pB();Rce=`${process.env.NODE_ENV}-${rv.default.platform()}-${rv.default.hostname()}`,Oce=(0,cF.init)({length:25,fingerprint:Rce.toLowerCase()}),db={maxFields:1e3,maxFieldsSize:20*1024*1024,maxFiles:1/0,maxFileSize:200*1024*1024,maxTotalFileSize:void 0,minFileSize:1,allowEmptyFiles:!1,createDirsFromUploads:!1,keepExtensions:!1,encoding:"utf-8",hashAlgorithm:!1,uploadDir:rv.default.tmpdir(),enabledPlugins:[Qg,Zg,ev,tv],fileWriteStreamHandler:null,defaultInvalidName:"invalid-name",filter(r){return!0},filename:void 0};o(uF,"hasOwnProp");Pce=o(function(r){let e=Promise.resolve();return async function(...t){let n=e,s,i;return e=new Promise(function(a){i=a}),await n,s=r(...t),s.then(i).catch(i),s}},"decorateForceSequential"),kce=Pce(function(r){let e=fc.default.dirname(r);return hF.default.mkdir(e,{recursive:!0})}),Lce=o(r=>{let e=r.charCodeAt(0);return!(e===46||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122)},"invalidExtensionChar"),Vce=class extends fF.EventEmitter{static{o(this,"IncomingForm")}constructor(e={}){super(),this.options={...db,...e},this.options.maxTotalFileSize||(this.options.maxTotalFileSize=this.options.maxFileSize);let t=fc.default.resolve(this.options.uploadDir||this.options.uploaddir||rv.default.tmpdir());if(this.uploaddir=t,this.uploadDir=t,["error","headers","type","bytesExpected","bytesReceived","_parser","req"].forEach(n=>{this[n]=null}),this._setUpRename(),this._flushing=0,this._fieldsSize=0,this._totalFileSize=0,this._plugins=[],this.openedFiles=[],this.options.enabledPlugins=[].concat(this.options.enabledPlugins).filter(Boolean),this.options.enabledPlugins.length===0)throw new zr("expect at least 1 enabled builtin plugin, see options.enabledPlugins",1e3);this.options.enabledPlugins.forEach(n=>{this.use(n)}),this._setUpMaxFields(),this._setUpMaxFiles(),this.ended=void 0,this.type=void 0}use(e){if(typeof e!="function")throw new zr(".use: expect `plugin` to be a function",1001);return this._plugins.push(e.bind(this)),this}pause(){try{this.req.pause()}catch(e){return this.ended||this._error(e),!1}return!0}resume(){try{this.req.resume()}catch(e){return this.ended||this._error(e),!1}return!0}async parse(e,t){this.req=e;let n;if(!t){let a,u;n=new Promise((c,f)=>{a=c,u=f}),t=o((c,f,h)=>{c?u(c):a([f,h])},"cb")}let s=(0,dF.default)((0,lF.default)(t));this.fields={};let i={};return this.on("field",(a,u)=>{this.type==="multipart"||this.type==="urlencoded"?uF(this.fields,a)?this.fields[a].push(u):this.fields[a]=[u]:this.fields[a]=u}),this.on("file",(a,u)=>{uF(i,a)?i[a].push(u):i[a]=[u]}),this.on("error",a=>{s(a,this.fields,i)}),this.on("end",()=>{s(null,this.fields,i)}),await this.writeHeaders(e.headers),e.on("error",a=>{this._error(a)}).on("aborted",()=>{this.emit("aborted"),this._error(new zr("Request aborted",1002))}).on("data",a=>{try{this.write(a)}catch(u){this._error(u)}}).on("end",()=>{this.error||this._parser&&this._parser.end()}),n||this}async writeHeaders(e){if(this.headers=e,this._parseContentLength(),await this._parseContentType(),!this._parser){this._error(new zr("no parser found",1003,415));return}this._parser.once("error",t=>{this._error(t)})}write(e){return this.error?null:this._parser?(this.bytesReceived+=e.length,this.emit("progress",this.bytesReceived,this.bytesExpected),this._parser.write(e),this.bytesReceived):(this._error(new zr("uninitialized parser",1004)),null)}onPart(e){return this._handlePart(e)}async _handlePart(e){if(e.originalFilename&&typeof e.originalFilename!="string"){this._error(new zr("the part.originalFilename should be string when it exists",1005));return}if(!e.mimetype){let a="",u=new pF.StringDecoder(e.transferEncoding||this.options.encoding);e.on("data",c=>{if(this._fieldsSize+=c.length,this._fieldsSize>this.options.maxFieldsSize){this._error(new zr(`options.maxFieldsSize (${this.options.maxFieldsSize} bytes) exceeded, received ${this._fieldsSize} bytes of field data`,1006,413));return}a+=u.write(c)}),e.on("end",()=>{this.emit("field",e.name,a)});return}if(!this.options.filter(e))return;this._flushing+=1;let t=0,n=this._getNewName(e),s=this._joinDirectoryName(n),i=await this._newFile({newFilename:n,filepath:s,originalFilename:e.originalFilename,mimetype:e.mimetype});i.on("error",a=>{this._error(a)}),this.emit("fileBegin",e.name,i),i.open(),this.openedFiles.push(i),e.on("data",a=>{if(this._totalFileSize+=a.length,t+=a.length,this._totalFileSize>this.options.maxTotalFileSize){this._error(new zr(`options.maxTotalFileSize (${this.options.maxTotalFileSize} bytes) exceeded, received ${this._totalFileSize} bytes of file data`,1009,413));return}a.length!==0&&(this.pause(),i.write(a,()=>{this.resume()}))}),e.on("end",()=>{if(!this.options.allowEmptyFiles&&t===0){this._error(new zr("options.allowEmptyFiles is false, file size should be greater than 0",1010,400));return}if(t<this.options.minFileSize){this._error(new zr(`options.minFileSize (${this.options.minFileSize} bytes) inferior, received ${t} bytes of file data`,1008,400));return}if(t>this.options.maxFileSize){this._error(new zr(`options.maxFileSize (${this.options.maxFileSize} bytes), received ${t} bytes of file data`,1016,413));return}i.end(()=>{this._flushing-=1,this.emit("file",e.name,i),this._maybeEnd()})})}async _parseContentType(){if(this.bytesExpected===0){this._parser=new Jg(this,this.options);return}if(!this.headers["content-type"]){this._error(new zr("bad content-type header, no content-type",1011,400));return}new Jg(this,this.options);let e=[];await Promise.all(this._plugins.map(async(t,n)=>{let s=null;try{s=await t(this,this.options)||this}catch(i){let a=new zr(`plugin on index ${n} failed with: ${i.message}`,1017,500);throw a.idx=n,a}Object.assign(this,s),this.emit("plugin",n,s)})),this.emit("pluginsResults",e)}_error(e,t="error"){this.error||this.ended||(this.req=null,this.error=e,this.emit(t,e),this.openedFiles.forEach(n=>{n.destroy()}))}_parseContentLength(){this.bytesReceived=0,this.headers["content-length"]?this.bytesExpected=parseInt(this.headers["content-length"],10):this.headers["transfer-encoding"]===void 0&&(this.bytesExpected=0),this.bytesExpected!==null&&this.emit("progress",this.bytesReceived,this.bytesExpected)}_newParser(){return new nd(this.options)}async _newFile({filepath:e,originalFilename:t,mimetype:n,newFilename:s}){if(this.options.fileWriteStreamHandler)return new rb({newFilename:s,filepath:e,originalFilename:t,mimetype:n,createFileWriteStream:this.options.fileWriteStreamHandler,hashAlgorithm:this.options.hashAlgorithm});if(this.options.createDirsFromUploads)try{await kce(e)}catch{this._error(new zr("cannot create directory",1018,409))}return new tb({newFilename:s,filepath:e,originalFilename:t,mimetype:n,hashAlgorithm:this.options.hashAlgorithm})}_getFileName(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>{}[\]@,;:"?=\s/\t]+))($|;\s)/i);if(!t)return null;let n=t[2]||t[3]||"",s=n.substr(n.lastIndexOf("\\")+1);return s=s.replace(/%22/g,'"'),s=s.replace(/&#([\d]{4});/g,(i,a)=>String.fromCharCode(a)),s}_getExtension(e){if(!e)return"";let t=fc.default.basename(e),n=t.indexOf("."),s=t.lastIndexOf("."),i=fc.default.extname(t);n!==s&&(i=t.slice(n));let a,u=Array.from(i).findIndex(Lce);return u===-1?a=i:a=i.substring(0,u),a==="."?"":a}_joinDirectoryName(e){let t=fc.default.join(this.uploadDir,e);return t.startsWith(this.uploadDir)?t:fc.default.join(this.uploadDir,this.options.defaultInvalidName)}_setUpRename(){typeof this.options.filename=="function"?this._getNewName=t=>{let n="",s=this.options.defaultInvalidName;return t.originalFilename&&({ext:n,name:s}=fc.default.parse(t.originalFilename),this.options.keepExtensions!==!0&&(n="")),this.options.filename.call(this,s,n,t,this)}:this._getNewName=t=>{let n=Oce();if(t&&this.options.keepExtensions){let s=typeof t=="string"?t:t.originalFilename;return`${n}${this._getExtension(s)}`}return n}}_setUpMaxFields(){if(this.options.maxFields!==1/0){let e=0;this.on("field",()=>{e+=1,e>this.options.maxFields&&this._error(new zr(`options.maxFields (${this.options.maxFields}) exceeded`,1007,413))})}}_setUpMaxFiles(){if(this.options.maxFiles!==1/0){let e=0;this.on("fileBegin",()=>{e+=1,e>this.options.maxFiles&&this._error(new zr(`options.maxFiles (${this.options.maxFiles}) exceeded`,1015,413))})}}_maybeEnd(){!this.ended||this._flushing||this.error||(this.req=null,this.emit("end"))}},dB=Vce});var gF=as(()=>{"use strict";hB();cB();lb();lB();fB()});var yF={};yN(yF,{DummyParser:()=>Jg,File:()=>tb,Formidable:()=>dB,IncomingForm:()=>dB,JSONParser:()=>pb,MultipartParser:()=>nd,OctetStreamParser:()=>fb,OctetstreamParser:()=>fb,PersistentFile:()=>tb,QueryStringParser:()=>hb,QuerystringParser:()=>hb,VolatileFile:()=>rb,default:()=>jce,defaultOptions:()=>db,enabledPlugins:()=>Uce,errors:()=>rd,formidable:()=>vF,json:()=>tv,multipart:()=>ev,octetstream:()=>Qg,querystring:()=>Zg});var vF,Uce,jce,xF=as(()=>{"use strict";D_();R_();mF();gF();pB();lf();vF=o((...r)=>new dB(...r),"formidable"),{enabledPlugins:Uce}=db,jce=vF});var hc=Q(xn=>{"use strict";var Fce=xn&&xn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Mce=xn&&xn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),qce=xn&&xn.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Fce(t,e,n[s]);return Mce(t,e),t}})();Object.defineProperty(xn,"__esModule",{value:!0});xn.wsdlCacheSingleton=xn.TNS_PREFIX=void 0;xn.passwordDigest=Kce;xn.findPrefix=$ce;xn.splitQName=Xce;xn.xmlEscape=Gce;xn.parseMTOMResp=Wce;var Hce=qce(require("crypto"));function Kce(r,e,t){let n=Hce.createHash("sha1"),s=Buffer.from(r||"","base64"),i=Buffer.from(e||"","utf8"),a=Buffer.from(t||"","utf8"),u=Buffer.concat([s,i,a]);return n.update(u),n.digest("base64")}o(Kce,"passwordDigest");xn.TNS_PREFIX="__tns__";function $ce(r,e){for(let t in r)if(t!==xn.TNS_PREFIX&&r[t]===e)return t}o($ce,"findPrefix");function Xce(r){if(typeof r!="string")return{prefix:xn.TNS_PREFIX,name:r};let[e]=r.split("|",1),t=e.indexOf(":");return{prefix:e.substring(0,t)||xn.TNS_PREFIX,name:e.substring(t+1)}}o(Xce,"splitQName");function Gce(r){return typeof r=="string"?r.substr(0,9)==="<![CDATA["&&r.substr(-3)==="]]>"?r:r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):r}o(Gce,"xmlEscape");function Wce(r,e,t){return Promise.resolve().then(()=>(xF(),yF)).then(({MultipartParser:n})=>{let s={parts:[]},i="",a="",u,c=0,f=new n;return f.initWithBoundary(e),f.on("data",({name:h,buffer:m,start:g,end:x})=>{switch(h){case"partBegin":s.parts[c]={body:null,headers:{}},u=Buffer.from("");break;case"headerField":i=m.slice(g,x).toString();break;case"headerValue":a=m.slice(g,x).toString();break;case"headerEnd":s.parts[c].headers[i.toLowerCase()]=a;break;case"partData":u=Buffer.concat([u,m.slice(g,x)]);break;case"partEnd":s.parts[c].body=u,c++;break}}),f.write(r),t(null,s)}).catch(t)}o(Wce,"parseMTOMResp");var zce=class{static{o(this,"DefaultWSDLCache")}constructor(){this.cache={}}has(e){return!!this.cache[e]}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}clear(){this.cache={}}};xn.wsdlCacheSingleton=new zce});var wF=Q((lAe,Jce)=>{Jce.exports={name:"soap",version:"1.6.0",description:"A minimal node SOAP client",engines:{node:">=14.17.0"},author:"Vinay Pulim <v@pulim.com>",dependencies:{axios:"^1.12.2","axios-ntlm":"^1.4.6",debug:"^4.4.3",formidable:"^3.5.4","get-stream":"^6.0.1",lodash:"^4.17.21",sax:"^1.4.1","strip-bom":"^3.0.0","whatwg-mimetype":"4.0.0","xml-crypto":"^6.1.2"},repository:{type:"git",url:"https://github.com/vpulim/node-soap.git"},main:"./lib/soap.js",types:"./lib/soap.d.ts",directories:{lib:"./lib",test:"./test"},scripts:{build:"tsc -p .",watch:"tsc -w -p .",lint:"eslint .",format:"prettier --write .","format:check":"prettier --check .",toc:"./node_modules/.bin/doctoc Readme.md --github --maxlevel 3",cover:"OPENSSL_ENABLE_SHA1_SIGNATURES=1 nyc --extension=.ts --reporter=lcov --reporter=html --reporter=text mocha --no-parallel --timeout 30000 --exit test/*-test.js test/security/*.js",coveralls:"cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js -v",docs:"typedoc --out docs",test:"mocha --timeout 15000 --bail --exit test/*-test.js test/security/*.js"},keywords:["soap"],license:"MIT",devDependencies:{"@eslint/js":"^9.38.0","@types/debug":"^4.1.12","@types/formidable":"^3.4.6","@types/lodash":"^4.17.20","@types/node":"^14.0.0","@types/sax":"^1.2.7","@types/whatwg-mimetype":"^3.0.2","body-parser":"^2.2.0",colors:"^1.4.0",diff:"^8.0.2",doctoc:"^2.2.1",duplexer:"~0.1.2",eslint:"^9.38.0",express:"^5.1.0",finalhandler:"^2.1.0",glob:"^11.0.3",mocha:"^11.7.4",nyc:"^17.1.0",prettier:"^3.6.2","readable-stream":"^4.7.0",semver:"^7.7.3","serve-static":"^2.2.0",should:"^13.2.3",sinon:"^21.0.0","source-map-support":"^0.5.21",timekeeper:"^2.3.1",typedoc:"^0.28.14",typescript:"^5.9.3","typescript-eslint":"^8.46.1"}}});var mb=Q(Li=>{"use strict";var Yce=Li&&Li.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Qce=Li&&Li.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),EF=Li&&Li.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Yce(t,e,n[s]);return Qce(t,e),t}})(),AF=Li&&Li.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Li,"__esModule",{value:!0});Li.HttpClient=void 0;var Zce=EF(x_()),ele=x6(),SF=require("crypto"),tle=AF(Fp()),rle=EF(require("url")),nle=AF(B6()),sle=require("zlib"),ile=hc(),bF=(0,tle.default)("node-soap"),ale=wF(),ole=class{static{o(this,"HttpClient")}constructor(e){e=e||{},this.options=e,this._request=e.request||Zce.create()}buildRequest(e,t,n,s={}){let i=rle.parse(e),a=t?"POST":"GET",u=i.hostname,c=parseInt(i.port,10),f={"User-Agent":"node-soap/"+ale.version,Accept:"text/html,application/xhtml+xml,application/xml,text/xml;q=0.9,*/*;q=0.8","Accept-Encoding":"none","Accept-Charset":"utf-8",...s.forever&&{Connection:"keep-alive"},Host:u+(isNaN(c)?"":":"+c)},h=["headers"],{attachments:m,...g}=s,x=m||[];typeof t=="string"&&x.length===0&&!s.forceMTOM&&(f["Content-Length"]=Buffer.byteLength(t,"utf8"),f["Content-Type"]="application/x-www-form-urlencoded"),n=n||{};for(let w in n)f[w]=n[w];let v={url:i.href,method:a,headers:f,transformResponse:o(w=>w,"transformResponse")};if(s.ntlm||(v.validateStatus=null),s.forceMTOM||x.length>0){let w=(0,SF.randomUUID)(),S=null;if(f["Content-Type"].indexOf("action")>-1)for(let E of f["Content-Type"].split("; "))E.indexOf("action")>-1&&(S=E);let A=(0,SF.randomUUID)();f["Content-Type"]='multipart/related; type="application/xop+xml"; start="<'+w+'>"; start-info="text/xml"; boundary='+A,S&&(f["Content-Type"]=f["Content-Type"]+"; "+S);let N=[{"Content-Type":'application/xop+xml; charset=UTF-8; type="text/xml"',"Content-ID":"<"+w+">",body:t}];x.forEach(E=>{N.push({"Content-Type":E.mimetype,"Content-Transfer-Encoding":"binary","Content-ID":"<"+E.contentId+">","Content-Disposition":'attachment; filename="'+E.name+'"',body:E.body})}),v.data=[Buffer.from(`--${A}\r
|
|
55
|
+
`)];let b=0;N.forEach(E=>{Object.keys(E).forEach(C=>{C!=="body"&&v.data.push(Buffer.from(`${C}: ${E[C]}\r
|
|
56
|
+
`))}),v.data.push(Buffer.from(`\r
|
|
57
|
+
`),Buffer.from(E.body),Buffer.from(`\r
|
|
58
|
+
--${A}${b===N.length-1?"--":""}\r
|
|
59
|
+
`)),b++}),v.data=Buffer.concat(v.data)}else v.data=t;s.forceGzip&&(v.decompress=!0,v.data=(0,sle.gzipSync)(v.data),v.headers["Accept-Encoding"]="gzip,deflate",v.headers["Content-Encoding"]="gzip");for(let w in g)if(h.indexOf(w)!==-1)for(let S in s[w])v[w][S]=s[w][S];else v[w]=s[w];return bF("Http request: %j",v),v}handleResponse(e,t,n){if(bF("Http response body: %j",n),typeof n=="string"){let s=/(?:<\?[^?]*\?>[\s]*)?<([^:]*):Envelope([\S\s]*)<\/\1:Envelope>/i,i=n.replace(/<!--[\s\S]*?-->/,"").match(s);i&&(n=i[0])}return n}request(e,t,n,s,i){let a=this.buildRequest(e,t,s,i),u;i!==void 0&&i.ntlm?u=(0,ele.NtlmClient)({username:i.username,password:i.password,workstation:i.workstation||"",domain:i.domain||""})(a):(this.options.parseReponseAttachments&&(a.responseType="arraybuffer",a.responseEncoding="binary"),u=this._request(a));let c=this;return u.then(f=>{let h=o(m=>(f.data=this.handleResponse(u,f,m||f.data),n(null,f,f.data),f),"handleBody");if(c.options.parseReponseAttachments)if(f.headers["content-type"]&&f.headers["content-type"].toLowerCase().indexOf("multipart/related")>-1){let g,x=nle.default.parse(f.headers["content-type"]);return x&&(g=x.parameters.get("boundary")),g?(0,ile.parseMTOMResp)(f.data,g,(v,w)=>{if(v)return n(v);let S=w.parts.shift();return!S||!S.body?n(new Error("Cannot parse multipart response")):(f.mtomResponseAttachments=w,h(S.body.toString(c.options.encoding||"utf8")))}):n(new Error("Missing boundary from content-type"))}else return h(f.data.toString(c.options.encoding||"utf8"));else return h()},f=>n(f)),u}requestStream(e,t,n,s){let i=this.buildRequest(e,t,n,s);i.responseType="stream";let a=this._request(i).then(u=>(u.data=this.handleResponse(a,u,u.data),u));return a}};Li.HttpClient=ole});var mB=Q(Vi=>{"use strict";var ule=Vi&&Vi.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),cle=Vi&&Vi.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),IF=Vi&&Vi.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&ule(t,e,n[s]);return cle(t,e),t}})(),_F=Vi&&Vi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.Client=void 0;var CF=IF(require("assert")),lle=require("crypto"),fle=_F(Fp()),hle=require("events"),ple=_F(V8()),NF=IF(Uo()),dle=mb(),mle=hc(),gle=(0,fle.default)("node-soap"),TF=/[^a-z$_0-9]/i,vle=class extends hle.EventEmitter{static{o(this,"Client")}constructor(e,t,n){super(),n=n||{},this.wsdl=e,this._initializeOptions(n),this._initializeServices(t),this.httpClient=n.httpClient||new dle.HttpClient(n)}addSoapHeader(e,t,n,s){return this.soapHeaders||(this.soapHeaders=[]),e=this._processSoapHeader(e,t,n,s),this.soapHeaders.push(e)-1}changeSoapHeader(e,t,n,s,i){this.soapHeaders||(this.soapHeaders=[]),t=this._processSoapHeader(t,n,s,i),this.soapHeaders[e]=t}getSoapHeaders(){return this.soapHeaders}clearSoapHeaders(){this.soapHeaders=null}addHttpHeader(e,t){this.httpHeaders||(this.httpHeaders={}),this.httpHeaders[e]=t}getHttpHeaders(){return this.httpHeaders}clearHttpHeaders(){this.httpHeaders=null}addBodyAttribute(e){if(this.bodyAttributes||(this.bodyAttributes=[]),typeof e=="object"){let t="";Object.getOwnPropertyNames(e).forEach(n=>{t+=" "+n+'="'+e[n]+'"'}),e=t}e.substr(0,1)!==" "&&(e=" "+e),this.bodyAttributes.push(e)}getBodyAttributes(){return this.bodyAttributes}clearBodyAttributes(){this.bodyAttributes=null}setEndpoint(e){this.endpoint=e,this._initializeServices(e)}describe(){return this.wsdl.describeServices()}setSecurity(e){this.security=e}setSOAPAction(e){this.SOAPAction=e}_initializeServices(e){let n=this.wsdl.definitions.services;for(let s in n)this[s]=this._defineService(n[s],e)}_initializeOptions(e){this.streamAllowed=e.stream,this.returnSaxStream=e.returnSaxStream,this.normalizeNames=e.normalizeNames,this.overridePromiseSuffix=e.overridePromiseSuffix||"Async",this.wsdl.options.attributesKey=e.attributesKey||"attributes",this.wsdl.options.envelopeKey=e.envelopeKey||"soap",this.wsdl.options.envelopeSoapUrl=e.envelopeSoapUrl||"http://schemas.xmlsoap.org/soap/envelope/",this.wsdl.options.preserveWhitespace=!!e.preserveWhitespace,this.wsdl.options.forceUseSchemaXmlns=!!e.forceUseSchemaXmlns;let t=e.ignoredNamespaces;t!==void 0&&typeof t=="object"&&"override"in t&&t.override===!0&&t.namespaces!==void 0&&(this.wsdl.options.ignoredNamespaces=t.namespaces),e.overrideElementKey!==void 0&&(this.wsdl.options.overrideElementKey=e.overrideElementKey),e.overrideRootElement!==void 0&&(this.wsdl.options.overrideRootElement=e.overrideRootElement),this.wsdl.options.forceSoap12Headers=!!e.forceSoap12Headers}_defineService(e,t){let n=e.ports,s={};for(let i in n)s[i]=this._definePort(n[i],t||n[i].location);return s}_definePort(e,t){let n=t,i=e.binding.methods,a={};for(let u in i){a[u]=this._defineMethod(i[u],n);let c=this.normalizeNames?u.replace(TF,"_"):u;if(this[c]=a[u],!TF.test(c)){let f=this.overridePromiseSuffix;this[c+f]=this._promisifyMethod(a[u])}}return a}_promisifyMethod(e){return(t,n,s)=>new Promise((i,a)=>{e(t,o((c,f,h,m,g,x)=>{c?a(c):i([f,h,m,g,x])},"callback"),n,s)})}_defineMethod(e,t){let n;return(s,i,a,u)=>{typeof s=="function"?(i=s,s={}):typeof a=="function"?(n=i,i=a,a=n):typeof u=="function"&&(n=i,i=u,u=a,a=n),this._invoke(e,s,t,(c,f,h,m,g,x)=>{i(c,f,h,m,g,x)},a,u)}}_processSoapHeader(e,t,n,s){switch(typeof e){case"object":return this.wsdl.objectToXML(e,t,n,s,!0);case"function":{let i=this;return(...a)=>{let u=e.apply(null,[...a]);return typeof u=="object"?i.wsdl.objectToXML(u,t,n,s,!0):u}}default:return e}}_invoke(e,t,n,s,i,a){let u=e.$name,c=e.input,f=e.output,h=e.style,m=this.wsdl.definitions,g=this.wsdl.options.envelopeKey,x=this.wsdl.options.envelopeSoapUrl,v=m.$targetNamespace,w="",S="",A=null,N,b=(0,mle.findPrefix)(m.xmlns,v),E={"Content-Type":"text/xml; charset=utf-8"},C="xmlns:"+g+'="'+x+'"',_=o((G,pe,le)=>{let ue;if(!f)return s(null,null,pe,G.Header,A,le.mtomResponseAttachments);if(!G.html&&!G.Body){if(le.status>=400){let ee=new Error("Error http status codes");return ee.response=le,ee.body=pe,this.emit("soapError",ee,q),s(ee,G,pe,G.Header)}return s(null,G,pe,G.Header)}if(typeof G.Body!="object"){let ee=new Error("Cannot parse response");return ee.response=le,ee.body=pe,s(ee,G,pe,void 0,A)}ue=G.Body[f.$name],ue||(ue=G.Body[f.$name.replace(/(?:Out(?:put)?|Response)$/,"")]),ue||["Response","Out","Output"].forEach(ee=>{if(Object.hasOwnProperty.call(G.Body,u+ee))return ue=G.Body[u+ee]}),s(null,ue,pe,G.Header,A,le.mtomResponseAttachments)},"finish"),M=o((G,pe)=>{let le;try{le=this.wsdl.xmlToObject(G)}catch(ue){if(!f||!f.$lookupTypes){gle("Response element is not present. Unable to convert response xml to json.");let ee=NF.isObject(G)?G:H(G);if(ee)return s(null,pe,ee,void 0,A)}return ue.response=pe,ue.body=G,this.emit("soapError",ue,q),s(ue,pe,G,void 0,A,pe.mtomResponseAttachments)}return _(le,G,pe)},"parseSync");this.SOAPAction?N=this.SOAPAction:e.soapAction!==void 0&&e.soapAction!==null?N=e.soapAction:N=(v.lastIndexOf("/")!==v.length-1?v+"/":v)+u,this.wsdl.options.forceSoap12Headers?(E["Content-Type"]=`application/soap+xml; charset=utf-8; action="${N}"`,C="xmlns:"+g+'="http://www.w3.org/2003/05/soap-envelope"'):E.SOAPAction='"'+N+'"',i=i||{},this.security&&this.security.addHeaders&&this.security.addHeaders(E),this.security&&this.security.addOptions&&this.security.addOptions(i),h==="rpc"&&(c.parts||c.name==="element"||t===null)?(CF.ok(!h||h==="rpc","invalid message definition for document style binding"),S=this.wsdl.objectToRpcXML(u,t,b,v,c.name!=="element"),e.inputSoap==="encoded"&&(w='soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" ')):(CF.ok(!h||h==="document","invalid message definition for rpc style binding"),S=this.wsdl.objectToDocumentXML(c.$name,t,c.targetNSAlias,c.targetNamespace,c.$type||c.$lookupType));let R;this.soapHeaders&&(R=this.soapHeaders.map(G=>typeof G=="function"?G(e,n,N,t):G).join(" ")),A='<?xml version="1.0" encoding="utf-8"?><'+g+":Envelope "+C+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+w+this.wsdl.xmlnsInEnvelope+">"+(R||this.security?"<"+g+":Header"+(this.wsdl.xmlnsInHeader?" "+this.wsdl.xmlnsInHeader:"")+">"+(R||"")+(this.security&&!this.security.postProcess?this.security.toXML():"")+"</"+g+":Header>":"")+"<"+g+":Body"+(this.bodyAttributes?this.bodyAttributes.join(" "):"")+">"+S+"</"+g+":Body></"+g+":Envelope>",this.security&&this.security.postProcess&&(A=this.security.postProcess(A,g)),i&&i.postProcess&&(A=i.postProcess(A)),this.lastMessage=S,this.lastRequest=A,this.lastEndpoint=n;let q=i.exchangeId||(0,lle.randomUUID)();if(this.emit("message",S,q),this.emit("request",A,q),this.httpHeaders===null)E={};else{for(let G in this.httpHeaders)E[G]=this.httpHeaders[G];for(let G in a)E[G]=a[G]}let H=o(G=>{try{return JSON.parse(G)}catch{return}},"tryJSONparse");if(this.streamAllowed&&typeof this.httpClient.requestStream=="function"){s=NF.once(s);let G=Date.now(),pe=o(le=>{this.lastResponse=null,this.lastResponseHeaders=null,this.lastElapsedTime=null,this.lastRequestHeaders=le.config&&le.config.headers,this.emit("response",null,null,q),this.returnSaxStream||!le.response||!le.response.data?s(le,void 0,void 0,void 0,A):(le.response.data.on("close",()=>{s(le,void 0,void 0,void 0,A)}),le.response.data.on("data",ue=>{le.response.data=ue.toString()}))},"onError");this.httpClient.requestStream(n,A,E,i,this).then(le=>{if(this.lastRequestHeaders=le.headers,le.data.on&&le.data.on("error",ue=>pe(ue)),le.status!==200||!f||!f.$lookupTypes){(0,ple.default)(le.data).then(ue=>(this.lastResponse=ue,this.lastElapsedTime=Date.now()-G,this.lastResponseHeaders=le&&le.headers,this.lastRequestHeaders=le.config&&le.config.headers||le.headers,this.emit("response",ue,le,q),M(ue,le)));return}if(this.returnSaxStream){let ue=this.wsdl.getSaxStream(le.data);return _({saxStream:ue},"<stream>",le.data)}else this.wsdl.xmlToObject(le.data,(ue,ee)=>(this.lastResponse=le,this.lastElapsedTime=Date.now()-G,this.lastResponseHeaders=le&&le.headers,this.lastRequestHeaders=le.config.headers,this.emit("response","<stream>",le.data,q),ue?(ue.response=le,ue.body="<stream>",this.emit("soapError",ue,q),s(ue,le,void 0,void 0,A)):_(ee,"<stream>",le)))},pe);return}let K=Date.now();return this.httpClient.request(n,A,(G,pe,le)=>{if(this.lastResponse=le,pe&&(this.lastResponseHeaders=pe.headers,this.lastElapsedTime=Date.now()-K,this.lastResponseAttachments=pe.mtomResponseAttachments,this.lastRequestHeaders=pe.config&&pe.config.headers),this.emit("response",le,pe,q),G){this.lastRequestHeaders=G.config&&G.config.headers;try{G.response&&G.response.data&&this.wsdl.xmlToObject(G.response.data)}catch(ue){G.root=ue.root||ue}s(G,void 0,void 0,void 0,A)}else return M(le,pe)},E,i,this)}};Vi.Client=vle});var DF=Q(za=>{"use strict";var yle=za&&za.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),xle=za&&za.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wle=za&&za.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&yle(t,e,n[s]);return xle(t,e),t}})();Object.defineProperty(za,"__esModule",{value:!0});za.BasicAuthSecurity=void 0;var BF=wle(Uo()),Sle=class{static{o(this,"BasicAuthSecurity")}constructor(e,t,n){this._username=e,this._password=t,this.defaults={},BF.merge(this.defaults,n)}addHeaders(e){e.Authorization="Basic "+Buffer.from(this._username+":"+this._password||"").toString("base64")}toXML(){return""}addOptions(e){BF.merge(e,this.defaults)}};za.BasicAuthSecurity=Sle});var OF=Q(Ja=>{"use strict";var ble=Ja&&Ja.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ele=Ja&&Ja.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ale=Ja&&Ja.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&ble(t,e,n[s]);return Ele(t,e),t}})();Object.defineProperty(Ja,"__esModule",{value:!0});Ja.BearerSecurity=void 0;var RF=Ale(Uo()),Cle=class{static{o(this,"BearerSecurity")}constructor(e,t){this._token=e,this.defaults={},RF.merge(this.defaults,t)}addHeaders(e){e.Authorization="Bearer "+this._token}toXML(){return""}addOptions(e){RF.merge(e,this.defaults)}};Ja.BearerSecurity=Cle});var LF=Q(Ya=>{"use strict";var Nle=Ya&&Ya.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Tle=Ya&&Ya.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),vB=Ya&&Ya.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Nle(t,e,n[s]);return Tle(t,e),t}})();Object.defineProperty(Ya,"__esModule",{value:!0});Ya.ClientSSLSecurity=void 0;var gB=vB(require("fs")),PF=vB(require("https")),kF=vB(Uo()),Ile=class{static{o(this,"ClientSSLSecurity")}constructor(e,t,n,s){if(e)if(Buffer.isBuffer(e))this.key=e;else if(typeof e=="string")this.key=gB.readFileSync(e);else throw new Error("key should be a buffer or a string!");if(t)if(Buffer.isBuffer(t))this.cert=t;else if(typeof t=="string")this.cert=gB.readFileSync(t);else throw new Error("cert should be a buffer or a string!");n&&(Buffer.isBuffer(n)||Array.isArray(n)?this.ca=n:typeof n=="string"?this.ca=gB.readFileSync(n):(s=n,this.ca=null)),this.defaults={},kF.merge(this.defaults,s),this.agent=null}toXML(){return""}addOptions(e){let t=null;e.key=this.key,e.cert=this.cert,e.ca=this.ca,kF.merge(e,this.defaults),e.forever?(this.agent||(e.keepAlive=!0,this.agent=new PF.Agent(e)),t=this.agent):t=new PF.Agent(e),e.httpsAgent=t}};Ya.ClientSSLSecurity=Ile});var UF=Q(Qa=>{"use strict";var _le=Qa&&Qa.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ble=Qa&&Qa.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),yB=Qa&&Qa.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&_le(t,e,n[s]);return Ble(t,e),t}})();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.ClientSSLSecurityPFX=void 0;var Dle=yB(require("fs")),Rle=yB(require("https")),VF=yB(Uo()),Ole=class{static{o(this,"ClientSSLSecurityPFX")}constructor(e,t,n){if(typeof t=="object"&&(n=t),e)if(Buffer.isBuffer(e))this.pfx=e;else if(typeof e=="string")this.pfx=Dle.readFileSync(e);else throw new Error("supplied pfx file should be a buffer or a file location");t&&typeof t=="string"&&(this.passphrase=t),this.defaults={},VF.merge(this.defaults,n)}toXML(){return""}addOptions(e){e.pfx=this.pfx,this.passphrase&&(e.passphrase=this.passphrase),VF.merge(e,this.defaults),e.httpsAgent=new Rle.Agent(e)}};Qa.ClientSSLSecurityPFX=Ole});var jF=Q(Za=>{"use strict";var Ple=Za&&Za.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),kle=Za&&Za.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Lle=Za&&Za.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Ple(t,e,n[s]);return kle(t,e),t}})();Object.defineProperty(Za,"__esModule",{value:!0});Za.NTLMSecurity=void 0;var Vle=Lle(Uo()),Ule=class{static{o(this,"NTLMSecurity")}constructor(e,t,n,s){typeof e=="object"?(this.defaults=e,this.defaults.ntlm=!0):this.defaults={ntlm:!0,username:e,password:t,domain:n,workstation:s}}addHeaders(e){e.Connection="keep-alive"}toXML(){return""}addOptions(e){Vle.merge(e,this.defaults)}};Za.NTLMSecurity=Ule});var FF=Q(eo=>{"use strict";var jle=eo&&eo.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Fle=eo&&eo.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Mle=eo&&eo.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&jle(t,e,n[s]);return Fle(t,e),t}})();Object.defineProperty(eo,"__esModule",{value:!0});eo.WSSecurity=void 0;var qle=Mle(require("crypto")),xB=hc(),Hle=["PasswordDigest","PasswordText"],Kle=class{static{o(this,"WSSecurity")}constructor(e,t,n){n=n||{},this._username=e,this._password=t,this._envelopeKey="soap",typeof n=="string"?(this._passwordType=n||"PasswordText",n={}):this._passwordType=n.passwordType?n.passwordType:"PasswordText",Hle.indexOf(this._passwordType)===-1&&(this._passwordType="PasswordText"),this._hasTimeStamp=n.hasTimeStamp||typeof n.hasTimeStamp=="boolean"?!!n.hasTimeStamp:!0,n.hasNonce!=null&&(this._hasNonce=!!n.hasNonce),this._hasTokenCreated=n.hasTokenCreated||typeof n.hasTokenCreated=="boolean"?!!n.hasTokenCreated:!0,n.actor!=null&&(this._actor=n.actor),n.mustUnderstand!=null&&(this._mustUnderstand=!!n.mustUnderstand),n.envelopeKey&&(this._envelopeKey=n.envelopeKey)}toXML(){function e(u){function c(f){return f<10?"0"+f:f}return o(c,"pad"),u.getUTCFullYear()+"-"+c(u.getUTCMonth()+1)+"-"+c(u.getUTCDate())+"T"+c(u.getUTCHours())+":"+c(u.getUTCMinutes())+":"+c(u.getUTCSeconds())+"Z"}o(e,"getDate");let t=new Date,n=e(t),s="";if(this._hasTimeStamp){let u=e(new Date(t.getTime()+6e5));s='<wsu:Timestamp wsu:Id="Timestamp-'+n+'"><wsu:Created>'+n+"</wsu:Created><wsu:Expires>"+u+"</wsu:Expires></wsu:Timestamp>"}let i,a;if(this._hasNonce||this._passwordType!=="PasswordText"){let u=qle.createHash("sha1");u.update(n+Math.random()),a=u.digest("base64")}return this._passwordType==="PasswordText"?(i='<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">'+(0,xB.xmlEscape)(this._password)+"</wsse:Password>",a&&(i+='<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">'+a+"</wsse:Nonce>")):i='<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">'+(0,xB.passwordDigest)(a,n,this._password)+'</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">'+a+"</wsse:Nonce>","<wsse:Security "+(this._actor?`${this._envelopeKey}:actor="${this._actor}" `:"")+(this._mustUnderstand?`${this._envelopeKey}:mustUnderstand="1" `:"")+'xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'+s+'<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-'+n+'"><wsse:Username>'+(0,xB.xmlEscape)(this._username)+"</wsse:Username>"+i+(this._hasTokenCreated?"<wsu:Created>"+n+"</wsu:Created>":"")+"</wsse:UsernameToken></wsse:Security>"}};eo.WSSecurity=Kle});var gb=Q(wB=>{"use strict";var $le=typeof wB>"u"?{}:wB;(function(r){"use strict";function e(d){var I=Array.prototype.slice,$=d.length,re=o(function(X,nt){return function(){return nt.apply(this,X.concat(I.call(arguments)))}},"partial"),ae=o(function(){var X=I.call(arguments);return X.length<$?re(X,ae):d.apply(this,I.apply(arguments,[0,$]))},"fn1");return ae}o(e,"curry");var t=o(function(d,I){for(var $=0;$<I.length;$+=1)d(I[$],$,I)},"forEach"),n=o(function(d,I,$){var re=I;return t(function(ae,X){re=d(re,ae,X)},$),re},"reduce"),s=o(function(d,I){var $=new Array(I.length);return t(function(re,ae){$[ae]=d(re)},I),$},"map"),i=o(function(d,I){var $=[];return t(function(re,ae){d(re,ae)&&$.push(re)},I),$},"filter"),a=o(function(d,I){for(var $=0;$<d.length;$+=1)if(d[$]===I)return!0;return!1},"includes");function u(d){return function(){return d}}o(u,"always");function c(d){return d.toString()}o(c,"toString");var f=o(function(d,I){return I.join(d)},"join"),h=o(function(d,I,$){return d+$+I},"wrap"),m=Array.prototype.concat,g=32767;function x(d){for(var I=[],$=0;$<d.length;$+=g){var re=d.slice($,$+g);I=m.apply(I,re)}return I}o(x,"flatten");function v(d,I){for(var $=Object(d),re=1;re<arguments.length;re++){var ae=arguments[re];if(ae!=null)for(var X in ae)Object.prototype.hasOwnProperty.call(ae,X)&&($[X]=ae[X])}return $}o(v,"assign");var w={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11};S.prototype=new Object,S.prototype.constructor=S,S.superclass=Object.prototype;function S(){this.init()}o(S,"XPathParser"),S.prototype.init=function(){this.reduceActions=[],this.reduceActions[3]=function(d){return new M(d[0],d[2])},this.reduceActions[5]=function(d){return new R(d[0],d[2])},this.reduceActions[7]=function(d){return new q(d[0],d[2])},this.reduceActions[8]=function(d){return new H(d[0],d[2])},this.reduceActions[10]=function(d){return new K(d[0],d[2])},this.reduceActions[11]=function(d){return new G(d[0],d[2])},this.reduceActions[12]=function(d){return new pe(d[0],d[2])},this.reduceActions[13]=function(d){return new le(d[0],d[2])},this.reduceActions[15]=function(d){return new ue(d[0],d[2])},this.reduceActions[16]=function(d){return new ee(d[0],d[2])},this.reduceActions[18]=function(d){return new he(d[0],d[2])},this.reduceActions[19]=function(d){return new we(d[0],d[2])},this.reduceActions[20]=function(d){return new Ke(d[0],d[2])},this.reduceActions[22]=function(d){return new C(d[1])},this.reduceActions[24]=function(d){return new Ae(d[0],d[2])},this.reduceActions[25]=function(d){return new xe(void 0,void 0,d[0])},this.reduceActions[27]=function(d){return d[0].locationPath=d[2],d[0]},this.reduceActions[28]=function(d){return d[0].locationPath=d[2],d[0].locationPath.steps.unshift(new P(P.DESCENDANTORSELF,D.nodeTest,[])),d[0]},this.reduceActions[29]=function(d){return new xe(d[0],[],void 0)},this.reduceActions[30]=function(d){return Ze.instance_of(d[0],xe)?(d[0].filterPredicates==null&&(d[0].filterPredicates=[]),d[0].filterPredicates.push(d[1]),d[0]):new xe(d[0],[d[1]],void 0)},this.reduceActions[32]=function(d){return d[1]},this.reduceActions[33]=function(d){return new Re(d[0])},this.reduceActions[34]=function(d){return new Ce(d[0])},this.reduceActions[36]=function(d){return new z(d[0],[])},this.reduceActions[37]=function(d){return new z(d[0],d[2])},this.reduceActions[38]=function(d){return[d[0]]},this.reduceActions[39]=function(d){return d[2].unshift(d[0]),d[2]},this.reduceActions[43]=function(d){return new ct(!0,[])},this.reduceActions[44]=function(d){return d[1].absolute=!0,d[1]},this.reduceActions[46]=function(d){return new ct(!1,[d[0]])},this.reduceActions[47]=function(d){return d[0].steps.push(d[2]),d[0]},this.reduceActions[49]=function(d){return new P(d[0],d[1],[])},this.reduceActions[50]=function(d){return new P(P.CHILD,d[0],[])},this.reduceActions[51]=function(d){return new P(d[0],d[1],d[2])},this.reduceActions[52]=function(d){return new P(P.CHILD,d[0],d[1])},this.reduceActions[54]=function(d){return[d[0]]},this.reduceActions[55]=function(d){return d[1].unshift(d[0]),d[1]},this.reduceActions[56]=function(d){return d[0]=="ancestor"?P.ANCESTOR:d[0]=="ancestor-or-self"?P.ANCESTORORSELF:d[0]=="attribute"?P.ATTRIBUTE:d[0]=="child"?P.CHILD:d[0]=="descendant"?P.DESCENDANT:d[0]=="descendant-or-self"?P.DESCENDANTORSELF:d[0]=="following"?P.FOLLOWING:d[0]=="following-sibling"?P.FOLLOWINGSIBLING:d[0]=="namespace"?P.NAMESPACE:d[0]=="parent"?P.PARENT:d[0]=="preceding"?P.PRECEDING:d[0]=="preceding-sibling"?P.PRECEDINGSIBLING:d[0]=="self"?P.SELF:-1},this.reduceActions[57]=function(d){return P.ATTRIBUTE},this.reduceActions[59]=function(d){return d[0]=="comment"?D.commentTest:d[0]=="text"?D.textTest:d[0]=="processing-instruction"?D.anyPiTest:d[0]=="node"?D.nodeTest:new D(-1,void 0)},this.reduceActions[60]=function(d){return new D.PITest(d[2])},this.reduceActions[61]=function(d){return d[1]},this.reduceActions[63]=function(d){return d[1].absolute=!0,d[1].steps.unshift(new P(P.DESCENDANTORSELF,D.nodeTest,[])),d[1]},this.reduceActions[64]=function(d){return d[0].steps.push(new P(P.DESCENDANTORSELF,D.nodeTest,[])),d[0].steps.push(d[2]),d[0]},this.reduceActions[65]=function(d){return new P(P.SELF,D.nodeTest,[])},this.reduceActions[66]=function(d){return new P(P.PARENT,D.nodeTest,[])},this.reduceActions[67]=function(d){return new se(d[1])},this.reduceActions[68]=function(d){return D.nameTestAny},this.reduceActions[69]=function(d){return new D.NameTestPrefixAny(d[0].split(":")[0])},this.reduceActions[70]=function(d){return new D.NameTestQName(d[0])}},S.actionTable=[" s s sssssssss s ss s ss"," s ","r rrrrrrrrr rrrrrrr rr r "," rrrrr "," s s sssssssss s ss s ss","rs rrrrrrrr s sssssrrrrrr rrs rs "," s s sssssssss s ss s ss"," s "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s "," s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr r ","a ","r s rr r ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrs rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r srrrrrrrr rrrrrrs rr sr ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrr rrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r "," sssss ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrr rrrrr rr r "," s "," s "," rrrrr "," s s sssssssss s sss s ss","r srrrrrrrr rrrrrrs rr r "," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss s ss s ss"," s s sssssssss ss s ss"," s s sssssssss s ss s ss"," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr rr "," s s sssss s s "," s s sssss s s ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr sr ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr "," s ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," rr "," s "," rs ","r sr rr r ","r s rr s rr r ","r rssrr rss rr r ","r rssrr rss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrr rrrss rr r ","r rrrrrsss rrrrr rr r ","r rrrrrsss rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrr rr r ","r rrrrrrrr rrrrrr rr r "," r "," s ","r srrrrrrrr rrrrrrs rr r ","r srrrrrrrr rrrrrrs rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr r ","r rrrrrrrrr rrrrrrr rr rr ","r rrrrrrrrr rrrrrrr rr rr "," s s sssssssss s ss s ss","r rrrrrrrrr rrrrrrr rr rr "," r "],S.actionTableNumber=[` 1 0 /.-,+*)(' & %$ # "!`," J ","a aaaaaaaaa aaaaaaa aa a "," YYYYY ",` 1 0 /.-,+*)(' & %$ # "!`,`K1 KKKKKKKK . +*)('KKKKKK KK# K" `,` 1 0 /.-,+*)(' & %$ # "!`," N "," O ","e eeeeeeeee eeeeeee ee ee ","f fffffffff fffffff ff ff ","d ddddddddd ddddddd dd dd ","B BBBBBBBBB BBBBBBB BB BB ","A AAAAAAAAA AAAAAAA AA AA "," P "," Q ",` 1 . +*)(' # " `,"b bbbbbbbbb bbbbbbb bb b "," ","! S !! ! ",'" T" "" " ',"$ V $$ U $$ $ ","& &ZY&& &XW && & ",") ))))) )))\\[ )) ) ",". ....._^] ..... .. . ","1 11111111 11111 11 1 ","5 55555555 55555` 55 5 ","7 77777777 777777 77 7 ","9 99999999 999999 99 9 ",": c:::::::: ::::::b :: a: ","I fIIIIIIII IIIIIIe II I ","= ========= ======= == == ","? ????????? ??????? ?? ?? ","C CCCCCCCCC CCCCCCC CC CC ","J JJJJJJJJ JJJJJJ JJ J ","M MMMMMMMM MMMMMM MM M ","N NNNNNNNNN NNNNNNN NN N ","P PPPPPPPPP PPPPPPP PP P "," +*)(' ","R RRRRRRRRR RRRRRRR RR aR ","U UUUUUUUUU UUUUUUU UU U ","Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ","c ccccccccc ccccccc cc cc "," j ","L fLLLLLLLL LLLLLLe LL L ","6 66666666 66666 66 6 "," k "," l "," XXXXX ",` 1 0 /.-,+*)(' & %$m # "!`,"_ f________ ______e __ _ ",` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 0 /.-,+*)(' %$ # "!`,` 1 0 /.-,+*)(' & %$ # "!`,` 1 . +*)(' # " `,` 1 . +*)(' # " `,"> >>>>>>>>> >>>>>>> >> >> ",` 1 . +*)(' # " `,` 1 . +*)(' # " `,"Q QQQQQQQQQ QQQQQQQ QQ aQ ","V VVVVVVVVV VVVVVVV VV aV ","T TTTTTTTTT TTTTTTT TT T ","@ @@@@@@@@@ @@@@@@@ @@ @@ "," \x87 ","[ [[[[[[[[[ [[[[[[[ [[ [[ ","D DDDDDDDDD DDDDDDD DD DD "," HH "," \x88 "," F\x89 ","# T# ## # ","% V %% U %% % ","' 'ZY'' 'XW '' ' ","( (ZY(( (XW (( ( ","+ +++++ +++\\[ ++ + ","* ***** ***\\[ ** * ","- ----- ---\\[ -- - ",", ,,,,, ,,,\\[ ,, , ","0 00000_^] 00000 00 0 ","/ /////_^] ///// // / ","2 22222222 22222 22 2 ","3 33333333 33333 33 3 ","4 44444444 44444 44 4 ","8 88888888 888888 88 8 "," ^ "," \x8A ","; f;;;;;;;; ;;;;;;e ;; ; ","< f<<<<<<<< <<<<<<e << < ","O OOOOOOOOO OOOOOOO OO O ","` ````````` ``````` `` ` ","S SSSSSSSSS SSSSSSS SS S ","W WWWWWWWWW WWWWWWW WW W ","\\ \\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\ \\\\ \\\\ ","E EEEEEEEEE EEEEEEE EE EE ",` 1 0 /.-,+*)(' & %$ # "!`,"] ]]]]]]]]] ]]]]]]] ]] ]] "," G "],S.gotoTable=["3456789:;<=>?@ AB CDEFGH IJ "," "," "," ","L456789:;<=>?@ AB CDEFGH IJ "," M EFGH IJ "," N;<=>?@ AB CDEFGH IJ "," "," "," "," "," "," "," "," "," "," S EFGH IJ "," "," "," "," "," "," "," "," "," "," "," "," "," e "," "," "," "," "," "," "," "," "," h J "," i j "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ ABpqCDEFGH IJ "," "," r6789:;<=>?@ AB CDEFGH IJ "," s789:;<=>?@ AB CDEFGH IJ "," t89:;<=>?@ AB CDEFGH IJ "," u89:;<=>?@ AB CDEFGH IJ "," v9:;<=>?@ AB CDEFGH IJ "," w9:;<=>?@ AB CDEFGH IJ "," x9:;<=>?@ AB CDEFGH IJ "," y9:;<=>?@ AB CDEFGH IJ "," z:;<=>?@ AB CDEFGH IJ "," {:;<=>?@ AB CDEFGH IJ "," |;<=>?@ AB CDEFGH IJ "," };<=>?@ AB CDEFGH IJ "," ~;<=>?@ AB CDEFGH IJ "," \x7F=>?@ AB CDEFGH IJ ","\x80456789:;<=>?@ AB CDEFGH IJ\x81"," \x82 EFGH IJ "," \x83 EFGH IJ "," "," \x84 GH IJ "," \x85 GH IJ "," i \x86 "," i \x87 "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","o456789:;<=>?@ AB\x8CqCDEFGH IJ "," "," "],S.productions=[[1,1,2],[2,1,3],[3,1,4],[3,3,3,-9,4],[4,1,5],[4,3,4,-8,5],[5,1,6],[5,3,5,-22,6],[5,3,5,-5,6],[6,1,7],[6,3,6,-23,7],[6,3,6,-24,7],[6,3,6,-6,7],[6,3,6,-7,7],[7,1,8],[7,3,7,-25,8],[7,3,7,-26,8],[8,1,9],[8,3,8,-12,9],[8,3,8,-11,9],[8,3,8,-10,9],[9,1,10],[9,2,-26,9],[10,1,11],[10,3,10,-27,11],[11,1,12],[11,1,13],[11,3,13,-28,14],[11,3,13,-4,14],[13,1,15],[13,2,13,16],[15,1,17],[15,3,-29,2,-30],[15,1,-15],[15,1,-16],[15,1,18],[18,3,-13,-29,-30],[18,4,-13,-29,19,-30],[19,1,20],[19,3,20,-31,19],[20,1,2],[12,1,14],[12,1,21],[21,1,-28],[21,2,-28,14],[21,1,22],[14,1,23],[14,3,14,-28,23],[14,1,24],[23,2,25,26],[23,1,26],[23,3,25,26,27],[23,2,26,27],[23,1,28],[27,1,16],[27,2,16,27],[25,2,-14,-3],[25,1,-32],[26,1,29],[26,3,-20,-29,-30],[26,4,-21,-29,-15,-30],[16,3,-33,30,-34],[30,1,2],[22,2,-4,14],[24,3,14,-4,23],[28,1,-35],[28,1,-2],[17,2,-36,-18],[29,1,-17],[29,1,-19],[29,1,-18]],S.DOUBLEDOT=2,S.DOUBLECOLON=3,S.DOUBLESLASH=4,S.NOTEQUAL=5,S.LESSTHANOREQUAL=6,S.GREATERTHANOREQUAL=7,S.AND=8,S.OR=9,S.MOD=10,S.DIV=11,S.MULTIPLYOPERATOR=12,S.FUNCTIONNAME=13,S.AXISNAME=14,S.LITERAL=15,S.NUMBER=16,S.ASTERISKNAMETEST=17,S.QNAME=18,S.NCNAMECOLONASTERISK=19,S.NODETYPE=20,S.PROCESSINGINSTRUCTIONWITHLITERAL=21,S.EQUALS=22,S.LESSTHAN=23,S.GREATERTHAN=24,S.PLUS=25,S.MINUS=26,S.BAR=27,S.SLASH=28,S.LEFTPARENTHESIS=29,S.RIGHTPARENTHESIS=30,S.COMMA=31,S.AT=32,S.LEFTBRACKET=33,S.RIGHTBRACKET=34,S.DOT=35,S.DOLLAR=36,S.prototype.tokenize=function(d){for(var I=[],$=[],re=d+"\0",ae=0,X=re.charAt(ae++);;){for(;X==" "||X==" "||X=="\r"||X==`
|
|
60
|
+
`;)X=re.charAt(ae++);if(X=="\0"||ae>=re.length)break;if(X=="("){I.push(S.LEFTPARENTHESIS),$.push(X),X=re.charAt(ae++);continue}if(X==")"){I.push(S.RIGHTPARENTHESIS),$.push(X),X=re.charAt(ae++);continue}if(X=="["){I.push(S.LEFTBRACKET),$.push(X),X=re.charAt(ae++);continue}if(X=="]"){I.push(S.RIGHTBRACKET),$.push(X),X=re.charAt(ae++);continue}if(X=="@"){I.push(S.AT),$.push(X),X=re.charAt(ae++);continue}if(X==","){I.push(S.COMMA),$.push(X),X=re.charAt(ae++);continue}if(X=="|"){I.push(S.BAR),$.push(X),X=re.charAt(ae++);continue}if(X=="+"){I.push(S.PLUS),$.push(X),X=re.charAt(ae++);continue}if(X=="-"){I.push(S.MINUS),$.push(X),X=re.charAt(ae++);continue}if(X=="="){I.push(S.EQUALS),$.push(X),X=re.charAt(ae++);continue}if(X=="$"){I.push(S.DOLLAR),$.push(X),X=re.charAt(ae++);continue}if(X=="."){if(X=re.charAt(ae++),X=="."){I.push(S.DOUBLEDOT),$.push(".."),X=re.charAt(ae++);continue}if(X>="0"&&X<="9"){var nt="."+X;for(X=re.charAt(ae++);X>="0"&&X<="9";)nt+=X,X=re.charAt(ae++);I.push(S.NUMBER),$.push(nt);continue}I.push(S.DOT),$.push(".");continue}if(X=="'"||X=='"'){for(var Lt=X,zt="";ae<re.length&&(X=re.charAt(ae))!==Lt;)zt+=X,ae+=1;if(X!==Lt)throw Mn.fromMessage("Unterminated string literal: "+Lt+zt);ae+=1,I.push(S.LITERAL),$.push(zt),X=re.charAt(ae++);continue}if(X>="0"&&X<="9"){var nt=X;for(X=re.charAt(ae++);X>="0"&&X<="9";)nt+=X,X=re.charAt(ae++);if(X=="."&&re.charAt(ae)>="0"&&re.charAt(ae)<="9")for(nt+=X,nt+=re.charAt(ae++),X=re.charAt(ae++);X>="0"&&X<="9";)nt+=X,X=re.charAt(ae++);I.push(S.NUMBER),$.push(nt);continue}if(X=="*"){if(I.length>0){var et=I[I.length-1];if(et!=S.AT&&et!=S.DOUBLECOLON&&et!=S.LEFTPARENTHESIS&&et!=S.LEFTBRACKET&&et!=S.AND&&et!=S.OR&&et!=S.MOD&&et!=S.DIV&&et!=S.MULTIPLYOPERATOR&&et!=S.SLASH&&et!=S.DOUBLESLASH&&et!=S.BAR&&et!=S.PLUS&&et!=S.MINUS&&et!=S.EQUALS&&et!=S.NOTEQUAL&&et!=S.LESSTHAN&&et!=S.LESSTHANOREQUAL&&et!=S.GREATERTHAN&&et!=S.GREATERTHANOREQUAL){I.push(S.MULTIPLYOPERATOR),$.push(X),X=re.charAt(ae++);continue}}I.push(S.ASTERISKNAMETEST),$.push(X),X=re.charAt(ae++);continue}if(X==":"&&re.charAt(ae)==":"){I.push(S.DOUBLECOLON),$.push("::"),ae++,X=re.charAt(ae++);continue}if(X=="/"){if(X=re.charAt(ae++),X=="/"){I.push(S.DOUBLESLASH),$.push("//"),X=re.charAt(ae++);continue}I.push(S.SLASH),$.push("/");continue}if(X=="!"&&re.charAt(ae)=="="){I.push(S.NOTEQUAL),$.push("!="),ae++,X=re.charAt(ae++);continue}if(X=="<"){if(re.charAt(ae)=="="){I.push(S.LESSTHANOREQUAL),$.push("<="),ae++,X=re.charAt(ae++);continue}I.push(S.LESSTHAN),$.push("<"),X=re.charAt(ae++);continue}if(X==">"){if(re.charAt(ae)=="="){I.push(S.GREATERTHANOREQUAL),$.push(">="),ae++,X=re.charAt(ae++);continue}I.push(S.GREATERTHAN),$.push(">"),X=re.charAt(ae++);continue}if(X=="_"||Ze.isLetter(X.charCodeAt(0))){var Bt=X;for(X=re.charAt(ae++);Ze.isNCNameChar(X.charCodeAt(0));)Bt+=X,X=re.charAt(ae++);if(I.length>0){var et=I[I.length-1];if(et!=S.AT&&et!=S.DOUBLECOLON&&et!=S.LEFTPARENTHESIS&&et!=S.LEFTBRACKET&&et!=S.AND&&et!=S.OR&&et!=S.MOD&&et!=S.DIV&&et!=S.MULTIPLYOPERATOR&&et!=S.SLASH&&et!=S.DOUBLESLASH&&et!=S.BAR&&et!=S.PLUS&&et!=S.MINUS&&et!=S.EQUALS&&et!=S.NOTEQUAL&&et!=S.LESSTHAN&&et!=S.LESSTHANOREQUAL&&et!=S.GREATERTHAN&&et!=S.GREATERTHANOREQUAL){if(Bt=="and"){I.push(S.AND),$.push(Bt);continue}if(Bt=="or"){I.push(S.OR),$.push(Bt);continue}if(Bt=="mod"){I.push(S.MOD),$.push(Bt);continue}if(Bt=="div"){I.push(S.DIV),$.push(Bt);continue}}}if(X==":"){if(re.charAt(ae)=="*"){I.push(S.NCNAMECOLONASTERISK),$.push(Bt+":*"),ae++,X=re.charAt(ae++);continue}if(re.charAt(ae)=="_"||Ze.isLetter(re.charCodeAt(ae))){for(Bt+=":",X=re.charAt(ae++);Ze.isNCNameChar(X.charCodeAt(0));)Bt+=X,X=re.charAt(ae++);if(X=="("){I.push(S.FUNCTIONNAME),$.push(Bt);continue}I.push(S.QNAME),$.push(Bt);continue}if(re.charAt(ae)==":"){I.push(S.AXISNAME),$.push(Bt);continue}}if(X=="("){if(Bt=="comment"||Bt=="text"||Bt=="node"){I.push(S.NODETYPE),$.push(Bt);continue}if(Bt=="processing-instruction"){re.charAt(ae)==")"?I.push(S.NODETYPE):I.push(S.PROCESSINGINSTRUCTIONWITHLITERAL),$.push(Bt);continue}I.push(S.FUNCTIONNAME),$.push(Bt);continue}I.push(S.QNAME),$.push(Bt);continue}throw new Error("Unexpected character "+X)}return I.push(1),$.push("[EOF]"),[I,$]},S.SHIFT="s",S.REDUCE="r",S.ACCEPT="a",S.prototype.parse=function(zt){var I,$,re=this.tokenize(zt);if(re!=null){I=re[0],$=re[1];var ae=0,X=[],nt=[],Lt=[],zt,et,Bt;for(X.push(0),nt.push(1),Lt.push("_S"),et=I[ae],Bt=$[ae++];;)switch(zt=X[X.length-1],S.actionTable[zt].charAt(et-1)){case S.SHIFT:nt.push(-et),Lt.push(Bt),X.push(S.actionTableNumber[zt].charCodeAt(et-1)-32),et=I[ae],Bt=$[ae++];break;case S.REDUCE:for(var qn=S.productions[S.actionTableNumber[zt].charCodeAt(et-1)-32][1],yi=[],fr=0;fr<qn;fr++)nt.pop(),yi.unshift(Lt.pop()),X.pop();var Ta=X[X.length-1];nt.push(S.productions[S.actionTableNumber[zt].charCodeAt(et-1)-32][0]),this.reduceActions[S.actionTableNumber[zt].charCodeAt(et-1)-32]==null?Lt.push(yi[0]):Lt.push(this.reduceActions[S.actionTableNumber[zt].charCodeAt(et-1)-32](yi)),X.push(S.gotoTable[Ta].charCodeAt(S.productions[S.actionTableNumber[zt].charCodeAt(et-1)-32][0]-2)-33);break;case S.ACCEPT:return new A(Lt.pop());default:throw new Error("XPath parse error")}}},A.prototype=new Object,A.prototype.constructor=A,A.superclass=Object.prototype;function A(d){this.expression=d}o(A,"XPath"),A.prototype.toString=function(){return this.expression.toString()};function N(d,I,$){I in d||(d[I]=$)}o(N,"setIfUnset"),A.prototype.evaluate=function(d){return d.contextNode=d.expressionContextNode,d.contextSize=1,d.contextPosition=1,d.isHtml&&(N(d,"caseInsensitive",!0),N(d,"allowAnyNamespaceForNoPrefix",!0)),N(d,"caseInsensitive",!1),this.expression.evaluate(d)},A.XML_NAMESPACE_URI="http://www.w3.org/XML/1998/namespace",A.XMLNS_NAMESPACE_URI="http://www.w3.org/2000/xmlns/",b.prototype=new Object,b.prototype.constructor=b,b.superclass=Object.prototype;function b(){}o(b,"Expression"),b.prototype.init=function(){},b.prototype.toString=function(){return"<Expression>"},b.prototype.evaluate=function(d){throw new Error("Could not evaluate expression.")},E.prototype=new b,E.prototype.constructor=E,E.superclass=b.prototype;function E(d){arguments.length>0&&this.init(d)}o(E,"UnaryOperation"),E.prototype.init=function(d){this.rhs=d},C.prototype=new E,C.prototype.constructor=C,C.superclass=E.prototype;function C(d){arguments.length>0&&this.init(d)}o(C,"UnaryMinusOperation"),C.prototype.init=function(d){C.superclass.init.call(this,d)},C.prototype.evaluate=function(d){return this.rhs.evaluate(d).number().negate()},C.prototype.toString=function(){return"-"+this.rhs.toString()},_.prototype=new b,_.prototype.constructor=_,_.superclass=b.prototype;function _(d,I){arguments.length>0&&this.init(d,I)}o(_,"BinaryOperation"),_.prototype.init=function(d,I){this.lhs=d,this.rhs=I},M.prototype=new _,M.prototype.constructor=M,M.superclass=_.prototype;function M(d,I){arguments.length>0&&this.init(d,I)}o(M,"OrOperation"),M.prototype.init=function(d,I){M.superclass.init.call(this,d,I)},M.prototype.toString=function(){return"("+this.lhs.toString()+" or "+this.rhs.toString()+")"},M.prototype.evaluate=function(d){var I=this.lhs.evaluate(d).bool();return I.booleanValue()?I:this.rhs.evaluate(d).bool()},R.prototype=new _,R.prototype.constructor=R,R.superclass=_.prototype;function R(d,I){arguments.length>0&&this.init(d,I)}o(R,"AndOperation"),R.prototype.init=function(d,I){R.superclass.init.call(this,d,I)},R.prototype.toString=function(){return"("+this.lhs.toString()+" and "+this.rhs.toString()+")"},R.prototype.evaluate=function(d){var I=this.lhs.evaluate(d).bool();return I.booleanValue()?this.rhs.evaluate(d).bool():I},q.prototype=new _,q.prototype.constructor=q,q.superclass=_.prototype;function q(d,I){arguments.length>0&&this.init(d,I)}o(q,"EqualsOperation"),q.prototype.init=function(d,I){q.superclass.init.call(this,d,I)},q.prototype.toString=function(){return"("+this.lhs.toString()+" = "+this.rhs.toString()+")"},q.prototype.evaluate=function(d){return this.lhs.evaluate(d).equals(this.rhs.evaluate(d))},H.prototype=new _,H.prototype.constructor=H,H.superclass=_.prototype;function H(d,I){arguments.length>0&&this.init(d,I)}o(H,"NotEqualOperation"),H.prototype.init=function(d,I){H.superclass.init.call(this,d,I)},H.prototype.toString=function(){return"("+this.lhs.toString()+" != "+this.rhs.toString()+")"},H.prototype.evaluate=function(d){return this.lhs.evaluate(d).notequal(this.rhs.evaluate(d))},K.prototype=new _,K.prototype.constructor=K,K.superclass=_.prototype;function K(d,I){arguments.length>0&&this.init(d,I)}o(K,"LessThanOperation"),K.prototype.init=function(d,I){K.superclass.init.call(this,d,I)},K.prototype.evaluate=function(d){return this.lhs.evaluate(d).lessthan(this.rhs.evaluate(d))},K.prototype.toString=function(){return"("+this.lhs.toString()+" < "+this.rhs.toString()+")"},G.prototype=new _,G.prototype.constructor=G,G.superclass=_.prototype;function G(d,I){arguments.length>0&&this.init(d,I)}o(G,"GreaterThanOperation"),G.prototype.init=function(d,I){G.superclass.init.call(this,d,I)},G.prototype.evaluate=function(d){return this.lhs.evaluate(d).greaterthan(this.rhs.evaluate(d))},G.prototype.toString=function(){return"("+this.lhs.toString()+" > "+this.rhs.toString()+")"},pe.prototype=new _,pe.prototype.constructor=pe,pe.superclass=_.prototype;function pe(d,I){arguments.length>0&&this.init(d,I)}o(pe,"LessThanOrEqualOperation"),pe.prototype.init=function(d,I){pe.superclass.init.call(this,d,I)},pe.prototype.evaluate=function(d){return this.lhs.evaluate(d).lessthanorequal(this.rhs.evaluate(d))},pe.prototype.toString=function(){return"("+this.lhs.toString()+" <= "+this.rhs.toString()+")"},le.prototype=new _,le.prototype.constructor=le,le.superclass=_.prototype;function le(d,I){arguments.length>0&&this.init(d,I)}o(le,"GreaterThanOrEqualOperation"),le.prototype.init=function(d,I){le.superclass.init.call(this,d,I)},le.prototype.evaluate=function(d){return this.lhs.evaluate(d).greaterthanorequal(this.rhs.evaluate(d))},le.prototype.toString=function(){return"("+this.lhs.toString()+" >= "+this.rhs.toString()+")"},ue.prototype=new _,ue.prototype.constructor=ue,ue.superclass=_.prototype;function ue(d,I){arguments.length>0&&this.init(d,I)}o(ue,"PlusOperation"),ue.prototype.init=function(d,I){ue.superclass.init.call(this,d,I)},ue.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().plus(this.rhs.evaluate(d).number())},ue.prototype.toString=function(){return"("+this.lhs.toString()+" + "+this.rhs.toString()+")"},ee.prototype=new _,ee.prototype.constructor=ee,ee.superclass=_.prototype;function ee(d,I){arguments.length>0&&this.init(d,I)}o(ee,"MinusOperation"),ee.prototype.init=function(d,I){ee.superclass.init.call(this,d,I)},ee.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().minus(this.rhs.evaluate(d).number())},ee.prototype.toString=function(){return"("+this.lhs.toString()+" - "+this.rhs.toString()+")"},he.prototype=new _,he.prototype.constructor=he,he.superclass=_.prototype;function he(d,I){arguments.length>0&&this.init(d,I)}o(he,"MultiplyOperation"),he.prototype.init=function(d,I){he.superclass.init.call(this,d,I)},he.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().multiply(this.rhs.evaluate(d).number())},he.prototype.toString=function(){return"("+this.lhs.toString()+" * "+this.rhs.toString()+")"},we.prototype=new _,we.prototype.constructor=we,we.superclass=_.prototype;function we(d,I){arguments.length>0&&this.init(d,I)}o(we,"DivOperation"),we.prototype.init=function(d,I){we.superclass.init.call(this,d,I)},we.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().div(this.rhs.evaluate(d).number())},we.prototype.toString=function(){return"("+this.lhs.toString()+" div "+this.rhs.toString()+")"},Ke.prototype=new _,Ke.prototype.constructor=Ke,Ke.superclass=_.prototype;function Ke(d,I){arguments.length>0&&this.init(d,I)}o(Ke,"ModOperation"),Ke.prototype.init=function(d,I){Ke.superclass.init.call(this,d,I)},Ke.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().mod(this.rhs.evaluate(d).number())},Ke.prototype.toString=function(){return"("+this.lhs.toString()+" mod "+this.rhs.toString()+")"},Ae.prototype=new _,Ae.prototype.constructor=Ae,Ae.superclass=_.prototype;function Ae(d,I){arguments.length>0&&this.init(d,I)}o(Ae,"BarOperation"),Ae.prototype.init=function(d,I){Ae.superclass.init.call(this,d,I)},Ae.prototype.evaluate=function(d){return this.lhs.evaluate(d).nodeset().union(this.rhs.evaluate(d).nodeset())},Ae.prototype.toString=function(){return s(c,[this.lhs,this.rhs]).join(" | ")},xe.prototype=new b,xe.prototype.constructor=xe,xe.superclass=b.prototype;function xe(d,I,$){arguments.length>0&&this.init(d,I,$)}o(xe,"PathExpr"),xe.prototype.init=function(d,I,$){xe.superclass.init.call(this),this.filter=d,this.filterPredicates=I,this.locationPath=$};function je(d){for(;d&&d.parentNode;)d=d.parentNode;return d}o(je,"findRoot"),xe.applyPredicates=function(d,I,$){if(d.length===0)return $;var re=I.extend({});return n(function(ae,X){return re.contextSize=ae.length,i(function(nt,Lt){return re.contextNode=nt,re.contextPosition=Lt+1,xe.predicateMatches(X,re)},ae)},$,d)},xe.getRoot=function(d,I){var $=I[0];if($.nodeType===w.DOCUMENT_NODE)return $;if(d.virtualRoot)return d.virtualRoot;var re=$.ownerDocument;if(re)return re;for(var ae=$;ae.parentNode!=null;)ae=ae.parentNode;return ae},xe.applyStep=function(d,I,$){var re=this,ae=[];switch(I.contextNode=$,d.axis){case P.ANCESTOR:if(I.contextNode===I.virtualRoot)break;var X;for(I.contextNode.nodeType==w.ATTRIBUTE_NODE?X=xe.getOwnerElement(I.contextNode):X=I.contextNode.parentNode;X!=null&&(d.nodeTest.matches(X,I)&&ae.push(X),X!==I.virtualRoot);)X=X.parentNode;break;case P.ANCESTORORSELF:for(var X=I.contextNode;X!=null&&(d.nodeTest.matches(X,I)&&ae.push(X),X!==I.virtualRoot);X=X.nodeType==w.ATTRIBUTE_NODE?xe.getOwnerElement(X):X.parentNode);break;case P.ATTRIBUTE:var nt=I.contextNode.attributes;if(nt!=null)for(var Lt=0;Lt<nt.length;Lt++){var X=nt.item(Lt);d.nodeTest.matches(X,I)&&ae.push(X)}break;case P.CHILD:for(var X=I.contextNode.firstChild;X!=null;X=X.nextSibling)d.nodeTest.matches(X,I)&&ae.push(X);break;case P.DESCENDANT:for(var fr=[I.contextNode.firstChild];fr.length>0;)for(var X=fr.pop();X!=null;)d.nodeTest.matches(X,I)&&ae.push(X),X.firstChild!=null?(fr.push(X.nextSibling),X=X.firstChild):X=X.nextSibling;break;case P.DESCENDANTORSELF:d.nodeTest.matches(I.contextNode,I)&&ae.push(I.contextNode);for(var fr=[I.contextNode.firstChild];fr.length>0;)for(var X=fr.pop();X!=null;)d.nodeTest.matches(X,I)&&ae.push(X),X.firstChild!=null?(fr.push(X.nextSibling),X=X.firstChild):X=X.nextSibling;break;case P.FOLLOWING:if(I.contextNode===I.virtualRoot)break;var fr=[];I.contextNode.firstChild!=null?fr.unshift(I.contextNode.firstChild):fr.unshift(I.contextNode.nextSibling);for(var X=I.contextNode.parentNode;X!=null&&X.nodeType!=w.DOCUMENT_NODE&&X!==I.virtualRoot;X=X.parentNode)fr.unshift(X.nextSibling);do for(var X=fr.pop();X!=null;)d.nodeTest.matches(X,I)&&ae.push(X),X.firstChild!=null?(fr.push(X.nextSibling),X=X.firstChild):X=X.nextSibling;while(fr.length>0);break;case P.FOLLOWINGSIBLING:if(I.contextNode===I.virtualRoot)break;for(var X=I.contextNode.nextSibling;X!=null;X=X.nextSibling)d.nodeTest.matches(X,I)&&ae.push(X);break;case P.NAMESPACE:var zt={};if(I.contextNode.nodeType==w.ELEMENT_NODE){zt.xml=A.XML_NAMESPACE_URI,zt.xmlns=A.XMLNS_NAMESPACE_URI;for(var X=I.contextNode;X!=null&&X.nodeType==w.ELEMENT_NODE;X=X.parentNode)for(var Lt=0;Lt<X.attributes.length;Lt++){var et=X.attributes.item(Lt),Bt=String(et.name);if(Bt=="xmlns")zt[""]==null&&(zt[""]=et.value);else if(Bt.length>6&&Bt.substring(0,6)=="xmlns:"){var qn=Bt.substring(6,Bt.length);zt[qn]==null&&(zt[qn]=et.value)}}for(var qn in zt){var yi=new Hr(qn,zt[qn],I.contextNode);d.nodeTest.matches(yi,I)&&ae.push(yi)}}break;case P.PARENT:X=null,I.contextNode!==I.virtualRoot&&(I.contextNode.nodeType==w.ATTRIBUTE_NODE?X=xe.getOwnerElement(I.contextNode):X=I.contextNode.parentNode),X!=null&&d.nodeTest.matches(X,I)&&ae.push(X);break;case P.PRECEDING:var fr;I.virtualRoot!=null?fr=[I.virtualRoot]:fr=[je(I.contextNode)];e:for(;fr.length>0;)for(var X=fr.pop();X!=null;){if(X==I.contextNode)break e;d.nodeTest.matches(X,I)&&ae.unshift(X),X.firstChild!=null?(fr.push(X.nextSibling),X=X.firstChild):X=X.nextSibling}break;case P.PRECEDINGSIBLING:if(I.contextNode===I.virtualRoot)break;for(var X=I.contextNode.previousSibling;X!=null;X=X.previousSibling)d.nodeTest.matches(X,I)&&ae.push(X);break;case P.SELF:d.nodeTest.matches(I.contextNode,I)&&ae.push(I.contextNode);break;default:}return ae};function ze(d,I,$){return xe.applyPredicates(d.predicates,I,xe.applyStep(d,I,$))}o(ze,"applyStepWithPredicates");function Ye(d,I,$){return x(s(ze.bind(null,$,d),I))}o(Ye,"applyStepToNodes"),xe.applySteps=function(d,I,$){return n(Ye.bind(null,I),$,d)},xe.prototype.applyFilter=function(d,I){if(!this.filter)return{nodes:[d.contextNode]};var $=this.filter.evaluate(d);if(!Ze.instance_of($,Ge)){if(this.filterPredicates!=null&&this.filterPredicates.length>0||this.locationPath!=null)throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used");return{nonNodes:$}}return{nodes:xe.applyPredicates(this.filterPredicates||[],I,$.toUnsortedArray())}},xe.applyLocationPath=function(d,I,$){if(!d)return $;var re=d.absolute?[xe.getRoot(I,$)]:$;return xe.applySteps(d.steps,I,re)},xe.prototype.evaluate=function(d){var I=v(new gn,d),$=this.applyFilter(d,I);if("nonNodes"in $)return $.nonNodes;var re=new Ge;return re.addArray(xe.applyLocationPath(this.locationPath,I,$.nodes)),re},xe.predicateMatches=function(d,I){var $=d.evaluate(I);return Ze.instance_of($,Ce)?I.contextPosition===$.numberValue():$.booleanValue()},xe.predicateString=function(d){return h("[","]",d.toString())},xe.predicatesString=function(d){return f("",s(xe.predicateString,d))},xe.prototype.toString=function(){if(this.filter!=null){var d=c(this.filter);return Ze.instance_of(this.filter,Re)?h("'","'",d):this.filterPredicates!=null&&this.filterPredicates.length?h("(",")",d)+xe.predicatesString(this.filterPredicates):this.locationPath!=null?d+(this.locationPath.absolute?"":"/")+c(this.locationPath):d}return c(this.locationPath)},xe.getOwnerElement=function(d){if(d.ownerElement)return d.ownerElement;try{if(d.selectSingleNode)return d.selectSingleNode("..")}catch{}for(var I=d.nodeType==w.DOCUMENT_NODE?d:d.ownerDocument,$=I.getElementsByTagName("*"),re=0;re<$.length;re++)for(var ae=$.item(re),X=ae.attributes,nt=0;nt<X.length;nt++){var Lt=X.item(nt);if(Lt===d)return ae}return null},ct.prototype=new Object,ct.prototype.constructor=ct,ct.superclass=Object.prototype;function ct(d,I){arguments.length>0&&this.init(d,I)}o(ct,"LocationPath"),ct.prototype.init=function(d,I){this.absolute=d,this.steps=I},ct.prototype.toString=function(){return(this.absolute?"/":"")+s(c,this.steps).join("/")},P.prototype=new Object,P.prototype.constructor=P,P.superclass=Object.prototype;function P(d,I,$){arguments.length>0&&this.init(d,I,$)}o(P,"Step"),P.prototype.init=function(d,I,$){this.axis=d,this.nodeTest=I,this.predicates=$},P.prototype.toString=function(){return P.STEPNAMES[this.axis]+"::"+this.nodeTest.toString()+xe.predicatesString(this.predicates)},P.ANCESTOR=0,P.ANCESTORORSELF=1,P.ATTRIBUTE=2,P.CHILD=3,P.DESCENDANT=4,P.DESCENDANTORSELF=5,P.FOLLOWING=6,P.FOLLOWINGSIBLING=7,P.NAMESPACE=8,P.PARENT=9,P.PRECEDING=10,P.PRECEDINGSIBLING=11,P.SELF=12,P.STEPNAMES=n(function(d,I){return d[I[0]]=I[1],d},{},[[P.ANCESTOR,"ancestor"],[P.ANCESTORORSELF,"ancestor-or-self"],[P.ATTRIBUTE,"attribute"],[P.CHILD,"child"],[P.DESCENDANT,"descendant"],[P.DESCENDANTORSELF,"descendant-or-self"],[P.FOLLOWING,"following"],[P.FOLLOWINGSIBLING,"following-sibling"],[P.NAMESPACE,"namespace"],[P.PARENT,"parent"],[P.PRECEDING,"preceding"],[P.PRECEDINGSIBLING,"preceding-sibling"],[P.SELF,"self"]]),D.prototype=new Object,D.prototype.constructor=D,D.superclass=Object.prototype;function D(d,I){arguments.length>0&&this.init(d,I)}o(D,"NodeTest"),D.prototype.init=function(d,I){this.type=d,this.value=I},D.prototype.toString=function(){return"<unknown nodetest type>"},D.prototype.matches=function(d,I){console.warn("unknown node test type")},D.NAMETESTANY=0,D.NAMETESTPREFIXANY=1,D.NAMETESTQNAME=2,D.COMMENT=3,D.TEXT=4,D.PI=5,D.NODE=6,D.isNodeType=function(d){return function(I){return a(d,I.nodeType)}},D.makeNodeTestType=function(d,I,$){var re=$||function(){};return re.prototype=new D(d),re.prototype.constructor=re,v(re.prototype,I),re},D.makeNodeTypeTest=function(d,I,$){return new(D.makeNodeTestType(d,{matches:D.isNodeType(I),toString:u($)}))},D.hasPrefix=function(d){return d.prefix||(d.nodeName||d.tagName).indexOf(":")!==-1},D.isElementOrAttribute=D.isNodeType([1,2]),D.nameSpaceMatches=function(d,I,$){var re=$.namespaceURI||"";if(!d)return!re||I.allowAnyNamespaceForNoPrefix&&!D.hasPrefix($);var ae=I.namespaceResolver.getNamespace(d,I.expressionContextNode);if(ae==null)throw new Error("Cannot resolve QName "+d);return ae===re},D.localNameMatches=function(d,I,$){var re=$.localName||$.nodeName;return I.caseInsensitive?d.toLowerCase()===re.toLowerCase():d===re},D.NameTestPrefixAny=D.makeNodeTestType(D.NAMETESTPREFIXANY,{matches:o(function(d,I){return D.isElementOrAttribute(d)&&D.nameSpaceMatches(this.prefix,I,d)},"matches"),toString:o(function(){return this.prefix+":*"},"toString")},o(function(I){this.prefix=I},"NameTestPrefixAny")),D.NameTestQName=D.makeNodeTestType(D.NAMETESTQNAME,{matches:o(function(d,I){return D.isNodeType([w.ELEMENT_NODE,w.ATTRIBUTE_NODE,Hr.XPATH_NAMESPACE_NODE])(d)&&D.nameSpaceMatches(this.prefix,I,d)&&D.localNameMatches(this.localName,I,d)},"matches"),toString:o(function(){return this.name},"toString")},o(function(I){var $=I.split(":");this.name=I,this.prefix=$.length>1?$[0]:null,this.localName=$[$.length>1?1:0]},"NameTestQName")),D.PITest=D.makeNodeTestType(D.PI,{matches:o(function(d,I){return D.isNodeType([w.PROCESSING_INSTRUCTION_NODE])(d)&&(d.target||d.nodeName)===this.name},"matches"),toString:o(function(){return h('processing-instruction("','")',this.name)},"toString")},function(d){this.name=d}),D.nameTestAny=D.makeNodeTypeTest(D.NAMETESTANY,[w.ELEMENT_NODE,w.ATTRIBUTE_NODE,Hr.XPATH_NAMESPACE_NODE],"*"),D.textTest=D.makeNodeTypeTest(D.TEXT,[w.TEXT_NODE,w.CDATA_SECTION_NODE],"text()"),D.commentTest=D.makeNodeTypeTest(D.COMMENT,[w.COMMENT_NODE],"comment()"),D.nodeTest=D.makeNodeTypeTest(D.NODE,[w.ELEMENT_NODE,w.ATTRIBUTE_NODE,w.TEXT_NODE,w.CDATA_SECTION_NODE,w.PROCESSING_INSTRUCTION_NODE,w.COMMENT_NODE,w.DOCUMENT_NODE],"node()"),D.anyPiTest=D.makeNodeTypeTest(D.PI,[w.PROCESSING_INSTRUCTION_NODE],"processing-instruction()"),se.prototype=new b,se.prototype.constructor=se,se.superclass=b.prototype;function se(d){arguments.length>0&&this.init(d)}o(se,"VariableReference"),se.prototype.init=function(d){this.variable=d},se.prototype.toString=function(){return"$"+this.variable},se.prototype.evaluate=function(d){var I=Ze.resolveQName(this.variable,d.namespaceResolver,d.contextNode,!1);if(I[0]==null)throw new Error("Cannot resolve QName "+fn);var $=d.variableResolver.getVariable(I[1],I[0]);if(!$)throw Mn.fromMessage("Undeclared variable: "+this.toString());return $},z.prototype=new b,z.prototype.constructor=z,z.superclass=b.prototype;function z(d,I){arguments.length>0&&this.init(d,I)}o(z,"FunctionCall"),z.prototype.init=function(d,I){this.functionName=d,this.arguments=I},z.prototype.toString=function(){for(var d=this.functionName+"(",I=0;I<this.arguments.length;I++)I>0&&(d+=", "),d+=this.arguments[I].toString();return d+")"},z.prototype.evaluate=function(d){var I=Is.getFunctionFromContext(this.functionName,d);if(!I)throw new Error("Unknown function "+this.functionName);var $=[d].concat(this.arguments);return I.apply(d.functionResolver.thisArg,$)};var Xe=new Object;Xe.equals=function(d,I){return d.equals(I)},Xe.notequal=function(d,I){return d.notequal(I)},Xe.lessthan=function(d,I){return d.lessthan(I)},Xe.greaterthan=function(d,I){return d.greaterthan(I)},Xe.lessthanorequal=function(d,I){return d.lessthanorequal(I)},Xe.greaterthanorequal=function(d,I){return d.greaterthanorequal(I)},Re.prototype=new b,Re.prototype.constructor=Re,Re.superclass=b.prototype;function Re(d){arguments.length>0&&this.init(d)}o(Re,"XString"),Re.prototype.init=function(d){this.str=String(d)},Re.prototype.toString=function(){return this.str},Re.prototype.evaluate=function(d){return this},Re.prototype.string=function(){return this},Re.prototype.number=function(){return new Ce(this.str)},Re.prototype.bool=function(){return new Fe(this.str)},Re.prototype.nodeset=function(){throw new Error("Cannot convert string to nodeset")},Re.prototype.stringValue=function(){return this.str},Re.prototype.numberValue=function(){return this.number().numberValue()},Re.prototype.booleanValue=function(){return this.bool().booleanValue()},Re.prototype.equals=function(d){return Ze.instance_of(d,Fe)?this.bool().equals(d):Ze.instance_of(d,Ce)?this.number().equals(d):Ze.instance_of(d,Ge)?d.compareWithString(this,Xe.equals):new Fe(this.str==d.str)},Re.prototype.notequal=function(d){return Ze.instance_of(d,Fe)?this.bool().notequal(d):Ze.instance_of(d,Ce)?this.number().notequal(d):Ze.instance_of(d,Ge)?d.compareWithString(this,Xe.notequal):new Fe(this.str!=d.str)},Re.prototype.lessthan=function(d){return this.number().lessthan(d)},Re.prototype.greaterthan=function(d){return this.number().greaterthan(d)},Re.prototype.lessthanorequal=function(d){return this.number().lessthanorequal(d)},Re.prototype.greaterthanorequal=function(d){return this.number().greaterthanorequal(d)},Ce.prototype=new b,Ce.prototype.constructor=Ce,Ce.superclass=b.prototype;function Ce(d){arguments.length>0&&this.init(d)}o(Ce,"XNumber"),Ce.prototype.init=function(d){this.num=typeof d=="string"?this.parse(d):Number(d)},Ce.prototype.numberFormat=/^\s*-?[0-9]*\.?[0-9]+\s*$/,Ce.prototype.parse=function(d){return this.numberFormat.test(d)?parseFloat(d):Number.NaN};function lt(d){for(var I=d.split("e-"),$=I[0].replace(".",""),re=Number(I[1]),ae=0;ae<re-1;ae+=1)$="0"+$;return"0."+$}o(lt,"padSmallNumber");function sr(d){for(var I=d.split("e"),$=I[0].replace(".",""),re=Number(I[1]),ae=re+1-$.length,X=0;X<ae;X+=1)$+="0";return $}o(sr,"padLargeNumber"),Ce.prototype.toString=function(){var d=this.num.toString();return d.indexOf("e-")!==-1?lt(d):d.indexOf("e")!==-1?sr(d):d},Ce.prototype.evaluate=function(d){return this},Ce.prototype.string=function(){return new Re(this.toString())},Ce.prototype.number=function(){return this},Ce.prototype.bool=function(){return new Fe(this.num)},Ce.prototype.nodeset=function(){throw new Error("Cannot convert number to nodeset")},Ce.prototype.stringValue=function(){return this.string().stringValue()},Ce.prototype.numberValue=function(){return this.num},Ce.prototype.booleanValue=function(){return this.bool().booleanValue()},Ce.prototype.negate=function(){return new Ce(-this.num)},Ce.prototype.equals=function(d){return Ze.instance_of(d,Fe)?this.bool().equals(d):Ze.instance_of(d,Re)?this.equals(d.number()):Ze.instance_of(d,Ge)?d.compareWithNumber(this,Xe.equals):new Fe(this.num==d.num)},Ce.prototype.notequal=function(d){return Ze.instance_of(d,Fe)?this.bool().notequal(d):Ze.instance_of(d,Re)?this.notequal(d.number()):Ze.instance_of(d,Ge)?d.compareWithNumber(this,Xe.notequal):new Fe(this.num!=d.num)},Ce.prototype.lessthan=function(d){return Ze.instance_of(d,Ge)?d.compareWithNumber(this,Xe.greaterthan):Ze.instance_of(d,Fe)||Ze.instance_of(d,Re)?this.lessthan(d.number()):new Fe(this.num<d.num)},Ce.prototype.greaterthan=function(d){return Ze.instance_of(d,Ge)?d.compareWithNumber(this,Xe.lessthan):Ze.instance_of(d,Fe)||Ze.instance_of(d,Re)?this.greaterthan(d.number()):new Fe(this.num>d.num)},Ce.prototype.lessthanorequal=function(d){return Ze.instance_of(d,Ge)?d.compareWithNumber(this,Xe.greaterthanorequal):Ze.instance_of(d,Fe)||Ze.instance_of(d,Re)?this.lessthanorequal(d.number()):new Fe(this.num<=d.num)},Ce.prototype.greaterthanorequal=function(d){return Ze.instance_of(d,Ge)?d.compareWithNumber(this,Xe.lessthanorequal):Ze.instance_of(d,Fe)||Ze.instance_of(d,Re)?this.greaterthanorequal(d.number()):new Fe(this.num>=d.num)},Ce.prototype.plus=function(d){return new Ce(this.num+d.num)},Ce.prototype.minus=function(d){return new Ce(this.num-d.num)},Ce.prototype.multiply=function(d){return new Ce(this.num*d.num)},Ce.prototype.div=function(d){return new Ce(this.num/d.num)},Ce.prototype.mod=function(d){return new Ce(this.num%d.num)},Fe.prototype=new b,Fe.prototype.constructor=Fe,Fe.superclass=b.prototype;function Fe(d){arguments.length>0&&this.init(d)}o(Fe,"XBoolean"),Fe.prototype.init=function(d){this.b=!!d},Fe.prototype.toString=function(){return this.b.toString()},Fe.prototype.evaluate=function(d){return this},Fe.prototype.string=function(){return new Re(this.b)},Fe.prototype.number=function(){return new Ce(this.b)},Fe.prototype.bool=function(){return this},Fe.prototype.nodeset=function(){throw new Error("Cannot convert boolean to nodeset")},Fe.prototype.stringValue=function(){return this.string().stringValue()},Fe.prototype.numberValue=function(){return this.number().numberValue()},Fe.prototype.booleanValue=function(){return this.b},Fe.prototype.not=function(){return new Fe(!this.b)},Fe.prototype.equals=function(d){return Ze.instance_of(d,Re)||Ze.instance_of(d,Ce)?this.equals(d.bool()):Ze.instance_of(d,Ge)?d.compareWithBoolean(this,Xe.equals):new Fe(this.b==d.b)},Fe.prototype.notequal=function(d){return Ze.instance_of(d,Re)||Ze.instance_of(d,Ce)?this.notequal(d.bool()):Ze.instance_of(d,Ge)?d.compareWithBoolean(this,Xe.notequal):new Fe(this.b!=d.b)},Fe.prototype.lessthan=function(d){return this.number().lessthan(d)},Fe.prototype.greaterthan=function(d){return this.number().greaterthan(d)},Fe.prototype.lessthanorequal=function(d){return this.number().lessthanorequal(d)},Fe.prototype.greaterthanorequal=function(d){return this.number().greaterthanorequal(d)},Fe.true_=new Fe(!0),Fe.false_=new Fe(!1),ir.prototype=new Object,ir.prototype.constructor=ir,ir.superclass=Object.prototype;function ir(d){this.init(d)}o(ir,"AVLTree"),ir.prototype.init=function(d){this.left=null,this.right=null,this.node=d,this.depth=1},ir.prototype.balance=function(){var d=this.left==null?0:this.left.depth,I=this.right==null?0:this.right.depth;if(d>I+1){var $=this.left.left==null?0:this.left.left.depth,re=this.left.right==null?0:this.left.right.depth;$<re&&this.left.rotateRR(),this.rotateLL()}else if(d+1<I){var ae=this.right.right==null?0:this.right.right.depth,X=this.right.left==null?0:this.right.left.depth;X>ae&&this.right.rotateLL(),this.rotateRR()}},ir.prototype.rotateLL=function(){var d=this.node,I=this.right;this.node=this.left.node,this.right=this.left,this.left=this.left.left,this.right.left=this.right.right,this.right.right=I,this.right.node=d,this.right.updateInNewLocation(),this.updateInNewLocation()},ir.prototype.rotateRR=function(){var d=this.node,I=this.left;this.node=this.right.node,this.left=this.right,this.right=this.right.right,this.left.right=this.left.left,this.left.left=I,this.left.node=d,this.left.updateInNewLocation(),this.updateInNewLocation()},ir.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},ir.prototype.getDepthFromChildren=function(){this.depth=this.node==null?0:1,this.left!=null&&(this.depth=this.left.depth+1),this.right!=null&&this.depth<=this.right.depth&&(this.depth=this.right.depth+1)};function Zs(d,I){if(d===I)return 0;if(d.compareDocumentPosition){var $=d.compareDocumentPosition(I);return $&1||$&10?1:$&20?-1:0}for(var re=0,ae=0,X=d;X!=null;X=X.parentNode||X.ownerElement)re++;for(var nt=I;nt!=null;nt=nt.parentNode||nt.ownerElement)ae++;if(re>ae){for(;re>ae;)d=d.parentNode||d.ownerElement,re--;if(d===I)return 1}else if(ae>re){for(;ae>re;)I=I.parentNode||I.ownerElement,ae--;if(d===I)return-1}for(var Lt=d.parentNode||d.ownerElement,zt=I.parentNode||I.ownerElement;Lt!==zt;)d=Lt,I=zt,Lt=d.parentNode||d.ownerElement,zt=I.parentNode||I.ownerElement;var et=Ze.isAttribute(d),Bt=Ze.isAttribute(I);if(et&&!Bt)return-1;if(!et&&Bt)return 1;if(Lt)for(var qn=et?Lt.attributes:Lt.childNodes,yi=qn.length,fr=0;fr<yi;fr+=1){var Ta=qn[fr];if(Ta===d)return-1;if(Ta===I)return 1}throw new Error("Unexpected: could not determine node order")}o(Zs,"nodeOrder"),ir.prototype.add=function(d){if(d===this.node)return!1;var I=Zs(d,this.node),$=!1;return I==-1?this.left==null?(this.left=new ir(d),$=!0):($=this.left.add(d),$&&this.balance()):I==1&&(this.right==null?(this.right=new ir(d),$=!0):($=this.right.add(d),$&&this.balance())),$&&this.getDepthFromChildren(),$},Ge.prototype=new b,Ge.prototype.constructor=Ge,Ge.superclass=b.prototype;function Ge(){this.init()}o(Ge,"XNodeSet"),Ge.prototype.init=function(){this.tree=null,this.nodes=[],this.size=0},Ge.prototype.toString=function(){var d=this.first();return d==null?"":this.stringForNode(d)},Ge.prototype.evaluate=function(d){return this},Ge.prototype.string=function(){return new Re(this.toString())},Ge.prototype.stringValue=function(){return this.toString()},Ge.prototype.number=function(){return new Ce(this.string())},Ge.prototype.numberValue=function(){return Number(this.string())},Ge.prototype.bool=function(){return new Fe(this.booleanValue())},Ge.prototype.booleanValue=function(){return!!this.size},Ge.prototype.nodeset=function(){return this},Ge.prototype.stringForNode=function(d){return d.nodeType==w.DOCUMENT_NODE||d.nodeType==w.ELEMENT_NODE||d.nodeType===w.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(d):d.nodeType===w.ATTRIBUTE_NODE?d.value||d.nodeValue:d.isNamespaceNode?d.namespace:d.nodeValue},Ge.prototype.stringForContainerNode=function(d){for(var I="",$=d.firstChild;$!=null;$=$.nextSibling){var re=$.nodeType;(re===1||re===3||re===4||re===9||re===11)&&(I+=this.stringForNode($))}return I},Ge.prototype.buildTree=function(){if(!this.tree&&this.nodes.length){this.tree=new ir(this.nodes[0]);for(var d=1;d<this.nodes.length;d+=1)this.tree.add(this.nodes[d])}return this.tree},Ge.prototype.first=function(){var d=this.buildTree();if(d==null)return null;for(;d.left!=null;)d=d.left;return d.node},Ge.prototype.add=function(d){for(var I=0;I<this.nodes.length;I+=1)if(d===this.nodes[I])return;this.tree=null,this.nodes.push(d),this.size+=1},Ge.prototype.addArray=function(d){var I=this;t(function($){I.add($)},d)},Ge.prototype.toArray=function(){var d=[];return this.toArrayRec(this.buildTree(),d),d},Ge.prototype.toArrayRec=function(d,I){d!=null&&(this.toArrayRec(d.left,I),I.push(d.node),this.toArrayRec(d.right,I))},Ge.prototype.toUnsortedArray=function(){return this.nodes.slice()},Ge.prototype.compareWithString=function(d,I){for(var $=this.toUnsortedArray(),re=0;re<$.length;re++){var ae=$[re],X=new Re(this.stringForNode(ae)),nt=I(X,d);if(nt.booleanValue())return nt}return new Fe(!1)},Ge.prototype.compareWithNumber=function(d,I){for(var $=this.toUnsortedArray(),re=0;re<$.length;re++){var ae=$[re],X=new Ce(this.stringForNode(ae)),nt=I(X,d);if(nt.booleanValue())return nt}return new Fe(!1)},Ge.prototype.compareWithBoolean=function(d,I){return I(this.bool(),d)},Ge.prototype.compareWithNodeSet=function(d,I){for(var $=this.toUnsortedArray(),re=o(function(Lt,zt){return I(zt,Lt)},"oInvert"),ae=0;ae<$.length;ae++){var X=new Re(this.stringForNode($[ae])),nt=d.compareWithString(X,re);if(nt.booleanValue())return nt}return new Fe(!1)},Ge.compareWith=e(function(d,I){return Ze.instance_of(I,Re)?this.compareWithString(I,d):Ze.instance_of(I,Ce)?this.compareWithNumber(I,d):Ze.instance_of(I,Fe)?this.compareWithBoolean(I,d):this.compareWithNodeSet(I,d)}),Ge.prototype.equals=Ge.compareWith(Xe.equals),Ge.prototype.notequal=Ge.compareWith(Xe.notequal),Ge.prototype.lessthan=Ge.compareWith(Xe.lessthan),Ge.prototype.greaterthan=Ge.compareWith(Xe.greaterthan),Ge.prototype.lessthanorequal=Ge.compareWith(Xe.lessthanorequal),Ge.prototype.greaterthanorequal=Ge.compareWith(Xe.greaterthanorequal),Ge.prototype.union=function(d){var I=new Ge;return I.addArray(this.toUnsortedArray()),I.addArray(d.toUnsortedArray()),I},Hr.prototype=new Object,Hr.prototype.constructor=Hr,Hr.superclass=Object.prototype;function Hr(d,I,$){this.isXPathNamespace=!0,this.ownerDocument=$.ownerDocument,this.nodeName="#namespace",this.prefix=d,this.localName=d,this.namespaceURI=I,this.nodeValue=I,this.ownerElement=$,this.nodeType=Hr.XPATH_NAMESPACE_NODE}o(Hr,"XPathNamespace"),Hr.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},gn.prototype=new Object,gn.prototype.constructor=gn,gn.superclass=Object.prototype;function gn(d,I,$){this.variableResolver=d??new rs,this.namespaceResolver=I??new gs,this.functionResolver=$??new Is}o(gn,"XPathContext"),gn.prototype.extend=function(d){return v(new gn,this,d)},rs.prototype=new Object,rs.prototype.constructor=rs,rs.superclass=Object.prototype;function rs(){}o(rs,"VariableResolver"),rs.prototype.getVariable=function(d,I){return null},Is.prototype=new Object,Is.prototype.constructor=Is,Is.superclass=Object.prototype;function Is(d){this.thisArg=d??pt,this.functions=new Object,this.addStandardFunctions()}o(Is,"FunctionResolver"),Is.prototype.addStandardFunctions=function(){this.functions["{}last"]=pt.last,this.functions["{}position"]=pt.position,this.functions["{}count"]=pt.count,this.functions["{}id"]=pt.id,this.functions["{}local-name"]=pt.localName,this.functions["{}namespace-uri"]=pt.namespaceURI,this.functions["{}name"]=pt.name,this.functions["{}string"]=pt.string,this.functions["{}concat"]=pt.concat,this.functions["{}starts-with"]=pt.startsWith,this.functions["{}contains"]=pt.contains,this.functions["{}substring-before"]=pt.substringBefore,this.functions["{}substring-after"]=pt.substringAfter,this.functions["{}substring"]=pt.substring,this.functions["{}string-length"]=pt.stringLength,this.functions["{}normalize-space"]=pt.normalizeSpace,this.functions["{}translate"]=pt.translate,this.functions["{}boolean"]=pt.boolean_,this.functions["{}not"]=pt.not,this.functions["{}true"]=pt.true_,this.functions["{}false"]=pt.false_,this.functions["{}lang"]=pt.lang,this.functions["{}number"]=pt.number,this.functions["{}sum"]=pt.sum,this.functions["{}floor"]=pt.floor,this.functions["{}ceiling"]=pt.ceiling,this.functions["{}round"]=pt.round},Is.prototype.addFunction=function(d,I,$){this.functions["{"+d+"}"+I]=$},Is.getFunctionFromContext=function(d,I){var $=Ze.resolveQName(d,I.namespaceResolver,I.contextNode,!1);if($[0]===null)throw new Error("Cannot resolve QName "+name);return I.functionResolver.getFunction($[1],$[0])},Is.prototype.getFunction=function(d,I){return this.functions["{"+I+"}"+d]},gs.prototype=new Object,gs.prototype.constructor=gs,gs.superclass=Object.prototype;function gs(){}o(gs,"NamespaceResolver"),gs.prototype.getNamespace=function(d,I){if(d=="xml")return A.XML_NAMESPACE_URI;if(d=="xmlns")return A.XMLNS_NAMESPACE_URI;for(I.nodeType==w.DOCUMENT_NODE?I=I.documentElement:I.nodeType==w.ATTRIBUTE_NODE?I=xe.getOwnerElement(I):I.nodeType!=w.ELEMENT_NODE&&(I=I.parentNode);I!=null&&I.nodeType==w.ELEMENT_NODE;){for(var $=I.attributes,re=0;re<$.length;re++){var ae=$.item(re),X=ae.name||ae.nodeName;if(X==="xmlns"&&d===""||X==="xmlns:"+d)return String(ae.value||ae.nodeValue)}I=I.parentNode}return null};var pt=new Object;pt.last=function(d){if(arguments.length!=1)throw new Error("Function last expects ()");return new Ce(d.contextSize)},pt.position=function(d){if(arguments.length!=1)throw new Error("Function position expects ()");return new Ce(d.contextPosition)},pt.count=function(){var d=arguments[0],I;if(arguments.length!=2||!Ze.instance_of(I=arguments[1].evaluate(d),Ge))throw new Error("Function count expects (node-set)");return new Ce(I.size)},pt.id=function(){var d=arguments[0],I;if(arguments.length!=2)throw new Error("Function id expects (object)");I=arguments[1].evaluate(d),Ze.instance_of(I,Ge)?I=I.toArray().join(" "):I=I.stringValue();for(var $=I.split(/[\x0d\x0a\x09\x20]+/),re=0,ae=new Ge,X=d.contextNode.nodeType==w.DOCUMENT_NODE?d.contextNode:d.contextNode.ownerDocument,nt=0;nt<$.length;nt++){var Lt;X.getElementById?Lt=X.getElementById($[nt]):Lt=Ze.getElementById(X,$[nt]),Lt!=null&&(ae.add(Lt),re++)}return ae},pt.localName=function(d,I){var $;if(arguments.length==1)$=d.contextNode;else if(arguments.length==2)$=I.evaluate(d).first();else throw new Error("Function local-name expects (node-set?)");return $==null?new Re(""):new Re($.localName||$.baseName||$.target||$.nodeName||"")},pt.namespaceURI=function(){var d=arguments[0],I;if(arguments.length==1)I=d.contextNode;else if(arguments.length==2)I=arguments[1].evaluate(d).first();else throw new Error("Function namespace-uri expects (node-set?)");return I==null?new Re(""):new Re(I.namespaceURI)},pt.name=function(){var d=arguments[0],I;if(arguments.length==1)I=d.contextNode;else if(arguments.length==2)I=arguments[1].evaluate(d).first();else throw new Error("Function name expects (node-set?)");return I==null?new Re(""):I.nodeType==w.ELEMENT_NODE?new Re(I.nodeName):I.nodeType==w.ATTRIBUTE_NODE?new Re(I.name||I.nodeName):I.nodeType===w.PROCESSING_INSTRUCTION_NODE?new Re(I.target||I.nodeName):I.localName==null?new Re(""):new Re(I.localName)},pt.string=function(){var d=arguments[0];if(arguments.length==1)return new Re(Ge.prototype.stringForNode(d.contextNode));if(arguments.length==2)return arguments[1].evaluate(d).string();throw new Error("Function string expects (object?)")},pt.concat=function(d){if(arguments.length<3)throw new Error("Function concat expects (string, string[, string]*)");for(var I="",$=1;$<arguments.length;$++)I+=arguments[$].evaluate(d).stringValue();return new Re(I)},pt.startsWith=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function startsWith expects (string, string)");var I=arguments[1].evaluate(d).stringValue(),$=arguments[2].evaluate(d).stringValue();return new Fe(I.substring(0,$.length)==$)},pt.contains=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function contains expects (string, string)");var I=arguments[1].evaluate(d).stringValue(),$=arguments[2].evaluate(d).stringValue();return new Fe(I.indexOf($)!==-1)},pt.substringBefore=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function substring-before expects (string, string)");var I=arguments[1].evaluate(d).stringValue(),$=arguments[2].evaluate(d).stringValue();return new Re(I.substring(0,I.indexOf($)))},pt.substringAfter=function(){var d=arguments[0];if(arguments.length!=3)throw new Error("Function substring-after expects (string, string)");var I=arguments[1].evaluate(d).stringValue(),$=arguments[2].evaluate(d).stringValue();if($.length==0)return new Re(I);var re=I.indexOf($);return re==-1?new Re(""):new Re(I.substring(re+$.length))},pt.substring=function(){var d=arguments[0];if(!(arguments.length==3||arguments.length==4))throw new Error("Function substring expects (string, number, number?)");var I=arguments[1].evaluate(d).stringValue(),$=Math.round(arguments[2].evaluate(d).numberValue())-1,re=arguments.length==4?$+Math.round(arguments[3].evaluate(d).numberValue()):void 0;return new Re(I.substring($,re))},pt.stringLength=function(){var d=arguments[0],I;if(arguments.length==1)I=Ge.prototype.stringForNode(d.contextNode);else if(arguments.length==2)I=arguments[1].evaluate(d).stringValue();else throw new Error("Function string-length expects (string?)");return new Ce(I.length)},pt.normalizeSpace=function(){var d=arguments[0],I;if(arguments.length==1)I=Ge.prototype.stringForNode(d.contextNode);else if(arguments.length==2)I=arguments[1].evaluate(d).stringValue();else throw new Error("Function normalize-space expects (string?)");for(var $=0,re=I.length-1;Ze.isSpace(I.charCodeAt(re));)re--;for(var ae="";$<=re&&Ze.isSpace(I.charCodeAt($));)$++;for(;$<=re;)if(Ze.isSpace(I.charCodeAt($)))for(ae+=" ";$<=re&&Ze.isSpace(I.charCodeAt($));)$++;else ae+=I.charAt($),$++;return new Re(ae)},pt.translate=function(d,I,$,re){if(arguments.length!=4)throw new Error("Function translate expects (string, string, string)");var ae=I.evaluate(d).stringValue(),X=$.evaluate(d).stringValue(),nt=re.evaluate(d).stringValue(),Lt=n(function(et,Bt,qn){return Bt in et||(et[Bt]=qn>nt.length?"":nt[qn]),et},{},X),zt=f("",s(function(et){return et in Lt?Lt[et]:et},ae));return new Re(zt)},pt.boolean_=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function boolean expects (object)");return arguments[1].evaluate(d).bool()},pt.not=function(d,I){if(arguments.length!=2)throw new Error("Function not expects (object)");return I.evaluate(d).bool().not()},pt.true_=function(){if(arguments.length!=1)throw new Error("Function true expects ()");return Fe.true_},pt.false_=function(){if(arguments.length!=1)throw new Error("Function false expects ()");return Fe.false_},pt.lang=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function lang expects (string)");for(var I,$=d.contextNode;$!=null&&$.nodeType!=w.DOCUMENT_NODE;$=$.parentNode){var re=$.getAttributeNS(A.XML_NAMESPACE_URI,"lang");if(re!=null){I=String(re);break}}if(I==null)return Fe.false_;var ae=arguments[1].evaluate(d).stringValue();return new Fe(I.substring(0,ae.length)==ae&&(I.length==ae.length||I.charAt(ae.length)=="-"))},pt.number=function(){var d=arguments[0];if(!(arguments.length==1||arguments.length==2))throw new Error("Function number expects (object?)");return arguments.length==1?new Ce(Ge.prototype.stringForNode(d.contextNode)):arguments[1].evaluate(d).number()},pt.sum=function(){var d=arguments[0],I;if(arguments.length!=2||!Ze.instance_of(I=arguments[1].evaluate(d),Ge))throw new Error("Function sum expects (node-set)");I=I.toUnsortedArray();for(var $=0,re=0;re<I.length;re++)$+=new Ce(Ge.prototype.stringForNode(I[re])).numberValue();return new Ce($)},pt.floor=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function floor expects (number)");return new Ce(Math.floor(arguments[1].evaluate(d).numberValue()))},pt.ceiling=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function ceiling expects (number)");return new Ce(Math.ceil(arguments[1].evaluate(d).numberValue()))},pt.round=function(){var d=arguments[0];if(arguments.length!=2)throw new Error("Function round expects (number)");return new Ce(Math.round(arguments[1].evaluate(d).numberValue()))};var Ze=new Object;Ze.isAttribute=function(d){return d&&(d.nodeType===w.ATTRIBUTE_NODE||d.ownerElement)},Ze.splitQName=function(d){var I=d.indexOf(":");return I==-1?[null,d]:[d.substring(0,I),d.substring(I+1)]},Ze.resolveQName=function(d,I,$,re){var ae=Ze.splitQName(d);return ae[0]!=null?ae[0]=I.getNamespace(ae[0],$):re?(ae[0]=I.getNamespace("",$),ae[0]==null&&(ae[0]="")):ae[0]="",ae},Ze.isSpace=function(d){return d==9||d==13||d==10||d==32},Ze.isLetter=function(d){return d>=65&&d<=90||d>=97&&d<=122||d>=192&&d<=214||d>=216&&d<=246||d>=248&&d<=255||d>=256&&d<=305||d>=308&&d<=318||d>=321&&d<=328||d>=330&&d<=382||d>=384&&d<=451||d>=461&&d<=496||d>=500&&d<=501||d>=506&&d<=535||d>=592&&d<=680||d>=699&&d<=705||d==902||d>=904&&d<=906||d==908||d>=910&&d<=929||d>=931&&d<=974||d>=976&&d<=982||d==986||d==988||d==990||d==992||d>=994&&d<=1011||d>=1025&&d<=1036||d>=1038&&d<=1103||d>=1105&&d<=1116||d>=1118&&d<=1153||d>=1168&&d<=1220||d>=1223&&d<=1224||d>=1227&&d<=1228||d>=1232&&d<=1259||d>=1262&&d<=1269||d>=1272&&d<=1273||d>=1329&&d<=1366||d==1369||d>=1377&&d<=1414||d>=1488&&d<=1514||d>=1520&&d<=1522||d>=1569&&d<=1594||d>=1601&&d<=1610||d>=1649&&d<=1719||d>=1722&&d<=1726||d>=1728&&d<=1742||d>=1744&&d<=1747||d==1749||d>=1765&&d<=1766||d>=2309&&d<=2361||d==2365||d>=2392&&d<=2401||d>=2437&&d<=2444||d>=2447&&d<=2448||d>=2451&&d<=2472||d>=2474&&d<=2480||d==2482||d>=2486&&d<=2489||d>=2524&&d<=2525||d>=2527&&d<=2529||d>=2544&&d<=2545||d>=2565&&d<=2570||d>=2575&&d<=2576||d>=2579&&d<=2600||d>=2602&&d<=2608||d>=2610&&d<=2611||d>=2613&&d<=2614||d>=2616&&d<=2617||d>=2649&&d<=2652||d==2654||d>=2674&&d<=2676||d>=2693&&d<=2699||d==2701||d>=2703&&d<=2705||d>=2707&&d<=2728||d>=2730&&d<=2736||d>=2738&&d<=2739||d>=2741&&d<=2745||d==2749||d==2784||d>=2821&&d<=2828||d>=2831&&d<=2832||d>=2835&&d<=2856||d>=2858&&d<=2864||d>=2866&&d<=2867||d>=2870&&d<=2873||d==2877||d>=2908&&d<=2909||d>=2911&&d<=2913||d>=2949&&d<=2954||d>=2958&&d<=2960||d>=2962&&d<=2965||d>=2969&&d<=2970||d==2972||d>=2974&&d<=2975||d>=2979&&d<=2980||d>=2984&&d<=2986||d>=2990&&d<=2997||d>=2999&&d<=3001||d>=3077&&d<=3084||d>=3086&&d<=3088||d>=3090&&d<=3112||d>=3114&&d<=3123||d>=3125&&d<=3129||d>=3168&&d<=3169||d>=3205&&d<=3212||d>=3214&&d<=3216||d>=3218&&d<=3240||d>=3242&&d<=3251||d>=3253&&d<=3257||d==3294||d>=3296&&d<=3297||d>=3333&&d<=3340||d>=3342&&d<=3344||d>=3346&&d<=3368||d>=3370&&d<=3385||d>=3424&&d<=3425||d>=3585&&d<=3630||d==3632||d>=3634&&d<=3635||d>=3648&&d<=3653||d>=3713&&d<=3714||d==3716||d>=3719&&d<=3720||d==3722||d==3725||d>=3732&&d<=3735||d>=3737&&d<=3743||d>=3745&&d<=3747||d==3749||d==3751||d>=3754&&d<=3755||d>=3757&&d<=3758||d==3760||d>=3762&&d<=3763||d==3773||d>=3776&&d<=3780||d>=3904&&d<=3911||d>=3913&&d<=3945||d>=4256&&d<=4293||d>=4304&&d<=4342||d==4352||d>=4354&&d<=4355||d>=4357&&d<=4359||d==4361||d>=4363&&d<=4364||d>=4366&&d<=4370||d==4412||d==4414||d==4416||d==4428||d==4430||d==4432||d>=4436&&d<=4437||d==4441||d>=4447&&d<=4449||d==4451||d==4453||d==4455||d==4457||d>=4461&&d<=4462||d>=4466&&d<=4467||d==4469||d==4510||d==4520||d==4523||d>=4526&&d<=4527||d>=4535&&d<=4536||d==4538||d>=4540&&d<=4546||d==4587||d==4592||d==4601||d>=7680&&d<=7835||d>=7840&&d<=7929||d>=7936&&d<=7957||d>=7960&&d<=7965||d>=7968&&d<=8005||d>=8008&&d<=8013||d>=8016&&d<=8023||d==8025||d==8027||d==8029||d>=8031&&d<=8061||d>=8064&&d<=8116||d>=8118&&d<=8124||d==8126||d>=8130&&d<=8132||d>=8134&&d<=8140||d>=8144&&d<=8147||d>=8150&&d<=8155||d>=8160&&d<=8172||d>=8178&&d<=8180||d>=8182&&d<=8188||d==8486||d>=8490&&d<=8491||d==8494||d>=8576&&d<=8578||d>=12353&&d<=12436||d>=12449&&d<=12538||d>=12549&&d<=12588||d>=44032&&d<=55203||d>=19968&&d<=40869||d==12295||d>=12321&&d<=12329},Ze.isNCNameChar=function(d){return d>=48&&d<=57||d>=1632&&d<=1641||d>=1776&&d<=1785||d>=2406&&d<=2415||d>=2534&&d<=2543||d>=2662&&d<=2671||d>=2790&&d<=2799||d>=2918&&d<=2927||d>=3047&&d<=3055||d>=3174&&d<=3183||d>=3302&&d<=3311||d>=3430&&d<=3439||d>=3664&&d<=3673||d>=3792&&d<=3801||d>=3872&&d<=3881||d==46||d==45||d==95||Ze.isLetter(d)||d>=768&&d<=837||d>=864&&d<=865||d>=1155&&d<=1158||d>=1425&&d<=1441||d>=1443&&d<=1465||d>=1467&&d<=1469||d==1471||d>=1473&&d<=1474||d==1476||d>=1611&&d<=1618||d==1648||d>=1750&&d<=1756||d>=1757&&d<=1759||d>=1760&&d<=1764||d>=1767&&d<=1768||d>=1770&&d<=1773||d>=2305&&d<=2307||d==2364||d>=2366&&d<=2380||d==2381||d>=2385&&d<=2388||d>=2402&&d<=2403||d>=2433&&d<=2435||d==2492||d==2494||d==2495||d>=2496&&d<=2500||d>=2503&&d<=2504||d>=2507&&d<=2509||d==2519||d>=2530&&d<=2531||d==2562||d==2620||d==2622||d==2623||d>=2624&&d<=2626||d>=2631&&d<=2632||d>=2635&&d<=2637||d>=2672&&d<=2673||d>=2689&&d<=2691||d==2748||d>=2750&&d<=2757||d>=2759&&d<=2761||d>=2763&&d<=2765||d>=2817&&d<=2819||d==2876||d>=2878&&d<=2883||d>=2887&&d<=2888||d>=2891&&d<=2893||d>=2902&&d<=2903||d>=2946&&d<=2947||d>=3006&&d<=3010||d>=3014&&d<=3016||d>=3018&&d<=3021||d==3031||d>=3073&&d<=3075||d>=3134&&d<=3140||d>=3142&&d<=3144||d>=3146&&d<=3149||d>=3157&&d<=3158||d>=3202&&d<=3203||d>=3262&&d<=3268||d>=3270&&d<=3272||d>=3274&&d<=3277||d>=3285&&d<=3286||d>=3330&&d<=3331||d>=3390&&d<=3395||d>=3398&&d<=3400||d>=3402&&d<=3405||d==3415||d==3633||d>=3636&&d<=3642||d>=3655&&d<=3662||d==3761||d>=3764&&d<=3769||d>=3771&&d<=3772||d>=3784&&d<=3789||d>=3864&&d<=3865||d==3893||d==3895||d==3897||d==3902||d==3903||d>=3953&&d<=3972||d>=3974&&d<=3979||d>=3984&&d<=3989||d==3991||d>=3993&&d<=4013||d>=4017&&d<=4023||d==4025||d>=8400&&d<=8412||d==8417||d>=12330&&d<=12335||d==12441||d==12442||d==183||d==720||d==721||d==903||d==1600||d==3654||d==3782||d==12293||d>=12337&&d<=12341||d>=12445&&d<=12446||d>=12540&&d<=12542},Ze.coalesceText=function(d){for(var I=d.firstChild;I!=null;I=I.nextSibling)if(I.nodeType==w.TEXT_NODE||I.nodeType==w.CDATA_SECTION_NODE){var $=I.nodeValue,re=I;for(I=I.nextSibling;I!=null&&(I.nodeType==w.TEXT_NODE||I.nodeType==w.CDATA_SECTION_NODE);){$+=I.nodeValue;var ae=I;I=I.nextSibling,ae.parentNode.removeChild(ae)}if(re.nodeType==w.CDATA_SECTION_NODE){var X=re.parentNode;if(re.nextSibling==null)X.removeChild(re),X.appendChild(X.ownerDocument.createTextNode($));else{var nt=re.nextSibling;X.removeChild(re),X.insertBefore(X.ownerDocument.createTextNode($),nt)}}else re.nodeValue=$;if(I==null)break}else I.nodeType==w.ELEMENT_NODE&&Ze.coalesceText(I)},Ze.instance_of=function(d,I){for(;d!=null;){if(d.constructor===I)return!0;if(d===Object)return!1;d=d.constructor.superclass}return!1},Ze.getElementById=function(d,I){if(d.nodeType==w.ELEMENT_NODE&&(d.getAttribute("id")==I||d.getAttributeNS(null,"id")==I))return d;for(var $=d.firstChild;$!=null;$=$.nextSibling){var re=Ze.getElementById($,I);if(re!=null)return re}return null};var Mn=(function(){function d($,re){var ae=re?": "+re.toString():"";switch($){case I.INVALID_EXPRESSION_ERR:return"Invalid expression"+ae;case I.TYPE_ERR:return"Type error"+ae}return null}o(d,"getMessage");function I($,re,ae){var X=Error.call(this,d($,re)||ae);return X.code=$,X.exception=re,X}return o(I,"XPathException"),I.prototype=Object.create(Error.prototype),I.prototype.constructor=I,I.superclass=Error,I.prototype.toString=function(){return this.message},I.fromMessage=function($,re){return new I(null,re,$)},I.INVALID_EXPRESSION_ERR=51,I.TYPE_ERR=52,I})();vs.prototype={},vs.prototype.constructor=vs,vs.superclass=Object.prototype;function vs(d,I,$){this.xpath=$.parse(d),this.context=new gn,this.context.namespaceResolver=new Ca(I)}o(vs,"XPathExpression"),vs.getOwnerDocument=function(d){return d.nodeType===w.DOCUMENT_NODE?d:d.ownerDocument},vs.detectHtmlDom=function(d){if(!d)return!1;var I=vs.getOwnerDocument(d);try{return I.implementation.hasFeature("HTML","2.0")}catch{return!0}},vs.prototype.evaluate=function(d,I,$){this.context.expressionContextNode=d,this.context.caseInsensitive=vs.detectHtmlDom(d);var re=this.xpath.evaluate(this.context);return new Rt(re,I)},Ca.prototype={},Ca.prototype.constructor=Ca,Ca.superclass=Object.prototype;function Ca(d){this.xpathNSResolver=d}o(Ca,"XPathNSResolverWrapper"),Ca.prototype.getNamespace=function(d,I){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(d)},Na.prototype={},Na.prototype.constructor=Na,Na.superclass=Object.prototype;function Na(d){this.node=d,this.namespaceResolver=new gs}o(Na,"NodeXPathNSResolver"),Na.prototype.lookupNamespaceURI=function(d){return this.namespaceResolver.getNamespace(d,this.node)},Rt.prototype={},Rt.prototype.constructor=Rt,Rt.superclass=Object.prototype;function Rt(d,I){switch(I==Rt.ANY_TYPE&&(d.constructor===Re?I=Rt.STRING_TYPE:d.constructor===Ce?I=Rt.NUMBER_TYPE:d.constructor===Fe?I=Rt.BOOLEAN_TYPE:d.constructor===Ge&&(I=Rt.UNORDERED_NODE_ITERATOR_TYPE)),this.resultType=I,I){case Rt.NUMBER_TYPE:this.numberValue=d.numberValue();return;case Rt.STRING_TYPE:this.stringValue=d.stringValue();return;case Rt.BOOLEAN_TYPE:this.booleanValue=d.booleanValue();return;case Rt.ANY_UNORDERED_NODE_TYPE:case Rt.FIRST_ORDERED_NODE_TYPE:if(d.constructor===Ge){this.singleNodeValue=d.first();return}break;case Rt.UNORDERED_NODE_ITERATOR_TYPE:case Rt.ORDERED_NODE_ITERATOR_TYPE:if(d.constructor===Ge){this.invalidIteratorState=!1,this.nodes=d.toArray(),this.iteratorIndex=0;return}break;case Rt.UNORDERED_NODE_SNAPSHOT_TYPE:case Rt.ORDERED_NODE_SNAPSHOT_TYPE:if(d.constructor===Ge){this.nodes=d.toArray(),this.snapshotLength=this.nodes.length;return}break}throw new Mn(Mn.TYPE_ERR)}o(Rt,"XPathResult"),Rt.prototype.iterateNext=function(){if(this.resultType!=Rt.UNORDERED_NODE_ITERATOR_TYPE&&this.resultType!=Rt.ORDERED_NODE_ITERATOR_TYPE)throw new Mn(Mn.TYPE_ERR);return this.nodes[this.iteratorIndex++]},Rt.prototype.snapshotItem=function(d){if(this.resultType!=Rt.UNORDERED_NODE_SNAPSHOT_TYPE&&this.resultType!=Rt.ORDERED_NODE_SNAPSHOT_TYPE)throw new Mn(Mn.TYPE_ERR);return this.nodes[d]},Rt.ANY_TYPE=0,Rt.NUMBER_TYPE=1,Rt.STRING_TYPE=2,Rt.BOOLEAN_TYPE=3,Rt.UNORDERED_NODE_ITERATOR_TYPE=4,Rt.ORDERED_NODE_ITERATOR_TYPE=5,Rt.UNORDERED_NODE_SNAPSHOT_TYPE=6,Rt.ORDERED_NODE_SNAPSHOT_TYPE=7,Rt.ANY_UNORDERED_NODE_TYPE=8,Rt.FIRST_ORDERED_NODE_TYPE=9;function rp(d,I){d.createExpression=function($,re){try{return new vs($,re,I)}catch(ae){throw new Mn(Mn.INVALID_EXPRESSION_ERR,ae)}},d.createNSResolver=function($){return new Na($)},d.evaluate=function($,re,ae,X,nt){if(X<0||X>9)throw{code:0,toString:o(function(){return"Request type not supported"},"toString")};return d.createExpression($,ae,I).evaluate(re,X,nt)}}o(rp,"installDOM3XPathSupport");try{var np=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(np=!1)}catch{}np&&rp(document,new S)}catch{}rp(r,new S),(function(){var d=new S,I=new gs,$=new Is,re=new rs;function ae(qe){return{getNamespace:o(function(tr,ns){var Qi=qe(tr,ns);return Qi||I.getNamespace(tr,ns)},"getNamespace")}}o(ae,"makeNSResolverFromFunction");function X(qe){return ae(qe.getNamespace.bind(qe))}o(X,"makeNSResolverFromObject");function nt(qe){return ae(function(tr){return qe[tr]})}o(nt,"makeNSResolverFromMap");function Lt(qe){return qe&&typeof qe.getNamespace=="function"?X(qe):typeof qe=="function"?ae(qe):typeof qe=="object"?nt(qe):I}o(Lt,"makeNSResolver");function zt(qe){if(qe===null||typeof qe>"u"||qe instanceof Re||qe instanceof Fe||qe instanceof Ce||qe instanceof Ge)return qe;switch(typeof qe){case"string":return new Re(qe);case"boolean":return new Fe(qe);case"number":return new Ce(qe)}var tr=new Ge;return tr.addArray([].concat(qe)),tr}o(zt,"convertValue");function et(qe){return function(tr){var ns=Array.prototype.slice.call(arguments,1).map(function(oC){return oC.evaluate(tr)}),Qi=qe.apply(this,[].concat(tr,ns));return zt(Qi)}}o(et,"makeEvaluator");function Bt(qe){return{getFunction:o(function(tr,ns){var Qi=qe(tr,ns);return Qi?et(Qi):$.getFunction(tr,ns)},"getFunction")}}o(Bt,"makeFunctionResolverFromFunction");function qn(qe){return Bt(qe.getFunction.bind(qe))}o(qn,"makeFunctionResolverFromObject");function yi(qe){return Bt(function(tr){return qe[tr]})}o(yi,"makeFunctionResolverFromMap");function fr(qe){return qe&&typeof qe.getFunction=="function"?qn(qe):typeof qe=="function"?Bt(qe):typeof qe=="object"?yi(qe):$}o(fr,"makeFunctionResolver");function Ta(qe){return{getVariable:o(function(tr,ns){var Qi=qe(tr,ns);return zt(Qi)},"getVariable")}}o(Ta,"makeVariableResolverFromFunction");function X0(qe){if(qe){if(typeof qe.getVariable=="function")return Ta(qe.getVariable.bind(qe));if(typeof qe=="function")return Ta(qe);if(typeof qe=="object")return Ta(function(tr){return qe[tr]})}return re}o(X0,"makeVariableResolver");function jx(qe,tr,ns){qe in ns&&(tr[qe]=ns[qe])}o(jx,"copyIfPresent");function nC(qe){var tr=new gn;return qe?(tr.namespaceResolver=Lt(qe.namespaces),tr.functionResolver=fr(qe.functions),tr.variableResolver=X0(qe.variables),tr.expressionContextNode=qe.node,jx("allowAnyNamespaceForNoPrefix",tr,qe),jx("isHtml",tr,qe)):tr.namespaceResolver=I,tr}o(nC,"makeContext");function sC(qe,tr){var ns=nC(tr);return qe.evaluate(ns)}o(sC,"evaluate");var iC={evaluate:o(function(qe){return sC(this.expression,qe)},"evaluate"),evaluateNumber:o(function(qe){return this.evaluate(qe).numberValue()},"evaluateNumber"),evaluateString:o(function(qe){return this.evaluate(qe).stringValue()},"evaluateString"),evaluateBoolean:o(function(qe){return this.evaluate(qe).booleanValue()},"evaluateBoolean"),evaluateNodeSet:o(function(qe){return this.evaluate(qe).nodeset()},"evaluateNodeSet"),select:o(function(qe){return this.evaluateNodeSet(qe).toArray()},"select"),select1:o(function(qe){return this.select(qe)[0]},"select1")};function aC(qe){var tr=d.parse(qe);return Object.create(iC,{expression:{value:tr}})}o(aC,"parse"),r.parse=aC})(),v(r,{XPath:A,XPathParser:S,XPathResult:Rt,Step:P,PathExpr:xe,NodeTest:D,LocationPath:ct,OrOperation:M,AndOperation:R,BarOperation:Ae,EqualsOperation:q,NotEqualOperation:H,LessThanOperation:K,GreaterThanOperation:G,LessThanOrEqualOperation:pe,GreaterThanOrEqualOperation:le,PlusOperation:ue,MinusOperation:ee,MultiplyOperation:he,DivOperation:we,ModOperation:Ke,UnaryMinusOperation:C,FunctionCall:z,VariableReference:se,XPathContext:gn,XNodeSet:Ge,XBoolean:Fe,XString:Re,XNumber:Ce,NamespaceResolver:gs,FunctionResolver:Is,VariableResolver:rs,Utilities:Ze}),r.select=function(d,I,$){return r.selectWithResolver(d,I,null,$)},r.useNamespaces=function(d){var I={mappings:d||{},lookupNamespaceURI:o(function($){return this.mappings[$]},"lookupNamespaceURI")};return function($,re,ae){return r.selectWithResolver($,re,I,ae)}},r.selectWithResolver=function(d,I,$,re){var ae=new vs(d,$,new S),X=Rt.ANY_TYPE,nt=ae.evaluate(I,X,null);return nt.resultType==Rt.STRING_TYPE?nt=nt.stringValue:nt.resultType==Rt.NUMBER_TYPE?nt=nt.numberValue:nt.resultType==Rt.BOOLEAN_TYPE?nt=nt.booleanValue:(nt=nt.nodes,re&&(nt=nt[0])),nt},r.select1=function(d,I){return r.select(d,I,!0)};var Dl=o(function(d){return d&&typeof d.nodeType=="number"&&Number.isInteger(d.nodeType)&&d.nodeType>=1&&d.nodeType<=11&&typeof d.nodeName=="string"},"isNodeLike"),$0=o(function(d){return Array.isArray(d)&&d.every(Dl)},"isArrayOfNodes"),ei=o(function(d){return function(I){return Dl(I)&&I.nodeType===d}},"isNodeOfType");v(r,{isNodeLike:Dl,isArrayOfNodes:$0,isElement:ei(w.ELEMENT_NODE),isAttribute:ei(w.ATTRIBUTE_NODE),isTextNode:ei(w.TEXT_NODE),isCDATASection:ei(w.CDATA_SECTION_NODE),isProcessingInstruction:ei(w.PROCESSING_INSTRUCTION_NODE),isComment:ei(w.COMMENT_NODE),isDocumentNode:ei(w.DOCUMENT_NODE),isDocumentTypeNode:ei(w.DOCUMENT_TYPE_NODE),isDocumentFragment:ei(w.DOCUMENT_FRAGMENT_NODE)})})($le)});var sd=Q(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.assertIsDocumentFragmentNode=It.assertIsDocumentTypeNode=It.assertIsDocumentNode=It.assertIsCommentNode=It.assertIsProcessingInstructionNode=It.assertIsCDATASectionNode=It.assertIsTextNode=It.assertIsAttributeNode=It.assertIsElementNode=It.isDocumentFragmentNode=It.isDocumentTypeNode=It.isDocumentNode=It.isCommentNode=It.isProcessingInstructionNode=It.isCDATASectionNode=It.isTextNode=It.isAttributeNode=It.isElementNode=It.assertIsArrayOfNodes=It.isArrayOfNodes=It.assertIsNodeLike=It.isNodeLike=It.NodeTypes=void 0;var an;(function(r){r[r.ELEMENT_NODE=1]="ELEMENT_NODE",r[r.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",r[r.TEXT_NODE=3]="TEXT_NODE",r[r.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",r[r.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",r[r.COMMENT_NODE=8]="COMMENT_NODE",r[r.DOCUMENT_NODE=9]="DOCUMENT_NODE",r[r.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",r[r.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(an||(It.NodeTypes=an={}));function vb(r){return r&&typeof r=="object"&&Number.isInteger(r.nodeType)&&r.nodeType>=1&&r.nodeType<=11&&typeof r.nodeName=="string"&&typeof r.appendChild=="function"&&typeof r.removeChild=="function"}o(vb,"isNodeLike");It.isNodeLike=vb;function Xle(r){if(!vb(r))throw new Error(`Value is not a Node-like object. Received: ${r}`)}o(Xle,"assertIsNodeLike");It.assertIsNodeLike=Xle;function MF(r){return Array.isArray(r)&&r.every(vb)}o(MF,"isArrayOfNodes");It.isArrayOfNodes=MF;function Gle(r){if(!MF(r))throw new Error("Value is not an array of Nodes")}o(Gle,"assertIsArrayOfNodes");It.assertIsArrayOfNodes=Gle;function to(r,e){return vb(e)&&e.nodeType===r}o(to,"isNodeOfType");function Fo(r,e){let t=Object.keys(an).find(n=>an[n]===r);if(!to(r,e))throw new Error(`Value is not of type ${t}`)}o(Fo,"assertIsNodeOfType");var Wle=o(r=>to(an.ELEMENT_NODE,r),"isElementNode");It.isElementNode=Wle;var zle=o(r=>to(an.ATTRIBUTE_NODE,r),"isAttributeNode");It.isAttributeNode=zle;var Jle=o(r=>to(an.TEXT_NODE,r),"isTextNode");It.isTextNode=Jle;var Yle=o(r=>to(an.CDATA_SECTION_NODE,r),"isCDATASectionNode");It.isCDATASectionNode=Yle;var Qle=o(r=>to(an.PROCESSING_INSTRUCTION_NODE,r),"isProcessingInstructionNode");It.isProcessingInstructionNode=Qle;var Zle=o(r=>to(an.COMMENT_NODE,r),"isCommentNode");It.isCommentNode=Zle;var efe=o(r=>to(an.DOCUMENT_NODE,r),"isDocumentNode");It.isDocumentNode=efe;var tfe=o(r=>to(an.DOCUMENT_TYPE_NODE,r),"isDocumentTypeNode");It.isDocumentTypeNode=tfe;var rfe=o(r=>to(an.DOCUMENT_FRAGMENT_NODE,r),"isDocumentFragmentNode");It.isDocumentFragmentNode=rfe;var nfe=o(r=>{Fo(an.ELEMENT_NODE,r)},"assertIsElementNode");It.assertIsElementNode=nfe;var sfe=o(r=>Fo(an.ATTRIBUTE_NODE,r),"assertIsAttributeNode");It.assertIsAttributeNode=sfe;var ife=o(r=>Fo(an.TEXT_NODE,r),"assertIsTextNode");It.assertIsTextNode=ife;var afe=o(r=>Fo(an.CDATA_SECTION_NODE,r),"assertIsCDATASectionNode");It.assertIsCDATASectionNode=afe;var ofe=o(r=>Fo(an.PROCESSING_INSTRUCTION_NODE,r),"assertIsProcessingInstructionNode");It.assertIsProcessingInstructionNode=ofe;var ufe=o(r=>Fo(an.COMMENT_NODE,r),"assertIsCommentNode");It.assertIsCommentNode=ufe;var cfe=o(r=>Fo(an.DOCUMENT_NODE,r),"assertIsDocumentNode");It.assertIsDocumentNode=cfe;var lfe=o(r=>Fo(an.DOCUMENT_TYPE_NODE,r),"assertIsDocumentTypeNode");It.assertIsDocumentTypeNode=lfe;var ffe=o(r=>Fo(an.DOCUMENT_FRAGMENT_NODE,r),"assertIsDocumentFragmentNode");It.assertIsDocumentFragmentNode=ffe});var nv=Q(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.validateDigestValue=dr.findAncestorNs=dr.derToPem=dr.pemToDer=dr.normalizePem=dr.BASE64_REGEX=dr.EXTRACT_X509_CERTS=dr.PEM_FORMAT_REGEX=dr.encodeSpecialCharactersInText=dr.encodeSpecialCharactersInAttribute=dr.findChilds=dr.findChildren=dr.findAttr=dr.isArrayHasLength=void 0;var hfe=gb(),bB=sd();function qF(r){return Array.isArray(r)&&r.length>0}o(qF,"isArrayHasLength");dr.isArrayHasLength=qF;function pfe(r,e,t){return r.localName===e&&(r.namespaceURI===t||t==null)}o(pfe,"attrEqualsExplicitly");function dfe(r,e,t,n){return r.localName===e&&(!r.namespaceURI&&n?.namespaceURI===t||t==null)}o(dfe,"attrEqualsImplicitly");function mfe(r,e,t){for(let n=0;n<r.attributes.length;n++){let s=r.attributes[n];if(pfe(s,e,t)||dfe(s,e,t,r))return s}return null}o(mfe,"findAttr");dr.findAttr=mfe;function HF(r,e,t){let n=r.documentElement??r,s=[];for(let i=0;i<n.childNodes.length;i++){let a=n.childNodes[i];bB.isElementNode(a)&&a.localName===e&&(a.namespaceURI===t||t==null)&&s.push(a)}return s}o(HF,"findChildren");dr.findChildren=HF;function gfe(r,e,t){return HF(r,e,t)}o(gfe,"findChilds");dr.findChilds=gfe;var vfe={"&":"&","<":"<",'"':""","\r":"
","\n":"
"," ":"	"},yfe={"&":"&","<":"<",">":">","\r":"
"};function xfe(r){return r.replace(/([&<"\r\n\t])/g,function(e,t){return vfe[t]})}o(xfe,"encodeSpecialCharactersInAttribute");dr.encodeSpecialCharactersInAttribute=xfe;function wfe(r){return r.replace(/([&<>\r])/g,function(e,t){return yfe[t]})}o(wfe,"encodeSpecialCharactersInText");dr.encodeSpecialCharactersInText=wfe;dr.PEM_FORMAT_REGEX=new RegExp("^-----BEGIN [A-Z ]{1,48}-----([^-]*)-----END [A-Z ]{1,48}-----$","s");dr.EXTRACT_X509_CERTS=new RegExp("-----BEGIN CERTIFICATE-----[^-]*-----END CERTIFICATE-----","g");dr.BASE64_REGEX=new RegExp("^(?:[A-Za-z0-9\\+\\/]{4}\\n{0,1})*(?:[A-Za-z0-9\\+\\/]{2}==|[A-Za-z0-9\\+\\/]{3}=)?$","s");function SB(r){return`${(r.trim().replace(/(\r\n|\r)/g,`
|
|
61
|
+
`).match(/.{1,64}/g)??[]).join(`
|
|
62
|
+
`)}
|
|
63
|
+
`}o(SB,"normalizePem");dr.normalizePem=SB;function Sfe(r){if(!dr.PEM_FORMAT_REGEX.test(r.trim()))throw new Error("Invalid PEM format.");return Buffer.from(r.replace(/(\r\n|\r)/g,"").replace(/-----BEGIN [A-Z\x20]{1,48}-----\n?/,"").replace(/-----END [A-Z\x20]{1,48}-----\n?/,""),"base64")}o(Sfe,"pemToDer");dr.pemToDer=Sfe;function bfe(r,e){let t=Buffer.isBuffer(r)?r.toString("base64").trim():r.replace(/(\r\n|\r)/g,"").trim();if(dr.PEM_FORMAT_REGEX.test(t))return SB(t);if(dr.BASE64_REGEX.test(t.replace(/ /g,""))){if(e==null)throw new Error("PEM label is required when DER is given.");let n=`-----BEGIN ${e}-----
|
|
64
|
+
${t.replace(/ /g,"")}
|
|
65
|
+
-----END ${e}-----`;return SB(n)}throw new Error("Unknown DER format.")}o(bfe,"derToPem");dr.derToPem=bfe;function KF(r,e=[]){if(!bB.isElementNode(r.parentNode))return e;let t=r.parentNode;if(!t)return e;if(t.attributes&&t.attributes.length>0)for(let n=0;n<t.attributes.length;n++){let s=t.attributes[n];s&&s.nodeName&&s.nodeName.search(/^xmlns:?/)!==-1&&e.push({prefix:s.nodeName.replace(/^xmlns:?/,""),namespaceURI:s.nodeValue||""})}return KF(t,e)}o(KF,"collectAncestorNamespaces");function Efe(r){let e=r.attributes;for(let t=0;t<e.length;t++){let n=e[t].nodeName;if(n.search(/^xmlns:?/)!==-1)return n.replace(/^xmlns:?/,"")}return r.prefix||""}o(Efe,"findNSPrefix");function Afe(r){return r.every(e=>bB.isElementNode(e))}o(Afe,"isElementSubset");function Cfe(r,e,t){if(e==null)return[];let n=hfe.selectWithResolver(e,r,t);if(!qF(n))return[];if(!Afe(n))throw new Error("Document subset must be list of elements");let s=KF(n[0]),i=[];for(let c=0;c<s.length;c++){let f=!0;for(let h in i)if(i[h].prefix===s[c].prefix){f=!1;break}f&&i.push(s[c])}let a=[],u=Efe(n[0]);for(let c of i)c.prefix!==u&&a.push(c);return a}o(Cfe,"findAncestorNs");dr.findAncestorNs=Cfe;function Nfe(r,e){let t=Buffer.from(r,"base64"),n=Buffer.from(e,"base64");if(typeof t.equals=="function")return t.equals(n);if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==n[s])return!1;return!0}o(Nfe,"validateDigestValue");dr.validateDigestValue=Nfe});var AB=Q(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.C14nCanonicalizationWithComments=id.C14nCanonicalization=void 0;var yb=nv(),EB=sd(),$F=class{static{o(this,"C14nCanonicalization")}constructor(){this.includeComments=!1,this.includeComments=!1}attrCompare(e,t){if(!e.namespaceURI&&t.namespaceURI)return-1;if(!t.namespaceURI&&e.namespaceURI)return 1;let n=e.namespaceURI+e.localName,s=t.namespaceURI+t.localName;return n===s?0:n<s?-1:1}nsCompare(e,t){let n=e.prefix,s=t.prefix;return n===s?0:n.localeCompare(s)}renderAttrs(e){let t,n,s=[];if(EB.isCommentNode(e))return this.renderComment(e);if(e.attributes)for(t=0;t<e.attributes.length;++t)n=e.attributes[t],n.name.indexOf("xmlns")!==0&&s.push(n);return s.sort(this.attrCompare),s.map(a=>` ${a.name}="${yb.encodeSpecialCharactersInAttribute(a.value)}"`).join("")}renderNs(e,t,n,s,i){let a,u,c=[],f=n,h=[],m=e.namespaceURI||"";if(e.prefix?t.indexOf(e.prefix)===-1&&(h.push({prefix:e.prefix,namespaceURI:e.namespaceURI||s[e.prefix]}),t.push(e.prefix)):n!==m&&(f=e.namespaceURI||"",c.push(' xmlns="',f,'"')),e.attributes)for(a=0;a<e.attributes.length;++a)u=e.attributes[a],u.prefix==="xmlns"&&t.indexOf(u.localName)===-1&&(h.push({prefix:u.localName,namespaceURI:u.value}),t.push(u.localName)),u.prefix&&t.indexOf(u.prefix)===-1&&u.prefix!=="xmlns"&&u.prefix!=="xml"&&(h.push({prefix:u.prefix,namespaceURI:u.namespaceURI}),t.push(u.prefix));if(yb.isArrayHasLength(i))for(let g of i){let x=!1;for(let v of h)v.prefix===g.prefix&&v.namespaceURI===g.namespaceURI&&(x=!0);x||h.push(g)}return h.sort(this.nsCompare),c.push(...h.map(g=>g.prefix?` xmlns:${g.prefix}="${g.namespaceURI}"`:` xmlns="${g.namespaceURI}"`)),{rendered:c.join(""),newDefaultNs:f}}processInner(e,t,n,s,i){if(EB.isCommentNode(e))return this.renderComment(e);if(e.data)return yb.encodeSpecialCharactersInText(e.data);if(EB.isElementNode(e)){let a,u,c=this.renderNs(e,t,n,s,i),f=["<",e.tagName,c.rendered,this.renderAttrs(e),">"];for(a=0;a<e.childNodes.length;++a)u=t.slice(0),f.push(this.processInner(e.childNodes[a],u,c.newDefaultNs,s,[]));return f.push("</",e.tagName,">"),f.join("")}throw new Error(`Unable to canonicalize node type: ${e.nodeType}`)}renderComment(e){if(!this.includeComments)return"";let t=e.ownerDocument===e.parentNode,n=!1,s=!1;if(t){let c=e,f=e;for(;c!==null;){if(c===e.ownerDocument.documentElement){n=!0;break}c=c.nextSibling}for(;f!==null;){if(f===e.ownerDocument.documentElement){s=!0;break}f=f.previousSibling}}let i=s?`
|
|
66
|
+
`:"",a=n?`
|
|
67
|
+
`:"",u=yb.encodeSpecialCharactersInText(e.data);return`${i}<!--${u}-->${a}`}process(e,t){t=t||{};let n=t.defaultNs||"",s=t.defaultNsForPrefix||{},i=t.ancestorNamespaces||[],a=[];for(let c=0;c<i.length;c++)a.push(i[c].prefix);return this.processInner(e,a,n,s,i)}getAlgorithmName(){return"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"}};id.C14nCanonicalization=$F;var Tfe=class extends $F{static{o(this,"C14nCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"}};id.C14nCanonicalizationWithComments=Tfe});var TB=Q(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});ad.ExclusiveCanonicalizationWithComments=ad.ExclusiveCanonicalization=void 0;var ff=nv(),CB=sd();function NB(r,e,t){let n=!1;return r.forEach(function(s){s.prefix===e&&s.namespaceURI===t&&(n=!0)}),n}o(NB,"isPrefixInScope");var XF=class{static{o(this,"ExclusiveCanonicalization")}constructor(){this.includeComments=!1,this.includeComments=!1}attrCompare(e,t){if(!e.namespaceURI&&t.namespaceURI)return-1;if(!t.namespaceURI&&e.namespaceURI)return 1;let n=e.namespaceURI+e.localName,s=t.namespaceURI+t.localName;return n===s?0:n<s?-1:1}nsCompare(e,t){let n=e.prefix,s=t.prefix;return n===s?0:n.localeCompare(s)}renderAttrs(e){let t,n,s=[],i=[];if(CB.isCommentNode(e))return this.renderComment(e);if(e.attributes)for(t=0;t<e.attributes.length;++t)n=e.attributes[t],n.name.indexOf("xmlns")!==0&&i.push(n);i.sort(this.attrCompare);for(n of i)s.push(" ",n.name,'="',ff.encodeSpecialCharactersInAttribute(n.value),'"');return s.join("")}renderNs(e,t,n,s,i){let a,u,c=[],f=n,h=[],m=e.namespaceURI||"";if(e.prefix?NB(t,e.prefix,e.namespaceURI||s[e.prefix])||(h.push({prefix:e.prefix,namespaceURI:e.namespaceURI||s[e.prefix]}),t.push({prefix:e.prefix,namespaceURI:e.namespaceURI||s[e.prefix]})):n!==m&&(f=e.namespaceURI,c.push(' xmlns="',f,'"')),e.attributes)for(a=0;a<e.attributes.length;++a)u=e.attributes[a],u.prefix&&!NB(t,u.localName,u.value)&&i.indexOf(u.localName)>=0&&(h.push({prefix:u.localName,namespaceURI:u.value}),t.push({prefix:u.localName,namespaceURI:u.value})),u.prefix&&!NB(t,u.prefix,u.namespaceURI)&&u.prefix!=="xmlns"&&u.prefix!=="xml"&&(h.push({prefix:u.prefix,namespaceURI:u.namespaceURI}),t.push({prefix:u.prefix,namespaceURI:u.namespaceURI}));h.sort(this.nsCompare);for(let g of h)c.push(" xmlns:",g.prefix,'="',g.namespaceURI,'"');return{rendered:c.join(""),newDefaultNs:f}}processInner(e,t,n,s,i){if(CB.isCommentNode(e))return this.renderComment(e);if(e.data)return ff.encodeSpecialCharactersInText(e.data);if(CB.isElementNode(e)){let a,u,c=this.renderNs(e,t,n,s,i),f=["<",e.tagName,c.rendered,this.renderAttrs(e),">"];for(a=0;a<e.childNodes.length;++a)u=t.slice(0),f.push(this.processInner(e.childNodes[a],u,c.newDefaultNs,s,i));return f.push("</",e.tagName,">"),f.join("")}throw new Error(`Unable to exclusive canonicalize node type: ${e.nodeType}`)}renderComment(e){if(!this.includeComments)return"";let t=e.ownerDocument===e.parentNode,n=!1,s=!1;if(t){let c=e,f=e;for(;c!=null;){if(c===e.ownerDocument.documentElement){n=!0;break}c=c.nextSibling}for(;f!=null;){if(f===e.ownerDocument.documentElement){s=!0;break}f=f.previousSibling}}let i=s?`
|
|
68
|
+
`:"",a=n?`
|
|
69
|
+
`:"",u=ff.encodeSpecialCharactersInText(e.data);return`${i}<!--${u}-->${a}`}process(e,t){t=t||{};let n=t.inclusiveNamespacesPrefixList||[],s=t.defaultNs||"",i=t.defaultNsForPrefix||{},a=t.ancestorNamespaces||[];if(!ff.isArrayHasLength(n)){let c=ff.findChildren(e,"CanonicalizationMethod");if(c.length!==0){let f=ff.findChildren(c[0],"InclusiveNamespaces");f.length!==0&&(n=(f[0].getAttribute("PrefixList")||"").split(" "))}}return ff.isArrayHasLength(n)&&n.forEach(function(c){a&&a.forEach(function(f){c===f.prefix&&e.setAttributeNS("http://www.w3.org/2000/xmlns/",`xmlns:${c}`,f.namespaceURI)})}),this.processInner(e,[],s,i,n)}getAlgorithmName(){return"http://www.w3.org/2001/10/xml-exc-c14n#"}};ad.ExclusiveCanonicalization=XF;var Ife=class extends XF{static{o(this,"ExclusiveCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/2001/10/xml-exc-c14n#WithComments"}};ad.ExclusiveCanonicalizationWithComments=Ife});var sv=Q(od=>{"use strict";function _fe(r,e,t){if(t===void 0&&(t=Array.prototype),r&&typeof t.find=="function")return t.find.call(r,e);for(var n=0;n<r.length;n++)if(Object.prototype.hasOwnProperty.call(r,n)){var s=r[n];if(e.call(void 0,s,n,r))return s}}o(_fe,"find");function IB(r,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(r):r}o(IB,"freeze");function Bfe(r,e){if(r===null||typeof r!="object")throw new TypeError("target is not an object");for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r}o(Bfe,"assign");var GF=IB({HTML:"text/html",isHTML:o(function(r){return r===GF.HTML},"isHTML"),XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),WF=IB({HTML:"http://www.w3.org/1999/xhtml",isHTML:o(function(r){return r===WF.HTML},"isHTML"),SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});od.assign=Bfe;od.find=_fe;od.freeze=IB;od.MIME_TYPE=GF;od.NAMESPACE=WF});var jB=Q(pc=>{"use strict";var rM=sv(),ro=rM.find,iv=rM.NAMESPACE;function Dfe(r){return r!==""}o(Dfe,"notEmptyString");function Rfe(r){return r?r.split(/[\t\n\f\r ]+/).filter(Dfe):[]}o(Rfe,"splitOnASCIIWhitespace");function Ofe(r,e){return r.hasOwnProperty(e)||(r[e]=!0),r}o(Ofe,"orderedSetReducer");function zF(r){if(!r)return[];var e=Rfe(r);return Object.keys(e.reduce(Ofe,{}))}o(zF,"toOrderedSet");function Pfe(r){return function(e){return r&&r.indexOf(e)!==-1}}o(Pfe,"arrayIncludes");function uv(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(uv,"copy");function Hs(r,e){var t=r.prototype;if(!(t instanceof e)){let s=function(){};var n=s;o(s,"t"),s.prototype=e.prototype,s=new s,uv(t,s),r.prototype=t=s}t.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),t.constructor=r)}o(Hs,"_extends");var Ks={},Ui=Ks.ELEMENT_NODE=1,cd=Ks.ATTRIBUTE_NODE=2,xb=Ks.TEXT_NODE=3,nM=Ks.CDATA_SECTION_NODE=4,sM=Ks.ENTITY_REFERENCE_NODE=5,kfe=Ks.ENTITY_NODE=6,iM=Ks.PROCESSING_INSTRUCTION_NODE=7,aM=Ks.COMMENT_NODE=8,oM=Ks.DOCUMENT_NODE=9,uM=Ks.DOCUMENT_TYPE_NODE=10,qo=Ks.DOCUMENT_FRAGMENT_NODE=11,Lfe=Ks.NOTATION_NODE=12,cs={},Vn={},YAe=cs.INDEX_SIZE_ERR=(Vn[1]="Index size error",1),QAe=cs.DOMSTRING_SIZE_ERR=(Vn[2]="DOMString size error",2),qs=cs.HIERARCHY_REQUEST_ERR=(Vn[3]="Hierarchy request error",3),ZAe=cs.WRONG_DOCUMENT_ERR=(Vn[4]="Wrong document",4),e2e=cs.INVALID_CHARACTER_ERR=(Vn[5]="Invalid character",5),t2e=cs.NO_DATA_ALLOWED_ERR=(Vn[6]="No data allowed",6),r2e=cs.NO_MODIFICATION_ALLOWED_ERR=(Vn[7]="No modification allowed",7),cM=cs.NOT_FOUND_ERR=(Vn[8]="Not found",8),n2e=cs.NOT_SUPPORTED_ERR=(Vn[9]="Not supported",9),JF=cs.INUSE_ATTRIBUTE_ERR=(Vn[10]="Attribute in use",10),s2e=cs.INVALID_STATE_ERR=(Vn[11]="Invalid state",11),i2e=cs.SYNTAX_ERR=(Vn[12]="Syntax error",12),a2e=cs.INVALID_MODIFICATION_ERR=(Vn[13]="Invalid modification",13),o2e=cs.NAMESPACE_ERR=(Vn[14]="Invalid namespace",14),u2e=cs.INVALID_ACCESS_ERR=(Vn[15]="Invalid access",15);function hn(r,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,Vn[r]),this.message=Vn[r],Error.captureStackTrace&&Error.captureStackTrace(this,hn);return t.code=r,e&&(this.message=this.message+": "+e),t}o(hn,"DOMException");hn.prototype=Error.prototype;uv(cs,hn);function Mo(){}o(Mo,"NodeList");Mo.prototype={length:0,item:o(function(r){return r>=0&&r<this.length?this[r]:null},"item"),toString:o(function(r,e){for(var t=[],n=0;n<this.length;n++)ud(this[n],t,r,e);return t.join("")},"toString"),filter:o(function(r){return Array.prototype.filter.call(this,r)},"filter"),indexOf:o(function(r){return Array.prototype.indexOf.call(this,r)},"indexOf")};function ld(r,e){this._node=r,this._refresh=e,DB(this)}o(ld,"LiveNodeList");function DB(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var t=r._refresh(r._node);if(SM(r,"length",t.length),!r.$$length||t.length<r.$$length)for(var n=t.length;n in r;n++)Object.prototype.hasOwnProperty.call(r,n)&&delete r[n];uv(t,r),r._inc=e}}o(DB,"_updateLiveList");ld.prototype.item=function(r){return DB(this),this[r]||null};Hs(ld,Mo);function wb(){}o(wb,"NamedNodeMap");function lM(r,e){for(var t=r.length;t--;)if(r[t]===e)return t}o(lM,"_findNodeIndex");function YF(r,e,t,n){if(n?e[lM(e,n)]=t:e[e.length++]=t,r){t.ownerElement=r;var s=r.ownerDocument;s&&(n&&pM(s,r,n),Vfe(s,r,t))}}o(YF,"_addNamedNode");function QF(r,e,t){var n=lM(e,t);if(n>=0){for(var s=e.length-1;n<s;)e[n]=e[++n];if(e.length=s,r){var i=r.ownerDocument;i&&(pM(i,r,t),t.ownerElement=null)}}else throw new hn(cM,new Error(r.tagName+"@"+t))}o(QF,"_removeNamedNode");wb.prototype={length:0,item:Mo.prototype.item,getNamedItem:o(function(r){for(var e=this.length;e--;){var t=this[e];if(t.nodeName==r)return t}},"getNamedItem"),setNamedItem:o(function(r){var e=r.ownerElement;if(e&&e!=this._ownerElement)throw new hn(JF);var t=this.getNamedItem(r.nodeName);return YF(this._ownerElement,this,r,t),t},"setNamedItem"),setNamedItemNS:o(function(r){var e=r.ownerElement,t;if(e&&e!=this._ownerElement)throw new hn(JF);return t=this.getNamedItemNS(r.namespaceURI,r.localName),YF(this._ownerElement,this,r,t),t},"setNamedItemNS"),removeNamedItem:o(function(r){var e=this.getNamedItem(r);return QF(this._ownerElement,this,e),e},"removeNamedItem"),removeNamedItemNS:o(function(r,e){var t=this.getNamedItemNS(r,e);return QF(this._ownerElement,this,t),t},"removeNamedItemNS"),getNamedItemNS:o(function(r,e){for(var t=this.length;t--;){var n=this[t];if(n.localName==e&&n.namespaceURI==r)return n}return null},"getNamedItemNS")};function fM(){}o(fM,"DOMImplementation");fM.prototype={hasFeature:o(function(r,e){return!0},"hasFeature"),createDocument:o(function(r,e,t){var n=new cv;if(n.implementation=this,n.childNodes=new Mo,n.doctype=t||null,t&&n.appendChild(t),e){var s=n.createElementNS(r,e);n.appendChild(s)}return n},"createDocument"),createDocumentType:o(function(r,e,t){var n=new Eb;return n.name=r,n.nodeName=r,n.publicId=e||"",n.systemId=t||"",n},"createDocumentType")};function Ar(){}o(Ar,"Node");Ar.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:o(function(r,e){return Sb(this,r,e)},"insertBefore"),replaceChild:o(function(r,e){Sb(this,r,e,mM),e&&this.removeChild(e)},"replaceChild"),removeChild:o(function(r){return dM(this,r)},"removeChild"),appendChild:o(function(r){return this.insertBefore(r,null)},"appendChild"),hasChildNodes:o(function(){return this.firstChild!=null},"hasChildNodes"),cloneNode:o(function(r){return BB(this.ownerDocument||this,this,r)},"cloneNode"),normalize:o(function(){for(var r=this.firstChild;r;){var e=r.nextSibling;e&&e.nodeType==xb&&r.nodeType==xb?(this.removeChild(e),r.appendData(e.data)):(r.normalize(),r=e)}},"normalize"),isSupported:o(function(r,e){return this.ownerDocument.implementation.hasFeature(r,e)},"isSupported"),hasAttributes:o(function(){return this.attributes.length>0},"hasAttributes"),lookupPrefix:o(function(r){for(var e=this;e;){var t=e._nsMap;if(t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&t[n]===r)return n}e=e.nodeType==cd?e.ownerDocument:e.parentNode}return null},"lookupPrefix"),lookupNamespaceURI:o(function(r){for(var e=this;e;){var t=e._nsMap;if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r];e=e.nodeType==cd?e.ownerDocument:e.parentNode}return null},"lookupNamespaceURI"),isDefaultNamespace:o(function(r){var e=this.lookupPrefix(r);return e==null},"isDefaultNamespace")};function hM(r){return r=="<"&&"<"||r==">"&&">"||r=="&"&&"&"||r=='"'&&"""||"&#"+r.charCodeAt()+";"}o(hM,"_xmlEncoder");uv(Ks,Ar);uv(Ks,Ar.prototype);function av(r,e){if(e(r))return!0;if(r=r.firstChild)do if(av(r,e))return!0;while(r=r.nextSibling)}o(av,"_visitNode");function cv(){this.ownerDocument=this}o(cv,"Document");function Vfe(r,e,t){r&&r._inc++;var n=t.namespaceURI;n===iv.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}o(Vfe,"_onAddAttribute");function pM(r,e,t,n){r&&r._inc++;var s=t.namespaceURI;s===iv.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}o(pM,"_onRemoveAttribute");function RB(r,e,t){if(r&&r._inc){r._inc++;var n=e.childNodes;if(t)n[n.length++]=t;else{for(var s=e.firstChild,i=0;s;)n[i++]=s,s=s.nextSibling;n.length=i,delete n[n.length]}}}o(RB,"_onUpdateChild");function dM(r,e){var t=e.previousSibling,n=e.nextSibling;return t?t.nextSibling=n:r.firstChild=n,n?n.previousSibling=t:r.lastChild=t,e.parentNode=null,e.previousSibling=null,e.nextSibling=null,RB(r.ownerDocument,r),e}o(dM,"_removeChild");function Ufe(r){return r&&(r.nodeType===Ar.DOCUMENT_NODE||r.nodeType===Ar.DOCUMENT_FRAGMENT_NODE||r.nodeType===Ar.ELEMENT_NODE)}o(Ufe,"hasValidParentNodeType");function jfe(r){return r&&(no(r)||OB(r)||Ho(r)||r.nodeType===Ar.DOCUMENT_FRAGMENT_NODE||r.nodeType===Ar.COMMENT_NODE||r.nodeType===Ar.PROCESSING_INSTRUCTION_NODE)}o(jfe,"hasInsertableNodeType");function Ho(r){return r&&r.nodeType===Ar.DOCUMENT_TYPE_NODE}o(Ho,"isDocTypeNode");function no(r){return r&&r.nodeType===Ar.ELEMENT_NODE}o(no,"isElementNode");function OB(r){return r&&r.nodeType===Ar.TEXT_NODE}o(OB,"isTextNode");function ZF(r,e){var t=r.childNodes||[];if(ro(t,no)||Ho(e))return!1;var n=ro(t,Ho);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}o(ZF,"isElementInsertionPossible");function eM(r,e){var t=r.childNodes||[];function n(i){return no(i)&&i!==e}if(o(n,"hasElementChildThatIsNotChild"),ro(t,n))return!1;var s=ro(t,Ho);return!(e&&s&&t.indexOf(s)>t.indexOf(e))}o(eM,"isElementReplacementPossible");function Ffe(r,e,t){if(!Ufe(r))throw new hn(qs,"Unexpected parent node type "+r.nodeType);if(t&&t.parentNode!==r)throw new hn(cM,"child not in parent");if(!jfe(e)||Ho(e)&&r.nodeType!==Ar.DOCUMENT_NODE)throw new hn(qs,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}o(Ffe,"assertPreInsertionValidity1to5");function Mfe(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===Ar.DOCUMENT_FRAGMENT_NODE){var i=s.filter(no);if(i.length>1||ro(s,OB))throw new hn(qs,"More than one element or text in fragment");if(i.length===1&&!ZF(r,t))throw new hn(qs,"Element in fragment can not be inserted before doctype")}if(no(e)&&!ZF(r,t))throw new hn(qs,"Only one element can be added and only after doctype");if(Ho(e)){if(ro(n,Ho))throw new hn(qs,"Only one doctype is allowed");var a=ro(n,no);if(t&&n.indexOf(a)<n.indexOf(t))throw new hn(qs,"Doctype can only be inserted before an element");if(!t&&a)throw new hn(qs,"Doctype can not be appended since element is present")}}o(Mfe,"assertPreInsertionValidityInDocument");function mM(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===Ar.DOCUMENT_FRAGMENT_NODE){var i=s.filter(no);if(i.length>1||ro(s,OB))throw new hn(qs,"More than one element or text in fragment");if(i.length===1&&!eM(r,t))throw new hn(qs,"Element in fragment can not be inserted before doctype")}if(no(e)&&!eM(r,t))throw new hn(qs,"Only one element can be added and only after doctype");if(Ho(e)){let c=function(f){return Ho(f)&&f!==t};var u=c;if(o(c,"hasDoctypeChildThatIsNotChild"),ro(n,c))throw new hn(qs,"Only one doctype is allowed");var a=ro(n,no);if(t&&n.indexOf(a)<n.indexOf(t))throw new hn(qs,"Doctype can only be inserted before an element")}}o(mM,"assertPreReplacementValidityInDocument");function Sb(r,e,t,n){Ffe(r,e,t),r.nodeType===Ar.DOCUMENT_NODE&&(n||Mfe)(r,e,t);var s=e.parentNode;if(s&&s.removeChild(e),e.nodeType===qo){var i=e.firstChild;if(i==null)return e;var a=e.lastChild}else i=a=e;var u=t?t.previousSibling:r.lastChild;i.previousSibling=u,a.nextSibling=t,u?u.nextSibling=i:r.firstChild=i,t==null?r.lastChild=a:t.previousSibling=a;do{i.parentNode=r;var c=r.ownerDocument||r;ov(i,c)}while(i!==a&&(i=i.nextSibling));return RB(r.ownerDocument||r,r),e.nodeType==qo&&(e.firstChild=e.lastChild=null),e}o(Sb,"_insertBefore");function ov(r,e){if(r.ownerDocument!==e){if(r.ownerDocument=e,r.nodeType===Ui&&r.attributes)for(var t=0;t<r.attributes.length;t++){var n=r.attributes.item(t);n&&(n.ownerDocument=e)}for(var s=r.firstChild;s;)ov(s,e),s=s.nextSibling}}o(ov,"_updateOwnerDocument");function qfe(r,e){e.parentNode&&e.parentNode.removeChild(e),e.parentNode=r,e.previousSibling=r.lastChild,e.nextSibling=null,e.previousSibling?e.previousSibling.nextSibling=e:r.firstChild=e,r.lastChild=e,RB(r.ownerDocument,r,e);var t=r.ownerDocument||r;return ov(e,t),e}o(qfe,"_appendSingleChild");cv.prototype={nodeName:"#document",nodeType:oM,doctype:null,documentElement:null,_inc:1,insertBefore:o(function(r,e){if(r.nodeType==qo){for(var t=r.firstChild;t;){var n=t.nextSibling;this.insertBefore(t,e),t=n}return r}return Sb(this,r,e),ov(r,this),this.documentElement===null&&r.nodeType===Ui&&(this.documentElement=r),r},"insertBefore"),removeChild:o(function(r){return this.documentElement==r&&(this.documentElement=null),dM(this,r)},"removeChild"),replaceChild:o(function(r,e){Sb(this,r,e,mM),ov(r,this),e&&this.removeChild(e),no(r)&&(this.documentElement=r)},"replaceChild"),importNode:o(function(r,e){return wM(this,r,e)},"importNode"),getElementById:o(function(r){var e=null;return av(this.documentElement,function(t){if(t.nodeType==Ui&&t.getAttribute("id")==r)return e=t,!0}),e},"getElementById"),getElementsByClassName:o(function(r){var e=zF(r);return new ld(this,function(t){var n=[];return e.length>0&&av(t.documentElement,function(s){if(s!==t&&s.nodeType===Ui){var i=s.getAttribute("class");if(i){var a=r===i;if(!a){var u=zF(i);a=e.every(Pfe(u))}a&&n.push(s)}}}),n})},"getElementsByClassName"),createElement:o(function(r){var e=new hf;e.ownerDocument=this,e.nodeName=r,e.tagName=r,e.localName=r,e.childNodes=new Mo;var t=e.attributes=new wb;return t._ownerElement=e,e},"createElement"),createDocumentFragment:o(function(){var r=new Ab;return r.ownerDocument=this,r.childNodes=new Mo,r},"createDocumentFragment"),createTextNode:o(function(r){var e=new PB;return e.ownerDocument=this,e.appendData(r),e},"createTextNode"),createComment:o(function(r){var e=new kB;return e.ownerDocument=this,e.appendData(r),e},"createComment"),createCDATASection:o(function(r){var e=new LB;return e.ownerDocument=this,e.appendData(r),e},"createCDATASection"),createProcessingInstruction:o(function(r,e){var t=new UB;return t.ownerDocument=this,t.tagName=t.nodeName=t.target=r,t.nodeValue=t.data=e,t},"createProcessingInstruction"),createAttribute:o(function(r){var e=new bb;return e.ownerDocument=this,e.name=r,e.nodeName=r,e.localName=r,e.specified=!0,e},"createAttribute"),createEntityReference:o(function(r){var e=new VB;return e.ownerDocument=this,e.nodeName=r,e},"createEntityReference"),createElementNS:o(function(r,e){var t=new hf,n=e.split(":"),s=t.attributes=new wb;return t.childNodes=new Mo,t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.namespaceURI=r,n.length==2?(t.prefix=n[0],t.localName=n[1]):t.localName=e,s._ownerElement=t,t},"createElementNS"),createAttributeNS:o(function(r,e){var t=new bb,n=e.split(":");return t.ownerDocument=this,t.nodeName=e,t.name=e,t.namespaceURI=r,t.specified=!0,n.length==2?(t.prefix=n[0],t.localName=n[1]):t.localName=e,t},"createAttributeNS")};Hs(cv,Ar);function hf(){this._nsMap={}}o(hf,"Element");hf.prototype={nodeType:Ui,hasAttribute:o(function(r){return this.getAttributeNode(r)!=null},"hasAttribute"),getAttribute:o(function(r){var e=this.getAttributeNode(r);return e&&e.value||""},"getAttribute"),getAttributeNode:o(function(r){return this.attributes.getNamedItem(r)},"getAttributeNode"),setAttribute:o(function(r,e){var t=this.ownerDocument.createAttribute(r);t.value=t.nodeValue=""+e,this.setAttributeNode(t)},"setAttribute"),removeAttribute:o(function(r){var e=this.getAttributeNode(r);e&&this.removeAttributeNode(e)},"removeAttribute"),appendChild:o(function(r){return r.nodeType===qo?this.insertBefore(r,null):qfe(this,r)},"appendChild"),setAttributeNode:o(function(r){return this.attributes.setNamedItem(r)},"setAttributeNode"),setAttributeNodeNS:o(function(r){return this.attributes.setNamedItemNS(r)},"setAttributeNodeNS"),removeAttributeNode:o(function(r){return this.attributes.removeNamedItem(r.nodeName)},"removeAttributeNode"),removeAttributeNS:o(function(r,e){var t=this.getAttributeNodeNS(r,e);t&&this.removeAttributeNode(t)},"removeAttributeNS"),hasAttributeNS:o(function(r,e){return this.getAttributeNodeNS(r,e)!=null},"hasAttributeNS"),getAttributeNS:o(function(r,e){var t=this.getAttributeNodeNS(r,e);return t&&t.value||""},"getAttributeNS"),setAttributeNS:o(function(r,e,t){var n=this.ownerDocument.createAttributeNS(r,e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},"setAttributeNS"),getAttributeNodeNS:o(function(r,e){return this.attributes.getNamedItemNS(r,e)},"getAttributeNodeNS"),getElementsByTagName:o(function(r){return new ld(this,function(e){var t=[];return av(e,function(n){n!==e&&n.nodeType==Ui&&(r==="*"||n.tagName==r)&&t.push(n)}),t})},"getElementsByTagName"),getElementsByTagNameNS:o(function(r,e){return new ld(this,function(t){var n=[];return av(t,function(s){s!==t&&s.nodeType===Ui&&(r==="*"||s.namespaceURI===r)&&(e==="*"||s.localName==e)&&n.push(s)}),n})},"getElementsByTagNameNS")};cv.prototype.getElementsByTagName=hf.prototype.getElementsByTagName;cv.prototype.getElementsByTagNameNS=hf.prototype.getElementsByTagNameNS;Hs(hf,Ar);function bb(){}o(bb,"Attr");bb.prototype.nodeType=cd;Hs(bb,Ar);function lv(){}o(lv,"CharacterData");lv.prototype={data:"",substringData:o(function(r,e){return this.data.substring(r,r+e)},"substringData"),appendData:o(function(r){r=this.data+r,this.nodeValue=this.data=r,this.length=r.length},"appendData"),insertData:o(function(r,e){this.replaceData(r,0,e)},"insertData"),appendChild:o(function(r){throw new Error(Vn[qs])},"appendChild"),deleteData:o(function(r,e){this.replaceData(r,e,"")},"deleteData"),replaceData:o(function(r,e,t){var n=this.data.substring(0,r),s=this.data.substring(r+e);t=n+t+s,this.nodeValue=this.data=t,this.length=t.length},"replaceData")};Hs(lv,Ar);function PB(){}o(PB,"Text");PB.prototype={nodeName:"#text",nodeType:xb,splitText:o(function(r){var e=this.data,t=e.substring(r);e=e.substring(0,r),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n},"splitText")};Hs(PB,lv);function kB(){}o(kB,"Comment");kB.prototype={nodeName:"#comment",nodeType:aM};Hs(kB,lv);function LB(){}o(LB,"CDATASection");LB.prototype={nodeName:"#cdata-section",nodeType:nM};Hs(LB,lv);function Eb(){}o(Eb,"DocumentType");Eb.prototype.nodeType=uM;Hs(Eb,Ar);function gM(){}o(gM,"Notation");gM.prototype.nodeType=Lfe;Hs(gM,Ar);function vM(){}o(vM,"Entity");vM.prototype.nodeType=kfe;Hs(vM,Ar);function VB(){}o(VB,"EntityReference");VB.prototype.nodeType=sM;Hs(VB,Ar);function Ab(){}o(Ab,"DocumentFragment");Ab.prototype.nodeName="#document-fragment";Ab.prototype.nodeType=qo;Hs(Ab,Ar);function UB(){}o(UB,"ProcessingInstruction");UB.prototype.nodeType=iM;Hs(UB,Ar);function yM(){}o(yM,"XMLSerializer");yM.prototype.serializeToString=function(r,e,t){return xM.call(r,e,t)};Ar.prototype.toString=xM;function xM(r,e){var t=[],n=this.nodeType==9&&this.documentElement||this,s=n.prefix,i=n.namespaceURI;if(i&&s==null){var s=n.lookupPrefix(i);if(s==null)var a=[{namespace:i,prefix:null}]}return ud(this,t,r,e,a),t.join("")}o(xM,"nodeSerializeToString");function tM(r,e,t){var n=r.prefix||"",s=r.namespaceURI;if(!s||n==="xml"&&s===iv.XML||s===iv.XMLNS)return!1;for(var i=t.length;i--;){var a=t[i];if(a.prefix===n)return a.namespace!==s}return!0}o(tM,"needNamespaceDefine");function _B(r,e,t){r.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,hM),'"')}o(_B,"addSerializedAttribute");function ud(r,e,t,n,s){if(s||(s=[]),n)if(r=n(r),r){if(typeof r=="string"){e.push(r);return}}else return;switch(r.nodeType){case Ui:var i=r.attributes,a=i.length,A=r.firstChild,u=r.tagName;t=iv.isHTML(r.namespaceURI)||t;var c=u;if(!t&&!r.prefix&&r.namespaceURI){for(var f,h=0;h<i.length;h++)if(i.item(h).name==="xmlns"){f=i.item(h).value;break}if(!f)for(var m=s.length-1;m>=0;m--){var g=s[m];if(g.prefix===""&&g.namespace===r.namespaceURI){f=g.namespace;break}}if(f!==r.namespaceURI)for(var m=s.length-1;m>=0;m--){var g=s[m];if(g.namespace===r.namespaceURI){g.prefix&&(c=g.prefix+":"+u);break}}}e.push("<",c);for(var x=0;x<a;x++){var v=i.item(x);v.prefix=="xmlns"?s.push({prefix:v.localName,namespace:v.value}):v.nodeName=="xmlns"&&s.push({prefix:"",namespace:v.value})}for(var x=0;x<a;x++){var v=i.item(x);if(tM(v,t,s)){var w=v.prefix||"",S=v.namespaceURI;_B(e,w?"xmlns:"+w:"xmlns",S),s.push({prefix:w,namespace:S})}ud(v,e,t,n,s)}if(u===c&&tM(r,t,s)){var w=r.prefix||"",S=r.namespaceURI;_B(e,w?"xmlns:"+w:"xmlns",S),s.push({prefix:w,namespace:S})}if(A||t&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(e.push(">"),t&&/^script$/i.test(u))for(;A;)A.data?e.push(A.data):ud(A,e,t,n,s.slice()),A=A.nextSibling;else for(;A;)ud(A,e,t,n,s.slice()),A=A.nextSibling;e.push("</",c,">")}else e.push("/>");return;case oM:case qo:for(var A=r.firstChild;A;)ud(A,e,t,n,s.slice()),A=A.nextSibling;return;case cd:return _B(e,r.name,r.value);case xb:return e.push(r.data.replace(/[<&>]/g,hM));case nM:return e.push("<![CDATA[",r.data,"]]>");case aM:return e.push("<!--",r.data,"-->");case uM:var N=r.publicId,b=r.systemId;if(e.push("<!DOCTYPE ",r.name),N)e.push(" PUBLIC ",N),b&&b!="."&&e.push(" ",b),e.push(">");else if(b&&b!=".")e.push(" SYSTEM ",b,">");else{var E=r.internalSubset;E&&e.push(" [",E,"]"),e.push(">")}return;case iM:return e.push("<?",r.target," ",r.data,"?>");case sM:return e.push("&",r.nodeName,";");default:e.push("??",r.nodeName)}}o(ud,"serializeToString");function wM(r,e,t){var n;switch(e.nodeType){case Ui:n=e.cloneNode(!1),n.ownerDocument=r;case qo:break;case cd:t=!0;break}if(n||(n=e.cloneNode(!1)),n.ownerDocument=r,n.parentNode=null,t)for(var s=e.firstChild;s;)n.appendChild(wM(r,s,t)),s=s.nextSibling;return n}o(wM,"importNode");function BB(r,e,t){var n=new e.constructor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=e[s];typeof i!="object"&&i!=n[s]&&(n[s]=i)}switch(e.childNodes&&(n.childNodes=new Mo),n.ownerDocument=r,n.nodeType){case Ui:var a=e.attributes,u=n.attributes=new wb,c=a.length;u._ownerElement=n;for(var f=0;f<c;f++)n.setAttributeNode(BB(r,a.item(f),!0));break;case cd:t=!0}if(t)for(var h=e.firstChild;h;)n.appendChild(BB(r,h,t)),h=h.nextSibling;return n}o(BB,"cloneNode");function SM(r,e,t){r[e]=t}o(SM,"__set__");try{if(Object.defineProperty){let r=function(e){switch(e.nodeType){case Ui:case qo:var t=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&t.push(r(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}};Hfe=r,o(r,"getTextContent"),Object.defineProperty(ld.prototype,"length",{get:o(function(){return DB(this),this.$$length},"get")}),Object.defineProperty(Ar.prototype,"textContent",{get:o(function(){return r(this)},"get"),set:o(function(e){switch(this.nodeType){case Ui:case qo:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}},"set")}),SM=o(function(e,t,n){e["$$"+t]=n},"__set__")}}catch{}var Hfe;pc.DocumentType=Eb;pc.DOMException=hn;pc.DOMImplementation=fM;pc.Element=hf;pc.Node=Ar;pc.NodeList=Mo;pc.XMLSerializer=yM});var EM=Q(fv=>{"use strict";var bM=sv().freeze;fv.XML_ENTITIES=bM({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});fv.HTML_ENTITIES=bM({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
70
|
+
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});fv.entityMap=fv.HTML_ENTITIES});var DM=Q(MB=>{"use strict";var mv=sv().NAMESPACE,FB=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,AM=new RegExp("[\\-\\.0-9"+FB.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),CM=new RegExp("^"+FB.source+AM.source+"*(?::"+FB.source+AM.source+"*)?$"),hv=0,dc=1,fd=2,pv=3,hd=4,pd=5,dv=6,Cb=7;function dd(r,e){this.message=r,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,dd)}o(dd,"ParseError");dd.prototype=new Error;dd.prototype.name=dd.name;function IM(){}o(IM,"XMLReader");IM.prototype={parse:o(function(r,e,t){var n=this.domBuilder;n.startDocument(),_M(e,e={}),Kfe(r,e,t,n,this.errorHandler),n.endDocument()},"parse")};function Kfe(r,e,t,n,s){function i(ee){if(ee>65535){ee-=65536;var he=55296+(ee>>10),we=56320+(ee&1023);return String.fromCharCode(he,we)}else return String.fromCharCode(ee)}o(i,"fixedFromCharCode");function a(ee){var he=ee.slice(1,-1);return Object.hasOwnProperty.call(t,he)?t[he]:he.charAt(0)==="#"?i(parseInt(he.substr(1).replace("x","0x"))):(s.error("entity not found:"+ee),ee)}o(a,"entityReplacer");function u(ee){if(ee>w){var he=r.substring(w,ee).replace(/&#?\w+;/g,a);g&&c(w),n.characters(he,0,ee-w),w=ee}}o(u,"appendText");function c(ee,he){for(;ee>=h&&(he=m.exec(r));)f=he.index,h=f+he[0].length,g.lineNumber++;g.columnNumber=ee-f+1}o(c,"position");for(var f=0,h=0,m=/.*(?:\r\n?|\n)|.*$/g,g=n.locator,x=[{currentNSMap:e}],v={},w=0;;){try{var S=r.indexOf("<",w);if(S<0){if(!r.substr(w).match(/^\s*$/)){var A=n.doc,N=A.createTextNode(r.substr(w));A.appendChild(N),n.currentElement=N}return}switch(S>w&&u(S),r.charAt(S+1)){case"/":var K=r.indexOf(">",S+3),b=r.substring(S+2,K).replace(/[ \t\n\r]+$/g,""),E=x.pop();K<0?(b=r.substring(S+2).replace(/[\s<].*/,""),s.error("end tag name: "+b+" is not complete:"+E.tagName),K=S+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),s.error("end tag name: "+b+" maybe not complete"),K=S+1+b.length);var C=E.localNSMap,_=E.tagName==b,M=_||E.tagName&&E.tagName.toLowerCase()==b.toLowerCase();if(M){if(n.endElement(E.uri,E.localName,b),C)for(var R in C)Object.prototype.hasOwnProperty.call(C,R)&&n.endPrefixMapping(R);_||s.fatalError("end tag name: "+b+" is not match the current start tagName:"+E.tagName)}else x.push(E);K++;break;case"?":g&&c(S),K=zfe(r,S,n);break;case"!":g&&c(S),K=Wfe(r,S,n,s);break;default:g&&c(S);var q=new BM,H=x[x.length-1].currentNSMap,K=$fe(r,S,q,H,a,s),G=q.length;if(!q.closed&&Gfe(r,K,q.tagName,v)&&(q.closed=!0,t.nbsp||s.warning("unclosed xml attribute")),g&&G){for(var pe=NM(g,{}),le=0;le<G;le++){var ue=q[le];c(ue.offset),ue.locator=NM(g,{})}n.locator=pe,TM(q,n,H)&&x.push(q),n.locator=g}else TM(q,n,H)&&x.push(q);mv.isHTML(q.uri)&&!q.closed?K=Xfe(r,K,q.tagName,a,n):K++}}catch(ee){if(ee instanceof dd)throw ee;s.error("element parse error: "+ee),K=-1}K>w?w=K:u(Math.max(S,w)+1)}}o(Kfe,"parse");function NM(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}o(NM,"copyLocator");function $fe(r,e,t,n,s,i){function a(x,v,w){t.attributeNames.hasOwnProperty(x)&&i.fatalError("Attribute "+x+" redefined"),t.addValue(x,v.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),w)}o(a,"addAttribute");for(var u,c,f=++e,h=hv;;){var m=r.charAt(f);switch(m){case"=":if(h===dc)u=r.slice(e,f),h=pv;else if(h===fd)h=pv;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(h===pv||h===dc)if(h===dc&&(i.warning('attribute value must after "="'),u=r.slice(e,f)),e=f+1,f=r.indexOf(m,e),f>0)c=r.slice(e,f),a(u,c,e-1),h=pd;else throw new Error("attribute value no end '"+m+"' match");else if(h==hd)c=r.slice(e,f),a(u,c,e),i.warning('attribute "'+u+'" missed start quot('+m+")!!"),e=f+1,h=pd;else throw new Error('attribute value must after "="');break;case"/":switch(h){case hv:t.setTagName(r.slice(e,f));case pd:case dv:case Cb:h=Cb,t.closed=!0;case hd:case dc:break;case fd:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),h==hv&&t.setTagName(r.slice(e,f)),f;case">":switch(h){case hv:t.setTagName(r.slice(e,f));case pd:case dv:case Cb:break;case hd:case dc:c=r.slice(e,f),c.slice(-1)==="/"&&(t.closed=!0,c=c.slice(0,-1));case fd:h===fd&&(c=u),h==hd?(i.warning('attribute "'+c+'" missed quot(")!'),a(u,c,e)):((!mv.isHTML(n[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),a(c,c,e));break;case pv:throw new Error("attribute value missed!!")}return f;case"\x80":m=" ";default:if(m<=" ")switch(h){case hv:t.setTagName(r.slice(e,f)),h=dv;break;case dc:u=r.slice(e,f),h=fd;break;case hd:var c=r.slice(e,f);i.warning('attribute "'+c+'" missed quot(")!!'),a(u,c,e);case pd:h=dv;break}else switch(h){case fd:var g=t.tagName;(!mv.isHTML(n[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),a(u,u,e),e=f,h=dc;break;case pd:i.warning('attribute space is required"'+u+'"!!');case dv:h=dc,e=f;break;case pv:h=hd,e=f;break;case Cb:throw new Error("elements closed character '/' and '>' must be connected to")}}f++}}o($fe,"parseElementStartPart");function TM(r,e,t){for(var n=r.tagName,s=null,m=r.length;m--;){var i=r[m],a=i.qName,u=i.value,g=a.indexOf(":");if(g>0)var c=i.prefix=a.slice(0,g),f=a.slice(g+1),h=c==="xmlns"&&f;else f=a,c=null,h=a==="xmlns"&&"";i.localName=f,h!==!1&&(s==null&&(s={},_M(t,t={})),t[h]=s[h]=u,i.uri=mv.XMLNS,e.startPrefixMapping(h,u))}for(var m=r.length;m--;){i=r[m];var c=i.prefix;c&&(c==="xml"&&(i.uri=mv.XML),c!=="xmlns"&&(i.uri=t[c||""]))}var g=n.indexOf(":");g>0?(c=r.prefix=n.slice(0,g),f=r.localName=n.slice(g+1)):(c=null,f=r.localName=n);var x=r.uri=t[c||""];if(e.startElement(x,f,n,r),r.closed){if(e.endElement(x,f,n),s)for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&e.endPrefixMapping(c)}else return r.currentNSMap=t,r.localNSMap=s,!0}o(TM,"appendElement");function Xfe(r,e,t,n,s){if(/^(?:script|textarea)$/i.test(t)){var i=r.indexOf("</"+t+">",e),a=r.substring(e+1,i);if(/[&<]/.test(a))return/^script$/i.test(t)?(s.characters(a,0,a.length),i):(a=a.replace(/&#?\w+;/g,n),s.characters(a,0,a.length),i)}return e+1}o(Xfe,"parseHtmlSpecialContent");function Gfe(r,e,t,n){var s=n[t];return s==null&&(s=r.lastIndexOf("</"+t+">"),s<e&&(s=r.lastIndexOf("</"+t)),n[t]=s),s<e}o(Gfe,"fixSelfClosed");function _M(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(_M,"_copy");function Wfe(r,e,t,n){var s=r.charAt(e+2);switch(s){case"-":if(r.charAt(e+3)==="-"){var i=r.indexOf("-->",e+4);return i>e?(t.comment(r,e+4,i-e-4),i+3):(n.error("Unclosed comment"),-1)}else return-1;default:if(r.substr(e+3,6)=="CDATA["){var i=r.indexOf("]]>",e+9);return t.startCDATA(),t.characters(r,e+9,i-e-9),t.endCDATA(),i+3}var a=Jfe(r,e),u=a.length;if(u>1&&/!doctype/i.test(a[0][0])){var c=a[1][0],f=!1,h=!1;u>3&&(/^public$/i.test(a[2][0])?(f=a[3][0],h=u>4&&a[4][0]):/^system$/i.test(a[2][0])&&(h=a[3][0]));var m=a[u-1];return t.startDTD(c,f,h),t.endDTD(),m.index+m[0].length}}return-1}o(Wfe,"parseDCC");function zfe(r,e,t){var n=r.indexOf("?>",e);if(n){var s=r.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(s){var i=s[0].length;return t.processingInstruction(s[1],s[2]),n+2}else return-1}return-1}o(zfe,"parseInstruction");function BM(){this.attributeNames={}}o(BM,"ElementAttributes");BM.prototype={setTagName:o(function(r){if(!CM.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},"setTagName"),addValue:o(function(r,e,t){if(!CM.test(r))throw new Error("invalid attribute:"+r);this.attributeNames[r]=this.length,this[this.length++]={qName:r,value:e,offset:t}},"addValue"),length:0,getLocalName:o(function(r){return this[r].localName},"getLocalName"),getLocator:o(function(r){return this[r].locator},"getLocator"),getQName:o(function(r){return this[r].qName},"getQName"),getURI:o(function(r){return this[r].uri},"getURI"),getValue:o(function(r){return this[r].value},"getValue")};function Jfe(r,e){var t,n=[],s=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(s.lastIndex=e,s.exec(r);t=s.exec(r);)if(n.push(t),t[1])return n}o(Jfe,"split");MB.XMLReader=IM;MB.ParseError=dd});var UM=Q(Tb=>{"use strict";var Yfe=sv(),Qfe=jB(),RM=EM(),kM=DM(),Zfe=Qfe.DOMImplementation,OM=Yfe.NAMESPACE,ehe=kM.ParseError,the=kM.XMLReader;function LM(r){return r.replace(/\r[\n\u0085]/g,`
|
|
71
|
+
`).replace(/[\r\u0085\u2028]/g,`
|
|
72
|
+
`)}o(LM,"normalizeLineEndings");function VM(r){this.options=r||{locator:{}}}o(VM,"DOMParser");VM.prototype.parseFromString=function(r,e){var t=this.options,n=new the,s=t.domBuilder||new gv,i=t.errorHandler,a=t.locator,u=t.xmlns||{},c=/\/x?html?$/.test(e),f=c?RM.HTML_ENTITIES:RM.XML_ENTITIES;a&&s.setDocumentLocator(a),n.errorHandler=rhe(i,s,a),n.domBuilder=t.domBuilder||s,c&&(u[""]=OM.HTML),u.xml=u.xml||OM.XML;var h=t.normalizeLineEndings||LM;return r&&typeof r=="string"?n.parse(h(r),u,f):n.errorHandler.error("invalid doc source"),s.doc};function rhe(r,e,t){if(!r){if(e instanceof gv)return e;r=e}var n={},s=r instanceof Function;t=t||{};function i(a){var u=r[a];!u&&s&&(u=r.length==2?function(c){r(a,c)}:r),n[a]=u&&function(c){u("[xmldom "+a+"] "+c+qB(t))}||function(){}}return o(i,"build"),i("warning"),i("error"),i("fatalError"),n}o(rhe,"buildErrorHandler");function gv(){this.cdata=!1}o(gv,"DOMHandler");function md(r,e){e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber}o(md,"position");gv.prototype={startDocument:o(function(){this.doc=new Zfe().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},"startDocument"),startElement:o(function(r,e,t,n){var s=this.doc,i=s.createElementNS(r,t||e),a=n.length;Nb(this,i),this.currentElement=i,this.locator&&md(this.locator,i);for(var u=0;u<a;u++){var r=n.getURI(u),c=n.getValue(u),t=n.getQName(u),f=s.createAttributeNS(r,t);this.locator&&md(n.getLocator(u),f),f.value=f.nodeValue=c,i.setAttributeNode(f)}},"startElement"),endElement:o(function(r,e,t){var n=this.currentElement,s=n.tagName;this.currentElement=n.parentNode},"endElement"),startPrefixMapping:o(function(r,e){},"startPrefixMapping"),endPrefixMapping:o(function(r){},"endPrefixMapping"),processingInstruction:o(function(r,e){var t=this.doc.createProcessingInstruction(r,e);this.locator&&md(this.locator,t),Nb(this,t)},"processingInstruction"),ignorableWhitespace:o(function(r,e,t){},"ignorableWhitespace"),characters:o(function(r,e,t){if(r=PM.apply(this,arguments),r){if(this.cdata)var n=this.doc.createCDATASection(r);else var n=this.doc.createTextNode(r);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(r)&&this.doc.appendChild(n),this.locator&&md(this.locator,n)}},"characters"),skippedEntity:o(function(r){},"skippedEntity"),endDocument:o(function(){this.doc.normalize()},"endDocument"),setDocumentLocator:o(function(r){(this.locator=r)&&(r.lineNumber=0)},"setDocumentLocator"),comment:o(function(r,e,t){r=PM.apply(this,arguments);var n=this.doc.createComment(r);this.locator&&md(this.locator,n),Nb(this,n)},"comment"),startCDATA:o(function(){this.cdata=!0},"startCDATA"),endCDATA:o(function(){this.cdata=!1},"endCDATA"),startDTD:o(function(r,e,t){var n=this.doc.implementation;if(n&&n.createDocumentType){var s=n.createDocumentType(r,e,t);this.locator&&md(this.locator,s),Nb(this,s),this.doc.doctype=s}},"startDTD"),warning:o(function(r){console.warn("[xmldom warning] "+r,qB(this.locator))},"warning"),error:o(function(r){console.error("[xmldom error] "+r,qB(this.locator))},"error"),fatalError:o(function(r){throw new ehe(r,this.locator)},"fatalError")};function qB(r){if(r)return`
|
|
73
|
+
@`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}o(qB,"_locator");function PM(r,e,t){return typeof r=="string"?r.substr(e,t):r.length>=e+t||e?new java.lang.String(r,e,t)+"":r}o(PM,"_toString");"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){gv.prototype[r]=function(){return null}});function Nb(r,e){r.currentElement?r.currentElement.appendChild(e):r.doc.appendChild(e)}o(Nb,"appendElement");Tb.__DOMHandler=gv;Tb.normalizeLineEndings=LM;Tb.DOMParser=VM});var HB=Q(Ib=>{"use strict";var jM=jB();Ib.DOMImplementation=jM.DOMImplementation;Ib.XMLSerializer=jM.XMLSerializer;Ib.DOMParser=UM().DOMParser});var FM=Q(Bb=>{"use strict";Object.defineProperty(Bb,"__esModule",{value:!0});Bb.EnvelopedSignature=void 0;var _b=gb(),KB=sd(),nhe=class{static{o(this,"EnvelopedSignature")}constructor(){this.includeComments=!1,this.includeComments=!1}process(e,t){if(t.signatureNode==null){let i=_b.select1("./*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);return KB.isNodeLike(i)&&i.parentNode&&i.parentNode.removeChild(i),e}let n=t.signatureNode,s=_b.select1(".//*[local-name(.)='SignatureValue']/text()",n);if(KB.isTextNode(s)){let i=s.data,a=_b.select(".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);for(let u of Array.isArray(a)?a:[]){let c=_b.select1(".//*[local-name(.)='SignatureValue']/text()",u);if(KB.isTextNode(c)){let f=c.data;i===f&&u.parentNode&&u.parentNode.removeChild(u)}}}return e}getAlgorithmName(){return"http://www.w3.org/2000/09/xmldsig#enveloped-signature"}};Bb.EnvelopedSignature=nhe});var MM=Q(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.Sha512=mc.Sha256=mc.Sha1=void 0;var $B=require("crypto"),she=class{static{o(this,"Sha1")}constructor(){this.getHash=function(e){let t=$B.createHash("sha1");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2000/09/xmldsig#sha1"}}};mc.Sha1=she;var ihe=class{static{o(this,"Sha256")}constructor(){this.getHash=function(e){let t=$B.createHash("sha256");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha256"}}};mc.Sha256=ihe;var ahe=class{static{o(this,"Sha512")}constructor(){this.getHash=function(e){let t=$B.createHash("sha512");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha512"}}};mc.Sha512=ahe});var XB=Q(Db=>{"use strict";Object.defineProperty(Db,"__esModule",{value:!0});Db.createOptionalCallbackFunction=void 0;function ohe(r){return typeof r=="function"}o(ohe,"isErrorFirstCallback");function uhe(r){return(...e)=>{let t=e[e.length-1];if(ohe(t))try{let n=r(...e.slice(0,-1));t(null,n)}catch(n){t(n instanceof Error?n:new Error("Unknown error"))}else return r(...e)}}o(uhe,"createOptionalCallbackFunction");Db.createOptionalCallbackFunction=uhe});var qM=Q(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.HmacSha1=so.RsaSha512=so.RsaSha256=so.RsaSha1=void 0;var gc=require("crypto"),vc=XB(),che=class{static{o(this,"RsaSha1")}constructor(){this.getSignature=(0,vc.createOptionalCallbackFunction)((e,t)=>{let n=gc.createSign("RSA-SHA1");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,vc.createOptionalCallbackFunction)((e,t,n)=>{let s=gc.createVerify("RSA-SHA1");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2000/09/xmldsig#rsa-sha1"}};so.RsaSha1=che;var lhe=class{static{o(this,"RsaSha256")}constructor(){this.getSignature=(0,vc.createOptionalCallbackFunction)((e,t)=>{let n=gc.createSign("RSA-SHA256");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,vc.createOptionalCallbackFunction)((e,t,n)=>{let s=gc.createVerify("RSA-SHA256");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"}};so.RsaSha256=lhe;var fhe=class{static{o(this,"RsaSha512")}constructor(){this.getSignature=(0,vc.createOptionalCallbackFunction)((e,t)=>{let n=gc.createSign("RSA-SHA512");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,vc.createOptionalCallbackFunction)((e,t,n)=>{let s=gc.createVerify("RSA-SHA512");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"}};so.RsaSha512=fhe;var hhe=class{static{o(this,"HmacSha1")}constructor(){this.getSignature=(0,vc.createOptionalCallbackFunction)((e,t)=>{let n=gc.createHmac("SHA1",t);return n.update(e),n.digest("base64")}),this.verifySignature=(0,vc.createOptionalCallbackFunction)((e,t,n)=>{let s=gc.createHmac("SHA1",t);return s.update(e),s.digest("base64")===n}),this.getAlgorithmName=()=>"http://www.w3.org/2000/09/xmldsig#hmac-sha1"}};so.HmacSha1=hhe});var $M=Q(Ob=>{"use strict";Object.defineProperty(Ob,"__esModule",{value:!0});Ob.SignedXml=void 0;var li=sd(),pf=HB(),phe=require("util"),ji=gb(),HM=AB(),dhe=FM(),KM=TB(),GB=MM(),Rb=qM(),vr=nv(),WB=class gd{static{o(this,"SignedXml")}constructor(e={}){this.signatureAlgorithm=void 0,this.canonicalizationAlgorithm=void 0,this.inclusiveNamespacesPrefixList=[],this.namespaceResolver={lookupNamespaceURI:o(function(){throw new Error("Not implemented")},"lookupNamespaceURI")},this.implicitTransforms=[],this.keyInfoAttributes={},this.getKeyInfoContent=gd.getKeyInfoContent,this.getCertFromKeyInfo=gd.getCertFromKeyInfo,this.id=0,this.signedXml="",this.signatureXml="",this.signatureNode=null,this.signatureValue="",this.originalXmlWithIds="",this.keyInfo=null,this.references=[],this.signedReferences=[],this.CanonicalizationAlgorithms={"http://www.w3.org/TR/2001/REC-xml-c14n-20010315":HM.C14nCanonicalization,"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments":HM.C14nCanonicalizationWithComments,"http://www.w3.org/2001/10/xml-exc-c14n#":KM.ExclusiveCanonicalization,"http://www.w3.org/2001/10/xml-exc-c14n#WithComments":KM.ExclusiveCanonicalizationWithComments,"http://www.w3.org/2000/09/xmldsig#enveloped-signature":dhe.EnvelopedSignature},this.HashAlgorithms={"http://www.w3.org/2000/09/xmldsig#sha1":GB.Sha1,"http://www.w3.org/2001/04/xmlenc#sha256":GB.Sha256,"http://www.w3.org/2001/04/xmlenc#sha512":GB.Sha512},this.SignatureAlgorithms={"http://www.w3.org/2000/09/xmldsig#rsa-sha1":Rb.RsaSha1,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256":Rb.RsaSha256,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512":Rb.RsaSha512};let{idMode:t,idAttribute:n,privateKey:s,publicCert:i,signatureAlgorithm:a,canonicalizationAlgorithm:u,inclusiveNamespacesPrefixList:c,implicitTransforms:f,keyInfoAttributes:h,getKeyInfoContent:m,getCertFromKeyInfo:g}=e;this.idMode=t,this.idAttributes=["Id","ID","id"],n&&this.idAttributes.unshift(n),this.privateKey=s,this.publicCert=i,this.signatureAlgorithm=a??this.signatureAlgorithm,this.canonicalizationAlgorithm=u,typeof c=="string"?this.inclusiveNamespacesPrefixList=c.split(" "):vr.isArrayHasLength(c)&&(this.inclusiveNamespacesPrefixList=c),this.implicitTransforms=f??this.implicitTransforms,this.keyInfoAttributes=h??this.keyInfoAttributes,this.getKeyInfoContent=m??this.getKeyInfoContent,this.getCertFromKeyInfo=g??gd.noop,this.CanonicalizationAlgorithms,this.HashAlgorithms,this.SignatureAlgorithms}enableHMAC(){this.SignatureAlgorithms={"http://www.w3.org/2000/09/xmldsig#hmac-sha1":Rb.HmacSha1},this.getKeyInfoContent=gd.noop}static getKeyInfoContent({publicCert:e,prefix:t}){if(e==null)return null;t=t?`${t}:`:"";let n="";Buffer.isBuffer(e)&&(e=e.toString("latin1"));let s=[];return typeof e=="string"&&(s=e.match(vr.EXTRACT_X509_CERTS)||[]),s.length>0&&(n=s.map(i=>`<${t}X509Certificate>${vr.pemToDer(i).toString("base64")}</${t}X509Certificate>`).join("")),`<${t}X509Data>${n}</${t}X509Data>`}static getCertFromKeyInfo(e){if(e!=null){let t=ji.select1(".//*[local-name(.)='X509Certificate']",e);if(li.isNodeLike(t))return vr.derToPem(t.textContent??"","CERTIFICATE")}return null}checkSignature(e,t){if(t!=null&&typeof t!="function")throw new Error("Last parameter must be a callback function");this.signedXml=e;let n=new pf.DOMParser().parseFromString(e);this.references=[];let s=this.getCanonSignedInfoXml(n);if(!s){if(t){t(new Error("Canonical signed info cannot be empty"),!1);return}throw new Error("Canonical signed info cannot be empty")}let a=new pf.DOMParser().parseFromString(s,"text/xml").documentElement;if(!a){if(t){t(new Error("Could not parse unverifiedSignedInfoCanon into a document"),!1);return}throw new Error("Could not parse unverifiedSignedInfoCanon into a document")}let u=vr.findChildren(a,"Reference");if(!vr.isArrayHasLength(u)){if(t){t(new Error("could not find any Reference elements"),!1);return}throw new Error("could not find any Reference elements")}for(let m of u)this.loadReference(m);if(!this.getReferences().every(m=>this.validateReference(m,n))){if(this.signedReferences=[],this.references.forEach(m=>{m.signedReference=void 0}),t){t(new Error("Could not validate all references"),!1);return}return!1}let c=this.findSignatureAlgorithm(this.signatureAlgorithm),f=this.getCertFromKeyInfo(this.keyInfo)||this.publicCert||this.privateKey;if(f==null)throw new Error("KeyInfo or publicCert or privateKey is required to validate signature");if(c.verifySignature(s,f,this.signatureValue)===!0)if(t)t(null,!0);else return!0;else if(this.signedReferences=[],this.references.forEach(m=>{m.signedReference=void 0}),t){t(new Error(`invalid signature: the signature value ${this.signatureValue} is incorrect`));return}else throw new Error(`invalid signature: the signature value ${this.signatureValue} is incorrect`)}getCanonSignedInfoXml(e){if(this.signatureNode==null)throw new Error("No signature found.");if(typeof this.canonicalizationAlgorithm!="string")throw new Error("Missing canonicalizationAlgorithm when trying to get signed info for XML");let t=vr.findChildren(this.signatureNode,"SignedInfo");if(t.length===0)throw new Error("could not find SignedInfo element in the message");if(t.length>1)throw new Error("could not get canonicalized signed info for a signature that contains multiple SignedInfo nodes");if((this.canonicalizationAlgorithm==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"||this.canonicalizationAlgorithm==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments")&&(!e||typeof e!="object"))throw new Error("When canonicalization method is non-exclusive, whole xml dom must be provided as an argument");let s={ancestorNamespaces:vr.findAncestorNs(e,"//*[local-name()='SignedInfo']")};return this.getCanonXml([this.canonicalizationAlgorithm],t[0],s)}getCanonReferenceXml(e,t,n){Array.isArray(t.transforms)&&(t.ancestorNamespaces=vr.findAncestorNs(e,t.xpath,this.namespaceResolver));let s={inclusiveNamespacesPrefixList:t.inclusiveNamespacesPrefixList,ancestorNamespaces:t.ancestorNamespaces};return this.getCanonXml(t.transforms,n,s)}calculateSignatureValue(e,t){let n=this.getCanonSignedInfoXml(e),s=this.findSignatureAlgorithm(this.signatureAlgorithm);if(this.privateKey==null)throw new Error("Private key is required to compute signature");typeof t=="function"?s.getSignature(n,this.privateKey,t):this.signatureValue=s.getSignature(n,this.privateKey)}findSignatureAlgorithm(e){if(e==null)throw new Error("signatureAlgorithm is required");let t=this.SignatureAlgorithms[e];if(t)return new t;throw new Error(`signature algorithm '${e}' is not supported`)}findCanonicalizationAlgorithm(e){if(e!=null){let t=this.CanonicalizationAlgorithms[e];if(t)return new t}throw new Error(`canonicalization algorithm '${e}' is not supported`)}findHashAlgorithm(e){let t=this.HashAlgorithms[e];if(t)return new t;throw new Error(`hash algorithm '${e}' is not supported`)}validateElementAgainstReferences(e,t){let n;if(typeof e=="string"){let s=ji.select1(e,t);li.assertIsElementNode(s),n=s}else n=e;for(let s of this.getReferences()){let i=s.uri?.[0]==="#"?s.uri.substring(1):s.uri;for(let f of this.idAttributes){let h=n.getAttribute(f);if(i===h){s.xpath=`//*[@*[local-name(.)='${f}']='${i}']`;break}}let a=this.getCanonReferenceXml(t,s,n),c=this.findHashAlgorithm(s.digestAlgorithm).getHash(a);if(vr.validateDigestValue(c,s.digestValue))return s}throw new Error("No references passed validation")}validateReference(e,t){let n=e.uri?.[0]==="#"?e.uri.substring(1):e.uri,s=null;if(n==="")s=ji.select1("//*",t);else{if(n?.indexOf("'")!==-1)throw new Error("Cannot validate a uri with quotes inside it");{let c=0;for(let f of this.idAttributes){let h=`//*[@*[local-name(.)='${f}']='${n}']`,m=ji.select(h,t);if(vr.isArrayHasLength(m)){if(c+=m.length,c>1)throw new Error("Cannot validate a document which contains multiple elements with the same value for the ID / Id / Id attributes, in order to prevent signature wrapping attack.");s=m[0],e.xpath=h}}}}if(e.getValidatedNode=(0,phe.deprecate)(c=>{if(c=c||e.xpath,typeof c!="string"||e.validationError!=null)return null;let f=ji.select1(c,t);return li.isNodeLike(f)?f:null},"`ref.getValidatedNode()` is deprecated and insecure. Use `ref.signedReference` or `this.getSignedReferences()` instead."),!li.isNodeLike(s)){let c=new Error(`invalid signature: the signature references an element with uri ${e.uri} but could not find such element in the xml`);return e.validationError=c,!1}let i=this.getCanonReferenceXml(t,e,s),u=this.findHashAlgorithm(e.digestAlgorithm).getHash(i);if(!vr.validateDigestValue(u,e.digestValue)){let c=new Error(`invalid signature: for uri ${e.uri} calculated digest is ${u} but the xml to validate supplies digest ${e.digestValue}`);return e.validationError=c,!1}return this.signedReferences.push(i),e.signedReference=i,!0}findSignatures(e){let t=ji.select("//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);return li.isArrayOfNodes(t)?t:[]}loadSignature(e){typeof e=="string"?this.signatureNode=e=new pf.DOMParser().parseFromString(e):this.signatureNode=e,this.signatureXml=e.toString();let t=ji.select1(".//*[local-name(.)='CanonicalizationMethod']/@Algorithm",e);if(!li.isNodeLike(t))throw new Error("could not find CanonicalizationMethod/@Algorithm element");li.isAttributeNode(t)&&(this.canonicalizationAlgorithm=t.value);let n=ji.select1(".//*[local-name(.)='SignatureMethod']/@Algorithm",e);li.isAttributeNode(n)&&(this.signatureAlgorithm=n.value);let s=vr.findChildren(this.signatureNode,"SignedInfo");if(!vr.isArrayHasLength(s))throw new Error("no signed info node found");if(s.length>1)throw new Error("could not load signature that contains multiple SignedInfo nodes");let i=this.canonicalizationAlgorithm;(!i||i==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"||i==="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments")&&(i="http://www.w3.org/2001/10/xml-exc-c14n#");let a=this.getCanonXml([i],s[0]),c=new pf.DOMParser().parseFromString(a,"text/xml").documentElement;this.references=[];let f=vr.findChildren(c,"Reference");if(!vr.isArrayHasLength(f))throw new Error("could not find any Reference elements");for(let g of f)this.loadReference(g);let h=ji.select1(".//*[local-name(.)='SignatureValue']/text()",e);li.isTextNode(h)&&(this.signatureValue=h.data.replace(/\r?\n/g,""));let m=ji.select1(".//*[local-name(.)='KeyInfo']",e);li.isNodeLike(m)&&(this.keyInfo=m)}loadReference(e){let t=vr.findChildren(e,"DigestMethod");if(t.length===0)throw new Error(`could not find DigestMethod in reference ${e.toString()}`);let n=t[0],s=vr.findAttr(n,"Algorithm");if(!s)throw new Error(`could not find Algorithm attribute in node ${n.toString()}`);let i=s.value;if(t=vr.findChildren(e,"DigestValue"),t.length===0)throw new Error(`could not find DigestValue node in reference ${e.toString()}`);if(t.length>1)throw new Error(`could not load reference for a node that contains multiple DigestValue nodes: ${e.toString()}`);let a=t[0].textContent;if(!a)throw new Error(`could not find the value of DigestValue in ${e.toString()}`);let u=[],c=[];if(t=vr.findChildren(e,"Transforms"),t.length!==0){let h=t[0],m=vr.findChildren(h,"Transform");for(let x of m){let v=vr.findAttr(x,"Algorithm");v&&u.push(v.value)}let g=vr.findChildren(m[m.length-1],"InclusiveNamespaces");vr.isArrayHasLength(g)&&(c=g.flatMap(x=>(x.getAttribute("PrefixList")??"").split(" ")).filter(x=>x.length>0))}vr.isArrayHasLength(this.implicitTransforms)&&this.implicitTransforms.forEach(function(h){u.push(h)}),(u.length===0||u[u.length-1]==="http://www.w3.org/2000/09/xmldsig#enveloped-signature")&&u.push("http://www.w3.org/TR/2001/REC-xml-c14n-20010315");let f=li.isElementNode(e)&&e.getAttribute("URI")||void 0;this.addReference({transforms:u,digestAlgorithm:i,uri:f,digestValue:a,inclusiveNamespacesPrefixList:c,isEmptyUri:!1})}addReference({xpath:e,transforms:t,digestAlgorithm:n,uri:s="",digestValue:i,inclusiveNamespacesPrefixList:a=[],isEmptyUri:u=!1}){if(n==null)throw new Error("digestAlgorithm is required");if(!vr.isArrayHasLength(t))throw new Error("transforms must contain at least one transform algorithm");this.references.push({xpath:e,transforms:t,digestAlgorithm:n,uri:s,digestValue:i,inclusiveNamespacesPrefixList:a,isEmptyUri:u,getValidatedNode:o(()=>{throw new Error("Reference has not been validated yet; Did you call `sig.checkSignature()`?")},"getValidatedNode")})}getReferences(){return this.references}getSignedReferences(){return[...this.signedReferences]}computeSignature(e,t,n){let s;typeof t=="function"&&n==null?(s=t,t={}):(s=n,t=t??{});let i=new pf.DOMParser().parseFromString(e),a="xmlns",u=[],c,f=["append","prepend","before","after"],h=t.prefix,m=t.attrs||{},g=t.location||{},x=t.existingPrefixes||{};if(this.namespaceResolver={lookupNamespaceURI:o(function(_){return _?x[_]:null},"lookupNamespaceURI")},g.reference=g.reference||"/*",g.action=g.action||"append",f.indexOf(g.action)===-1){let _=new Error(`location.action option has an invalid action: ${g.action}, must be any of the following values: ${f.join(", ")}`);if(s){s(_);return}else throw _}h?(a+=`:${h}`,c=`${h}:`):c="",Object.keys(m).forEach(function(_){_!=="xmlns"&&_!==a&&u.push(`${_}="${m[_]}"`)}),u.push(`${a}="http://www.w3.org/2000/09/xmldsig#"`);let v=`<${c}Signature ${u.join(" ")}>`;v+=this.createSignedInfo(i,h),v+=this.getKeyInfo(h),v+=`</${c}Signature>`,this.originalXmlWithIds=i.toString();let w="";Object.keys(x).forEach(function(_){w+=`xmlns:${_}="${x[_]}" `});let S=`<Dummy ${w}>${v}</Dummy>`,N=new pf.DOMParser().parseFromString(S).documentElement.firstChild,b=ji.select1(g.reference,i);if(!li.isNodeLike(b)){let _=new Error(`the following xpath cannot be used because it was not found: ${g.reference}`);if(s){s(_);return}else throw _}if(g.action==="append")b.appendChild(N);else if(g.action==="prepend")b.insertBefore(N,b.firstChild);else if(g.action==="before"){if(b.parentNode==null)throw new Error("`location.reference` refers to the root node (by default), so we can't insert `before`");b.parentNode.insertBefore(N,b)}else if(g.action==="after"){if(b.parentNode==null)throw new Error("`location.reference` refers to the root node (by default), so we can't insert `after`");b.parentNode.insertBefore(N,b.nextSibling)}this.signatureNode=N;let E=vr.findChildren(this.signatureNode,"SignedInfo");if(E.length===0){let _=new Error("could not find SignedInfo element in the message");if(s){s(_);return}else throw _}let C=E[0];typeof s=="function"?this.calculateSignatureValue(i,(_,M)=>{_?s(_):(this.signatureValue=M||"",N.insertBefore(this.createSignature(h),C.nextSibling),this.signatureXml=N.toString(),this.signedXml=i.toString(),s(null,this))}):(this.calculateSignatureValue(i),N.insertBefore(this.createSignature(h),C.nextSibling),this.signatureXml=N.toString(),this.signedXml=i.toString())}getKeyInfo(e){let t=e?`${e}:`:"",n="";this.keyInfoAttributes&&Object.keys(this.keyInfoAttributes).forEach(i=>{n+=` ${i}="${this.keyInfoAttributes[i]}"`});let s=this.getKeyInfoContent({publicCert:this.publicCert,prefix:e});return n||s?`<${t}KeyInfo${n}>${s}</${t}KeyInfo>`:""}createReferences(e,t){let n="";t=t||"",t=t&&`${t}:`;for(let s of this.getReferences()){let i=ji.selectWithResolver(s.xpath??"",e,this.namespaceResolver);if(!vr.isArrayHasLength(i))throw new Error(`the following xpath cannot be signed because it was not found: ${s.xpath}`);for(let a of i){if(s.isEmptyUri)n+=`<${t}Reference URI="">`;else{let f=this.ensureHasId(a);s.uri=f,n+=`<${t}Reference URI="#${f}">`}n+=`<${t}Transforms>`;for(let f of s.transforms||[]){let h=this.findCanonicalizationAlgorithm(f);n+=`<${t}Transform Algorithm="${h.getAlgorithmName()}"`,vr.isArrayHasLength(s.inclusiveNamespacesPrefixList)?(n+=">",n+=`<InclusiveNamespaces PrefixList="${s.inclusiveNamespacesPrefixList.join(" ")}" xmlns="${h.getAlgorithmName()}"/>`,n+=`</${t}Transform>`):n+=" />"}let u=this.getCanonReferenceXml(e,s,a),c=this.findHashAlgorithm(s.digestAlgorithm);n+=`</${t}Transforms><${t}DigestMethod Algorithm="${c.getAlgorithmName()}" /><${t}DigestValue>${c.getHash(u)}</${t}DigestValue></${t}Reference>`}}return n}getCanonXml(e,t,n={}){n.defaultNsForPrefix=n.defaultNsForPrefix??gd.defaultNsForPrefix,n.signatureNode=this.signatureNode;let i=t.cloneNode(!0);return e.forEach(a=>{li.isNodeLike(i)&&(i=this.findCanonicalizationAlgorithm(a).process(i,n))}),i.toString()}ensureHasId(e){let t;if(this.idMode==="wssecurity"?t=vr.findAttr(e,"Id","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"):this.idAttributes.some(s=>(t=vr.findAttr(e,s),!!t)),t)return t.value;let n=`_${this.id++}`;return this.idMode==="wssecurity"?(e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:wsu","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"),e.setAttributeNS("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd","wsu:Id",n)):e.setAttribute("Id",n),n}createSignedInfo(e,t){if(typeof this.canonicalizationAlgorithm!="string")throw new Error("Missing canonicalizationAlgorithm when trying to create signed info for XML");let n=this.findCanonicalizationAlgorithm(this.canonicalizationAlgorithm),s=this.findSignatureAlgorithm(this.signatureAlgorithm),i;i=t||"",i=i&&`${i}:`;let a=`<${i}SignedInfo>`;return a+=`<${i}CanonicalizationMethod Algorithm="${n.getAlgorithmName()}"`,vr.isArrayHasLength(this.inclusiveNamespacesPrefixList)?(a+=">",a+=`<InclusiveNamespaces PrefixList="${this.inclusiveNamespacesPrefixList.join(" ")}" xmlns="${n.getAlgorithmName()}"/>`,a+=`</${i}CanonicalizationMethod>`):a+=" />",a+=`<${i}SignatureMethod Algorithm="${s.getAlgorithmName()}" />`,a+=this.createReferences(e,t),a+=`</${i}SignedInfo>`,a}createSignature(e){let t="xmlns";e?(t+=`:${e}`,e+=":"):e="";let n=`<${e}SignatureValue>${this.signatureValue}</${e}SignatureValue>`,s=`<${e}Signature ${t}="http://www.w3.org/2000/09/xmldsig#">${n}</${e}Signature>`;return new pf.DOMParser().parseFromString(s).documentElement.firstChild}getSignatureXml(){return this.signatureXml}getOriginalXmlWithIds(){return this.originalXmlWithIds}getSignedXml(){return this.signedXml}};Ob.SignedXml=WB;WB.defaultNsForPrefix={ds:"http://www.w3.org/2000/09/xmldsig#"};WB.noop=()=>null});var zB=Q(Un=>{"use strict";var mhe=Un&&Un.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),XM=Un&&Un.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&mhe(e,r,t)};Object.defineProperty(Un,"__esModule",{value:!0});Un.SignedXml=Un.ExclusiveCanonicalizationWithComments=Un.ExclusiveCanonicalization=Un.C14nCanonicalizationWithComments=Un.C14nCanonicalization=void 0;var GM=AB();Object.defineProperty(Un,"C14nCanonicalization",{enumerable:!0,get:o(function(){return GM.C14nCanonicalization},"get")});Object.defineProperty(Un,"C14nCanonicalizationWithComments",{enumerable:!0,get:o(function(){return GM.C14nCanonicalizationWithComments},"get")});var WM=TB();Object.defineProperty(Un,"ExclusiveCanonicalization",{enumerable:!0,get:o(function(){return WM.ExclusiveCanonicalization},"get")});Object.defineProperty(Un,"ExclusiveCanonicalizationWithComments",{enumerable:!0,get:o(function(){return WM.ExclusiveCanonicalizationWithComments},"get")});var ghe=$M();Object.defineProperty(Un,"SignedXml",{enumerable:!0,get:o(function(){return ghe.SignedXml},"get")});XM(XB(),Un);XM(nv(),Un)});var YM=Q(kb=>{"use strict";Object.defineProperty(kb,"__esModule",{value:!0});kb.WSSecurityCert=void 0;var vhe=require("crypto"),yhe=zB();function xhe(r,e){return new Date(r.getTime()+e*6e4)}o(xhe,"addMinutes");function zM(r){return r.getUTCFullYear()+"-"+("0"+(r.getUTCMonth()+1)).slice(-2)+"-"+("0"+r.getUTCDate()).slice(-2)+"T"+("0"+r.getUTCHours()).slice(-2)+":"+("0"+r.getUTCMinutes()).slice(-2)+":"+("0"+r.getUTCSeconds()).slice(-2)+"Z"}o(zM,"dateStringForSOAP");function whe(){return zM(new Date)}o(whe,"generateCreated");function She(){return zM(xhe(new Date,10))}o(She,"generateExpires");function Pb(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(Pb,"insertStr");function bhe(){return(0,vhe.randomUUID)().replace(/-/gm,"")}o(bhe,"generateId");function Ehe(r,e){for(let t of r)t.xpath===JM&&(t.xpath=e)}o(Ehe,"resolvePlaceholderInReferences");var yc="http://docs.oasis-open.org/wss/2004/01",JM="[[bodyXpath]]",Ahe=class{static{o(this,"WSSecurityCert")}constructor(e,t,n,s={}){if(this.signerOptions={},this.additionalReferences=[],this.excludeReferencesFromSigning=[],this.publicP12PEM=t.toString().replace("-----BEGIN CERTIFICATE-----","").replace("-----END CERTIFICATE-----","").replace(/(\r\n|\n|\r)/gm,""),this.signer=new yhe.SignedXml({idMode:s?.signerOptions?.idMode,signatureAlgorithm:s?.signatureAlgorithm}),this.signer.digestAlgorithm=s.digestAlgorithm??"http://www.w3.org/2001/04/xmlenc#sha256",s.signatureAlgorithm==="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&&(this.signer.signatureAlgorithm=s.signatureAlgorithm,this.signer.addReference({xpath:JM,transforms:["http://www.w3.org/2001/10/xml-exc-c14n#"],digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"})),s.signatureAlgorithm||(this.signer.signatureAlgorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"),this.signer.canonicalizationAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#",s.additionalReferences&&s.additionalReferences.length>0&&(this.additionalReferences=s.additionalReferences),s.excludeReferencesFromSigning&&s.excludeReferencesFromSigning.length>0&&(this.excludeReferencesFromSigning=s.excludeReferencesFromSigning),s.signerOptions){let{signerOptions:i}=s;this.signerOptions=i,this.signerOptions.existingPrefixes||(this.signerOptions.existingPrefixes={}),this.signerOptions.existingPrefixes&&!this.signerOptions.existingPrefixes.wsse&&(this.signerOptions.existingPrefixes.wsse=`${yc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`)}else this.signerOptions={existingPrefixes:{wsse:`${yc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`}};this.signer.privateKey={key:e,passphrase:n},this.x509Id=`x509-${bhe()}`,this.hasTimeStamp=typeof s.hasTimeStamp>"u"?!0:!!s.hasTimeStamp,this.signatureTransformations=Array.isArray(s.signatureTransformations)?s.signatureTransformations:["http://www.w3.org/2000/09/xmldsig#enveloped-signature","http://www.w3.org/2001/10/xml-exc-c14n#"],this.signer.getKeyInfoContent=()=>`<wsse:SecurityTokenReference><wsse:Reference URI="#${this.x509Id}" ValueType="${yc}/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference>`}postProcess(e,t){this.created=whe(),this.expires=She();let n="";this.hasTimeStamp&&(n=`<Timestamp xmlns="${yc}/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Created>${this.created}</Created><Expires>${this.expires}</Expires></Timestamp>`);let s=`<wsse:BinarySecurityToken EncodingType="${yc}/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="${yc}/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="${this.x509Id}">${this.publicP12PEM}</wsse:BinarySecurityToken>`+n,i,a=`xmlns:wsse="${yc}/oasis-200401-wss-wssecurity-secext-1.0.xsd"`,u=`xmlns:wsu="${yc}/oasis-200401-wss-wssecurity-utility-1.0.xsd"`,c=e.indexOf("</wsse:Security>");if(c>-1){let v=/<wsse:Security( [^>]*)?>/,w=e.match(v),S="";w[0].includes(` ${t}:mustUnderstand="`)||(S+=`${t}:mustUnderstand="1" `),w[0].includes(a.substring(0,a.indexOf("=")))||(S+=`${a} `),w[0].includes(u.substring(0,a.indexOf("=")))||(S+=`${u} `);let A="<wsse:Security ",N=e.indexOf(A);e=Pb(s,e,c),i=Pb(S,e,N+A.length)}else{let v=`<wsse:Security ${a} ${u} ${t}:mustUnderstand="1">`+s+"</wsse:Security>";i=Pb(v,e,e.indexOf(`</${t}:Header>`))}let f=this.signatureTransformations,h=`//*[name(.)='${t}:Body']`;Ehe(this.signer.references,h),!this.excludeReferencesFromSigning.some(v=>v==="Body")&&!(this.signer.references.filter(v=>v.xpath===h).length>0)&&this.signer.addReference({xpath:h,transforms:f,digestAlgorithm:this.signer.digestAlgorithm});for(let v of this.additionalReferences){let w=`//*[name(.)='${v}']`;!this.excludeReferencesFromSigning.some(S=>S===v)&&!(this.signer.references.filter(S=>S.xpath===w).length>0)&&this.signer.addReference({xpath:w,transforms:f,digestAlgorithm:this.signer.digestAlgorithm})}let m="//*[name(.)='wsse:Security']/*[local-name(.)='Timestamp']";!this.excludeReferencesFromSigning.some(v=>v==="Timestamp")&&this.hasTimeStamp&&!(this.signer.references.filter(v=>v.xpath===m).length>0)&&this.signer.addReference({xpath:m,transforms:f,digestAlgorithm:this.signer.digestAlgorithm}),this.signer.computeSignature(i,this.signerOptions);let g=this.signer.getOriginalXmlWithIds(),x=this.signer.getSignatureXml();return Pb(x,g,g.indexOf("</wsse:Security>"))}};kb.WSSecurityCert=Ahe});var t9=Q(Lb=>{"use strict";Object.defineProperty(Lb,"__esModule",{value:!0});Lb.WSSecurityCertWithToken=void 0;var Che=require("crypto"),Nhe=zB();function The(r,e){return new Date(r.getTime()+e*6e4)}o(The,"addMinutes");function ZM(r){return r.getUTCFullYear()+"-"+("0"+(r.getUTCMonth()+1)).slice(-2)+"-"+("0"+r.getUTCDate()).slice(-2)+"T"+("0"+r.getUTCHours()).slice(-2)+":"+("0"+r.getUTCMinutes()).slice(-2)+":"+("0"+r.getUTCSeconds()).slice(-2)+"Z"}o(ZM,"dateStringForSOAP");function Ihe(){return ZM(new Date)}o(Ihe,"generateCreated");function _he(){return ZM(The(new Date,10))}o(_he,"generateExpires");function QM(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(QM,"insertStr");function Bhe(){return(0,Che.randomUUID)().replace(/-/gm,"")}o(Bhe,"generateId");function Dhe(r,e){for(let t of r)t.xpath===e9&&(t.xpath=e)}o(Dhe,"resolvePlaceholderInReferences");var xc="http://docs.oasis-open.org/wss/2004/01",e9="[[bodyXpath]]",Rhe=class{static{o(this,"WSSecurityCertWithToken")}constructor(e){this.signerOptions={},this.additionalReferences=[],this.publicP12PEM=e.publicKey.toString().replace("-----BEGIN CERTIFICATE-----","").replace("-----END CERTIFICATE-----","").replace(/(\r\n|\n|\r)/gm,""),this.username=e.username,this.password=e.password,this.signer=new Nhe.SignedXml;let t=e.options||{};if(t.signatureAlgorithm==="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"&&(this.signer.signatureAlgorithm=t.signatureAlgorithm,this.signer.addReference({xpath:e9,transforms:["http://www.w3.org/2001/10/xml-exc-c14n#"],digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"})),t.signatureAlgorithm||(this.signer.signatureAlgorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"),this.signer.canonicalizationAlgorithm="http://www.w3.org/2001/10/xml-exc-c14n#",t.additionalReferences&&t.additionalReferences.length>0&&(this.additionalReferences=t.additionalReferences),t.signerOptions){let{signerOptions:n}=e.options;this.signerOptions=n,this.signerOptions.existingPrefixes||(this.signerOptions.existingPrefixes={}),this.signerOptions.existingPrefixes&&!this.signerOptions.existingPrefixes.wsse&&(this.signerOptions.existingPrefixes.wsse=`${xc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`)}else this.signerOptions={existingPrefixes:{wsse:`${xc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`}};this.signer.privateKey={key:e.privateKey,passphrase:e.keyPassword},this.x509Id=`x509-${Bhe()}`,this.hasTimeStamp=typeof t.hasTimeStamp>"u"?!0:!!t.hasTimeStamp,this.signatureTransformations=Array.isArray(t.signatureTransformations)?t.signatureTransformations:["http://www.w3.org/2000/09/xmldsig#enveloped-signature","http://www.w3.org/2001/10/xml-exc-c14n#"],this.signer.keyInfoProvider={},this.signer.getKeyInfo=()=>`<wsse:SecurityTokenReference><wsse:Reference URI="#${this.x509Id}" ValueType="${xc}/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference>`}postProcess(e,t){this.created=Ihe(),this.expires=_he();let n="";this.hasTimeStamp&&(n=`<Timestamp xmlns="${xc}/oasis-200401-wss-wssecurity-utility-1.0.xsd" Id="_1"><Created>${this.created}</Created><Expires>${this.expires}</Expires></Timestamp>`);let s="";this.username&&(s=`<wsse:UsernameToken wsu:Id="SecurityToken-${this.created}" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:Username>${this.username}</wsse:Username> <wsse:Password>${this.password}</wsse:Password> </wsse:UsernameToken>`);let i=`<wsse:Security xmlns:wsse="${xc}/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="${xc}/oasis-200401-wss-wssecurity-utility-1.0.xsd" ${t}:mustUnderstand="1"><wsse:BinarySecurityToken EncodingType="${xc}/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="${xc}/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="${this.x509Id}">${this.publicP12PEM}</wsse:BinarySecurityToken>`+s+n+"</wsse:Security>",a=QM(i,e,e.indexOf(`</${t}:Header>`)),u=this.signatureTransformations,c=`//*[name(.)='${t}:Body']`;Dhe(this.signer.references,c),this.signer.references.filter(h=>h.xpath===c).length>0||this.signer.addReference({xpath:c,transforms:u,digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"});for(let h of this.additionalReferences){let m=`//*[name(.)='${h}']`;this.signer.references.filter(g=>g.xpath===m).length>0||this.signer.addReference({xpath:m,transforms:u,digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"})}let f="//*[name(.)='wsse:Security']/*[local-name(.)='Timestamp']";return this.hasTimeStamp&&!(this.signer.references.filter(h=>h.xpath===f).length>0)&&this.signer.addReference({xpath:f,transforms:u,digestAlgorithm:"http://www.w3.org/2001/04/xmlenc#sha256"}),this.signer.computeSignature(a,this.signerOptions),QM(this.signer.getSignatureXml(),a,a.indexOf("</wsse:Security>"))}};Lb.WSSecurityCertWithToken=Rhe});var r9=Q(Vb=>{"use strict";Object.defineProperty(Vb,"__esModule",{value:!0});Vb.WSSecurityPlusCert=void 0;var Ohe=class{static{o(this,"WSSecurityPlusCert")}constructor(e,t){this.wsSecurity=e,this.wsSecurityCert=t}postProcess(e,t){let n=this.wsSecurity.toXML(),s=e.indexOf(`</${t}:Header>`);return e=[e.slice(0,s),n,e.slice(s)].join(""),this.wsSecurityCert.postProcess(e,t)}};Vb.WSSecurityPlusCert=Ohe});var JB=Q(Cs=>{"use strict";var Phe=Cs&&Cs.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Ko=Cs&&Cs.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Phe(e,r,t)};Object.defineProperty(Cs,"__esModule",{value:!0});Ko(DF(),Cs);Ko(OF(),Cs);Ko(LF(),Cs);Ko(UF(),Cs);Ko(jF(),Cs);Ko(FF(),Cs);Ko(YM(),Cs);Ko(t9(),Cs);Ko(r9(),Cs)});var YB=Q(Fi=>{"use strict";var khe=Fi&&Fi.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Lhe=Fi&&Fi.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Vhe=Fi&&Fi.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&khe(t,e,n[s]);return Lhe(t,e),t}})(),Uhe=Fi&&Fi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.Server=void 0;var jhe=require("events"),Ub=Vhe(require("url")),Fhe=Uhe(require("zlib"));function Mhe(r){return typeof r.route=="function"&&typeof r.use=="function"}o(Mhe,"isExpress");function n9(r){return!!r&&typeof r.then=="function"}o(n9,"isPromiseLike");function s9(r){function e(t){return t<10?"0"+t:t}return o(e,"pad"),r.getUTCFullYear()+"-"+e(r.getUTCMonth()+1)+"-"+e(r.getUTCDate())+"T"+e(r.getUTCHours())+":"+e(r.getUTCMinutes())+":"+e(r.getUTCSeconds())+"Z"}o(s9,"getDateString");var qhe=class extends jhe.EventEmitter{static{o(this,"Server")}constructor(e,t,n,s,i){super(),i=i||{path:t,services:n},this.path=t,this.services=n,this.wsdl=s,this.suppressStack=i&&i.suppressStack,this.returnFault=i&&i.returnFault,this.onewayOptions=i&&i.oneWay||{},this.enableChunkedEncoding=i.enableChunkedEncoding===void 0?!0:!!i.enableChunkedEncoding,this.callback=i.callback?i.callback:()=>{},typeof t=="string"&&t[t.length-1]!=="/"?t+="/":t instanceof RegExp&&t.source[t.source.length-1]!=="/"&&(t=new RegExp(t.source+"(?:\\/|)")),s.onReady(a=>{if(Mhe(e))e.route(t).all((u,c)=>{if(typeof this.authorizeConnection=="function"&&!this.authorizeConnection(u,c)){c.end();return}this._requestListener(u,c)}),this.callback(a,this);else{let u=e.listeners("request").slice();e.removeAllListeners("request"),e.addListener("request",(c,f)=>{if(typeof this.authorizeConnection=="function"&&!this.authorizeConnection(c,f)){f.end();return}let h=Ub.parse(c.url).pathname;if(h[h.length-1]!=="/"&&(h+="/"),t===h||t instanceof RegExp&&h.match(t))this._requestListener(c,f);else for(let m=0,g=u.length;m<g;m++)u[m].call(this,c,f)}),this.callback(a,this)}}),this._initializeOptions(i)}addSoapHeader(e,t,n,s){return this.soapHeaders||(this.soapHeaders=[]),e=this._processSoapHeader(e,t,n,s),this.soapHeaders.push(e)-1}changeSoapHeader(e,t,n,s,i){this.soapHeaders||(this.soapHeaders=[]),t=this._processSoapHeader(t,n,s,i),this.soapHeaders[e]=t}getSoapHeaders(){return this.soapHeaders}clearSoapHeaders(){this.soapHeaders=null}_processSoapHeader(e,t,n,s){switch(typeof e){case"object":return this.wsdl.objectToXML(e,t,n,s,!0);case"function":{let i=this;return(...a)=>{let u=e.apply(null,[...a]);return typeof u=="object"?i.wsdl.objectToXML(u,t,n,s,!0):u}}default:return e}}_initializeOptions(e){this.wsdl.options.attributesKey=e.attributesKey||"attributes",this.onewayOptions.statusCode=this.onewayOptions.responseCode||200,this.onewayOptions.emptyBody=!!this.onewayOptions.emptyBody}_processRequestXml(e,t,n){let s;try{typeof this.log=="function"&&this.log("received",n,e),this._process(n,e,t,(i,a)=>{this._sendHttpResponse(t,a,i),typeof this.log=="function"&&this.log("replied",i,e)})}catch(i){if(i.Fault!==void 0)return this._sendError(i.Fault,(a,u)=>{this._sendHttpResponse(t,u||500,a),typeof this.log=="function"&&this.log("error",i,e)},new Date().toISOString());s=i.stack?this.suppressStack===!0?i.message:i.stack:i,this._sendHttpResponse(t,500,s),typeof this.log=="function"&&this.log("error",i,e)}}_requestListener(e,t){let s=Ub.parse(e.url).search;if(typeof this.log=="function"&&this.log("info","Handling "+e.method+" on "+e.url,e),e.method==="GET")s&&s.toLowerCase().startsWith("?wsdl")&&(typeof this.log=="function"&&this.log("info","Wants the WSDL",e),t.setHeader("Content-Type","application/xml"),t.write(this.wsdl.toXML())),t.end();else if(e.method==="POST"){if(typeof e.headers["content-type"]<"u"?t.setHeader("Content-Type",e.headers["content-type"]):t.setHeader("Content-Type","application/xml"),e.body&&e.body.length>0)return this._processRequestXml(e,t,e.body.toString());let i=[],a,u=e;e.headers["content-encoding"]==="gzip"&&(a=Fhe.default.createGunzip(),e.pipe(a),u=a),u.on("data",c=>{i.push(c)}),u.on("end",()=>{let c=Buffer.concat(i).toString();this._processRequestXml(e,t,c)})}else t.end()}_getSoapAction(e){if(typeof e.headers.soapaction>"u")return;let t=e.headers.soapaction;return t.indexOf('"')===0?t.slice(1,-1):t}_process(e,t,n,s){let i=Ub.parse(t.url).pathname.replace(/\/$/,""),a=this.wsdl.xmlToObject(e),u=a.Body,c=a.Header,f,h,m,g,x=a.Header&&a.Header.Security&&a.Header.Security.Timestamp,v=this.authenticate||o(function(){return!0},"defaultAuthenticate"),w=o((A,N)=>{let b={result:A};this.emit("response",b,h),s(b.result,N)},"callback"),S=o(()=>{if(typeof this.log=="function"&&this.log("info","Attempting to bind to "+i,t),!u)throw new Error("Failed to parse the SOAP Message body");if(f=(()=>{let A=this.wsdl.definitions.services,N,b;for(b in A){m=b;let C=A[m].ports;for(b in C){g=b;let _=C[g],M=Ub.parse(_.location).pathname.replace(/\/$/,"");if(typeof this.log=="function"&&this.log("info","Trying "+g+" from path "+M,t),M===i)return _.binding;N||(N=_)}}return N?N.binding:void 0})(),!f)throw new Error("Failed to bind to WSDL");try{let A=this._getSoapAction(t),N=Object.keys(u)[0]==="attributes"?Object.keys(u)[1]:Object.keys(u)[0],b=f.topElements[N];A?h=this._getMethodNameBySoapAction(f,A):h=b?b.methodName:N;let E=f.methods[h].style||f.style;this.emit("request",a,h),c&&this.emit("headers",c,h),E==="rpc"?this._executeMethod({serviceName:m,portName:g,methodName:h,outputName:N+"Response",args:u[N],headers:c,style:"rpc"},t,n,w):this._executeMethod({serviceName:m,portName:g,methodName:h,outputName:b.outputName,args:u[N],headers:c,style:"document"},t,n,w,x)}catch(A){if(A.Fault!==void 0)return this._sendError(A.Fault,w,x);throw A}},"process");if(typeof v=="function"){let A=!1,N=o(E=>{if(!A){if(A=!0,E instanceof Error)return this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:E.toString()},statusCode:500},w,x);if(typeof E=="boolean")if(E===!0)try{S()}catch(C){return C.Fault!==void 0?this._sendError(C.Fault,w,x):this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:C.toString()},statusCode:500},w,x)}else return this._sendError({Code:{Value:"SOAP-ENV:Client",Subcode:{Value:"AuthenticationFailure"}},Reason:{Text:"Invalid username or password"},statusCode:401},w,x)}},"processAuthResult"),b=v(a.Header&&a.Header.Security,N,t,a);n9(b)&&b.then(E=>{N(E)},E=>{N(E)}),typeof b=="boolean"&&N(b)}else throw new Error("Invalid authenticate function (not a function)")}_getMethodNameBySoapAction(e,t){for(let n in e.methods)if(e.methods[n].soapAction===t)return n}_executeMethod(e,t,n,s,i){e=e||{};let a,u,c,f=e.serviceName,h=e.portName,m=this.wsdl.definitions.services[f].ports[h].binding,g=e.methodName,x=e.outputName,v=e.args,w=e.style;this.soapHeaders&&(c=this.soapHeaders.map(E=>typeof E=="function"?E(g,v,e.headers,t,n,this):E).join(`
|
|
74
|
+
`));try{a=this.services[f][h][g]}catch{return s(this._envelope("",c,i))}let S=!1,A=o((E,C)=>{if(!S){if(S=!0,E)return E.Fault!==void 0?this._sendError(E.Fault,s,i):this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:E.toString()},statusCode:500},s,i);if(w==="rpc")u=this.wsdl.objectToRpcXML(x,C,"",this.wsdl.definitions.$targetNamespace);else if(w==="document"){let _=m.methods[g].output;u=this.wsdl.objectToDocumentXML(x,C,_.targetNSAlias,_.targetNamespace)}else{let _=m.methods[g].output,M=_.$targetNamespace,R=x;M&&(R=`${M}:${R}`),u=this.wsdl.objectToDocumentXML(R,C,_.targetNSAlias,_.targetNamespace)}s(this._envelope(u,c,i))}},"handleResult");m.methods[g].output||(S=!0,u="",this.onewayOptions.emptyBody&&(u=this._envelope("",c,i)),s(u,this.onewayOptions.responseCode));let N=o((E,C)=>{E&&E.Fault!==void 0||C===void 0&&(C=E,E=null),A(E,C)},"methodCallback"),b=a.apply(this,[v,N,e.headers,t,n]);typeof b<"u"&&(n9(b)?b.then(E=>{A(null,E)},E=>{A(E)}):A(null,b))}_envelope(e,t,n){let a='<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="'+(this.wsdl.options.forceSoap12Headers?"http://www.w3.org/2003/05/soap-envelope":"http://schemas.xmlsoap.org/soap/envelope/")+'" '+this.wsdl.xmlnsInEnvelope+">";if(t=t||"",n){let u=new Date,c=s9(u),f=s9(new Date(u.getTime()+1e3*600));t+='<o:Security soap:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <u:Timestamp u:Id="_0"> <u:Created>'+c+"</u:Created> <u:Expires>"+f+`</u:Expires> </u:Timestamp> </o:Security>
|
|
75
|
+
`}return t!==""&&(a+="<soap:Header>"+t+"</soap:Header>"),a+=e?"<soap:Body>"+e+"</soap:Body>":"<soap:Body/>",a+="</soap:Envelope>",a}_sendError(e,t,n){let s,i;return e.statusCode&&(i=e.statusCode,e.statusCode=void 0),"faultcode"in e?s=this.wsdl.objectToDocumentXML("soap:Fault",e,void 0):s=this.wsdl.objectToDocumentXML("Fault",e,"soap"),t(this._envelope(s,"",n),i)}_sendHttpResponse(e,t,n){t&&(e.statusCode=t),this.enableChunkedEncoding?(e.write(n),e.end()):e.end(n)}};Fi.Server=qhe});var QB=Q(jb=>{"use strict";(function(r){r.parser=function(P,D){return new t(P,D)},r.SAXParser=t,r.SAXStream=f,r.createStream=c,r.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function t(P,D){if(!(this instanceof t))return new t(P,D);var se=this;s(se),se.q=se.c="",se.bufferCheckPosition=r.MAX_BUFFER_LENGTH,se.opt=D||{},se.opt.lowercase=se.opt.lowercase||se.opt.lowercasetags,se.looseCase=se.opt.lowercase?"toLowerCase":"toUpperCase",se.tags=[],se.closed=se.closedRoot=se.sawRoot=!1,se.tag=se.error=null,se.strict=!!P,se.noscript=!!(P||se.opt.noscript),se.state=R.BEGIN,se.strictEntities=se.opt.strictEntities,se.ENTITIES=se.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),se.attribList=[],se.opt.xmlns&&(se.ns=Object.create(v)),se.opt.unquotedAttributeValues===void 0&&(se.opt.unquotedAttributeValues=!P),se.trackPosition=se.opt.position!==!1,se.trackPosition&&(se.position=se.line=se.column=0),H(se,"onready")}o(t,"SAXParser"),Object.create||(Object.create=function(P){function D(){}o(D,"F"),D.prototype=P;var se=new D;return se}),Object.keys||(Object.keys=function(P){var D=[];for(var se in P)P.hasOwnProperty(se)&&D.push(se);return D});function n(P){for(var D=Math.max(r.MAX_BUFFER_LENGTH,10),se=0,z=0,Xe=e.length;z<Xe;z++){var Re=P[e[z]].length;if(Re>D)switch(e[z]){case"textNode":G(P);break;case"cdata":K(P,"oncdata",P.cdata),P.cdata="";break;case"script":K(P,"onscript",P.script),P.script="";break;default:le(P,"Max buffer length exceeded: "+e[z])}se=Math.max(se,Re)}var Ce=r.MAX_BUFFER_LENGTH-se;P.bufferCheckPosition=Ce+P.position}o(n,"checkBufferLength");function s(P){for(var D=0,se=e.length;D<se;D++)P[e[D]]=""}o(s,"clearBuffers");function i(P){G(P),P.cdata!==""&&(K(P,"oncdata",P.cdata),P.cdata=""),P.script!==""&&(K(P,"onscript",P.script),P.script="")}o(i,"flushBuffers"),t.prototype={end:o(function(){ue(this)},"end"),write:ct,resume:o(function(){return this.error=null,this},"resume"),close:o(function(){return this.write(null)},"close"),flush:o(function(){i(this)},"flush")};var a;try{a=require("stream").Stream}catch{a=o(function(){},"Stream")}a||(a=o(function(){},"Stream"));var u=r.EVENTS.filter(function(P){return P!=="error"&&P!=="end"});function c(P,D){return new f(P,D)}o(c,"createStream");function f(P,D){if(!(this instanceof f))return new f(P,D);a.apply(this),this._parser=new t(P,D),this.writable=!0,this.readable=!0;var se=this;this._parser.onend=function(){se.emit("end")},this._parser.onerror=function(z){se.emit("error",z),se._parser.error=null},this._decoder=null,u.forEach(function(z){Object.defineProperty(se,"on"+z,{get:o(function(){return se._parser["on"+z]},"get"),set:o(function(Xe){if(!Xe)return se.removeAllListeners(z),se._parser["on"+z]=Xe,Xe;se.on(z,Xe)},"set"),enumerable:!0,configurable:!1})})}o(f,"SAXStream"),f.prototype=Object.create(a.prototype,{constructor:{value:f}}),f.prototype.write=function(P){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(P)){if(!this._decoder){var D=require("string_decoder").StringDecoder;this._decoder=new D("utf8")}P=this._decoder.write(P)}return this._parser.write(P.toString()),this.emit("data",P),!0},f.prototype.end=function(P){return P&&P.length&&this.write(P),this._parser.end(),!0},f.prototype.on=function(P,D){var se=this;return!se._parser["on"+P]&&u.indexOf(P)!==-1&&(se._parser["on"+P]=function(){var z=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);z.splice(0,0,P),se.emit.apply(se,z)}),a.prototype.on.call(se,P,D)};var h="[CDATA[",m="DOCTYPE",g="http://www.w3.org/XML/1998/namespace",x="http://www.w3.org/2000/xmlns/",v={xml:g,xmlns:x},w=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,S=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,A=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,N=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function b(P){return P===" "||P===`
|
|
76
|
+
`||P==="\r"||P===" "}o(b,"isWhitespace");function E(P){return P==='"'||P==="'"}o(E,"isQuote");function C(P){return P===">"||b(P)}o(C,"isAttribEnd");function _(P,D){return P.test(D)}o(_,"isMatch");function M(P,D){return!_(P,D)}o(M,"notMatch");var R=0;r.STATE={BEGIN:R++,BEGIN_WHITESPACE:R++,TEXT:R++,TEXT_ENTITY:R++,OPEN_WAKA:R++,SGML_DECL:R++,SGML_DECL_QUOTED:R++,DOCTYPE:R++,DOCTYPE_QUOTED:R++,DOCTYPE_DTD:R++,DOCTYPE_DTD_QUOTED:R++,COMMENT_STARTING:R++,COMMENT:R++,COMMENT_ENDING:R++,COMMENT_ENDED:R++,CDATA:R++,CDATA_ENDING:R++,CDATA_ENDING_2:R++,PROC_INST:R++,PROC_INST_BODY:R++,PROC_INST_ENDING:R++,OPEN_TAG:R++,OPEN_TAG_SLASH:R++,ATTRIB:R++,ATTRIB_NAME:R++,ATTRIB_NAME_SAW_WHITE:R++,ATTRIB_VALUE:R++,ATTRIB_VALUE_QUOTED:R++,ATTRIB_VALUE_CLOSED:R++,ATTRIB_VALUE_UNQUOTED:R++,ATTRIB_VALUE_ENTITY_Q:R++,ATTRIB_VALUE_ENTITY_U:R++,CLOSE_TAG:R++,CLOSE_TAG_SAW_WHITE:R++,SCRIPT:R++,SCRIPT_ENDING:R++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach(function(P){var D=r.ENTITIES[P],se=typeof D=="number"?String.fromCharCode(D):D;r.ENTITIES[P]=se});for(var q in r.STATE)r.STATE[r.STATE[q]]=q;R=r.STATE;function H(P,D,se){P[D]&&P[D](se)}o(H,"emit");function K(P,D,se){P.textNode&&G(P),H(P,D,se)}o(K,"emitNode");function G(P){P.textNode=pe(P.opt,P.textNode),P.textNode&&H(P,"ontext",P.textNode),P.textNode=""}o(G,"closeText");function pe(P,D){return P.trim&&(D=D.trim()),P.normalize&&(D=D.replace(/\s+/g," ")),D}o(pe,"textopts");function le(P,D){return G(P),P.trackPosition&&(D+=`
|
|
77
|
+
Line: `+P.line+`
|
|
78
|
+
Column: `+P.column+`
|
|
79
|
+
Char: `+P.c),D=new Error(D),P.error=D,H(P,"onerror",D),P}o(le,"error");function ue(P){return P.sawRoot&&!P.closedRoot&&ee(P,"Unclosed root tag"),P.state!==R.BEGIN&&P.state!==R.BEGIN_WHITESPACE&&P.state!==R.TEXT&&le(P,"Unexpected end"),G(P),P.c="",P.closed=!0,H(P,"onend"),t.call(P,P.strict,P.opt),P}o(ue,"end");function ee(P,D){if(typeof P!="object"||!(P instanceof t))throw new Error("bad call to strictFail");P.strict&&le(P,D)}o(ee,"strictFail");function he(P){P.strict||(P.tagName=P.tagName[P.looseCase]());var D=P.tags[P.tags.length-1]||P,se=P.tag={name:P.tagName,attributes:{}};P.opt.xmlns&&(se.ns=D.ns),P.attribList.length=0,K(P,"onopentagstart",se)}o(he,"newTag");function we(P,D){var se=P.indexOf(":"),z=se<0?["",P]:P.split(":"),Xe=z[0],Re=z[1];return D&&P==="xmlns"&&(Xe="xmlns",Re=""),{prefix:Xe,local:Re}}o(we,"qname");function Ke(P){if(P.strict||(P.attribName=P.attribName[P.looseCase]()),P.attribList.indexOf(P.attribName)!==-1||P.tag.attributes.hasOwnProperty(P.attribName)){P.attribName=P.attribValue="";return}if(P.opt.xmlns){var D=we(P.attribName,!0),se=D.prefix,z=D.local;if(se==="xmlns")if(z==="xml"&&P.attribValue!==g)ee(P,"xml: prefix must be bound to "+g+`
|
|
80
|
+
Actual: `+P.attribValue);else if(z==="xmlns"&&P.attribValue!==x)ee(P,"xmlns: prefix must be bound to "+x+`
|
|
81
|
+
Actual: `+P.attribValue);else{var Xe=P.tag,Re=P.tags[P.tags.length-1]||P;Xe.ns===Re.ns&&(Xe.ns=Object.create(Re.ns)),Xe.ns[z]=P.attribValue}P.attribList.push([P.attribName,P.attribValue])}else P.tag.attributes[P.attribName]=P.attribValue,K(P,"onattribute",{name:P.attribName,value:P.attribValue});P.attribName=P.attribValue=""}o(Ke,"attrib");function Ae(P,D){if(P.opt.xmlns){var se=P.tag,z=we(P.tagName);se.prefix=z.prefix,se.local=z.local,se.uri=se.ns[z.prefix]||"",se.prefix&&!se.uri&&(ee(P,"Unbound namespace prefix: "+JSON.stringify(P.tagName)),se.uri=z.prefix);var Xe=P.tags[P.tags.length-1]||P;se.ns&&Xe.ns!==se.ns&&Object.keys(se.ns).forEach(function(rs){K(P,"onopennamespace",{prefix:rs,uri:se.ns[rs]})});for(var Re=0,Ce=P.attribList.length;Re<Ce;Re++){var lt=P.attribList[Re],sr=lt[0],Fe=lt[1],ir=we(sr,!0),Zs=ir.prefix,Ge=ir.local,Hr=Zs===""?"":se.ns[Zs]||"",gn={name:sr,value:Fe,prefix:Zs,local:Ge,uri:Hr};Zs&&Zs!=="xmlns"&&!Hr&&(ee(P,"Unbound namespace prefix: "+JSON.stringify(Zs)),gn.uri=Zs),P.tag.attributes[sr]=gn,K(P,"onattribute",gn)}P.attribList.length=0}P.tag.isSelfClosing=!!D,P.sawRoot=!0,P.tags.push(P.tag),K(P,"onopentag",P.tag),D||(!P.noscript&&P.tagName.toLowerCase()==="script"?P.state=R.SCRIPT:P.state=R.TEXT,P.tag=null,P.tagName=""),P.attribName=P.attribValue="",P.attribList.length=0}o(Ae,"openTag");function xe(P){if(!P.tagName){ee(P,"Weird empty close tag."),P.textNode+="</>",P.state=R.TEXT;return}if(P.script){if(P.tagName!=="script"){P.script+="</"+P.tagName+">",P.tagName="",P.state=R.SCRIPT;return}K(P,"onscript",P.script),P.script=""}var D=P.tags.length,se=P.tagName;P.strict||(se=se[P.looseCase]());for(var z=se;D--;){var Xe=P.tags[D];if(Xe.name!==z)ee(P,"Unexpected close tag");else break}if(D<0){ee(P,"Unmatched closing tag: "+P.tagName),P.textNode+="</"+P.tagName+">",P.state=R.TEXT;return}P.tagName=se;for(var Re=P.tags.length;Re-- >D;){var Ce=P.tag=P.tags.pop();P.tagName=P.tag.name,K(P,"onclosetag",P.tagName);var lt={};for(var sr in Ce.ns)lt[sr]=Ce.ns[sr];var Fe=P.tags[P.tags.length-1]||P;P.opt.xmlns&&Ce.ns!==Fe.ns&&Object.keys(Ce.ns).forEach(function(ir){var Zs=Ce.ns[ir];K(P,"onclosenamespace",{prefix:ir,uri:Zs})})}D===0&&(P.closedRoot=!0),P.tagName=P.attribValue=P.attribName="",P.attribList.length=0,P.state=R.TEXT}o(xe,"closeTag");function je(P){var D=P.entity,se=D.toLowerCase(),z,Xe="";return P.ENTITIES[D]?P.ENTITIES[D]:P.ENTITIES[se]?P.ENTITIES[se]:(D=se,D.charAt(0)==="#"&&(D.charAt(1)==="x"?(D=D.slice(2),z=parseInt(D,16),Xe=z.toString(16)):(D=D.slice(1),z=parseInt(D,10),Xe=z.toString(10))),D=D.replace(/^0+/,""),isNaN(z)||Xe.toLowerCase()!==D?(ee(P,"Invalid character entity"),"&"+P.entity+";"):String.fromCodePoint(z))}o(je,"parseEntity");function ze(P,D){D==="<"?(P.state=R.OPEN_WAKA,P.startTagPosition=P.position):b(D)||(ee(P,"Non-whitespace before first tag."),P.textNode=D,P.state=R.TEXT)}o(ze,"beginWhiteSpace");function Ye(P,D){var se="";return D<P.length&&(se=P.charAt(D)),se}o(Ye,"charAt");function ct(P){var D=this;if(this.error)throw this.error;if(D.closed)return le(D,"Cannot write after close. Assign an onready handler.");if(P===null)return ue(D);typeof P=="object"&&(P=P.toString());for(var se=0,z="";z=Ye(P,se++),D.c=z,!!z;)switch(D.trackPosition&&(D.position++,z===`
|
|
82
|
+
`?(D.line++,D.column=0):D.column++),D.state){case R.BEGIN:if(D.state=R.BEGIN_WHITESPACE,z==="\uFEFF")continue;ze(D,z);continue;case R.BEGIN_WHITESPACE:ze(D,z);continue;case R.TEXT:if(D.sawRoot&&!D.closedRoot){for(var Xe=se-1;z&&z!=="<"&&z!=="&";)z=Ye(P,se++),z&&D.trackPosition&&(D.position++,z===`
|
|
83
|
+
`?(D.line++,D.column=0):D.column++);D.textNode+=P.substring(Xe,se-1)}z==="<"&&!(D.sawRoot&&D.closedRoot&&!D.strict)?(D.state=R.OPEN_WAKA,D.startTagPosition=D.position):(!b(z)&&(!D.sawRoot||D.closedRoot)&&ee(D,"Text data outside of root node."),z==="&"?D.state=R.TEXT_ENTITY:D.textNode+=z);continue;case R.SCRIPT:z==="<"?D.state=R.SCRIPT_ENDING:D.script+=z;continue;case R.SCRIPT_ENDING:z==="/"?D.state=R.CLOSE_TAG:(D.script+="<"+z,D.state=R.SCRIPT);continue;case R.OPEN_WAKA:if(z==="!")D.state=R.SGML_DECL,D.sgmlDecl="";else if(!b(z))if(_(w,z))D.state=R.OPEN_TAG,D.tagName=z;else if(z==="/")D.state=R.CLOSE_TAG,D.tagName="";else if(z==="?")D.state=R.PROC_INST,D.procInstName=D.procInstBody="";else{if(ee(D,"Unencoded <"),D.startTagPosition+1<D.position){var Re=D.position-D.startTagPosition;z=new Array(Re).join(" ")+z}D.textNode+="<"+z,D.state=R.TEXT}continue;case R.SGML_DECL:if(D.sgmlDecl+z==="--"){D.state=R.COMMENT,D.comment="",D.sgmlDecl="";continue}D.doctype&&D.doctype!==!0&&D.sgmlDecl?(D.state=R.DOCTYPE_DTD,D.doctype+="<!"+D.sgmlDecl+z,D.sgmlDecl=""):(D.sgmlDecl+z).toUpperCase()===h?(K(D,"onopencdata"),D.state=R.CDATA,D.sgmlDecl="",D.cdata=""):(D.sgmlDecl+z).toUpperCase()===m?(D.state=R.DOCTYPE,(D.doctype||D.sawRoot)&&ee(D,"Inappropriately located doctype declaration"),D.doctype="",D.sgmlDecl=""):z===">"?(K(D,"onsgmldeclaration",D.sgmlDecl),D.sgmlDecl="",D.state=R.TEXT):(E(z)&&(D.state=R.SGML_DECL_QUOTED),D.sgmlDecl+=z);continue;case R.SGML_DECL_QUOTED:z===D.q&&(D.state=R.SGML_DECL,D.q=""),D.sgmlDecl+=z;continue;case R.DOCTYPE:z===">"?(D.state=R.TEXT,K(D,"ondoctype",D.doctype),D.doctype=!0):(D.doctype+=z,z==="["?D.state=R.DOCTYPE_DTD:E(z)&&(D.state=R.DOCTYPE_QUOTED,D.q=z));continue;case R.DOCTYPE_QUOTED:D.doctype+=z,z===D.q&&(D.q="",D.state=R.DOCTYPE);continue;case R.DOCTYPE_DTD:z==="]"?(D.doctype+=z,D.state=R.DOCTYPE):z==="<"?(D.state=R.OPEN_WAKA,D.startTagPosition=D.position):E(z)?(D.doctype+=z,D.state=R.DOCTYPE_DTD_QUOTED,D.q=z):D.doctype+=z;continue;case R.DOCTYPE_DTD_QUOTED:D.doctype+=z,z===D.q&&(D.state=R.DOCTYPE_DTD,D.q="");continue;case R.COMMENT:z==="-"?D.state=R.COMMENT_ENDING:D.comment+=z;continue;case R.COMMENT_ENDING:z==="-"?(D.state=R.COMMENT_ENDED,D.comment=pe(D.opt,D.comment),D.comment&&K(D,"oncomment",D.comment),D.comment=""):(D.comment+="-"+z,D.state=R.COMMENT);continue;case R.COMMENT_ENDED:z!==">"?(ee(D,"Malformed comment"),D.comment+="--"+z,D.state=R.COMMENT):D.doctype&&D.doctype!==!0?D.state=R.DOCTYPE_DTD:D.state=R.TEXT;continue;case R.CDATA:z==="]"?D.state=R.CDATA_ENDING:D.cdata+=z;continue;case R.CDATA_ENDING:z==="]"?D.state=R.CDATA_ENDING_2:(D.cdata+="]"+z,D.state=R.CDATA);continue;case R.CDATA_ENDING_2:z===">"?(D.cdata&&K(D,"oncdata",D.cdata),K(D,"onclosecdata"),D.cdata="",D.state=R.TEXT):z==="]"?D.cdata+="]":(D.cdata+="]]"+z,D.state=R.CDATA);continue;case R.PROC_INST:z==="?"?D.state=R.PROC_INST_ENDING:b(z)?D.state=R.PROC_INST_BODY:D.procInstName+=z;continue;case R.PROC_INST_BODY:if(!D.procInstBody&&b(z))continue;z==="?"?D.state=R.PROC_INST_ENDING:D.procInstBody+=z;continue;case R.PROC_INST_ENDING:z===">"?(K(D,"onprocessinginstruction",{name:D.procInstName,body:D.procInstBody}),D.procInstName=D.procInstBody="",D.state=R.TEXT):(D.procInstBody+="?"+z,D.state=R.PROC_INST_BODY);continue;case R.OPEN_TAG:_(S,z)?D.tagName+=z:(he(D),z===">"?Ae(D):z==="/"?D.state=R.OPEN_TAG_SLASH:(b(z)||ee(D,"Invalid character in tag name"),D.state=R.ATTRIB));continue;case R.OPEN_TAG_SLASH:z===">"?(Ae(D,!0),xe(D)):(ee(D,"Forward-slash in opening tag not followed by >"),D.state=R.ATTRIB);continue;case R.ATTRIB:if(b(z))continue;z===">"?Ae(D):z==="/"?D.state=R.OPEN_TAG_SLASH:_(w,z)?(D.attribName=z,D.attribValue="",D.state=R.ATTRIB_NAME):ee(D,"Invalid attribute name");continue;case R.ATTRIB_NAME:z==="="?D.state=R.ATTRIB_VALUE:z===">"?(ee(D,"Attribute without value"),D.attribValue=D.attribName,Ke(D),Ae(D)):b(z)?D.state=R.ATTRIB_NAME_SAW_WHITE:_(S,z)?D.attribName+=z:ee(D,"Invalid attribute name");continue;case R.ATTRIB_NAME_SAW_WHITE:if(z==="=")D.state=R.ATTRIB_VALUE;else{if(b(z))continue;ee(D,"Attribute without value"),D.tag.attributes[D.attribName]="",D.attribValue="",K(D,"onattribute",{name:D.attribName,value:""}),D.attribName="",z===">"?Ae(D):_(w,z)?(D.attribName=z,D.state=R.ATTRIB_NAME):(ee(D,"Invalid attribute name"),D.state=R.ATTRIB)}continue;case R.ATTRIB_VALUE:if(b(z))continue;E(z)?(D.q=z,D.state=R.ATTRIB_VALUE_QUOTED):(D.opt.unquotedAttributeValues||le(D,"Unquoted attribute value"),D.state=R.ATTRIB_VALUE_UNQUOTED,D.attribValue=z);continue;case R.ATTRIB_VALUE_QUOTED:if(z!==D.q){z==="&"?D.state=R.ATTRIB_VALUE_ENTITY_Q:D.attribValue+=z;continue}Ke(D),D.q="",D.state=R.ATTRIB_VALUE_CLOSED;continue;case R.ATTRIB_VALUE_CLOSED:b(z)?D.state=R.ATTRIB:z===">"?Ae(D):z==="/"?D.state=R.OPEN_TAG_SLASH:_(w,z)?(ee(D,"No whitespace between attributes"),D.attribName=z,D.attribValue="",D.state=R.ATTRIB_NAME):ee(D,"Invalid attribute name");continue;case R.ATTRIB_VALUE_UNQUOTED:if(!C(z)){z==="&"?D.state=R.ATTRIB_VALUE_ENTITY_U:D.attribValue+=z;continue}Ke(D),z===">"?Ae(D):D.state=R.ATTRIB;continue;case R.CLOSE_TAG:if(D.tagName)z===">"?xe(D):_(S,z)?D.tagName+=z:D.script?(D.script+="</"+D.tagName,D.tagName="",D.state=R.SCRIPT):(b(z)||ee(D,"Invalid tagname in closing tag"),D.state=R.CLOSE_TAG_SAW_WHITE);else{if(b(z))continue;M(w,z)?D.script?(D.script+="</"+z,D.state=R.SCRIPT):ee(D,"Invalid tagname in closing tag."):D.tagName=z}continue;case R.CLOSE_TAG_SAW_WHITE:if(b(z))continue;z===">"?xe(D):ee(D,"Invalid characters in closing tag");continue;case R.TEXT_ENTITY:case R.ATTRIB_VALUE_ENTITY_Q:case R.ATTRIB_VALUE_ENTITY_U:var Ce,lt;switch(D.state){case R.TEXT_ENTITY:Ce=R.TEXT,lt="textNode";break;case R.ATTRIB_VALUE_ENTITY_Q:Ce=R.ATTRIB_VALUE_QUOTED,lt="attribValue";break;case R.ATTRIB_VALUE_ENTITY_U:Ce=R.ATTRIB_VALUE_UNQUOTED,lt="attribValue";break}if(z===";"){var sr=je(D);D.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(sr)?(D.entity="",D.state=Ce,D.write(sr)):(D[lt]+=sr,D.entity="",D.state=Ce)}else _(D.entity.length?N:A,z)?D.entity+=z:(ee(D,"Invalid character in entity name"),D[lt]+="&"+D.entity+z,D.entity="",D.state=Ce);continue;default:throw new Error(D,"Unknown state: "+D.state)}return D.position>=D.bufferCheckPosition&&n(D),D}o(ct,"write");String.fromCodePoint||(function(){var P=String.fromCharCode,D=Math.floor,se=o(function(){var z=16384,Xe=[],Re,Ce,lt=-1,sr=arguments.length;if(!sr)return"";for(var Fe="";++lt<sr;){var ir=Number(arguments[lt]);if(!isFinite(ir)||ir<0||ir>1114111||D(ir)!==ir)throw RangeError("Invalid code point: "+ir);ir<=65535?Xe.push(ir):(ir-=65536,Re=(ir>>10)+55296,Ce=ir%1024+56320,Xe.push(Re,Ce)),(lt+1===sr||Xe.length>z)&&(Fe+=P.apply(null,Xe),Xe.length=0)}return Fe},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:se,configurable:!0,writable:!0}):String.fromCodePoint=se})()})(typeof jb>"u"?jb.sax={}:jb)});var a9=Q((Z2e,i9)=>{"use strict";i9.exports=r=>{if(typeof r!="string")throw new TypeError("Expected a string, got "+typeof r);return r.charCodeAt(0)===65279?r.slice(1):r}});var o9=Q(Fb=>{"use strict";Object.defineProperty(Fb,"__esModule",{value:!0});Fb.NamespaceContext=void 0;var Hhe=class{static{o(this,"NamespaceScope")}constructor(e){this.parent=e,this.namespaces={}}getNamespaceURI(e,t){switch(e){case"xml":return"http://www.w3.org/XML/1998/namespace";case"xmlns":return"http://www.w3.org/2000/xmlns/";default:{let n=this.namespaces[e];return n!=null?n.uri:!t&&this.parent?this.parent.getNamespaceURI(e):null}}}getNamespaceMapping(e){switch(e){case"xml":return{uri:"http://www.w3.org/XML/1998/namespace",prefix:"xml",declared:!0};case"xmlns":return{uri:"http://www.w3.org/2000/xmlns/",prefix:"xmlns",declared:!0};default:{let t=this.namespaces[e];return t??(this.parent?this.parent.getNamespaceMapping(e):null)}}}getPrefix(e,t){switch(e){case"http://www.w3.org/XML/1998/namespace":return"xml";case"http://www.w3.org/2000/xmlns/":return"xmlns";default:for(let n in this.namespaces)if(this.namespaces[n].uri===e)return n;return!t&&this.parent?this.parent.getPrefix(e):null}}},Khe=class{static{o(this,"NamespaceContext")}constructor(){this.scopes=[],this.pushContext(),this.prefixCount=0}addNamespace(e,t,n){return this.getNamespaceURI(e,n)===t?!1:this.currentScope?(this.currentScope.namespaces[e]={uri:t,prefix:e,declared:!1},!0):!1}pushContext(){let e=new Hhe(this.currentScope);return this.scopes.push(e),this.currentScope=e,e}popContext(){let e=this.scopes.pop();return e?this.currentScope=e.parent:this.currentScope=null,e}getNamespaceURI(e,t){return this.currentScope&&this.currentScope.getNamespaceURI(e,t)}getPrefix(e,t){return this.currentScope&&this.currentScope.getPrefix(e,t)}registerNamespace(e){let t=this.getPrefix(e);if(t)return t;for(;t="ns"+ ++this.prefixCount,!!this.getNamespaceURI(t););return this.addNamespace(t,e,!0),t}declareNamespace(e,t){if(this.currentScope){let n=this.currentScope.getNamespaceMapping(e);return n&&n.uri===t&&n.declared?!1:(this.currentScope.namespaces[e]={uri:t,prefix:e,declared:!0},!0)}return!1}};Fb.NamespaceContext=Khe});var y9=Q(at=>{"use strict";var $he=at&&at.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Xhe=at&&at.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ghe=at&&at.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&$he(t,e,n[s]);return Xhe(t,e),t}})(),Whe=at&&at.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(at,"__esModule",{value:!0});at.ImportElement=at.IncludeElement=at.BodyElement=at.DefinitionsElement=at.ServiceElement=at.PortElement=at.BindingElement=at.PortTypeElement=at.OperationElement=at.TypesElement=at.SchemaElement=at.DocumentationElement=at.MessageElement=at.AllElement=at.AttributeElement=at.SequenceElement=at.SimpleContentElement=at.ComplexContentElement=at.ComplexTypeElement=at.EnumerationElement=at.ChoiceElement=at.ExtensionElement=at.RestrictionElement=at.SimpleTypeElement=at.OutputElement=at.InputElement=at.AnyElement=at.ElementElement=at.UnexpectedElement=at.Element=void 0;var ZB=require("assert"),zhe=Whe(Fp()),ca=Ghe(Uo()),ls=hc(),Jhe=(0,zhe.default)("node-soap"),Mb={string:1,boolean:1,decimal:1,float:1,double:1,anyType:1,byte:1,int:1,long:1,short:1,negativeInteger:1,nonNegativeInteger:1,positiveInteger:1,nonPositiveInteger:1,unsignedByte:1,unsignedInt:1,unsignedLong:1,unsignedShort:1,duration:0,dateTime:0,time:0,date:0,gYearMonth:0,gYear:0,gMonthDay:0,gDay:0,gMonth:0,hexBinary:0,base64Binary:0,anyURI:0,QName:0,NOTATION:0},yr=class{static{o(this,"Element")}constructor(e,t,n,s){this.allowedChildren={},this.children=[];let i=(0,ls.splitQName)(e);this.nsName=e,this.prefix=i.prefix,this.name=i.name,this.children=[],this.xmlns={},this.schemaXmlns={},this._initializeOptions(n);for(let a in t){let u=/^xmlns:?(.*)$/.exec(a);u?this.xmlns[u[1]?u[1]:ls.TNS_PREFIX]=t[a]:a==="value"?this[this.valueKey]=t[a]:this["$"+a]=t[a]}for(let a in s){let u=/^xmlns:?(.*)$/.exec(a);u&&u[1]&&(this.schemaXmlns[u[1]]=s[a])}this.$targetNamespace!==void 0&&(this.xmlns[ls.TNS_PREFIX]=this.$targetNamespace),this.init()}deleteFixedAttrs(){this.children&&this.children.length===0&&delete this.children,this.xmlns&&Object.keys(this.xmlns).length===0&&delete this.xmlns,delete this.nsName,delete this.prefix,delete this.name}startElement(e,t,n,s,i){if(!this.allowedChildren)return;let a=this.allowedChildren[(0,ls.splitQName)(t).name];if(a==null&&!this.strict&&(a=u9),a){let u=new a(t,n,s,i);u.init();let c=e[0];c instanceof cD&&(u.definitionsXmlns=c.xmlns),e.push(u)}else this.unexpected(t)}endElement(e,t){if(this.nsName===t){if(e.length<2)return;let n=e[e.length-2];this!==e[0]&&(ca.defaultsDeep(e[0].xmlns,this.xmlns),n.children.push(this),n.addChild(this)),e.pop()}}addChild(e){}unexpected(e){throw new Error("Found unexpected element ("+e+") inside "+this.nsName)}description(e,t){return this.$name||this.name}init(){}_initializeOptions(e){e?(this.valueKey=e.valueKey||"$value",this.xmlKey=e.xmlKey||"$xml",this.ignoredNamespaces=e.ignoredNamespaces||[],this.strict=e.strict||!1,this.forceUseSchemaXmlns=e.forceUseSchemaXmlns||!1):(this.valueKey="$value",this.xmlKey="$xml",this.ignoredNamespaces=[],this.strict=!1,this.forceUseSchemaXmlns=!1)}};at.Element=yr;var u9=class c9 extends yr{static{o(this,"UnexpectedElement")}startElement(e,t,n,s,i){let a=new c9(t,n,s,i);a.init(),e.push(a)}};at.UnexpectedElement=u9;var eD=class extends yr{static{o(this,"ElementElement")}constructor(){super(...arguments),this.allowedChildren=pn(["annotation","complexType","simpleType"])}description(e,t){let n={},s=this.$name,i=1,a=1;this.$maxOccurs==="unbounded"?a=1/0:this.$maxOccurs&&(a=parseInt(this.$maxOccurs,10)),this.$minOccurs&&(i=parseInt(this.$minOccurs,10));let u=a>1;u&&s&&(s+="[]"),t&&t[ls.TNS_PREFIX]&&(this.$targetNamespace=t[ls.TNS_PREFIX]);let c=this.$type||this.$ref;if(c){c=(0,ls.splitQName)(c);let f=c.name,h=!!wc(c.prefix,this.definitionsXmlns,e.xmlns)||!!wc(this.targetNSAlias,this.definitionsXmlns,e.xmlns)||this.forceUseSchemaXmlns,m=wc(c.prefix,t,this.xmlns,h?this.schemaXmlns:void 0,this.definitionsXmlns,e.xmlns),g=e.schemas[m],x=g&&(this.$type?g.complexTypes[f]||g.types[f]:g.elements[f]),v=this.$type?e.descriptions.types:e.descriptions.elements;if(m&&e.schemas[m]&&(t=e.schemas[m].xmlns),x&&!(f in Mb))if(f in v)if(this.$ref)if(u){let w=f+"[]";v[w]=v[f],n[w]=v[w]}else n=v[f];else n[s]=v[f];else{let w={};v[f]=w,u&&"maxOccurs"in x&&(x.maxOccurs=this.$maxOccurs),this.$minOccurs&&"minOccurs"in x&&(x.minOccurs=this.$minOccurs);let S=x.description(e,t);if(typeof S=="string")w=S;else{Object.keys(S).forEach(N=>{w[N]=S[N]});let A=S[la.Symbol];A&&(w[la.Symbol]=A)}this.$ref?n=w:n[s]=w,typeof w=="object"&&(w.targetNSAlias=c.prefix,w.targetNamespace=m),v[f]=w}else n[s]=this.$type}else{let f=this.children;n[s]={};for(let h of f)(h instanceof Xb||h instanceof Hb)&&(n[s]=h.description(e,t))}return n}};at.ElementElement=eD;var qb=class extends yr{static{o(this,"AnyElement")}};at.AnyElement=qb;var l9=class extends yr{static{o(this,"InputElement")}constructor(){super(...arguments),this.allowedChildren=pn(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof Gb&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};at.InputElement=l9;var f9=class extends yr{static{o(this,"OutputElement")}constructor(){super(...arguments),this.allowedChildren=pn(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof Gb&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};at.OutputElement=f9;var Hb=class extends yr{static{o(this,"SimpleTypeElement")}constructor(){super(...arguments),this.allowedChildren=pn(["restriction"])}description(e){for(let t of this.children)if(t instanceof Kb)return[this.$name,t.description()].filter(Boolean).join("|");return{}}};at.SimpleTypeElement=Hb;var Kb=class extends yr{static{o(this,"RestrictionElement")}constructor(){super(...arguments),this.allowedChildren=pn(["all","choice","enumeration","sequence","attribute"])}description(e,t){let n=this.children,s,i=!1,a={};for(let c of n){if(c instanceof la){a[c.$name]=c.description(e);continue}!i&&(c instanceof xv||c instanceof yv)&&(i=!0,s=c.description(e,t))}if(Object.keys(a).length>0&&(s=s??{},s[la.Symbol]=a),s&&this.$base){let c=(0,ls.splitQName)(this.$base),f=c.name,h=wc(c.prefix,t,this.definitionsXmlns,e.xmlns),m=e.schemas[h],g=m&&(m.complexTypes[f]||m.types[f]||m.elements[f]);if(s.getBase=()=>g.description(e,m.xmlns),g){let x=g.description(e,m.xmlns);x[la.Symbol]&&ca.defaults(a,x[la.Symbol]),s=ca.defaults(s,x)}return s}let u=this.children.map(c=>c.description()).join(",");return[this.$base,u].filter(Boolean).join("|")}};at.RestrictionElement=Kb;var $b=class extends yr{static{o(this,"ExtensionElement")}constructor(){super(...arguments),this.allowedChildren=pn(["all","choice","sequence"])}description(e,t){let n={};for(let s of this.children)(s instanceof xv||s instanceof yv)&&(n=s.description(e,t));if(this.$base){let s=(0,ls.splitQName)(this.$base),i=s.name,a=wc(s.prefix,t,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(i in Mb)return this.$base;{let c=u&&(u.complexTypes[i]||u.types[i]||u.elements[i]);if(c){let f=c.description(e,u.xmlns);n=typeof f=="string"?f:ca.defaults(f,n)}}}return n}};at.ExtensionElement=$b;var yv=class extends yr{static{o(this,"ChoiceElement")}constructor(){super(...arguments),this.allowedChildren=pn(["any","choice","element","sequence"])}description(e,t){let n={};for(let s of this.children){let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};at.ChoiceElement=yv;var h9=class extends yr{static{o(this,"EnumerationElement")}description(){return this[this.valueKey]}};at.EnumerationElement=h9;var Xb=class extends yr{static{o(this,"ComplexTypeElement")}constructor(){super(...arguments),this.allowedChildren=pn(["all","annotation","choice","complexContent","sequence","simpleContent","attribute"])}description(e,t){let n={},s=!1,i={},a=this.children||[];for(let u of a){if(u instanceof la){i[u.$name]=u.description(e);continue}!s&&(u instanceof yv||u instanceof xv||u instanceof nD||u instanceof rD||u instanceof tD)&&(s=!0,n=u.description(e,t))}return Object.keys(i).length>0&&(n[la.Symbol]=i),n}};at.ComplexTypeElement=Xb;var tD=class extends yr{static{o(this,"ComplexContentElement")}constructor(){super(...arguments),this.allowedChildren=pn(["extension","restriction"])}description(e,t){for(let n of this.children)if(n instanceof $b||n instanceof Kb)return n.description(e,t);return{}}};at.ComplexContentElement=tD;var rD=class extends yr{static{o(this,"SimpleContentElement")}constructor(){super(...arguments),this.allowedChildren=pn(["extension"])}description(e,t){for(let n of this.children)if(n instanceof $b)return n.description(e,t);return{}}};at.SimpleContentElement=rD;var xv=class extends yr{static{o(this,"SequenceElement")}constructor(){super(...arguments),this.allowedChildren=pn(["any","choice","element","sequence"])}description(e,t){let n={};for(let s of this.children){if(s instanceof qb)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};at.SequenceElement=xv;var la=class extends yr{static{o(this,"AttributeElement")}description(e){return{type:this.$type,required:this.$use==="required"}}};at.AttributeElement=la;la.Symbol=Symbol("$attributes");var nD=class extends yr{static{o(this,"AllElement")}constructor(){super(...arguments),this.allowedChildren=pn(["choice","element"])}description(e,t){let n={};for(let s of this.children){if(s instanceof qb)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};at.AllElement=nD;var sD=class extends yr{static{o(this,"MessageElement")}constructor(){super(...arguments),this.allowedChildren=pn(["part","documentation"]),this.element=null,this.parts=null}postProcess(e){let t=null,n=this.children||[];for(let s of n)if(s.name==="part"){t=s;break}if(t){if(t.$element){let s=[];delete this.parts;let i=(0,ls.splitQName)(t.$element),a=wc(i.prefix,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(this.element=u.elements[i.name],!this.element){Jhe(i.name+" is not present in wsdl and cannot be processed correctly.");return}this.element.targetNSAlias=i.prefix,this.element.targetNamespace=a,this.element.$lookupType=t.$element;let c=this.element.children;if(c.length>0)for(let f of c)s.push(this._getNestedLookupTypeString(f));if(s.length>0){s=s.join("_").split("_").filter(o(function(m){return m!=="^"},"removeEmptyLookupTypes"));let f=e.schemas[this.element.targetNamespace].xmlns;for(let h=0;h<s.length;h++)s[h]=this._createLookupTypeObject(s[h],f)}if(this.element.$lookupTypes=s,this.element.$type){let f=(0,ls.splitQName)(this.element.$type),h=wc(f.prefix,u.xmlns,this.definitionsXmlns,e.xmlns);if(h&&!(f.name in Mb)){u=e.schemas[h];let m=u.complexTypes[f.name]||u.types[f.name]||u.elements[f.name];m&&(this.parts=m.description(e,u.xmlns))}}else{let f=this.element.description(e,u.xmlns);this.parts=f[i.name]}this.children.splice(0,1)}else{this.parts={},delete this.element;for(let s=0;s<this.children.length;s++){let i=this.children[s];if(i.name==="documentation")continue;(0,ZB.ok)(i.name==="part","Expected part element");let a=(0,ls.splitQName)(i.$type),u=wc(a.prefix,this.definitionsXmlns,e.xmlns),c=a.name;typeof e.schemas[u]<"u"?this.parts[i.$name]=e.schemas[u].types[c]||e.schemas[u].complexTypes[c]:this.parts[i.$name]=i.$type,typeof this.parts[i.$name]=="object"&&(this.parts[i.$name].prefix=a.prefix,this.parts[i.$name].xmlns=u),this.children.splice(s--,1)}}this.deleteFixedAttrs()}}description(e){if(this.element)return this.element&&this.element.description(e);let t={};return t[this.$name]=this.parts,t}_createLookupTypeObject(e,t){let n=(0,ls.splitQName)(e),s=n.prefix,i=n.name.split("#"),a=i[0],u=i[1];return{$namespace:t[s],$type:s+":"+a,$name:u}}_getNestedLookupTypeString(e){let t="^",n=this.ignoredNamespaces.concat("xs");return Object.hasOwnProperty.call(e,"$type")&&typeof e.$type=="string"&&n.indexOf(e.$type.split(":")[0])===-1&&(t+="_"+e.$type+"#"+e.$name),e.children.length>0&&e.children.forEach(s=>{let i=this._getNestedLookupTypeString(s).replace(/\^_/,"");i&&typeof i=="string"&&(t+="_"+i)}),t}};at.MessageElement=sD;var p9=class extends yr{static{o(this,"DocumentationElement")}};at.DocumentationElement=p9;var vv=class d9 extends yr{static{o(this,"SchemaElement")}constructor(){super(...arguments),this.allowedChildren=pn(["complexType","element","import","include","simpleType"]),this.complexTypes={},this.types={},this.elements={},this.includes=[]}merge(e){return(0,ZB.ok)(e instanceof d9),ca.merge(this.complexTypes,e.complexTypes),ca.merge(this.types,e.types),ca.merge(this.elements,e.elements),ca.merge(this.xmlns,e.xmlns),ca.merge(this,ca.pickBy(e,(t,n)=>n.startsWith("$")&&!Object.hasOwnProperty.call(this,n))),this}addChild(e){if(!(e.$name in Mb)){if(e instanceof lD||e instanceof fD){let t=e.$schemaLocation||e.$location;t&&this.includes.push({namespace:e.$namespace||e.$targetNamespace||this.$targetNamespace,location:t})}else e instanceof Xb?this.complexTypes[e.$name]=e:e instanceof eD?this.elements[e.$name]=e:e instanceof Hb&&(this.types[e.$name]=e);this.children.pop()}}};at.SchemaElement=vv;var iD=class extends yr{static{o(this,"TypesElement")}constructor(){super(...arguments),this.allowedChildren=pn(["documentation","schema"]),this.schemas={}}addChild(e){(0,ZB.ok)(e instanceof vv);let t=e.includes.find(i=>Object.hasOwnProperty.call(i,"namespace")),n=typeof t<"u"&&Object.hasOwnProperty.call(t,"namespace")&&e instanceof vv?t.namespace:void 0,s=e.$targetNamespace||e.includes[0]?.namespace||n;Object.hasOwnProperty.call(this.schemas,s)?s===e.$targetNamespace?this.schemas[s]=e:console.error('Target-Namespace "'+s+'" already in use by another Schema!'):this.schemas[s]=e}};at.TypesElement=iD;var m9=class g9 extends yr{static{o(this,"OperationElement")}constructor(){super(...arguments),this.allowedChildren=pn(["documentation","fault","input","operation","output"]),this.input=null,this.output=null,this.inputSoap=null,this.outputSoap=null,this.style="",this.soapAction=""}addChild(e){e instanceof g9&&(this.soapAction=e.$soapAction||"",this.style=e.$style||"",this.children.pop())}postProcess(e,t){let n=this.children;for(let s=0;s<n.length;s++){let i=n[s];if(i.name!=="input"&&i.name!=="output")continue;if(t==="binding"){this[i.name]=i,n.splice(s--,1);continue}let a=(0,ls.splitQName)(i.$message).name,u=e.messages[a];u&&(u.postProcess(e),u.element?(e.messages[u.element.$name]=u,this[i.name]=u.element):this[i.name]=u,n.splice(s--,1))}this.deleteFixedAttrs()}description(e){let t=this.input?this.input.description(e):null,n=this.output?this.output.description(e):null;return{input:t&&t[Object.keys(t)[0]],output:n&&n[Object.keys(n)[0]]}}};at.OperationElement=m9;var aD=class extends yr{static{o(this,"PortTypeElement")}constructor(){super(...arguments),this.allowedChildren=pn(["documentation","operation"]),this.methods={}}postProcess(e){let t=this.children;if(!(typeof t>"u")){for(let n=0;n<t.length;n++){let s=t[n];s.name==="operation"&&(s.postProcess(e,"portType"),this.methods[s.$name]=s,t.splice(n--,1))}delete this.$name,this.deleteFixedAttrs()}}description(e){let t={};for(let n in this.methods){let s=this.methods[n];t[n]=s.description(e)}return t}};at.PortTypeElement=aD;var oD=class extends yr{static{o(this,"BindingElement")}constructor(){super(...arguments),this.allowedChildren=pn(["binding","documentation","operation","SecuritySpec"]),this.transport="",this.style="",this.methods={}}addChild(e){e.name==="binding"&&(this.transport=e.$transport,this.style=e.$style,this.children.pop())}postProcess(e){let t=(0,ls.splitQName)(this.$type).name,n=e.portTypes[t],s=this.style,i=this.children;if(n){n.postProcess(e),this.methods=n.methods;for(let a=0;a<i.length;a++){let u=i[a];if(u.name!=="operation")continue;u.postProcess(e,"binding"),i.splice(a--,1),u.style||(u.style=s);let c=this.methods[u.$name];c&&(c.style=u.style,c.soapAction=u.soapAction,c.inputSoap=u.input||null,c.outputSoap=u.output||null,c.inputSoap&&c.inputSoap.deleteFixedAttrs(),c.outputSoap&&c.outputSoap.deleteFixedAttrs())}}delete this.$name,delete this.$type,this.deleteFixedAttrs()}description(e){let t={};for(let n in this.methods){let s=this.methods[n];t[n]=s.description(e)}return t}};at.BindingElement=oD;var v9=class extends yr{static{o(this,"PortElement")}constructor(){super(...arguments),this.allowedChildren=pn(["address","documentation"]),this.location=null}addChild(e){e.name==="address"&&typeof e.$location<"u"&&(this.location=e.$location)}};at.PortElement=v9;var uD=class extends yr{static{o(this,"ServiceElement")}constructor(){super(...arguments),this.allowedChildren=pn(["documentation","port"]),this.ports={}}postProcess(e){let t=this.children,n=e.bindings;if(t&&t.length>0)for(let s=0;s<t.length;s++){let i=t[s];if(i.name!=="port")continue;let a=(0,ls.splitQName)(i.$binding).name,u=n[a];u&&(u.postProcess(e),this.ports[i.$name]={location:i.location,binding:u},t.splice(s--,1))}delete this.$name,this.deleteFixedAttrs()}description(e){let t={};for(let n in this.ports){let s=this.ports[n];t[n]=s.binding.description(e)}return t}};at.ServiceElement=uD;var cD=class extends yr{static{o(this,"DefinitionsElement")}constructor(){super(...arguments),this.allowedChildren=pn(["binding","documentation","import","message","portType","service","types"]),this.messages={},this.portTypes={},this.bindings={},this.services={},this.schemas={},this.descriptions={types:{},elements:{}}}init(){this.name!=="definitions"&&this.unexpected(this.nsName)}addChild(e){if(e instanceof iD)ca.merge(this.schemas,e.schemas);else if(e instanceof sD)this.messages[e.$name]=e;else if(e.name==="import"){let t=new vv(e.$namespace,{});t.init(),this.schemas[e.$namespace]=t,this.schemas[e.$namespace].addChild(e)}else e instanceof aD?this.portTypes[e.$name]=e:e instanceof oD?(e.transport==="http://schemas.xmlsoap.org/soap/http"||e.transport==="http://www.w3.org/2003/05/soap/bindings/HTTP/")&&(this.bindings[e.$name]=e):e instanceof uD&&(this.services[e.$name]=e);this.children.pop()}};at.DefinitionsElement=cD;var Gb=class extends yr{static{o(this,"BodyElement")}};at.BodyElement=Gb;var lD=class extends yr{static{o(this,"IncludeElement")}};at.IncludeElement=lD;var fD=class extends yr{static{o(this,"ImportElement")}};at.ImportElement=fD;var Yhe={all:nD,any:qb,binding:oD,body:Gb,choice:yv,complexContent:tD,complexType:Xb,definitions:cD,documentation:p9,element:eD,enumeration:h9,extension:$b,fault:yr,import:fD,include:lD,input:l9,message:sD,operation:m9,output:f9,port:v9,portType:aD,restriction:Kb,schema:vv,sequence:xv,service:uD,simpleContent:rD,simpleType:Hb,types:iD,attribute:la};function pn(r){let e={};for(let t of r)e[t.replace(/^_/,"")]=Yhe[t]||yr;return e}o(pn,"buildAllowedChildren");function wc(r,...e){for(let t of e)if(t?.[r])return t[r]}o(wc,"findNs")});var dD=Q($s=>{"use strict";var Qhe=$s&&$s.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Zhe=$s&&$s.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),vd=$s&&$s.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&Qhe(t,e,n[s]);return Zhe(t,e),t}})(),b9=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});$s.WSDL=void 0;$s.trim=pD;$s.open_wsdl=E9;var epe=require("assert"),tpe=b9(Fp()),rpe=vd(require("fs")),x9=vd(Uo()),wv=vd(require("path")),Wb=vd(QB()),npe=b9(a9()),spe=vd(require("url")),ipe=mb(),ape=o9(),Br=hc(),df=vd(y9()),w9=(0,tpe.default)("node-soap"),S9="http://www.w3.org/2001/XMLSchema-instance",ope="http://schemas.xmlsoap.org/soap/envelope/";function pD(r){return r.trim()}o(pD,"trim");function zb(r){return r&&r.charAt(r.length-1)!==":"?r+":":r}o(zb,"appendColon");function hD(r){return r&&r.charAt(r.length-1)===":"?r.substring(0,r.length-1):r}o(hD,"noColonNameSpace");var Jb=class{static{o(this,"WSDL")}constructor(e,t,n){this.ignoredNamespaces=["tns","targetNamespace","typedNamespace"],this.ignoreBaseNameSpaces=!1,this.valueKey="$value",this.xmlKey="$xml";let s;if(this.uri=t,this.callback=()=>{},this._includesWsdl=[],this.WSDL_CACHE={},n&&n.WSDL_CACHE&&(this.WSDL_CACHE=n.WSDL_CACHE),this._initializeOptions(n),typeof e=="string")e=(0,npe.default)(e),s=this._fromXML;else if(typeof e=="object")s=this._fromServices;else throw new Error("WSDL constructor takes either an XML string or service definition");process.nextTick(()=>{try{s.call(this,e)}catch(i){return this.callback(i)}this.processIncludes(i=>{let a;if(i)return this.callback(i);try{this.definitions.deleteFixedAttrs();let u=this.services=this.definitions.services;if(u)for(a in u)u[a].postProcess(this.definitions);let c=this.definitions.complexTypes;if(c)for(a in c)c[a].deleteFixedAttrs();let f=this.definitions.bindings;for(let h in f){let m=f[h];typeof m.style>"u"&&(m.style="document");let g=m.methods,x=m.topElements={};for(let v in g)if((g[v].style||m.style)==="document"&&g[v].input){let w=g[v].input.$name,S="";g[v].output&&(S=g[v].output.$name),x[w]={methodName:v,outputName:S}}}this.xmlnsInEnvelope=this._xmlnsMap(),this.callback(i,this)}catch(u){this.callback(u)}})})}onReady(e){e&&(this.callback=e)}processIncludes(e){let t=this.definitions.schemas,n=[];for(let s in t){let i=t[s];n=n.concat(i.includes||[])}this._processNextInclude(n,e)}describeServices(){let e={};for(let t in this.services){let n=this.services[t];e[t]=n.description(this.definitions)}return e}toXML(){return this.xml||""}getSaxStream(e){let t=Wb.createStream(!0,null);return e.pipe(t),t}xmlToObject(e,t){let n=typeof t=="function"?{}:Wb.parser(!0,null),s=null,i={},u=[{name:null,object:i,schema:{Envelope:{Header:{Security:{UsernameToken:{Username:"string",Password:"string"}}},Body:{Fault:{faultcode:"string",faultstring:"string",detail:"string"}}}}}],c=new Map,f="soap",h={},m={};if(n.onopentag=x=>{let v=x.name,w=x.attributes,S=(0,Br.splitQName)(v).name,A,N=u[u.length-1],b=N.schema,E={},C=!1,_=!1,M={},R=S;if(w.href){let K=w.href.substr(1);m[K]||(m[K]={hrefs:[],obj:null}),m[K].hrefs.push({par:N.object,key:S,obj:M})}w.id&&(m[w.id]||(m[w.id]={hrefs:[],obj:null}));for(A in w){let K=w[A];if(/^xmlns:|^xmlns$/.test(A)){let G=(0,Br.splitQName)(A).name;h[G]=K,K===S9&&c.set(G,K),K===ope&&(f=G);continue}C=!0,E[A]=K}for(A in E){let K=(0,Br.splitQName)(A);if(K.name==="nil"&&h[K.prefix]===S9&&E[A]&&(E[A].toLowerCase()==="true"||E[A]==="1")){_=!0;break}}if(C&&(M[this.options.attributesKey]=E),!s&&h[f]&&N.name==="Body"&&S!=="Fault"){let K=this.definitions.messages[S];if(!K)try{let G=!1;/Response$/.test(S)?S=S.replace(/Response$/,""):/Request$/.test(S)?(G=!0,S=S.replace(/Request$/,"")):/Solicit$/.test(S)&&(G=!0,S=S.replace(/Solicit$/,""));let pe=this.definitions.portTypes,le=Object.keys(pe),ue=pe[le[0]];G?S=ue.methods[S].input.$name:S=ue.methods[S].output.$name,K=this.definitions.messages[S],this.definitions.messages[R]=this.definitions.messages[S]}catch(G){this.options.returnFault&&n.onerror(G)}b=K.description(this.definitions),s=R}let q,H;for(let K of c.keys())if(`${K}:type`in E){H=E[`${K}:type`];break}if(H){let K=(0,Br.splitQName)(H),G;K.prefix===Br.TNS_PREFIX?G=h[K.prefix]||h.xmlns:G=h[K.prefix];let pe=this.findSchemaObject(G,K.name);pe&&(q=pe.description(this.definitions))}b&&b[S+"[]"]&&(S=S+"[]"),u.push({name:R,object:M,schema:q||b&&b[S],id:w.id,nil:_})},n.onclosetag=x=>{let v=u.pop(),w=v.object,S=u[u.length-1],A=S.object,N=S.schema,b=(0,Br.splitQName)(x).name;if(typeof v.schema=="string"&&(v.schema==="string"||v.schema.split(":")[1]==="string")&&typeof w=="object"&&Object.keys(w).length===0&&(w=v.object=this.options.preserveWhitespace&&v.text||""),v.nil===!0)if(this.options.handleNilAsNull)w=null;else return;x9.isPlainObject(w)&&!Object.keys(w).length&&(w=null),N&&N[b+"[]"]?(A[b]||(A[b]=[]),A[b].push(w)):b in A?(Array.isArray(A[b])||(A[b]=[A[b]]),A[b].push(w)):A[b]=w,v.id&&(m[v.id].obj=w)},n.oncdata=x=>{let v=x;if(x=pD(x),!!x.length)if(/<\?xml[\s\S]+\?>/.test(x)){let w=u[u.length-1],S=this.xmlToObject(x);w.object[this.options.attributesKey]?w.object[this.options.valueKey]=S:w.object=S}else n.ontext(v)},n.onerror=x=>{throw n.resume(),{Fault:{faultcode:500,faultstring:"Invalid XML",detail:new Error(x).message,statusCode:500}}},n.ontext=x=>{let v=u[u.length-1],w=x;if(x=pD(x),!x.length){this.options.preserveWhitespace&&(v.text=(v.text||"")+w);return}let S=(0,Br.splitQName)(v.schema).name,A;this.options&&this.options.customDeserializer&&this.options.customDeserializer[S]?A=this.options.customDeserializer[S](x,v):S==="int"||S==="integer"||S==="short"||S==="long"?A=parseInt(x,10):S==="double"||S==="float"||S==="decimal"?A=Number(x):S==="bool"||S==="boolean"?A=x.toLowerCase()==="true"||x==="1":S==="dateTime"||S==="date"?A=new Date(x):(this.options.preserveWhitespace&&(x=w),typeof v.object!="string"?A=x:A=v.object+x),v.object[this.options.attributesKey]?v.object[this.options.valueKey]=A:v.object=A},typeof t=="function"){let x=Wb.createStream(!0,null);x.on("opentag",n.onopentag),x.on("closetag",n.onclosetag),x.on("cdata",n.oncdata),x.on("text",n.ontext),e.pipe(x).on("error",v=>{t(v)}).on("end",()=>{let v;try{v=g()}catch(w){return t(w)}t(null,v)});return}return n.write(e).close(),g();function g(){for(let x in m){let v=m[x];for(let w of v.hrefs)Object.assign(w.obj,v.obj)}if(i.Envelope){let x=i.Envelope.Body;if(x&&x.Fault){let v=x.Fault,w=v.faultcode&&v.faultcode.$value,S=v.faultstring&&v.faultstring.$value,A=v.detail&&v.detail.$value;w=w||v.faultcode,S=S||v.faultstring,A=A||v.detail,w=w||v.Code&&`${v.Code.Value}: ${v.Code.Subcode&&v.Code.Subcode.Value}`,S=S||v.Reason&&v.Reason.Text.$value,S=S||v.Reason&&v.Reason.Text,A=A||v.Detail;let N=new Error(w+": "+S+(A?": "+JSON.stringify(A):""));throw N.root=i,N}return i.Envelope}return i}o(g,"finish")}findSchemaObject(e,t){if(!e||!t)return null;let n=null;if(this.definitions.schemas){let s=this.definitions.schemas[e];s&&(t.indexOf(":")!==-1&&(t=t.substring(t.indexOf(":")+1,t.length)),n=s.complexTypes[t]||s.types[t]||s.elements[t])}return n}objectToDocumentXML(e,t,n,s,i){if(t&&t._xml)return t._xml;let a={};a[e]=t;let u=i?this.findSchemaObject(s,i):null;return this.objectToXML(a,null,n,s,!0,null,u)}objectToRpcXML(e,t,n,s,i){let a=[],u=this.definitions,c="_xmlns";n=n||(0,Br.findPrefix)(u.xmlns,s),s=s||u.xmlns[n],n=n===Br.TNS_PREFIX?"":n+":",a.push(["<",n,e,">"].join(""));for(let f in t)if(Object.prototype.hasOwnProperty.call(t,f)&&f!==c){let h=t[f];if(f===this.options.xmlKey)a.push(this.objectToXML({[f]:h},null,n,s));else{let m=(i?"":n)+f,g=[];if(typeof h=="object"&&Object.prototype.hasOwnProperty.call(h,this.options.attributesKey)){let x=h[this.options.attributesKey];for(let v in x)g.push(" "+v+'="'+x[v]+'"')}a.push(["<",m].concat(g).concat(">").join("")),a.push(typeof h=="object"?this.objectToXML(h,f,n,s):(0,Br.xmlEscape)(h)),a.push(["</",m,">"].join(""))}}return a.push(["</",n,e,">"].join("")),a.join("")}isIgnoredNameSpace(e){return this.options.ignoredNamespaces.indexOf(e)>-1}filterOutIgnoredNameSpace(e){let t=hD(e);return this.isIgnoredNameSpace(t)?"":t}objectToXML(e,t,n,s,i,a,u,c){let f=this.definitions.schemas[s];if(this.options.overrideElementKey&&Object.keys(this.options.overrideElementKey).length>0)for(let b in this.options.overrideElementKey){let E=this.options.overrideElementKey[b];e&&e[b]&&(Object.defineProperty(e,E,Object.getOwnPropertyDescriptor(e,b)),delete e[b])}let h=n?n.parent:void 0;typeof h<"u"&&(n=n.current),h=hD(h),this.isIgnoredNameSpace(h)&&(h="");let m=!f,g=f&&f.$elementFormDefault==="qualified",x=[],v=(n||g)&&n!==Br.TNS_PREFIX,w="";s&&i&&(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes?this.options.overrideRootElement.xmlnsAttributes.forEach(b=>{w+=" "+b.name+'="'+b.value+'"'}):(v&&!this.isIgnoredNameSpace(n)&&(w+=" xmlns:"+n+'="'+s+'"'),(g||m)&&(w+=' xmlns="'+s+'"'))),c?c.pushContext():(c=new ape.NamespaceContext,c.declareNamespace(n,s)),a&&!(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes)&&(w=a);let S="";this.options.overrideRootElement&&i?S=this.options.overrideRootElement.namespace:v&&(g||i||m)&&!this.isIgnoredNameSpace(n)&&(S=n);let A,N;if(Array.isArray(e)){let b="",E=!1,C=/^([^:]+):([^:]+)$/.exec(t);for(C?(b=C[1],t=C[2]):t[0]===":"&&(E=!0,t=t.substr(1)),A=0,N=e.length;A<N;A++){let _=e[A],M=this.processAttributes(_,c),R=b||h||S,q=this.objectToXML(_,t,n,s,!1,null,u,c),H=["<",t,M,w];E||(H=["<",zb(R),t,M,w]),q===""&&this.options.useEmptyTag?(H.push(" />"),x.push(H.join(""))):(H.push(">"),(this.options.namespaceArrayElements||A===0)&&x.push(H.join("")),x.push(q),(this.options.namespaceArrayElements||A===N-1)&&(E?x.push(["</",t,">"].join("")):x.push(["</",zb(R),t,">"].join(""))))}}else if(typeof e=="object"){let b="";for(t in e){if(e.hasOwnProperty||(e=Object.assign({},e)),!Object.prototype.hasOwnProperty.call(e,t)||t===this.options.attributesKey)continue;if(t===this.options.xmlKey)return c.popContext(),e[t];if(t===this.options.valueKey)return c.popContext(),(0,Br.xmlEscape)(e[t]);let E=e[t];if(typeof E>"u")continue;let C=this.processAttributes(E,c),_="",M="",R=!1,q=/^([^:]+):([^:]+)$/.exec(t);if(q?(M=q[1]+":",t=q[2]):t[0]===":"&&(R=!0,t=t.substr(1)),i)_=this.objectToXML(E,t,n,s,!1,null,u,c);else if(this.definitions.schemas)if(f){let K=this.findChildSchemaObject(u,t);if(K&&(K.$type&&K.$type.indexOf("xsd:")===-1||K.$ref||K.$name)){let G="",pe="",le,ue="",ee=K.$ref||K.$name;if(ee){ee=(0,Br.splitQName)(ee),pe=ee.name,ee.prefix===Br.TNS_PREFIX?(le=K.$targetNamespace,G=c.registerNamespace(le),this.isIgnoredNameSpace(G)&&(G=n)):(G=ee.prefix,this.isIgnoredNameSpace(G)&&(G=n),le=f.xmlns[G]||this.definitions.xmlns[G]);let we=!1;K.$name&&K.targetNamespace===void 0&&(K.$form==="unqualified"?we=!0:K.$form==="qualified"?we=!1:we=f.$elementFormDefault!=="qualified"),we&&(G=""),le&&G&&c.declareNamespace(G,le)&&(ue=" xmlns:"+G+'="'+le+'"',w.includes(G)||(b=ue,w+=ue))}let he;if(K.$type){let we=(0,Br.splitQName)(K.$type),Ke=K.$baseNameSpace||we.prefix,Ae=f.xmlns[Ke]||this.definitions.xmlns[Ke];le=Ae,Ae!=="http://www.w3.org/2001/XMLSchema"&&Ke!==Br.TNS_PREFIX&&c.addNamespace(Ke,Ae),he=this.findSchemaType(we.name,Ae)||K}else he=this.findSchemaObject(le,pe)||K;K.$baseNameSpace&&this.options.ignoreBaseNameSpaces&&(G=n,le=s),this.options.ignoreBaseNameSpaces&&(G="",le=""),S=G,Array.isArray(E)?(G={current:G,parent:S},ue=ue&&ue.length?ue:b):ue=null,_=this.objectToXML(E,t,G,le,!1,ue,he,c)}else e[this.options.attributesKey]&&e[this.options.attributesKey].xsi_type?(M=e[this.options.attributesKey].xsi_type.prefix,c.addNamespace(e[this.options.attributesKey].xsi_type.prefix,e[this.options.attributesKey].xsi_type.xmlns),_=this.objectToXML(E,t,e[this.options.attributesKey].xsi_type.prefix,e[this.options.attributesKey].xsi_type.xmlns,!1,null,null,c)):(Array.isArray(E)&&(R?t=":"+t:t=M+t),_=this.objectToXML(E,t,n,s,!1,null,null,c))}else _=this.objectToXML(E,t,n,s,!1,null,null,c);S=hD(S),v&&!g&&i&&!this.options.overrideRootElement?S=n:this.isIgnoredNameSpace(S)&&(S="");let H=!_&&this.options.useEmptyTag;Array.isArray(E)||x.push(["<",R?"":zb(M||S),t,C,w,E===null?' xsi:nil="true"':"",H?" />":">"].join("")),H||(x.push(_),Array.isArray(E)||x.push(["</",R?"":zb(M||S),t,">"].join("")))}}else e!==void 0&&x.push(this.options.escapeXML?(0,Br.xmlEscape)(e):e);return c.popContext(),x.join("")}processAttributes(e,t){let n="";e==null&&(e=[]);let s=e[this.options.attributesKey]||{};if(s&&s.xsi_type){let i=s.xsi_type,a=i.prefix||i.namespace;i.xmlns&&(a?t.declareNamespace(a,i.xmlns):a=t.registerNamespace(i.xmlns),i.prefix=a)}return Object.keys(s).forEach(i=>{let a=s[i];if(i==="xsi_type"){let u=a.type;a.prefix&&(u=`${a.prefix}:${u}`),n+=` xsi:type="${u}"`,a.xmlns&&(n+=` xmlns:${a.prefix}="${a.xmlns}"`)}else n+=` ${i}="${(0,Br.xmlEscape)(a)}"`}),n}findSchemaType(e,t){if(!this.definitions.schemas||!e||!t)return null;let n=this.definitions.schemas[t];return!n||!n.complexTypes?null:n.complexTypes[e]}findChildSchemaObject(e,t,n){if(!e||!t||(n||(n=[]),n.indexOf(e)>=0))return null;n=n.concat([e]);let s=null,i=0,a;if(Array.isArray(e.$lookupTypes)&&e.$lookupTypes.length){let f=e.$lookupTypes;for(i=0;i<f.length;i++){let h=f[i];if(h.$name===t){s=h;break}}}let u=e;if(u.$name===t&&u.name==="element"||u.$ref&&(a=(0,Br.splitQName)(u.$ref),a.name===t))return u;let c;if(u.$type&&n.length===1){let f=(0,Br.splitQName)(u.$type);f.prefix===Br.TNS_PREFIX?c=e.$targetNamespace:c=this.definitions.xmlns[f.prefix];let h=this.findSchemaType(f.name,c);if(h)return this.findChildSchemaObject(h,t,n)}if(u.$base&&(!Array.isArray(u.children)||!u.children.length)){let f=(0,Br.splitQName)(u.$base);c=e.$targetNamespace,f.prefix!==Br.TNS_PREFIX&&(c=this.definitions.xmlns[f.prefix]);let h=this.findSchemaType(f.name,c);if(h)return this.findChildSchemaObject(h,t,n)}if(Array.isArray(u.children)&&u.children.length>0)for(let f of u.children){if(s=this.findChildSchemaObject(f,t,n),s)break;if(f.$base){let h=(0,Br.splitQName)(f.$base),m=h.prefix===Br.TNS_PREFIX?"":h.prefix;c=f.xmlns[h.prefix]||f.schemaXmlns[h.prefix];let g=this.findSchemaType(h.name,c);if(g&&(s=this.findChildSchemaObject(g,t,n),s)){s.$baseNameSpace=m;break}}}return!s&&u.$name===t?u:s}_initializeOptions(e){this._originalIgnoredNamespaces=(e||{}).ignoredNamespaces,this.options={};let t=e?e.ignoredNamespaces:null;t&&(Array.isArray(t.namespaces)||typeof t.namespaces=="string")?t.override?this.options.ignoredNamespaces=t.namespaces:this.options.ignoredNamespaces=this.ignoredNamespaces.concat(t.namespaces):this.options.ignoredNamespaces=this.ignoredNamespaces,this.options.valueKey=e.valueKey||this.valueKey,this.options.xmlKey=e.xmlKey||this.xmlKey,e.escapeXML!==void 0?this.options.escapeXML=e.escapeXML:this.options.escapeXML=!0,e.returnFault!==void 0?this.options.returnFault=e.returnFault:this.options.returnFault=!1,this.options.handleNilAsNull=!!e.handleNilAsNull,e.namespaceArrayElements!==void 0?this.options.namespaceArrayElements=e.namespaceArrayElements:this.options.namespaceArrayElements=!0,this.options.wsdl_headers=e.wsdl_headers,this.options.wsdl_options=e.wsdl_options,e.httpClient&&(this.options.httpClient=e.httpClient),e.request&&(this.options.request=e.request);let n=e?e.ignoreBaseNameSpaces:null;n!==null&&typeof n<"u"?this.options.ignoreBaseNameSpaces=n:this.options.ignoreBaseNameSpaces=this.ignoreBaseNameSpaces,this.options.forceSoap12Headers=e.forceSoap12Headers,this.options.customDeserializer=e.customDeserializer,this.options.forceUseSchemaXmlns=e.forceUseSchemaXmlns,e.overrideElementKey!==void 0&&(this.options.overrideElementKey=e.overrideElementKey),e.overrideRootElement!==void 0&&(this.options.overrideRootElement=e.overrideRootElement),this.options.useEmptyTag=!!e.useEmptyTag}_processNextInclude(e,t){let n=e.shift();if(!n)return t();let s;!/^https?:/i.test(this.uri)&&!/^https?:/i.test(n.location)?(this.options.wsdl_options!==void 0&&Object.prototype.hasOwnProperty.call(this.options.wsdl_options,"fixedPath")?this.options.wsdl_options.fixedPath:!1)?s=wv.resolve(wv.dirname(this.uri),wv.parse(n.location).base):s=wv.resolve(wv.dirname(this.uri),n.location):s=spe.resolve(this.uri||"",n.location);let i=Object.assign({},this.options);if(i.ignoredNamespaces=this._originalIgnoredNamespaces||this.options.ignoredNamespaces,i.WSDL_CACHE=this.WSDL_CACHE,this.options.wsdl_options!==void 0&&typeof this.options.wsdl_options.overrideImportLocation=="function")try{s=this.options.wsdl_options.overrideImportLocation(s,this.uri,n.location,i)}catch(a){return t(a)}upe(s,i,(a,u)=>{if(a)return t(a);if(this._includesWsdl.push(u),u.definitions instanceof df.DefinitionsElement)x9.mergeWith(this.definitions,u.definitions,(c,f)=>c instanceof df.SchemaElement?c.merge(f):void 0);else return t(new Error("wsdl.defintions is not an instance of elements.DefinitionsElement"));this._processNextInclude(e,c=>{t(c)})})}_parse(e){let t=Wb.parser(!0,null),n=[],s=null,i=null,a=null,u=null,c=this.options;return t.onopentag=f=>{let h=f.name,m=f.attributes,g=n[n.length-1],x=(0,Br.splitQName)(h).name;if(x==="schema"&&(u=m),g)try{g.startElement(n,h,m,c,u)}catch(v){if(this.options.strict)throw v;n.push(new df.Element(h,m,c,u))}else if(x==="definitions")s=new df.DefinitionsElement(h,m,c),n.push(s);else if(x==="schema")s=new df.DefinitionsElement("definitions",{},{}),i=new df.TypesElement("types",{},{}),a=new df.SchemaElement(h,m,c),i.addChild(a),s.addChild(i),n.push(a);else throw x==="html"?new Error("Root element of WSDL was <html>. This is likely an authentication issue."):new Error("Unexpected root element of WSDL or include")},t.onclosetag=f=>{let h=n[n.length-1];(0,epe.ok)(h,"Unmatched close tag: "+f),h.endElement(n,f)},t.write(e).close(),s}_fromXML(e){this.definitions=this._parse(e),this.definitions.descriptions={types:{},elements:{}},this.xml=e}_fromServices(e){}_xmlnsMap(){let e=this.definitions.xmlns,t="";for(let n in e){if(n===""||n===Br.TNS_PREFIX)continue;let s=e[n];switch(s){case"http://xml.apache.org/xml-soap":case"http://schemas.xmlsoap.org/wsdl/":case"http://schemas.xmlsoap.org/wsdl/soap/":case"http://schemas.xmlsoap.org/wsdl/soap12/":case"http://schemas.xmlsoap.org/soap/encoding/":case"http://www.w3.org/2001/XMLSchema":continue}~s.indexOf("http://schemas.xmlsoap.org/")||~s.indexOf("http://www.w3.org/")||~s.indexOf("http://xml.apache.org/")||(t+=" xmlns:"+n+'="'+s+'"')}return t}};$s.WSDL=Jb;function upe(r,e,t){let n,s;typeof e=="function"?(n={},s=e):(n=e,s=t);let i=n.WSDL_CACHE[r];return i?s.call(i,null,i):E9(r,n,s)}o(upe,"open_wsdl_recursive");function E9(r,e,t){let n,s;typeof e=="function"?(n={},s=e):typeof t=="function"&&(n=e,s=t);let i=n.WSDL_CACHE||{},a=n.wsdl_headers,u=n.wsdl_options,c;return/^<\?xml[^>]*?>/i.test(r)?(c=new Jb(r,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s)):/^https?:/i.test(r)?(w9("Reading url: %s",r),(n.httpClient||new ipe.HttpClient(n)).request(r,null,(h,m,g)=>{h?s(h):m&&m.status===200?(c=new Jb(g,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s)):s(new Error("Invalid WSDL URL: "+r+`
|
|
84
|
+
|
|
85
|
+
\r Code: `+m.status+`
|
|
86
|
+
|
|
87
|
+
\r Response Body: `+m.data))},a,u)):(w9("Reading file: %s",r),rpe.readFile(r,"utf8",(f,h)=>{f?s(f):(c=new Jb(h,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s))})),c}o(E9,"open_wsdl")});var C9=Q(A9=>{"use strict";Object.defineProperty(A9,"__esModule",{value:!0})});var _9=Q(kt=>{"use strict";var N9=kt&&kt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(r,n,s)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),cpe=kt&&kt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),lpe=kt&&kt.__importStar||(function(){var r=o(function(e){return r=Object.getOwnPropertyNames||function(t){var n=[];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[n.length]=s);return n},r(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=r(e),s=0;s<n.length;s++)n[s]!=="default"&&N9(t,e,n[s]);return cpe(t,e),t}})(),fpe=kt&&kt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&N9(e,r,t)};Object.defineProperty(kt,"__esModule",{value:!0});kt.WSDL=kt.passwordDigest=kt.Server=kt.WSSecurityCertWithToken=kt.WSSecurityPlusCert=kt.WSSecurityCert=kt.WSSecurity=kt.NTLMSecurity=kt.ClientSSLSecurityPFX=kt.ClientSSLSecurity=kt.BearerSecurity=kt.BasicAuthSecurity=kt.HttpClient=kt.Client=kt.security=void 0;kt.createClient=I9;kt.createClientAsync=Epe;kt.listen=Ape;var hpe=mB(),ppe=lpe(JB()),dpe=YB(),mpe=hc(),T9=dD();kt.security=ppe;var gpe=mB();Object.defineProperty(kt,"Client",{enumerable:!0,get:o(function(){return gpe.Client},"get")});var vpe=mb();Object.defineProperty(kt,"HttpClient",{enumerable:!0,get:o(function(){return vpe.HttpClient},"get")});var $o=JB();Object.defineProperty(kt,"BasicAuthSecurity",{enumerable:!0,get:o(function(){return $o.BasicAuthSecurity},"get")});Object.defineProperty(kt,"BearerSecurity",{enumerable:!0,get:o(function(){return $o.BearerSecurity},"get")});Object.defineProperty(kt,"ClientSSLSecurity",{enumerable:!0,get:o(function(){return $o.ClientSSLSecurity},"get")});Object.defineProperty(kt,"ClientSSLSecurityPFX",{enumerable:!0,get:o(function(){return $o.ClientSSLSecurityPFX},"get")});Object.defineProperty(kt,"NTLMSecurity",{enumerable:!0,get:o(function(){return $o.NTLMSecurity},"get")});Object.defineProperty(kt,"WSSecurity",{enumerable:!0,get:o(function(){return $o.WSSecurity},"get")});Object.defineProperty(kt,"WSSecurityCert",{enumerable:!0,get:o(function(){return $o.WSSecurityCert},"get")});Object.defineProperty(kt,"WSSecurityPlusCert",{enumerable:!0,get:o(function(){return $o.WSSecurityPlusCert},"get")});Object.defineProperty(kt,"WSSecurityCertWithToken",{enumerable:!0,get:o(function(){return $o.WSSecurityCertWithToken},"get")});var ype=YB();Object.defineProperty(kt,"Server",{enumerable:!0,get:o(function(){return ype.Server},"get")});var xpe=hc();Object.defineProperty(kt,"passwordDigest",{enumerable:!0,get:o(function(){return xpe.passwordDigest},"get")});fpe(C9(),kt);var wpe=dD();Object.defineProperty(kt,"WSDL",{enumerable:!0,get:o(function(){return wpe.WSDL},"get")});function Spe(r,e,t,n){e.has(r)?process.nextTick(()=>{n(null,e.get(r))}):t((s,i)=>{if(s)return n(s);e.set(r,i),n(null,i)})}o(Spe,"getFromCache");function bpe(r,e,t){typeof e=="function"&&(t=e,e={});let n=o(s=>{(0,T9.open_wsdl)(r,e,s)},"openWsdl");if(e.disableCache===!0)n(t);else{let s;e.wsdlCache?s=e.wsdlCache:s=mpe.wsdlCacheSingleton,Spe(r,s,n,t)}}o(bpe,"_requestWSDL");function I9(r,e,t,n){let s=n,i,a;typeof e=="function"?(i=e,s=t,a={}):typeof t=="function"&&(a=e,i=t,s=n),s=a.endpoint||s,bpe(r,a,(u,c)=>{i(u,c&&new hpe.Client(c,s,a))})}o(I9,"createClient");function Epe(r,e,t){return typeof e>"u"&&(e={}),new Promise((n,s)=>{I9(r,e,(i,a)=>{i&&s(i),n(a)},t)})}o(Epe,"createClientAsync");function Ape(r,e,t,n,s){let i,a,u="";typeof e=="object"&&!(e instanceof RegExp)?(i=e,a=i.path,t=i.services,n=i.xml,u=i.uri):(a=e,i={path:e,services:t,callback:s});let c=new T9.WSDL(n||t,u,i);return new dpe.Server(r,a,t,c,i)}o(Ape,"listen")});var Yb=Q(vD=>{"use strict";(function(){vD.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
88
|
+
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(vD)});var io=Q((V9,Sc)=>{"use strict";(function(){var r,e,t,n,s,i,a,u=[].slice,c={}.hasOwnProperty;r=o(function(){var f,h,m,g,x,v;if(v=arguments[0],x=2<=arguments.length?u.call(arguments,1):[],s(Object.assign))Object.assign.apply(null,arguments);else for(f=0,m=x.length;f<m;f++)if(g=x[f],g!=null)for(h in g)c.call(g,h)&&(v[h]=g[h]);return v},"assign"),s=o(function(f){return!!f&&Object.prototype.toString.call(f)==="[object Function]"},"isFunction"),i=o(function(f){var h;return!!f&&((h=typeof f)=="function"||h==="object")},"isObject"),t=o(function(f){return s(Array.isArray)?Array.isArray(f):Object.prototype.toString.call(f)==="[object Array]"},"isArray"),n=o(function(f){var h;if(t(f))return!f.length;for(h in f)if(c.call(f,h))return!1;return!0},"isEmpty"),a=o(function(f){var h,m;return i(f)&&(m=Object.getPrototypeOf(f))&&(h=m.constructor)&&typeof h=="function"&&h instanceof h&&Function.prototype.toString.call(h)===Function.prototype.toString.call(Object)},"isPlainObject"),e=o(function(f){return s(f.valueOf)?f.valueOf():f},"getValue"),Sc.exports.assign=r,Sc.exports.isFunction=s,Sc.exports.isObject=i,Sc.exports.isArray=t,Sc.exports.isEmpty=n,Sc.exports.isPlainObject=a,Sc.exports.getValue=e}).call(V9)});var yD=Q((U9,j9)=>{"use strict";(function(){var r;j9.exports=r=(function(){function e(){}return o(e,"XMLDOMImplementation"),e.prototype.hasFeature=function(t,n){return!0},e.prototype.createDocumentType=function(t,n,s){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(t,n,s){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(t,n){throw new Error("This DOM method is not implemented.")},e})()}).call(U9)});var q9=Q((F9,M9)=>{"use strict";(function(){var r;M9.exports=r=(function(){function e(){}return o(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(t){throw new Error(t)},e})()}).call(F9)});var $9=Q((H9,K9)=>{"use strict";(function(){var r;K9.exports=r=(function(){function e(t){this.arr=t||[]}return o(e,"XMLDOMStringList"),Object.defineProperty(e.prototype,"length",{get:o(function(){return this.arr.length},"get")}),e.prototype.item=function(t){return this.arr[t]||null},e.prototype.contains=function(t){return this.arr.indexOf(t)!==-1},e})()}).call(H9)});var W9=Q((X9,G9)=>{"use strict";(function(){var r,e,t;e=q9(),t=$9(),G9.exports=r=(function(){function n(){var s;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=s=Object.create(this.defaultParams)}return o(n,"XMLDOMConfiguration"),Object.defineProperty(n.prototype,"parameterNames",{get:o(function(){return new t(Object.keys(this.defaultParams))},"get")}),n.prototype.getParameter=function(s){return this.params.hasOwnProperty(s)?this.params[s]:null},n.prototype.canSetParameter=function(s,i){return!0},n.prototype.setParameter=function(s,i){return i!=null?this.params[s]=i:delete this.params[s]},n})()}).call(X9)});var dn=Q((z9,J9)=>{"use strict";(function(){J9.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(z9)});var xD=Q((Y9,Q9)=>{"use strict";(function(){var r,e,t;r=dn(),t=fi(),Q9.exports=e=(function(){function n(s,i,a){if(this.parent=s,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),i==null)throw new Error("Missing attribute name. "+this.debugInfo(i));this.name=this.stringify.name(i),this.value=this.stringify.attValue(a),this.type=r.Attribute,this.isId=!1,this.schemaTypeInfo=null}return o(n,"XMLAttribute"),Object.defineProperty(n.prototype,"nodeType",{get:o(function(){return this.type},"get")}),Object.defineProperty(n.prototype,"ownerElement",{get:o(function(){return this.parent},"get")}),Object.defineProperty(n.prototype,"textContent",{get:o(function(){return this.value},"get"),set:o(function(s){return this.value=s||""},"set")}),Object.defineProperty(n.prototype,"namespaceURI",{get:o(function(){return""},"get")}),Object.defineProperty(n.prototype,"prefix",{get:o(function(){return""},"get")}),Object.defineProperty(n.prototype,"localName",{get:o(function(){return this.name},"get")}),Object.defineProperty(n.prototype,"specified",{get:o(function(){return!0},"get")}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(s){return this.options.writer.attribute(this,this.options.writer.filterOptions(s))},n.prototype.debugInfo=function(s){return s=s||this.name,s==null?"parent: <"+this.parent.name+">":"attribute: {"+s+"}, parent: <"+this.parent.name+">"},n.prototype.isEqualNode=function(s){return!(s.namespaceURI!==this.namespaceURI||s.prefix!==this.prefix||s.localName!==this.localName||s.value!==this.value)},n})()}).call(Y9)});var Qb=Q((Z9,eq)=>{"use strict";(function(){var r;eq.exports=r=(function(){function e(t){this.nodes=t}return o(e,"XMLNamedNodeMap"),Object.defineProperty(e.prototype,"length",{get:o(function(){return Object.keys(this.nodes).length||0},"get")}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(t){return this.nodes[t]},e.prototype.setNamedItem=function(t){var n;return n=this.nodes[t.nodeName],this.nodes[t.nodeName]=t,n||null},e.prototype.removeNamedItem=function(t){var n;return n=this.nodes[t],delete this.nodes[t],n||null},e.prototype.item=function(t){return this.nodes[Object.keys(this.nodes)[t]]||null},e.prototype.getNamedItemNS=function(t,n){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(t,n){throw new Error("This DOM method is not implemented.")},e})()}).call(Z9)});var Zb=Q((tq,rq)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f=o(function(m,g){for(var x in g)h.call(g,x)&&(m[x]=g[x]);function v(){this.constructor=m}return o(v,"ctor"),v.prototype=g.prototype,m.prototype=new v,m.__super__=g.prototype,m},"extend"),h={}.hasOwnProperty;c=io(),u=c.isObject,a=c.isFunction,i=c.getValue,s=fi(),r=dn(),e=xD(),n=Qb(),rq.exports=t=(function(m){f(g,m);function g(x,v,w){var S,A,N,b;if(g.__super__.constructor.call(this,x),v==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(v),this.type=r.Element,this.attribs={},this.schemaTypeInfo=null,w!=null&&this.attribute(w),x.type===r.Document&&(this.isRoot=!0,this.documentObject=x,x.rootObject=this,x.children)){for(b=x.children,A=0,N=b.length;A<N;A++)if(S=b[A],S.type===r.DocType){S.name=this.name;break}}}return o(g,"XMLElement"),Object.defineProperty(g.prototype,"tagName",{get:o(function(){return this.name},"get")}),Object.defineProperty(g.prototype,"namespaceURI",{get:o(function(){return""},"get")}),Object.defineProperty(g.prototype,"prefix",{get:o(function(){return""},"get")}),Object.defineProperty(g.prototype,"localName",{get:o(function(){return this.name},"get")}),Object.defineProperty(g.prototype,"id",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(g.prototype,"className",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(g.prototype,"classList",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(g.prototype,"attributes",{get:o(function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new n(this.attribs)),this.attributeMap},"get")}),g.prototype.clone=function(){var x,v,w,S;w=Object.create(this),w.isRoot&&(w.documentObject=null),w.attribs={},S=this.attribs;for(v in S)h.call(S,v)&&(x=S[v],w.attribs[v]=x.clone());return w.children=[],this.children.forEach(function(A){var N;return N=A.clone(),N.parent=w,w.children.push(N)}),w},g.prototype.attribute=function(x,v){var w,S;if(x!=null&&(x=i(x)),u(x))for(w in x)h.call(x,w)&&(S=x[w],this.attribute(w,S));else a(v)&&(v=v.apply()),this.options.keepNullAttributes&&v==null?this.attribs[x]=new e(this,x,""):v!=null&&(this.attribs[x]=new e(this,x,v));return this},g.prototype.removeAttribute=function(x){var v,w,S;if(x==null)throw new Error("Missing attribute name. "+this.debugInfo());if(x=i(x),Array.isArray(x))for(w=0,S=x.length;w<S;w++)v=x[w],delete this.attribs[v];else delete this.attribs[x];return this},g.prototype.toString=function(x){return this.options.writer.element(this,this.options.writer.filterOptions(x))},g.prototype.att=function(x,v){return this.attribute(x,v)},g.prototype.a=function(x,v){return this.attribute(x,v)},g.prototype.getAttribute=function(x){return this.attribs.hasOwnProperty(x)?this.attribs[x].value:null},g.prototype.setAttribute=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNode=function(x){return this.attribs.hasOwnProperty(x)?this.attribs[x]:null},g.prototype.setAttributeNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNode=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNS=function(x,v,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeAttributeNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getAttributeNodeNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setAttributeNodeNS=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasAttribute=function(x){return this.attribs.hasOwnProperty(x)},g.prototype.hasAttributeNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttribute=function(x,v){return this.attribs.hasOwnProperty(x)?this.attribs[x].isId:v},g.prototype.setIdAttributeNS=function(x,v,w){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setIdAttributeNode=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagName=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByTagNameNS=function(x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getElementsByClassName=function(x){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(x){var v,w,S;if(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(x)||x.namespaceURI!==this.namespaceURI||x.prefix!==this.prefix||x.localName!==this.localName||x.attribs.length!==this.attribs.length)return!1;for(v=w=0,S=this.attribs.length-1;0<=S?w<=S:w>=S;v=0<=S?++w:--w)if(!this.attribs[v].isEqualNode(x.attribs[v]))return!1;return!0},g})(s)}).call(tq)});var Sv=Q((nq,sq)=>{"use strict";(function(){var r,e,t=o(function(s,i){for(var a in i)n.call(i,a)&&(s[a]=i[a]);function u(){this.constructor=s}return o(u,"ctor"),u.prototype=i.prototype,s.prototype=new u,s.__super__=i.prototype,s},"extend"),n={}.hasOwnProperty;e=fi(),sq.exports=r=(function(s){t(i,s);function i(a){i.__super__.constructor.call(this,a),this.value=""}return o(i,"XMLCharacterData"),Object.defineProperty(i.prototype,"data",{get:o(function(){return this.value},"get"),set:o(function(a){return this.value=a||""},"set")}),Object.defineProperty(i.prototype,"length",{get:o(function(){return this.value.length},"get")}),Object.defineProperty(i.prototype,"textContent",{get:o(function(){return this.value},"get"),set:o(function(a){return this.value=a||""},"set")}),i.prototype.clone=function(){return Object.create(this)},i.prototype.substringData=function(a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.appendData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.insertData=function(a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.deleteData=function(a,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.replaceData=function(a,u,c){throw new Error("This DOM method is not implemented."+this.debugInfo())},i.prototype.isEqualNode=function(a){return!(!i.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)||a.data!==this.data)},i})(e)}).call(nq)});var eE=Q((iq,aq)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=dn(),t=Sv(),aq.exports=e=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=r.CData,this.value=this.stringify.cdata(c)}return o(a,"XMLCData"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.cdata(this,this.options.writer.filterOptions(u))},a})(t)}).call(iq)});var tE=Q((oq,uq)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=dn(),e=Sv(),uq.exports=t=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=r.Comment,this.value=this.stringify.comment(c)}return o(a,"XMLComment"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.comment(this,this.options.writer.filterOptions(u))},a})(e)}).call(oq)});var rE=Q((cq,lq)=>{"use strict";(function(){var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function f(){this.constructor=a}return o(f,"ctor"),f.prototype=u.prototype,a.prototype=new f,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;n=io().isObject,t=fi(),r=dn(),lq.exports=e=(function(a){s(u,a);function u(c,f,h,m){var g;u.__super__.constructor.call(this,c),n(f)&&(g=f,f=g.version,h=g.encoding,m=g.standalone),f||(f="1.0"),this.type=r.Declaration,this.version=this.stringify.xmlVersion(f),h!=null&&(this.encoding=this.stringify.xmlEncoding(h)),m!=null&&(this.standalone=this.stringify.xmlStandalone(m))}return o(u,"XMLDeclaration"),u.prototype.toString=function(c){return this.options.writer.declaration(this,this.options.writer.filterOptions(c))},u})(t)}).call(cq)});var nE=Q((fq,hq)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=fi(),r=dn(),hq.exports=e=(function(i){n(a,i);function a(u,c,f,h,m,g){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(f==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(c));if(!h)throw new Error("Missing DTD attribute type. "+this.debugInfo(c));if(!m)throw new Error("Missing DTD attribute default. "+this.debugInfo(c));if(m.indexOf("#")!==0&&(m="#"+m),!m.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(c));if(g&&!m.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(c));this.elementName=this.stringify.name(c),this.type=r.AttributeDeclaration,this.attributeName=this.stringify.name(f),this.attributeType=this.stringify.dtdAttType(h),g&&(this.defaultValue=this.stringify.dtdAttDefault(g)),this.defaultValueType=m}return o(a,"XMLDTDAttList"),a.prototype.toString=function(u){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(u))},a})(t)}).call(fq)});var sE=Q((pq,dq)=>{"use strict";(function(){var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function f(){this.constructor=a}return o(f,"ctor"),f.prototype=u.prototype,a.prototype=new f,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;n=io().isObject,t=fi(),r=dn(),dq.exports=e=(function(a){s(u,a);function u(c,f,h,m){if(u.__super__.constructor.call(this,c),h==null)throw new Error("Missing DTD entity name. "+this.debugInfo(h));if(m==null)throw new Error("Missing DTD entity value. "+this.debugInfo(h));if(this.pe=!!f,this.name=this.stringify.name(h),this.type=r.EntityDeclaration,!n(m))this.value=this.stringify.dtdEntityValue(m),this.internal=!0;else{if(!m.pubID&&!m.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(h));if(m.pubID&&!m.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(h));if(this.internal=!1,m.pubID!=null&&(this.pubID=this.stringify.dtdPubID(m.pubID)),m.sysID!=null&&(this.sysID=this.stringify.dtdSysID(m.sysID)),m.nData!=null&&(this.nData=this.stringify.dtdNData(m.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(h))}}return o(u,"XMLDTDEntity"),Object.defineProperty(u.prototype,"publicId",{get:o(function(){return this.pubID},"get")}),Object.defineProperty(u.prototype,"systemId",{get:o(function(){return this.sysID},"get")}),Object.defineProperty(u.prototype,"notationName",{get:o(function(){return this.nData||null},"get")}),Object.defineProperty(u.prototype,"inputEncoding",{get:o(function(){return null},"get")}),Object.defineProperty(u.prototype,"xmlEncoding",{get:o(function(){return null},"get")}),Object.defineProperty(u.prototype,"xmlVersion",{get:o(function(){return null},"get")}),u.prototype.toString=function(c){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(c))},u})(t)}).call(pq)});var iE=Q((mq,gq)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=fi(),r=dn(),gq.exports=e=(function(i){n(a,i);function a(u,c,f){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing DTD element name. "+this.debugInfo());f||(f="(#PCDATA)"),Array.isArray(f)&&(f="("+f.join(",")+")"),this.name=this.stringify.name(c),this.type=r.ElementDeclaration,this.value=this.stringify.dtdElementValue(f)}return o(a,"XMLDTDElement"),a.prototype.toString=function(u){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(u))},a})(t)}).call(mq)});var aE=Q((vq,yq)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=fi(),r=dn(),yq.exports=e=(function(i){n(a,i);function a(u,c,f){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing DTD notation name. "+this.debugInfo(c));if(!f.pubID&&!f.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(c));this.name=this.stringify.name(c),this.type=r.NotationDeclaration,f.pubID!=null&&(this.pubID=this.stringify.dtdPubID(f.pubID)),f.sysID!=null&&(this.sysID=this.stringify.dtdSysID(f.sysID))}return o(a,"XMLDTDNotation"),Object.defineProperty(a.prototype,"publicId",{get:o(function(){return this.pubID},"get")}),Object.defineProperty(a.prototype,"systemId",{get:o(function(){return this.sysID},"get")}),a.prototype.toString=function(u){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(u))},a})(t)}).call(vq)});var oE=Q((xq,wq)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f=o(function(m,g){for(var x in g)h.call(g,x)&&(m[x]=g[x]);function v(){this.constructor=m}return o(v,"ctor"),v.prototype=g.prototype,m.prototype=new v,m.__super__=g.prototype,m},"extend"),h={}.hasOwnProperty;c=io().isObject,u=fi(),r=dn(),e=nE(),n=sE(),t=iE(),s=aE(),a=Qb(),wq.exports=i=(function(m){f(g,m);function g(x,v,w){var S,A,N,b,E,C;if(g.__super__.constructor.call(this,x),this.type=r.DocType,x.children){for(b=x.children,A=0,N=b.length;A<N;A++)if(S=b[A],S.type===r.Element){this.name=S.name;break}}this.documentObject=x,c(v)&&(E=v,v=E.pubID,w=E.sysID),w==null&&(C=[v,w],w=C[0],v=C[1]),v!=null&&(this.pubID=this.stringify.dtdPubID(v)),w!=null&&(this.sysID=this.stringify.dtdSysID(w))}return o(g,"XMLDocType"),Object.defineProperty(g.prototype,"entities",{get:o(function(){var x,v,w,S,A;for(S={},A=this.children,v=0,w=A.length;v<w;v++)x=A[v],x.type===r.EntityDeclaration&&!x.pe&&(S[x.name]=x);return new a(S)},"get")}),Object.defineProperty(g.prototype,"notations",{get:o(function(){var x,v,w,S,A;for(S={},A=this.children,v=0,w=A.length;v<w;v++)x=A[v],x.type===r.NotationDeclaration&&(S[x.name]=x);return new a(S)},"get")}),Object.defineProperty(g.prototype,"publicId",{get:o(function(){return this.pubID},"get")}),Object.defineProperty(g.prototype,"systemId",{get:o(function(){return this.sysID},"get")}),Object.defineProperty(g.prototype,"internalSubset",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),g.prototype.element=function(x,v){var w;return w=new t(this,x,v),this.children.push(w),this},g.prototype.attList=function(x,v,w,S,A){var N;return N=new e(this,x,v,w,S,A),this.children.push(N),this},g.prototype.entity=function(x,v){var w;return w=new n(this,!1,x,v),this.children.push(w),this},g.prototype.pEntity=function(x,v){var w;return w=new n(this,!0,x,v),this.children.push(w),this},g.prototype.notation=function(x,v){var w;return w=new s(this,x,v),this.children.push(w),this},g.prototype.toString=function(x){return this.options.writer.docType(this,this.options.writer.filterOptions(x))},g.prototype.ele=function(x,v){return this.element(x,v)},g.prototype.att=function(x,v,w,S,A){return this.attList(x,v,w,S,A)},g.prototype.ent=function(x,v){return this.entity(x,v)},g.prototype.pent=function(x,v){return this.pEntity(x,v)},g.prototype.not=function(x,v){return this.notation(x,v)},g.prototype.up=function(){return this.root()||this.documentObject},g.prototype.isEqualNode=function(x){return!(!g.__super__.isEqualNode.apply(this,arguments).isEqualNode(x)||x.name!==this.name||x.publicId!==this.publicId||x.systemId!==this.systemId)},g})(u)}).call(xq)});var uE=Q((Sq,bq)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=dn(),e=fi(),bq.exports=t=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=r.Raw,this.value=this.stringify.raw(c)}return o(a,"XMLRaw"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.raw(this,this.options.writer.filterOptions(u))},a})(e)}).call(Sq)});var cE=Q((Eq,Aq)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=dn(),e=Sv(),Aq.exports=t=(function(i){n(a,i);function a(u,c){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=r.Text,this.value=this.stringify.text(c)}return o(a,"XMLText"),Object.defineProperty(a.prototype,"isElementContentWhitespace",{get:o(function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},"get")}),Object.defineProperty(a.prototype,"wholeText",{get:o(function(){var u,c,f;for(f="",c=this.previousSibling;c;)f=c.data+f,c=c.previousSibling;for(f+=this.data,u=this.nextSibling;u;)f=f+u.data,u=u.nextSibling;return f},"get")}),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.text(this,this.options.writer.filterOptions(u))},a.prototype.splitText=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceWholeText=function(u){throw new Error("This DOM method is not implemented."+this.debugInfo())},a})(e)}).call(Eq)});var lE=Q((Cq,Nq)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;r=dn(),e=Sv(),Nq.exports=t=(function(i){n(a,i);function a(u,c,f){if(a.__super__.constructor.call(this,u),c==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=r.ProcessingInstruction,this.target=this.stringify.insTarget(c),this.name=this.target,f&&(this.value=this.stringify.insValue(f))}return o(a,"XMLProcessingInstruction"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(u))},a.prototype.isEqualNode=function(u){return!(!a.__super__.isEqualNode.apply(this,arguments).isEqualNode(u)||u.target!==this.target)},a})(e)}).call(Cq)});var wD=Q((Tq,Iq)=>{"use strict";(function(){var r,e,t,n=o(function(i,a){for(var u in a)s.call(a,u)&&(i[u]=a[u]);function c(){this.constructor=i}return o(c,"ctor"),c.prototype=a.prototype,i.prototype=new c,i.__super__=a.prototype,i},"extend"),s={}.hasOwnProperty;t=fi(),r=dn(),Iq.exports=e=(function(i){n(a,i);function a(u){a.__super__.constructor.call(this,u),this.type=r.Dummy}return o(a,"XMLDummy"),a.prototype.clone=function(){return Object.create(this)},a.prototype.toString=function(u){return""},a})(t)}).call(Tq)});var Dq=Q((_q,Bq)=>{"use strict";(function(){var r;Bq.exports=r=(function(){function e(t){this.nodes=t}return o(e,"XMLNodeList"),Object.defineProperty(e.prototype,"length",{get:o(function(){return this.nodes.length||0},"get")}),e.prototype.clone=function(){return this.nodes=null},e.prototype.item=function(t){return this.nodes[t]||null},e})()}).call(_q)});var Pq=Q((Rq,Oq)=>{"use strict";(function(){Oq.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(Rq)});var fi=Q((kq,Lq)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,N,b={}.hasOwnProperty;N=io(),A=N.isObject,S=N.isFunction,w=N.isEmpty,v=N.getValue,u=null,t=null,n=null,s=null,i=null,g=null,x=null,m=null,a=null,e=null,h=null,c=null,r=null,Lq.exports=f=(function(){function E(C){this.parent=C,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,u||(u=Zb(),t=eE(),n=tE(),s=rE(),i=oE(),g=uE(),x=cE(),m=lE(),a=wD(),e=dn(),h=Dq(),c=Qb(),r=Pq())}return o(E,"XMLNode"),Object.defineProperty(E.prototype,"nodeName",{get:o(function(){return this.name},"get")}),Object.defineProperty(E.prototype,"nodeType",{get:o(function(){return this.type},"get")}),Object.defineProperty(E.prototype,"nodeValue",{get:o(function(){return this.value},"get")}),Object.defineProperty(E.prototype,"parentNode",{get:o(function(){return this.parent},"get")}),Object.defineProperty(E.prototype,"childNodes",{get:o(function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new h(this.children)),this.childNodeList},"get")}),Object.defineProperty(E.prototype,"firstChild",{get:o(function(){return this.children[0]||null},"get")}),Object.defineProperty(E.prototype,"lastChild",{get:o(function(){return this.children[this.children.length-1]||null},"get")}),Object.defineProperty(E.prototype,"previousSibling",{get:o(function(){var C;return C=this.parent.children.indexOf(this),this.parent.children[C-1]||null},"get")}),Object.defineProperty(E.prototype,"nextSibling",{get:o(function(){var C;return C=this.parent.children.indexOf(this),this.parent.children[C+1]||null},"get")}),Object.defineProperty(E.prototype,"ownerDocument",{get:o(function(){return this.document()||null},"get")}),Object.defineProperty(E.prototype,"textContent",{get:o(function(){var C,_,M,R,q;if(this.nodeType===e.Element||this.nodeType===e.DocumentFragment){for(q="",R=this.children,_=0,M=R.length;_<M;_++)C=R[_],C.textContent&&(q+=C.textContent);return q}else return null},"get"),set:o(function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},"set")}),E.prototype.setParent=function(C){var _,M,R,q,H;for(this.parent=C,C&&(this.options=C.options,this.stringify=C.stringify),q=this.children,H=[],M=0,R=q.length;M<R;M++)_=q[M],H.push(_.setParent(this));return H},E.prototype.element=function(C,_,M){var R,q,H,K,G,pe,le,ue,ee,he,we;if(pe=null,_===null&&M==null&&(ee=[{},null],_=ee[0],M=ee[1]),_==null&&(_={}),_=v(_),A(_)||(he=[_,M],M=he[0],_=he[1]),C!=null&&(C=v(C)),Array.isArray(C))for(H=0,le=C.length;H<le;H++)q=C[H],pe=this.element(q);else if(S(C))pe=this.element(C.apply());else if(A(C)){for(G in C)if(b.call(C,G))if(we=C[G],S(we)&&(we=we.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&G.indexOf(this.stringify.convertAttKey)===0)pe=this.attribute(G.substr(this.stringify.convertAttKey.length),we);else if(!this.options.separateArrayItems&&Array.isArray(we)&&w(we))pe=this.dummy();else if(A(we)&&w(we))pe=this.element(G);else if(!this.options.keepNullNodes&&we==null)pe=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(we))for(K=0,ue=we.length;K<ue;K++)q=we[K],R={},R[G]=q,pe=this.element(R);else A(we)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&G.indexOf(this.stringify.convertTextKey)===0?pe=this.element(we):(pe=this.element(G),pe.element(we)):pe=this.element(G,we)}else!this.options.keepNullNodes&&M===null?pe=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&C.indexOf(this.stringify.convertTextKey)===0?pe=this.text(M):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&C.indexOf(this.stringify.convertCDataKey)===0?pe=this.cdata(M):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&C.indexOf(this.stringify.convertCommentKey)===0?pe=this.comment(M):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&C.indexOf(this.stringify.convertRawKey)===0?pe=this.raw(M):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&C.indexOf(this.stringify.convertPIKey)===0?pe=this.instruction(C.substr(this.stringify.convertPIKey.length),M):pe=this.node(C,_,M);if(pe==null)throw new Error("Could not create any elements with: "+C+". "+this.debugInfo());return pe},E.prototype.insertBefore=function(C,_,M){var R,q,H,K,G;if(C?.type)return H=C,K=_,H.setParent(this),K?(q=children.indexOf(K),G=children.splice(q),children.push(H),Array.prototype.push.apply(children,G)):children.push(H),H;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(C));return q=this.parent.children.indexOf(this),G=this.parent.children.splice(q),R=this.parent.element(C,_,M),Array.prototype.push.apply(this.parent.children,G),R},E.prototype.insertAfter=function(C,_,M){var R,q,H;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(C));return q=this.parent.children.indexOf(this),H=this.parent.children.splice(q+1),R=this.parent.element(C,_,M),Array.prototype.push.apply(this.parent.children,H),R},E.prototype.remove=function(){var C,_;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return C=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[C,C-C+1].concat(_=[])),this.parent},E.prototype.node=function(C,_,M){var R,q;return C!=null&&(C=v(C)),_||(_={}),_=v(_),A(_)||(q=[_,M],M=q[0],_=q[1]),R=new u(this,C,_),M!=null&&R.text(M),this.children.push(R),R},E.prototype.text=function(C){var _;return A(C)&&this.element(C),_=new x(this,C),this.children.push(_),this},E.prototype.cdata=function(C){var _;return _=new t(this,C),this.children.push(_),this},E.prototype.comment=function(C){var _;return _=new n(this,C),this.children.push(_),this},E.prototype.commentBefore=function(C){var _,M,R;return M=this.parent.children.indexOf(this),R=this.parent.children.splice(M),_=this.parent.comment(C),Array.prototype.push.apply(this.parent.children,R),this},E.prototype.commentAfter=function(C){var _,M,R;return M=this.parent.children.indexOf(this),R=this.parent.children.splice(M+1),_=this.parent.comment(C),Array.prototype.push.apply(this.parent.children,R),this},E.prototype.raw=function(C){var _;return _=new g(this,C),this.children.push(_),this},E.prototype.dummy=function(){var C;return C=new a(this),C},E.prototype.instruction=function(C,_){var M,R,q,H,K;if(C!=null&&(C=v(C)),_!=null&&(_=v(_)),Array.isArray(C))for(H=0,K=C.length;H<K;H++)M=C[H],this.instruction(M);else if(A(C))for(M in C)b.call(C,M)&&(R=C[M],this.instruction(M,R));else S(_)&&(_=_.apply()),q=new m(this,C,_),this.children.push(q);return this},E.prototype.instructionBefore=function(C,_){var M,R,q;return R=this.parent.children.indexOf(this),q=this.parent.children.splice(R),M=this.parent.instruction(C,_),Array.prototype.push.apply(this.parent.children,q),this},E.prototype.instructionAfter=function(C,_){var M,R,q;return R=this.parent.children.indexOf(this),q=this.parent.children.splice(R+1),M=this.parent.instruction(C,_),Array.prototype.push.apply(this.parent.children,q),this},E.prototype.declaration=function(C,_,M){var R,q;return R=this.document(),q=new s(R,C,_,M),R.children.length===0?R.children.unshift(q):R.children[0].type===e.Declaration?R.children[0]=q:R.children.unshift(q),R.root()||R},E.prototype.dtd=function(C,_){var M,R,q,H,K,G,pe,le,ue,ee;for(R=this.document(),q=new i(R,C,_),ue=R.children,H=K=0,pe=ue.length;K<pe;H=++K)if(M=ue[H],M.type===e.DocType)return R.children[H]=q,q;for(ee=R.children,H=G=0,le=ee.length;G<le;H=++G)if(M=ee[H],M.isRoot)return R.children.splice(H,0,q),q;return R.children.push(q),q},E.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},E.prototype.root=function(){var C;for(C=this;C;){if(C.type===e.Document)return C.rootObject;if(C.isRoot)return C;C=C.parent}},E.prototype.document=function(){var C;for(C=this;C;){if(C.type===e.Document)return C;C=C.parent}},E.prototype.end=function(C){return this.document().end(C)},E.prototype.prev=function(){var C;if(C=this.parent.children.indexOf(this),C<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[C-1]},E.prototype.next=function(){var C;if(C=this.parent.children.indexOf(this),C===-1||C===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[C+1]},E.prototype.importDocument=function(C){var _;return _=C.root().clone(),_.parent=this,_.isRoot=!1,this.children.push(_),this},E.prototype.debugInfo=function(C){var _,M;return C=C||this.name,C==null&&!((_=this.parent)!=null&&_.name)?"":C==null?"parent: <"+this.parent.name+">":(M=this.parent)!=null&&M.name?"node: <"+C+">, parent: <"+this.parent.name+">":"node: <"+C+">"},E.prototype.ele=function(C,_,M){return this.element(C,_,M)},E.prototype.nod=function(C,_,M){return this.node(C,_,M)},E.prototype.txt=function(C){return this.text(C)},E.prototype.dat=function(C){return this.cdata(C)},E.prototype.com=function(C){return this.comment(C)},E.prototype.ins=function(C,_){return this.instruction(C,_)},E.prototype.doc=function(){return this.document()},E.prototype.dec=function(C,_,M){return this.declaration(C,_,M)},E.prototype.e=function(C,_,M){return this.element(C,_,M)},E.prototype.n=function(C,_,M){return this.node(C,_,M)},E.prototype.t=function(C){return this.text(C)},E.prototype.d=function(C){return this.cdata(C)},E.prototype.c=function(C){return this.comment(C)},E.prototype.r=function(C){return this.raw(C)},E.prototype.i=function(C,_){return this.instruction(C,_)},E.prototype.u=function(){return this.up()},E.prototype.importXMLBuilder=function(C){return this.importDocument(C)},E.prototype.replaceChild=function(C,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.removeChild=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.appendChild=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.hasChildNodes=function(){return this.children.length!==0},E.prototype.cloneNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isSupported=function(C,_){return!0},E.prototype.hasAttributes=function(){return this.attribs.length!==0},E.prototype.compareDocumentPosition=function(C){var _,M;return _=this,_===C?0:this.document()!==C.document()?(M=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?M|=r.Preceding:M|=r.Following,M):_.isAncestor(C)?r.Contains|r.Preceding:_.isDescendant(C)?r.Contains|r.Following:_.isPreceding(C)?r.Preceding:r.Following},E.prototype.isSameNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupPrefix=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isDefaultNamespace=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.lookupNamespaceURI=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.isEqualNode=function(C){var _,M,R;if(C.nodeType!==this.nodeType||C.children.length!==this.children.length)return!1;for(_=M=0,R=this.children.length-1;0<=R?M<=R:M>=R;_=0<=R?++M:--M)if(!this.children[_].isEqualNode(C.children[_]))return!1;return!0},E.prototype.getFeature=function(C,_){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.setUserData=function(C,_,M){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.getUserData=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},E.prototype.contains=function(C){return C?C===this||this.isDescendant(C):!1},E.prototype.isDescendant=function(C){var _,M,R,q,H;for(H=this.children,R=0,q=H.length;R<q;R++)if(_=H[R],C===_||(M=_.isDescendant(C),M))return!0;return!1},E.prototype.isAncestor=function(C){return C.isDescendant(this)},E.prototype.isPreceding=function(C){var _,M;return _=this.treePosition(C),M=this.treePosition(this),_===-1||M===-1?!1:_<M},E.prototype.isFollowing=function(C){var _,M;return _=this.treePosition(C),M=this.treePosition(this),_===-1||M===-1?!1:_>M},E.prototype.treePosition=function(C){var _,M;return M=0,_=!1,this.foreachTreeNode(this.document(),function(R){if(M++,!_&&R===C)return _=!0}),_?M:-1},E.prototype.foreachTreeNode=function(C,_){var M,R,q,H,K;for(C||(C=this.document()),H=C.children,R=0,q=H.length;R<q;R++){if(M=H[R],K=_(M))return K;if(K=this.foreachTreeNode(M,_),K)return K}},E})()}).call(kq)});var SD=Q((Vq,Uq)=>{"use strict";(function(){var r,e=o(function(n,s){return function(){return n.apply(s,arguments)}},"bind"),t={}.hasOwnProperty;Uq.exports=r=(function(){function n(s){this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this);var i,a,u;s||(s={}),this.options=s,this.options.version||(this.options.version="1.0"),a=s.stringify||{};for(i in a)t.call(a,i)&&(u=a[i],this[i]=u)}return o(n,"XMLStringifier"),n.prototype.name=function(s){return this.options.noValidation?s:this.assertLegalName(""+s||"")},n.prototype.text=function(s){return this.options.noValidation?s:this.assertLegalChar(this.textEscape(""+s||""))},n.prototype.cdata=function(s){return this.options.noValidation?s:(s=""+s||"",s=s.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(s))},n.prototype.comment=function(s){if(this.options.noValidation)return s;if(s=""+s||"",s.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+s);return this.assertLegalChar(s)},n.prototype.raw=function(s){return this.options.noValidation?s:""+s||""},n.prototype.attValue=function(s){return this.options.noValidation?s:this.assertLegalChar(this.attEscape(s=""+s||""))},n.prototype.insTarget=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.insValue=function(s){if(this.options.noValidation)return s;if(s=""+s||"",s.match(/\?>/))throw new Error("Invalid processing instruction value: "+s);return this.assertLegalChar(s)},n.prototype.xmlVersion=function(s){if(this.options.noValidation)return s;if(s=""+s||"",!s.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+s);return s},n.prototype.xmlEncoding=function(s){if(this.options.noValidation)return s;if(s=""+s||"",!s.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+s);return this.assertLegalChar(s)},n.prototype.xmlStandalone=function(s){return this.options.noValidation?s:s?"yes":"no"},n.prototype.dtdPubID=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdSysID=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdElementValue=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdAttType=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdAttDefault=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdEntityValue=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.dtdNData=function(s){return this.options.noValidation?s:this.assertLegalChar(""+s||"")},n.prototype.convertAttKey="@",n.prototype.convertPIKey="?",n.prototype.convertTextKey="#text",n.prototype.convertCDataKey="#cdata",n.prototype.convertCommentKey="#comment",n.prototype.convertRawKey="#raw",n.prototype.assertLegalChar=function(s){var i,a;if(this.options.noValidation)return s;if(i="",this.options.version==="1.0"){if(i=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=s.match(i))throw new Error("Invalid character in string: "+s+" at index "+a.index)}else if(this.options.version==="1.1"&&(i=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,a=s.match(i)))throw new Error("Invalid character in string: "+s+" at index "+a.index);return s},n.prototype.assertLegalName=function(s){var i;if(this.options.noValidation)return s;if(this.assertLegalChar(s),i=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!s.match(i))throw new Error("Invalid character in name");return s},n.prototype.textEscape=function(s){var i;return this.options.noValidation?s:(i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,s.replace(i,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},n.prototype.attEscape=function(s){var i;return this.options.noValidation?s:(i=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,s.replace(i,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},n})()}).call(Vq)});var bv=Q((jq,Fq)=>{"use strict";(function(){Fq.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(jq)});var bD=Q((Mq,qq)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S,A={}.hasOwnProperty;S=io().assign,r=dn(),c=rE(),f=oE(),t=eE(),n=tE(),m=Zb(),x=uE(),v=cE(),g=lE(),h=wD(),s=nE(),i=iE(),a=sE(),u=aE(),e=bv(),qq.exports=w=(function(){function N(b){var E,C,_;b||(b={}),this.options=b,C=b.writer||{};for(E in C)A.call(C,E)&&(_=C[E],this["_"+E]=this[E],this[E]=_)}return o(N,"XMLWriterBase"),N.prototype.filterOptions=function(b){var E,C,_,M,R,q,H,K;return b||(b={}),b=S({},this.options,b),E={writer:this},E.pretty=b.pretty||!1,E.allowEmpty=b.allowEmpty||!1,E.indent=(C=b.indent)!=null?C:" ",E.newline=(_=b.newline)!=null?_:`
|
|
89
|
+
`,E.offset=(M=b.offset)!=null?M:0,E.dontPrettyTextNodes=(R=(q=b.dontPrettyTextNodes)!=null?q:b.dontprettytextnodes)!=null?R:0,E.spaceBeforeSlash=(H=(K=b.spaceBeforeSlash)!=null?K:b.spacebeforeslash)!=null?H:"",E.spaceBeforeSlash===!0&&(E.spaceBeforeSlash=" "),E.suppressPrettyCount=0,E.user={},E.state=e.None,E},N.prototype.indent=function(b,E,C){var _;return!E.pretty||E.suppressPrettyCount?"":E.pretty&&(_=(C||0)+E.offset+1,_>0)?new Array(_).join(E.indent):""},N.prototype.endline=function(b,E,C){return!E.pretty||E.suppressPrettyCount?"":E.newline},N.prototype.attribute=function(b,E,C){var _;return this.openAttribute(b,E,C),_=" "+b.name+'="'+b.value+'"',this.closeAttribute(b,E,C),_},N.prototype.cdata=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<![CDATA[",E.state=e.InsideTag,_+=b.value,E.state=e.CloseTag,_+="]]>"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.comment=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!-- ",E.state=e.InsideTag,_+=b.value,E.state=e.CloseTag,_+=" -->"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.declaration=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<?xml",E.state=e.InsideTag,_+=' version="'+b.version+'"',b.encoding!=null&&(_+=' encoding="'+b.encoding+'"'),b.standalone!=null&&(_+=' standalone="'+b.standalone+'"'),E.state=e.CloseTag,_+=E.spaceBeforeSlash+"?>",_+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.docType=function(b,E,C){var _,M,R,q,H;if(C||(C=0),this.openNode(b,E,C),E.state=e.OpenTag,q=this.indent(b,E,C),q+="<!DOCTYPE "+b.root().name,b.pubID&&b.sysID?q+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(q+=' SYSTEM "'+b.sysID+'"'),b.children.length>0){for(q+=" [",q+=this.endline(b,E,C),E.state=e.InsideTag,H=b.children,M=0,R=H.length;M<R;M++)_=H[M],q+=this.writeChildNode(_,E,C+1);E.state=e.CloseTag,q+="]"}return E.state=e.CloseTag,q+=E.spaceBeforeSlash+">",q+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),q},N.prototype.element=function(b,E,C){var _,M,R,q,H,K,G,pe,le,ue,ee,he,we,Ke;C||(C=0),ue=!1,ee="",this.openNode(b,E,C),E.state=e.OpenTag,ee+=this.indent(b,E,C)+"<"+b.name,he=b.attribs;for(le in he)A.call(he,le)&&(_=he[le],ee+=this.attribute(_,E,C));if(R=b.children.length,q=R===0?null:b.children[0],R===0||b.children.every(function(Ae){return(Ae.type===r.Text||Ae.type===r.Raw)&&Ae.value===""}))E.allowEmpty?(ee+=">",E.state=e.CloseTag,ee+="</"+b.name+">"+this.endline(b,E,C)):(E.state=e.CloseTag,ee+=E.spaceBeforeSlash+"/>"+this.endline(b,E,C));else if(E.pretty&&R===1&&(q.type===r.Text||q.type===r.Raw)&&q.value!=null)ee+=">",E.state=e.InsideTag,E.suppressPrettyCount++,ue=!0,ee+=this.writeChildNode(q,E,C+1),E.suppressPrettyCount--,ue=!1,E.state=e.CloseTag,ee+="</"+b.name+">"+this.endline(b,E,C);else{if(E.dontPrettyTextNodes){for(we=b.children,H=0,G=we.length;H<G;H++)if(M=we[H],(M.type===r.Text||M.type===r.Raw)&&M.value!=null){E.suppressPrettyCount++,ue=!0;break}}for(ee+=">"+this.endline(b,E,C),E.state=e.InsideTag,Ke=b.children,K=0,pe=Ke.length;K<pe;K++)M=Ke[K],ee+=this.writeChildNode(M,E,C+1);E.state=e.CloseTag,ee+=this.indent(b,E,C)+"</"+b.name+">",ue&&E.suppressPrettyCount--,ee+=this.endline(b,E,C),E.state=e.None}return this.closeNode(b,E,C),ee},N.prototype.writeChildNode=function(b,E,C){switch(b.type){case r.CData:return this.cdata(b,E,C);case r.Comment:return this.comment(b,E,C);case r.Element:return this.element(b,E,C);case r.Raw:return this.raw(b,E,C);case r.Text:return this.text(b,E,C);case r.ProcessingInstruction:return this.processingInstruction(b,E,C);case r.Dummy:return"";case r.Declaration:return this.declaration(b,E,C);case r.DocType:return this.docType(b,E,C);case r.AttributeDeclaration:return this.dtdAttList(b,E,C);case r.ElementDeclaration:return this.dtdElement(b,E,C);case r.EntityDeclaration:return this.dtdEntity(b,E,C);case r.NotationDeclaration:return this.dtdNotation(b,E,C);default:throw new Error("Unknown XML node type: "+b.constructor.name)}},N.prototype.processingInstruction=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<?",E.state=e.InsideTag,_+=b.target,b.value&&(_+=" "+b.value),E.state=e.CloseTag,_+=E.spaceBeforeSlash+"?>",_+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.raw=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C),E.state=e.InsideTag,_+=b.value,E.state=e.CloseTag,_+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.text=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C),E.state=e.InsideTag,_+=b.value,E.state=e.CloseTag,_+=this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.dtdAttList=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!ATTLIST",E.state=e.InsideTag,_+=" "+b.elementName+" "+b.attributeName+" "+b.attributeType,b.defaultValueType!=="#DEFAULT"&&(_+=" "+b.defaultValueType),b.defaultValue&&(_+=' "'+b.defaultValue+'"'),E.state=e.CloseTag,_+=E.spaceBeforeSlash+">"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.dtdElement=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!ELEMENT",E.state=e.InsideTag,_+=" "+b.name+" "+b.value,E.state=e.CloseTag,_+=E.spaceBeforeSlash+">"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.dtdEntity=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!ENTITY",E.state=e.InsideTag,b.pe&&(_+=" %"),_+=" "+b.name,b.value?_+=' "'+b.value+'"':(b.pubID&&b.sysID?_+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.sysID&&(_+=' SYSTEM "'+b.sysID+'"'),b.nData&&(_+=" NDATA "+b.nData)),E.state=e.CloseTag,_+=E.spaceBeforeSlash+">"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.dtdNotation=function(b,E,C){var _;return this.openNode(b,E,C),E.state=e.OpenTag,_=this.indent(b,E,C)+"<!NOTATION",E.state=e.InsideTag,_+=" "+b.name,b.pubID&&b.sysID?_+=' PUBLIC "'+b.pubID+'" "'+b.sysID+'"':b.pubID?_+=' PUBLIC "'+b.pubID+'"':b.sysID&&(_+=' SYSTEM "'+b.sysID+'"'),E.state=e.CloseTag,_+=E.spaceBeforeSlash+">"+this.endline(b,E,C),E.state=e.None,this.closeNode(b,E,C),_},N.prototype.openNode=function(b,E,C){},N.prototype.closeNode=function(b,E,C){},N.prototype.openAttribute=function(b,E,C){},N.prototype.closeAttribute=function(b,E,C){},N})()}).call(Mq)});var fE=Q((Hq,Kq)=>{"use strict";(function(){var r,e,t=o(function(s,i){for(var a in i)n.call(i,a)&&(s[a]=i[a]);function u(){this.constructor=s}return o(u,"ctor"),u.prototype=i.prototype,s.prototype=new u,s.__super__=i.prototype,s},"extend"),n={}.hasOwnProperty;e=bD(),Kq.exports=r=(function(s){t(i,s);function i(a){i.__super__.constructor.call(this,a)}return o(i,"XMLStringWriter"),i.prototype.document=function(a,u){var c,f,h,m,g;for(u=this.filterOptions(u),m="",g=a.children,f=0,h=g.length;f<h;f++)c=g[f],m+=this.writeChildNode(c,u,0);return u.pretty&&m.slice(-u.newline.length)===u.newline&&(m=m.slice(0,-u.newline.length)),m},i})(e)}).call(Hq)});var ED=Q(($q,Xq)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c=o(function(h,m){for(var g in m)f.call(m,g)&&(h[g]=m[g]);function x(){this.constructor=h}return o(x,"ctor"),x.prototype=m.prototype,h.prototype=new x,h.__super__=m.prototype,h},"extend"),f={}.hasOwnProperty;u=io().isPlainObject,t=yD(),e=W9(),s=fi(),r=dn(),a=SD(),i=fE(),Xq.exports=n=(function(h){c(m,h);function m(g){m.__super__.constructor.call(this,null),this.name="#document",this.type=r.Document,this.documentURI=null,this.domConfig=new e,g||(g={}),g.writer||(g.writer=new i),this.options=g,this.stringify=new a(g)}return o(m,"XMLDocument"),Object.defineProperty(m.prototype,"implementation",{value:new t}),Object.defineProperty(m.prototype,"doctype",{get:o(function(){var g,x,v,w;for(w=this.children,x=0,v=w.length;x<v;x++)if(g=w[x],g.type===r.DocType)return g;return null},"get")}),Object.defineProperty(m.prototype,"documentElement",{get:o(function(){return this.rootObject||null},"get")}),Object.defineProperty(m.prototype,"inputEncoding",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"strictErrorChecking",{get:o(function(){return!1},"get")}),Object.defineProperty(m.prototype,"xmlEncoding",{get:o(function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].encoding:null},"get")}),Object.defineProperty(m.prototype,"xmlStandalone",{get:o(function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].standalone==="yes":!1},"get")}),Object.defineProperty(m.prototype,"xmlVersion",{get:o(function(){return this.children.length!==0&&this.children[0].type===r.Declaration?this.children[0].version:"1.0"},"get")}),Object.defineProperty(m.prototype,"URL",{get:o(function(){return this.documentURI},"get")}),Object.defineProperty(m.prototype,"origin",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"compatMode",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"characterSet",{get:o(function(){return null},"get")}),Object.defineProperty(m.prototype,"contentType",{get:o(function(){return null},"get")}),m.prototype.end=function(g){var x;return x={},g?u(g)&&(x=g,g=this.options.writer):g=this.options.writer,g.document(this,g.filterOptions(x))},m.prototype.toString=function(g){return this.options.writer.document(this,this.options.writer.filterOptions(g))},m.prototype.createElement=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTextNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createComment=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createCDATASection=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createProcessingInstruction=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttribute=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEntityReference=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.importNode=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createElementNS=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createAttributeNS=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByTagNameNS=function(g,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementById=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.adoptNode=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.renameNode=function(g,x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.getElementsByClassName=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createEvent=function(g){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createNodeIterator=function(g,x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},m.prototype.createTreeWalker=function(g,x,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},m})(s)}).call($q)});var zq=Q((Gq,Wq)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,N,b,E,C,_,M,R={}.hasOwnProperty;M=io(),C=M.isObject,E=M.isFunction,_=M.isPlainObject,b=M.getValue,r=dn(),m=ED(),x=Zb(),n=eE(),s=tE(),w=uE(),N=cE(),v=lE(),f=rE(),h=oE(),i=nE(),u=sE(),a=iE(),c=aE(),t=xD(),A=SD(),S=fE(),e=bv(),Wq.exports=g=(function(){function q(H,K,G){var pe;this.name="?xml",this.type=r.Document,H||(H={}),pe={},H.writer?_(H.writer)&&(pe=H.writer,H.writer=new S):H.writer=new S,this.options=H,this.writer=H.writer,this.writerOptions=this.writer.filterOptions(pe),this.stringify=new A(H),this.onDataCallback=K||function(){},this.onEndCallback=G||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return o(q,"XMLDocumentCB"),q.prototype.createChildNode=function(H){var K,G,pe,le,ue,ee,he,we;switch(H.type){case r.CData:this.cdata(H.value);break;case r.Comment:this.comment(H.value);break;case r.Element:pe={},he=H.attribs;for(G in he)R.call(he,G)&&(K=he[G],pe[G]=K.value);this.node(H.name,pe);break;case r.Dummy:this.dummy();break;case r.Raw:this.raw(H.value);break;case r.Text:this.text(H.value);break;case r.ProcessingInstruction:this.instruction(H.target,H.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+H.constructor.name)}for(we=H.children,ue=0,ee=we.length;ue<ee;ue++)le=we[ue],this.createChildNode(le),le.type===r.Element&&this.up();return this},q.prototype.dummy=function(){return this},q.prototype.node=function(H,K,G){var pe;if(H==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(H));return this.openCurrent(),H=b(H),K==null&&(K={}),K=b(K),C(K)||(pe=[K,G],G=pe[0],K=pe[1]),this.currentNode=new x(this,H,K),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,G!=null&&this.text(G),this},q.prototype.element=function(H,K,G){var pe,le,ue,ee,he,we;if(this.currentNode&&this.currentNode.type===r.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(H)||C(H)||E(H))for(ee=this.options.noValidation,this.options.noValidation=!0,we=new m(this.options).element("TEMP_ROOT"),we.element(H),this.options.noValidation=ee,he=we.children,le=0,ue=he.length;le<ue;le++)pe=he[le],this.createChildNode(pe),pe.type===r.Element&&this.up();else this.node(H,K,G);return this},q.prototype.attribute=function(H,K){var G,pe;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(H));if(H!=null&&(H=b(H)),C(H))for(G in H)R.call(H,G)&&(pe=H[G],this.attribute(G,pe));else E(K)&&(K=K.apply()),this.options.keepNullAttributes&&K==null?this.currentNode.attribs[H]=new t(this,H,""):K!=null&&(this.currentNode.attribs[H]=new t(this,H,K));return this},q.prototype.text=function(H){var K;return this.openCurrent(),K=new N(this,H),this.onData(this.writer.text(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.cdata=function(H){var K;return this.openCurrent(),K=new n(this,H),this.onData(this.writer.cdata(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.comment=function(H){var K;return this.openCurrent(),K=new s(this,H),this.onData(this.writer.comment(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.raw=function(H){var K;return this.openCurrent(),K=new w(this,H),this.onData(this.writer.raw(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.instruction=function(H,K){var G,pe,le,ue,ee;if(this.openCurrent(),H!=null&&(H=b(H)),K!=null&&(K=b(K)),Array.isArray(H))for(G=0,ue=H.length;G<ue;G++)pe=H[G],this.instruction(pe);else if(C(H))for(pe in H)R.call(H,pe)&&(le=H[pe],this.instruction(pe,le));else E(K)&&(K=K.apply()),ee=new v(this,H,K),this.onData(this.writer.processingInstruction(ee,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},q.prototype.declaration=function(H,K,G){var pe;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return pe=new f(this,H,K,G),this.onData(this.writer.declaration(pe,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.doctype=function(H,K,G){if(this.openCurrent(),H==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new h(this,K,G),this.currentNode.rootNodeName=H,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},q.prototype.dtdElement=function(H,K){var G;return this.openCurrent(),G=new a(this,H,K),this.onData(this.writer.dtdElement(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.attList=function(H,K,G,pe,le){var ue;return this.openCurrent(),ue=new i(this,H,K,G,pe,le),this.onData(this.writer.dtdAttList(ue,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.entity=function(H,K){var G;return this.openCurrent(),G=new u(this,!1,H,K),this.onData(this.writer.dtdEntity(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.pEntity=function(H,K){var G;return this.openCurrent(),G=new u(this,!0,H,K),this.onData(this.writer.dtdEntity(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.notation=function(H,K){var G;return this.openCurrent(),G=new c(this,H,K),this.onData(this.writer.dtdNotation(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},q.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},q.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},q.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},q.prototype.openNode=function(H){var K,G,pe,le;if(!H.isOpen){if(!this.root&&this.currentLevel===0&&H.type===r.Element&&(this.root=H),G="",H.type===r.Element){this.writerOptions.state=e.OpenTag,G=this.writer.indent(H,this.writerOptions,this.currentLevel)+"<"+H.name,le=H.attribs;for(pe in le)R.call(le,pe)&&(K=le[pe],G+=this.writer.attribute(K,this.writerOptions,this.currentLevel));G+=(H.children?">":"/>")+this.writer.endline(H,this.writerOptions,this.currentLevel),this.writerOptions.state=e.InsideTag}else this.writerOptions.state=e.OpenTag,G=this.writer.indent(H,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+H.rootNodeName,H.pubID&&H.sysID?G+=' PUBLIC "'+H.pubID+'" "'+H.sysID+'"':H.sysID&&(G+=' SYSTEM "'+H.sysID+'"'),H.children?(G+=" [",this.writerOptions.state=e.InsideTag):(this.writerOptions.state=e.CloseTag,G+=">"),G+=this.writer.endline(H,this.writerOptions,this.currentLevel);return this.onData(G,this.currentLevel),H.isOpen=!0}},q.prototype.closeNode=function(H){var K;if(!H.isClosed)return K="",this.writerOptions.state=e.CloseTag,H.type===r.Element?K=this.writer.indent(H,this.writerOptions,this.currentLevel)+"</"+H.name+">"+this.writer.endline(H,this.writerOptions,this.currentLevel):K=this.writer.indent(H,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(H,this.writerOptions,this.currentLevel),this.writerOptions.state=e.None,this.onData(K,this.currentLevel),H.isClosed=!0},q.prototype.onData=function(H,K){return this.documentStarted=!0,this.onDataCallback(H,K+1)},q.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},q.prototype.debugInfo=function(H){return H==null?"":"node: <"+H+">"},q.prototype.ele=function(){return this.element.apply(this,arguments)},q.prototype.nod=function(H,K,G){return this.node(H,K,G)},q.prototype.txt=function(H){return this.text(H)},q.prototype.dat=function(H){return this.cdata(H)},q.prototype.com=function(H){return this.comment(H)},q.prototype.ins=function(H,K){return this.instruction(H,K)},q.prototype.dec=function(H,K,G){return this.declaration(H,K,G)},q.prototype.dtd=function(H,K,G){return this.doctype(H,K,G)},q.prototype.e=function(H,K,G){return this.element(H,K,G)},q.prototype.n=function(H,K,G){return this.node(H,K,G)},q.prototype.t=function(H){return this.text(H)},q.prototype.d=function(H){return this.cdata(H)},q.prototype.c=function(H){return this.comment(H)},q.prototype.r=function(H){return this.raw(H)},q.prototype.i=function(H,K){return this.instruction(H,K)},q.prototype.att=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},q.prototype.a=function(){return this.currentNode&&this.currentNode.type===r.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},q.prototype.ent=function(H,K){return this.entity(H,K)},q.prototype.pent=function(H,K){return this.pEntity(H,K)},q.prototype.not=function(H,K){return this.notation(H,K)},q})()}).call(Gq)});var Qq=Q((Jq,Yq)=>{"use strict";(function(){var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function f(){this.constructor=a}return o(f,"ctor"),f.prototype=u.prototype,a.prototype=new f,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;r=dn(),n=bD(),e=bv(),Yq.exports=t=(function(a){s(u,a);function u(c,f){this.stream=c,u.__super__.constructor.call(this,f)}return o(u,"XMLStreamWriter"),u.prototype.endline=function(c,f,h){return c.isLastRootNode&&f.state===e.CloseTag?"":u.__super__.endline.call(this,c,f,h)},u.prototype.document=function(c,f){var h,m,g,x,v,w,S,A,N;for(S=c.children,m=g=0,v=S.length;g<v;m=++g)h=S[m],h.isLastRootNode=m===c.children.length-1;for(f=this.filterOptions(f),A=c.children,N=[],x=0,w=A.length;x<w;x++)h=A[x],N.push(this.writeChildNode(h,f,0));return N},u.prototype.attribute=function(c,f,h){return this.stream.write(u.__super__.attribute.call(this,c,f,h))},u.prototype.cdata=function(c,f,h){return this.stream.write(u.__super__.cdata.call(this,c,f,h))},u.prototype.comment=function(c,f,h){return this.stream.write(u.__super__.comment.call(this,c,f,h))},u.prototype.declaration=function(c,f,h){return this.stream.write(u.__super__.declaration.call(this,c,f,h))},u.prototype.docType=function(c,f,h){var m,g,x,v;if(h||(h=0),this.openNode(c,f,h),f.state=e.OpenTag,this.stream.write(this.indent(c,f,h)),this.stream.write("<!DOCTYPE "+c.root().name),c.pubID&&c.sysID?this.stream.write(' PUBLIC "'+c.pubID+'" "'+c.sysID+'"'):c.sysID&&this.stream.write(' SYSTEM "'+c.sysID+'"'),c.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(c,f,h)),f.state=e.InsideTag,v=c.children,g=0,x=v.length;g<x;g++)m=v[g],this.writeChildNode(m,f,h+1);f.state=e.CloseTag,this.stream.write("]")}return f.state=e.CloseTag,this.stream.write(f.spaceBeforeSlash+">"),this.stream.write(this.endline(c,f,h)),f.state=e.None,this.closeNode(c,f,h)},u.prototype.element=function(c,f,h){var m,g,x,v,w,S,A,N,b,E;h||(h=0),this.openNode(c,f,h),f.state=e.OpenTag,this.stream.write(this.indent(c,f,h)+"<"+c.name),b=c.attribs;for(A in b)i.call(b,A)&&(m=b[A],this.attribute(m,f,h));if(x=c.children.length,v=x===0?null:c.children[0],x===0||c.children.every(function(C){return(C.type===r.Text||C.type===r.Raw)&&C.value===""}))f.allowEmpty?(this.stream.write(">"),f.state=e.CloseTag,this.stream.write("</"+c.name+">")):(f.state=e.CloseTag,this.stream.write(f.spaceBeforeSlash+"/>"));else if(f.pretty&&x===1&&(v.type===r.Text||v.type===r.Raw)&&v.value!=null)this.stream.write(">"),f.state=e.InsideTag,f.suppressPrettyCount++,N=!0,this.writeChildNode(v,f,h+1),f.suppressPrettyCount--,N=!1,f.state=e.CloseTag,this.stream.write("</"+c.name+">");else{for(this.stream.write(">"+this.endline(c,f,h)),f.state=e.InsideTag,E=c.children,w=0,S=E.length;w<S;w++)g=E[w],this.writeChildNode(g,f,h+1);f.state=e.CloseTag,this.stream.write(this.indent(c,f,h)+"</"+c.name+">")}return this.stream.write(this.endline(c,f,h)),f.state=e.None,this.closeNode(c,f,h)},u.prototype.processingInstruction=function(c,f,h){return this.stream.write(u.__super__.processingInstruction.call(this,c,f,h))},u.prototype.raw=function(c,f,h){return this.stream.write(u.__super__.raw.call(this,c,f,h))},u.prototype.text=function(c,f,h){return this.stream.write(u.__super__.text.call(this,c,f,h))},u.prototype.dtdAttList=function(c,f,h){return this.stream.write(u.__super__.dtdAttList.call(this,c,f,h))},u.prototype.dtdElement=function(c,f,h){return this.stream.write(u.__super__.dtdElement.call(this,c,f,h))},u.prototype.dtdEntity=function(c,f,h){return this.stream.write(u.__super__.dtdEntity.call(this,c,f,h))},u.prototype.dtdNotation=function(c,f,h){return this.stream.write(u.__super__.dtdNotation.call(this,c,f,h))},u})(n)}).call(Jq)});var e7=Q((Zq,bc)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,f;f=io(),u=f.assign,c=f.isFunction,t=yD(),n=ED(),s=zq(),a=fE(),i=Qq(),r=dn(),e=bv(),bc.exports.create=function(h,m,g,x){var v,w;if(h==null)throw new Error("Root element needs a name.");return x=u({},m,g,x),v=new n(x),w=v.element(h),x.headless||(v.declaration(x),(x.pubID!=null||x.sysID!=null)&&v.dtd(x)),w},bc.exports.begin=function(h,m,g){var x;return c(h)&&(x=[h,m],m=x[0],g=x[1],h={}),m?new s(h,m,g):new n(h)},bc.exports.stringWriter=function(h){return new a(h)},bc.exports.streamWriter=function(h,m){return new i(h,m)},bc.exports.implementation=new t,bc.exports.nodeType=r,bc.exports.writerState=e}).call(Zq)});var t7=Q(AD=>{"use strict";(function(){"use strict";var r,e,t,n,s,i={}.hasOwnProperty;r=e7(),e=Yb().defaults,n=o(function(a){return typeof a=="string"&&(a.indexOf("&")>=0||a.indexOf(">")>=0||a.indexOf("<")>=0)},"requiresCDATA"),s=o(function(a){return"<![CDATA["+t(a)+"]]>"},"wrapCDATA"),t=o(function(a){return a.replace("]]>","]]]]><![CDATA[>")},"escapeCDATA"),AD.Builder=(function(){function a(u){var c,f,h;this.options={},f=e["0.2"];for(c in f)i.call(f,c)&&(h=f[c],this.options[c]=h);for(c in u)i.call(u,c)&&(h=u[c],this.options[c]=h)}return o(a,"Builder"),a.prototype.buildObject=function(u){var c,f,h,m,g;return c=this.options.attrkey,f=this.options.charkey,Object.keys(u).length===1&&this.options.rootName===e["0.2"].rootName?(g=Object.keys(u)[0],u=u[g]):g=this.options.rootName,h=(function(x){return function(v,w){var S,A,N,b,E,C;if(typeof w!="object")x.options.cdata&&n(w)?v.raw(s(w)):v.txt(w);else if(Array.isArray(w)){for(b in w)if(i.call(w,b)){A=w[b];for(E in A)N=A[E],v=h(v.ele(E),N).up()}}else for(E in w)if(i.call(w,E))if(A=w[E],E===c){if(typeof A=="object")for(S in A)C=A[S],v=v.att(S,C)}else if(E===f)x.options.cdata&&n(A)?v=v.raw(s(A)):v=v.txt(A);else if(Array.isArray(A))for(b in A)i.call(A,b)&&(N=A[b],typeof N=="string"?x.options.cdata&&n(N)?v=v.ele(E).raw(s(N)).up():v=v.ele(E,N).up():v=h(v.ele(E),N).up());else typeof A=="object"?v=h(v.ele(E),A).up():typeof A=="string"&&x.options.cdata&&n(A)?v=v.ele(E).raw(s(A)).up():(A==null&&(A=""),v=v.ele(E,A.toString()).up());return v}})(this),m=r.create(g,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),h(m,u).end(this.options.renderOpts)},a})()}).call(AD)});var r7=Q(CD=>{"use strict";(function(){"use strict";CD.stripBOM=function(r){return r[0]==="\uFEFF"?r.substring(1):r}}).call(CD)});var ND=Q(mf=>{"use strict";(function(){"use strict";var r;r=new RegExp(/(?!xmlns)^.*:/),mf.normalize=function(e){return e.toLowerCase()},mf.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},mf.stripPrefix=function(e){return e.replace(r,"")},mf.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},mf.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(mf)});var n7=Q(Xo=>{"use strict";(function(){"use strict";var r,e,t,n,s,i,a,u,c,f=o(function(g,x){return function(){return g.apply(x,arguments)}},"bind"),h=o(function(g,x){for(var v in x)m.call(x,v)&&(g[v]=x[v]);function w(){this.constructor=g}return o(w,"ctor"),w.prototype=x.prototype,g.prototype=new w,g.__super__=x.prototype,g},"extend"),m={}.hasOwnProperty;u=QB(),n=require("events"),r=r7(),a=ND(),c=require("timers").setImmediate,e=Yb().defaults,s=o(function(g){return typeof g=="object"&&g!=null&&Object.keys(g).length===0},"isEmpty"),i=o(function(g,x,v){var w,S,A;for(w=0,S=g.length;w<S;w++)A=g[w],x=A(x,v);return x},"processItem"),t=o(function(g,x,v){var w;return w=Object.create(null),w.value=v,w.writable=!0,w.enumerable=!0,w.configurable=!0,Object.defineProperty(g,x,w)},"defineProperty"),Xo.Parser=(function(g){h(x,g);function x(v){this.parseStringPromise=f(this.parseStringPromise,this),this.parseString=f(this.parseString,this),this.reset=f(this.reset,this),this.assignOrPush=f(this.assignOrPush,this),this.processAsync=f(this.processAsync,this);var w,S,A;if(!(this instanceof Xo.Parser))return new Xo.Parser(v);this.options={},S=e["0.2"];for(w in S)m.call(S,w)&&(A=S[w],this.options[w]=A);for(w in v)m.call(v,w)&&(A=v[w],this.options[w]=A);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(a.normalize)),this.reset()}return o(x,"Parser"),x.prototype.processAsync=function(){var v,w;try{return this.remaining.length<=this.options.chunkSize?(v=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(v),this.saxParser.close()):(v=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(v),c(this.processAsync))}catch(S){if(w=S,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(w)}},x.prototype.assignOrPush=function(v,w,S){return w in v?(v[w]instanceof Array||t(v,w,[v[w]]),v[w].push(S)):this.options.explicitArray?t(v,w,[S]):t(v,w,S)},x.prototype.reset=function(){var v,w,S,A;return this.removeAllListeners(),this.saxParser=u.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(N){return function(b){if(N.saxParser.resume(),!N.saxParser.errThrown)return N.saxParser.errThrown=!0,N.emit("error",b)}})(this),this.saxParser.onend=(function(N){return function(){if(!N.saxParser.ended)return N.saxParser.ended=!0,N.emit("end",N.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,A=[],v=this.options.attrkey,w=this.options.charkey,this.saxParser.onopentag=(function(N){return function(b){var E,C,_,M,R;if(_={},_[w]="",!N.options.ignoreAttrs){R=b.attributes;for(E in R)m.call(R,E)&&(!(v in _)&&!N.options.mergeAttrs&&(_[v]={}),C=N.options.attrValueProcessors?i(N.options.attrValueProcessors,b.attributes[E],E):b.attributes[E],M=N.options.attrNameProcessors?i(N.options.attrNameProcessors,E):E,N.options.mergeAttrs?N.assignOrPush(_,M,C):t(_[v],M,C))}return _["#name"]=N.options.tagNameProcessors?i(N.options.tagNameProcessors,b.name):b.name,N.options.xmlns&&(_[N.options.xmlnskey]={uri:b.uri,local:b.local}),A.push(_)}})(this),this.saxParser.onclosetag=(function(N){return function(){var b,E,C,_,M,R,q,H,K,G;if(R=A.pop(),M=R["#name"],(!N.options.explicitChildren||!N.options.preserveChildrenOrder)&&delete R["#name"],R.cdata===!0&&(b=R.cdata,delete R.cdata),K=A[A.length-1],R[w].match(/^\s*$/)&&!b?(E=R[w],delete R[w]):(N.options.trim&&(R[w]=R[w].trim()),N.options.normalize&&(R[w]=R[w].replace(/\s{2,}/g," ").trim()),R[w]=N.options.valueProcessors?i(N.options.valueProcessors,R[w],M):R[w],Object.keys(R).length===1&&w in R&&!N.EXPLICIT_CHARKEY&&(R=R[w])),s(R)&&(typeof N.options.emptyTag=="function"?R=N.options.emptyTag():R=N.options.emptyTag!==""?N.options.emptyTag:E),N.options.validator!=null&&(G="/"+(function(){var pe,le,ue;for(ue=[],pe=0,le=A.length;pe<le;pe++)_=A[pe],ue.push(_["#name"]);return ue})().concat(M).join("/"),(function(){var pe;try{return R=N.options.validator(G,K&&K[M],R)}catch(le){return pe=le,N.emit("error",pe)}})()),N.options.explicitChildren&&!N.options.mergeAttrs&&typeof R=="object"){if(!N.options.preserveChildrenOrder)_={},N.options.attrkey in R&&(_[N.options.attrkey]=R[N.options.attrkey],delete R[N.options.attrkey]),!N.options.charsAsChildren&&N.options.charkey in R&&(_[N.options.charkey]=R[N.options.charkey],delete R[N.options.charkey]),Object.getOwnPropertyNames(R).length>0&&(_[N.options.childkey]=R),R=_;else if(K){K[N.options.childkey]=K[N.options.childkey]||[],q={};for(C in R)m.call(R,C)&&t(q,C,R[C]);K[N.options.childkey].push(q),delete R["#name"],Object.keys(R).length===1&&w in R&&!N.EXPLICIT_CHARKEY&&(R=R[w])}}return A.length>0?N.assignOrPush(K,M,R):(N.options.explicitRoot&&(H=R,R={},t(R,M,H)),N.resultObject=R,N.saxParser.ended=!0,N.emit("end",N.resultObject))}})(this),S=(function(N){return function(b){var E,C;if(C=A[A.length-1],C)return C[w]+=b,N.options.explicitChildren&&N.options.preserveChildrenOrder&&N.options.charsAsChildren&&(N.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(C[N.options.childkey]=C[N.options.childkey]||[],E={"#name":"__text__"},E[w]=b,N.options.normalize&&(E[w]=E[w].replace(/\s{2,}/g," ").trim()),C[N.options.childkey].push(E)),C}})(this),this.saxParser.ontext=S,this.saxParser.oncdata=(function(N){return function(b){var E;if(E=S(b),E)return E.cdata=!0}})(this)},x.prototype.parseString=function(v,w){var S;w!=null&&typeof w=="function"&&(this.on("end",function(A){return this.reset(),w(null,A)}),this.on("error",function(A){return this.reset(),w(A)}));try{return v=v.toString(),v.trim()===""?(this.emit("end",null),!0):(v=r.stripBOM(v),this.options.async?(this.remaining=v,c(this.processAsync),this.saxParser):this.saxParser.write(v).close())}catch(A){if(S=A,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw S}else return this.emit("error",S),this.saxParser.errThrown=!0}},x.prototype.parseStringPromise=function(v){return new Promise((function(w){return function(S,A){return w.parseString(v,function(N,b){return N?A(N):S(b)})}})(this))},x})(n),Xo.parseString=function(g,x,v){var w,S,A;return v!=null?(typeof v=="function"&&(w=v),typeof x=="object"&&(S=x)):(typeof x=="function"&&(w=x),S={}),A=new Xo.Parser(S),A.parseString(g,w)},Xo.parseStringPromise=function(g,x){var v,w;return typeof x=="object"&&(v=x),w=new Xo.Parser(v),w.parseStringPromise(g)}}).call(Xo)});var s7=Q(Go=>{"use strict";(function(){"use strict";var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function f(){this.constructor=a}return o(f,"ctor"),f.prototype=u.prototype,a.prototype=new f,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;e=Yb(),r=t7(),t=n7(),n=ND(),Go.defaults=e.defaults,Go.processors=n,Go.ValidationError=(function(a){s(u,a);function u(c){this.message=c}return o(u,"ValidationError"),u})(Error),Go.Builder=r.Builder,Go.Parser=t.Parser,Go.parseString=t.parseString,Go.parseStringPromise=t.parseStringPromise}).call(Go)});var bge={};yN(bge,{ASN1:()=>tT,CanonicalizationMethod:()=>xN,Choice:()=>wQ,Decimal:()=>oT,DigestAlgorithm:()=>Bw,EntitySigner:()=>SN,Environment:()=>gQ,IsDecimal:()=>NN,Left:()=>Rw,MemoryCacheAdapter:()=>uT,NFeTsError:()=>Os,NativeCertificateRepository:()=>pI,NullCacheAdapter:()=>dI,Right:()=>lg,SignatureAlgorithm:()=>Ml,SignatureMethod:()=>_w,SignatureNamespace:()=>Iw,Signer:()=>ql,SkipAllValidations:()=>yQ,SkipValidation:()=>vQ,SkipValidationMetadata:()=>vp,SoapRemoteTransmissionRepository:()=>gD,StateAcronyms:()=>mQ,StateCodeAcValidator:()=>IN,StateCodeAlValidator:()=>_N,StateCodeAmValidator:()=>BN,StateCodeApValidator:()=>DN,StateCodeBaValidator:()=>RN,StateCodeCeValidator:()=>ON,StateCodeDfValidator:()=>PN,StateCodeEsValidator:()=>kN,StateCodeGoValidator:()=>LN,StateCodeMaValidator:()=>VN,StateCodeMgValidator:()=>UN,StateCodeMsValidator:()=>jN,StateCodeMtValidator:()=>FN,StateCodePaValidator:()=>MN,StateCodePbValidator:()=>qN,StateCodePeValidator:()=>HN,StateCodePiValidator:()=>KN,StateCodePrValidator:()=>$N,StateCodeRjValidator:()=>XN,StateCodeRnValidator:()=>GN,StateCodeRoValidator:()=>WN,StateCodeRrValidator:()=>zN,StateCodeRsValidator:()=>JN,StateCodeScValidator:()=>YN,StateCodeSeValidator:()=>QN,StateCodeSpValidator:()=>ZN,StateCodeToValidator:()=>eT,StateCodes:()=>Bk,TransformDateString:()=>bQ,TransformDecimal:()=>SQ,ValidateErrorsMetadata:()=>AN,Validates:()=>xQ,ValidationError:()=>wN,Xml2JsToolkit:()=>nP,XmlSigner:()=>bN,left:()=>Da,leftFromError:()=>rP,mapConstraintsToErrors:()=>CN,plainToInstance:()=>EN,right:()=>Hl,unreachable:()=>Dw});module.exports=dQ(bge);var Iw="http://www.w3.org/2000/09/xmldsig#",xN="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",_w=(function(r){return r.RSA_SHA1="http://www.w3.org/2000/09/xmldsig#rsa-sha1",r.RSA_SHA256="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",r})({}),Ml=(function(r){return r.SHA1="sha1",r.SHA256="sha256",r})({}),Bw=(function(r){return r.SHA1="http://www.w3.org/2000/09/xmldsig#sha1",r.SHA256="http://www.w3.org/2001/04/xmlenc#sha256",r})({});var Bk={AC:"12",AL:"27",AM:"13",AP:"16",BA:"29",CE:"23",DF:"53",ES:"32",GO:"52",MA:"21",MG:"31",MS:"50",MT:"51",PA:"15",PB:"25",PE:"26",PI:"22",PR:"41",RJ:"33",RN:"24",RO:"11",RR:"14",RS:"43",SC:"42",SE:"28",SP:"35",TO:"17"},mQ=Object.keys(Bk);var gQ={Production:"1",Homolog:"2"};var Os=class extends Error{static{o(this,"NFeTsError")}};var wN=class extends Os{static{o(this,"ValidationError")}};var cg={includeComments:!1,exclusive:!0};var Dk=require("@nfets/core/domain/errors/nfets-error");var Dw=o(r=>{throw new Dk.NFeTsError("Didn't expect to get here")},"unreachable");var ql=class{static{o(this,"Signer")}toolkit;certificateRepository;algorithm;canonical;constructor(e,t,n=Ml.SHA1,s=cg){this.toolkit=e,this.certificateRepository=t,this.algorithm=n,this.canonical=s}assemble(e,t,n){let s=this.certificateRepository.getStringCertificate(n);return{$:{xmlns:Iw},SignedInfo:e,SignatureValue:t,KeyInfo:{X509Data:{X509Certificate:s}}}}signedInfo(e,t){return{CanonicalizationMethod:{$:{Algorithm:xN}},SignatureMethod:{$:{Algorithm:this.signatureMethod}},Reference:{$:{URI:`#${this.toolkit.getAttribute(e,t)}`},Transforms:this.transforms,DigestMethod:{$:{Algorithm:this.digestAlgorithm}},DigestValue:this.digest(e)}}}digest(e){return this.toolkit.digest(e,this.algorithm,this.canonical)}async signOrLeft(e,t){let n=this.toolkit.canonicalize(await this.toolkit.build({$:{xmlns:Iw},...e},{rootName:"SignedInfo"}),this.canonical);return await this.certificateRepository.sign(n,t,this.algorithm)}get transforms(){return{Transform:[{$:{Algorithm:"http://www.w3.org/2000/09/xmldsig#enveloped-signature"}},{$:{Algorithm:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"}}]}}get digestAlgorithm(){switch(this.algorithm){case Ml.SHA256:return Bw.SHA256;case Ml.SHA1:return Bw.SHA1;default:return Dw(this.algorithm)}}get signatureMethod(){switch(this.algorithm){case Ml.SHA256:return _w.RSA_SHA256;case Ml.SHA1:return _w.RSA_SHA1;default:return Dw(this.algorithm)}}};var Rw=class{static{o(this,"Left")}value;constructor(e){this.value=e}isLeft(){return!0}isRight(){return!1}},lg=class{static{o(this,"Right")}value;constructor(e){this.value=e}isLeft(){return!1}isRight(){return!0}},Da=o(r=>new Rw(r),"left"),Hl=o(r=>r===void 0?new lg(void 0):new lg(r),"right");var SN=class extends ql{static{o(this,"EntitySigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{privateKey:a,certificate:u}=n;if(!e[s])return Da(new Os(`Node ${String(s)} not found`));let c=await this.toolkit.build(this.ns(e,String(s)),{headless:!0,rootName:String(s),renderOpts:{pretty:!1}}),f=this.signedInfo(c,i),h=await this.signOrLeft(f,a);if(h.isLeft())return h;let m=e;return m.Signature=this.assemble(f,h.value,u),Hl(m)}ns(e,t){let n=e.$.xmlns,{$:{xmlns:s,...i},...a}=e[t];return{$:{xmlns:n,...i},...a}}};var bN=class extends ql{static{o(this,"XmlSigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{privateKey:a,certificate:u}=n,c=this.toolkit.getNode(e,s);if(!c)return Da(new Os(`Node ${s} not found`));let f=this.signedInfo(c,i),h=await this.signOrLeft(f,a);if(h.isLeft())return h;let m=await this.toolkit.build(this.assemble(f,h.value,u),{rootName:"Signature"});return Hl(this.toolkit.appendNode(e,m))}};var gve=require("reflect-metadata"),Pk=require("class-validator");var fve=require("reflect-metadata");var vp="__SkipValidation__",vQ=o(()=>(r,e)=>{Reflect.defineMetadata(vp,!0,r,e.toString())},"SkipValidation"),yQ=o(()=>r=>{Reflect.defineMetadata(vp,!0,r)},"SkipAllValidations");var Rk=require("class-transformer");var Ok=o(r=>{for(let[e,t]of Object.entries(r))typeof t>"u"&&delete r[e],t&&typeof t=="object"&&Ok(t)},"clearUndefinedValues"),EN=o((r,e)=>{let t=(0,Rk.plainToInstance)(e,r);return Ok(t),t},"plainToInstance");var AN="__ValidateErrors__",CN=o((r,e)=>r.reduce((t,n)=>{if(n.children?.length)return t.concat(CN(n.children,e?`${e}.${n.property}`:n.property));let s=Object.values(n.constraints??{}).map(i=>e?`${e}.${i}`:i).join(", ");return s?t.concat(s):t},[]),"mapConstraintsToErrors"),xQ=o(r=>(e,t,n)=>{let s=n.value;n.value=function(...i){let a=Reflect.getMetadata(vp,this.constructor);if(Reflect.getMetadata(vp,this.constructor.prototype,t.toString())===!0||a===!0)return s?.apply(this,i);let[c,...f]=i,h=EN(c,r),m=(0,Pk.validateSync)(h,{whitelist:!0});if(m.length){let g=Reflect.getMetadata(AN,this)??[];Reflect.defineMetadata(AN,g.concat(CN(m,s?.name)),this)}return s?.apply(this,[h,...f])}},"Validates");var Sve=require("reflect-metadata"),kk=require("@nfets/core/infrastructure"),Lk=require("class-validator");var NN=o(r=>(e,t)=>{(0,Lk.registerDecorator)({name:"isDecimal",target:e.constructor,propertyName:t,options:r,validator:{validate(n){return n instanceof kk.Decimal?!0:typeof n=="string"||typeof n=="number"||typeof n=="bigint"},defaultMessage(n){return`${n.property} is not a valid Decimal value`}}})},"IsDecimal");var Ave=require("reflect-metadata"),TN=require("class-validator");var yp=Symbol("choice"),wQ=o(r=>e=>{let{properties:t,required:n=!1,...s}=r,i=Reflect.getMetadata(yp,e)??[],a={properties:t,required:n};i.push(a),Reflect.defineMetadata(yp,i,e);for(let u of t)(0,TN.registerDecorator)({name:"choice",target:e,propertyName:u,options:s,validator:{validate(c,f){let h=f.object,m=f.property,g=Reflect.getMetadata(yp,e);if(!g)return!0;let x=g.find(w=>w.properties.includes(m));if(!x||c==null)return!0;for(let w of x.properties){if(w===m)continue;let S=h[w];if(!(S==null))return!1}for(let w of g)if(w!==x)for(let S of w.properties){let A=h[S];if(!(A==null))return!1}return!0},defaultMessage(c){let f=Reflect.getMetadata(yp,e);if(!f)return`${c.property} validation error`;let h=f.find(g=>g.properties.includes(c.property));if(!h)return`${c.property} validation error`;let m=c.object;for(let g of h.properties)if(m[g]&&g!==c.property)return`${c.property} cannot be set because ${g} is already set. Only one property from this choice group is allowed.`;for(let g of f)if(g!==h)for(let x of g.properties){let v=m[x];if(v!=null)return`${c.property} cannot be set because ${x} from a different choice group is already set.`}return`${c.property} validation error`}}});if(n)for(let u of t)(0,TN.registerDecorator)({name:"choiceGroupRequired",target:e,propertyName:u,options:{...s,always:!0},validator:{validate(c,f){let h=f.object,m=Reflect.getMetadata(yp,e);if(!m)return!0;let g=m.find(x=>x.properties.includes(f.property));if(!g?.required)return!0;for(let x of g.properties){let v=h[x];if(v!=null)return!0}return f.property!==g.properties[0]},defaultMessage(c){let f=Reflect.getMetadata(yp,e);if(!f)return"At least one property from a choice group must be provided";let h=f.find(m=>m.properties.includes(c.property));return h?`You must provide a value for one of the following properties: ${h.properties.join(", ")}`:"At least one property from a choice group must be provided"}}})},"Choice");var Tve=require("reflect-metadata"),Vk=require("@nfets/core/infrastructure"),Uk=require("class-transformer");var SQ=o(({fixed:r,...e}={fixed:2})=>(t,n)=>{NN(e)(t,n),(0,Uk.Transform)(({value:s})=>Vk.Decimal.newOrUndefined(s)?.toFixed(r))(t,n)},"TransformDecimal");var qk=require("class-transformer"),Hk=require("class-validator");var Ow=Wr(require("dayjs"),1),jk=Wr(require("dayjs/plugin/utc"),1),Fk=Wr(require("dayjs/plugin/timezone"),1);Ow.default.extend(jk.default);Ow.default.extend(Fk.default);var Mk=Ow.default;var bQ=o((r={})=>(e,t)=>{(0,qk.Transform)(({value:n})=>{let s=n instanceof Date?n.toISOString():n;return s?Mk(s).utc().format(r.format):void 0})(e,t),(0,Hk.IsDateString)()(e,t)},"TransformDateString");var IN=class{static{o(this,"StateCodeAcValidator")}execute(e){if(e=e.replace(/\D/g,""),!/^01\d{11}$/.test(e))return!1;let t=e.split("").map(Number),n=t.slice(0,11),s=t[11],i=t[12],a=[4,3,2,9,8,7,6,5,4,3,2],c=n.reduce((v,w,S)=>v+w*a[S],0)%11,f=c===0||c===1?0:11-c,h=[5,4,3,2,9,8,7,6,5,4,3,2],g=[...n,f].reduce((v,w,S)=>v+w*h[S],0)%11,x=g===0||g===1?0:11-g;return s===f&&i===x}};var _N=class{static{o(this,"StateCodeAlValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("24"))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let c=0;c<8;c++)s+=parseInt(t[c],10)*n[c];let a=s*10%11;return(a===10?0:a)===parseInt(t[8],10)}};var BN=class{static{o(this,"StateCodeAmValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let a=0;a<8;a++)s+=parseInt(t[a],10)*n[a];let i;if(s<11)i=11-s;else{let a=s%11;i=a<=1?0:11-a}return i===parseInt(t[8],10)}};var DN=class{static{o(this,"StateCodeApValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("03"))return!1;let n=t.substring(0,8),s=parseInt(n,10),i,a;s>=3017001&&s<=3019022?(i=9,a=1):s>=3000001&&s<=3017e3?(i=5,a=0):(i=0,a=0);let u=[9,8,7,6,5,4,3,2],c=i;for(let m=0;m<8;m++)c+=parseInt(t[m],10)*u[m];let h=11-c%11;return h===10?h=0:h===11&&(h=a),h===parseInt(t[8],10)}};var RN=class{static{o(this,"StateCodeBaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==8&&t.length!==9)return!1;let n=t.split("").map(w=>parseInt(w,10)),s=(t.length===8?n[0]:n[1])<=5||n[0]===8?10:11,i=t.length===8?[7,6,5,4,3,2]:[8,7,6,5,4,3,2],a=0;for(let w=0;w<i.length;w++)a+=n[w]*i[w];let u=a%s,c=s-u;(s===11&&u<=1||s===10&&u===0)&&(c=0);let h=(t.slice(0,t.length-2)+c.toString()).split("").map(w=>parseInt(w,10)),m=t.length===8?[8,7,6,5,4,3,2]:[9,8,7,6,5,4,3,2],g=0;for(let w=0;w<m.length;w++)g+=h[w]*m[w];let x=g%s,v=s-x;return(s===11&&x<=1||s===10&&x===0)&&(v=0),v===n[t.length-2]&&c===n[t.length-1]}};var ON=class{static{o(this,"StateCodeCeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var PN=class{static{o(this,"StateCodeDfValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==13||!t.startsWith("07"))return!1;let n=t.slice(0,11).split("").map(Number),s=t.slice(11).split("").map(Number),i=[2,3,4,5,6,7,8,9],a=0;for(let m=10,g=0;m>=0;m--,g=(g+1)%i.length)a+=n[m]*i[g];let u=11-a%11;(u===10||u===11)&&(u=0);let c=n.concat([u]),f=0;for(let m=11,g=0;m>=0;m--,g=(g+1)%i.length)f+=c[m]*i[g];let h=11-f%11;return(h===10||h===11)&&(h=0),u===s[0]&&h===s[1]}};var kN=class{static{o(this,"StateCodeEsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i<2?0:11-i)===parseInt(t[8],10)}};var LN=class{static{o(this,"StateCodeGoValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=parseInt(t.substring(0,2));if(!(n===10||n===11||n>=20&&n<=29))return!1;let s=[9,8,7,6,5,4,3,2],i=0;for(let c=0;c<8;c++)i+=parseInt(t[c],10)*s[c];let a=i%11;return(a===0||a===1?0:11-a)===parseInt(t[8],10)}};var VN=class{static{o(this,"StateCodeMaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("12"))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[8],10)}};var UN=class{static{o(this,"StateCodeMgValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==13)return!1;let n=t.slice(0,11),s=n.slice(0,3)+"0"+n.slice(3),i=0;for(let x=0;x<12;x++){let v=x%2===0?1:2,w=(parseInt(s[x])*v).toString();i+=w.split("").reduce((S,A)=>S+parseInt(A),0)}let u=Math.ceil(i/10)*10-i,c=n+u.toString(),f=[3,2,11,10,9,8,7,6,5,4,3,2],h=0;for(let x=0;x<12;x++)h+=parseInt(c[x])*f[x];let m=h%11,g=m<2?0:11-m;return parseInt(t[11])===u&&parseInt(t[12])===g}};var jN=class{static{o(this,"StateCodeMsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!(t.startsWith("28")||t.startsWith("50")))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let c=0;c<8;c++)s+=parseInt(t[c],10)*n[c];let i=s%11,a=11-i;return(i===0||a>9?0:a)===parseInt(t[8],10)}};var FN=class{static{o(this,"StateCodeMtValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==11)return!1;let n=[3,2,9,8,7,6,5,4,3,2],s=0;for(let u=0;u<10;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[10],10)}};var MN=class{static{o(this,"StateCodePaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[8])}};var qN=class{static{o(this,"StateCodePbValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8])}};var HN=class{static{o(this,"StateCodePeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=t.slice(0,7).split("").map(Number),s=[8,7,6,5,4,3,2],i=0;for(let x=0;x<7;x++)i+=n[x]*s[x];let a=i%11,u=a===0||a===1?0:11-a,c=[...n,u],f=[9,8,7,6,5,4,3,2],h=0;for(let x=0;x<8;x++)h+=c[x]*f[x];let m=h%11,g=m===0||m===1?0:11-m;return u===parseInt(t[7])&&g===parseInt(t[8])}};var KN=class{static{o(this,"StateCodePiValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var $N=class{static{o(this,"StateCodePrValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==10)return!1;let n=t.slice(0,8).split("").map(Number),s=[3,2,7,6,5,4,3,2],i=[4,3,2,7,6,5,4,3,2],a=0;for(let m=0;m<8;m++)a+=n[m]*s[m];let u=11-a%11;u>=10&&(u=0);let c=[...n,u],f=0;for(let m=0;m<9;m++)f+=c[m]*i[m];let h=11-f%11;return h>=10&&(h=0),u===parseInt(t[8])&&h===parseInt(t[9])}};var XN=class{static{o(this,"StateCodeRjValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==8)return!1;let n=[2,7,6,5,4,3,2],s=0;for(let u=0;u<7;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i<=1?0:11-i)===parseInt(t[7],10)}};var GN=class{static{o(this,"StateCodeRnValidator")}execute(e){let t=e.replace(/\D/g,"");if(!(t.length===9||t.length===10)||!t.startsWith("20"))return!1;let n=t.length===9?[9,8,7,6,5,4,3,2]:[10,9,8,7,6,5,4,3,2],s=t.slice(0,n.length).split("").map(Number),i=0;for(let f=0;f<n.length;f++)i+=s[f]*n[f];let u=i*10%11;return(u===10?0:u)===parseInt(t[t.length-1])}};var WN=class{static{o(this,"StateCodeRoValidator")}execute(e){let t=e.replace(/\D/g,""),n,s;if(t.length===9)n=t.slice(3,8).split("").map(Number),s=[6,5,4,3,2];else if(t.length===14)n=t.slice(0,13).split("").map(Number),s=[6,5,4,3,2,9,8,7,6,5,4,3,2];else return!1;let i=0;for(let c=0;c<s.length;c++)i+=n[c]*s[c];let u=11-i%11;return(u===10||u===11)&&(u-=10),u===parseInt(t[t.length-1])}};var zN=class{static{o(this,"StateCodeRrValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("24"))return!1;let n=0;for(let i=0;i<8;i++)n+=(i+1)*parseInt(t[i],10);return n%9===parseInt(t[8],10)}};var JN=class{static{o(this,"StateCodeRsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==10)return!1;let n=[2,9,8,7,6,5,4,3,2],s=0;for(let a=0;a<9;a++)s+=parseInt(t[a],10)*n[a];let i=11-s%11;return(i===10||i===11)&&(i=0),i===parseInt(t[9],10)}};var YN=class{static{o(this,"StateCodeScValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var QN=class{static{o(this,"StateCodeSeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var ZN=class{static{o(this,"StateCodeSpValidator")}execute(e){let t=e;if(t.length!==12)return!1;let n=t.split("").map(Number),s=[1,3,4,5,6,7,8,10],i=0;for(let h=0;h<8;h++)i+=n[h]*s[h];let a=i%11%10,u=[3,2,10,9,8,7,6,5,4,3,2],c=0;for(let h=0;h<11;h++)c+=n[h]*u[h];let f=c%11%10;return a===n[8]&&f===n[11]}};var eT=class{static{o(this,"StateCodeToValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==11)return!1;let n=t.split(""),s=n.slice(0,2).concat(n.slice(4,10)).map(Number),i=[9,8,7,6,5,4,3,2],a=0;for(let f=0;f<i.length;f++)a+=s[f]*i[f];let u=a%11;return(u<2?0:11-u)===parseInt(t[10])}};var tT=class{static{o(this,"ASN1")}extractCertificateInfo(e){let n=e.subject.split(`
|
|
90
|
+
`).reduce((i,a)=>{let[u,c]=a.split("=").map(f=>f.trim());return!u||!c?i:i.set(u,c)},new Map),s=this.oid("2.16.76.1.3.1",e.raw);return{CNPJ:this.oid("2.16.76.1.3.3",e.raw),CPF:s,CN:n.get("CN")?.replace(/:.*$/g,""),O:n.get("O"),OU:n.get("OU"),ST:n.get("ST"),L:n.get("L"),C:n.get("C")}}oid(e,t){let n=this.marker(e),s=t.indexOf(n);if(s===-1)return;let i=[t.subarray(0,s),t.subarray(s)];if(i.length<=1)return;let u=i[0].subarray(-4),c=u.subarray(-2);u[0]===48?c=u:u[1]===48&&(c=u.subarray(-3));let f=Buffer.concat([c,n,i[1]]),h=this.length(f),m=n.length,g=f.subarray(2+m,2+m+h),x=g.length-c.length-2;if(x<=0||x>g.length)return;let w=g.subarray(-x).toString("utf8");return w.substring(Buffer.from(w).findIndex((S,A)=>w.charCodeAt(A)>=32&&w.charCodeAt(A)<=126))}length(e){return e.length<2?0:e[1]<=127?e[1]:Buffer.from([e[1]&15]).reduce((t,n)=>t<<8|n,0)}marker(e){let t=e.split("."),n=t.slice(2).reduce((s,i)=>{let a=this.base128(s,Number.parseInt(i,10),!0);return s.length=0,s.push(...a),s},[]);return Buffer.from([6,n.length+1,40*Number.parseInt(t[0],10)+Number.parseInt(t[1],10),...n])}base128(e,t,n){let s=[...e];if(t>127){let a=this.base128(e,Math.floor(t/128),!1);a.length=0,s.push(...a)}let i=t%128;return n?s.push(i):s.push(128|i),s}};var xp=9e15,Uu=1e9,rT="0123456789abcdef",Lw="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Vw="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",nT={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-xp,maxE:xp,crypto:!1},Gk,Ro,_t=!0,jw="[DecimalError] ",Vu=jw+"Invalid argument: ",Wk=jw+"Precision limit exceeded",zk=jw+"crypto unavailable",Jk="[object Decimal]",os=Math.floor,An=Math.pow,EQ=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,AQ=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,CQ=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Yk=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,na=1e7,St=7,NQ=9007199254740991,TQ=Lw.length-1,sT=Vw.length-1,Oe={toStringTag:Jk};Oe.absoluteValue=Oe.abs=function(){var r=new this.constructor(this);return r.s<0&&(r.s=1),mt(r)};Oe.ceil=function(){return mt(new this.constructor(this),this.e+1,2)};Oe.clampedTo=Oe.clamp=function(r,e){var t,n=this,s=n.constructor;if(r=new s(r),e=new s(e),!r.s||!e.s)return new s(NaN);if(r.gt(e))throw Error(Vu+e);return t=n.cmp(r),t<0?r:n.cmp(e)>0?e:new s(n)};Oe.comparedTo=Oe.cmp=function(r){var e,t,n,s,i=this,a=i.d,u=(r=new i.constructor(r)).d,c=i.s,f=r.s;if(!a||!u)return!c||!f?NaN:c!==f?c:a===u?0:!a^c<0?1:-1;if(!a[0]||!u[0])return a[0]?c:u[0]?-f:0;if(c!==f)return c;if(i.e!==r.e)return i.e>r.e^c<0?1:-1;for(n=a.length,s=u.length,e=0,t=n<s?n:s;e<t;++e)if(a[e]!==u[e])return a[e]>u[e]^c<0?1:-1;return n===s?0:n>s^c<0?1:-1};Oe.cosine=Oe.cos=function(){var r,e,t=this,n=t.constructor;return t.d?t.d[0]?(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+St,n.rounding=1,t=IQ(n,r4(n,t)),n.precision=r,n.rounding=e,mt(Ro==2||Ro==3?t.neg():t,r,e,!0)):new n(1):new n(NaN)};Oe.cubeRoot=Oe.cbrt=function(){var r,e,t,n,s,i,a,u,c,f,h=this,m=h.constructor;if(!h.isFinite()||h.isZero())return new m(h);for(_t=!1,i=h.s*An(h.s*h,1/3),!i||Math.abs(i)==1/0?(t=Kn(h.d),r=h.e,(i=(r-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=An(t,1/3),r=os((r+1)/3)-(r%3==(r<0?-1:2)),i==1/0?t="5e"+r:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+r),n=new m(t),n.s=h.s):n=new m(i.toString()),a=(r=m.precision)+3;;)if(u=n,c=u.times(u).times(u),f=c.plus(h),n=Ir(f.plus(h).times(u),f.plus(c),a+2,1),Kn(u.d).slice(0,a)===(t=Kn(n.d)).slice(0,a))if(t=t.slice(a-3,a+1),t=="9999"||!s&&t=="4999"){if(!s&&(mt(u,r+1,0),u.times(u).times(u).eq(h))){n=u;break}a+=4,s=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(mt(n,r+1,1),e=!n.times(n).times(n).eq(h));break}return _t=!0,mt(n,r,m.rounding,e)};Oe.decimalPlaces=Oe.dp=function(){var r,e=this.d,t=NaN;if(e){if(r=e.length-1,t=(r-os(this.e/St))*St,r=e[r],r)for(;r%10==0;r/=10)t--;t<0&&(t=0)}return t};Oe.dividedBy=Oe.div=function(r){return Ir(this,new this.constructor(r))};Oe.dividedToIntegerBy=Oe.divToInt=function(r){var e=this,t=e.constructor;return mt(Ir(e,new t(r),0,1,1),t.precision,t.rounding)};Oe.equals=Oe.eq=function(r){return this.cmp(r)===0};Oe.floor=function(){return mt(new this.constructor(this),this.e+1,3)};Oe.greaterThan=Oe.gt=function(r){return this.cmp(r)>0};Oe.greaterThanOrEqualTo=Oe.gte=function(r){var e=this.cmp(r);return e==1||e===0};Oe.hyperbolicCosine=Oe.cosh=function(){var r,e,t,n,s,i=this,a=i.constructor,u=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return u;t=a.precision,n=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,s=i.d.length,s<32?(r=Math.ceil(s/3),e=(1/Mw(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),i=wp(a,1,i.times(e),new a(1),!0);for(var c,f=r,h=new a(8);f--;)c=i.times(i),i=u.minus(c.times(h.minus(c.times(h))));return mt(i,a.precision=t,a.rounding=n,!0)};Oe.hyperbolicSine=Oe.sinh=function(){var r,e,t,n,s=this,i=s.constructor;if(!s.isFinite()||s.isZero())return new i(s);if(e=i.precision,t=i.rounding,i.precision=e+Math.max(s.e,s.sd())+4,i.rounding=1,n=s.d.length,n<3)s=wp(i,2,s,s,!0);else{r=1.4*Math.sqrt(n),r=r>16?16:r|0,s=s.times(1/Mw(5,r)),s=wp(i,2,s,s,!0);for(var a,u=new i(5),c=new i(16),f=new i(20);r--;)a=s.times(s),s=s.times(u.plus(a.times(c.times(a).plus(f))))}return i.precision=e,i.rounding=t,mt(s,e,t,!0)};Oe.hyperbolicTangent=Oe.tanh=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+7,n.rounding=1,Ir(t.sinh(),t.cosh(),n.precision=r,n.rounding=e)):new n(t.s)};Oe.inverseCosine=Oe.acos=function(){var r=this,e=r.constructor,t=r.abs().cmp(1),n=e.precision,s=e.rounding;return t!==-1?t===0?r.isNeg()?Ra(e,n,s):new e(0):new e(NaN):r.isZero()?Ra(e,n+4,s).times(.5):(e.precision=n+6,e.rounding=1,r=new e(1).minus(r).div(r.plus(1)).sqrt().atan(),e.precision=n,e.rounding=s,r.times(2))};Oe.inverseHyperbolicCosine=Oe.acosh=function(){var r,e,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(r=n.precision,e=n.rounding,n.precision=r+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,_t=!1,t=t.times(t).minus(1).sqrt().plus(t),_t=!0,n.precision=r,n.rounding=e,t.ln()):new n(t)};Oe.inverseHyperbolicSine=Oe.asinh=function(){var r,e,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,_t=!1,t=t.times(t).plus(1).sqrt().plus(t),_t=!0,n.precision=r,n.rounding=e,t.ln())};Oe.inverseHyperbolicTangent=Oe.atanh=function(){var r,e,t,n,s=this,i=s.constructor;return s.isFinite()?s.e>=0?new i(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(r=i.precision,e=i.rounding,n=s.sd(),Math.max(n,r)<2*-s.e-1?mt(new i(s),r,e,!0):(i.precision=t=n-s.e,s=Ir(s.plus(1),new i(1).minus(s),t+r,1),i.precision=r+4,i.rounding=1,s=s.ln(),i.precision=r,i.rounding=e,s.times(.5))):new i(NaN)};Oe.inverseSine=Oe.asin=function(){var r,e,t,n,s=this,i=s.constructor;return s.isZero()?new i(s):(e=s.abs().cmp(1),t=i.precision,n=i.rounding,e!==-1?e===0?(r=Ra(i,t+4,n).times(.5),r.s=s.s,r):new i(NaN):(i.precision=t+6,i.rounding=1,s=s.div(new i(1).minus(s.times(s)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=n,s.times(2)))};Oe.inverseTangent=Oe.atan=function(){var r,e,t,n,s,i,a,u,c,f=this,h=f.constructor,m=h.precision,g=h.rounding;if(f.isFinite()){if(f.isZero())return new h(f);if(f.abs().eq(1)&&m+4<=sT)return a=Ra(h,m+4,g).times(.25),a.s=f.s,a}else{if(!f.s)return new h(NaN);if(m+4<=sT)return a=Ra(h,m+4,g).times(.5),a.s=f.s,a}for(h.precision=u=m+10,h.rounding=1,t=Math.min(28,u/St+2|0),r=t;r;--r)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(_t=!1,e=Math.ceil(u/St),n=1,c=f.times(f),a=new h(f),s=f;r!==-1;)if(s=s.times(c),i=a.minus(s.div(n+=2)),s=s.times(c),a=i.plus(s.div(n+=2)),a.d[e]!==void 0)for(r=e;a.d[r]===i.d[r]&&r--;);return t&&(a=a.times(2<<t-1)),_t=!0,mt(a,h.precision=m,h.rounding=g,!0)};Oe.isFinite=function(){return!!this.d};Oe.isInteger=Oe.isInt=function(){return!!this.d&&os(this.e/St)>this.d.length-2};Oe.isNaN=function(){return!this.s};Oe.isNegative=Oe.isNeg=function(){return this.s<0};Oe.isPositive=Oe.isPos=function(){return this.s>0};Oe.isZero=function(){return!!this.d&&this.d[0]===0};Oe.lessThan=Oe.lt=function(r){return this.cmp(r)<0};Oe.lessThanOrEqualTo=Oe.lte=function(r){return this.cmp(r)<1};Oe.logarithm=Oe.log=function(r){var e,t,n,s,i,a,u,c,f=this,h=f.constructor,m=h.precision,g=h.rounding,x=5;if(r==null)r=new h(10),e=!0;else{if(r=new h(r),t=r.d,r.s<0||!t||!t[0]||r.eq(1))return new h(NaN);e=r.eq(10)}if(t=f.d,f.s<0||!t||!t[0]||f.eq(1))return new h(t&&!t[0]?-1/0:f.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)i=!0;else{for(s=t[0];s%10===0;)s/=10;i=s!==1}if(_t=!1,u=m+x,a=Lu(f,u),n=e?Uw(h,u+10):Lu(r,u),c=Ir(a,n,u,1),fg(c.d,s=m,g))do if(u+=10,a=Lu(f,u),n=e?Uw(h,u+10):Lu(r,u),c=Ir(a,n,u,1),!i){+Kn(c.d).slice(s+1,s+15)+1==1e14&&(c=mt(c,m+1,0));break}while(fg(c.d,s+=10,g));return _t=!0,mt(c,m,g)};Oe.minus=Oe.sub=function(r){var e,t,n,s,i,a,u,c,f,h,m,g,x=this,v=x.constructor;if(r=new v(r),!x.d||!r.d)return!x.s||!r.s?r=new v(NaN):x.d?r.s=-r.s:r=new v(r.d||x.s!==r.s?x:NaN),r;if(x.s!=r.s)return r.s=-r.s,x.plus(r);if(f=x.d,g=r.d,u=v.precision,c=v.rounding,!f[0]||!g[0]){if(g[0])r.s=-r.s;else if(f[0])r=new v(x);else return new v(c===3?-0:0);return _t?mt(r,u,c):r}if(t=os(r.e/St),h=os(x.e/St),f=f.slice(),i=h-t,i){for(m=i<0,m?(e=f,i=-i,a=g.length):(e=g,t=h,a=f.length),n=Math.max(Math.ceil(u/St),a)+2,i>n&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for(n=f.length,a=g.length,m=n<a,m&&(a=n),n=0;n<a;n++)if(f[n]!=g[n]){m=f[n]<g[n];break}i=0}for(m&&(e=f,f=g,g=e,r.s=-r.s),a=f.length,n=g.length-a;n>0;--n)f[a++]=0;for(n=g.length;n>i;){if(f[--n]<g[n]){for(s=n;s&&f[--s]===0;)f[s]=na-1;--f[s],f[n]+=na}f[n]-=g[n]}for(;f[--a]===0;)f.pop();for(;f[0]===0;f.shift())--t;return f[0]?(r.d=f,r.e=Fw(f,t),_t?mt(r,u,c):r):new v(c===3?-0:0)};Oe.modulo=Oe.mod=function(r){var e,t=this,n=t.constructor;return r=new n(r),!t.d||!r.s||r.d&&!r.d[0]?new n(NaN):!r.d||t.d&&!t.d[0]?mt(new n(t),n.precision,n.rounding):(_t=!1,n.modulo==9?(e=Ir(t,r.abs(),0,3,1),e.s*=r.s):e=Ir(t,r,0,n.modulo,1),e=e.times(r),_t=!0,t.minus(e))};Oe.naturalExponential=Oe.exp=function(){return iT(this)};Oe.naturalLogarithm=Oe.ln=function(){return Lu(this)};Oe.negated=Oe.neg=function(){var r=new this.constructor(this);return r.s=-r.s,mt(r)};Oe.plus=Oe.add=function(r){var e,t,n,s,i,a,u,c,f,h,m=this,g=m.constructor;if(r=new g(r),!m.d||!r.d)return!m.s||!r.s?r=new g(NaN):m.d||(r=new g(r.d||m.s===r.s?m:NaN)),r;if(m.s!=r.s)return r.s=-r.s,m.minus(r);if(f=m.d,h=r.d,u=g.precision,c=g.rounding,!f[0]||!h[0])return h[0]||(r=new g(m)),_t?mt(r,u,c):r;if(i=os(m.e/St),n=os(r.e/St),f=f.slice(),s=i-n,s){for(s<0?(t=f,s=-s,a=h.length):(t=h,n=i,a=f.length),i=Math.ceil(u/St),a=i>a?i+1:a+1,s>a&&(s=a,t.length=1),t.reverse();s--;)t.push(0);t.reverse()}for(a=f.length,s=h.length,a-s<0&&(s=a,t=h,h=f,f=t),e=0;s;)e=(f[--s]=f[s]+h[s]+e)/na|0,f[s]%=na;for(e&&(f.unshift(e),++n),a=f.length;f[--a]==0;)f.pop();return r.d=f,r.e=Fw(f,n),_t?mt(r,u,c):r};Oe.precision=Oe.sd=function(r){var e,t=this;if(r!==void 0&&r!==!!r&&r!==1&&r!==0)throw Error(Vu+r);return t.d?(e=Qk(t.d),r&&t.e+1>e&&(e=t.e+1)):e=NaN,e};Oe.round=function(){var r=this,e=r.constructor;return mt(new e(r),r.e+1,e.rounding)};Oe.sine=Oe.sin=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+St,n.rounding=1,t=BQ(n,r4(n,t)),n.precision=r,n.rounding=e,mt(Ro>2?t.neg():t,r,e,!0)):new n(NaN)};Oe.squareRoot=Oe.sqrt=function(){var r,e,t,n,s,i,a=this,u=a.d,c=a.e,f=a.s,h=a.constructor;if(f!==1||!u||!u[0])return new h(!f||f<0&&(!u||u[0])?NaN:u?a:1/0);for(_t=!1,f=Math.sqrt(+a),f==0||f==1/0?(e=Kn(u),(e.length+c)%2==0&&(e+="0"),f=Math.sqrt(e),c=os((c+1)/2)-(c<0||c%2),f==1/0?e="5e"+c:(e=f.toExponential(),e=e.slice(0,e.indexOf("e")+1)+c),n=new h(e)):n=new h(f.toString()),t=(c=h.precision)+3;;)if(i=n,n=i.plus(Ir(a,i,t+2,1)).times(.5),Kn(i.d).slice(0,t)===(e=Kn(n.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!s&&e=="4999"){if(!s&&(mt(i,c+1,0),i.times(i).eq(a))){n=i;break}t+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(mt(n,c+1,1),r=!n.times(n).eq(a));break}return _t=!0,mt(n,c,h.rounding,r)};Oe.tangent=Oe.tan=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+10,n.rounding=1,t=t.sin(),t.s=1,t=Ir(t,new n(1).minus(t.times(t)).sqrt(),r+10,0),n.precision=r,n.rounding=e,mt(Ro==2||Ro==4?t.neg():t,r,e,!0)):new n(NaN)};Oe.times=Oe.mul=function(r){var e,t,n,s,i,a,u,c,f,h=this,m=h.constructor,g=h.d,x=(r=new m(r)).d;if(r.s*=h.s,!g||!g[0]||!x||!x[0])return new m(!r.s||g&&!g[0]&&!x||x&&!x[0]&&!g?NaN:!g||!x?r.s/0:r.s*0);for(t=os(h.e/St)+os(r.e/St),c=g.length,f=x.length,c<f&&(i=g,g=x,x=i,a=c,c=f,f=a),i=[],a=c+f,n=a;n--;)i.push(0);for(n=f;--n>=0;){for(e=0,s=c+n;s>n;)u=i[s]+x[n]*g[s-n-1]+e,i[s--]=u%na|0,e=u/na|0;i[s]=(i[s]+e)%na|0}for(;!i[--a];)i.pop();return e?++t:i.shift(),r.d=i,r.e=Fw(i,t),_t?mt(r,m.precision,m.rounding):r};Oe.toBinary=function(r,e){return aT(this,2,r,e)};Oe.toDecimalPlaces=Oe.toDP=function(r,e){var t=this,n=t.constructor;return t=new n(t),r===void 0?t:(Ps(r,0,Uu),e===void 0?e=n.rounding:Ps(e,0,8),mt(t,r+t.e+1,e))};Oe.toExponential=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=Oa(n,!0):(Ps(r,0,Uu),e===void 0?e=s.rounding:Ps(e,0,8),n=mt(new s(n),r+1,e),t=Oa(n,!0,r+1)),n.isNeg()&&!n.isZero()?"-"+t:t};Oe.toFixed=function(r,e){var t,n,s=this,i=s.constructor;return r===void 0?t=Oa(s):(Ps(r,0,Uu),e===void 0?e=i.rounding:Ps(e,0,8),n=mt(new i(s),r+s.e+1,e),t=Oa(n,!1,r+n.e+1)),s.isNeg()&&!s.isZero()?"-"+t:t};Oe.toFraction=function(r){var e,t,n,s,i,a,u,c,f,h,m,g,x=this,v=x.d,w=x.constructor;if(!v)return new w(x);if(f=t=new w(1),n=c=new w(0),e=new w(n),i=e.e=Qk(v)-x.e-1,a=i%St,e.d[0]=An(10,a<0?St+a:a),r==null)r=i>0?e:f;else{if(u=new w(r),!u.isInt()||u.lt(f))throw Error(Vu+u);r=u.gt(e)?i>0?e:f:u}for(_t=!1,u=new w(Kn(v)),h=w.precision,w.precision=i=v.length*St*2;m=Ir(u,e,0,1,1),s=t.plus(m.times(n)),s.cmp(r)!=1;)t=n,n=s,s=f,f=c.plus(m.times(s)),c=s,s=e,e=u.minus(m.times(s)),u=s;return s=Ir(r.minus(t),n,0,1,1),c=c.plus(s.times(f)),t=t.plus(s.times(n)),c.s=f.s=x.s,g=Ir(f,n,i,1).minus(x).abs().cmp(Ir(c,t,i,1).minus(x).abs())<1?[f,n]:[c,t],w.precision=h,_t=!0,g};Oe.toHexadecimal=Oe.toHex=function(r,e){return aT(this,16,r,e)};Oe.toNearest=function(r,e){var t=this,n=t.constructor;if(t=new n(t),r==null){if(!t.d)return t;r=new n(1),e=n.rounding}else{if(r=new n(r),e===void 0?e=n.rounding:Ps(e,0,8),!t.d)return r.s?t:r;if(!r.d)return r.s&&(r.s=t.s),r}return r.d[0]?(_t=!1,t=Ir(t,r,0,e,1).times(r),_t=!0,mt(t)):(r.s=t.s,t=r),t};Oe.toNumber=function(){return+this};Oe.toOctal=function(r,e){return aT(this,8,r,e)};Oe.toPower=Oe.pow=function(r){var e,t,n,s,i,a,u=this,c=u.constructor,f=+(r=new c(r));if(!u.d||!r.d||!u.d[0]||!r.d[0])return new c(An(+u,f));if(u=new c(u),u.eq(1))return u;if(n=c.precision,i=c.rounding,r.eq(1))return mt(u,n,i);if(e=os(r.e/St),e>=r.d.length-1&&(t=f<0?-f:f)<=NQ)return s=Zk(c,u,t,n),r.s<0?new c(1).div(s):mt(s,n,i);if(a=u.s,a<0){if(e<r.d.length-1)return new c(NaN);if((r.d[e]&1)==0&&(a=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=a,u}return t=An(+u,f),e=t==0||!isFinite(t)?os(f*(Math.log("0."+Kn(u.d))/Math.LN10+u.e+1)):new c(t+"").e,e>c.maxE+1||e<c.minE-1?new c(e>0?a/0:0):(_t=!1,c.rounding=u.s=1,t=Math.min(12,(e+"").length),s=iT(r.times(Lu(u,n+t)),n),s.d&&(s=mt(s,n+5,1),fg(s.d,n,i)&&(e=n+10,s=mt(iT(r.times(Lu(u,e+t)),e),e+5,1),+Kn(s.d).slice(n+1,n+15)+1==1e14&&(s=mt(s,n+1,0)))),s.s=a,_t=!0,c.rounding=i,mt(s,n,i))};Oe.toPrecision=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=Oa(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(Ps(r,1,Uu),e===void 0?e=s.rounding:Ps(e,0,8),n=mt(new s(n),r,e),t=Oa(n,r<=n.e||n.e<=s.toExpNeg,r)),n.isNeg()&&!n.isZero()?"-"+t:t};Oe.toSignificantDigits=Oe.toSD=function(r,e){var t=this,n=t.constructor;return r===void 0?(r=n.precision,e=n.rounding):(Ps(r,1,Uu),e===void 0?e=n.rounding:Ps(e,0,8)),mt(new n(t),r,e)};Oe.toString=function(){var r=this,e=r.constructor,t=Oa(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()&&!r.isZero()?"-"+t:t};Oe.truncated=Oe.trunc=function(){return mt(new this.constructor(this),this.e+1,1)};Oe.valueOf=Oe.toJSON=function(){var r=this,e=r.constructor,t=Oa(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function Kn(r){var e,t,n,s=r.length-1,i="",a=r[0];if(s>0){for(i+=a,e=1;e<s;e++)n=r[e]+"",t=St-n.length,t&&(i+=ku(t)),i+=n;a=r[e],n=a+"",t=St-n.length,t&&(i+=ku(t))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}o(Kn,"digitsToString");function Ps(r,e,t){if(r!==~~r||r<e||r>t)throw Error(Vu+r)}o(Ps,"checkInt32");function fg(r,e,t,n){var s,i,a,u;for(i=r[0];i>=10;i/=10)--e;return--e<0?(e+=St,s=0):(s=Math.ceil((e+1)/St),e%=St),i=An(10,St-e),u=r[s]%i|0,n==null?e<3?(e==0?u=u/100|0:e==1&&(u=u/10|0),a=t<4&&u==99999||t>3&&u==49999||u==5e4||u==0):a=(t<4&&u+1==i||t>3&&u+1==i/2)&&(r[s+1]/i/100|0)==An(10,e-2)-1||(u==i/2||u==0)&&(r[s+1]/i/100|0)==0:e<4?(e==0?u=u/1e3|0:e==1?u=u/100|0:e==2&&(u=u/10|0),a=(n||t<4)&&u==9999||!n&&t>3&&u==4999):a=((n||t<4)&&u+1==i||!n&&t>3&&u+1==i/2)&&(r[s+1]/i/1e3|0)==An(10,e-3)-1,a}o(fg,"checkRoundingDigits");function Pw(r,e,t){for(var n,s=[0],i,a=0,u=r.length;a<u;){for(i=s.length;i--;)s[i]*=e;for(s[0]+=rT.indexOf(r.charAt(a++)),n=0;n<s.length;n++)s[n]>t-1&&(s[n+1]===void 0&&(s[n+1]=0),s[n+1]+=s[n]/t|0,s[n]%=t)}return s.reverse()}o(Pw,"convertBase");function IQ(r,e){var t,n,s;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),s=(1/Mw(4,t)).toString()):(t=16,s="2.3283064365386962890625e-10"),r.precision+=t,e=wp(r,1,e.times(s),new r(1));for(var i=t;i--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return r.precision-=t,e}o(IQ,"cosine");var Ir=(function(){function r(n,s,i){var a,u=0,c=n.length;for(n=n.slice();c--;)a=n[c]*s+u,n[c]=a%i|0,u=a/i|0;return u&&n.unshift(u),n}o(r,"multiplyInteger");function e(n,s,i,a){var u,c;if(i!=a)c=i>a?1:-1;else for(u=c=0;u<i;u++)if(n[u]!=s[u]){c=n[u]>s[u]?1:-1;break}return c}o(e,"compare");function t(n,s,i,a){for(var u=0;i--;)n[i]-=u,u=n[i]<s[i]?1:0,n[i]=u*a+n[i]-s[i];for(;!n[0]&&n.length>1;)n.shift()}return o(t,"subtract"),function(n,s,i,a,u,c){var f,h,m,g,x,v,w,S,A,N,b,E,C,_,M,R,q,H,K,G,pe=n.constructor,le=n.s==s.s?1:-1,ue=n.d,ee=s.d;if(!ue||!ue[0]||!ee||!ee[0])return new pe(!n.s||!s.s||(ue?ee&&ue[0]==ee[0]:!ee)?NaN:ue&&ue[0]==0||!ee?le*0:le/0);for(c?(x=1,h=n.e-s.e):(c=na,x=St,h=os(n.e/x)-os(s.e/x)),K=ee.length,q=ue.length,A=new pe(le),N=A.d=[],m=0;ee[m]==(ue[m]||0);m++);if(ee[m]>(ue[m]||0)&&h--,i==null?(_=i=pe.precision,a=pe.rounding):u?_=i+(n.e-s.e)+1:_=i,_<0)N.push(1),v=!0;else{if(_=_/x+2|0,m=0,K==1){for(g=0,ee=ee[0],_++;(m<q||g)&&_--;m++)M=g*c+(ue[m]||0),N[m]=M/ee|0,g=M%ee|0;v=g||m<q}else{for(g=c/(ee[0]+1)|0,g>1&&(ee=r(ee,g,c),ue=r(ue,g,c),K=ee.length,q=ue.length),R=K,b=ue.slice(0,K),E=b.length;E<K;)b[E++]=0;G=ee.slice(),G.unshift(0),H=ee[0],ee[1]>=c/2&&++H;do g=0,f=e(ee,b,K,E),f<0?(C=b[0],K!=E&&(C=C*c+(b[1]||0)),g=C/H|0,g>1?(g>=c&&(g=c-1),w=r(ee,g,c),S=w.length,E=b.length,f=e(w,b,S,E),f==1&&(g--,t(w,K<S?G:ee,S,c))):(g==0&&(f=g=1),w=ee.slice()),S=w.length,S<E&&w.unshift(0),t(b,w,E,c),f==-1&&(E=b.length,f=e(ee,b,K,E),f<1&&(g++,t(b,K<E?G:ee,E,c))),E=b.length):f===0&&(g++,b=[0]),N[m++]=g,f&&b[0]?b[E++]=ue[R]||0:(b=[ue[R]],E=1);while((R++<q||b[0]!==void 0)&&_--);v=b[0]!==void 0}N[0]||N.shift()}if(x==1)A.e=h,Gk=v;else{for(m=1,g=N[0];g>=10;g/=10)m++;A.e=m+h*x-1,mt(A,u?i+A.e+1:i,a,v)}return A}})();function mt(r,e,t,n){var s,i,a,u,c,f,h,m,g,x=r.constructor;e:if(e!=null){if(m=r.d,!m)return r;for(s=1,u=m[0];u>=10;u/=10)s++;if(i=e-s,i<0)i+=St,a=e,h=m[g=0],c=h/An(10,s-a-1)%10|0;else if(g=Math.ceil((i+1)/St),u=m.length,g>=u)if(n){for(;u++<=g;)m.push(0);h=c=0,s=1,i%=St,a=i-St+1}else break e;else{for(h=u=m[g],s=1;u>=10;u/=10)s++;i%=St,a=i-St+s,c=a<0?0:h/An(10,s-a-1)%10|0}if(n=n||e<0||m[g+1]!==void 0||(a<0?h:h%An(10,s-a-1)),f=t<4?(c||n)&&(t==0||t==(r.s<0?3:2)):c>5||c==5&&(t==4||n||t==6&&(i>0?a>0?h/An(10,s-a):0:m[g-1])%10&1||t==(r.s<0?8:7)),e<1||!m[0])return m.length=0,f?(e-=r.e+1,m[0]=An(10,(St-e%St)%St),r.e=-e||0):m[0]=r.e=0,r;if(i==0?(m.length=g,u=1,g--):(m.length=g+1,u=An(10,St-i),m[g]=a>0?(h/An(10,s-a)%An(10,a)|0)*u:0),f)for(;;)if(g==0){for(i=1,a=m[0];a>=10;a/=10)i++;for(a=m[0]+=u,u=1;a>=10;a/=10)u++;i!=u&&(r.e++,m[0]==na&&(m[0]=1));break}else{if(m[g]+=u,m[g]!=na)break;m[g--]=0,u=1}for(i=m.length;m[--i]===0;)m.pop()}return _t&&(r.e>x.maxE?(r.d=null,r.e=NaN):r.e<x.minE&&(r.e=0,r.d=[0])),r}o(mt,"finalise");function Oa(r,e,t){if(!r.isFinite())return t4(r);var n,s=r.e,i=Kn(r.d),a=i.length;return e?(t&&(n=t-a)>0?i=i.charAt(0)+"."+i.slice(1)+ku(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(r.e<0?"e":"e+")+r.e):s<0?(i="0."+ku(-s-1)+i,t&&(n=t-a)>0&&(i+=ku(n))):s>=a?(i+=ku(s+1-a),t&&(n=t-s-1)>0&&(i=i+"."+ku(n))):((n=s+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-a)>0&&(s+1===a&&(i+="."),i+=ku(n))),i}o(Oa,"finiteToString");function Fw(r,e){var t=r[0];for(e*=St;t>=10;t/=10)e++;return e}o(Fw,"getBase10Exponent");function Uw(r,e,t){if(e>TQ)throw _t=!0,t&&(r.precision=t),Error(Wk);return mt(new r(Lw),e,1,!0)}o(Uw,"getLn10");function Ra(r,e,t){if(e>sT)throw Error(Wk);return mt(new r(Vw),e,t,!0)}o(Ra,"getPi");function Qk(r){var e=r.length-1,t=e*St+1;if(e=r[e],e){for(;e%10==0;e/=10)t--;for(e=r[0];e>=10;e/=10)t++}return t}o(Qk,"getPrecision");function ku(r){for(var e="";r--;)e+="0";return e}o(ku,"getZeroString");function Zk(r,e,t,n){var s,i=new r(1),a=Math.ceil(n/St+4);for(_t=!1;;){if(t%2&&(i=i.times(e),$k(i.d,a)&&(s=!0)),t=os(t/2),t===0){t=i.d.length-1,s&&i.d[t]===0&&++i.d[t];break}e=e.times(e),$k(e.d,a)}return _t=!0,i}o(Zk,"intPow");function Kk(r){return r.d[r.d.length-1]&1}o(Kk,"isOdd");function e4(r,e,t){for(var n,s,i=new r(e[0]),a=0;++a<e.length;){if(s=new r(e[a]),!s.s){i=s;break}n=i.cmp(s),(n===t||n===0&&i.s===t)&&(i=s)}return i}o(e4,"maxOrMin");function iT(r,e){var t,n,s,i,a,u,c,f=0,h=0,m=0,g=r.constructor,x=g.rounding,v=g.precision;if(!r.d||!r.d[0]||r.e>17)return new g(r.d?r.d[0]?r.s<0?0:1/0:1:r.s?r.s<0?0:r:NaN);for(e==null?(_t=!1,c=v):c=e,u=new g(.03125);r.e>-2;)r=r.times(u),m+=5;for(n=Math.log(An(2,m))/Math.LN10*2+5|0,c+=n,t=i=a=new g(1),g.precision=c;;){if(i=mt(i.times(r),c,1),t=t.times(++h),u=a.plus(Ir(i,t,c,1)),Kn(u.d).slice(0,c)===Kn(a.d).slice(0,c)){for(s=m;s--;)a=mt(a.times(a),c,1);if(e==null)if(f<3&&fg(a.d,c-n,x,f))g.precision=c+=10,t=i=u=new g(1),h=0,f++;else return mt(a,g.precision=v,x,_t=!0);else return g.precision=v,a}a=u}}o(iT,"naturalExponential");function Lu(r,e){var t,n,s,i,a,u,c,f,h,m,g,x=1,v=10,w=r,S=w.d,A=w.constructor,N=A.rounding,b=A.precision;if(w.s<0||!S||!S[0]||!w.e&&S[0]==1&&S.length==1)return new A(S&&!S[0]?-1/0:w.s!=1?NaN:S?0:w);if(e==null?(_t=!1,h=b):h=e,A.precision=h+=v,t=Kn(S),n=t.charAt(0),Math.abs(i=w.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)w=w.times(r),t=Kn(w.d),n=t.charAt(0),x++;i=w.e,n>1?(w=new A("0."+t),i++):w=new A(n+"."+t.slice(1))}else return f=Uw(A,h+2,b).times(i+""),w=Lu(new A(n+"."+t.slice(1)),h-v).plus(f),A.precision=b,e==null?mt(w,b,N,_t=!0):w;for(m=w,c=a=w=Ir(w.minus(1),w.plus(1),h,1),g=mt(w.times(w),h,1),s=3;;){if(a=mt(a.times(g),h,1),f=c.plus(Ir(a,new A(s),h,1)),Kn(f.d).slice(0,h)===Kn(c.d).slice(0,h))if(c=c.times(2),i!==0&&(c=c.plus(Uw(A,h+2,b).times(i+""))),c=Ir(c,new A(x),h,1),e==null)if(fg(c.d,h-v,N,u))A.precision=h+=v,f=a=w=Ir(m.minus(1),m.plus(1),h,1),g=mt(w.times(w),h,1),s=u=1;else return mt(c,A.precision=b,N,_t=!0);else return A.precision=b,c;c=f,s+=2}}o(Lu,"naturalLogarithm");function t4(r){return String(r.s*r.s/0)}o(t4,"nonFiniteToString");function kw(r,e){var t,n,s;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),n=0;e.charCodeAt(n)===48;n++);for(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(n,s),e){if(s-=n,r.e=t=t-n-1,r.d=[],n=(t+1)%St,t<0&&(n+=St),n<s){for(n&&r.d.push(+e.slice(0,n)),s-=St;n<s;)r.d.push(+e.slice(n,n+=St));e=e.slice(n),n=St-e.length}else n-=s;for(;n--;)e+="0";r.d.push(+e),_t&&(r.e>r.constructor.maxE?(r.d=null,r.e=NaN):r.e<r.constructor.minE&&(r.e=0,r.d=[0]))}else r.e=0,r.d=[0];return r}o(kw,"parseDecimal");function _Q(r,e){var t,n,s,i,a,u,c,f,h;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Yk.test(e))return kw(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(AQ.test(e))t=16,e=e.toLowerCase();else if(EQ.test(e))t=2;else if(CQ.test(e))t=8;else throw Error(Vu+e);for(i=e.search(/p/i),i>0?(c=+e.slice(i+1),e=e.substring(2,i)):e=e.slice(2),i=e.indexOf("."),a=i>=0,n=r.constructor,a&&(e=e.replace(".",""),u=e.length,i=u-i,s=Zk(n,new n(t),i,i*2)),f=Pw(e,t,na),h=f.length-1,i=h;f[i]===0;--i)f.pop();return i<0?new n(r.s*0):(r.e=Fw(f,h),r.d=f,_t=!1,a&&(r=Ir(r,s,u*4)),c&&(r=r.times(Math.abs(c)<54?An(2,c):Sp.pow(2,c))),_t=!0,r)}o(_Q,"parseOther");function BQ(r,e){var t,n=e.d.length;if(n<3)return e.isZero()?e:wp(r,2,e,e);t=1.4*Math.sqrt(n),t=t>16?16:t|0,e=e.times(1/Mw(5,t)),e=wp(r,2,e,e);for(var s,i=new r(5),a=new r(16),u=new r(20);t--;)s=e.times(e),e=e.times(i.plus(s.times(a.times(s).minus(u))));return e}o(BQ,"sine");function wp(r,e,t,n,s){var i,a,u,c,f=1,h=r.precision,m=Math.ceil(h/St);for(_t=!1,c=t.times(t),u=new r(n);;){if(a=Ir(u.times(c),new r(e++*e++),h,1),u=s?n.plus(a):n.minus(a),n=Ir(a.times(c),new r(e++*e++),h,1),a=u.plus(n),a.d[m]!==void 0){for(i=m;a.d[i]===u.d[i]&&i--;);if(i==-1)break}i=u,u=n,n=a,a=i,f++}return _t=!0,a.d.length=m+1,a}o(wp,"taylorSeries");function Mw(r,e){for(var t=r;--e;)t*=r;return t}o(Mw,"tinyPow");function r4(r,e){var t,n=e.s<0,s=Ra(r,r.precision,1),i=s.times(.5);if(e=e.abs(),e.lte(i))return Ro=n?4:1,e;if(t=e.divToInt(s),t.isZero())Ro=n?3:2;else{if(e=e.minus(t.times(s)),e.lte(i))return Ro=Kk(t)?n?2:3:n?4:1,e;Ro=Kk(t)?n?1:4:n?3:2}return e.minus(s).abs()}o(r4,"toLessThanHalfPi");function aT(r,e,t,n){var s,i,a,u,c,f,h,m,g,x=r.constructor,v=t!==void 0;if(v?(Ps(t,1,Uu),n===void 0?n=x.rounding:Ps(n,0,8)):(t=x.precision,n=x.rounding),!r.isFinite())h=t4(r);else{for(h=Oa(r),a=h.indexOf("."),v?(s=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):s=e,a>=0&&(h=h.replace(".",""),g=new x(1),g.e=h.length-a,g.d=Pw(Oa(g),10,s),g.e=g.d.length),m=Pw(h,10,s),i=c=m.length;m[--c]==0;)m.pop();if(!m[0])h=v?"0p+0":"0";else{if(a<0?i--:(r=new x(r),r.d=m,r.e=i,r=Ir(r,g,t,n,0,s),m=r.d,i=r.e,f=Gk),a=m[t],u=s/2,f=f||m[t+1]!==void 0,f=n<4?(a!==void 0||f)&&(n===0||n===(r.s<0?3:2)):a>u||a===u&&(n===4||f||n===6&&m[t-1]&1||n===(r.s<0?8:7)),m.length=t,f)for(;++m[--t]>s-1;)m[t]=0,t||(++i,m.unshift(1));for(c=m.length;!m[c-1];--c);for(a=0,h="";a<c;a++)h+=rT.charAt(m[a]);if(v){if(c>1)if(e==16||e==8){for(a=e==16?4:3,--c;c%a;c++)h+="0";for(m=Pw(h,s,e),c=m.length;!m[c-1];--c);for(a=1,h="1.";a<c;a++)h+=rT.charAt(m[a])}else h=h.charAt(0)+"."+h.slice(1);h=h+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)h="0"+h;h="0."+h}else if(++i>c)for(i-=c;i--;)h+="0";else i<c&&(h=h.slice(0,i)+"."+h.slice(i))}h=(e==16?"0x":e==2?"0b":e==8?"0o":"")+h}return r.s<0?"-"+h:h}o(aT,"toStringBinary");function $k(r,e){if(r.length>e)return r.length=e,!0}o($k,"truncate");function DQ(r){return new this(r).abs()}o(DQ,"abs");function RQ(r){return new this(r).acos()}o(RQ,"acos");function OQ(r){return new this(r).acosh()}o(OQ,"acosh");function PQ(r,e){return new this(r).plus(e)}o(PQ,"add");function kQ(r){return new this(r).asin()}o(kQ,"asin");function LQ(r){return new this(r).asinh()}o(LQ,"asinh");function VQ(r){return new this(r).atan()}o(VQ,"atan");function UQ(r){return new this(r).atanh()}o(UQ,"atanh");function jQ(r,e){r=new this(r),e=new this(e);var t,n=this.precision,s=this.rounding,i=n+4;return!r.s||!e.s?t=new this(NaN):!r.d&&!e.d?(t=Ra(this,i,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?Ra(this,n,s):new this(0),t.s=r.s):!r.d||e.isZero()?(t=Ra(this,i,1).times(.5),t.s=r.s):e.s<0?(this.precision=i,this.rounding=1,t=this.atan(Ir(r,e,i,1)),e=Ra(this,i,1),this.precision=n,this.rounding=s,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(Ir(r,e,i,1)),t}o(jQ,"atan2");function FQ(r){return new this(r).cbrt()}o(FQ,"cbrt");function MQ(r){return mt(r=new this(r),r.e+1,2)}o(MQ,"ceil");function qQ(r,e,t){return new this(r).clamp(e,t)}o(qQ,"clamp");function HQ(r){if(!r||typeof r!="object")throw Error(jw+"Object expected");var e,t,n,s=r.defaults===!0,i=["precision",1,Uu,"rounding",0,8,"toExpNeg",-xp,0,"toExpPos",0,xp,"maxE",0,xp,"minE",-xp,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(t=i[e],s&&(this[t]=nT[t]),(n=r[t])!==void 0)if(os(n)===n&&n>=i[e+1]&&n<=i[e+2])this[t]=n;else throw Error(Vu+t+": "+n);if(t="crypto",s&&(this[t]=nT[t]),(n=r[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(zk);else this[t]=!1;else throw Error(Vu+t+": "+n);return this}o(HQ,"config");function KQ(r){return new this(r).cos()}o(KQ,"cos");function $Q(r){return new this(r).cosh()}o($Q,"cosh");function n4(r){var e,t,n;function s(i){var a,u,c,f=this;if(!(f instanceof s))return new s(i);if(f.constructor=s,Xk(i)){f.s=i.s,_t?!i.d||i.e>s.maxE?(f.e=NaN,f.d=null):i.e<s.minE?(f.e=0,f.d=[0]):(f.e=i.e,f.d=i.d.slice()):(f.e=i.e,f.d=i.d?i.d.slice():i.d);return}if(c=typeof i,c==="number"){if(i===0){f.s=1/i<0?-1:1,f.e=0,f.d=[0];return}if(i<0?(i=-i,f.s=-1):f.s=1,i===~~i&&i<1e7){for(a=0,u=i;u>=10;u/=10)a++;_t?a>s.maxE?(f.e=NaN,f.d=null):a<s.minE?(f.e=0,f.d=[0]):(f.e=a,f.d=[i]):(f.e=a,f.d=[i]);return}if(i*0!==0){i||(f.s=NaN),f.e=NaN,f.d=null;return}return kw(f,i.toString())}if(c==="string")return(u=i.charCodeAt(0))===45?(i=i.slice(1),f.s=-1):(u===43&&(i=i.slice(1)),f.s=1),Yk.test(i)?kw(f,i):_Q(f,i);if(c==="bigint")return i<0?(i=-i,f.s=-1):f.s=1,kw(f,i.toString());throw Error(Vu+i)}if(o(s,"Decimal"),s.prototype=Oe,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=HQ,s.clone=n4,s.isDecimal=Xk,s.abs=DQ,s.acos=RQ,s.acosh=OQ,s.add=PQ,s.asin=kQ,s.asinh=LQ,s.atan=VQ,s.atanh=UQ,s.atan2=jQ,s.cbrt=FQ,s.ceil=MQ,s.clamp=qQ,s.cos=KQ,s.cosh=$Q,s.div=XQ,s.exp=GQ,s.floor=WQ,s.hypot=zQ,s.ln=JQ,s.log=YQ,s.log10=ZQ,s.log2=QQ,s.max=eZ,s.min=tZ,s.mod=rZ,s.mul=nZ,s.pow=sZ,s.random=iZ,s.round=aZ,s.sign=oZ,s.sin=uZ,s.sinh=cZ,s.sqrt=lZ,s.sub=fZ,s.sum=hZ,s.tan=pZ,s.tanh=dZ,s.trunc=mZ,r===void 0&&(r={}),r&&r.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)r.hasOwnProperty(t=n[e++])||(r[t]=this[t]);return s.config(r),s}o(n4,"clone");function XQ(r,e){return new this(r).div(e)}o(XQ,"div");function GQ(r){return new this(r).exp()}o(GQ,"exp");function WQ(r){return mt(r=new this(r),r.e+1,3)}o(WQ,"floor");function zQ(){var r,e,t=new this(0);for(_t=!1,r=0;r<arguments.length;)if(e=new this(arguments[r++]),e.d)t.d&&(t=t.plus(e.times(e)));else{if(e.s)return _t=!0,new this(1/0);t=e}return _t=!0,t.sqrt()}o(zQ,"hypot");function Xk(r){return r instanceof Sp||r&&r.toStringTag===Jk||!1}o(Xk,"isDecimalInstance");function JQ(r){return new this(r).ln()}o(JQ,"ln");function YQ(r,e){return new this(r).log(e)}o(YQ,"log");function QQ(r){return new this(r).log(2)}o(QQ,"log2");function ZQ(r){return new this(r).log(10)}o(ZQ,"log10");function eZ(){return e4(this,arguments,-1)}o(eZ,"max");function tZ(){return e4(this,arguments,1)}o(tZ,"min");function rZ(r,e){return new this(r).mod(e)}o(rZ,"mod");function nZ(r,e){return new this(r).mul(e)}o(nZ,"mul");function sZ(r,e){return new this(r).pow(e)}o(sZ,"pow");function iZ(r){var e,t,n,s,i=0,a=new this(1),u=[];if(r===void 0?r=this.precision:Ps(r,1,Uu),n=Math.ceil(r/St),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));i<n;)s=e[i],s>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:u[i++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);i<n;)s=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((e[i+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,i):(u.push(s%1e7),i+=4);i=n/4}else throw Error(zk);else for(;i<n;)u[i++]=Math.random()*1e7|0;for(n=u[--i],r%=St,n&&r&&(s=An(10,St-r),u[i]=(n/s|0)*s);u[i]===0;i--)u.pop();if(i<0)t=0,u=[0];else{for(t=-1;u[0]===0;t-=St)u.shift();for(n=1,s=u[0];s>=10;s/=10)n++;n<St&&(t-=St-n)}return a.e=t,a.d=u,a}o(iZ,"random");function aZ(r){return mt(r=new this(r),r.e+1,this.rounding)}o(aZ,"round");function oZ(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}o(oZ,"sign");function uZ(r){return new this(r).sin()}o(uZ,"sin");function cZ(r){return new this(r).sinh()}o(cZ,"sinh");function lZ(r){return new this(r).sqrt()}o(lZ,"sqrt");function fZ(r,e){return new this(r).sub(e)}o(fZ,"sub");function hZ(){var r=0,e=arguments,t=new this(e[r]);for(_t=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return _t=!0,mt(t,this.precision,this.rounding)}o(hZ,"sum");function pZ(r){return new this(r).tan()}o(pZ,"tan");function dZ(r){return new this(r).tanh()}o(dZ,"tanh");function mZ(r){return mt(r=new this(r),r.e+1,1)}o(mZ,"trunc");Oe[Symbol.for("nodejs.util.inspect.custom")]=Oe.toString;Oe[Symbol.toStringTag]="Decimal";var Sp=Oe.constructor=n4(nT);Lw=new Sp(Lw);Vw=new Sp(Vw);var oT=class r extends Sp{static{o(this,"Decimal")}static from(e){return new r(e)}static newOrZero(e){return e===void 0?r.from(0):r.from(e)}static newOrUndefined(e){if(e!==void 0)return r.from(e)}};var uT=class{static{o(this,"MemoryCacheAdapter")}cache=new Map;async get(e){return Promise.resolve(this.cache.get(e)??null)}has(e){return Promise.resolve(this.cache.has(e))}set(e,t){return this.cache.set(e,t),Promise.resolve(!0)}};var hI=Wr(require("fs"),1),w8=Wr(require("path"),1),Zl=Wr(require("crypto"),1),ef=Wr(x8(),1),Tg=require("@nfets/core/domain/errors/nfets-error"),Vo=require("@nfets/core/shared/either"),wS=require("@nfets/core/shared/left-from-error"),S8=require("@nfets/core/infrastructure/repositories/null-cache-adapter"),b8=require("@nfets/core/domain/entities/signer/algo");var pI=class{static{o(this,"NativeCertificateRepository")}httpClient;cache;constructor(e,t=new S8.NullCacheAdapter){this.httpClient=e,this.cache=t}async read(e){try{let{password:t}=e,n=await this.getPfxBuffer(e);if(n.isLeft())return n;let s=ef.default.asn1.fromDer(n.value.toString("binary")),i=ef.default.pkcs12.pkcs12FromAsn1(s,t),{certBag:a,pkcs8ShroudedKeyBag:u}=ef.default.pki.oids,c=i.getBags({bagType:a}),f=i.getBags({bagType:u}),h=c[a];if(!h?.length)return(0,Vo.left)(new Tg.NFeTsError("Cannot read certificate"));let[{cert:m},...g]=h;if(!m)return(0,Vo.left)(new Tg.NFeTsError("Issuer Certificate not found"));let x=f[u]?.[0].key;if(!x)return(0,Vo.left)(new Tg.NFeTsError("Certificate Private Key not found"));let v=g.reduce((b,{cert:E})=>(E&&b.push(new Zl.default.X509Certificate(ef.default.pki.certificateToPem(E))),b),[]),w=ef.default.pki.privateKeyToPem(x),S=ef.default.pki.certificateToPem(m),A=Zl.default.createPrivateKey(w),N=new Zl.default.X509Certificate(S);return(0,Vo.right)({ca:v,password:t,privateKey:A,certificate:N})}catch(t){return(0,wS.leftFromError)(t)}}async sign(e,t,n=b8.SignatureAlgorithm.SHA1){try{let i=Zl.default.sign(n,Buffer.from(e),{key:t,padding:Zl.default.constants.RSA_PKCS1_PADDING}).toString("base64");return await Promise.resolve((0,Vo.right)(i))}catch(s){return Promise.resolve((0,wS.leftFromError)(s))}}getStringCertificate(e){return e.raw.toString("base64")}getStringPrivateKey(e){try{return e.export({type:"pkcs8",format:"pem"}).toString()}catch{throw new Tg.NFeTsError("Cannot extract private key")}}async getPfxBuffer(e){let{pfxPathOrBase64:t,password:n}=e,s=this.getCacheKey(t,n),i=await this.cache.get(s);if(i)return(0,Vo.right)(i);if(w8.default.isAbsolute(t)||hI.default.existsSync(t))return this.hitBufferOnCache(s,hI.default.readFileSync(t));if(this.isValidRemoteUrl(t))try{let a=await this.httpClient.get(t,{responseType:"arraybuffer"});return await this.hitBufferOnCache(s,Buffer.from(a.data))}catch(a){return(0,wS.leftFromError)(a)}return this.hitBufferOnCache(s,Buffer.from(t,"base64"))}getCacheKey(e,t){return Zl.default.createHash("sha256").update(`${e}.${t}`).digest("hex")}async hitBufferOnCache(e,t){return await this.cache.set(e,t),(0,Vo.right)(t)}isValidRemoteUrl(e){try{return new URL(e),!0}catch{return!1}}};var dI=class{static{o(this,"NullCacheAdapter")}async get(e){return Promise.resolve(null)}has(e){return Promise.resolve(!1)}set(e,t){return Promise.resolve(!0)}};var B9=Wr(require("path"),1),D9=require("crypto"),mD=require("https"),R9=Wr(_9(),1),O9=require("@nfets/core/shared/either"),P9=require("@nfets/core/shared/left-from-error");var gD=class{static{o(this,"SoapRemoteTransmissionRepository")}toolkit;certificateRepository;constructor(e,t){this.toolkit=e,this.certificateRepository=t}setCertificate(e){return this.certificate=e,this}get httpsAgent(){let e={rejectUnauthorized:!1,secureOptions:D9.constants.SSL_OP_LEGACY_SERVER_CONNECT};if(!this.certificate)return new mD.Agent({...e});let{ca:t,password:n,certificate:s,privateKey:i}=this.certificate;return new mD.Agent({passphrase:n,cert:s.toString(),ca:t.map(a=>a.toString()),key:this.certificateRepository.getStringPrivateKey(i),...e})}get defaultSoapHeaders(){return{"Content-Type":"application/soap+xml; charset=utf-8"}}async send(e){try{let t=this.httpsAgent,n=await(0,R9.createClientAsync)(`${e.url}?wsdl`,{attributesKey:"$",wsdl_options:{httpsAgent:t}});e.payload.$={xmlns:n.wsdl.definitions.$targetNamespace,...e.payload.$};let s=await this.toolkit.build(e.payload,{headless:!0,renderOpts:{pretty:!1},rootName:e.root}),i=this.toolkit.getFirstNode(s)??"",a=B9.default.dirname(e.xsd),u=e.xsd,c=await this.toolkit.validate(i,a,u);if(c.isLeft())return c;let[f]=await n[`${e.method}Async`]({_xml:s},{httpsAgent:t});return(0,O9.right)(f)}catch(t){return(0,P9.leftFromError)(t)}}};var k9=Wr(require("path"),1),Cpe=require(k9.default.join(process.env.NFETS_ADDONS_DIR??"","xml_validator.node")),L9=Cpe;var GK=Wr(require("fs"),1),WK=Wr(require("path"),1),zK=Wr(require("crypto"),1),Sge=Wr(s7(),1);var i7="application/xml";var jt;(function(r){r[r.None=0]="None",r[r.Element=1]="Element",r[r.Attribute=2]="Attribute",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.EntityReference=5]="EntityReference",r[r.Entity=6]="Entity",r[r.ProcessingInstruction=7]="ProcessingInstruction",r[r.Comment=8]="Comment",r[r.Document=9]="Document",r[r.DocumentType=10]="DocumentType",r[r.DocumentFragment=11]="DocumentFragment",r[r.Notation=12]="Notation",r[r.Whitespace=13]="Whitespace",r[r.SignificantWhitespace=14]="SignificantWhitespace",r[r.EndElement=15]="EndElement",r[r.EndEntity=16]="EndEntity",r[r.XmlDeclaration=17]="XmlDeclaration"})(jt||(jt={}));function Npe(r,e){let t=r.ownerDocument==null?r:r.ownerDocument,n=document.createNSResolver(r.ownerDocument==null?r.documentElement:r.ownerDocument.documentElement),s=t.evaluate(e,r,n,XPathResult.ANY_TYPE,null),i=[],a;for(;a=s.iterateNext();)i.push(a);return i}o(Npe,"SelectNodesEx");function Tpe(r,e){let t=yd("xpath").select;return t(e,r)}o(Tpe,"SelectNodesNode");var a7=typeof self<"u"?Npe:Tpe;function Mi(r){r=r.replace(/\r\n/g,`
|
|
91
|
+
`).replace(/\r/g,`
|
|
92
|
+
`);let e;return typeof DOMParser<"u"?e=DOMParser:e=yd("DOMParser"),new e().parseFromString(r,i7)}o(Mi,"Parse");function ao(r){let e;return typeof XMLSerializer<"u"?e=XMLSerializer:e=yd("XMLSerializer"),new e().serializeToString(r)}o(ao,"Stringify");function hE(r,e){let t=a7(r,e);return t&&t.length>0?t[0]:null}o(hE,"SelectSingleNode");function o7(r,e){return r&&r.nodeType===e}o(o7,"isNodeType");function hi(r){return o7(r,jt.Element)}o(hi,"isElement");function gf(r){return o7(r,jt.Document)}o(gf,"isDocument");var u7=new Map;function c7(r){for(let e in r)u7.set(e,r[e])}o(c7,"setNodeDependencies");function yd(r){let e=u7.get(r);if(!e)throw new Error(`Node dependency not found: ${r}. Please use 'setNodeDependencies' to register it.`);return e}o(yd,"getNodeDependency");var Ev="element",Av="attribute",pE="content";var Ipe=1e9;function TD(r,...e){let t=r;for(let n=0;n<e.length;n++){let s=e[n];for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=s[i])}return t}o(TD,"assign");function Ft(r){return e=>{let t=e;t.localName=r.localName||t.name,t.namespaceURI=r.namespaceURI||t.namespaceURI||null,t.prefix=r.prefix||t.prefix||null,t.parser=r.parser||t.parser,t.target!==t&&(t.items=TD({},t.items)),t.target=e}}o(Ft,"XmlElement");function Gt(r={}){return(e,t)=>{let n=e.constructor,s=t;n.items||(n.items={}),n.target!==n&&(n.items=TD({},n.items)),n.target=e;let i;r.parser?i={parser:r.parser,required:r.required||!1,maxOccurs:r.maxOccurs||Ipe,minOccurs:r.minOccurs===void 0?0:r.minOccurs,noRoot:r.noRoot||!1}:i={namespaceURI:r.namespaceURI||null,required:r.required||!1,prefix:r.prefix||null,defaultValue:r.defaultValue,converter:r.converter,noRoot:r.noRoot||!1},r.localName=r.localName||r.parser&&r.parser.localName||s;let a=n.items,u=r.parser&&r.parser.namespaceURI;a[s]={...i,namespaceURI:r.namespaceURI||u||null,prefix:r.prefix||r.parser&&r.parser.prefix||null,localName:r.localName,type:Ev},f7(e,s,r)}}o(Gt,"XmlChildElement");function kr(r={required:!1,namespaceURI:null}){return(e,t)=>{let n=e.constructor,s=t;r.localName||(r.localName=t),n.items||(n.items={}),n.target!==n&&(n.items=TD({},n.items)),n.target=e;let i=n.items;i[t]=r,i[t].type=Av,f7(e,s,r)}}o(kr,"XmlAttribute");function f7(r,e,t){let n=`_${e}`,s={set:o(function(i){this[n]!==i&&(this.element=null,this[n]=i)},"set"),get:o(function(){if(this[n]===void 0){let i=t.defaultValue;t.parser&&(i=new t.parser,i.localName=t.localName),this[n]=i}return this[n]},"get")};Object.defineProperty(r,n,{writable:!0,enumerable:!1}),Object.defineProperty(r,e,s)}o(f7,"defineProperty");var Ec=class r{static{o(this,"Collection")}constructor(e){this.items=[],e&&(this.items=e)}get Count(){return this.items.length}Item(e){return this.items[e]||null}Add(e){this.items.push(e)}Pop(){return this.items.pop()}RemoveAt(e){this.items=this.items.filter((t,n)=>n!==e)}Clear(){this.items=[]}GetIterator(){return this.items}ForEach(e){this.GetIterator().forEach(e)}Map(e){return new r(this.GetIterator().map(e))}Filter(e){return new r(this.GetIterator().filter(e))}Sort(e){return new r(this.GetIterator().sort(e))}Every(e){return this.GetIterator().every(e)}Some(e){return this.GetIterator().some(e)}IsEmpty(){return this.Count===0}};function _pe(r,...e){let t=r.replace(/%([1-9]\d*)/g,(n,s)=>{let i=parseInt(s,10)-1;return e[i]!==void 0?e[i]:""});return t=t.replace(/%%/g,"%"),t}o(_pe,"printf");function Bpe(r,e){let t=r+"";for(;t.length<e;)t="0"+t;return t}o(Bpe,"padNum");var Me=class{static{o(this,"XmlError")}constructor(e,...t){this.prefix="XMLJS",this.code=e,this.name=this.constructor.name;let n=_pe(mn[e],...t);this.message=`${this.prefix}${Bpe(e,4)}: ${n}`,this.stack=new Error(this.message).stack}},Te;(function(r){r[r.NONE=0]="NONE",r[r.NULL_REFERENCE=1]="NULL_REFERENCE",r[r.NULL_PARAM=2]="NULL_PARAM",r[r.DECORATOR_NULL_PARAM=3]="DECORATOR_NULL_PARAM",r[r.COLLECTION_LIMIT=4]="COLLECTION_LIMIT",r[r.METHOD_NOT_IMPLEMENTED=5]="METHOD_NOT_IMPLEMENTED",r[r.METHOD_NOT_SUPPORTED=6]="METHOD_NOT_SUPPORTED",r[r.PARAM_REQUIRED=7]="PARAM_REQUIRED",r[r.CONVERTER_UNSUPPORTED=8]="CONVERTER_UNSUPPORTED",r[r.ELEMENT_MALFORMED=9]="ELEMENT_MALFORMED",r[r.ELEMENT_MISSING=10]="ELEMENT_MISSING",r[r.ATTRIBUTE_MISSING=11]="ATTRIBUTE_MISSING",r[r.CONTENT_MISSING=12]="CONTENT_MISSING",r[r.CRYPTOGRAPHIC=13]="CRYPTOGRAPHIC",r[r.CRYPTOGRAPHIC_NO_MODULE=14]="CRYPTOGRAPHIC_NO_MODULE",r[r.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM=15]="CRYPTOGRAPHIC_UNKNOWN_TRANSFORM",r[r.ALGORITHM_NOT_SUPPORTED=16]="ALGORITHM_NOT_SUPPORTED",r[r.ALGORITHM_WRONG_NAME=17]="ALGORITHM_WRONG_NAME",r[r.XML_EXCEPTION=18]="XML_EXCEPTION",r[r.KEY_INFO_CLAUSE_NOT_SUPPORTED=19]="KEY_INFO_CLAUSE_NOT_SUPPORTED"})(Te||(Te={}));var mn={};mn[Te.NONE]="No description";mn[Te.NULL_REFERENCE]="Null reference";mn[Te.NULL_PARAM]="'%1' has empty '%2' object";mn[Te.DECORATOR_NULL_PARAM]="Decorator '%1' has empty '%2' parameter";mn[Te.COLLECTION_LIMIT]="Collection of '%1' in element '%2' has wrong amount of items";mn[Te.METHOD_NOT_IMPLEMENTED]="Method is not implemented";mn[Te.METHOD_NOT_SUPPORTED]="Method is not supported";mn[Te.PARAM_REQUIRED]="Required parameter is missing '%1'";mn[Te.CONVERTER_UNSUPPORTED]="Converter is not supported";mn[Te.ELEMENT_MALFORMED]="Malformed element '%1'";mn[Te.ELEMENT_MISSING]="Element '%1' is missing in '%2'";mn[Te.ATTRIBUTE_MISSING]="Attribute '%1' is missing in '%2'";mn[Te.CONTENT_MISSING]="Content is missing in '%1'";mn[Te.CRYPTOGRAPHIC]="Cryptographic error: %1";mn[Te.CRYPTOGRAPHIC_NO_MODULE]="WebCrypto module is not found";mn[Te.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM]="Unknown transform %1";mn[Te.ALGORITHM_NOT_SUPPORTED]="Algorithm is not supported '%1'";mn[Te.ALGORITHM_WRONG_NAME]="Algorithm wrong name in use '%1'";mn[Te.XML_EXCEPTION]="XML exception: %1";mn[Te.KEY_INFO_CLAUSE_NOT_SUPPORTED]="KeyInfoClause type '%1' is not supported";var br=class{static{o(this,"Convert")}static ToString(e,t="utf8"){let n=new Uint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);default:throw new Me(Te.CONVERTER_UNSUPPORTED)}}static FromString(e,t="utf8"){switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);default:throw new Me(Te.CONVERTER_UNSUPPORTED)}}static ToBase64(e){if(typeof btoa<"u"){let t=this.ToString(e,"binary");return btoa(t)}else{if(typeof Buffer<"u")return Buffer.from(e).toString("base64");throw new Me(Te.CONVERTER_UNSUPPORTED)}}static FromBase64(e){if(e=e.replace(/\n/g,"").replace(/\r/g,"").replace(/\t/g,"").replace(/\s/g,""),typeof atob<"u")return this.FromBinary(atob(e));if(typeof Buffer<"u")return new Uint8Array(Buffer.from(e,"base64"));throw new Me(Te.CONVERTER_UNSUPPORTED)}static FromBase64Url(e){return this.FromBase64(this.Base64Padding(e.replace(/-/g,"+").replace(/_/g,"/")))}static ToBase64Url(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}static FromUtf8String(e){let t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}static ToUtf8String(e){let t=String.fromCharCode.apply(null,e);return decodeURIComponent(escape(t))}static FromBinary(e){let t=e.length,n=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);return n}static ToBinary(e){let t="";for(let n=0;n<e.length;n++)t=t+String.fromCharCode(e[n]);return t}static ToHex(e){let n=[];for(let s=0;s<e.length;s++){let i=e[s].toString(16);n.push(i.length===1?"0"+i:i)}return n.join("")}static FromHex(e){let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n=n+2){let s=e.slice(n,n+2);t[n/2]=parseInt(s,16)}return t}static ToDateTime(e){return new Date(e)}static FromDateTime(e){return e.toISOString()}static Base64Padding(e){let t=4-e.length%4;if(t<4)for(let n=0;n<t;n++)e+="=";return e}};var qi={get:o(r=>{if(r)return br.ToBase64(r)},"get"),set:o(r=>br.FromBase64(r),"set")},Cv={get:o(r=>r?r.toString():"0","get"),set:o(r=>Number(r),"set")};var Dpe="xml_root",Xs=class r{static{o(this,"XmlObject")}static LoadXml(e){let t=new this;return t.LoadXml(e),t}static GetElement(e,t,n=!0){let s=e.getElementsByTagName(t);if(n&&s.length===0)throw new Me(Te.ELEMENT_MISSING,t,e.localName);return s[0]||null}static GetAttribute(e,t,n,s=!0){if(e.hasAttribute(t))return e.getAttribute(t);if(s)throw new Me(Te.ATTRIBUTE_MISSING,t,e.localName);return n}static GetElementById(e,t){if(e==null||t==null)return null;let n=null;return gf(e)&&(n=e.getElementById(t)),n==null&&(n=hE(e,`//*[@*[local-name()='Id']='${t}']`),n==null&&(n=hE(e,`//*[@*[local-name()='ID']='${t}']`),n==null&&(n=hE(e,`//*[@*[local-name()='id']='${t}']`)))),n}static CreateDocument(e=Dpe,t=null,n=null){if(n&&!t)throw new Me(Te.PARAM_REQUIRED,"namespaceUri",`Prefix '${n}' requires namespaceUri`);let s="",i="",a="";n&&(s=n+":",i=":"+n),t&&(a=` xmlns${i}="${t}"`);let u=`${s}${e}`;return Mi(`<${u}${a}></${u}>`)}static GetChildren(e,t,n){e=gf(e)?e.documentElement:e;let s=[];for(let i=0;i<e.childNodes.length;i++){let a=e.childNodes[i];hi(a)&&a.localName===t&&(a.namespaceURI===n||!n)&&s.push(a)}return s}static GetFirstChild(e,t,n){e=gf(e)?e.documentElement:e;for(let s=0;s<e.childNodes.length;s++){let i=e.childNodes[s];if(hi(i)&&i.localName===t&&(i.namespaceURI===n||!n))return i}return null}static GetChild(e,t,n,s=!0){for(let i=0;i<e.childNodes.length;i++){let a=e.childNodes[i];if(hi(a)&&a.localName===t&&(a.namespaceURI===n||!n))return a}if(s)throw new Me(Te.ELEMENT_MISSING,t,e.localName);return null}constructor(e={}){if(this.prefix=this.GetStatic().prefix||null,this.localName=this.GetStatic().localName,this.namespaceURI=this.GetStatic().namespaceURI,e)for(let[t,n]of Object.entries(e))n!==void 0&&(this[t]=n)}get Element(){return this.element}get Prefix(){return this.prefix}set Prefix(e){this.prefix=e}get LocalName(){return this.localName||""}get NamespaceURI(){return this.namespaceURI||null}HasChanged(){let e=this.GetStatic();if(e.items)for(let t in e.items){if(!Object.prototype.hasOwnProperty.call(e.items,t))continue;let n=e.items[t],s=this[t];if(n.parser&&s&&s.HasChanged())return!0}return this.element===null}GetXml(e){if(!(e||this.HasChanged()))return this.element||null;let t=this,n=this.CreateDocument(),s=this.CreateElement(),i=this.GetStatic(),a=this.localName||"";if(i.items)for(let u in i.items){if(!Object.prototype.hasOwnProperty.call(i.items,u))continue;let c=t[u],f=i.items[u];switch(f.type){case pE:{let h=f,m=h.converter?h.converter.get(c):c;if(h.required&&m==null)throw new Me(Te.CONTENT_MISSING,a);(h.defaultValue!==c||h.required)&&(s.textContent=m);break}case Av:{let h=f,m=h.converter?h.converter.get(c):c;if(h.required&&m==null)throw new Me(Te.ATTRIBUTE_MISSING,h.localName,a);(h.defaultValue!==c||h.required)&&(h.namespaceURI?s.setAttributeNS(h.namespaceURI,h.localName||"",m):s.setAttribute(h.localName||"",m));break}case Ev:{let h=f,m=null;if(h.parser){if(h.required&&!c||h.minOccurs&&!c.Count){let g=c?.localName||h.localName;throw new Me(Te.ELEMENT_MISSING,g,a)}c&&(m=c.GetXml(c.element===void 0&&(h.required||c.Count)))}else{let g=h.converter?h.converter.get(c):c;if(h.required&&g===void 0)throw new Me(Te.ELEMENT_MISSING,h.localName,a);if(c!==h.defaultValue||h.required)if(h.namespaceURI?m=n.createElementNS(h.namespaceURI,`${h.prefix?h.prefix+":":""}${h.localName}`):m=n.createElement(`${h.prefix?h.prefix+":":""}${h.localName}`),Array.isArray(g))for(let x of g){let v=x instanceof r?x.GetXml(!0):x;v!==null&&m&&m.appendChild(v)}else if(g instanceof r){let x=g.GetXml(!0);x&&m&&m.appendChild(x)}else m&&(m.textContent=g)}if(m)if(h.noRoot){let g=[];for(let w=0;w<m.childNodes.length;w++){let S=m.childNodes.item(w);hi(S)&&g.push(S)}let x=h.minOccurs||0,v=h.maxOccurs||1/0;if(g.length<x||g.length>v)throw new Me(Te.COLLECTION_LIMIT,c.localName,i.localName);g.forEach(w=>s.appendChild(w.cloneNode(!0)))}else{if(m.childNodes.length<(h.minOccurs||0)||m.childNodes.length>(h.maxOccurs||1/0))throw new Me(Te.COLLECTION_LIMIT,c.localName,i.localName);s.appendChild(m)}break}}}return this.OnGetXml(s),this.element=s,s}LoadXml(e){let t,n=this;if(typeof e=="string"?t=Mi(e).documentElement:t=e,!t)throw new Me(Te.PARAM_REQUIRED,"element");let s=this.GetStatic(),i=this.localName||"";if(!(t.localName===i&&t.namespaceURI==this.NamespaceURI))throw new Me(Te.ELEMENT_MALFORMED,i);if(s.items)for(let a in s.items){if(!Object.prototype.hasOwnProperty.call(s.items,a))continue;let u=s.items[a];switch(u.type){case pE:{let c=u;if(c.required&&!t.textContent)throw new Me(Te.CONTENT_MISSING,i);if(!t.textContent)n[a]=c.defaultValue;else{let f=c.converter?c.converter.set(t.textContent):t.textContent;n[a]=f}break}case Av:{let c=u,f,h;if(!c.localName)throw new Me(Te.PARAM_REQUIRED,"localName");if(c.namespaceURI?(f=t.hasAttributeNS.bind(t,c.namespaceURI,c.localName),h=t.getAttributeNS.bind(t,c.namespaceURI,c.localName)):(f=t.hasAttribute.bind(t,c.localName),h=t.getAttribute.bind(t,c.localName)),c.required&&!f())throw new Me(Te.ATTRIBUTE_MISSING,c.localName,i);if(!f())n[a]=c.defaultValue;else{let m=h(),g=c.converter&&m?c.converter.set(m):m;n[a]=g}break}case Ev:{let c=u;if(c.noRoot){if(!c.parser)throw new Me(Te.XML_EXCEPTION,`Schema for '${c.localName}' with flag noRoot must have 'parser'`);let h=new c.parser;if(!(h instanceof xd))throw new Me(Te.XML_EXCEPTION,`Schema for '${c.localName}' with flag noRoot must have 'parser' like instance of XmlCollection`);h.OnLoadXml(t),delete h.element;let m=c.minOccurs||0,g=c.maxOccurs||1/0;if(h.Count<m||h.Count>g)throw new Me(Te.COLLECTION_LIMIT,c.parser.localName,i);n[a]=h;continue}let f=null;for(let h=0;h<t.childNodes.length;h++){let m=t.childNodes.item(h);if(!hi(m))continue;let g=m;if(g.localName===c.localName&&g.namespaceURI==c.namespaceURI){f=g;break}}if(c.required&&!f)throw new Me(Te.ELEMENT_MISSING,c.parser?c.parser.localName:c.localName,i);if(c.parser){if(f){let h=new c.parser;h.localName=c.localName,h.namespaceURI=c.namespaceURI,n[a]=h,h.LoadXml(f)}}else if(!f)n[a]=c.defaultValue;else{let h=f.textContent||"",m=c.converter?c.converter.set(h):h;n[a]=m}break}}}this.OnLoadXml(t),this.prefix=t.prefix||"",this.element=t}toString(){let e=this.GetXml();return e?ao(e):""}GetElement(e,t=!0){if(!this.element)throw new Me(Te.NULL_PARAM,this.localName);return r.GetElement(this.element,e,t)}GetChildren(e,t){if(!this.element)throw new Me(Te.NULL_PARAM,this.localName);return r.GetChildren(this.element,e,t||this.NamespaceURI||void 0)}GetChild(e,t=!0){if(!this.element)throw new Me(Te.NULL_PARAM,this.localName);return r.GetChild(this.element,e,this.NamespaceURI||void 0,t)}GetFirstChild(e,t){if(!this.element)throw new Me(Te.NULL_PARAM,this.localName);return r.GetFirstChild(this.element,e,t)}GetAttribute(e,t,n=!0){if(!this.element)throw new Me(Te.NULL_PARAM,this.localName);return r.GetAttribute(this.element,e,t,n)}IsEmpty(){return this.Element===void 0}OnLoadXml(e){}GetStatic(){return this.constructor}GetPrefix(){return this.Prefix?this.prefix+":":""}OnGetXml(e){}CreateElement(e,t,n=null,s=null){if(!e){let u=this.CreateDocument();if(u)e=u;else throw new Me(Te.XML_EXCEPTION,"Document not created")}t=t||this.localName,n=n||this.NamespaceURI,s=s||this.prefix;let i=(s?`${s}:`:"")+t,a=n&&e?e.createElementNS(n,i):e?.createElement(i);return e&&a&&e.importNode(a,!0),a}CreateDocument(){return r.CreateDocument(this.localName,this.NamespaceURI,this.Prefix)}};var xd=class extends Xs{static{o(this,"XmlCollection")}constructor(){super(...arguments),this.MaxOccurs=Number.MAX_VALUE,this.MinOccurs=0,this.items=[]}HasChanged(){let e=super.HasChanged(),t=this.Some(n=>n.HasChanged());return e||t}get Count(){return this.items.length}Item(e){return this.items[e]||null}Add(e){this.items.push(e),this.element=null}Pop(){return this.element=null,this.items.pop()}RemoveAt(e){this.items=this.items.filter((t,n)=>n!==e),this.element=null}Clear(){this.items=[],this.element=null}GetIterator(){return this.items}ForEach(e){this.GetIterator().forEach(e)}Map(e){return new Ec(this.GetIterator().map(e))}Filter(e){return new Ec(this.GetIterator().filter(e))}Sort(e){return new Ec(this.GetIterator().sort(e))}Every(e){return this.GetIterator().every(e)}Some(e){return this.GetIterator().some(e)}IsEmpty(){return this.Count===0}OnGetXml(e){for(let t of this.GetIterator()){let n=t.GetXml();n&&e.appendChild(n)}}OnLoadXml(e){let t=this.GetStatic();if(!t.parser)throw new Me(Te.XML_EXCEPTION,`${t.localName} doesn't have required 'parser' in @XmlElement`);for(let n=0;n<e.childNodes.length;n++){let s=e.childNodes.item(n);if(!(hi(s)&&s.localName===t.parser.localName&&s.namespaceURI==t.namespaceURI))continue;let i=s,a=new t.parser;a.LoadXml(i),this.Add(a)}}};var wd=class extends Ec{static{o(this,"NamespaceManager")}Add(e){e.prefix=e.prefix||"",e.namespace=e.namespace||"",super.Add(e)}GetPrefix(e,t=this.Count-1){let n=this.Count-1;e=e||"",t>n&&(t=n);for(let s=t;s>=0;s--){let i=this.items[s];if(i.prefix===e)return i}return null}GetNamespace(e,t=this.Count-1){let n=this.Count-1;e=e||"",t>n&&(t=n);for(let s=t;s>=0;s--){let i=this.items[s];if(i.namespace===e)return i}return null}};var Rpe="[object ArrayBuffer]",dt=class BD{static{o(this,"BufferSourceConverter")}static isArrayBuffer(e){return Object.prototype.toString.call(e)===Rpe}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength||e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e.buffer).slice(e.byteOffset,e.byteOffset+e.byteLength).buffer}static toUint8Array(e){return this.toView(e,Uint8Array)}static toView(e,t){if(e.constructor===t)return e;if(this.isArrayBuffer(e))return new t(e);if(this.isArrayBufferView(e))return new t(e.buffer,e.byteOffset,e.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)}static isArrayBufferView(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)}static isEqual(e,t){let n=BD.toUint8Array(e),s=BD.toUint8Array(t);if(n.length!==s.byteLength)return!1;for(let i=0;i<n.length;i++)if(n[i]!==s[i])return!1;return!0}static concat(...e){let t;Array.isArray(e[0])&&!(e[1]instanceof Function)||Array.isArray(e[0])&&e[1]instanceof Function?t=e[0]:e[e.length-1]instanceof Function?t=e.slice(0,e.length-1):t=e;let n=0;for(let a of t)n+=a.byteLength;let s=new Uint8Array(n),i=0;for(let a of t){let u=this.toUint8Array(a);s.set(u,i),i+=u.length}return e[e.length-1]instanceof Function?this.toView(s,e[e.length-1]):s.buffer}},_D="string",Ope=/^[0-9a-f\s]+$/i,Ppe=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,kpe=/^[a-zA-Z0-9-_]+$/,h7=class{static{o(this,"Utf8Converter")}static fromString(e){let t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n.buffer}static toString(e){let t=dt.toUint8Array(e),n="";for(let i=0;i<t.length;i++)n+=String.fromCharCode(t[i]);return decodeURIComponent(escape(n))}},oo=class{static{o(this,"Utf16Converter")}static toString(e,t=!1){let n=dt.toArrayBuffer(e),s=new DataView(n),i="";for(let a=0;a<n.byteLength;a+=2){let u=s.getUint16(a,t);i+=String.fromCharCode(u)}return i}static fromString(e,t=!1){let n=new ArrayBuffer(e.length*2),s=new DataView(n);for(let i=0;i<e.length;i++)s.setUint16(i*2,e.charCodeAt(i),t);return n}},Et=class Sd{static{o(this,"Convert")}static isHex(e){return typeof e===_D&&Ope.test(e)}static isBase64(e){return typeof e===_D&&Ppe.test(e)}static isBase64Url(e){return typeof e===_D&&kpe.test(e)}static ToString(e,t="utf8"){let n=dt.toUint8Array(e);switch(t.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return oo.toString(n,!0);case"utf16":case"utf16be":return oo.toString(n);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromString(e,t="utf8"){if(!e)return new ArrayBuffer(0);switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);case"utf16le":return oo.fromString(e,!0);case"utf16":case"utf16be":return oo.fromString(e);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToBase64(e){let t=dt.toUint8Array(e);if(typeof btoa<"u"){let n=this.ToString(t,"binary");return btoa(n)}else return Buffer.from(t).toString("base64")}static FromBase64(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!Sd.isBase64(t))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return typeof atob<"u"?this.FromBinary(atob(t)):new Uint8Array(Buffer.from(t,"base64")).buffer}static FromBase64Url(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!Sd.isBase64Url(t))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(t.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(e,t=Sd.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.FromBinary(e);case"utf8":return h7.fromString(e);case"utf16":case"utf16be":return oo.fromString(e);case"utf16le":case"usc2":return oo.fromString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToUtf8String(e,t=Sd.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.ToBinary(e);case"utf8":return h7.toString(e);case"utf16":case"utf16be":return oo.toString(e);case"utf16le":case"usc2":return oo.toString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static FromBinary(e){let t=e.length,n=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);return n.buffer}static ToBinary(e){let t=dt.toUint8Array(e),n="";for(let s=0;s<t.length;s++)n+=String.fromCharCode(t[s]);return n}static ToHex(e){let t=dt.toUint8Array(e),n="",s=t.length;for(let i=0;i<s;i++){let a=t[i];a<16&&(n+="0"),n+=a.toString(16)}return n}static FromHex(e){let t=this.formatString(e);if(!t)return new ArrayBuffer(0);if(!Sd.isHex(t))throw new TypeError("Argument 'hexString' is not HEX encoded");t.length%2&&(t=`0${t}`);let n=new Uint8Array(t.length/2);for(let s=0;s<t.length;s=s+2){let i=t.slice(s,s+2);n[s/2]=parseInt(i,16)}return n.buffer}static ToUtf16String(e,t=!1){return oo.toString(e,t)}static FromUtf16String(e,t=!1){return oo.fromString(e,t)}static Base64Padding(e){let t=4-e.length%4;if(t<4)for(let n=0;n<t;n++)e+="=";return e}static formatString(e){return e?.replace(/[\n\r\t ]/g,"")||""}};Et.DEFAULT_UTF8_ENCODING="utf8";function B(r,e,t){var n;return r instanceof Object&&(n=r[e])!==null&&n!==void 0?n:t}o(B,"getParametersValue");function dE(r,e=0,t=r.byteLength-e,n=!1){let s="";for(let i of new Uint8Array(r,e,t)){let a=i.toString(16).toUpperCase();a.length===1&&(s+="0"),s+=a,n&&(s+=" ")}return s.trim()}o(dE,"bufferToHexCodes");function Wo(r,e){let t=0;if(r.length===1)return r[0];for(let n=r.length-1;n>=0;n--)t+=r[r.length-1-n]*Math.pow(2,e*n);return t}o(Wo,"utilFromBase");function fa(r,e,t=-1){let n=t,s=r,i=0,a=Math.pow(2,e);for(let u=1;u<8;u++){if(r<a){let c;if(n<0)c=new ArrayBuffer(u),i=u;else{if(n<u)return new ArrayBuffer(0);c=new ArrayBuffer(n),i=n}let f=new Uint8Array(c);for(let h=u-1;h>=0;h--){let m=Math.pow(2,h*e);f[i-h-1]=Math.floor(s/m),s-=f[i-h-1]*m}return c}a*=Math.pow(2,e)}return new ArrayBuffer(0)}o(fa,"utilToBase");function vf(...r){let e=0,t=0;for(let i of r)e+=i.byteLength;let n=new ArrayBuffer(e),s=new Uint8Array(n);for(let i of r)s.set(new Uint8Array(i),t),t+=i.byteLength;return n}o(vf,"utilConcatBuf");function mE(...r){let e=0,t=0;for(let i of r)e+=i.length;let n=new ArrayBuffer(e),s=new Uint8Array(n);for(let i of r)s.set(i,t),t+=i.length;return s}o(mE,"utilConcatView");function DD(){let r=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){let u=r[0]===255&&r[1]&128,c=r[0]===0&&(r[1]&128)===0;(u||c)&&this.warnings.push("Needlessly long format")}let e=new ArrayBuffer(this.valueHex.byteLength),t=new Uint8Array(e);for(let u=0;u<this.valueHex.byteLength;u++)t[u]=0;t[0]=r[0]&128;let n=Wo(t,8),s=new ArrayBuffer(this.valueHex.byteLength),i=new Uint8Array(s);for(let u=0;u<this.valueHex.byteLength;u++)i[u]=r[u];return i[0]&=127,Wo(i,8)-n}o(DD,"utilDecodeTC");function d7(r){let e=r<0?r*-1:r,t=128;for(let n=1;n<8;n++){if(e<=t){if(r<0){let a=t-e,u=fa(a,8,n),c=new Uint8Array(u);return c[0]|=128,u}let s=fa(e,8,n),i=new Uint8Array(s);if(i[0]&128){let a=s.slice(0),u=new Uint8Array(a);s=new ArrayBuffer(s.byteLength+1),i=new Uint8Array(s);for(let c=0;c<a.byteLength;c++)i[c+1]=u[c];i[0]=0}return s}t*=Math.pow(2,8)}return new ArrayBuffer(0)}o(d7,"utilEncodeTC");function Ac(r,e){if(r.byteLength!==e.byteLength)return!1;let t=new Uint8Array(r),n=new Uint8Array(e);for(let s=0;s<t.length;s++)if(t[s]!==n[s])return!1;return!0}o(Ac,"isEqualBuffer");function Gs(r,e){let t=r.toString(10);if(e<t.length)return"";let n=e-t.length,s=new Array(n);for(let a=0;a<n;a++)s[a]="0";return s.join("").concat(t)}o(Gs,"padNumber");var m7="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",g7="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=";function gE(r,e=!1,t=!1,n=!1){let s=0,i=0,a=0,u="",c=e?g7:m7;if(n){let f=0;for(let h=0;h<r.length;h++)if(r.charCodeAt(h)!==0){f=h;break}r=r.slice(f)}for(;s<r.length;){let f=r.charCodeAt(s++);s>=r.length&&(i=1);let h=r.charCodeAt(s++);s>=r.length&&(a=1);let m=r.charCodeAt(s++),g=f>>2,x=(f&3)<<4|h>>4,v=(h&15)<<2|m>>6,w=m&63;i===1?v=w=64:a===1&&(w=64),t?v===64?u+=`${c.charAt(g)}${c.charAt(x)}`:w===64?u+=`${c.charAt(g)}${c.charAt(x)}${c.charAt(v)}`:u+=`${c.charAt(g)}${c.charAt(x)}${c.charAt(v)}${c.charAt(w)}`:u+=`${c.charAt(g)}${c.charAt(x)}${c.charAt(v)}${c.charAt(w)}`}return u}o(gE,"toBase64");function bd(r,e=!1,t=!1){let n=e?g7:m7;function s(c){for(let f=0;f<64;f++)if(n.charAt(f)===c)return f;return 64}o(s,"indexOf");function i(c){return c===64?0:c}o(i,"test");let a=0,u="";for(;a<r.length;){let c=s(r.charAt(a++)),f=a>=r.length?0:s(r.charAt(a++)),h=a>=r.length?0:s(r.charAt(a++)),m=a>=r.length?0:s(r.charAt(a++)),g=i(c)<<2|i(f)>>4,x=(i(f)&15)<<4|i(h)>>2,v=(i(h)&3)<<6|i(m);u+=String.fromCharCode(g),h!==64&&(u+=String.fromCharCode(x)),m!==64&&(u+=String.fromCharCode(v))}if(t){let c=u.length,f=-1;for(let h=c-1;h>=0;h--)if(u.charCodeAt(h)!==0){f=h;break}f!==-1?u=u.slice(0,f+1):u=""}return u}o(bd,"fromBase64");function Nv(r){let e="",t=new Uint8Array(r);for(let n of t)e+=String.fromCharCode(n);return e}o(Nv,"arrayBufferToString");function yf(r){let e=r.length,t=new ArrayBuffer(e),n=new Uint8Array(t);for(let s=0;s<e;s++)n[s]=r.charCodeAt(s);return t}o(yf,"stringToArrayBuffer");var Lpe=Math.log(2);function v7(r){let e=Math.log(r)/Lpe,t=Math.floor(e),n=Math.round(e);return t===n?t:n}o(v7,"nearestPowerOf2");function De(r,e){for(let t of e)delete r[t]}o(De,"clearProps");function vE(){if(typeof BigInt>"u")throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}o(vE,"assertBigInt");function kD(r){let e=0,t=0;for(let s=0;s<r.length;s++){let i=r[s];e+=i.byteLength}let n=new Uint8Array(e);for(let s=0;s<r.length;s++){let i=r[s];n.set(new Uint8Array(i),t),t+=i.byteLength}return n.buffer}o(kD,"concat");function zo(r,e,t,n){return e instanceof Uint8Array?e.byteLength?t<0?(r.error="Wrong parameter: inputOffset less than zero",!1):n<0?(r.error="Wrong parameter: inputLength less than zero",!1):e.byteLength-t-n<0?(r.error="End of input reached before message was fully decoded (inconsistent offset and length values)",!1):!0:(r.error="Wrong parameter: inputBuffer has zero length",!1):(r.error="Wrong parameter: inputBuffer must be 'Uint8Array'",!1)}o(zo,"checkBufferParams");var LD=class{static{o(this,"ViewWriter")}constructor(){this.items=[]}write(e){this.items.push(e)}final(){return kD(this.items)}},Tv=[new Uint8Array([1])],x7="0123456789",RD="name",w7="valueHexView",Vpe="isHexOnly",Upe="idBlock",jpe="tagClass",Fpe="tagNumber",Mpe="isConstructed",qpe="fromBER",Hpe="toBER",Kpe="local",Ws="",ha=new ArrayBuffer(0),yE=new Uint8Array(0),_v="EndOfContent",b7="OCTET STRING",E7="BIT STRING";function Jo(r){var e;return e=class extends r{static{o(this,"Some")}get valueHex(){return this.valueHexView.slice().buffer}set valueHex(n){this.valueHexView=new Uint8Array(n)}constructor(...n){var s;super(...n);let i=n[0]||{};this.isHexOnly=(s=i.isHexOnly)!==null&&s!==void 0?s:!1,this.valueHexView=i.valueHex?dt.toUint8Array(i.valueHex):yE}fromBER(n,s,i){let a=n instanceof ArrayBuffer?new Uint8Array(n):n;if(!zo(this,a,s,i))return-1;let u=s+i;return this.valueHexView=a.subarray(s,u),this.valueHexView.length?(this.blockLength=i,u):(this.warnings.push("Zero buffer length"),s)}toBER(n=!1){return this.isHexOnly?n?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.byteLength===this.valueHexView.buffer.byteLength?this.valueHexView.buffer:this.valueHexView.slice().buffer:(this.error="Flag 'isHexOnly' is not set, abort",ha)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:Et.ToHex(this.valueHexView)}}},e.NAME="hexBlock",e}o(Jo,"HexBlock");var xf=class{static{o(this,"LocalBaseBlock")}static blockName(){return this.NAME}get valueBeforeDecode(){return this.valueBeforeDecodeView.slice().buffer}set valueBeforeDecode(e){this.valueBeforeDecodeView=new Uint8Array(e)}constructor({blockLength:e=0,error:t=Ws,warnings:n=[],valueBeforeDecode:s=yE}={}){this.blockLength=e,this.error=t,this.warnings=n,this.valueBeforeDecodeView=dt.toUint8Array(s)}toJSON(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:Et.ToHex(this.valueBeforeDecodeView)}}};xf.NAME="baseBlock";var zs=class extends xf{static{o(this,"ValueBlock")}fromBER(e,t,n){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}toBER(e,t){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}};zs.NAME="valueBlock";var A7=class extends Jo(xf){static{o(this,"LocalIdentificationBlock")}constructor({idBlock:e={}}={}){var t,n,s,i;super(),e?(this.isHexOnly=(t=e.isHexOnly)!==null&&t!==void 0?t:!1,this.valueHexView=e.valueHex?dt.toUint8Array(e.valueHex):yE,this.tagClass=(n=e.tagClass)!==null&&n!==void 0?n:-1,this.tagNumber=(s=e.tagNumber)!==null&&s!==void 0?s:-1,this.isConstructed=(i=e.isConstructed)!==null&&i!==void 0?i:!1):(this.tagClass=-1,this.tagNumber=-1,this.isConstructed=!1)}toBER(e=!1){let t=0;switch(this.tagClass){case 1:t|=0;break;case 2:t|=64;break;case 3:t|=128;break;case 4:t|=192;break;default:return this.error="Unknown tag class",ha}if(this.isConstructed&&(t|=32),this.tagNumber<31&&!this.isHexOnly){let s=new Uint8Array(1);if(!e){let i=this.tagNumber;i&=31,t|=i,s[0]=t}return s.buffer}if(!this.isHexOnly){let s=fa(this.tagNumber,7),i=new Uint8Array(s),a=s.byteLength,u=new Uint8Array(a+1);if(u[0]=t|31,!e){for(let c=0;c<a-1;c++)u[c+1]=i[c]|128;u[a]=i[a-1]}return u.buffer}let n=new Uint8Array(this.valueHexView.byteLength+1);if(n[0]=t|31,!e){let s=this.valueHexView;for(let i=0;i<s.length-1;i++)n[i+1]=s[i]|128;n[this.valueHexView.byteLength]=s[s.length-1]}return n.buffer}fromBER(e,t,n){let s=dt.toUint8Array(e);if(!zo(this,s,t,n))return-1;let i=s.subarray(t,t+n);if(i.length===0)return this.error="Zero buffer length",-1;switch(i[0]&192){case 0:this.tagClass=1;break;case 64:this.tagClass=2;break;case 128:this.tagClass=3;break;case 192:this.tagClass=4;break;default:return this.error="Unknown tag class",-1}this.isConstructed=(i[0]&32)===32,this.isHexOnly=!1;let u=i[0]&31;if(u!==31)this.tagNumber=u,this.blockLength=1;else{let c=1,f=this.valueHexView=new Uint8Array(255),h=255;for(;i[c]&128;){if(f[c-1]=i[c]&127,c++,c>=i.length)return this.error="End of input reached before message was fully decoded",-1;if(c===h){h+=255;let g=new Uint8Array(h);for(let x=0;x<f.length;x++)g[x]=f[x];f=this.valueHexView=new Uint8Array(h)}}this.blockLength=c+1,f[c-1]=i[c]&127;let m=new Uint8Array(c);for(let g=0;g<c;g++)m[g]=f[g];f=this.valueHexView=new Uint8Array(c),f.set(m),this.blockLength<=9?this.tagNumber=Wo(f,7):(this.isHexOnly=!0,this.warnings.push("Tag too long, represented as hex-coded"))}if(this.tagClass===1&&this.isConstructed)switch(this.tagNumber){case 1:case 2:case 5:case 6:case 9:case 13:case 14:case 23:case 24:case 31:case 32:case 33:case 34:return this.error="Constructed encoding used for primitive type",-1}return t+this.blockLength}toJSON(){return{...super.toJSON(),tagClass:this.tagClass,tagNumber:this.tagNumber,isConstructed:this.isConstructed}}};A7.NAME="identificationBlock";var C7=class extends xf{static{o(this,"LocalLengthBlock")}constructor({lenBlock:e={}}={}){var t,n,s;super(),this.isIndefiniteForm=(t=e.isIndefiniteForm)!==null&&t!==void 0?t:!1,this.longFormUsed=(n=e.longFormUsed)!==null&&n!==void 0?n:!1,this.length=(s=e.length)!==null&&s!==void 0?s:0}fromBER(e,t,n){let s=dt.toUint8Array(e);if(!zo(this,s,t,n))return-1;let i=s.subarray(t,t+n);if(i.length===0)return this.error="Zero buffer length",-1;if(i[0]===255)return this.error="Length block 0xFF is reserved by standard",-1;if(this.isIndefiniteForm=i[0]===128,this.isIndefiniteForm)return this.blockLength=1,t+this.blockLength;if(this.longFormUsed=!!(i[0]&128),this.longFormUsed===!1)return this.length=i[0],this.blockLength=1,t+this.blockLength;let a=i[0]&127;if(a>8)return this.error="Too big integer",-1;if(a+1>i.length)return this.error="End of input reached before message was fully decoded",-1;let u=t+1,c=s.subarray(u,u+a);return c[a-1]===0&&this.warnings.push("Needlessly long encoded length"),this.length=Wo(c,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=a+1,t+this.blockLength}toBER(e=!1){let t,n;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return t=new ArrayBuffer(1),e===!1&&(n=new Uint8Array(t),n[0]=128),t;if(this.longFormUsed){let s=fa(this.length,8);if(s.byteLength>127)return this.error="Too big length",ha;if(t=new ArrayBuffer(s.byteLength+1),e)return t;let i=new Uint8Array(s);n=new Uint8Array(t),n[0]=s.byteLength|128;for(let a=0;a<s.byteLength;a++)n[a+1]=i[a];return t}return t=new ArrayBuffer(1),e===!1&&(n=new Uint8Array(t),n[0]=this.length),t}toJSON(){return{...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length}}};C7.NAME="lengthBlock";var ot={},Ns=class extends xf{static{o(this,"BaseBlock")}constructor({name:e=Ws,optional:t=!1,primitiveSchema:n,...s}={},i){super(s),this.name=e,this.optional=t,n&&(this.primitiveSchema=n),this.idBlock=new A7(s),this.lenBlock=new C7(s),this.valueBlock=i?new i(s):new zs(s)}fromBER(e,t,n){let s=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return s===-1?(this.error=this.valueBlock.error,s):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),s)}toBER(e,t){let n=t||new LD;t||N7(this);let s=this.idBlock.toBER(e);if(n.write(s),this.lenBlock.isIndefiniteForm)n.write(new Uint8Array([128]).buffer),this.valueBlock.toBER(e,n),n.write(new ArrayBuffer(2));else{let i=this.valueBlock.toBER(e);this.lenBlock.length=i.byteLength;let a=this.lenBlock.toBER(e);n.write(a),n.write(i)}return t?ha:n.final()}toJSON(){let e={...super.toJSON(),idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional};return this.primitiveSchema&&(e.primitiveSchema=this.primitiveSchema.toJSON()),e}toString(e="ascii"){return e==="ascii"?this.onAsciiEncoding():Et.ToHex(this.toBER())}onAsciiEncoding(){let e=this.constructor.NAME,t=Et.ToHex(this.valueBlock.valueBeforeDecodeView);return`${e} : ${t}`}isEqual(e){if(this===e)return!0;if(!(e instanceof this.constructor))return!1;let t=this.toBER(),n=e.toBER();return Ac(t,n)}};Ns.NAME="BaseBlock";function N7(r){var e;if(r instanceof ot.Constructed)for(let t of r.valueBlock.value)N7(t)&&(r.lenBlock.isIndefiniteForm=!0);return!!(!((e=r.lenBlock)===null||e===void 0)&&e.isIndefiniteForm)}o(N7,"prepareIndefiniteForm");var T7=class extends Ns{static{o(this,"BaseStringBlock")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor({value:e=Ws,...t}={},n){super(t,n),e&&this.fromString(e)}fromBER(e,t,n){let s=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return s===-1?(this.error=this.valueBlock.error,s):(this.fromBuffer(this.valueBlock.valueHexView),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),s)}onAsciiEncoding(){return`${this.constructor.NAME} : '${this.valueBlock.value}'`}};T7.NAME="BaseStringBlock";var I7=class extends Jo(zs){static{o(this,"LocalPrimitiveValueBlock")}constructor({isHexOnly:e=!0,...t}={}){super(t),this.isHexOnly=e}};I7.NAME="PrimitiveValueBlock";var _7,gt=class extends Ns{static{o(this,"Primitive")}constructor(e={}){super(e,I7),this.idBlock.isConstructed=!1}};_7=gt;ot.Primitive=_7;gt.NAME="PRIMITIVE";function $pe(r,e){if(r instanceof e)return r;let t=new e;return t.idBlock=r.idBlock,t.lenBlock=r.lenBlock,t.warnings=r.warnings,t.valueBeforeDecodeView=r.valueBeforeDecodeView,t}o($pe,"localChangeType");function Bv(r,e=0,t=r.length){let n=e,s=new Ns({},zs),i=new xf;if(!zo(i,r,e,t))return s.error=i.error,{offset:-1,result:s};if(!r.subarray(e,e+t).length)return s.error="Zero buffer length",{offset:-1,result:s};let u=s.idBlock.fromBER(r,e,t);if(s.idBlock.warnings.length&&s.warnings.concat(s.idBlock.warnings),u===-1)return s.error=s.idBlock.error,{offset:-1,result:s};if(e=u,t-=s.idBlock.blockLength,u=s.lenBlock.fromBER(r,e,t),s.lenBlock.warnings.length&&s.warnings.concat(s.lenBlock.warnings),u===-1)return s.error=s.lenBlock.error,{offset:-1,result:s};if(e=u,t-=s.lenBlock.blockLength,!s.idBlock.isConstructed&&s.lenBlock.isIndefiniteForm)return s.error="Indefinite length form used for primitive encoding form",{offset:-1,result:s};let c=Ns;switch(s.idBlock.tagClass){case 1:if(s.idBlock.tagNumber>=37&&s.idBlock.isHexOnly===!1)return s.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:s};switch(s.idBlock.tagNumber){case 0:if(s.idBlock.isConstructed&&s.lenBlock.length>0)return s.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:s};c=ot.EndOfContent;break;case 1:c=ot.Boolean;break;case 2:c=ot.Integer;break;case 3:c=ot.BitString;break;case 4:c=ot.OctetString;break;case 5:c=ot.Null;break;case 6:c=ot.ObjectIdentifier;break;case 10:c=ot.Enumerated;break;case 12:c=ot.Utf8String;break;case 13:c=ot.RelativeObjectIdentifier;break;case 14:c=ot.TIME;break;case 15:return s.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:s};case 16:c=ot.Sequence;break;case 17:c=ot.Set;break;case 18:c=ot.NumericString;break;case 19:c=ot.PrintableString;break;case 20:c=ot.TeletexString;break;case 21:c=ot.VideotexString;break;case 22:c=ot.IA5String;break;case 23:c=ot.UTCTime;break;case 24:c=ot.GeneralizedTime;break;case 25:c=ot.GraphicString;break;case 26:c=ot.VisibleString;break;case 27:c=ot.GeneralString;break;case 28:c=ot.UniversalString;break;case 29:c=ot.CharacterString;break;case 30:c=ot.BmpString;break;case 31:c=ot.DATE;break;case 32:c=ot.TimeOfDay;break;case 33:c=ot.DateTime;break;case 34:c=ot.Duration;break;default:{let f=s.idBlock.isConstructed?new ot.Constructed:new ot.Primitive;f.idBlock=s.idBlock,f.lenBlock=s.lenBlock,f.warnings=s.warnings,s=f}}break;case 2:case 3:case 4:default:c=s.idBlock.isConstructed?ot.Constructed:ot.Primitive}return s=$pe(s,c),u=s.fromBER(r,e,s.lenBlock.isIndefiniteForm?t:s.lenBlock.length),s.valueBeforeDecodeView=r.subarray(n,n+s.blockLength),{offset:u,result:s}}o(Bv,"localFromBER");function Jr(r){if(!r.byteLength){let e=new Ns({},zs);return e.error="Input buffer has zero length",{offset:-1,result:e}}return Bv(dt.toUint8Array(r).slice(),0,r.byteLength)}o(Jr,"fromBER");function Xpe(r,e){return r?1:e}o(Xpe,"checkLen");var Cc=class extends zs{static{o(this,"LocalConstructedValueBlock")}constructor({value:e=[],isIndefiniteForm:t=!1,...n}={}){super(n),this.value=e,this.isIndefiniteForm=t}fromBER(e,t,n){let s=dt.toUint8Array(e);if(!zo(this,s,t,n))return-1;if(this.valueBeforeDecodeView=s.subarray(t,t+n),this.valueBeforeDecodeView.length===0)return this.warnings.push("Zero buffer length"),t;let i=t;for(;Xpe(this.isIndefiniteForm,n)>0;){let a=Bv(s,i,n);if(a.offset===-1)return this.error=a.result.error,this.warnings.concat(a.result.warnings),-1;if(i=a.offset,this.blockLength+=a.result.blockLength,n-=a.result.blockLength,this.value.push(a.result),this.isIndefiniteForm&&a.result.constructor.NAME===_v)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===_v?this.value.pop():this.warnings.push("No EndOfContent block encoded")),i}toBER(e,t){let n=t||new LD;for(let s=0;s<this.value.length;s++)this.value[s].toBER(e,n);return t?ha:n.final()}toJSON(){let e={...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,value:[]};for(let t of this.value)e.value.push(t.toJSON());return e}};Cc.NAME="ConstructedValueBlock";var B7,oe=class extends Ns{static{o(this,"Constructed")}constructor(e={}){super(e,Cc),this.idBlock.isConstructed=!0}fromBER(e,t,n){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;let s=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?n:this.lenBlock.length);return s===-1?(this.error=this.valueBlock.error,s):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),s)}onAsciiEncoding(){let e=[];for(let n of this.valueBlock.value)e.push(n.toString("ascii").split(`
|
|
93
|
+
`).map(s=>` ${s}`).join(`
|
|
94
|
+
`));let t=this.idBlock.tagClass===3?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return e.length?`${t} :
|
|
95
|
+
${e.join(`
|
|
96
|
+
`)}`:`${t} :`}};B7=oe;ot.Constructed=B7;oe.NAME="CONSTRUCTED";var D7=class extends zs{static{o(this,"LocalEndOfContentValueBlock")}fromBER(e,t,n){return t}toBER(e){return ha}};D7.override="EndOfContentValueBlock";var R7,O7=class extends Ns{static{o(this,"EndOfContent")}constructor(e={}){super(e,D7),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}};R7=O7;ot.EndOfContent=R7;O7.NAME=_v;var P7,Yr=class extends Ns{static{o(this,"Null")}constructor(e={}){super(e,zs),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(e,t,n){return this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=n,t+n>e.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):t+n}toBER(e,t){let n=new ArrayBuffer(2);if(!e){let s=new Uint8Array(n);s[0]=5,s[1]=0}return t&&t.write(n),n}onAsciiEncoding(){return`${this.constructor.NAME}`}};P7=Yr;ot.Null=P7;Yr.NAME="NULL";var k7=class extends Jo(zs){static{o(this,"LocalBooleanValueBlock")}get value(){for(let e of this.valueHexView)if(e>0)return!0;return!1}set value(e){this.valueHexView[0]=e?255:0}constructor({value:e,...t}={}){super(t),t.valueHex?this.valueHexView=dt.toUint8Array(t.valueHex):this.valueHexView=new Uint8Array(1),e&&(this.value=e)}fromBER(e,t,n){let s=dt.toUint8Array(e);return zo(this,s,t,n)?(this.valueHexView=s.subarray(t,t+n),n>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,DD.call(this),this.blockLength=n,t+n):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}};k7.NAME="BooleanValueBlock";var L7,pa=class extends Ns{static{o(this,"Boolean")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor(e={}){super(e,k7),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}};L7=pa;ot.Boolean=L7;pa.NAME="BOOLEAN";var V7=class extends Jo(Cc){static{o(this,"LocalOctetStringValueBlock")}constructor({isConstructed:e=!1,...t}={}){super(t),this.isConstructed=e}fromBER(e,t,n){let s=0;if(this.isConstructed){if(this.isHexOnly=!1,s=Cc.prototype.fromBER.call(this,e,t,n),s===-1)return s;for(let i=0;i<this.value.length;i++){let a=this.value[i].constructor.NAME;if(a===_v){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1}if(a!==b7)return this.error="OCTET STRING may consists of OCTET STRINGs only",-1}}else this.isHexOnly=!0,s=super.fromBER(e,t,n),this.blockLength=n;return s}toBER(e,t){return this.isConstructed?Cc.prototype.toBER.call(this,e,t):e?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),isConstructed:this.isConstructed}}};V7.NAME="OctetStringValueBlock";var VD,Ve=class extends Ns{static{o(this,"OctetString")}constructor({idBlock:e={},lenBlock:t={},...n}={}){var s,i;(s=n.isConstructed)!==null&&s!==void 0||(n.isConstructed=!!(!((i=n.value)===null||i===void 0)&&i.length)),super({idBlock:{isConstructed:n.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!n.isIndefiniteForm},...n},V7),this.idBlock.tagClass=1,this.idBlock.tagNumber=4}fromBER(e,t,n){if(this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,n===0)return this.idBlock.error.length===0&&(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length===0&&(this.blockLength+=this.lenBlock.blockLength),t;if(!this.valueBlock.isConstructed){let i=(e instanceof ArrayBuffer?new Uint8Array(e):e).subarray(t,t+n);try{if(i.byteLength){let a=Bv(i,0,i.byteLength);a.offset!==-1&&a.offset===n&&(this.valueBlock.value=[a.result])}}catch{}}return super.fromBER(e,t,n)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return oe.prototype.onAsciiEncoding.call(this);let e=this.constructor.NAME,t=Et.ToHex(this.valueBlock.valueHexView);return`${e} : ${t}`}getValue(){if(!this.idBlock.isConstructed)return this.valueBlock.valueHexView.slice().buffer;let e=[];for(let t of this.valueBlock.value)t instanceof VD&&e.push(t.valueBlock.valueHexView);return dt.concat(e)}};VD=Ve;ot.OctetString=VD;Ve.NAME=b7;var U7=class extends Jo(Cc){static{o(this,"LocalBitStringValueBlock")}constructor({unusedBits:e=0,isConstructed:t=!1,...n}={}){super(n),this.unusedBits=e,this.isConstructed=t,this.blockLength=this.valueHexView.byteLength}fromBER(e,t,n){if(!n)return t;let s=-1;if(this.isConstructed){if(s=Cc.prototype.fromBER.call(this,e,t,n),s===-1)return s;for(let u of this.value){let c=u.constructor.NAME;if(c===_v){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(c!==E7)return this.error="BIT STRING may consists of BIT STRINGs only",-1;let f=u.valueBlock;if(this.unusedBits>0&&f.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=f.unusedBits}return s}let i=dt.toUint8Array(e);if(!zo(this,i,t,n))return-1;let a=i.subarray(t,t+n);if(this.unusedBits=a[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){let u=a.subarray(1);try{if(u.byteLength){let c=Bv(u,0,u.byteLength);c.offset!==-1&&c.offset===n-1&&(this.value=[c.result])}}catch{}}return this.valueHexView=a.subarray(1),this.blockLength=a.length,t+n}toBER(e,t){if(this.isConstructed)return Cc.prototype.toBER.call(this,e,t);if(e)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return ha;let n=new Uint8Array(this.valueHexView.length+1);return n[0]=this.unusedBits,n.set(this.valueHexView,1),n.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}};U7.NAME="BitStringValueBlock";var j7,Ht=class extends Ns{static{o(this,"BitString")}constructor({idBlock:e={},lenBlock:t={},...n}={}){var s,i;(s=n.isConstructed)!==null&&s!==void 0||(n.isConstructed=!!(!((i=n.value)===null||i===void 0)&&i.length)),super({idBlock:{isConstructed:n.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!n.isIndefiniteForm},...n},U7),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(e,t,n){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(e,t,n)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return oe.prototype.onAsciiEncoding.call(this);{let e=[],t=this.valueBlock.valueHexView;for(let a of t)e.push(a.toString(2).padStart(8,"0"));let n=e.join(""),s=this.constructor.NAME,i=n.substring(0,n.length-this.valueBlock.unusedBits);return`${s} : ${i}`}}};j7=Ht;ot.BitString=j7;Ht.NAME=E7;var F7;function Gpe(r,e){let t=new Uint8Array([0]),n=new Uint8Array(r),s=new Uint8Array(e),i=n.slice(0),a=i.length-1,u=s.slice(0),c=u.length-1,f=0,h=c<a?a:c,m=0;for(let g=h;g>=0;g--,m++){switch(!0){case m<u.length:f=i[a-m]+u[c-m]+t[0];break;default:f=i[a-m]+t[0]}switch(t[0]=f/10,!0){case m>=i.length:i=mE(new Uint8Array([f%10]),i);break;default:i[a-m]=f%10}}return t[0]>0&&(i=mE(t,i)),i}o(Gpe,"viewAdd");function S7(r){if(r>=Tv.length)for(let e=Tv.length;e<=r;e++){let t=new Uint8Array([0]),n=Tv[e-1].slice(0);for(let s=n.length-1;s>=0;s--){let i=new Uint8Array([(n[s]<<1)+t[0]]);t[0]=i[0]/10,n[s]=i[0]%10}t[0]>0&&(n=mE(t,n)),Tv.push(n)}return Tv[r]}o(S7,"power2");function Wpe(r,e){let t=0,n=new Uint8Array(r),s=new Uint8Array(e),i=n.slice(0),a=i.length-1,u=s.slice(0),c=u.length-1,f,h=0;for(let m=c;m>=0;m--,h++)switch(f=i[a-h]-u[c-h]-t,!0){case f<0:t=1,i[a-h]=f+10;break;default:t=0,i[a-h]=f}if(t>0)for(let m=a-c+1;m>=0;m--,h++)if(f=i[a-h]-t,f<0)t=1,i[a-h]=f+10;else{t=0,i[a-h]=f;break}return i.slice()}o(Wpe,"viewSub");var UD=class extends Jo(zs){static{o(this,"LocalIntegerValueBlock")}setValueHex(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=DD.call(this)))}constructor({value:e,...t}={}){super(t),this._valueDec=0,t.valueHex&&this.setValueHex(),e!==void 0&&(this.valueDec=e)}set valueDec(e){this._valueDec=e,this.isHexOnly=!1,this.valueHexView=new Uint8Array(d7(e))}get valueDec(){return this._valueDec}fromDER(e,t,n,s=0){let i=this.fromBER(e,t,n);if(i===-1)return i;let a=this.valueHexView;return a[0]===0&&(a[1]&128)!==0?this.valueHexView=a.subarray(1):s!==0&&a.length<s&&(s-a.length>1&&(s=a.length+1),this.valueHexView=a.subarray(s-a.length)),i}toDER(e=!1){let t=this.valueHexView;switch(!0){case(t[0]&128)!==0:{let n=new Uint8Array(this.valueHexView.length+1);n[0]=0,n.set(t,1),this.valueHexView=n}break;case(t[0]===0&&(t[1]&128)===0):this.valueHexView=this.valueHexView.subarray(1);break}return this.toBER(e)}fromBER(e,t,n){let s=super.fromBER(e,t,n);return s===-1||this.setValueHex(),s}toBER(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){let e=this.valueHexView.length*8-1,t=new Uint8Array(this.valueHexView.length*8/3),n=0,s,i=this.valueHexView,a="",u=!1;for(let c=i.byteLength-1;c>=0;c--){s=i[c];for(let f=0;f<8;f++){if((s&1)===1)switch(n){case e:t=Wpe(S7(n),t),a="-";break;default:t=Gpe(t,S7(n))}n++,s>>=1}}for(let c=0;c<t.length;c++)t[c]&&(u=!0),u&&(a+=x7.charAt(t[c]));return u===!1&&(a+=x7.charAt(0)),a}};F7=UD;UD.NAME="IntegerValueBlock";Object.defineProperty(F7.prototype,"valueHex",{set:o(function(r){this.valueHexView=new Uint8Array(r),this.setValueHex()},"set"),get:o(function(){return this.valueHexView.slice().buffer},"get")});var Iv,ge=class extends Ns{static{o(this,"Integer")}constructor(e={}){super(e,UD),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return vE(),BigInt(this.valueBlock.toString())}static fromBigInt(e){vE();let t=BigInt(e),n=new LD,s=t.toString(16).replace(/^-/,""),i=new Uint8Array(Et.FromHex(s));if(t<0){let u=new Uint8Array(i.length+(i[0]&128?1:0));u[0]|=128;let f=BigInt(`0x${Et.ToHex(u)}`)+t,h=dt.toUint8Array(Et.FromHex(f.toString(16)));h[0]|=128,n.write(h)}else i[0]&128&&n.write(new Uint8Array([0])),n.write(i);return new Iv({valueHex:n.final()})}convertToDER(){let e=new Iv({valueHex:this.valueBlock.valueHexView});return e.valueBlock.toDER(),e}convertFromDER(){return new Iv({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}};Iv=ge;ot.Integer=Iv;ge.NAME="INTEGER";var M7,Nc=class extends ge{static{o(this,"Enumerated")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}};M7=Nc;ot.Enumerated=M7;Nc.NAME="ENUMERATED";var OD=class extends Jo(zs){static{o(this,"LocalSidValueBlock")}constructor({valueDec:e=-1,isFirstSid:t=!1,...n}={}){super(n),this.valueDec=e,this.isFirstSid=t}fromBER(e,t,n){if(!n)return t;let s=dt.toUint8Array(e);if(!zo(this,s,t,n))return-1;let i=s.subarray(t,t+n);this.valueHexView=new Uint8Array(n);for(let u=0;u<n&&(this.valueHexView[u]=i[u]&127,this.blockLength++,(i[u]&128)!==0);u++);let a=new Uint8Array(this.blockLength);for(let u=0;u<this.blockLength;u++)a[u]=this.valueHexView[u];return this.valueHexView=a,(i[this.blockLength-1]&128)!==0?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=Wo(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),t+this.blockLength)}set valueBigInt(e){vE();let t=BigInt(e).toString(2);for(;t.length%7;)t="0"+t;let n=new Uint8Array(t.length/7);for(let s=0;s<n.length;s++)n[s]=parseInt(t.slice(s*7,s*7+7),2)+(s+1<n.length?128:0);this.fromBER(n.buffer,0,n.length)}toBER(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);let s=this.valueHexView,i=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)i[a]=s[a]|128;return i[this.blockLength-1]=s[this.blockLength-1],i.buffer}let t=fa(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",ha;let n=new Uint8Array(t.byteLength);if(!e){let s=new Uint8Array(t),i=t.byteLength-1;for(let a=0;a<i;a++)n[a]=s[a]|128;n[i]=s[i]}return n}toString(){let e="";if(this.isHexOnly)e=Et.ToHex(this.valueHexView);else if(this.isFirstSid){let t=this.valueDec;this.valueDec<=39?e="0.":this.valueDec<=79?(e="1.",t-=40):(e="2.",t-=80),e+=t.toString()}else e=this.valueDec.toString();return e}toJSON(){return{...super.toJSON(),valueDec:this.valueDec,isFirstSid:this.isFirstSid}}};OD.NAME="sidBlock";var q7=class extends zs{static{o(this,"LocalObjectIdentifierValueBlock")}constructor({value:e=Ws,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new OD;if(s=i.fromBER(e,s,n),s===-1)return this.blockLength=0,this.error=i.error,s;this.value.length===0&&(i.isFirstSid=!0),this.blockLength+=i.blockLength,n-=i.blockLength,this.value.push(i)}return s}toBER(e){let t=[];for(let n=0;n<this.value.length;n++){let s=this.value[n].toBER(e);if(s.byteLength===0)return this.error=this.value[n].error,ha;t.push(s)}return kD(t)}fromString(e){this.value=[];let t=0,n=0,s="",i=!1;do if(n=e.indexOf(".",t),n===-1?s=e.substring(t):s=e.substring(t,n),t=n+1,i){let a=this.value[0],u=0;switch(a.valueDec){case 0:break;case 1:u=40;break;case 2:u=80;break;default:this.value=[];return}let c=parseInt(s,10);if(isNaN(c))return;a.valueDec=c+u,i=!1}else{let a=new OD;if(s>Number.MAX_SAFE_INTEGER){vE();let u=BigInt(s);a.valueBigInt=u}else if(a.valueDec=parseInt(s,10),isNaN(a.valueDec))return;this.value.length||(a.isFirstSid=!0,i=!0),this.value.push(a)}while(n!==-1)}toString(){let e="",t=!1;for(let n=0;n<this.value.length;n++){t=this.value[n].isHexOnly;let s=this.value[n].toString();n!==0&&(e=`${e}.`),t?(s=`{${s}}`,this.value[n].isFirstSid?e=`2.{${s} - 80}`:e+=s):e+=s}return e}toJSON(){let e={...super.toJSON(),value:this.toString(),sidArray:[]};for(let t=0;t<this.value.length;t++)e.sidArray.push(this.value[t].toJSON());return e}};q7.NAME="ObjectIdentifierValueBlock";var H7,rt=class extends Ns{static{o(this,"ObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,q7),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};H7=rt;ot.ObjectIdentifier=H7;rt.NAME="OBJECT IDENTIFIER";var PD=class extends Jo(xf){static{o(this,"LocalRelativeSidValueBlock")}constructor({valueDec:e=0,...t}={}){super(t),this.valueDec=e}fromBER(e,t,n){if(n===0)return t;let s=dt.toUint8Array(e);if(!zo(this,s,t,n))return-1;let i=s.subarray(t,t+n);this.valueHexView=new Uint8Array(n);for(let u=0;u<n&&(this.valueHexView[u]=i[u]&127,this.blockLength++,(i[u]&128)!==0);u++);let a=new Uint8Array(this.blockLength);for(let u=0;u<this.blockLength;u++)a[u]=this.valueHexView[u];return this.valueHexView=a,(i[this.blockLength-1]&128)!==0?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=Wo(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),t+this.blockLength)}toBER(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);let s=this.valueHexView,i=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)i[a]=s[a]|128;return i[this.blockLength-1]=s[this.blockLength-1],i.buffer}let t=fa(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",ha;let n=new Uint8Array(t.byteLength);if(!e){let s=new Uint8Array(t),i=t.byteLength-1;for(let a=0;a<i;a++)n[a]=s[a]|128;n[i]=s[i]}return n.buffer}toString(){let e="";return this.isHexOnly?e=Et.ToHex(this.valueHexView):e=this.valueDec.toString(),e}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}};PD.NAME="relativeSidBlock";var K7=class extends zs{static{o(this,"LocalRelativeObjectIdentifierValueBlock")}constructor({value:e=Ws,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new PD;if(s=i.fromBER(e,s,n),s===-1)return this.blockLength=0,this.error=i.error,s;this.blockLength+=i.blockLength,n-=i.blockLength,this.value.push(i)}return s}toBER(e,t){let n=[];for(let s=0;s<this.value.length;s++){let i=this.value[s].toBER(e);if(i.byteLength===0)return this.error=this.value[s].error,ha;n.push(i)}return kD(n)}fromString(e){this.value=[];let t=0,n=0,s="";do{n=e.indexOf(".",t),n===-1?s=e.substring(t):s=e.substring(t,n),t=n+1;let i=new PD;if(i.valueDec=parseInt(s,10),isNaN(i.valueDec))return!0;this.value.push(i)}while(n!==-1);return!0}toString(){let e="",t=!1;for(let n=0;n<this.value.length;n++){t=this.value[n].isHexOnly;let s=this.value[n].toString();n!==0&&(e=`${e}.`),t&&(s=`{${s}}`),e+=s}return e}toJSON(){let e={...super.toJSON(),value:this.toString(),sidArray:[]};for(let t=0;t<this.value.length;t++)e.sidArray.push(this.value[t].toJSON());return e}};K7.NAME="RelativeObjectIdentifierValueBlock";var $7,X7=class extends Ns{static{o(this,"RelativeObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,K7),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};$7=X7;ot.RelativeObjectIdentifier=$7;X7.NAME="RelativeObjectIdentifier";var G7,W=class extends oe{static{o(this,"Sequence")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}};G7=W;ot.Sequence=G7;W.NAME="SEQUENCE";var W7,Qr=class extends oe{static{o(this,"Set")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}};W7=Qr;ot.Set=W7;Qr.NAME="SET";var z7=class extends Jo(zs){static{o(this,"LocalStringValueBlock")}constructor({...e}={}){super(e),this.isHexOnly=!0,this.value=Ws}toJSON(){return{...super.toJSON(),value:this.value}}};z7.NAME="StringValueBlock";var J7=class extends z7{static{o(this,"LocalSimpleStringValueBlock")}};J7.NAME="SimpleStringValueBlock";var pi=class extends T7{static{o(this,"LocalSimpleStringBlock")}constructor({...e}={}){super(e,J7)}fromBuffer(e){this.valueBlock.value=String.fromCharCode.apply(null,dt.toUint8Array(e))}fromString(e){let t=e.length,n=this.valueBlock.valueHexView=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=e.charCodeAt(s);this.valueBlock.value=e}};pi.NAME="SIMPLE STRING";var Y7=class extends pi{static{o(this,"LocalUtf8StringValueBlock")}fromBuffer(e){this.valueBlock.valueHexView=dt.toUint8Array(e);try{this.valueBlock.value=Et.ToUtf8String(e)}catch(t){this.warnings.push(`Error during "decodeURIComponent": ${t}, using raw string`),this.valueBlock.value=Et.ToBinary(e)}}fromString(e){this.valueBlock.valueHexView=new Uint8Array(Et.FromUtf8String(e)),this.valueBlock.value=e}};Y7.NAME="Utf8StringValueBlock";var Q7,Hi=class extends Y7{static{o(this,"Utf8String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}};Q7=Hi;ot.Utf8String=Q7;Hi.NAME="UTF8String";var Z7=class extends pi{static{o(this,"LocalBmpStringValueBlock")}fromBuffer(e){this.valueBlock.value=Et.ToUtf16String(e),this.valueBlock.valueHexView=dt.toUint8Array(e)}fromString(e){this.valueBlock.value=e,this.valueBlock.valueHexView=new Uint8Array(Et.FromUtf16String(e))}};Z7.NAME="BmpStringValueBlock";var eH,Ed=class extends Z7{static{o(this,"BmpString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}};eH=Ed;ot.BmpString=eH;Ed.NAME="BMPString";var tH=class extends pi{static{o(this,"LocalUniversalStringValueBlock")}fromBuffer(e){let t=ArrayBuffer.isView(e)?e.slice().buffer:e.slice(0),n=new Uint8Array(t);for(let s=0;s<n.length;s+=4)n[s]=n[s+3],n[s+1]=n[s+2],n[s+2]=0,n[s+3]=0;this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(t))}fromString(e){let t=e.length,n=this.valueBlock.valueHexView=new Uint8Array(t*4);for(let s=0;s<t;s++){let i=fa(e.charCodeAt(s),8),a=new Uint8Array(i);if(a.length>4)continue;let u=4-a.length;for(let c=a.length-1;c>=0;c--)n[s*4+c+u]=a[c]}this.valueBlock.value=e}};tH.NAME="UniversalStringValueBlock";var rH,Ad=class extends tH{static{o(this,"UniversalString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}};rH=Ad;ot.UniversalString=rH;Ad.NAME="UniversalString";var nH,wf=class extends pi{static{o(this,"NumericString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}};nH=wf;ot.NumericString=nH;wf.NAME="NumericString";var sH,Ki=class extends pi{static{o(this,"PrintableString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}};sH=Ki;ot.PrintableString=sH;Ki.NAME="PrintableString";var iH,Cd=class extends pi{static{o(this,"TeletexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}};iH=Cd;ot.TeletexString=iH;Cd.NAME="TeletexString";var aH,xE=class extends pi{static{o(this,"VideotexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}};aH=xE;ot.VideotexString=aH;xE.NAME="VideotexString";var oH,Dv=class extends pi{static{o(this,"IA5String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}};oH=Dv;ot.IA5String=oH;Dv.NAME="IA5String";var uH,wE=class extends pi{static{o(this,"GraphicString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}};uH=wE;ot.GraphicString=uH;wE.NAME="GraphicString";var cH,Rv=class extends pi{static{o(this,"VisibleString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}};cH=Rv;ot.VisibleString=cH;Rv.NAME="VisibleString";var lH,SE=class extends pi{static{o(this,"GeneralString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}};lH=SE;ot.GeneralString=lH;SE.NAME="GeneralString";var fH,bE=class extends pi{static{o(this,"CharacterString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}};fH=bE;ot.CharacterString=fH;bE.NAME="CharacterString";var hH,Sf=class extends Rv{static{o(this,"UTCTime")}constructor({value:e,valueDate:t,...n}={}){if(super(n),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,e){this.fromString(e),this.valueBlock.valueHexView=new Uint8Array(e.length);for(let s=0;s<e.length;s++)this.valueBlock.valueHexView[s]=e.charCodeAt(s)}t&&(this.fromDate(t),this.valueBlock.valueHexView=new Uint8Array(this.toBuffer())),this.idBlock.tagClass=1,this.idBlock.tagNumber=23}fromBuffer(e){this.fromString(String.fromCharCode.apply(null,dt.toUint8Array(e)))}toBuffer(){let e=this.toString(),t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return t}fromDate(e){this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second))}fromString(e){let n=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/ig.exec(e);if(n===null){this.error="Wrong input string for conversion";return}let s=parseInt(n[1],10);s>=50?this.year=1900+s:this.year=2e3+s,this.month=parseInt(n[2],10),this.day=parseInt(n[3],10),this.hour=parseInt(n[4],10),this.minute=parseInt(n[5],10),this.second=parseInt(n[6],10)}toString(e="iso"){if(e==="iso"){let t=new Array(7);return t[0]=Gs(this.year<2e3?this.year-1900:this.year-2e3,2),t[1]=Gs(this.month,2),t[2]=Gs(this.day,2),t[3]=Gs(this.hour,2),t[4]=Gs(this.minute,2),t[5]=Gs(this.second,2),t[6]="Z",t.join("")}return super.toString(e)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.toDate().toISOString()}`}toJSON(){return{...super.toJSON(),year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second}}};hH=Sf;ot.UTCTime=hH;Sf.NAME="UTCTime";var pH,Lr=class extends Sf{static{o(this,"GeneralizedTime")}constructor(e={}){var t;super(e),(t=this.millisecond)!==null&&t!==void 0||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(e){super.fromDate(e),this.millisecond=e.getUTCMilliseconds()}toDate(){let e=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond);return new Date(e)}fromString(e){let t=!1,n="",s="",i=0,a,u=0,c=0;if(e[e.length-1]==="Z")n=e.substring(0,e.length-1),t=!0;else{let m=new Number(e[e.length-1]);if(isNaN(m.valueOf()))throw new Error("Wrong input string for conversion");n=e}if(t){if(n.indexOf("+")!==-1)throw new Error("Wrong input string for conversion");if(n.indexOf("-")!==-1)throw new Error("Wrong input string for conversion")}else{let m=1,g=n.indexOf("+"),x="";if(g===-1&&(g=n.indexOf("-"),m=-1),g!==-1){if(x=n.substring(g+1),n=n.substring(0,g),x.length!==2&&x.length!==4)throw new Error("Wrong input string for conversion");let v=parseInt(x.substring(0,2),10);if(isNaN(v.valueOf()))throw new Error("Wrong input string for conversion");if(u=m*v,x.length===4){if(v=parseInt(x.substring(2,4),10),isNaN(v.valueOf()))throw new Error("Wrong input string for conversion");c=m*v}}}let f=n.indexOf(".");if(f===-1&&(f=n.indexOf(",")),f!==-1){let m=new Number(`0${n.substring(f)}`);if(isNaN(m.valueOf()))throw new Error("Wrong input string for conversion");i=m.valueOf(),s=n.substring(0,f)}else s=n;switch(!0){case s.length===8:if(a=/(\d{4})(\d{2})(\d{2})/ig,f!==-1)throw new Error("Wrong input string for conversion");break;case s.length===10:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})/ig,f!==-1){let m=60*i;this.minute=Math.floor(m),m=60*(m-this.minute),this.second=Math.floor(m),m=1e3*(m-this.second),this.millisecond=Math.floor(m)}break;case s.length===12:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig,f!==-1){let m=60*i;this.second=Math.floor(m),m=1e3*(m-this.second),this.millisecond=Math.floor(m)}break;case s.length===14:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig,f!==-1){let m=1e3*i;this.millisecond=Math.floor(m)}break;default:throw new Error("Wrong input string for conversion")}let h=a.exec(s);if(h===null)throw new Error("Wrong input string for conversion");for(let m=1;m<h.length;m++)switch(m){case 1:this.year=parseInt(h[m],10);break;case 2:this.month=parseInt(h[m],10);break;case 3:this.day=parseInt(h[m],10);break;case 4:this.hour=parseInt(h[m],10)+u;break;case 5:this.minute=parseInt(h[m],10)+c;break;case 6:this.second=parseInt(h[m],10);break;default:throw new Error("Wrong input string for conversion")}if(t===!1){let m=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=m.getUTCFullYear(),this.month=m.getUTCMonth(),this.day=m.getUTCDay(),this.hour=m.getUTCHours(),this.minute=m.getUTCMinutes(),this.second=m.getUTCSeconds(),this.millisecond=m.getUTCMilliseconds()}}toString(e="iso"){if(e==="iso"){let t=[];return t.push(Gs(this.year,4)),t.push(Gs(this.month,2)),t.push(Gs(this.day,2)),t.push(Gs(this.hour,2)),t.push(Gs(this.minute,2)),t.push(Gs(this.second,2)),this.millisecond!==0&&(t.push("."),t.push(Gs(this.millisecond,3))),t.push("Z"),t.join("")}return super.toString(e)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}};pH=Lr;ot.GeneralizedTime=pH;Lr.NAME="GeneralizedTime";var dH,mH=class extends Hi{static{o(this,"DATE")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}};dH=mH;ot.DATE=dH;mH.NAME="DATE";var gH,vH=class extends Hi{static{o(this,"TimeOfDay")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}};gH=vH;ot.TimeOfDay=gH;vH.NAME="TimeOfDay";var yH,xH=class extends Hi{static{o(this,"DateTime")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}};yH=xH;ot.DateTime=yH;xH.NAME="DateTime";var wH,SH=class extends Hi{static{o(this,"Duration")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}};wH=SH;ot.Duration=wH;SH.NAME="Duration";var bH,EH=class extends Hi{static{o(this,"TIME")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}};bH=EH;ot.TIME=bH;EH.NAME="TIME";var xt=class{static{o(this,"Any")}constructor({name:e=Ws,optional:t=!1}={}){this.name=e,this.optional=t}},Vr=class extends xt{static{o(this,"Choice")}constructor({value:e=[],...t}={}){super(t),this.value=e}},Tt=class extends xt{static{o(this,"Repeated")}constructor({value:e=new xt,local:t=!1,...n}={}){super(n),this.value=e,this.local=t}},Ov=class{static{o(this,"RawData")}get data(){return this.dataView.slice().buffer}set data(e){this.dataView=dt.toUint8Array(e)}constructor({data:e=yE}={}){this.dataView=dt.toUint8Array(e)}fromBER(e,t,n){let s=t+n;return this.dataView=dt.toUint8Array(e).subarray(t,s),s}toBER(e){return this.dataView.slice().buffer}};function Ie(r,e,t){if(t instanceof Vr){for(let i of t.value)if(Ie(r,e,i).verified)return{verified:!0,result:r};{let i={verified:!1,result:{error:"Wrong values for Choice type"}};return t.hasOwnProperty(RD)&&(i.name=t.name),i}}if(t instanceof xt)return t.hasOwnProperty(RD)&&(r[t.name]=e),{verified:!0,result:r};if(!(r instanceof Object))return{verified:!1,result:{error:"Wrong root object"}};if(!(e instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 data"}};if(!(t instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(Upe in t))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(qpe in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(Hpe in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let n=t.idBlock.toBER(!1);if(n.byteLength===0)return{verified:!1,result:{error:"Error encoding idBlock for ASN.1 schema"}};if(t.idBlock.fromBER(n,0,n.byteLength)===-1)return{verified:!1,result:{error:"Error decoding idBlock for ASN.1 schema"}};if(t.idBlock.hasOwnProperty(jpe)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.tagClass!==e.idBlock.tagClass)return{verified:!1,result:r};if(t.idBlock.hasOwnProperty(Fpe)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.tagNumber!==e.idBlock.tagNumber)return{verified:!1,result:r};if(t.idBlock.hasOwnProperty(Mpe)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.isConstructed!==e.idBlock.isConstructed)return{verified:!1,result:r};if(!(Vpe in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.isHexOnly!==e.idBlock.isHexOnly)return{verified:!1,result:r};if(t.idBlock.isHexOnly){if(!(w7 in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let i=t.idBlock.valueHexView,a=e.idBlock.valueHexView;if(i.length!==a.length)return{verified:!1,result:r};for(let u=0;u<i.length;u++)if(i[u]!==a[1])return{verified:!1,result:r}}if(t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Ws),t.name&&(r[t.name]=e)),t instanceof ot.Constructed){let i=0,a={verified:!1,result:{error:"Unknown error"}},u=t.valueBlock.value.length;if(u>0&&t.valueBlock.value[0]instanceof Tt&&(u=e.valueBlock.value.length),u===0)return{verified:!0,result:r};if(e.valueBlock.value.length===0&&t.valueBlock.value.length!==0){let c=!0;for(let f=0;f<t.valueBlock.value.length;f++)c=c&&(t.valueBlock.value[f].optional||!1);return c?{verified:!0,result:r}:(t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Ws),t.name&&delete r[t.name]),r.error="Inconsistent object length",{verified:!1,result:r})}for(let c=0;c<u;c++)if(c-i>=e.valueBlock.value.length){if(t.valueBlock.value[c].optional===!1){let f={verified:!1,result:r};return r.error="Inconsistent length between ASN.1 data and schema",t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Ws),t.name&&(delete r[t.name],f.name=t.name)),f}}else if(t.valueBlock.value[0]instanceof Tt){if(a=Ie(r,e.valueBlock.value[c],t.valueBlock.value[0].value),a.verified===!1)if(t.valueBlock.value[0].optional)i++;else return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Ws),t.name&&delete r[t.name]),a;if(RD in t.valueBlock.value[0]&&t.valueBlock.value[0].name.length>0){let f={};Kpe in t.valueBlock.value[0]&&t.valueBlock.value[0].local?f=e:f=r,typeof f[t.valueBlock.value[0].name]>"u"&&(f[t.valueBlock.value[0].name]=[]),f[t.valueBlock.value[0].name].push(e.valueBlock.value[c])}}else if(a=Ie(r,e.valueBlock.value[c-i],t.valueBlock.value[c]),a.verified===!1)if(t.valueBlock.value[c].optional)i++;else return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Ws),t.name&&delete r[t.name]),a;if(a.verified===!1){let c={verified:!1,result:r};return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Ws),t.name&&(delete r[t.name],c.name=t.name)),c}return{verified:!0,result:r}}if(t.primitiveSchema&&w7 in e.valueBlock){let i=Bv(e.valueBlock.valueHexView);if(i.offset===-1){let a={verified:!1,result:i.result};return t.name&&(t.name=t.name.replace(/^\s+|\s+$/g,Ws),t.name&&(delete r[t.name],a.name=t.name)),a}return Ie(r,i.result,t.primitiveSchema)}return{verified:!0,result:r}}o(Ie,"compareSchema");var zn=class r{static{o(this,"ByteStream")}constructor(e={}){if("view"in e)this.fromUint8Array(e.view);else if("buffer"in e)this.fromArrayBuffer(e.buffer);else if("string"in e)this.fromString(e.string);else if("hexstring"in e)this.fromHexString(e.hexstring);else if("length"in e&&e.length>0){if(this.length=e.length,e.stub)for(let t=0;t<this._view.length;t++)this._view[t]=e.stub}else this.length=0}set buffer(e){this._buffer=e,this._view=new Uint8Array(this._buffer)}get buffer(){return this._buffer}set view(e){this._buffer=new ArrayBuffer(e.length),this._view=new Uint8Array(this._buffer),this._view.set(e)}get view(){return this._view}get length(){return this.view.byteLength}set length(e){this._buffer=new ArrayBuffer(e),this._view=new Uint8Array(this._buffer)}clear(){this._buffer=new ArrayBuffer(0),this._view=new Uint8Array(this._buffer)}fromArrayBuffer(e){this._buffer=e,this._view=new Uint8Array(this._buffer)}fromUint8Array(e){this.fromArrayBuffer(new Uint8Array(e).buffer)}fromString(e){let t=e.length;this.length=t;for(let n=0;n<t;n++)this.view[n]=e.charCodeAt(n)}toString(e=0,t=this.view.length-e){let n="";(e>=this.view.length||e<0)&&(e=0),(t>=this.view.length||t<0)&&(t=this.view.length-e);for(let s=e;s<e+t;s++)n+=String.fromCharCode(this.view[s]);return n}fromHexString(e){let t=e.length;this.buffer=new ArrayBuffer(t>>1),this.view=new Uint8Array(this.buffer);let n=new Map;n.set("0",0),n.set("1",1),n.set("2",2),n.set("3",3),n.set("4",4),n.set("5",5),n.set("6",6),n.set("7",7),n.set("8",8),n.set("9",9),n.set("A",10),n.set("a",10),n.set("B",11),n.set("b",11),n.set("C",12),n.set("c",12),n.set("D",13),n.set("d",13),n.set("E",14),n.set("e",14),n.set("F",15),n.set("f",15);let s=0,i=0;for(let a=0;a<t;a++)a%2?(i|=n.get(e.charAt(a)),this.view[s]=i,s++):i=n.get(e.charAt(a))<<4}toHexString(e=0,t=this.view.length-e){let n="";(e>=this.view.length||e<0)&&(e=0),(t>=this.view.length||t<0)&&(t=this.view.length-e);for(let s=e;s<e+t;s++){let i=this.view[s].toString(16).toUpperCase();n=n+(i.length==1?"0":"")+i}return n}copy(e=0,t=this.length-e){if(!e&&!this.length)return new r;if(e<0||e>this.length-1)throw new Error(`Wrong start position: ${e}`);return new r({buffer:this._buffer.slice(e,e+t)})}slice(e=0,t=this.length){if(!e&&!this.length)return new r;if(e<0||e>this.length-1)throw new Error(`Wrong start position: ${e}`);return new r({buffer:this._buffer.slice(e,t)})}realloc(e){let t=new ArrayBuffer(e),n=new Uint8Array(t);e>this._view.length?n.set(this._view):n.set(new Uint8Array(this._buffer,0,e)),this._buffer=t,this._view=new Uint8Array(this._buffer)}append(e){let t=this.length,n=e.length,s=e._view.subarray();this.realloc(t+n),this._view.set(s,t)}insert(e,t=0,n=this.length-t){return t>this.length-1?!1:(n>this.length-t&&(n=this.length-t),n>e.length&&(n=e.length),n==e.length?this._view.set(e._view,t):this._view.set(e._view.subarray(0,n),t),!0)}isEqual(e){if(this.length!=e.length)return!1;for(let t=0;t<e.length;t++)if(this.view[t]!=e.view[t])return!1;return!0}isEqualView(e){if(e.length!=this.view.length)return!1;for(let t=0;t<e.length;t++)if(this.view[t]!=e[t])return!1;return!0}findPattern(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=e.length;if(c>a)return-1;let f=[];for(let h=0;h<c;h++)f.push(e.view[h]);for(let h=0;h<=a-c;h++){let m=!0,g=u?i-c-h:i+h;for(let x=0;x<c;x++)if(this.view[x+g]!=f[x]){m=!1;break}if(m)return u?i-c-h:i+c+h}return-1}findFirstIn(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c={id:-1,position:u?0:i+a,length:0};for(let f=0;f<e.length;f++){let h=this.findPattern(e[f],i,a,u);if(h!=-1){let m=!1,g=e[f].length;u?h-g>=c.position-c.length&&(m=!0):h-g<=c.position-c.length&&(m=!0),m&&(c.position=h,c.id=f,c.length=g)}}return c}findAllIn(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u={id:-1,position:s};do{let c=u.position;if(u=this.findFirstIn(e,u.position,i),u.id==-1)break;i-=u.position-c,a.push({id:u.id,position:u.position})}while(!0);return a}findAllPatternIn(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u=e.length;if(u>i)return-1;let c=Array.from(e.view);for(let f=0;f<=i-u;f++){let h=!0,m=s+f;for(let g=0;g<u;g++)if(this.view[g+m]!=c[g]){h=!1;break}h&&(a.push(s+u+f),f+=u-1)}return a}findFirstNotIn(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c={left:{id:-1,position:i},right:{id:-1,position:0},value:new r},f=a;for(;f>0;){if(c.right=this.findFirstIn(e,u?i-a+f:i+a-f,f,u),c.right.id==-1){a=f,u?i-=a:i=c.left.position,c.value=new r({buffer:this._buffer.slice(i,i+a)});break}if(c.right.position!=(u?c.left.position-e[c.right.id].length:c.left.position+e[c.right.id].length)){u?(i=c.right.position+e[c.right.id].length,a=c.left.position-c.right.position-e[c.right.id].length):(i=c.left.position,a=c.right.position-c.left.position-e[c.right.id].length),c.value=new r({buffer:this._buffer.slice(i,i+a)});break}c.left=c.right,f-=e[c.right.id].length}if(u){let h=c.right;c.right=c.left,c.left=h}return c}findAllNotIn(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u={left:{id:-1,position:s},right:{id:-1,position:s},value:new r};do{let c=u.right.position;u=this.findFirstNotIn(e,u.right.position,i),i-=u.right.position-c,a.push({left:{id:u.left.id,position:u.left.position},right:{id:u.right.id,position:u.right.position},value:u.value})}while(u.right.id!=-1);return a}findFirstSequence(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=this.skipNotPatterns(e,i,a,u);if(c==-1)return{position:-1,value:new r};let f=this.skipPatterns(e,c,a-(u?i-c:c-i),u);u?(i=f,a=c-f):(i=c,a=f-c);let h=new r({buffer:this._buffer.slice(i,i+a)});return{position:f,value:h}}findAllSequences(e,t,n){let{start:s,length:i}=this.prepareFindParameters(t,n),a=[],u={position:s,value:new r};do{let c=u.position;u=this.findFirstSequence(e,u.position,i),u.position!=-1&&(i-=u.position-c,a.push({position:u.position,value:u.value}))}while(u.position!=-1);return a}findPairedPatterns(e,t,n,s){let i=[];if(e.isEqual(t))return i;let{start:a,length:u}=this.prepareFindParameters(n,s),c=0,f=this.findAllPatternIn(e,a,u);if(!Array.isArray(f)||f.length==0)return i;let h=this.findAllPatternIn(t,a,u);if(!Array.isArray(h)||h.length==0)return i;for(;c<f.length&&h.length!=0;){if(f[0]==h[0]){i.push({left:f[0],right:h[0]}),f.splice(0,1),h.splice(0,1);continue}if(f[c]>h[0])break;for(;f[c]<h[0]&&(c++,!(c>=f.length)););i.push({left:f[c-1],right:h[0]}),f.splice(c-1,1),h.splice(0,1),c=0}return i.sort((m,g)=>m.left-g.left),i}findPairedArrays(e,t,n,s){let{start:i,length:a}=this.prepareFindParameters(n,s),u=[],c=0,f=this.findAllIn(e,i,a);if(f.length==0)return u;let h=this.findAllIn(t,i,a);if(h.length==0)return u;for(;c<f.length&&h.length!=0;){if(f[0].position==h[0].position){u.push({left:f[0],right:h[0]}),f.splice(0,1),h.splice(0,1);continue}if(f[c].position>h[0].position)break;for(;f[c].position<h[0].position&&(c++,!(c>=f.length)););u.push({left:f[c-1],right:h[0]}),f.splice(c-1,1),h.splice(0,1),c=0}return u.sort((m,g)=>m.left.position-g.left.position),u}replacePattern(e,t,n,s,i=null){let a=[],u,c={status:-1,searchPatternPositions:[],replacePatternPositions:[]},{start:f,length:h}=this.prepareFindParameters(n,s);if(i==null){if(a=this.findAllIn([e],f,h),a.length==0)return c}else a=i;c.searchPatternPositions.push(...Array.from(a,v=>v.position));let m=e.length-t.length,g=new ArrayBuffer(this.view.length-a.length*m),x=new Uint8Array(g);for(x.set(new Uint8Array(this.buffer,0,f)),u=0;u<a.length;u++){let v=u==0?f:a[u-1].position;x.set(new Uint8Array(this.buffer,v,a[u].position-e.length-v),v-u*m),x.set(t.view,a[u].position-e.length-u*m),c.replacePatternPositions.push(a[u].position-e.length-u*m)}return u--,x.set(new Uint8Array(this.buffer,a[u].position,this.length-a[u].position),a[u].position-e.length+t.length-u*m),this.buffer=g,this.view=new Uint8Array(this.buffer),c.status=1,c}skipPatterns(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=i;for(let f=0;f<e.length;f++){let h=e[f].length,m=u?c-h:c,g=!0;for(let x=0;x<h;x++)if(this.view[x+m]!=e[f].view[x]){g=!1;break}if(g){if(f=-1,u){if(c-=h,c<=0)return c}else if(c+=h,c>=i+a)return c}}return c}skipNotPatterns(e,t,n,s){let{start:i,length:a,backward:u}=this.prepareFindParameters(t,n,s),c=-1;for(let f=0;f<a;f++){for(let h=0;h<e.length;h++){let m=e[h].length,g=u?i-f-m:i+f,x=!0;for(let v=0;v<m;v++)if(this.view[v+g]!=e[h].view[v]){x=!1;break}if(x){c=u?i-f:i+f;break}}if(c!=-1)break}return c}prepareFindParameters(e=null,t=null,n=!1){return e===null&&(e=n?this.length:0),e>this.length&&(e=this.length),n?(t===null&&(t=e),t>e&&(t=e)):(t===null&&(t=this.length-e),t>this.length-e&&(t=this.length-e)),{start:e,length:t,backward:n}}};var zpe=16777216,Yo=class r{static{o(this,"SeqStream")}constructor(e={}){this._stream=new zn,this._length=0,this._start=0,this.backward=!1,this.appendBlock=0,this.prevLength=0,this.prevStart=0,"view"in e?this.stream=new zn({view:e.view}):"buffer"in e?this.stream=new zn({buffer:e.buffer}):"string"in e?this.stream=new zn({string:e.string}):"hexstring"in e?this.stream=new zn({hexstring:e.hexstring}):"stream"in e?this.stream=e.stream.slice():this.stream=new zn,"backward"in e&&e.backward&&(this.backward=e.backward,this._start=this.stream.length),"length"in e&&e.length>0&&(this._length=e.length),"start"in e&&e.start&&e.start>0&&(this._start=e.start),"appendBlock"in e&&e.appendBlock&&e.appendBlock>0&&(this.appendBlock=e.appendBlock)}set stream(e){this._stream=e,this.prevLength=this._length,this._length=e.length,this.prevStart=this._start,this._start=0}get stream(){return this._stream}set length(e){this.prevLength=this._length,this._length=e}get length(){return this.appendBlock?this.start:this._length}set start(e){e>this.stream.length||(this.prevStart=this._start,this.prevLength=this._length,this._length-=this.backward?this._start-e:e-this._start,this._start=e)}get start(){return this._start}get buffer(){return this._stream.buffer.slice(0,this._length)}resetPosition(){this._start=this.prevStart,this._length=this.prevLength}findPattern(e,t=null){(t==null||t>this.length)&&(t=this.length);let n=this.stream.findPattern(e,this.start,this.length,this.backward);if(n==-1)return n;if(this.backward){if(n<this.start-e.length-t)return-1}else if(n>this.start+e.length+t)return-1;return this.start=n,n}findFirstIn(e,t=null){(t==null||t>this.length)&&(t=this.length);let n=this.stream.findFirstIn(e,this.start,this.length,this.backward);if(n.id==-1)return n;if(this.backward){if(n.position<this.start-e[n.id].length-t)return{id:-1,position:this.backward?0:this.start+this.length}}else if(n.position>this.start+e[n.id].length+t)return{id:-1,position:this.backward?0:this.start+this.length};return this.start=n.position,n}findAllIn(e){let t=this.backward?this.start-this.length:this.start;return this.stream.findAllIn(e,t,this.length)}findFirstNotIn(e,t=null){(t==null||t>this._length)&&(t=this._length);let n=this._stream.findFirstNotIn(e,this._start,this._length,this.backward);if(n.left.id==-1&&n.right.id==-1)return n;if(this.backward){if(n.right.id!=-1&&n.right.position<this._start-e[n.right.id].length-t)return{left:{id:-1,position:this._start},right:{id:-1,position:0},value:new zn}}else if(n.left.id!=-1&&n.left.position>this._start+e[n.left.id].length+t)return{left:{id:-1,position:this._start},right:{id:-1,position:0},value:new zn};return this.backward?n.left.id==-1?this.start=0:this.start=n.left.position:n.right.id==-1?this.start=this._start+this._length:this.start=n.right.position,n}findAllNotIn(e){let t=this.backward?this._start-this._length:this._start;return this._stream.findAllNotIn(e,t,this._length)}findFirstSequence(e,t=null,n=null){(t==null||t>this._length)&&(t=this._length),(n==null||n>t)&&(n=t);let s=this._stream.findFirstSequence(e,this._start,t,this.backward);if(s.value.length==0)return s;if(this.backward){if(s.position<this._start-s.value.length-n)return{position:-1,value:new zn}}else if(s.position>this._start+s.value.length+n)return{position:-1,value:new zn};return this.start=s.position,s}findAllSequences(e){let t=this.backward?this.start-this.length:this.start;return this.stream.findAllSequences(e,t,this.length)}findPairedPatterns(e,t,n=null){(n==null||n>this.length)&&(n=this.length);let s=this.backward?this.start-this.length:this.start,i=this.stream.findPairedPatterns(e,t,s,this.length);if(i.length){if(this.backward){if(i[0].right<this.start-t.length-n)return[]}else if(i[0].left>this.start+e.length+n)return[]}return i}findPairedArrays(e,t,n=null){(n==null||n>this.length)&&(n=this.length);let s=this.backward?this.start-this.length:this.start,i=this.stream.findPairedArrays(e,t,s,this.length);if(i.length){if(this.backward){if(i[0].right.position<this.start-t[i[0].right.id].length-n)return[]}else if(i[0].left.position>this.start+e[i[0].left.id].length+n)return[]}return i}replacePattern(e,t){let n=this.backward?this.start-this.length:this.start;return this.stream.replacePattern(e,t,n,this.length)}skipPatterns(e){let t=this.stream.skipPatterns(e,this.start,this.length,this.backward);return this.start=t,t}skipNotPatterns(e){let t=this.stream.skipNotPatterns(e,this.start,this.length,this.backward);return t==-1?-1:(this.start=t,t)}append(e){this.beforeAppend(e.length),this._stream.view.set(e.view,this._start),this._length+=e.length*2,this.start=this._start+e.length,this.prevLength-=e.length*2}appendView(e){this.beforeAppend(e.length),this._stream.view.set(e,this._start),this._length+=e.length*2,this.start=this._start+e.length,this.prevLength-=e.length*2}appendChar(e){this.beforeAppend(1),this._stream.view[this._start]=e,this._length+=2,this.start=this._start+1,this.prevLength-=2}appendUint16(e){this.beforeAppend(2);let t=new Uint16Array([e]),n=new Uint8Array(t.buffer);this.stream.view[this._start]=n[1],this._stream.view[this._start+1]=n[0],this._length+=4,this.start=this._start+2,this.prevLength-=4}appendUint24(e){this.beforeAppend(3);let t=new Uint32Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[2],this._stream.view[this._start+1]=n[1],this._stream.view[this._start+2]=n[0],this._length+=6,this.start=this._start+3,this.prevLength-=6}appendUint32(e){this.beforeAppend(4);let t=new Uint32Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[3],this._stream.view[this._start+1]=n[2],this._stream.view[this._start+2]=n[1],this._stream.view[this._start+3]=n[0],this._length+=8,this.start=this._start+4,this.prevLength-=8}appendInt16(e){this.beforeAppend(2);let t=new Int16Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[1],this._stream.view[this._start+1]=n[0],this._length+=4,this.start=this._start+2,this.prevLength-=4}appendInt32(e){this.beforeAppend(4);let t=new Int32Array([e]),n=new Uint8Array(t.buffer);this._stream.view[this._start]=n[3],this._stream.view[this._start+1]=n[2],this._stream.view[this._start+2]=n[1],this._stream.view[this._start+3]=n[0],this._length+=8,this.start=this._start+4,this.prevLength-=8}getBlock(e,t=!0){if(this._length<=0)return new Uint8Array(0);this._length<e&&(e=this._length);let n;if(this.backward){let s=this._stream.view.subarray(this._length-e,this._length);n=new Uint8Array(e);for(let i=0;i<e;i++)n[e-1-i]=s[i]}else n=this._stream.view.subarray(this._start,this._start+e);return t&&(this.start+=this.backward?-1*e:e),n}getUint16(e=!0){let t=this.getBlock(2,e);return t.length<2?0:t[0]<<8|t[1]}getInt16(e=!0){let t=this.getUint16(e),n=32768;return t&n?-(n-(t^n)):t}getUint24(e=!0){let t=this.getBlock(4,e);return t.length<3?0:t[0]<<16|t[1]<<8|t[2]}getUint32(e=!0){let t=this.getBlock(4,e);return t.length<4?0:t[0]*zpe+(t[1]<<16)+(t[2]<<8)+t[3]}getInt32(e=!0){let t=this.getUint32(e),n=2147483648;return t&n?-(n-(t^n)):t}beforeAppend(e){this._start+e>this._stream.length&&(e>this.appendBlock&&(this.appendBlock=e+r.APPEND_BLOCK),this._stream.realloc(this._stream.length+this.appendBlock))}};Yo.APPEND_BLOCK=1e3;function Ype(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}o(Ype,"isBytes");function jD(r,...e){if(!Ype(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${r.length}`)}o(jD,"bytes");function FD(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}o(FD,"exists");function CH(r,e){jD(r);let t=e.outputLen;if(r.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}o(CH,"output");var AE=o(r=>new DataView(r.buffer,r.byteOffset,r.byteLength),"createView"),da=o((r,e)=>r<<32-e|r>>>e,"rotr"),CE=o((r,e)=>r<<e|r>>>32-e>>>0,"rotl"),JIe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Qpe(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}o(Qpe,"utf8ToBytes");function MD(r){return typeof r=="string"&&(r=Qpe(r)),jD(r),r}o(MD,"toBytes");var EE=class{static{o(this,"Hash")}clone(){return this._cloneInto()}},YIe={}.toString;function bf(r){let e=o(n=>r().update(MD(n)).digest(),"hashC"),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}o(bf,"wrapConstructor");function Zpe(r,e,t,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,n);let s=BigInt(32),i=BigInt(4294967295),a=Number(t>>s&i),u=Number(t&i),c=n?4:0,f=n?0:4;r.setUint32(e+c,a,n),r.setUint32(e+f,u,n)}o(Zpe,"setBigUint64");var NE=o((r,e,t)=>r&e^~r&t,"Chi"),TE=o((r,e,t)=>r&e^r&t^e&t,"Maj"),Tc=class extends EE{static{o(this,"HashMD")}constructor(e,t,n,s){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=AE(this.buffer)}update(e){FD(this);let{view:t,buffer:n,blockLen:s}=this;e=MD(e);let i=e.length;for(let a=0;a<i;){let u=Math.min(s-this.pos,i-a);if(u===s){let c=AE(e);for(;s<=i-a;a+=s)this.process(c,a);continue}n.set(e.subarray(a,a+u),this.pos),this.pos+=u,a+=u,this.pos===s&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){FD(this),CH(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:s,isLE:i}=this,{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>s-a&&(this.process(n,0),a=0);for(let m=a;m<s;m++)t[m]=0;Zpe(n,s-8,BigInt(this.length*8),i),this.process(n,0);let u=AE(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let f=c/4,h=this.get();if(f>h.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<f;m++)u.setUint32(4*m,h[m],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:s,finished:i,destroyed:a,pos:u}=this;return e.length=s,e.pos=u,e.finished=i,e.destroyed=a,s%t&&e.buffer.set(n),e}};var Pv=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Ic=new Uint32Array(80),ede=class extends Tc{static{o(this,"SHA1")}constructor(){super(64,20,8,!1),this.A=Pv[0]|0,this.B=Pv[1]|0,this.C=Pv[2]|0,this.D=Pv[3]|0,this.E=Pv[4]|0}get(){let{A:e,B:t,C:n,D:s,E:i}=this;return[e,t,n,s,i]}set(e,t,n,s,i){this.A=e|0,this.B=t|0,this.C=n|0,this.D=s|0,this.E=i|0}process(e,t){for(let c=0;c<16;c++,t+=4)Ic[c]=e.getUint32(t,!1);for(let c=16;c<80;c++)Ic[c]=CE(Ic[c-3]^Ic[c-8]^Ic[c-14]^Ic[c-16],1);let{A:n,B:s,C:i,D:a,E:u}=this;for(let c=0;c<80;c++){let f,h;c<20?(f=NE(s,i,a),h=1518500249):c<40?(f=s^i^a,h=1859775393):c<60?(f=TE(s,i,a),h=2400959708):(f=s^i^a,h=3395469782);let m=CE(n,5)+f+u+h+Ic[c]|0;u=a,a=i,i=CE(s,30),s=n,n=m}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,a=a+this.D|0,u=u+this.E|0,this.set(n,s,i,a,u)}roundClean(){Ic.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}},NH=bf(()=>new ede);var tde=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),_c=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Bc=new Uint32Array(64),rde=class extends Tc{static{o(this,"SHA256")}constructor(){super(64,32,8,!1),this.A=_c[0]|0,this.B=_c[1]|0,this.C=_c[2]|0,this.D=_c[3]|0,this.E=_c[4]|0,this.F=_c[5]|0,this.G=_c[6]|0,this.H=_c[7]|0}get(){let{A:e,B:t,C:n,D:s,E:i,F:a,G:u,H:c}=this;return[e,t,n,s,i,a,u,c]}set(e,t,n,s,i,a,u,c){this.A=e|0,this.B=t|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=a|0,this.G=u|0,this.H=c|0}process(e,t){for(let m=0;m<16;m++,t+=4)Bc[m]=e.getUint32(t,!1);for(let m=16;m<64;m++){let g=Bc[m-15],x=Bc[m-2],v=da(g,7)^da(g,18)^g>>>3,w=da(x,17)^da(x,19)^x>>>10;Bc[m]=w+Bc[m-7]+v+Bc[m-16]|0}let{A:n,B:s,C:i,D:a,E:u,F:c,G:f,H:h}=this;for(let m=0;m<64;m++){let g=da(u,6)^da(u,11)^da(u,25),x=h+g+NE(u,c,f)+tde[m]+Bc[m]|0,w=(da(n,2)^da(n,13)^da(n,22))+TE(n,s,i)|0;h=f,f=c,c=u,u=a+x|0,a=i,i=s,s=n,n=x+w|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,a=a+this.D|0,u=u+this.E|0,c=c+this.F|0,f=f+this.G|0,h=h+this.H|0,this.set(n,s,i,a,u,c,f,h)}roundClean(){Bc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var qD=bf(()=>new rde);var IE=BigInt(4294967295),HD=BigInt(32);function TH(r,e=!1){return e?{h:Number(r&IE),l:Number(r>>HD&IE)}:{h:Number(r>>HD&IE)|0,l:Number(r&IE)|0}}o(TH,"fromBig");function nde(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let s=0;s<r.length;s++){let{h:i,l:a}=TH(r[s],e);[t[s],n[s]]=[i,a]}return[t,n]}o(nde,"split");var sde=o((r,e)=>BigInt(r>>>0)<<HD|BigInt(e>>>0),"toBig"),ide=o((r,e,t)=>r>>>t,"shrSH"),ade=o((r,e,t)=>r<<32-t|e>>>t,"shrSL"),ode=o((r,e,t)=>r>>>t|e<<32-t,"rotrSH"),ude=o((r,e,t)=>r<<32-t|e>>>t,"rotrSL"),cde=o((r,e,t)=>r<<64-t|e>>>t-32,"rotrBH"),lde=o((r,e,t)=>r>>>t-32|e<<64-t,"rotrBL"),fde=o((r,e)=>e,"rotr32H"),hde=o((r,e)=>r,"rotr32L"),pde=o((r,e,t)=>r<<t|e>>>32-t,"rotlSH"),dde=o((r,e,t)=>e<<t|r>>>32-t,"rotlSL"),mde=o((r,e,t)=>e<<t-32|r>>>64-t,"rotlBH"),gde=o((r,e,t)=>r<<t-32|e>>>64-t,"rotlBL");function vde(r,e,t,n){let s=(e>>>0)+(n>>>0);return{h:r+t+(s/2**32|0)|0,l:s|0}}o(vde,"add");var yde=o((r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),"add3L"),xde=o((r,e,t,n)=>e+t+n+(r/2**32|0)|0,"add3H"),wde=o((r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),"add4L"),Sde=o((r,e,t,n,s)=>e+t+n+s+(r/2**32|0)|0,"add4H"),bde=o((r,e,t,n,s)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(s>>>0),"add5L"),Ede=o((r,e,t,n,s,i)=>e+t+n+s+i+(r/2**32|0)|0,"add5H");var Ade={fromBig:TH,split:nde,toBig:sde,shrSH:ide,shrSL:ade,rotrSH:ode,rotrSL:ude,rotrBH:cde,rotrBL:lde,rotr32H:fde,rotr32L:hde,rotlSH:pde,rotlSL:dde,rotlBH:mde,rotlBL:gde,add:vde,add3L:yde,add3H:xde,add4L:wde,add4H:Sde,add5H:Ede,add5L:bde},Kt=Ade;var[Cde,Nde]=Kt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),Dc=new Uint32Array(80),Rc=new Uint32Array(80),_E=class extends Tc{static{o(this,"SHA512")}constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:t,Bh:n,Bl:s,Ch:i,Cl:a,Dh:u,Dl:c,Eh:f,El:h,Fh:m,Fl:g,Gh:x,Gl:v,Hh:w,Hl:S}=this;return[e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S]}set(e,t,n,s,i,a,u,c,f,h,m,g,x,v,w,S){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=a|0,this.Dh=u|0,this.Dl=c|0,this.Eh=f|0,this.El=h|0,this.Fh=m|0,this.Fl=g|0,this.Gh=x|0,this.Gl=v|0,this.Hh=w|0,this.Hl=S|0}process(e,t){for(let b=0;b<16;b++,t+=4)Dc[b]=e.getUint32(t),Rc[b]=e.getUint32(t+=4);for(let b=16;b<80;b++){let E=Dc[b-15]|0,C=Rc[b-15]|0,_=Kt.rotrSH(E,C,1)^Kt.rotrSH(E,C,8)^Kt.shrSH(E,C,7),M=Kt.rotrSL(E,C,1)^Kt.rotrSL(E,C,8)^Kt.shrSL(E,C,7),R=Dc[b-2]|0,q=Rc[b-2]|0,H=Kt.rotrSH(R,q,19)^Kt.rotrBH(R,q,61)^Kt.shrSH(R,q,6),K=Kt.rotrSL(R,q,19)^Kt.rotrBL(R,q,61)^Kt.shrSL(R,q,6),G=Kt.add4L(M,K,Rc[b-7],Rc[b-16]),pe=Kt.add4H(G,_,H,Dc[b-7],Dc[b-16]);Dc[b]=pe|0,Rc[b]=G|0}let{Ah:n,Al:s,Bh:i,Bl:a,Ch:u,Cl:c,Dh:f,Dl:h,Eh:m,El:g,Fh:x,Fl:v,Gh:w,Gl:S,Hh:A,Hl:N}=this;for(let b=0;b<80;b++){let E=Kt.rotrSH(m,g,14)^Kt.rotrSH(m,g,18)^Kt.rotrBH(m,g,41),C=Kt.rotrSL(m,g,14)^Kt.rotrSL(m,g,18)^Kt.rotrBL(m,g,41),_=m&x^~m&w,M=g&v^~g&S,R=Kt.add5L(N,C,M,Nde[b],Rc[b]),q=Kt.add5H(R,A,E,_,Cde[b],Dc[b]),H=R|0,K=Kt.rotrSH(n,s,28)^Kt.rotrBH(n,s,34)^Kt.rotrBH(n,s,39),G=Kt.rotrSL(n,s,28)^Kt.rotrBL(n,s,34)^Kt.rotrBL(n,s,39),pe=n&i^n&u^i&u,le=s&a^s&c^a&c;A=w|0,N=S|0,w=x|0,S=v|0,x=m|0,v=g|0,{h:m,l:g}=Kt.add(f|0,h|0,q|0,H|0),f=u|0,h=c|0,u=i|0,c=a|0,i=n|0,a=s|0;let ue=Kt.add3L(H,G,le);n=Kt.add3H(ue,q,K,pe),s=ue|0}({h:n,l:s}=Kt.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:a}=Kt.add(this.Bh|0,this.Bl|0,i|0,a|0),{h:u,l:c}=Kt.add(this.Ch|0,this.Cl|0,u|0,c|0),{h:f,l:h}=Kt.add(this.Dh|0,this.Dl|0,f|0,h|0),{h:m,l:g}=Kt.add(this.Eh|0,this.El|0,m|0,g|0),{h:x,l:v}=Kt.add(this.Fh|0,this.Fl|0,x|0,v|0),{h:w,l:S}=Kt.add(this.Gh|0,this.Gl|0,w|0,S|0),{h:A,l:N}=Kt.add(this.Hh|0,this.Hl|0,A|0,N|0),this.set(n,s,i,a,u,c,f,h,m,g,x,v,w,S,A,N)}roundClean(){Dc.fill(0),Rc.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var Tde=class extends _E{static{o(this,"SHA384")}constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}},KD=bf(()=>new _E);var $D=bf(()=>new Tde);var on=new ArrayBuffer(0),L="",Cr=class SR extends TypeError{static{o(this,"ArgumentError")}constructor(){super(...arguments),this.name=SR.NAME}static isType(e,t){if(typeof t=="string"){if(t==="Array"&&Array.isArray(e))return!0;if(t==="ArrayBuffer"&&e instanceof ArrayBuffer)return!0;if(t==="ArrayBufferView"&&ArrayBuffer.isView(e))return!0;if(typeof e===t)return!0}else if(e instanceof t)return!0;return!1}static assert(e,t,...n){for(let i of n)if(this.isType(e,i))return;let s=n.map(i=>i instanceof Function&&"name"in i?i.name:`${i}`);throw new SR(`Parameter '${t}' is not of type ${s.length>1?`(${s.join(" or ")})`:s[0]}`)}};Cr.NAME="ArgumentError";var mr=class rA extends TypeError{static{o(this,"ParameterError")}static assert(...e){let t=null,n,s;typeof e[0]=="string"?(t=e[0],n=e[1],s=e.slice(2)):(n=e[0],s=e.slice(1)),Cr.assert(n,"parameters","object");for(let i of s){let a=n[i];if(a==null)throw new rA(i,t)}}static assertEmpty(e,t,n){if(e==null)throw new rA(t,n)}constructor(e,t=null,n){super(),this.name=rA.NAME,this.field=e,t&&(this.target=t),n?this.message=n:this.message=`Absent mandatory parameter '${e}' ${t?` in '${t}'`:L}`}};mr.NAME="ParameterError";var be=class QH extends Error{static{o(this,"AsnError")}static assertSchema(e,t){if(!e.verified)throw new Error(`Object's schema was not verified against input data for ${t}`)}static assert(e,t){if(e.offset===-1)throw new QH(`Error during parsing of ASN.1 data. Data is not correct for '${t}'.`)}constructor(e){super(e),this.name="AsnError"}},_e=class{static{o(this,"PkiObject")}static blockName(){return this.CLASS_NAME}static fromBER(e){let t=Jr(e);be.assert(t,this.name);try{return new this({schema:t.result})}catch{throw new be(`Cannot create '${this.CLASS_NAME}' from ASN.1 object`)}}static defaultValues(e){throw new Error(`Invalid member name for ${this.CLASS_NAME} class: ${e}`)}static schema(e={}){throw new Error(`Method '${this.CLASS_NAME}.schema' should be overridden`)}get className(){return this.constructor.CLASS_NAME}toString(e="hex"){let t;try{t=this.toSchema()}catch{t=this.toSchema(!0)}return Et.ToString(t.toBER(),e)}};_e.CLASS_NAME="PkiObject";function Cl(r){let e=!1,t=L,n=r.trim();for(let s=0;s<n.length;s++)n.charCodeAt(s)===32?e===!1&&(e=!0):(e&&(t+=" ",e=!1),t+=n[s]);return t.toLowerCase()}o(Cl,"stringPrep");var kv="type",XD="value",bR=class Wv extends _e{static{o(this,"AttributeTypeAndValue")}constructor(e={}){super(),this.type=B(e,kv,Wv.defaultValues(kv)),this.value=B(e,XD,Wv.defaultValues(XD)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case kv:return L;case XD:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.type||L}),new xt({name:t.value||L})]})}fromSchema(e){De(e,[kv,"typeValue"]);let t=Ie(e,e,Wv.schema({names:{type:kv,value:"typeValue"}}));be.assertSchema(t,this.className),this.type=t.result.type.valueBlock.toString(),this.value=t.result.typeValue}toSchema(){return new W({value:[new rt({value:this.type}),this.value]})}toJSON(){let e={type:this.type};return Object.keys(this.value).length!==0?e.value=this.value.toJSON():e.value=this.value,e}isEqual(e){let t=[Hi.blockName(),Ed.blockName(),Ad.blockName(),wf.blockName(),Ki.blockName(),Cd.blockName(),xE.blockName(),Dv.blockName(),wE.blockName(),Rv.blockName(),SE.blockName(),bE.blockName()];if(e instanceof ArrayBuffer)return dt.isEqual(this.value.valueBeforeDecodeView,e);if(e.constructor.blockName()===Wv.blockName()){if(this.type!==e.type)return!1;let n=[!1,!1],s=this.value.constructor.blockName();for(let a of t)s===a&&(n[0]=!0),e.value.constructor.blockName()===a&&(n[1]=!0);if(n[0]!==n[1])return!1;if(n[0]&&n[1]){let a=Cl(this.value.valueBlock.value),u=Cl(e.value.valueBlock.value);if(a.localeCompare(u)!==0)return!1}else if(!dt.isEqual(this.value.valueBeforeDecodeView,e.value.valueBeforeDecodeView))return!1;return!0}return!1}};bR.CLASS_NAME="AttributeTypeAndValue";var Ef="typesAndValues",BE="valueBeforeDecode",IH="RDN",Ur=class zv extends _e{static{o(this,"RelativeDistinguishedNames")}constructor(e={}){super(),this.typesAndValues=B(e,Ef,zv.defaultValues(Ef)),this.valueBeforeDecode=B(e,BE,zv.defaultValues(BE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ef:return[];case BE:return on;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ef:return t.length===0;case BE:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.repeatedSequence||L,value:new Qr({value:[new Tt({name:t.repeatedSet||L,value:bR.schema(t.typeAndValue||{})})]})})]})}fromSchema(e){De(e,[IH,Ef]);let t=Ie(e,e,zv.schema({names:{blockName:IH,repeatedSet:Ef}}));be.assertSchema(t,this.className),Ef in t.result&&(this.typesAndValues=Array.from(t.result.typesAndValues,n=>new bR({schema:n}))),this.valueBeforeDecode=t.result.RDN.valueBeforeDecodeView.slice().buffer}toSchema(){if(this.valueBeforeDecode.byteLength===0)return new W({value:[new Qr({value:Array.from(this.typesAndValues,t=>t.toSchema())})]});let e=Jr(this.valueBeforeDecode);if(be.assert(e,"RelativeDistinguishedNames"),!(e.result instanceof W))throw new Error("ASN.1 result should be SEQUENCE");return e.result}toJSON(){return{typesAndValues:Array.from(this.typesAndValues,e=>e.toJSON())}}isEqual(e){if(e instanceof zv){if(this.typesAndValues.length!==e.typesAndValues.length)return!1;for(let[t,n]of this.typesAndValues.entries())if(n.isEqual(e.typesAndValues[t])===!1)return!1;return!0}return e instanceof ArrayBuffer?Ac(this.valueBeforeDecode,e):!1}};Ur.CLASS_NAME="RelativeDistinguishedNames";var Jv="type",Yv="value";function Ide(r={},e=!1){let t=B(r,"names",{});return new W({optional:e,value:[new oe({optional:!0,idBlock:{tagClass:2,tagNumber:1},name:t.country_name||L,value:[new Vr({value:[new wf,new Ki]})]}),new oe({optional:!0,idBlock:{tagClass:2,tagNumber:2},name:t.administration_domain_name||L,value:[new Vr({value:[new wf,new Ki]})]}),new gt({optional:!0,idBlock:{tagClass:3,tagNumber:0},name:t.network_address||L,isHexOnly:!0}),new gt({optional:!0,idBlock:{tagClass:3,tagNumber:1},name:t.terminal_identifier||L,isHexOnly:!0}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:2},name:t.private_domain_name||L,value:[new Vr({value:[new wf,new Ki]})]}),new gt({optional:!0,idBlock:{tagClass:3,tagNumber:3},name:t.organization_name||L,isHexOnly:!0}),new gt({optional:!0,name:t.numeric_user_identifier||L,idBlock:{tagClass:3,tagNumber:4},isHexOnly:!0}),new oe({optional:!0,name:t.personal_name||L,idBlock:{tagClass:3,tagNumber:5},value:[new gt({idBlock:{tagClass:3,tagNumber:0},isHexOnly:!0}),new gt({optional:!0,idBlock:{tagClass:3,tagNumber:1},isHexOnly:!0}),new gt({optional:!0,idBlock:{tagClass:3,tagNumber:2},isHexOnly:!0}),new gt({optional:!0,idBlock:{tagClass:3,tagNumber:3},isHexOnly:!0})]}),new oe({optional:!0,name:t.organizational_unit_names||L,idBlock:{tagClass:3,tagNumber:6},value:[new Tt({value:new Ki})]})]})}o(Ide,"builtInStandardAttributes");function _de(r=!1){return new W({optional:r,value:[new Ki,new Ki]})}o(_de,"builtInDomainDefinedAttributes");function Bde(r=!1){return new Qr({optional:r,value:[new gt({optional:!0,idBlock:{tagClass:3,tagNumber:0},isHexOnly:!0}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new xt]})]})}o(Bde,"extensionAttributes");var Nr=class Od extends _e{static{o(this,"GeneralName")}constructor(e={}){super(),this.type=B(e,Jv,Od.defaultValues(Jv)),this.value=B(e,Yv,Od.defaultValues(Yv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Jv:return 9;case Yv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Jv:return t===Od.defaultValues(e);case Yv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Vr({value:[new oe({idBlock:{tagClass:3,tagNumber:0},name:t.blockName||L,value:[new rt,new oe({idBlock:{tagClass:3,tagNumber:0},value:[new xt]})]}),new gt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:1}}),new gt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:2}}),new oe({idBlock:{tagClass:3,tagNumber:3},name:t.blockName||L,value:[Ide(t.builtInStandardAttributes||{},!1),_de(!0),Bde(!0)]}),new oe({idBlock:{tagClass:3,tagNumber:4},name:t.blockName||L,value:[Ur.schema(t.directoryName||{})]}),new oe({idBlock:{tagClass:3,tagNumber:5},name:t.blockName||L,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Vr({value:[new Cd,new Ki,new Ad,new Hi,new Ed]})]}),new oe({idBlock:{tagClass:3,tagNumber:1},value:[new Vr({value:[new Cd,new Ki,new Ad,new Hi,new Ed]})]})]}),new gt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:6}}),new gt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:7}}),new gt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:8}})]})}fromSchema(e){De(e,["blockName","otherName","rfc822Name","dNSName","x400Address","directoryName","ediPartyName","uniformResourceIdentifier","iPAddress","registeredID"]);let t=Ie(e,e,Od.schema({names:{blockName:"blockName",otherName:"otherName",rfc822Name:"rfc822Name",dNSName:"dNSName",x400Address:"x400Address",directoryName:{names:{blockName:"directoryName"}},ediPartyName:"ediPartyName",uniformResourceIdentifier:"uniformResourceIdentifier",iPAddress:"iPAddress",registeredID:"registeredID"}}));switch(be.assertSchema(t,this.className),this.type=t.result.blockName.idBlock.tagNumber,this.type){case 0:this.value=t.result.blockName;break;case 1:case 2:case 6:{let n=t.result.blockName;n.idBlock.tagClass=1,n.idBlock.tagNumber=22;let s=n.toBER(!1),i=Jr(s);be.assert(i,"GeneralName value"),this.value=i.result.valueBlock.value}break;case 3:this.value=t.result.blockName;break;case 4:this.value=new Ur({schema:t.result.directoryName});break;case 5:this.value=t.result.ediPartyName;break;case 7:this.value=new Ve({valueHex:t.result.blockName.valueBlock.valueHex});break;case 8:{let n=t.result.blockName;n.idBlock.tagClass=1,n.idBlock.tagNumber=6;let s=n.toBER(!1),i=Jr(s);be.assert(i,"GeneralName registeredID"),this.value=i.result.valueBlock.toString()}break}}toSchema(){switch(this.type){case 0:case 3:case 5:return new oe({idBlock:{tagClass:3,tagNumber:this.type},value:[this.value]});case 1:case 2:case 6:{let e=new Dv({value:this.value});return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}case 4:return new oe({idBlock:{tagClass:3,tagNumber:4},value:[this.value.toSchema()]});case 7:{let e=this.value;return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}case 8:{let e=new rt({value:this.value});return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.type,e}default:return Od.schema()}}toJSON(){let e={type:this.type,value:L};if(typeof this.value=="string")e.value=this.value;else try{e.value=this.value.toJSON()}catch{}return e}};Nr.CLASS_NAME="GeneralName";var Qv="accessMethod",Zv="accessLocation",Dde=[Qv,Zv],ER=class nA extends _e{static{o(this,"AccessDescription")}constructor(e={}){super(),this.accessMethod=B(e,Qv,nA.defaultValues(Qv)),this.accessLocation=B(e,Zv,nA.defaultValues(Zv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Qv:return L;case Zv:return new Nr;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.accessMethod||L}),Nr.schema(t.accessLocation||{})]})}fromSchema(e){De(e,Dde);let t=Ie(e,e,nA.schema({names:{accessMethod:Qv,accessLocation:{names:{blockName:Zv}}}}));be.assertSchema(t,this.className),this.accessMethod=t.result.accessMethod.valueBlock.toString(),this.accessLocation=new Nr({schema:t.result.accessLocation})}toSchema(){return new W({value:[new rt({value:this.accessMethod}),this.accessLocation.toSchema()]})}toJSON(){return{accessMethod:this.accessMethod,accessLocation:this.accessLocation.toJSON()}}};ER.CLASS_NAME="AccessDescription";var Pc="seconds",kc="millis",Lc="micros",Tf=class Pd extends _e{static{o(this,"Accuracy")}constructor(e={}){super(),Pc in e&&(this.seconds=B(e,Pc,Pd.defaultValues(Pc))),kc in e&&(this.millis=B(e,kc,Pd.defaultValues(kc))),Lc in e&&(this.micros=B(e,Lc,Pd.defaultValues(Lc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Pc:case kc:case Lc:return 0;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Pc:case kc:case Lc:return t===Pd.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,optional:!0,value:[new ge({optional:!0,name:t.seconds||L}),new gt({name:t.millis||L,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new gt({name:t.micros||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){De(e,[Pc,kc,Lc]);let t=Ie(e,e,Pd.schema({names:{seconds:Pc,millis:kc,micros:Lc}}));if(be.assertSchema(t,this.className),"seconds"in t.result&&(this.seconds=t.result.seconds.valueBlock.valueDec),"millis"in t.result){let n=new ge({valueHex:t.result.millis.valueBlock.valueHex});this.millis=n.valueBlock.valueDec}if("micros"in t.result){let n=new ge({valueHex:t.result.micros.valueBlock.valueHex});this.micros=n.valueBlock.valueDec}}toSchema(){let e=[];if(this.seconds!==void 0&&e.push(new ge({value:this.seconds})),this.millis!==void 0){let t=new ge({value:this.millis});e.push(new gt({idBlock:{tagClass:3,tagNumber:0},valueHex:t.valueBlock.valueHexView}))}if(this.micros!==void 0){let t=new ge({value:this.micros});e.push(new gt({idBlock:{tagClass:3,tagNumber:1},valueHex:t.valueBlock.valueHexView}))}return new W({value:e})}toJSON(){let e={};return this.seconds!==void 0&&(e.seconds=this.seconds),this.millis!==void 0&&(e.millis=this.millis),this.micros!==void 0&&(e.micros=this.micros),e}};Tf.CLASS_NAME="Accuracy";var DE="algorithmId",Lv="algorithmParams",ZH="algorithm",AR="params",Rde=[ZH,AR],ve=class e1 extends _e{static{o(this,"AlgorithmIdentifier")}constructor(e={}){super(),this.algorithmId=B(e,DE,e1.defaultValues(DE)),Lv in e&&(this.algorithmParams=B(e,Lv,e1.defaultValues(Lv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case DE:return L;case Lv:return new xt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case DE:return t===L;case Lv:return t instanceof xt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,optional:t.optional||!1,value:[new rt({name:t.algorithmIdentifier||L}),new xt({name:t.algorithmParams||L,optional:!0})]})}fromSchema(e){De(e,Rde);let t=Ie(e,e,e1.schema({names:{algorithmIdentifier:ZH,algorithmParams:AR}}));be.assertSchema(t,this.className),this.algorithmId=t.result.algorithm.valueBlock.toString(),AR in t.result&&(this.algorithmParams=t.result.params)}toSchema(){let e=[];return e.push(new rt({value:this.algorithmId})),this.algorithmParams&&!(this.algorithmParams instanceof xt)&&e.push(this.algorithmParams),new W({value:e})}toJSON(){let e={algorithmId:this.algorithmId};return this.algorithmParams&&!(this.algorithmParams instanceof xt)&&(e.algorithmParams=this.algorithmParams.toJSON()),e}isEqual(e){return!(e instanceof e1)||this.algorithmId!==e.algorithmId?!1:this.algorithmParams?e.algorithmParams?JSON.stringify(this.algorithmParams)===JSON.stringify(e.algorithmParams):!1:!e.algorithmParams}};ve.CLASS_NAME="AlgorithmIdentifier";var kd="altNames",Ode=[kd],CR=class NR extends _e{static{o(this,"AltName")}constructor(e={}){super(),this.altNames=B(e,kd,NR.defaultValues(kd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case kd:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.altNames||L,value:Nr.schema()})]})}fromSchema(e){De(e,Ode);let t=Ie(e,e,NR.schema({names:{altNames:kd}}));be.assertSchema(t,this.className),kd in t.result&&(this.altNames=Array.from(t.result.altNames,n=>new Nr({schema:n})))}toSchema(){return new W({value:Array.from(this.altNames,e=>e.toSchema())})}toJSON(){return{altNames:Array.from(this.altNames,e=>e.toJSON())}}};CR.CLASS_NAME="AltName";var Ld="type",Vd="values",Pde=[Ld,Vd],un=class sA extends _e{static{o(this,"Attribute")}constructor(e={}){super(),this.type=B(e,Ld,sA.defaultValues(Ld)),this.values=B(e,Vd,sA.defaultValues(Vd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ld:return L;case Vd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ld:return t===L;case Vd:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.type||L}),new Qr({name:t.setName||L,value:[new Tt({name:t.values||L,value:new xt})]})]})}fromSchema(e){De(e,Pde);let t=Ie(e,e,sA.schema({names:{type:Ld,values:Vd}}));be.assertSchema(t,this.className),this.type=t.result.type.valueBlock.toString(),this.values=t.result.values}toSchema(){return new W({value:[new rt({value:this.type}),new Qr({value:this.values})]})}toJSON(){return{type:this.type,values:Array.from(this.values,e=>e.toJSON())}}};un.CLASS_NAME="Attribute";var t1="notBeforeTime",r1="notAfterTime",kde=[t1,r1],qh=class iA extends _e{static{o(this,"AttCertValidityPeriod")}constructor(e={}){super(),this.notBeforeTime=B(e,t1,iA.defaultValues(t1)),this.notAfterTime=B(e,r1,iA.defaultValues(r1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case t1:case r1:return new Date(0,0,0);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Lr({name:t.notBeforeTime||L}),new Lr({name:t.notAfterTime||L})]})}fromSchema(e){De(e,kde);let t=Ie(e,e,iA.schema({names:{notBeforeTime:t1,notAfterTime:r1}}));be.assertSchema(t,this.className),this.notBeforeTime=t.result.notBeforeTime.toDate(),this.notAfterTime=t.result.notAfterTime.toDate()}toSchema(){return new W({value:[new Lr({valueDate:this.notBeforeTime}),new Lr({valueDate:this.notAfterTime})]})}toJSON(){return{notBeforeTime:this.notBeforeTime,notAfterTime:this.notAfterTime}}};qh.CLASS_NAME="AttCertValidityPeriod";var Vv="names",_H="generalNames",Jn=class TR extends _e{static{o(this,"GeneralNames")}constructor(e={}){super(),this.names=B(e,Vv,TR.defaultValues(Vv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case"names":return[];default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=B(e,Vv,{});return new W({optional:t,name:n.blockName||L,value:[new Tt({name:n.generalNames||L,value:Nr.schema()})]})}fromSchema(e){De(e,[Vv,_H]);let t=Ie(e,e,TR.schema({names:{blockName:Vv,generalNames:_H}}));be.assertSchema(t,this.className),this.names=Array.from(t.result.generalNames,n=>new Nr({schema:n}))}toSchema(){return new W({value:Array.from(this.names,e=>e.toSchema())})}toJSON(){return{names:Array.from(this.names,e=>e.toJSON())}}};Jn.CLASS_NAME="GeneralNames";var Lde="2.5.29.9",Vde="2.5.29.14",Ude="2.5.29.15",jde="2.5.29.16",eK="2.5.29.17",tK="2.5.29.18",IO="2.5.29.19",Fde="2.5.29.20",Mde="2.5.29.27",qde="2.5.29.21",Hde="2.5.29.24",rK="2.5.29.28",nK="2.5.29.29",sK="2.5.29.30",iK="2.5.29.31",_O="2.5.29.46",aK="2.5.29.32",$i="2.5.29.32.0",Kde="1.3.6.1.4.1.311.21.10",oK="2.5.29.33",BO="2.5.29.35",uK="2.5.29.36",$de="2.5.29.37",Xde="2.5.29.54",DO="1.3.6.1.5.5.7.1.1",Gde="1.3.6.1.5.5.7.1.11",Wde="1.3.6.1.4.1.11129.2.4.2";var zde="1.3.6.1.4.1.311.21.7",Jde="1.3.6.1.4.1.311.21.1",Yde="1.3.6.1.5.5.7.1.3",RO="1.2.840.113549.1.7.1",cK="1.2.840.113549.1.7.2",lK="1.2.840.113549.1.7.3",fK="1.2.840.113549.1.7.6",Qde="1.2.840.113549.1.9.16.1.4",BH="1.2.840.113549.1.9.22.1",Zde="1.2.840.113549.1.9.22.2",DH="1.2.840.113549.1.9.22.3",RH="1.2.840.113549.1.9.23.1",eme="1.3.6.1.5.5.7",OO=`${eme}.48`,aA=`${OO}.1.1`,R_e=`${OO}.2`,O_e=`${OO}.1`;var If="keyIdentifier",_f="authorityCertIssuer",Bf="authorityCertSerialNumber",tme=[If,_f,Bf],PO=class n1 extends _e{static{o(this,"AuthorityKeyIdentifier")}constructor(e={}){super(),If in e&&(this.keyIdentifier=B(e,If,n1.defaultValues(If))),_f in e&&(this.authorityCertIssuer=B(e,_f,n1.defaultValues(_f))),Bf in e&&(this.authorityCertSerialNumber=B(e,Bf,n1.defaultValues(Bf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case If:return new Ve;case _f:return[];case Bf:return new ge;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new gt({name:t.keyIdentifier||L,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.authorityCertIssuer||L,value:Nr.schema()})]}),new gt({name:t.authorityCertSerialNumber||L,optional:!0,idBlock:{tagClass:3,tagNumber:2}})]})}fromSchema(e){De(e,tme);let t=Ie(e,e,n1.schema({names:{keyIdentifier:If,authorityCertIssuer:_f,authorityCertSerialNumber:Bf}}));be.assertSchema(t,this.className),If in t.result&&(this.keyIdentifier=new Ve({valueHex:t.result.keyIdentifier.valueBlock.valueHex})),_f in t.result&&(this.authorityCertIssuer=Array.from(t.result.authorityCertIssuer,n=>new Nr({schema:n}))),Bf in t.result&&(this.authorityCertSerialNumber=new ge({valueHex:t.result.authorityCertSerialNumber.valueBlock.valueHex}))}toSchema(){let e=[];return this.keyIdentifier&&e.push(new gt({idBlock:{tagClass:3,tagNumber:0},valueHex:this.keyIdentifier.valueBlock.valueHexView})),this.authorityCertIssuer&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.authorityCertIssuer,t=>t.toSchema())})),this.authorityCertSerialNumber&&e.push(new gt({idBlock:{tagClass:3,tagNumber:2},valueHex:this.authorityCertSerialNumber.valueBlock.valueHexView})),new W({value:e})}toJSON(){let e={};return this.keyIdentifier&&(e.keyIdentifier=this.keyIdentifier.toJSON()),this.authorityCertIssuer&&(e.authorityCertIssuer=Array.from(this.authorityCertIssuer,t=>t.toJSON())),this.authorityCertSerialNumber&&(e.authorityCertSerialNumber=this.authorityCertSerialNumber.toJSON()),e}};PO.CLASS_NAME="AuthorityKeyIdentifier";var Af="pathLenConstraint",Cf="cA",kO=class oA extends _e{static{o(this,"BasicConstraints")}constructor(e={}){super(),this.cA=B(e,Cf,!1),Af in e&&(this.pathLenConstraint=B(e,Af,0)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Cf:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new pa({optional:!0,name:t.cA||L}),new ge({optional:!0,name:t.pathLenConstraint||L})]})}fromSchema(e){De(e,[Cf,Af]);let t=Ie(e,e,oA.schema({names:{cA:Cf,pathLenConstraint:Af}}));be.assertSchema(t,this.className),Cf in t.result&&(this.cA=t.result.cA.valueBlock.value),Af in t.result&&(t.result.pathLenConstraint.valueBlock.isHexOnly?this.pathLenConstraint=t.result.pathLenConstraint:this.pathLenConstraint=t.result.pathLenConstraint.valueBlock.valueDec)}toSchema(){let e=[];return this.cA!==oA.defaultValues(Cf)&&e.push(new pa({value:this.cA})),Af in this&&(this.pathLenConstraint instanceof ge?e.push(this.pathLenConstraint):e.push(new ge({value:this.pathLenConstraint}))),new W({value:e})}toJSON(){let e={};return this.cA!==oA.defaultValues(Cf)&&(e.cA=this.cA),Af in this&&(this.pathLenConstraint instanceof ge?e.pathLenConstraint=this.pathLenConstraint.toJSON():e.pathLenConstraint=this.pathLenConstraint),e}};kO.CLASS_NAME="BasicConstraints";var GD="certificateIndex",WD="keyIndex",hK=class IR extends _e{static{o(this,"CAVersion")}constructor(e={}){super(),this.certificateIndex=B(e,GD,IR.defaultValues(GD)),this.keyIndex=B(e,WD,IR.defaultValues(WD)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case GD:case WD:return 0;default:return super.defaultValues(e)}}static schema(){return new ge}fromSchema(e){if(e.constructor.blockName()!==ge.blockName())throw new Error("Object's schema was not verified against input data for CAVersion");let t=e.valueBlock.valueHex.slice(0),n=new Uint8Array(t);switch(!0){case t.byteLength<4:{let m=new ArrayBuffer(4);new Uint8Array(m).set(n,4-t.byteLength),t=m.slice(0)}break;case t.byteLength>4:{let m=new ArrayBuffer(4);new Uint8Array(m).set(n.slice(0,4)),t=m.slice(0)}break}let s=t.slice(0,2),i=new Uint8Array(s),a=i[0];i[0]=i[1],i[1]=a;let u=new Uint16Array(s);this.keyIndex=u[0];let c=t.slice(2),f=new Uint8Array(c);a=f[0],f[0]=f[1],f[1]=a;let h=new Uint16Array(c);this.certificateIndex=h[0]}toSchema(){let e=new ArrayBuffer(2),t=new Uint16Array(e);t[0]=this.certificateIndex;let n=new Uint8Array(e),s=n[0];n[0]=n[1],n[1]=s;let i=new ArrayBuffer(2),a=new Uint16Array(i);a[0]=this.keyIndex;let u=new Uint8Array(i);return s=u[0],u[0]=u[1],u[1]=s,new ge({valueHex:vf(i,e)})}toJSON(){return{certificateIndex:this.certificateIndex,keyIndex:this.keyIndex}}};hK.CLASS_NAME="CAVersion";var s1="policyQualifierId",i1="qualifier",rme=[s1,i1],_R=class uA extends _e{static{o(this,"PolicyQualifierInfo")}constructor(e={}){super(),this.policyQualifierId=B(e,s1,uA.defaultValues(s1)),this.qualifier=B(e,i1,uA.defaultValues(i1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case s1:return L;case i1:return new xt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.policyQualifierId||L}),new xt({name:t.qualifier||L})]})}fromSchema(e){De(e,rme);let t=Ie(e,e,uA.schema({names:{policyQualifierId:s1,qualifier:i1}}));be.assertSchema(t,this.className),this.policyQualifierId=t.result.policyQualifierId.valueBlock.toString(),this.qualifier=t.result.qualifier}toSchema(){return new W({value:[new rt({value:this.policyQualifierId}),this.qualifier]})}toJSON(){return{policyQualifierId:this.policyQualifierId,qualifier:this.qualifier.toJSON()}}};_R.CLASS_NAME="PolicyQualifierInfo";var a1="policyIdentifier",Df="policyQualifiers",nme=[a1,Df],BR=class cA extends _e{static{o(this,"PolicyInformation")}constructor(e={}){super(),this.policyIdentifier=B(e,a1,cA.defaultValues(a1)),Df in e&&(this.policyQualifiers=B(e,Df,cA.defaultValues(Df))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case a1:return L;case Df:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.policyIdentifier||L}),new W({optional:!0,value:[new Tt({name:t.policyQualifiers||L,value:_R.schema()})]})]})}fromSchema(e){De(e,nme);let t=Ie(e,e,cA.schema({names:{policyIdentifier:a1,policyQualifiers:Df}}));be.assertSchema(t,this.className),this.policyIdentifier=t.result.policyIdentifier.valueBlock.toString(),Df in t.result&&(this.policyQualifiers=Array.from(t.result.policyQualifiers,n=>new _R({schema:n})))}toSchema(){let e=[];return e.push(new rt({value:this.policyIdentifier})),this.policyQualifiers&&e.push(new W({value:Array.from(this.policyQualifiers,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={policyIdentifier:this.policyIdentifier};return this.policyQualifiers&&(e.policyQualifiers=Array.from(this.policyQualifiers,t=>t.toJSON())),e}};BR.CLASS_NAME="PolicyInformation";var o1="certificatePolicies",sme=[o1],DR=class RR extends _e{static{o(this,"CertificatePolicies")}constructor(e={}){super(),this.certificatePolicies=B(e,o1,RR.defaultValues(o1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case o1:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.certificatePolicies||L,value:BR.schema()})]})}fromSchema(e){De(e,sme);let t=Ie(e,e,RR.schema({names:{certificatePolicies:o1}}));be.assertSchema(t,this.className),this.certificatePolicies=Array.from(t.result.certificatePolicies,n=>new BR({schema:n}))}toSchema(){return new W({value:Array.from(this.certificatePolicies,e=>e.toSchema())})}toJSON(){return{certificatePolicies:Array.from(this.certificatePolicies,e=>e.toJSON())}}};DR.CLASS_NAME="CertificatePolicies";var u1="templateID",Zo="templateMajorVersion",eu="templateMinorVersion",ime=[u1,Zo,eu],ame=class c1 extends _e{static{o(this,"CertificateTemplate")}constructor(e={}){super(),this.templateID=B(e,u1,c1.defaultValues(u1)),Zo in e&&(this.templateMajorVersion=B(e,Zo,c1.defaultValues(Zo))),eu in e&&(this.templateMinorVersion=B(e,eu,c1.defaultValues(eu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case u1:return L;case Zo:case eu:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.templateID||L}),new ge({name:t.templateMajorVersion||L,optional:!0}),new ge({name:t.templateMinorVersion||L,optional:!0})]})}fromSchema(e){De(e,ime);let t=Ie(e,e,c1.schema({names:{templateID:u1,templateMajorVersion:Zo,templateMinorVersion:eu}}));be.assertSchema(t,this.className),this.templateID=t.result.templateID.valueBlock.toString(),Zo in t.result&&(this.templateMajorVersion=t.result.templateMajorVersion.valueBlock.valueDec),eu in t.result&&(this.templateMinorVersion=t.result.templateMinorVersion.valueBlock.valueDec)}toSchema(){let e=[];return e.push(new rt({value:this.templateID})),Zo in this&&e.push(new ge({value:this.templateMajorVersion})),eu in this&&e.push(new ge({value:this.templateMinorVersion})),new W({value:e})}toJSON(){let e={templateID:this.templateID};return Zo in this&&(e.templateMajorVersion=this.templateMajorVersion),eu in this&&(e.templateMinorVersion=this.templateMinorVersion),e}},Rf="distributionPoint",pK="distributionPointNames",Of="reasons",Pf="cRLIssuer",dK="cRLIssuerNames",ome=[Rf,pK,Of,Pf,dK],OR=class l1 extends _e{static{o(this,"DistributionPoint")}constructor(e={}){super(),Rf in e&&(this.distributionPoint=B(e,Rf,l1.defaultValues(Rf))),Of in e&&(this.reasons=B(e,Of,l1.defaultValues(Of))),Pf in e&&(this.cRLIssuer=B(e,Pf,l1.defaultValues(Pf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Rf:return[];case Of:return new Ht;case Pf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Vr({value:[new oe({name:t.distributionPoint||L,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.distributionPointNames||L,value:Nr.schema()})]}),new oe({name:t.distributionPoint||L,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Ur.schema().valueBlock.value})]})]}),new gt({name:t.reasons||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new oe({name:t.cRLIssuer||L,optional:!0,idBlock:{tagClass:3,tagNumber:2},value:[new Tt({name:t.cRLIssuerNames||L,value:Nr.schema()})]})]})}fromSchema(e){De(e,ome);let t=Ie(e,e,l1.schema({names:{distributionPoint:Rf,distributionPointNames:pK,reasons:Of,cRLIssuer:Pf,cRLIssuerNames:dK}}));be.assertSchema(t,this.className),Rf in t.result&&(t.result.distributionPoint.idBlock.tagNumber===0&&(this.distributionPoint=Array.from(t.result.distributionPointNames,n=>new Nr({schema:n}))),t.result.distributionPoint.idBlock.tagNumber===1&&(this.distributionPoint=new Ur({schema:new W({value:t.result.distributionPoint.valueBlock.value})}))),Of in t.result&&(this.reasons=new Ht({valueHex:t.result.reasons.valueBlock.valueHex})),Pf in t.result&&(this.cRLIssuer=Array.from(t.result.cRLIssuerNames,n=>new Nr({schema:n})))}toSchema(){let e=[];if(this.distributionPoint){let t;this.distributionPoint instanceof Array?t=new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.distributionPoint,n=>n.toSchema())}):t=new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.distributionPoint.toSchema()]}),e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[t]}))}return this.reasons&&e.push(new gt({idBlock:{tagClass:3,tagNumber:1},valueHex:this.reasons.valueBlock.valueHexView})),this.cRLIssuer&&e.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:Array.from(this.cRLIssuer,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={};return this.distributionPoint&&(this.distributionPoint instanceof Array?e.distributionPoint=Array.from(this.distributionPoint,t=>t.toJSON()):e.distributionPoint=this.distributionPoint.toJSON()),this.reasons&&(e.reasons=this.reasons.toJSON()),this.cRLIssuer&&(e.cRLIssuer=Array.from(this.cRLIssuer,t=>t.toJSON())),e}};OR.CLASS_NAME="DistributionPoint";var f1="distributionPoints",ume=[f1],PR=class kR extends _e{static{o(this,"CRLDistributionPoints")}constructor(e={}){super(),this.distributionPoints=B(e,f1,kR.defaultValues(f1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case f1:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.distributionPoints||L,value:OR.schema()})]})}fromSchema(e){De(e,ume);let t=Ie(e,e,kR.schema({names:{distributionPoints:f1}}));be.assertSchema(t,this.className),this.distributionPoints=Array.from(t.result.distributionPoints,n=>new OR({schema:n}))}toSchema(){return new W({value:Array.from(this.distributionPoints,e=>e.toSchema())})}toJSON(){return{distributionPoints:Array.from(this.distributionPoints,e=>e.toJSON())}}};PR.CLASS_NAME="CRLDistributionPoints";var h1="keyPurposes",cme=[h1],mK=class LR extends _e{static{o(this,"ExtKeyUsage")}constructor(e={}){super(),this.keyPurposes=B(e,h1,LR.defaultValues(h1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case h1:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.keyPurposes||L,value:new rt})]})}fromSchema(e){De(e,cme);let t=Ie(e,e,LR.schema({names:{keyPurposes:h1}}));be.assertSchema(t,this.className),this.keyPurposes=Array.from(t.result.keyPurposes,n=>n.valueBlock.toString())}toSchema(){return new W({value:Array.from(this.keyPurposes,e=>new rt({value:e}))})}toJSON(){return{keyPurposes:Array.from(this.keyPurposes)}}};mK.CLASS_NAME="ExtKeyUsage";var Uv="accessDescriptions",VR=class UR extends _e{static{o(this,"InfoAccess")}constructor(e={}){super(),this.accessDescriptions=B(e,Uv,UR.defaultValues(Uv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Uv:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.accessDescriptions||L,value:ER.schema()})]})}fromSchema(e){De(e,[Uv]);let t=Ie(e,e,UR.schema({names:{accessDescriptions:Uv}}));be.assertSchema(t,this.className),this.accessDescriptions=Array.from(t.result.accessDescriptions,n=>new ER({schema:n}))}toSchema(){return new W({value:Array.from(this.accessDescriptions,e=>e.toSchema())})}toJSON(){return{accessDescriptions:Array.from(this.accessDescriptions,e=>e.toJSON())}}};VR.CLASS_NAME="InfoAccess";var kf="distributionPoint",gK="distributionPointNames",Vc="onlyContainsUserCerts",Uc="onlyContainsCACerts",jc="onlySomeReasons",Fc="indirectCRL",Mc="onlyContainsAttributeCerts",lme=[kf,gK,Vc,Uc,jc,Fc,Mc],vK=class hs extends _e{static{o(this,"IssuingDistributionPoint")}constructor(e={}){super(),kf in e&&(this.distributionPoint=B(e,kf,hs.defaultValues(kf))),this.onlyContainsUserCerts=B(e,Vc,hs.defaultValues(Vc)),this.onlyContainsCACerts=B(e,Uc,hs.defaultValues(Uc)),jc in e&&(this.onlySomeReasons=B(e,jc,hs.defaultValues(jc))),this.indirectCRL=B(e,Fc,hs.defaultValues(Fc)),this.onlyContainsAttributeCerts=B(e,Mc,hs.defaultValues(Mc)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case kf:return[];case Vc:return!1;case Uc:return!1;case jc:return 0;case Fc:return!1;case Mc:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Vr({value:[new oe({name:t.distributionPoint||L,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.distributionPointNames||L,value:Nr.schema()})]}),new oe({name:t.distributionPoint||L,idBlock:{tagClass:3,tagNumber:1},value:Ur.schema().valueBlock.value})]})]}),new gt({name:t.onlyContainsUserCerts||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new gt({name:t.onlyContainsCACerts||L,optional:!0,idBlock:{tagClass:3,tagNumber:2}}),new gt({name:t.onlySomeReasons||L,optional:!0,idBlock:{tagClass:3,tagNumber:3}}),new gt({name:t.indirectCRL||L,optional:!0,idBlock:{tagClass:3,tagNumber:4}}),new gt({name:t.onlyContainsAttributeCerts||L,optional:!0,idBlock:{tagClass:3,tagNumber:5}})]})}fromSchema(e){De(e,lme);let t=Ie(e,e,hs.schema({names:{distributionPoint:kf,distributionPointNames:gK,onlyContainsUserCerts:Vc,onlyContainsCACerts:Uc,onlySomeReasons:jc,indirectCRL:Fc,onlyContainsAttributeCerts:Mc}}));if(be.assertSchema(t,this.className),kf in t.result)switch(!0){case t.result.distributionPoint.idBlock.tagNumber===0:this.distributionPoint=Array.from(t.result.distributionPointNames,n=>new Nr({schema:n}));break;case t.result.distributionPoint.idBlock.tagNumber===1:this.distributionPoint=new Ur({schema:new W({value:t.result.distributionPoint.valueBlock.value})});break;default:throw new Error("Unknown tagNumber for distributionPoint: {$asn1.result.distributionPoint.idBlock.tagNumber}")}if(Vc in t.result){let n=new Uint8Array(t.result.onlyContainsUserCerts.valueBlock.valueHex);this.onlyContainsUserCerts=n[0]!==0}if(Uc in t.result){let n=new Uint8Array(t.result.onlyContainsCACerts.valueBlock.valueHex);this.onlyContainsCACerts=n[0]!==0}if(jc in t.result){let n=new Uint8Array(t.result.onlySomeReasons.valueBlock.valueHex);this.onlySomeReasons=n[0]}if(Fc in t.result){let n=new Uint8Array(t.result.indirectCRL.valueBlock.valueHex);this.indirectCRL=n[0]!==0}if(Mc in t.result){let n=new Uint8Array(t.result.onlyContainsAttributeCerts.valueBlock.valueHex);this.onlyContainsAttributeCerts=n[0]!==0}}toSchema(){let e=[];if(this.distributionPoint){let t;this.distributionPoint instanceof Array?t=new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.distributionPoint,n=>n.toSchema())}):(t=this.distributionPoint.toSchema(),t.idBlock.tagClass=3,t.idBlock.tagNumber=1),e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[t]}))}if(this.onlyContainsUserCerts!==hs.defaultValues(Vc)&&e.push(new gt({idBlock:{tagClass:3,tagNumber:1},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsCACerts!==hs.defaultValues(Uc)&&e.push(new gt({idBlock:{tagClass:3,tagNumber:2},valueHex:new Uint8Array([255]).buffer})),this.onlySomeReasons!==void 0){let t=new ArrayBuffer(1),n=new Uint8Array(t);n[0]=this.onlySomeReasons,e.push(new gt({idBlock:{tagClass:3,tagNumber:3},valueHex:t}))}return this.indirectCRL!==hs.defaultValues(Fc)&&e.push(new gt({idBlock:{tagClass:3,tagNumber:4},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsAttributeCerts!==hs.defaultValues(Mc)&&e.push(new gt({idBlock:{tagClass:3,tagNumber:5},valueHex:new Uint8Array([255]).buffer})),new W({value:e})}toJSON(){let e={};return this.distributionPoint&&(this.distributionPoint instanceof Array?e.distributionPoint=Array.from(this.distributionPoint,t=>t.toJSON()):e.distributionPoint=this.distributionPoint.toJSON()),this.onlyContainsUserCerts!==hs.defaultValues(Vc)&&(e.onlyContainsUserCerts=this.onlyContainsUserCerts),this.onlyContainsCACerts!==hs.defaultValues(Uc)&&(e.onlyContainsCACerts=this.onlyContainsCACerts),jc in this&&(e.onlySomeReasons=this.onlySomeReasons),this.indirectCRL!==hs.defaultValues(Fc)&&(e.indirectCRL=this.indirectCRL),this.onlyContainsAttributeCerts!==hs.defaultValues(Mc)&&(e.onlyContainsAttributeCerts=this.onlyContainsAttributeCerts),e}};vK.CLASS_NAME="IssuingDistributionPoint";var p1="base",Ud="minimum",qc="maximum",fme=[p1,Ud,qc],d1=class m1 extends _e{static{o(this,"GeneralSubtree")}constructor(e={}){super(),this.base=B(e,p1,m1.defaultValues(p1)),this.minimum=B(e,Ud,m1.defaultValues(Ud)),qc in e&&(this.maximum=B(e,qc,m1.defaultValues(qc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case p1:return new Nr;case Ud:return 0;case qc:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Nr.schema(t.base||{}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({name:t.minimum||L})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new ge({name:t.maximum||L})]})]})}fromSchema(e){De(e,fme);let t=Ie(e,e,m1.schema({names:{base:{names:{blockName:p1}},minimum:Ud,maximum:qc}}));be.assertSchema(t,this.className),this.base=new Nr({schema:t.result.base}),Ud in t.result&&(t.result.minimum.valueBlock.isHexOnly?this.minimum=t.result.minimum:this.minimum=t.result.minimum.valueBlock.valueDec),qc in t.result&&(t.result.maximum.valueBlock.isHexOnly?this.maximum=t.result.maximum:this.maximum=t.result.maximum.valueBlock.valueDec)}toSchema(){let e=[];if(e.push(this.base.toSchema()),this.minimum!==0){let t=0;this.minimum instanceof ge?t=this.minimum:t=new ge({value:this.minimum}),e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[t]}))}if(qc in this){let t=0;this.maximum instanceof ge?t=this.maximum:t=new ge({value:this.maximum}),e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[t]}))}return new W({value:e})}toJSON(){let e={base:this.base.toJSON()};return this.minimum!==0&&(typeof this.minimum=="number"?e.minimum=this.minimum:e.minimum=this.minimum.toJSON()),this.maximum!==void 0&&(typeof this.maximum=="number"?e.maximum=this.maximum:e.maximum=this.maximum.toJSON()),e}};d1.CLASS_NAME="GeneralSubtree";var Lf="permittedSubtrees",Vf="excludedSubtrees",hme=[Lf,Vf],yK=class lA extends _e{static{o(this,"NameConstraints")}constructor(e={}){super(),Lf in e&&(this.permittedSubtrees=B(e,Lf,lA.defaultValues(Lf))),Vf in e&&(this.excludedSubtrees=B(e,Vf,lA.defaultValues(Vf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Lf:case Vf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.permittedSubtrees||L,value:d1.schema()})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.excludedSubtrees||L,value:d1.schema()})]})]})}fromSchema(e){De(e,hme);let t=Ie(e,e,lA.schema({names:{permittedSubtrees:Lf,excludedSubtrees:Vf}}));be.assertSchema(t,this.className),Lf in t.result&&(this.permittedSubtrees=Array.from(t.result.permittedSubtrees,n=>new d1({schema:n}))),Vf in t.result&&(this.excludedSubtrees=Array.from(t.result.excludedSubtrees,n=>new d1({schema:n})))}toSchema(){let e=[];return this.permittedSubtrees&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.permittedSubtrees,t=>t.toSchema())})),this.excludedSubtrees&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.excludedSubtrees,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={};return this.permittedSubtrees&&(e.permittedSubtrees=Array.from(this.permittedSubtrees,t=>t.toJSON())),this.excludedSubtrees&&(e.excludedSubtrees=Array.from(this.excludedSubtrees,t=>t.toJSON())),e}};yK.CLASS_NAME="NameConstraints";var tu="requireExplicitPolicy",ru="inhibitPolicyMapping",pme=[tu,ru],xK=class fA extends _e{static{o(this,"PolicyConstraints")}constructor(e={}){super(),tu in e&&(this.requireExplicitPolicy=B(e,tu,fA.defaultValues(tu))),ru in e&&(this.inhibitPolicyMapping=B(e,ru,fA.defaultValues(ru))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case tu:return 0;case ru:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new gt({name:t.requireExplicitPolicy||L,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new gt({name:t.inhibitPolicyMapping||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){De(e,pme);let t=Ie(e,e,fA.schema({names:{requireExplicitPolicy:tu,inhibitPolicyMapping:ru}}));if(be.assertSchema(t,this.className),tu in t.result){let n=t.result.requireExplicitPolicy;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=Jr(s);be.assert(i,"Integer"),this.requireExplicitPolicy=i.result.valueBlock.valueDec}if(ru in t.result){let n=t.result.inhibitPolicyMapping;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=Jr(s);be.assert(i,"Integer"),this.inhibitPolicyMapping=i.result.valueBlock.valueDec}}toSchema(){let e=[];if(tu in this){let t=new ge({value:this.requireExplicitPolicy});t.idBlock.tagClass=3,t.idBlock.tagNumber=0,e.push(t)}if(ru in this){let t=new ge({value:this.inhibitPolicyMapping});t.idBlock.tagClass=3,t.idBlock.tagNumber=1,e.push(t)}return new W({value:e})}toJSON(){let e={};return tu in this&&(e.requireExplicitPolicy=this.requireExplicitPolicy),ru in this&&(e.inhibitPolicyMapping=this.inhibitPolicyMapping),e}};xK.CLASS_NAME="PolicyConstraints";var g1="issuerDomainPolicy",v1="subjectDomainPolicy",dme=[g1,v1],jR=class hA extends _e{static{o(this,"PolicyMapping")}constructor(e={}){super(),this.issuerDomainPolicy=B(e,g1,hA.defaultValues(g1)),this.subjectDomainPolicy=B(e,v1,hA.defaultValues(v1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case g1:return L;case v1:return L;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.issuerDomainPolicy||L}),new rt({name:t.subjectDomainPolicy||L})]})}fromSchema(e){De(e,dme);let t=Ie(e,e,hA.schema({names:{issuerDomainPolicy:g1,subjectDomainPolicy:v1}}));be.assertSchema(t,this.className),this.issuerDomainPolicy=t.result.issuerDomainPolicy.valueBlock.toString(),this.subjectDomainPolicy=t.result.subjectDomainPolicy.valueBlock.toString()}toSchema(){return new W({value:[new rt({value:this.issuerDomainPolicy}),new rt({value:this.subjectDomainPolicy})]})}toJSON(){return{issuerDomainPolicy:this.issuerDomainPolicy,subjectDomainPolicy:this.subjectDomainPolicy}}};jR.CLASS_NAME="PolicyMapping";var y1="mappings",mme=[y1],wK=class FR extends _e{static{o(this,"PolicyMappings")}constructor(e={}){super(),this.mappings=B(e,y1,FR.defaultValues(y1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case y1:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.mappings||L,value:jR.schema()})]})}fromSchema(e){De(e,mme);let t=Ie(e,e,FR.schema({names:{mappings:y1}}));be.assertSchema(t,this.className),this.mappings=Array.from(t.result.mappings,n=>new jR({schema:n}))}toSchema(){return new W({value:Array.from(this.mappings,e=>e.toSchema())})}toJSON(){return{mappings:Array.from(this.mappings,e=>e.toJSON())}}};wK.CLASS_NAME="PolicyMappings";var Hc="notBefore",Kc="notAfter",gme=[Hc,Kc],SK=class pA extends _e{static{o(this,"PrivateKeyUsagePeriod")}constructor(e={}){super(),Hc in e&&(this.notBefore=B(e,Hc,pA.defaultValues(Hc))),Kc in e&&(this.notAfter=B(e,Kc,pA.defaultValues(Kc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Hc:return new Date;case Kc:return new Date;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new gt({name:t.notBefore||L,optional:!0,idBlock:{tagClass:3,tagNumber:0}}),new gt({name:t.notAfter||L,optional:!0,idBlock:{tagClass:3,tagNumber:1}})]})}fromSchema(e){De(e,gme);let t=Ie(e,e,pA.schema({names:{notBefore:Hc,notAfter:Kc}}));if(be.assertSchema(t,this.className),Hc in t.result){let n=new Lr;n.fromBuffer(t.result.notBefore.valueBlock.valueHex),this.notBefore=n.toDate()}if(Kc in t.result){let n=new Lr({valueHex:t.result.notAfter.valueBlock.valueHex});n.fromBuffer(t.result.notAfter.valueBlock.valueHex),this.notAfter=n.toDate()}}toSchema(){let e=[];return Hc in this&&e.push(new gt({idBlock:{tagClass:3,tagNumber:0},valueHex:new Lr({valueDate:this.notBefore}).valueBlock.valueHexView})),Kc in this&&e.push(new gt({idBlock:{tagClass:3,tagNumber:1},valueHex:new Lr({valueDate:this.notAfter}).valueBlock.valueHexView})),new W({value:e})}toJSON(){let e={};return this.notBefore&&(e.notBefore=this.notBefore),this.notAfter&&(e.notAfter=this.notAfter),e}};SK.CLASS_NAME="PrivateKeyUsagePeriod";var jd="id",nu="type",Fd="values",vme=[jd,nu],yme=[Fd],MR=class dA extends _e{static{o(this,"QCStatement")}constructor(e={}){super(),this.id=B(e,jd,dA.defaultValues(jd)),nu in e&&(this.type=B(e,nu,dA.defaultValues(nu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case jd:return L;case nu:return new Yr;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case jd:return t===L;case nu:return t instanceof Yr;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.id||L}),new xt({name:t.type||L,optional:!0})]})}fromSchema(e){De(e,vme);let t=Ie(e,e,dA.schema({names:{id:jd,type:nu}}));be.assertSchema(t,this.className),this.id=t.result.id.valueBlock.toString(),nu in t.result&&(this.type=t.result.type)}toSchema(){let e=[new rt({value:this.id})];return nu in this&&e.push(this.type),new W({value:e})}toJSON(){let e={id:this.id};return this.type&&(e.type=this.type.toJSON()),e}};MR.CLASS_NAME="QCStatement";var bK=class qR extends _e{static{o(this,"QCStatements")}constructor(e={}){super(),this.values=B(e,Fd,qR.defaultValues(Fd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Fd:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.values||L,value:MR.schema(t.value||{})})]})}fromSchema(e){De(e,yme);let t=Ie(e,e,qR.schema({names:{values:Fd}}));be.assertSchema(t,this.className),this.values=Array.from(t.result.values,n=>new MR({schema:n}))}toSchema(){return new W({value:Array.from(this.values,e=>e.toSchema())})}toJSON(){return{values:Array.from(this.values,e=>e.toJSON())}}};bK.CLASS_NAME="QCStatements";var Uf,Tl=class{static{o(this,"ECNamedCurves")}static register(e,t,n){this.namedCurves[e.toLowerCase()]=this.namedCurves[t]={name:e,id:t,size:n}}static find(e){return this.namedCurves[e.toLowerCase()]||null}};Uf=Tl;Tl.namedCurves={};Uf.register("P-256","1.2.840.10045.3.1.7",32),Uf.register("P-384","1.3.132.0.34",48),Uf.register("P-521","1.3.132.0.35",66),Uf.register("brainpoolP256r1","1.3.36.3.3.2.8.1.1.7",32),Uf.register("brainpoolP384r1","1.3.36.3.3.2.8.1.1.11",48),Uf.register("brainpoolP512r1","1.3.36.3.3.2.8.1.1.13",64);var RE="x",OE="y",PE="namedCurve",vu=class Md extends _e{static{o(this,"ECPublicKey")}constructor(e={}){super(),this.x=B(e,RE,Md.defaultValues(RE)),this.y=B(e,OE,Md.defaultValues(OE)),this.namedCurve=B(e,PE,Md.defaultValues(PE)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case RE:case OE:return on;case PE:return L;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case RE:case OE:return t instanceof ArrayBuffer&&Ac(t,Md.defaultValues(e));case PE:return typeof t=="string"&&t===Md.defaultValues(e);default:return super.defaultValues(e)}}static schema(){return new Ov}fromSchema(e){let t=dt.toUint8Array(e);if(t[0]!==4)throw new Error("Object's schema was not verified against input data for ECPublicKey");let n=Tl.find(this.namedCurve);if(!n)throw new Error(`Incorrect curve OID: ${this.namedCurve}`);let s=n.size;if(t.byteLength!==s*2+1)throw new Error("Object's schema was not verified against input data for ECPublicKey");this.namedCurve=n.name,this.x=t.slice(1,s+1).buffer,this.y=t.slice(1+s,s*2+1).buffer}toSchema(){return new Ov({data:vf(new Uint8Array([4]).buffer,this.x,this.y)})}toJSON(){let e=Tl.find(this.namedCurve);return{crv:e?e.name:this.namedCurve,x:gE(Nv(this.x),!0,!0,!1),y:gE(Nv(this.y),!0,!0,!1)}}fromJSON(e){mr.assert("json",e,"crv","x","y");let t=0,n=Tl.find(e.crv);n&&(this.namedCurve=n.id,t=n.size);let s=yf(bd(e.x,!0));if(s.byteLength<t){this.x=new ArrayBuffer(t);let a=new Uint8Array(this.x),u=new Uint8Array(s);a.set(u,1)}else this.x=s.slice(0,t);let i=yf(bd(e.y,!0));if(i.byteLength<t){this.y=new ArrayBuffer(t);let a=new Uint8Array(this.y),u=new Uint8Array(i);a.set(u,1)}else this.y=i.slice(0,t)}};vu.CLASS_NAME="ECPublicKey";var x1="modulus",w1="publicExponent",xme=[x1,w1],HR=class mA extends _e{static{o(this,"RSAPublicKey")}constructor(e={}){super(),this.modulus=B(e,x1,mA.defaultValues(x1)),this.publicExponent=B(e,w1,mA.defaultValues(w1)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case x1:return new ge;case w1:return new ge;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.modulus||L}),new ge({name:t.publicExponent||L})]})}fromSchema(e){De(e,xme);let t=Ie(e,e,mA.schema({names:{modulus:x1,publicExponent:w1}}));be.assertSchema(t,this.className),this.modulus=t.result.modulus.convertFromDER(256),this.publicExponent=t.result.publicExponent}toSchema(){return new W({value:[this.modulus.convertToDER(),this.publicExponent]})}toJSON(){return{n:Et.ToBase64Url(this.modulus.valueBlock.valueHexView),e:Et.ToBase64Url(this.publicExponent.valueBlock.valueHexView)}}fromJSON(e){mr.assert("json",e,"n","e");let t=yf(bd(e.n,!0));this.modulus=new ge({valueHex:t.slice(0,Math.pow(2,v7(t.byteLength)))}),this.publicExponent=new ge({valueHex:yf(bd(e.e,!0)).slice(0,3)})}};HR.CLASS_NAME="RSAPublicKey";var S1="algorithm",b1="subjectPublicKey",wme=[S1,b1],ba=class gA extends _e{static{o(this,"PublicKeyInfo")}get parsedKey(){if(this._parsedKey===void 0){switch(this.algorithm.algorithmId){case"1.2.840.10045.2.1":if("algorithmParams"in this.algorithm&&this.algorithm.algorithmParams.constructor.blockName()===rt.blockName())try{this._parsedKey=new vu({namedCurve:this.algorithm.algorithmParams.valueBlock.toString(),schema:this.subjectPublicKey.valueBlock.valueHexView})}catch{}break;case"1.2.840.113549.1.1.1":{let e=Jr(this.subjectPublicKey.valueBlock.valueHexView);if(e.offset!==-1)try{this._parsedKey=new HR({schema:e.result})}catch{}}break}this._parsedKey||(this._parsedKey=null)}return this._parsedKey||void 0}set parsedKey(e){this._parsedKey=e}constructor(e={}){super(),this.algorithm=B(e,S1,gA.defaultValues(S1)),this.subjectPublicKey=B(e,b1,gA.defaultValues(b1));let t=B(e,"parsedKey",null);t&&(this.parsedKey=t),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case S1:return new ve;case b1:return new Ht;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.algorithm||{}),new Ht({name:t.subjectPublicKey||L})]})}fromSchema(e){De(e,wme);let t=Ie(e,e,gA.schema({names:{algorithm:{names:{blockName:S1}},subjectPublicKey:b1}}));be.assertSchema(t,this.className),this.algorithm=new ve({schema:t.result.algorithm}),this.subjectPublicKey=t.result.subjectPublicKey}toSchema(){return new W({value:[this.algorithm.toSchema(),this.subjectPublicKey]})}toJSON(){if(!this.parsedKey)return{algorithm:this.algorithm.toJSON(),subjectPublicKey:this.subjectPublicKey.toJSON()};let e={};switch(this.algorithm.algorithmId){case"1.2.840.10045.2.1":e.kty="EC";break;case"1.2.840.113549.1.1.1":e.kty="RSA";break}let t=this.parsedKey.toJSON();return Object.assign(e,t),e}fromJSON(e){if("kty"in e){switch(e.kty.toUpperCase()){case"EC":this.parsedKey=new vu({json:e}),this.algorithm=new ve({algorithmId:"1.2.840.10045.2.1",algorithmParams:new rt({value:this.parsedKey.namedCurve})});break;case"RSA":this.parsedKey=new HR({json:e}),this.algorithm=new ve({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new Yr});break;default:throw new Error(`Invalid value for "kty" parameter: ${e.kty}`)}this.subjectPublicKey=new Ht({valueHex:this.parsedKey.toSchema().toBER(!1)})}}async importKey(e,t=Dt(!0)){try{if(!e)throw new Error("Need to provide publicKey input parameter");let n=await t.exportKey("spki",e),s=Jr(n);try{this.fromSchema(s.result)}catch{throw new Error("Error during initializing object from schema")}}catch(n){let s=n instanceof Error?n.message:`${n}`;throw new Error(`Error during exporting public key: ${s}`)}}};ba.CLASS_NAME="PublicKeyInfo";var qd="version",Hd="privateKey",ma="namedCurve",$c="publicKey",Sme=[qd,Hd,ma,$c],KR=class su extends _e{static{o(this,"ECPrivateKey")}constructor(e={}){super(),this.version=B(e,qd,su.defaultValues(qd)),this.privateKey=B(e,Hd,su.defaultValues(Hd)),ma in e&&(this.namedCurve=B(e,ma,su.defaultValues(ma))),$c in e&&(this.publicKey=B(e,$c,su.defaultValues($c))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qd:return 1;case Hd:return new Ve;case ma:return L;case $c:return new vu;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case qd:return t===su.defaultValues(e);case Hd:return t.isEqual(su.defaultValues(e));case ma:return t===L;case $c:return vu.compareWithDefault(ma,t.namedCurve)&&vu.compareWithDefault("x",t.x)&&vu.compareWithDefault("y",t.y);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new Ve({name:t.privateKey||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new rt({name:t.namedCurve||L})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Ht({name:t.publicKey||L})]})]})}fromSchema(e){De(e,Sme);let t=Ie(e,e,su.schema({names:{version:qd,privateKey:Hd,namedCurve:ma,publicKey:$c}}));if(be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.privateKey=t.result.privateKey,ma in t.result&&(this.namedCurve=t.result.namedCurve.valueBlock.toString()),$c in t.result){let n={schema:t.result.publicKey.valueBlock.valueHex};ma in this&&(n.namedCurve=this.namedCurve),this.publicKey=new vu(n)}}toSchema(){let e=[new ge({value:this.version}),this.privateKey];return this.namedCurve&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new rt({value:this.namedCurve})]})),this.publicKey&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[new Ht({valueHex:this.publicKey.toSchema().toBER(!1)})]})),new W({value:e})}toJSON(){if(!this.namedCurve||su.compareWithDefault(ma,this.namedCurve))throw new Error('Not enough information for making JSON: absent "namedCurve" value');let e=Tl.find(this.namedCurve),t={crv:e?e.name:this.namedCurve,d:Et.ToBase64Url(this.privateKey.valueBlock.valueHexView)};if(this.publicKey){let n=this.publicKey.toJSON();t.x=n.x,t.y=n.y}return t}fromJSON(e){mr.assert("json",e,"crv","d");let t=0,n=Tl.find(e.crv);n&&(this.namedCurve=n.id,t=n.size);let s=Et.FromBase64Url(e.d);if(s.byteLength<t){let i=new ArrayBuffer(t),a=new Uint8Array(i),u=new Uint8Array(s);a.set(u,1),this.privateKey=new Ve({valueHex:i})}else this.privateKey=new Ve({valueHex:s.slice(0,t)});e.x&&e.y&&(this.publicKey=new vu({json:e}))}};KR.CLASS_NAME="ECPrivateKey";var E1="prime",A1="exponent",C1="coefficient",bme=[E1,A1,C1],vA=class N1 extends _e{static{o(this,"OtherPrimeInfo")}constructor(e={}){super(),this.prime=B(e,E1,N1.defaultValues(E1)),this.exponent=B(e,A1,N1.defaultValues(A1)),this.coefficient=B(e,C1,N1.defaultValues(C1)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case E1:return new ge;case A1:return new ge;case C1:return new ge;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.prime||L}),new ge({name:t.exponent||L}),new ge({name:t.coefficient||L})]})}fromSchema(e){De(e,bme);let t=Ie(e,e,N1.schema({names:{prime:E1,exponent:A1,coefficient:C1}}));be.assertSchema(t,this.className),this.prime=t.result.prime.convertFromDER(),this.exponent=t.result.exponent.convertFromDER(),this.coefficient=t.result.coefficient.convertFromDER()}toSchema(){return new W({value:[this.prime.convertToDER(),this.exponent.convertToDER(),this.coefficient.convertToDER()]})}toJSON(){return{r:Et.ToBase64Url(this.prime.valueBlock.valueHexView),d:Et.ToBase64Url(this.exponent.valueBlock.valueHexView),t:Et.ToBase64Url(this.coefficient.valueBlock.valueHexView)}}fromJSON(e){mr.assert("json",e,"r","d","r"),this.prime=new ge({valueHex:Et.FromBase64Url(e.r)}),this.exponent=new ge({valueHex:Et.FromBase64Url(e.d)}),this.coefficient=new ge({valueHex:Et.FromBase64Url(e.t)})}};vA.CLASS_NAME="OtherPrimeInfo";var T1="version",I1="modulus",_1="publicExponent",B1="privateExponent",D1="prime1",R1="prime2",O1="exponent1",P1="exponent2",k1="coefficient",jf="otherPrimeInfos",Eme=[T1,I1,_1,B1,D1,R1,O1,P1,k1,jf],$R=class Xi extends _e{static{o(this,"RSAPrivateKey")}constructor(e={}){super(),this.version=B(e,T1,Xi.defaultValues(T1)),this.modulus=B(e,I1,Xi.defaultValues(I1)),this.publicExponent=B(e,_1,Xi.defaultValues(_1)),this.privateExponent=B(e,B1,Xi.defaultValues(B1)),this.prime1=B(e,D1,Xi.defaultValues(D1)),this.prime2=B(e,R1,Xi.defaultValues(R1)),this.exponent1=B(e,O1,Xi.defaultValues(O1)),this.exponent2=B(e,P1,Xi.defaultValues(P1)),this.coefficient=B(e,k1,Xi.defaultValues(k1)),jf in e&&(this.otherPrimeInfos=B(e,jf,Xi.defaultValues(jf))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case T1:return 0;case I1:return new ge;case _1:return new ge;case B1:return new ge;case D1:return new ge;case R1:return new ge;case O1:return new ge;case P1:return new ge;case k1:return new ge;case jf:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new ge({name:t.modulus||L}),new ge({name:t.publicExponent||L}),new ge({name:t.privateExponent||L}),new ge({name:t.prime1||L}),new ge({name:t.prime2||L}),new ge({name:t.exponent1||L}),new ge({name:t.exponent2||L}),new ge({name:t.coefficient||L}),new W({optional:!0,value:[new Tt({name:t.otherPrimeInfosName||L,value:vA.schema(t.otherPrimeInfo||{})})]})]})}fromSchema(e){De(e,Eme);let t=Ie(e,e,Xi.schema({names:{version:T1,modulus:I1,publicExponent:_1,privateExponent:B1,prime1:D1,prime2:R1,exponent1:O1,exponent2:P1,coefficient:k1,otherPrimeInfo:{names:{blockName:jf}}}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.modulus=t.result.modulus.convertFromDER(256),this.publicExponent=t.result.publicExponent,this.privateExponent=t.result.privateExponent.convertFromDER(256),this.prime1=t.result.prime1.convertFromDER(128),this.prime2=t.result.prime2.convertFromDER(128),this.exponent1=t.result.exponent1.convertFromDER(128),this.exponent2=t.result.exponent2.convertFromDER(128),this.coefficient=t.result.coefficient.convertFromDER(128),jf in t.result&&(this.otherPrimeInfos=Array.from(t.result.otherPrimeInfos,n=>new vA({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(this.modulus.convertToDER()),e.push(this.publicExponent),e.push(this.privateExponent.convertToDER()),e.push(this.prime1.convertToDER()),e.push(this.prime2.convertToDER()),e.push(this.exponent1.convertToDER()),e.push(this.exponent2.convertToDER()),e.push(this.coefficient.convertToDER()),this.otherPrimeInfos&&e.push(new W({value:Array.from(this.otherPrimeInfos,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={n:Et.ToBase64Url(this.modulus.valueBlock.valueHexView),e:Et.ToBase64Url(this.publicExponent.valueBlock.valueHexView),d:Et.ToBase64Url(this.privateExponent.valueBlock.valueHexView),p:Et.ToBase64Url(this.prime1.valueBlock.valueHexView),q:Et.ToBase64Url(this.prime2.valueBlock.valueHexView),dp:Et.ToBase64Url(this.exponent1.valueBlock.valueHexView),dq:Et.ToBase64Url(this.exponent2.valueBlock.valueHexView),qi:Et.ToBase64Url(this.coefficient.valueBlock.valueHexView)};return this.otherPrimeInfos&&(e.oth=Array.from(this.otherPrimeInfos,t=>t.toJSON())),e}fromJSON(e){mr.assert("json",e,"n","e","d","p","q","dp","dq","qi"),this.modulus=new ge({valueHex:Et.FromBase64Url(e.n)}),this.publicExponent=new ge({valueHex:Et.FromBase64Url(e.e)}),this.privateExponent=new ge({valueHex:Et.FromBase64Url(e.d)}),this.prime1=new ge({valueHex:Et.FromBase64Url(e.p)}),this.prime2=new ge({valueHex:Et.FromBase64Url(e.q)}),this.exponent1=new ge({valueHex:Et.FromBase64Url(e.dp)}),this.exponent2=new ge({valueHex:Et.FromBase64Url(e.dq)}),this.coefficient=new ge({valueHex:Et.FromBase64Url(e.qi)}),e.oth&&(this.otherPrimeInfos=Array.from(e.oth,t=>new vA({json:t})))}};$R.CLASS_NAME="RSAPrivateKey";var L1="version",V1="privateKeyAlgorithm",U1="privateKey",Ff="attributes",kE="parsedKey",Ame=[L1,V1,U1,Ff],Cx=class Mf extends _e{static{o(this,"PrivateKeyInfo")}constructor(e={}){super(),this.version=B(e,L1,Mf.defaultValues(L1)),this.privateKeyAlgorithm=B(e,V1,Mf.defaultValues(V1)),this.privateKey=B(e,U1,Mf.defaultValues(U1)),Ff in e&&(this.attributes=B(e,Ff,Mf.defaultValues(Ff))),kE in e&&(this.parsedKey=B(e,kE,Mf.defaultValues(kE))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case L1:return 0;case V1:return new ve;case U1:return new Ve;case Ff:return[];case kE:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),ve.schema(t.privateKeyAlgorithm||{}),new Ve({name:t.privateKey||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.attributes||L,value:un.schema()})]})]})}fromSchema(e){De(e,Ame);let t=Ie(e,e,Mf.schema({names:{version:L1,privateKeyAlgorithm:{names:{blockName:V1}},privateKey:U1,attributes:Ff}}));switch(be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.privateKeyAlgorithm=new ve({schema:t.result.privateKeyAlgorithm}),this.privateKey=t.result.privateKey,Ff in t.result&&(this.attributes=Array.from(t.result.attributes,n=>new un({schema:n}))),this.privateKeyAlgorithm.algorithmId){case"1.2.840.113549.1.1.1":{let n=Jr(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new $R({schema:n.result}))}break;case"1.2.840.10045.2.1":if("algorithmParams"in this.privateKeyAlgorithm&&this.privateKeyAlgorithm.algorithmParams instanceof rt){let n=Jr(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new KR({namedCurve:this.privateKeyAlgorithm.algorithmParams.valueBlock.toString(),schema:n.result}))}break}}toSchema(){let e=[new ge({value:this.version}),this.privateKeyAlgorithm.toSchema(),this.privateKey];return this.attributes&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.attributes,t=>t.toSchema())})),new W({value:e})}toJSON(){if(!this.parsedKey){let n={version:this.version,privateKeyAlgorithm:this.privateKeyAlgorithm.toJSON(),privateKey:this.privateKey.toJSON()};return this.attributes&&(n.attributes=Array.from(this.attributes,s=>s.toJSON())),n}let e={};switch(this.privateKeyAlgorithm.algorithmId){case"1.2.840.10045.2.1":e.kty="EC";break;case"1.2.840.113549.1.1.1":e.kty="RSA";break}let t=this.parsedKey.toJSON();return Object.assign(e,t),e}fromJSON(e){if("kty"in e){switch(e.kty.toUpperCase()){case"EC":this.parsedKey=new KR({json:e}),this.privateKeyAlgorithm=new ve({algorithmId:"1.2.840.10045.2.1",algorithmParams:new rt({value:this.parsedKey.namedCurve})});break;case"RSA":this.parsedKey=new $R({json:e}),this.privateKeyAlgorithm=new ve({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new Yr});break;default:throw new Error(`Invalid value for "kty" parameter: ${e.kty}`)}this.privateKey=new Ve({valueHex:this.parsedKey.toSchema().toBER(!1)})}}};Cx.CLASS_NAME="PrivateKeyInfo";var Kd="contentType",$d="contentEncryptionAlgorithm",qf="encryptedContent",Cme=[Kd,$d,qf],OH=1024,ps=class j1 extends _e{static{o(this,"EncryptedContentInfo")}constructor(e={}){if(super(),this.contentType=B(e,Kd,j1.defaultValues(Kd)),this.contentEncryptionAlgorithm=B(e,$d,j1.defaultValues($d)),qf in e&&e.encryptedContent&&(this.encryptedContent=e.encryptedContent,this.encryptedContent.idBlock.tagClass===1&&this.encryptedContent.idBlock.tagNumber===4&&this.encryptedContent.idBlock.isConstructed===!1&&!e.disableSplit)){let t=new Ve({idBlock:{isConstructed:!0},isConstructed:!0}),n=0,s=this.encryptedContent.valueBlock.valueHexView.slice().buffer,i=s.byteLength;for(;i>0;){let a=new Uint8Array(s,n,n+OH>s.byteLength?s.byteLength-n:OH),u=new ArrayBuffer(a.length),c=new Uint8Array(u);for(let f=0;f<c.length;f++)c[f]=a[f];t.valueBlock.value.push(new Ve({valueHex:u})),i-=a.length,n+=a.length}this.encryptedContent=t}e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Kd:return L;case $d:return new ve;case qf:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Kd:return t===L;case $d:return t.algorithmId===L&&!("algorithmParams"in t);case qf:return t.isEqual(j1.defaultValues(qf));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.contentType||L}),ve.schema(t.contentEncryptionAlgorithm||{}),new Vr({value:[new oe({name:t.encryptedContent||L,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({value:new Ve})]}),new gt({name:t.encryptedContent||L,idBlock:{tagClass:3,tagNumber:0}})]})]})}fromSchema(e){De(e,Cme);let t=Ie(e,e,j1.schema({names:{contentType:Kd,contentEncryptionAlgorithm:{names:{blockName:$d}},encryptedContent:qf}}));be.assertSchema(t,this.className),this.contentType=t.result.contentType.valueBlock.toString(),this.contentEncryptionAlgorithm=new ve({schema:t.result.contentEncryptionAlgorithm}),qf in t.result&&(this.encryptedContent=t.result.encryptedContent,this.encryptedContent.idBlock.tagClass=1,this.encryptedContent.idBlock.tagNumber=4)}toSchema(){let e={isIndefiniteForm:!1},t=[];if(t.push(new rt({value:this.contentType})),t.push(this.contentEncryptionAlgorithm.toSchema()),this.encryptedContent){e.isIndefiniteForm=this.encryptedContent.idBlock.isConstructed;let n=this.encryptedContent;n.idBlock.tagClass=3,n.idBlock.tagNumber=0,n.lenBlock.isIndefiniteForm=this.encryptedContent.idBlock.isConstructed,t.push(n)}return new W({lenBlock:e,value:t})}toJSON(){let e={contentType:this.contentType,contentEncryptionAlgorithm:this.contentEncryptionAlgorithm.toJSON()};return this.encryptedContent&&(e.encryptedContent=this.encryptedContent.toJSON()),e}getEncryptedContent(){if(!this.encryptedContent)throw new Error("Parameter 'encryptedContent' is undefined");return Ve.prototype.getValue.call(this.encryptedContent)}};ps.CLASS_NAME="EncryptedContentInfo";var Xc="hashAlgorithm",Gc="maskGenAlgorithm",Wc="saltLength",zc="trailerField",Nme=[Xc,Gc,Wc,zc],yA=class Js extends _e{static{o(this,"RSASSAPSSParams")}constructor(e={}){super(),this.hashAlgorithm=B(e,Xc,Js.defaultValues(Xc)),this.maskGenAlgorithm=B(e,Gc,Js.defaultValues(Gc)),this.saltLength=B(e,Wc,Js.defaultValues(Wc)),this.trailerField=B(e,zc,Js.defaultValues(zc)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Xc:return new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Yr});case Gc:return new ve({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Yr}).toSchema()});case Wc:return 20;case zc:return 1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[ve.schema(t.hashAlgorithm||{})]}),new oe({idBlock:{tagClass:3,tagNumber:1},optional:!0,value:[ve.schema(t.maskGenAlgorithm||{})]}),new oe({idBlock:{tagClass:3,tagNumber:2},optional:!0,value:[new ge({name:t.saltLength||L})]}),new oe({idBlock:{tagClass:3,tagNumber:3},optional:!0,value:[new ge({name:t.trailerField||L})]})]})}fromSchema(e){De(e,Nme);let t=Ie(e,e,Js.schema({names:{hashAlgorithm:{names:{blockName:Xc}},maskGenAlgorithm:{names:{blockName:Gc}},saltLength:Wc,trailerField:zc}}));be.assertSchema(t,this.className),Xc in t.result&&(this.hashAlgorithm=new ve({schema:t.result.hashAlgorithm})),Gc in t.result&&(this.maskGenAlgorithm=new ve({schema:t.result.maskGenAlgorithm})),Wc in t.result&&(this.saltLength=t.result.saltLength.valueBlock.valueDec),zc in t.result&&(this.trailerField=t.result.trailerField.valueBlock.valueDec)}toSchema(){let e=[];return this.hashAlgorithm.isEqual(Js.defaultValues(Xc))||e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual(Js.defaultValues(Gc))||e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.saltLength!==Js.defaultValues(Wc)&&e.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[new ge({value:this.saltLength})]})),this.trailerField!==Js.defaultValues(zc)&&e.push(new oe({idBlock:{tagClass:3,tagNumber:3},value:[new ge({value:this.trailerField})]})),new W({value:e})}toJSON(){let e={};return this.hashAlgorithm.isEqual(Js.defaultValues(Xc))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual(Js.defaultValues(Gc))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.saltLength!==Js.defaultValues(Wc)&&(e.saltLength=this.saltLength),this.trailerField!==Js.defaultValues(zc)&&(e.trailerField=this.trailerField),e}};yA.CLASS_NAME="RSASSAPSSParams";var Xd="salt",F1="iterationCount",ga="keyLength",iu="prf",Tme=[Xd,F1,ga,iu],h0=class uo extends _e{static{o(this,"PBKDF2Params")}constructor(e={}){super(),this.salt=B(e,Xd,uo.defaultValues(Xd)),this.iterationCount=B(e,F1,uo.defaultValues(F1)),ga in e&&(this.keyLength=B(e,ga,uo.defaultValues(ga))),iu in e&&(this.prf=B(e,iu,uo.defaultValues(iu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Xd:return{};case F1:return-1;case ga:return 0;case iu:return new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Yr});default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Vr({value:[new Ve({name:t.saltPrimitive||L}),ve.schema(t.saltConstructed||{})]}),new ge({name:t.iterationCount||L}),new ge({name:t.keyLength||L,optional:!0}),ve.schema(t.prf||{names:{optional:!0}})]})}fromSchema(e){De(e,Tme);let t=Ie(e,e,uo.schema({names:{saltPrimitive:Xd,saltConstructed:{names:{blockName:Xd}},iterationCount:F1,keyLength:ga,prf:{names:{blockName:iu,optional:!0}}}}));be.assertSchema(t,this.className),this.salt=t.result.salt,this.iterationCount=t.result.iterationCount.valueBlock.valueDec,ga in t.result&&(this.keyLength=t.result.keyLength.valueBlock.valueDec),iu in t.result&&(this.prf=new ve({schema:t.result.prf}))}toSchema(){let e=[];return e.push(this.salt),e.push(new ge({value:this.iterationCount})),ga in this&&uo.defaultValues(ga)!==this.keyLength&&e.push(new ge({value:this.keyLength})),this.prf&&uo.defaultValues(iu).isEqual(this.prf)===!1&&e.push(this.prf.toSchema()),new W({value:e})}toJSON(){let e={salt:this.salt.toJSON(),iterationCount:this.iterationCount};return ga in this&&uo.defaultValues(ga)!==this.keyLength&&(e.keyLength=this.keyLength),this.prf&&uo.defaultValues(iu).isEqual(this.prf)===!1&&(e.prf=this.prf.toJSON()),e}};h0.CLASS_NAME="PBKDF2Params";var M1="keyDerivationFunc",q1="encryptionScheme",Ime=[M1,q1],XR=class xA extends _e{static{o(this,"PBES2Params")}constructor(e={}){super(),this.keyDerivationFunc=B(e,M1,xA.defaultValues(M1)),this.encryptionScheme=B(e,q1,xA.defaultValues(q1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case M1:return new ve;case q1:return new ve;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.keyDerivationFunc||{}),ve.schema(t.encryptionScheme||{})]})}fromSchema(e){De(e,Ime);let t=Ie(e,e,xA.schema({names:{keyDerivationFunc:{names:{blockName:M1}},encryptionScheme:{names:{blockName:q1}}}}));be.assertSchema(t,this.className),this.keyDerivationFunc=new ve({schema:t.result.keyDerivationFunc}),this.encryptionScheme=new ve({schema:t.result.encryptionScheme})}toSchema(){return new W({value:[this.keyDerivationFunc.toSchema(),this.encryptionScheme.toSchema()]})}toJSON(){return{keyDerivationFunc:this.keyDerivationFunc.toJSON(),encryptionScheme:this.encryptionScheme.toJSON()}}};XR.CLASS_NAME="PBES2Params";var _me=class{static{o(this,"AbstractCryptoEngine")}constructor(e){this.crypto=e.crypto,this.subtle="webkitSubtle"in e.crypto?e.crypto.webkitSubtle:e.crypto.subtle,this.name=B(e,"name",L)}async encrypt(...e){return this.subtle.encrypt(...e)}async decrypt(...e){return this.subtle.decrypt(...e)}sign(...e){return this.subtle.sign(...e)}async verify(...e){return this.subtle.verify(...e)}async digest(...e){return this.subtle.digest(...e)}async generateKey(...e){return this.subtle.generateKey(...e)}async deriveKey(...e){return this.subtle.deriveKey(...e)}async deriveBits(...e){return this.subtle.deriveBits(...e)}async wrapKey(...e){return this.subtle.wrapKey(...e)}async unwrapKey(...e){return this.subtle.unwrapKey(...e)}exportKey(...e){return this.subtle.exportKey(...e)}importKey(...e){return this.subtle.importKey(...e)}getRandomValues(e){if(e===null)throw new Error('Argument "array" must not be null');return this.crypto.getRandomValues(e)}};async function PH(r,e,t,n,s){let i,a,u;switch(r.toUpperCase()){case"SHA-1":i=20,a=64,u=NH;break;case"SHA-256":i=32,a=64,u=qD;break;case"SHA-384":i=48,a=128,u=$D;break;case"SHA-512":i=64,a=128,u=KD;break;default:throw new Error("Unsupported hashing algorithm")}let c=new Uint8Array(t),f=new TextDecoder().decode(t);new TextEncoder().encode(f).some((E,C)=>E!==c[C])&&(f=String.fromCharCode(...c));let m=new Uint8Array(f.length*2+2),g=new DataView(m.buffer);for(let E=0;E<f.length;E++)g.setUint16(E*2,f.charCodeAt(E),!1);g.setUint16(f.length*2,0,!1);let x=new Uint8Array(a).fill(3),v=new Uint8Array(n),w=new Uint8Array(a*Math.ceil(v.length/a)).map((E,C)=>v[C%v.length]),S=new Uint8Array(a*Math.ceil(m.length/a)).map((E,C)=>m[C%m.length]),A=new Uint8Array(w.length+S.length);A.set(w),A.set(S,w.length);let N=Math.ceil((e>>3)/i),b=[];for(let E=0;E<N;E++){let C=new Uint8Array(x.length+A.length);C.set(x),C.set(A,x.length);for(let q=0;q<s;q++)C=u(C);let _=new Uint8Array(a).map((q,H)=>C[H%C.length]),M=Math.ceil(v.length/a)+Math.ceil(m.length/a),R=[];for(let q=0;q<M;q++){let H=Array.from(A.slice(q*a,(q+1)*a)),K=511;for(let G=_.length-1;G>=0;G--)K>>=8,K+=_[G]+(H[G]||0),H[G]=K&255;R.push(...H)}A=new Uint8Array(R),b.push(...C)}return new Uint8Array(b.slice(0,e>>3)).buffer}o(PH,"makePKCS12B2Key");function EK(r){let e=typeof r=="string"?{name:r}:r;return"hash"in e?{...e,hash:EK(e.hash)}:e}o(EK,"prepareAlgorithm");var d0=class extends _me{static{o(this,"CryptoEngine")}async importKey(e,t,n,s,i){var a,u,c,f,h,m;let g={},x=EK(n);switch(e.toLowerCase()){case"raw":return this.subtle.importKey("raw",t,n,s,i);case"spki":{let v=Jr(dt.toArrayBuffer(t));be.assert(v,"keyData");let w=new ba;try{w.fromSchema(v.result)}catch{throw new Cr("Incorrect keyData")}switch(x.name.toUpperCase()){case"RSA-PSS":{if(!x.hash)throw new mr("hash","algorithm.hash","Incorrect hash algorithm: Hash algorithm is missed");switch(x.hash.name.toUpperCase()){case"SHA-1":g.alg="PS1";break;case"SHA-256":g.alg="PS256";break;case"SHA-384":g.alg="PS384";break;case"SHA-512":g.alg="PS512";break;default:throw new Error(`Incorrect hash algorithm: ${x.hash.name.toUpperCase()}`)}}case"RSASSA-PKCS1-V1_5":{if(i=["verify"],g.kty="RSA",g.ext=s,g.key_ops=i,w.algorithm.algorithmId!=="1.2.840.113549.1.1.1")throw new Error(`Incorrect public key algorithm: ${w.algorithm.algorithmId}`);if(!g.alg){if(!x.hash)throw new mr("hash","algorithm.hash","Incorrect hash algorithm: Hash algorithm is missed");switch(x.hash.name.toUpperCase()){case"SHA-1":g.alg="RS1";break;case"SHA-256":g.alg="RS256";break;case"SHA-384":g.alg="RS384";break;case"SHA-512":g.alg="RS512";break;default:throw new Error(`Incorrect hash algorithm: ${x.hash.name.toUpperCase()}`)}}let S=w.toJSON();Object.assign(g,S)}break;case"ECDSA":i=["verify"];case"ECDH":{if(g={kty:"EC",ext:s,key_ops:i},w.algorithm.algorithmId!=="1.2.840.10045.2.1")throw new Error(`Incorrect public key algorithm: ${w.algorithm.algorithmId}`);let S=w.toJSON();Object.assign(g,S)}break;case"RSA-OAEP":{if(g.kty="RSA",g.ext=s,g.key_ops=i,this.name.toLowerCase()==="safari")g.alg="RSA-OAEP";else{if(!x.hash)throw new mr("hash","algorithm.hash","Incorrect hash algorithm: Hash algorithm is missed");switch(x.hash.name.toUpperCase()){case"SHA-1":g.alg="RSA-OAEP";break;case"SHA-256":g.alg="RSA-OAEP-256";break;case"SHA-384":g.alg="RSA-OAEP-384";break;case"SHA-512":g.alg="RSA-OAEP-512";break;default:throw new Error(`Incorrect hash algorithm: ${x.hash.name.toUpperCase()}`)}}let S=w.toJSON();Object.assign(g,S)}break;case"RSAES-PKCS1-V1_5":{g.kty="RSA",g.ext=s,g.key_ops=i,g.alg="PS1";let S=w.toJSON();Object.assign(g,S)}break;default:throw new Error(`Incorrect algorithm name: ${x.name.toUpperCase()}`)}}break;case"pkcs8":{let v=new Cx,w=Jr(dt.toArrayBuffer(t));be.assert(w,"keyData");try{v.fromSchema(w.result)}catch{throw new Error("Incorrect keyData")}if(!v.parsedKey)throw new Error("Incorrect keyData");switch(x.name.toUpperCase()){case"RSA-PSS":switch((a=x.hash)===null||a===void 0?void 0:a.name.toUpperCase()){case"SHA-1":g.alg="PS1";break;case"SHA-256":g.alg="PS256";break;case"SHA-384":g.alg="PS384";break;case"SHA-512":g.alg="PS512";break;default:throw new Error(`Incorrect hash algorithm: ${(u=x.hash)===null||u===void 0?void 0:u.name.toUpperCase()}`)}case"RSASSA-PKCS1-V1_5":{if(i=["sign"],g.kty="RSA",g.ext=s,g.key_ops=i,v.privateKeyAlgorithm.algorithmId!=="1.2.840.113549.1.1.1")throw new Error(`Incorrect private key algorithm: ${v.privateKeyAlgorithm.algorithmId}`);if(!("alg"in g))switch((c=x.hash)===null||c===void 0?void 0:c.name.toUpperCase()){case"SHA-1":g.alg="RS1";break;case"SHA-256":g.alg="RS256";break;case"SHA-384":g.alg="RS384";break;case"SHA-512":g.alg="RS512";break;default:throw new Error(`Incorrect hash algorithm: ${(f=x.hash)===null||f===void 0?void 0:f.name.toUpperCase()}`)}let S=v.toJSON();Object.assign(g,S)}break;case"ECDSA":i=["sign"];case"ECDH":{if(g={kty:"EC",ext:s,key_ops:i},v.privateKeyAlgorithm.algorithmId!=="1.2.840.10045.2.1")throw new Error(`Incorrect algorithm: ${v.privateKeyAlgorithm.algorithmId}`);let S=v.toJSON();Object.assign(g,S)}break;case"RSA-OAEP":{if(g.kty="RSA",g.ext=s,g.key_ops=i,this.name.toLowerCase()==="safari")g.alg="RSA-OAEP";else switch((h=x.hash)===null||h===void 0?void 0:h.name.toUpperCase()){case"SHA-1":g.alg="RSA-OAEP";break;case"SHA-256":g.alg="RSA-OAEP-256";break;case"SHA-384":g.alg="RSA-OAEP-384";break;case"SHA-512":g.alg="RSA-OAEP-512";break;default:throw new Error(`Incorrect hash algorithm: ${(m=x.hash)===null||m===void 0?void 0:m.name.toUpperCase()}`)}let S=v.toJSON();Object.assign(g,S)}break;case"RSAES-PKCS1-V1_5":{i=["decrypt"],g.kty="RSA",g.ext=s,g.key_ops=i,g.alg="PS1";let S=v.toJSON();Object.assign(g,S)}break;default:throw new Error(`Incorrect algorithm name: ${x.name.toUpperCase()}`)}}break;case"jwk":g=t;break;default:throw new Error(`Incorrect format: ${e}`)}if(this.name.toLowerCase()==="safari")try{return this.subtle.importKey("jwk",yf(JSON.stringify(g)),n,s,i)}catch{return this.subtle.importKey("jwk",g,n,s,i)}return this.subtle.importKey("jwk",g,n,s,i)}async exportKey(e,t){let n=await this.subtle.exportKey("jwk",t);switch(this.name.toLowerCase()==="safari"&&n instanceof ArrayBuffer&&(n=JSON.parse(Nv(n))),e.toLowerCase()){case"raw":return this.subtle.exportKey("raw",t);case"spki":{let s=new ba;try{s.fromJSON(n)}catch{throw new Error("Incorrect key data")}return s.toSchema().toBER(!1)}case"pkcs8":{let s=new Cx;try{s.fromJSON(n)}catch{throw new Error("Incorrect key data")}return s.toSchema().toBER(!1)}case"jwk":return n;default:throw new Error(`Incorrect format: ${e}`)}}async convert(e,t,n,s,i,a){if(e.toLowerCase()===t.toLowerCase())return n;let u=await this.importKey(e,n,s,i,a);return this.exportKey(t,u)}getAlgorithmByOID(e,t=!1,n){switch(e){case"1.2.840.113549.1.1.1":return{name:"RSAES-PKCS1-v1_5"};case"1.2.840.113549.1.1.5":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case"1.2.840.113549.1.1.11":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"1.2.840.113549.1.1.12":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case"1.2.840.113549.1.1.13":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}};case"1.2.840.113549.1.1.10":return{name:"RSA-PSS"};case"1.2.840.113549.1.1.7":return{name:"RSA-OAEP"};case"1.2.840.10045.2.1":case"1.2.840.10045.4.1":return{name:"ECDSA",hash:{name:"SHA-1"}};case"1.2.840.10045.4.3.2":return{name:"ECDSA",hash:{name:"SHA-256"}};case"1.2.840.10045.4.3.3":return{name:"ECDSA",hash:{name:"SHA-384"}};case"1.2.840.10045.4.3.4":return{name:"ECDSA",hash:{name:"SHA-512"}};case"1.3.133.16.840.63.0.2":return{name:"ECDH",kdf:"SHA-1"};case"1.3.132.1.11.1":return{name:"ECDH",kdf:"SHA-256"};case"1.3.132.1.11.2":return{name:"ECDH",kdf:"SHA-384"};case"1.3.132.1.11.3":return{name:"ECDH",kdf:"SHA-512"};case"2.16.840.1.101.3.4.1.2":return{name:"AES-CBC",length:128};case"2.16.840.1.101.3.4.1.22":return{name:"AES-CBC",length:192};case"2.16.840.1.101.3.4.1.42":return{name:"AES-CBC",length:256};case"2.16.840.1.101.3.4.1.6":return{name:"AES-GCM",length:128};case"2.16.840.1.101.3.4.1.26":return{name:"AES-GCM",length:192};case"2.16.840.1.101.3.4.1.46":return{name:"AES-GCM",length:256};case"2.16.840.1.101.3.4.1.4":return{name:"AES-CFB",length:128};case"2.16.840.1.101.3.4.1.24":return{name:"AES-CFB",length:192};case"2.16.840.1.101.3.4.1.44":return{name:"AES-CFB",length:256};case"2.16.840.1.101.3.4.1.5":return{name:"AES-KW",length:128};case"2.16.840.1.101.3.4.1.25":return{name:"AES-KW",length:192};case"2.16.840.1.101.3.4.1.45":return{name:"AES-KW",length:256};case"1.2.840.113549.2.7":return{name:"HMAC",hash:{name:"SHA-1"}};case"1.2.840.113549.2.9":return{name:"HMAC",hash:{name:"SHA-256"}};case"1.2.840.113549.2.10":return{name:"HMAC",hash:{name:"SHA-384"}};case"1.2.840.113549.2.11":return{name:"HMAC",hash:{name:"SHA-512"}};case"1.2.840.113549.1.9.16.3.5":return{name:"DH"};case"1.3.14.3.2.26":return{name:"SHA-1"};case"2.16.840.1.101.3.4.2.1":return{name:"SHA-256"};case"2.16.840.1.101.3.4.2.2":return{name:"SHA-384"};case"2.16.840.1.101.3.4.2.3":return{name:"SHA-512"};case"1.2.840.113549.1.5.12":return{name:"PBKDF2"};case"1.2.840.10045.3.1.7":return{name:"P-256"};case"1.3.132.0.34":return{name:"P-384"};case"1.3.132.0.35":return{name:"P-521"}}if(t)throw new Error(`Unsupported algorithm identifier ${n?`for ${n} `:L}: ${e}`);return{}}getOIDByAlgorithm(e,t=!1,n){let s=L;switch(e.name.toUpperCase()){case"RSAES-PKCS1-V1_5":s="1.2.840.113549.1.1.1";break;case"RSASSA-PKCS1-V1_5":switch(e.hash.name.toUpperCase()){case"SHA-1":s="1.2.840.113549.1.1.5";break;case"SHA-256":s="1.2.840.113549.1.1.11";break;case"SHA-384":s="1.2.840.113549.1.1.12";break;case"SHA-512":s="1.2.840.113549.1.1.13";break}break;case"RSA-PSS":s="1.2.840.113549.1.1.10";break;case"RSA-OAEP":s="1.2.840.113549.1.1.7";break;case"ECDSA":switch(e.hash.name.toUpperCase()){case"SHA-1":s="1.2.840.10045.4.1";break;case"SHA-256":s="1.2.840.10045.4.3.2";break;case"SHA-384":s="1.2.840.10045.4.3.3";break;case"SHA-512":s="1.2.840.10045.4.3.4";break}break;case"ECDH":switch(e.kdf.toUpperCase()){case"SHA-1":s="1.3.133.16.840.63.0.2";break;case"SHA-256":s="1.3.132.1.11.1";break;case"SHA-384":s="1.3.132.1.11.2";break;case"SHA-512":s="1.3.132.1.11.3";break}break;case"AES-CTR":break;case"AES-CBC":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.2";break;case 192:s="2.16.840.1.101.3.4.1.22";break;case 256:s="2.16.840.1.101.3.4.1.42";break}break;case"AES-CMAC":break;case"AES-GCM":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.6";break;case 192:s="2.16.840.1.101.3.4.1.26";break;case 256:s="2.16.840.1.101.3.4.1.46";break}break;case"AES-CFB":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.4";break;case 192:s="2.16.840.1.101.3.4.1.24";break;case 256:s="2.16.840.1.101.3.4.1.44";break}break;case"AES-KW":switch(e.length){case 128:s="2.16.840.1.101.3.4.1.5";break;case 192:s="2.16.840.1.101.3.4.1.25";break;case 256:s="2.16.840.1.101.3.4.1.45";break}break;case"HMAC":switch(e.hash.name.toUpperCase()){case"SHA-1":s="1.2.840.113549.2.7";break;case"SHA-256":s="1.2.840.113549.2.9";break;case"SHA-384":s="1.2.840.113549.2.10";break;case"SHA-512":s="1.2.840.113549.2.11";break}break;case"DH":s="1.2.840.113549.1.9.16.3.5";break;case"SHA-1":s="1.3.14.3.2.26";break;case"SHA-256":s="2.16.840.1.101.3.4.2.1";break;case"SHA-384":s="2.16.840.1.101.3.4.2.2";break;case"SHA-512":s="2.16.840.1.101.3.4.2.3";break;case"CONCAT":break;case"HKDF":break;case"PBKDF2":s="1.2.840.113549.1.5.12";break;case"P-256":s="1.2.840.10045.3.1.7";break;case"P-384":s="1.3.132.0.34";break;case"P-521":s="1.3.132.0.35";break}if(!s&&t)throw new Error(`Unsupported algorithm ${n?`for ${n} `:L}: ${e.name}`);return s}getAlgorithmParameters(e,t){let n={algorithm:{},usages:[]};switch(e.toUpperCase()){case"RSAES-PKCS1-V1_5":case"RSASSA-PKCS1-V1_5":switch(t.toLowerCase()){case"generatekey":n={algorithm:{name:"RSASSA-PKCS1-v1_5",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},usages:["sign","verify"]};break;case"verify":case"sign":case"importkey":n={algorithm:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},usages:["verify"]};break;case"exportkey":default:return{algorithm:{name:"RSASSA-PKCS1-v1_5"},usages:[]}}break;case"RSA-PSS":switch(t.toLowerCase()){case"sign":case"verify":n={algorithm:{name:"RSA-PSS",hash:{name:"SHA-1"},saltLength:20},usages:["sign","verify"]};break;case"generatekey":n={algorithm:{name:"RSA-PSS",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-1"}},usages:["sign","verify"]};break;case"importkey":n={algorithm:{name:"RSA-PSS",hash:{name:"SHA-1"}},usages:["verify"]};break;case"exportkey":default:return{algorithm:{name:"RSA-PSS"},usages:[]}}break;case"RSA-OAEP":switch(t.toLowerCase()){case"encrypt":case"decrypt":n={algorithm:{name:"RSA-OAEP"},usages:["encrypt","decrypt"]};break;case"generatekey":n={algorithm:{name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"importkey":n={algorithm:{name:"RSA-OAEP",hash:{name:"SHA-256"}},usages:["encrypt"]};break;case"exportkey":default:return{algorithm:{name:"RSA-OAEP"},usages:[]}}break;case"ECDSA":switch(t.toLowerCase()){case"generatekey":n={algorithm:{name:"ECDSA",namedCurve:"P-256"},usages:["sign","verify"]};break;case"importkey":n={algorithm:{name:"ECDSA",namedCurve:"P-256"},usages:["verify"]};break;case"verify":case"sign":n={algorithm:{name:"ECDSA",hash:{name:"SHA-256"}},usages:["sign"]};break;default:return{algorithm:{name:"ECDSA"},usages:[]}}break;case"ECDH":switch(t.toLowerCase()){case"exportkey":case"importkey":case"generatekey":n={algorithm:{name:"ECDH",namedCurve:"P-256"},usages:["deriveKey","deriveBits"]};break;case"derivekey":case"derivebits":n={algorithm:{name:"ECDH",namedCurve:"P-256",public:[]},usages:["encrypt","decrypt"]};break;default:return{algorithm:{name:"ECDH"},usages:[]}}break;case"AES-CTR":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"AES-CTR",length:256},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"decrypt":case"encrypt":n={algorithm:{name:"AES-CTR",counter:new Uint8Array(16),length:10},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-CTR"},usages:[]}}break;case"AES-CBC":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"AES-CBC",length:256},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"decrypt":case"encrypt":n={algorithm:{name:"AES-CBC",iv:this.getRandomValues(new Uint8Array(16))},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-CBC"},usages:[]}}break;case"AES-GCM":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"AES-GCM",length:256},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;case"decrypt":case"encrypt":n={algorithm:{name:"AES-GCM",iv:this.getRandomValues(new Uint8Array(16))},usages:["encrypt","decrypt","wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-GCM"},usages:[]}}break;case"AES-KW":switch(t.toLowerCase()){case"importkey":case"exportkey":case"generatekey":case"wrapkey":case"unwrapkey":n={algorithm:{name:"AES-KW",length:256},usages:["wrapKey","unwrapKey"]};break;default:return{algorithm:{name:"AES-KW"},usages:[]}}break;case"HMAC":switch(t.toLowerCase()){case"sign":case"verify":n={algorithm:{name:"HMAC"},usages:["sign","verify"]};break;case"importkey":case"exportkey":case"generatekey":n={algorithm:{name:"HMAC",length:32,hash:{name:"SHA-256"}},usages:["sign","verify"]};break;default:return{algorithm:{name:"HMAC"},usages:[]}}break;case"HKDF":switch(t.toLowerCase()){case"derivekey":n={algorithm:{name:"HKDF",hash:"SHA-256",salt:new Uint8Array([]),info:new Uint8Array([])},usages:["encrypt","decrypt"]};break;default:return{algorithm:{name:"HKDF"},usages:[]}}break;case"PBKDF2":switch(t.toLowerCase()){case"derivekey":n={algorithm:{name:"PBKDF2",hash:{name:"SHA-256"},salt:new Uint8Array([]),iterations:1e4},usages:["encrypt","decrypt"]};break;default:return{algorithm:{name:"PBKDF2"},usages:[]}}break}return n}getHashAlgorithm(e){let t=L;switch(e.algorithmId){case"1.2.840.10045.4.1":case"1.2.840.113549.1.1.5":t="SHA-1";break;case"1.2.840.10045.4.3.2":case"1.2.840.113549.1.1.11":t="SHA-256";break;case"1.2.840.10045.4.3.3":case"1.2.840.113549.1.1.12":t="SHA-384";break;case"1.2.840.10045.4.3.4":case"1.2.840.113549.1.1.13":t="SHA-512";break;case"1.2.840.113549.1.1.10":try{let n=new yA({schema:e.algorithmParams});if(n.hashAlgorithm){let s=this.getAlgorithmByOID(n.hashAlgorithm.algorithmId);if("name"in s)t=s.name;else return L}else t="SHA-1"}catch{}break}return t}async encryptEncryptedContentInfo(e){mr.assert(e,"password","contentEncryptionAlgorithm","hmacHashAlgorithm","iterationCount","contentToEncrypt","contentToEncrypt","contentType");let t=this.getOIDByAlgorithm(e.contentEncryptionAlgorithm,!0,"contentEncryptionAlgorithm"),n=this.getOIDByAlgorithm({name:"PBKDF2"},!0,"PBKDF2"),s=this.getOIDByAlgorithm({name:"HMAC",hash:{name:e.hmacHashAlgorithm}},!0,"hmacHashAlgorithm"),i=new ArrayBuffer(16),a=new Uint8Array(i);this.getRandomValues(a);let u=new ArrayBuffer(64),c=new Uint8Array(u);this.getRandomValues(c);let f=new Uint8Array(e.contentToEncrypt),h=new h0({salt:new Ve({valueHex:u}),iterationCount:e.iterationCount,prf:new ve({algorithmId:s,algorithmParams:new Yr})}),m=new Uint8Array(e.password),g=await this.importKey("raw",m,"PBKDF2",!1,["deriveKey"]),x=await this.deriveKey({name:"PBKDF2",hash:{name:e.hmacHashAlgorithm},salt:c,iterations:e.iterationCount},g,e.contentEncryptionAlgorithm,!1,["encrypt"]),v=await this.encrypt({name:e.contentEncryptionAlgorithm.name,iv:a},x,f),w=new XR({keyDerivationFunc:new ve({algorithmId:n,algorithmParams:h.toSchema()}),encryptionScheme:new ve({algorithmId:t,algorithmParams:new Ve({valueHex:i})})});return new ps({contentType:e.contentType,contentEncryptionAlgorithm:new ve({algorithmId:"1.2.840.113549.1.5.13",algorithmParams:w.toSchema()}),encryptedContent:new Ve({valueHex:v})})}async decryptEncryptedContentInfo(e){if(mr.assert(e,"password","encryptedContentInfo"),e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId!=="1.2.840.113549.1.5.13")throw new Error(`Unknown "contentEncryptionAlgorithm": ${e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId}`);let t;try{t=new XR({schema:e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "pbes2Parameters"')}let n;try{n=new h0({schema:t.keyDerivationFunc.algorithmParams})}catch{throw new Error('Incorrectly encoded "pbkdf2Params"')}let s=this.getAlgorithmByOID(t.encryptionScheme.algorithmId,!0),i=t.encryptionScheme.algorithmParams.valueBlock.valueHex,a=new Uint8Array(i),u=n.salt.valueBlock.valueHex,c=new Uint8Array(u),f=n.iterationCount,h="SHA-1";n.prf&&(h=this.getAlgorithmByOID(n.prf.algorithmId,!0).hash.name);let m=await this.importKey("raw",e.password,"PBKDF2",!1,["deriveKey"]),g=await this.deriveKey({name:"PBKDF2",hash:{name:h},salt:c,iterations:f},m,s,!1,["decrypt"]),x=e.encryptedContentInfo.getEncryptedContent();return this.decrypt({name:s.name,iv:a},g,x)}async stampDataWithPassword(e){if(!(e instanceof Object))throw new Error('Parameters must have type "Object"');mr.assert(e,"password","hashAlgorithm","iterationCount","salt","contentToStamp");let t;switch(e.hashAlgorithm.toLowerCase()){case"sha-1":t=160;break;case"sha-256":t=256;break;case"sha-384":t=384;break;case"sha-512":t=512;break;default:throw new Error(`Incorrect "parameters.hashAlgorithm" parameter: ${e.hashAlgorithm}`)}let n={name:"HMAC",length:t,hash:{name:e.hashAlgorithm}},s=await PH(e.hashAlgorithm,t,e.password,e.salt,e.iterationCount),i=await this.importKey("raw",new Uint8Array(s),n,!1,["sign"]);return this.sign(n,i,new Uint8Array(e.contentToStamp))}async verifyDataStampedWithPassword(e){mr.assert(e,"password","hashAlgorithm","salt","iterationCount","contentToVerify","signatureToVerify");let t=0;switch(e.hashAlgorithm.toLowerCase()){case"sha-1":t=160;break;case"sha-256":t=256;break;case"sha-384":t=384;break;case"sha-512":t=512;break;default:throw new Error(`Incorrect "parameters.hashAlgorithm" parameter: ${e.hashAlgorithm}`)}let n={name:"HMAC",length:t,hash:{name:e.hashAlgorithm}},s=await PH(e.hashAlgorithm,t,e.password,e.salt,e.iterationCount),i=await this.importKey("raw",new Uint8Array(s),n,!1,["verify"]);return this.verify(n,i,new Uint8Array(e.signatureToVerify),new Uint8Array(e.contentToVerify))}async getSignatureParameters(e,t="SHA-1"){this.getOIDByAlgorithm({name:t},!0,"hashAlgorithm");let n=new ve,s=this.getAlgorithmParameters(e.algorithm.name,"sign");if(!Object.keys(s.algorithm).length)throw new Error("Parameter 'algorithm' is empty");let i=s.algorithm;switch("hash"in e.algorithm&&e.algorithm.hash&&e.algorithm.hash.name?i.hash.name=e.algorithm.hash.name:i.hash.name=t,e.algorithm.name.toUpperCase()){case"RSASSA-PKCS1-V1_5":case"ECDSA":n.algorithmId=this.getOIDByAlgorithm(i,!0);break;case"RSA-PSS":{switch(i.hash.name.toUpperCase()){case"SHA-256":i.saltLength=32;break;case"SHA-384":i.saltLength=48;break;case"SHA-512":i.saltLength=64;break}let a={};if(i.hash.name.toUpperCase()!=="SHA-1"){let c=this.getOIDByAlgorithm({name:i.hash.name},!0,"hashAlgorithm");a.hashAlgorithm=new ve({algorithmId:c,algorithmParams:new Yr}),a.maskGenAlgorithm=new ve({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:a.hashAlgorithm.toSchema()})}i.saltLength!==20&&(a.saltLength=i.saltLength);let u=new yA(a);n.algorithmId="1.2.840.113549.1.1.10",n.algorithmParams=u.toSchema()}break;default:throw new Error(`Unsupported signature algorithm: ${e.algorithm.name}`)}return{signatureAlgorithm:n,parameters:s}}async signWithPrivateKey(e,t,n){let s=await this.sign(n.algorithm,t,e);return n.algorithm.name==="ECDSA"?Dme(s):s}fillPublicKeyParameters(e,t){let n={},s=this.getHashAlgorithm(t);if(s===L)throw new Error(`Unsupported signature algorithm: ${t.algorithmId}`);let i;t.algorithmId==="1.2.840.113549.1.1.10"?i=t.algorithmId:i=e.algorithm.algorithmId;let a=this.getAlgorithmByOID(i,!0);if(n.algorithm=this.getAlgorithmParameters(a.name,"importKey"),"hash"in n.algorithm.algorithm&&(n.algorithm.algorithm.hash.name=s),a.name==="ECDSA"){let u=e.algorithm;if(!u.algorithmParams)throw new Error("Algorithm parameters for ECDSA public key are missed");let c=u.algorithmParams;if("idBlock"in u.algorithmParams&&!(c.idBlock.tagClass===1&&c.idBlock.tagNumber===6))throw new Error("Incorrect type for ECDSA public key parameters");let f=this.getAlgorithmByOID(c.valueBlock.toString(),!0);n.algorithm.algorithm.namedCurve=f.name}return n}async getPublicKey(e,t,n){n||(n=this.fillPublicKeyParameters(e,t));let s=e.toSchema().toBER(!1);return this.importKey("spki",s,n.algorithm.algorithm,!0,n.algorithm.usages)}async verifyWithPublicKey(e,t,n,s,i){let a;if(i){let f={},h;s.algorithmId==="1.2.840.113549.1.1.10"?h=s.algorithmId:h=n.algorithm.algorithmId;let m=this.getAlgorithmByOID(h,!0);if(f.algorithm=this.getAlgorithmParameters(m.name,"importKey"),"hash"in f.algorithm.algorithm&&(f.algorithm.algorithm.hash.name=i),m.name==="ECDSA"){let g=!1;if("algorithmParams"in n.algorithm&&"idBlock"in n.algorithm.algorithmParams&&n.algorithm.algorithmParams.idBlock.tagClass===1&&n.algorithm.algorithmParams.idBlock.tagNumber===6&&(g=!0),g===!1)throw new Error("Incorrect type for ECDSA public key parameters");let x=this.getAlgorithmByOID(n.algorithm.algorithmParams.valueBlock.toString(),!0);f.algorithm.algorithm.namedCurve=x.name}a=await this.getPublicKey(n,null,f)}else{if(i=this.getHashAlgorithm(s),!i)throw new Error(`Unsupported signature algorithm: ${s.algorithmId}`);a=await this.getPublicKey(n,s)}let u=this.getAlgorithmParameters(a.algorithm.name,"verify");"hash"in u.algorithm&&(u.algorithm.hash.name=i);let c=t.valueBlock.valueHexView;if(a.algorithm.name==="ECDSA"){let f=Tl.find(a.algorithm.namedCurve);if(!f)throw new Error("Unsupported named curve in use");let h=Jr(c);be.assert(h,"Signature value"),c=Rme(h.result,f.size)}if(a.algorithm.name==="RSA-PSS"){let f=new yA({schema:s.algorithmParams});"saltLength"in f?u.algorithm.saltLength=f.saltLength:u.algorithm.saltLength=20;let h="SHA-1";"hashAlgorithm"in f&&(h=this.getAlgorithmByOID(f.hashAlgorithm.algorithmId,!0).name),u.algorithm.hash.name=h}return this.verify(u.algorithm,a,c,e)}},AK={name:"none",crypto:null};function kH(r){return!!(r&&typeof r=="object"&&"crypto"in r)}o(kH,"isCryptoEngine");function g2(r,...e){let t=null;if(e.length<2)e.length?t=e[0]:t=typeof self<"u"&&self.crypto?new d0({name:"browser",crypto:self.crypto}):null;else{let n=e[0],s=e[1];kH(s)?t=s:kH(n)?t=n:"subtle"in n&&"getRandomValues"in n&&(t=new d0({crypto:n}))}if(typeof process<"u"&&"pid"in process&&typeof global<"u"&&typeof window>"u"){if(typeof global[process.pid]>"u")global[process.pid]={};else if(typeof global[process.pid]!="object")throw new Error(`Name global.${process.pid} already exists and it is not an object`);if(typeof global[process.pid].pkijs>"u")global[process.pid].pkijs={};else if(typeof global[process.pid].pkijs!="object")throw new Error(`Name global.${process.pid}.pkijs already exists and it is not an object`);global[process.pid].pkijs.engine={name:r,crypto:t}}else AK={name:r,crypto:t}}o(g2,"setEngine");function Bme(){if(typeof process<"u"&&"pid"in process&&typeof global<"u"&&typeof window>"u"){let r;try{r=global[process.pid].pkijs.engine}catch{throw new Error("Please call 'setEngine' before call to 'getEngine'")}return r}return AK}o(Bme,"getEngine");function Dt(r=!1){let e=Bme();if(!e.crypto&&r)throw new Error("Unable to create WebCrypto object");return e.crypto}o(Dt,"getCrypto");function Dme(r){if(r.byteLength%2!==0)return on;let e=r.byteLength/2,t=new ArrayBuffer(e);new Uint8Array(t).set(new Uint8Array(r,0,e));let s=new ge({valueHex:t}),i=new ArrayBuffer(e);new Uint8Array(i).set(new Uint8Array(r,e,e));let u=new ge({valueHex:i});return new W({value:[s.convertToDER(),u.convertToDER()]}).toBER(!1)}o(Dme,"createCMSECDSASignature");function Rme(r,e){if(!(r instanceof W&&r.valueBlock.value.length===2&&r.valueBlock.value[0]instanceof ge&&r.valueBlock.value[1]instanceof ge))return on;let t=r.valueBlock.value[0].convertFromDER().valueBlock.valueHexView,n=r.valueBlock.value[1].convertFromDER().valueBlock.valueHexView,s=new Uint8Array(e*2);return s.set(t,e-t.byteLength),s.set(n,2*e-n.byteLength),s.buffer}o(Rme,"createECDSASignatureFromCMS");async function Ome(r,e,t,n,s){switch(r.toUpperCase()){case"SHA-1":case"SHA-256":case"SHA-384":case"SHA-512":break;default:throw new Cr(`Unknown hash function: ${r}`)}if(Cr.assert(e,"zBuffer","ArrayBuffer"),e.byteLength===0)throw new Cr("'zBuffer' has zero length, error");if(Cr.assert(n,"SharedInfo","ArrayBuffer"),t>255)throw new Cr("Please set 'Counter' argument to value less or equal to 255");let i=new ArrayBuffer(4),a=new Uint8Array(i);a[0]=0,a[1]=0,a[2]=0,a[3]=t;let u=on;u=vf(u,e),u=vf(u,i),u=vf(u,n);let c=await s.digest({name:r},u);return{counter:t,result:c}}o(Ome,"kdfWithCounter");async function LH(r,e,t,n,s=Dt(!0)){let i=0,a=1;switch(r.toUpperCase()){case"SHA-1":i=160;break;case"SHA-256":i=256;break;case"SHA-384":i=384;break;case"SHA-512":i=512;break;default:throw new Cr(`Unknown hash function: ${r}`)}if(Cr.assert(e,"Zbuffer","ArrayBuffer"),e.byteLength===0)throw new Cr("'Zbuffer' has zero length, error");Cr.assert(n,"SharedInfo","ArrayBuffer");let u=t/i;Math.floor(u)>0&&(a=Math.floor(u),u-a>0&&a++);let c=[];for(let g=1;g<=a;g++)c.push(await Ome(r,e,g,n,s));let f=on,h=1,m=!0;for(;m;){m=!1;for(let g of c)if(g.counter===h){f=vf(f,g.result),m=!0;break}h++}if(t>>=3,f.byteLength>t){let g=new ArrayBuffer(t),x=new Uint8Array(g),v=new Uint8Array(f);for(let w=0;w<t;w++)x[w]=v[w];return g}return f}o(LH,"kdf");var zD="version",JD="logID",YD="extensions",QD="timestamp",ZD="hashAlgorithm",eR="signatureAlgorithm",tR="signature",VH="none",UH="md5",jH="sha1",FH="sha224",MH="sha256",qH="sha384",HH="sha512",KH="anonymous",$H="rsa",XH="dsa",GH="ecdsa",CK=class Jc extends _e{static{o(this,"SignedCertificateTimestamp")}constructor(e={}){super(),this.version=B(e,zD,Jc.defaultValues(zD)),this.logID=B(e,JD,Jc.defaultValues(JD)),this.timestamp=B(e,QD,Jc.defaultValues(QD)),this.extensions=B(e,YD,Jc.defaultValues(YD)),this.hashAlgorithm=B(e,ZD,Jc.defaultValues(ZD)),this.signatureAlgorithm=B(e,eR,Jc.defaultValues(eR)),this.signature=B(e,tR,Jc.defaultValues(tR)),"stream"in e&&e.stream&&this.fromStream(e.stream),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case zD:return 0;case JD:case YD:return on;case QD:return new Date(0);case ZD:case eR:return L;case tR:return on;default:return super.defaultValues(e)}}fromSchema(e){if(!(e instanceof Ov))throw new Error("Object's schema was not verified against input data for SignedCertificateTimestamp");let t=new Yo({stream:new zn({buffer:e.data})});this.fromStream(t)}fromStream(e){let t=e.getUint16();if(this.version=e.getBlock(1)[0],this.version===0){this.logID=new Uint8Array(e.getBlock(32)).buffer.slice(0),this.timestamp=new Date(Wo(new Uint8Array(e.getBlock(8)),8));let n=e.getUint16();switch(this.extensions=new Uint8Array(e.getBlock(n)).buffer.slice(0),e.getBlock(1)[0]){case 0:this.hashAlgorithm=VH;break;case 1:this.hashAlgorithm=UH;break;case 2:this.hashAlgorithm=jH;break;case 3:this.hashAlgorithm=FH;break;case 4:this.hashAlgorithm=MH;break;case 5:this.hashAlgorithm=qH;break;case 6:this.hashAlgorithm=HH;break;default:throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}switch(e.getBlock(1)[0]){case 0:this.signatureAlgorithm=KH;break;case 1:this.signatureAlgorithm=$H;break;case 2:this.signatureAlgorithm=XH;break;case 3:this.signatureAlgorithm=GH;break;default:throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}let s=e.getUint16();if(this.signature=new Uint8Array(e.getBlock(s)).buffer.slice(0),t!==47+n+s)throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}}toSchema(){let e=this.toStream();return new Ov({data:e.stream.buffer})}toStream(){let e=new Yo;e.appendUint16(47+this.extensions.byteLength+this.signature.byteLength),e.appendChar(this.version),e.appendView(new Uint8Array(this.logID));let t=new ArrayBuffer(8),n=new Uint8Array(t),s=fa(this.timestamp.valueOf(),8);n.set(new Uint8Array(s),8-s.byteLength),e.appendView(n),e.appendUint16(this.extensions.byteLength),this.extensions.byteLength&&e.appendView(new Uint8Array(this.extensions));let i;switch(this.hashAlgorithm.toLowerCase()){case VH:i=0;break;case UH:i=1;break;case jH:i=2;break;case FH:i=3;break;case MH:i=4;break;case qH:i=5;break;case HH:i=6;break;default:throw new Error(`Incorrect data for hashAlgorithm: ${this.hashAlgorithm}`)}e.appendChar(i);let a;switch(this.signatureAlgorithm.toLowerCase()){case KH:a=0;break;case $H:a=1;break;case XH:a=2;break;case GH:a=3;break;default:throw new Error(`Incorrect data for signatureAlgorithm: ${this.signatureAlgorithm}`)}return e.appendChar(a),e.appendUint16(this.signature.byteLength),e.appendView(new Uint8Array(this.signature)),e}toJSON(){return{version:this.version,logID:dE(this.logID),timestamp:this.timestamp,extensions:dE(this.extensions),hashAlgorithm:this.hashAlgorithm,signatureAlgorithm:this.signatureAlgorithm,signature:dE(this.signature)}}async verify(e,t,n=0,s=Dt(!0)){let i=gE(Nv(this.logID)),a=null,u=new Yo;for(let x of e)if(x.log_id===i){a=x.key;break}if(!a)throw new Error(`Public key not found for CT with logId: ${i}`);let c=yf(bd(a)),f=ba.fromBER(c);u.appendChar(0),u.appendChar(0);let h=new ArrayBuffer(8),m=new Uint8Array(h),g=fa(this.timestamp.valueOf(),8);return m.set(new Uint8Array(g),8-g.byteLength),u.appendView(m),u.appendUint16(n),n===0&&u.appendUint24(t.byteLength),u.appendView(new Uint8Array(t)),u.appendUint16(this.extensions.byteLength),this.extensions.byteLength!==0&&u.appendView(new Uint8Array(this.extensions)),s.verifyWithPublicKey(u.buffer.slice(0,u.length),new Ve({valueHex:this.signature}),f,{algorithmId:L},"SHA-256")}};CK.CLASS_NAME="SignedCertificateTimestamp";var LE="timestamps",NK=class TK extends _e{static{o(this,"SignedCertificateTimestampList")}constructor(e={}){super(),this.timestamps=B(e,LE,TK.defaultValues(LE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case LE:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case LE:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){var t;let n=B(e,"names",{});return(t=n.optional)!==null&&t!==void 0||(n.optional=!1),new Ve({name:n.blockName||"SignedCertificateTimestampList",optional:n.optional})}fromSchema(e){if(!(e instanceof Ve))throw new Error("Object's schema was not verified against input data for SignedCertificateTimestampList");let t=new Yo({stream:new zn({buffer:e.valueBlock.valueHex})});if(t.getUint16()!==t.length)throw new Error("Object's schema was not verified against input data for SignedCertificateTimestampList");for(;t.length;)this.timestamps.push(new CK({stream:t}))}toSchema(){let e=new Yo,t=0,n=[];for(let s of this.timestamps){let i=s.toStream();n.push(i),t+=i.stream.buffer.byteLength}e.appendUint16(t);for(let s of n)e.appendView(s.stream.view);return new Ve({valueHex:e.stream.buffer.slice(0)})}toJSON(){return{timestamps:Array.from(this.timestamps,e=>e.toJSON())}}};NK.CLASS_NAME="SignedCertificateTimestampList";var H1="attributes",Pme=[H1],IK=class GR extends _e{static{o(this,"SubjectDirectoryAttributes")}constructor(e={}){super(),this.attributes=B(e,H1,GR.defaultValues(H1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case H1:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.attributes||L,value:un.schema()})]})}fromSchema(e){De(e,Pme);let t=Ie(e,e,GR.schema({names:{attributes:H1}}));be.assertSchema(t,this.className),this.attributes=Array.from(t.result.attributes,n=>new un({schema:n}))}toSchema(){return new W({value:Array.from(this.attributes,e=>e.toSchema())})}toJSON(){return{attributes:Array.from(this.attributes,e=>e.toJSON())}}};IK.CLASS_NAME="SubjectDirectoryAttributes";var kme=class Zr{static{o(this,"ExtensionValueFactory")}static getItems(){return this.types||(this.types={},Zr.register(eK,"SubjectAltName",CR),Zr.register(tK,"IssuerAltName",CR),Zr.register(BO,"AuthorityKeyIdentifier",PO),Zr.register(IO,"BasicConstraints",kO),Zr.register(Jde,"MicrosoftCaVersion",hK),Zr.register(aK,"CertificatePolicies",DR),Zr.register(Kde,"CertificatePoliciesMicrosoft",DR),Zr.register(zde,"MicrosoftCertTemplateV2",ame),Zr.register(iK,"CRLDistributionPoints",PR),Zr.register(_O,"FreshestCRL",PR),Zr.register($de,"ExtKeyUsage",mK),Zr.register(nK,"CertificateIssuer",Jn),Zr.register(DO,"AuthorityInfoAccess",VR),Zr.register(Gde,"SubjectInfoAccess",VR),Zr.register(rK,"IssuingDistributionPoint",vK),Zr.register(sK,"NameConstraints",yK),Zr.register(uK,"PolicyConstraints",xK),Zr.register(oK,"PolicyMappings",wK),Zr.register(jde,"PrivateKeyUsagePeriod",SK),Zr.register(Yde,"QCStatements",bK),Zr.register(Wde,"SignedCertificateTimestampList",NK),Zr.register(Lde,"SubjectDirectoryAttributes",IK)),this.types}static fromBER(e,t){let n=Jr(t);if(n.offset===-1)return null;let s=this.find(e);if(s)try{return new s.type({schema:n.result})}catch{let i=new s.type;return i.parsingError=`Incorrectly formatted value of extension ${s.name} (${e})`,i}return n.result}static find(e){return this.getItems()[e]||null}static register(e,t,n){this.getItems()[e]={name:t,type:n}}},K1="extnID",Yc="critical",$1="extnValue",VE="parsedValue",Lme=[K1,Yc,$1],zi=class Qc extends _e{static{o(this,"Extension")}get parsedValue(){if(this._parsedValue===void 0){let e=kme.fromBER(this.extnID,this.extnValue.valueBlock.valueHexView);this._parsedValue=e}return this._parsedValue||void 0}set parsedValue(e){this._parsedValue=e}constructor(e={}){super(),this.extnID=B(e,K1,Qc.defaultValues(K1)),this.critical=B(e,Yc,Qc.defaultValues(Yc)),$1 in e?this.extnValue=new Ve({valueHex:e.extnValue}):this.extnValue=Qc.defaultValues($1),VE in e&&(this.parsedValue=B(e,VE,Qc.defaultValues(VE))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case K1:return L;case Yc:return!1;case $1:return new Ve;case VE:return{};default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.extnID||L}),new pa({name:t.critical||L,optional:!0}),new Ve({name:t.extnValue||L})]})}fromSchema(e){De(e,Lme);let t=Ie(e,e,Qc.schema({names:{extnID:K1,critical:Yc,extnValue:$1}}));be.assertSchema(t,this.className),this.extnID=t.result.extnID.valueBlock.toString(),Yc in t.result&&(this.critical=t.result.critical.valueBlock.value),this.extnValue=t.result.extnValue}toSchema(){let e=[];return e.push(new rt({value:this.extnID})),this.critical!==Qc.defaultValues(Yc)&&e.push(new pa({value:this.critical})),e.push(this.extnValue),new W({value:e})}toJSON(){let e={extnID:this.extnID,extnValue:this.extnValue.toJSON()};return this.critical!==Qc.defaultValues(Yc)&&(e.critical=this.critical),this.parsedValue&&this.parsedValue.toJSON&&(e.parsedValue=this.parsedValue.toJSON()),e}};zi.CLASS_NAME="Extension";var X1="extensions",Vme=[X1],Tn=class WR extends _e{static{o(this,"Extensions")}constructor(e={}){super(),this.extensions=B(e,X1,WR.defaultValues(X1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case X1:return[];default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=B(e,"names",{});return new W({optional:t,name:n.blockName||L,value:[new Tt({name:n.extensions||L,value:zi.schema(n.extension||{})})]})}fromSchema(e){De(e,Vme);let t=Ie(e,e,WR.schema({names:{extensions:X1}}));be.assertSchema(t,this.className),this.extensions=Array.from(t.result.extensions,n=>new zi({schema:n}))}toSchema(){return new W({value:Array.from(this.extensions,e=>e.toSchema())})}toJSON(){return{extensions:this.extensions.map(e=>e.toJSON())}}};Tn.CLASS_NAME="Extensions";var G1="issuer",W1="serialNumber",Hf="issuerUID",Ume=[G1,W1,Hf],mo=class z1 extends _e{static{o(this,"IssuerSerial")}constructor(e={}){super(),this.issuer=B(e,G1,z1.defaultValues(G1)),this.serialNumber=B(e,W1,z1.defaultValues(W1)),Hf in e&&(this.issuerUID=B(e,Hf,z1.defaultValues(Hf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case G1:return new Jn;case W1:return new ge;case Hf:return new Ht;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Jn.schema(t.issuer||{}),new ge({name:t.serialNumber||L}),new Ht({optional:!0,name:t.issuerUID||L})]})}fromSchema(e){De(e,Ume);let t=Ie(e,e,z1.schema({names:{issuer:{names:{blockName:G1}},serialNumber:W1,issuerUID:Hf}}));be.assertSchema(t,this.className),this.issuer=new Jn({schema:t.result.issuer}),this.serialNumber=t.result.serialNumber,Hf in t.result&&(this.issuerUID=t.result.issuerUID)}toSchema(){let e=new W({value:[this.issuer.toSchema(),this.serialNumber]});return this.issuerUID&&e.valueBlock.value.push(this.issuerUID),e}toJSON(){let e={issuer:this.issuer.toJSON(),serialNumber:this.serialNumber.toJSON()};return this.issuerUID&&(e.issuerUID=this.issuerUID.toJSON()),e}};mo.CLASS_NAME="IssuerSerial";var J1="version",Kf="baseCertificateID",$f="subjectName",Y1="issuer",Q1="signature",Z1="serialNumber",ey="attrCertValidityPeriod",ty="attributes",Xf="issuerUniqueID",Gf="extensions",jme=[J1,Kf,$f,Y1,Q1,Z1,ey,ty,Xf,Gf],wA=class Gi extends _e{static{o(this,"AttributeCertificateInfoV1")}constructor(e={}){super(),this.version=B(e,J1,Gi.defaultValues(J1)),Kf in e&&(this.baseCertificateID=B(e,Kf,Gi.defaultValues(Kf))),$f in e&&(this.subjectName=B(e,$f,Gi.defaultValues($f))),this.issuer=B(e,Y1,Gi.defaultValues(Y1)),this.signature=B(e,Q1,Gi.defaultValues(Q1)),this.serialNumber=B(e,Z1,Gi.defaultValues(Z1)),this.attrCertValidityPeriod=B(e,ey,Gi.defaultValues(ey)),this.attributes=B(e,ty,Gi.defaultValues(ty)),Xf in e&&(this.issuerUniqueID=B(e,Xf,Gi.defaultValues(Xf))),Gf in e&&(this.extensions=B(e,Gf,Gi.defaultValues(Gf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case J1:return 0;case Kf:return new mo;case $f:return new Jn;case Y1:return new Jn;case Q1:return new ve;case Z1:return new ge;case ey:return new qh;case ty:return[];case Xf:return new Ht;case Gf:return new Tn;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new Vr({value:[new oe({name:t.baseCertificateID||L,idBlock:{tagClass:3,tagNumber:0},value:mo.schema().valueBlock.value}),new oe({name:t.subjectName||L,idBlock:{tagClass:3,tagNumber:1},value:Jn.schema().valueBlock.value})]}),Jn.schema({names:{blockName:t.issuer||L}}),ve.schema(t.signature||{}),new ge({name:t.serialNumber||L}),qh.schema(t.attrCertValidityPeriod||{}),new W({name:t.attributes||L,value:[new Tt({value:un.schema()})]}),new Ht({optional:!0,name:t.issuerUniqueID||L}),Tn.schema(t.extensions||{},!0)]})}fromSchema(e){De(e,jme);let t=Ie(e,e,Gi.schema({names:{version:J1,baseCertificateID:Kf,subjectName:$f,issuer:Y1,signature:{names:{blockName:Q1}},serialNumber:Z1,attrCertValidityPeriod:{names:{blockName:ey}},attributes:ty,issuerUniqueID:Xf,extensions:{names:{blockName:Gf}}}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,Kf in t.result&&(this.baseCertificateID=new mo({schema:new W({value:t.result.baseCertificateID.valueBlock.value})})),$f in t.result&&(this.subjectName=new Jn({schema:new W({value:t.result.subjectName.valueBlock.value})})),this.issuer=t.result.issuer,this.signature=new ve({schema:t.result.signature}),this.serialNumber=t.result.serialNumber,this.attrCertValidityPeriod=new qh({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new un({schema:n})),Xf in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),Gf in t.result&&(this.extensions=new Tn({schema:t.result.extensions}))}toSchema(){let e=new W({value:[new ge({value:this.version})]});return this.baseCertificateID&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.subjectName&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:this.subjectName.toSchema().valueBlock.value})),e.valueBlock.value.push(this.issuer.toSchema()),e.valueBlock.value.push(this.signature.toSchema()),e.valueBlock.value.push(this.serialNumber),e.valueBlock.value.push(this.attrCertValidityPeriod.toSchema()),e.valueBlock.value.push(new W({value:Array.from(this.attributes,t=>t.toSchema())})),this.issuerUniqueID&&e.valueBlock.value.push(this.issuerUniqueID),this.extensions&&e.valueBlock.value.push(this.extensions.toSchema()),e}toJSON(){let e={version:this.version};return this.baseCertificateID&&(e.baseCertificateID=this.baseCertificateID.toJSON()),this.subjectName&&(e.subjectName=this.subjectName.toJSON()),e.issuer=this.issuer.toJSON(),e.signature=this.signature.toJSON(),e.serialNumber=this.serialNumber.toJSON(),e.attrCertValidityPeriod=this.attrCertValidityPeriod.toJSON(),e.attributes=Array.from(this.attributes,t=>t.toJSON()),this.issuerUniqueID&&(e.issuerUniqueID=this.issuerUniqueID.toJSON()),this.extensions&&(e.extensions=this.extensions.toJSON()),e}};wA.CLASS_NAME="AttributeCertificateInfoV1";var ry="acinfo",ny="signatureAlgorithm",sy="signatureValue",Fme=[ry,sy,ny],v2=class iy extends _e{static{o(this,"AttributeCertificateV1")}constructor(e={}){super(),this.acinfo=B(e,ry,iy.defaultValues(ry)),this.signatureAlgorithm=B(e,ny,iy.defaultValues(ny)),this.signatureValue=B(e,sy,iy.defaultValues(sy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ry:return new wA;case ny:return new ve;case sy:return new Ht;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[wA.schema(t.acinfo||{}),ve.schema(t.signatureAlgorithm||{}),new Ht({name:t.signatureValue||L})]})}fromSchema(e){De(e,Fme);let t=Ie(e,e,iy.schema({names:{acinfo:{names:{blockName:ry}},signatureAlgorithm:{names:{blockName:ny}},signatureValue:sy}}));be.assertSchema(t,this.className),this.acinfo=new wA({schema:t.result.acinfo}),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}toSchema(){return new W({value:[this.acinfo.toSchema(),this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){return{acinfo:this.acinfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()}}};v2.CLASS_NAME="AttributeCertificateV1";var ay="digestedObjectType",Wf="otherObjectTypeID",oy="digestAlgorithm",uy="objectDigest",Mme=[ay,Wf,oy,uy],Hh=class Gd extends _e{static{o(this,"ObjectDigestInfo")}constructor(e={}){super(),this.digestedObjectType=B(e,ay,Gd.defaultValues(ay)),Wf in e&&(this.otherObjectTypeID=B(e,Wf,Gd.defaultValues(Wf))),this.digestAlgorithm=B(e,oy,Gd.defaultValues(oy)),this.objectDigest=B(e,uy,Gd.defaultValues(uy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ay:return new Nc;case Wf:return new rt;case oy:return new ve;case uy:return new Ht;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Nc({name:t.digestedObjectType||L}),new rt({optional:!0,name:t.otherObjectTypeID||L}),ve.schema(t.digestAlgorithm||{}),new Ht({name:t.objectDigest||L})]})}fromSchema(e){De(e,Mme);let t=Ie(e,e,Gd.schema({names:{digestedObjectType:ay,otherObjectTypeID:Wf,digestAlgorithm:{names:{blockName:oy}},objectDigest:uy}}));be.assertSchema(t,this.className),this.digestedObjectType=t.result.digestedObjectType,Wf in t.result&&(this.otherObjectTypeID=t.result.otherObjectTypeID),this.digestAlgorithm=new ve({schema:t.result.digestAlgorithm}),this.objectDigest=t.result.objectDigest}toSchema(){let e=new W({value:[this.digestedObjectType]});return this.otherObjectTypeID&&e.valueBlock.value.push(this.otherObjectTypeID),e.valueBlock.value.push(this.digestAlgorithm.toSchema()),e.valueBlock.value.push(this.objectDigest),e}toJSON(){let e={digestedObjectType:this.digestedObjectType.toJSON(),digestAlgorithm:this.digestAlgorithm.toJSON(),objectDigest:this.objectDigest.toJSON()};return this.otherObjectTypeID&&(e.otherObjectTypeID=this.otherObjectTypeID.toJSON()),e}};Hh.CLASS_NAME="ObjectDigestInfo";var zf="issuerName",Jf="baseCertificateID",Yf="objectDigestInfo",qme=[zf,Jf,Yf],zR=class cy extends _e{static{o(this,"V2Form")}constructor(e={}){super(),zf in e&&(this.issuerName=B(e,zf,cy.defaultValues(zf))),Jf in e&&(this.baseCertificateID=B(e,Jf,cy.defaultValues(Jf))),Yf in e&&(this.objectDigestInfo=B(e,Yf,cy.defaultValues(Yf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case zf:return new Jn;case Jf:return new mo;case Yf:return new Hh;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Jn.schema({names:{blockName:t.issuerName}},!0),new oe({optional:!0,name:t.baseCertificateID||L,idBlock:{tagClass:3,tagNumber:0},value:mo.schema().valueBlock.value}),new oe({optional:!0,name:t.objectDigestInfo||L,idBlock:{tagClass:3,tagNumber:1},value:Hh.schema().valueBlock.value})]})}fromSchema(e){De(e,qme);let t=Ie(e,e,cy.schema({names:{issuerName:zf,baseCertificateID:Jf,objectDigestInfo:Yf}}));be.assertSchema(t,this.className),zf in t.result&&(this.issuerName=new Jn({schema:t.result.issuerName})),Jf in t.result&&(this.baseCertificateID=new mo({schema:new W({value:t.result.baseCertificateID.valueBlock.value})})),Yf in t.result&&(this.objectDigestInfo=new Hh({schema:new W({value:t.result.objectDigestInfo.valueBlock.value})}))}toSchema(){let e=new W;return this.issuerName&&e.valueBlock.value.push(this.issuerName.toSchema()),this.baseCertificateID&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.objectDigestInfo&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:this.objectDigestInfo.toSchema().valueBlock.value})),e}toJSON(){let e={};return this.issuerName&&(e.issuerName=this.issuerName.toJSON()),this.baseCertificateID&&(e.baseCertificateID=this.baseCertificateID.toJSON()),this.objectDigestInfo&&(e.objectDigestInfo=this.objectDigestInfo.toJSON()),e}};zR.CLASS_NAME="V2Form";var Qf="baseCertificateID",Zf="entityName",eh="objectDigestInfo",Hme=[Qf,Zf,eh],SA=class ly extends _e{static{o(this,"Holder")}constructor(e={}){super(),Qf in e&&(this.baseCertificateID=B(e,Qf,ly.defaultValues(Qf))),Zf in e&&(this.entityName=B(e,Zf,ly.defaultValues(Zf))),eh in e&&(this.objectDigestInfo=B(e,eh,ly.defaultValues(eh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Qf:return new mo;case Zf:return new Jn;case eh:return new Hh;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({optional:!0,name:t.baseCertificateID||L,idBlock:{tagClass:3,tagNumber:0},value:mo.schema().valueBlock.value}),new oe({optional:!0,name:t.entityName||L,idBlock:{tagClass:3,tagNumber:1},value:Jn.schema().valueBlock.value}),new oe({optional:!0,name:t.objectDigestInfo||L,idBlock:{tagClass:3,tagNumber:2},value:Hh.schema().valueBlock.value})]})}fromSchema(e){De(e,Hme);let t=Ie(e,e,ly.schema({names:{baseCertificateID:Qf,entityName:Zf,objectDigestInfo:eh}}));be.assertSchema(t,this.className),Qf in t.result&&(this.baseCertificateID=new mo({schema:new W({value:t.result.baseCertificateID.valueBlock.value})})),Zf in t.result&&(this.entityName=new Jn({schema:new W({value:t.result.entityName.valueBlock.value})})),eh in t.result&&(this.objectDigestInfo=new Hh({schema:new W({value:t.result.objectDigestInfo.valueBlock.value})}))}toSchema(){let e=new W;return this.baseCertificateID&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.baseCertificateID.toSchema().valueBlock.value})),this.entityName&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:this.entityName.toSchema().valueBlock.value})),this.objectDigestInfo&&e.valueBlock.value.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:this.objectDigestInfo.toSchema().valueBlock.value})),e}toJSON(){let e={};return this.baseCertificateID&&(e.baseCertificateID=this.baseCertificateID.toJSON()),this.entityName&&(e.entityName=this.entityName.toJSON()),this.objectDigestInfo&&(e.objectDigestInfo=this.objectDigestInfo.toJSON()),e}};SA.CLASS_NAME="Holder";var fy="version",hy="holder",py="issuer",dy="signature",my="serialNumber",gy="attrCertValidityPeriod",vy="attributes",th="issuerUniqueID",rh="extensions",Kme=[fy,hy,py,dy,my,gy,vy,th,rh],bA=class va extends _e{static{o(this,"AttributeCertificateInfoV2")}constructor(e={}){super(),this.version=B(e,fy,va.defaultValues(fy)),this.holder=B(e,hy,va.defaultValues(hy)),this.issuer=B(e,py,va.defaultValues(py)),this.signature=B(e,dy,va.defaultValues(dy)),this.serialNumber=B(e,my,va.defaultValues(my)),this.attrCertValidityPeriod=B(e,gy,va.defaultValues(gy)),this.attributes=B(e,vy,va.defaultValues(vy)),th in e&&(this.issuerUniqueID=B(e,th,va.defaultValues(th))),rh in e&&(this.extensions=B(e,rh,va.defaultValues(rh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fy:return 1;case hy:return new SA;case py:return{};case dy:return new ve;case my:return new ge;case gy:return new qh;case vy:return[];case th:return new Ht;case rh:return new Tn;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),SA.schema(t.holder||{}),new Vr({value:[Jn.schema({names:{blockName:t.issuer||L}}),new oe({name:t.issuer||L,idBlock:{tagClass:3,tagNumber:0},value:zR.schema().valueBlock.value})]}),ve.schema(t.signature||{}),new ge({name:t.serialNumber||L}),qh.schema(t.attrCertValidityPeriod||{}),new W({name:t.attributes||L,value:[new Tt({value:un.schema()})]}),new Ht({optional:!0,name:t.issuerUniqueID||L}),Tn.schema(t.extensions||{},!0)]})}fromSchema(e){De(e,Kme);let t=Ie(e,e,va.schema({names:{version:fy,holder:{names:{blockName:hy}},issuer:py,signature:{names:{blockName:dy}},serialNumber:my,attrCertValidityPeriod:{names:{blockName:gy}},attributes:vy,issuerUniqueID:th,extensions:{names:{blockName:rh}}}}));switch(be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.holder=new SA({schema:t.result.holder}),t.result.issuer.idBlock.tagClass){case 3:this.issuer=new zR({schema:new W({value:t.result.issuer.valueBlock.value})});break;case 1:default:throw new Error("Incorrect value for 'issuer' in AttributeCertificateInfoV2")}this.signature=new ve({schema:t.result.signature}),this.serialNumber=t.result.serialNumber,this.attrCertValidityPeriod=new qh({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new un({schema:n})),th in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),rh in t.result&&(this.extensions=new Tn({schema:t.result.extensions}))}toSchema(){let e=new W({value:[new ge({value:this.version}),this.holder.toSchema(),new oe({idBlock:{tagClass:3,tagNumber:0},value:this.issuer.toSchema().valueBlock.value}),this.signature.toSchema(),this.serialNumber,this.attrCertValidityPeriod.toSchema(),new W({value:Array.from(this.attributes,t=>t.toSchema())})]});return this.issuerUniqueID&&e.valueBlock.value.push(this.issuerUniqueID),this.extensions&&e.valueBlock.value.push(this.extensions.toSchema()),e}toJSON(){let e={version:this.version,holder:this.holder.toJSON(),issuer:this.issuer.toJSON(),signature:this.signature.toJSON(),serialNumber:this.serialNumber.toJSON(),attrCertValidityPeriod:this.attrCertValidityPeriod.toJSON(),attributes:Array.from(this.attributes,t=>t.toJSON())};return this.issuerUniqueID&&(e.issuerUniqueID=this.issuerUniqueID.toJSON()),this.extensions&&(e.extensions=this.extensions.toJSON()),e}};bA.CLASS_NAME="AttributeCertificateInfoV2";var yy="acinfo",xy="signatureAlgorithm",wy="signatureValue",$me=[yy,xy,wy],Nl=class Sy extends _e{static{o(this,"AttributeCertificateV2")}constructor(e={}){super(),this.acinfo=B(e,yy,Sy.defaultValues(yy)),this.signatureAlgorithm=B(e,xy,Sy.defaultValues(xy)),this.signatureValue=B(e,wy,Sy.defaultValues(wy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case yy:return new bA;case xy:return new ve;case wy:return new Ht;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[bA.schema(t.acinfo||{}),ve.schema(t.signatureAlgorithm||{}),new Ht({name:t.signatureValue||L})]})}fromSchema(e){De(e,$me);let t=Ie(e,e,Sy.schema({names:{acinfo:{names:{blockName:yy}},signatureAlgorithm:{names:{blockName:xy}},signatureValue:wy}}));be.assertSchema(t,this.className),this.acinfo=new bA({schema:t.result.acinfo}),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}toSchema(){return new W({value:[this.acinfo.toSchema(),this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){return{acinfo:this.acinfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()}}};Nl.CLASS_NAME="AttributeCertificateV2";var nh="contentType",Wd="content",Xme=[nh,Wd],en=class EA extends _e{static{o(this,"ContentInfo")}constructor(e={}){super(),this.contentType=B(e,nh,EA.defaultValues(nh)),this.content=B(e,Wd,EA.defaultValues(Wd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nh:return L;case Wd:return new xt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case nh:return typeof t=="string"&&t===this.defaultValues(nh);case Wd:return t instanceof xt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return"optional"in t||(t.optional=!1),new W({name:t.blockName||"ContentInfo",optional:t.optional,value:[new rt({name:t.contentType||nh}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new xt({name:t.content||Wd})]})]})}fromSchema(e){De(e,Xme);let t=Ie(e,e,EA.schema());be.assertSchema(t,this.className),this.contentType=t.result.contentType.valueBlock.toString(),this.content=t.result.content}toSchema(){return new W({value:[new rt({value:this.contentType}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.content]})]})}toJSON(){let e={contentType:this.contentType};return this.content instanceof xt||(e.content=this.content.toJSON()),e}};en.CLASS_NAME="ContentInfo";en.DATA=RO;en.SIGNED_DATA=cK;en.ENVELOPED_DATA=lK;en.ENCRYPTED_DATA=fK;var rR="type",nR="value",JR="utcTimeName",YR="generalTimeName",Gme=[JR,YR],WH;(function(r){r[r.UTCTime=0]="UTCTime",r[r.GeneralizedTime=1]="GeneralizedTime",r[r.empty=2]="empty"})(WH||(WH={}));var Yn=class AA extends _e{static{o(this,"Time")}constructor(e={}){super(),this.type=B(e,rR,AA.defaultValues(rR)),this.value=B(e,nR,AA.defaultValues(nR)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case rR:return 0;case nR:return new Date(0,0,0);default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=B(e,"names",{});return new Vr({optional:t,value:[new Sf({name:n.utcTimeName||L}),new Lr({name:n.generalTimeName||L})]})}fromSchema(e){De(e,Gme);let t=Ie(e,e,AA.schema({names:{utcTimeName:JR,generalTimeName:YR}}));be.assertSchema(t,this.className),JR in t.result&&(this.type=0,this.value=t.result.utcTimeName.toDate()),YR in t.result&&(this.type=1,this.value=t.result.generalTimeName.toDate())}toSchema(){return this.type===0?new Sf({valueDate:this.value}):this.type===1?new Lr({valueDate:this.value}):{}}toJSON(){return{type:this.type,value:this.value}}};Yn.CLASS_NAME="Time";var sR="tbs",Zc="version",CA="serialNumber",NA="signature",TA="issuer",IA="notBefore",_A="notAfter",BA="subject",DA="subjectPublicKeyInfo",by="issuerUniqueID",Ey="subjectUniqueID",Ay="extensions",Cy="signatureAlgorithm",Ny="signatureValue",mi="tbsCertificate",y2=`${mi}.${Zc}`,LO=`${mi}.${CA}`,VO=`${mi}.${NA}`,UO=`${mi}.${TA}`,x2=`${mi}.${IA}`,w2=`${mi}.${_A}`,jO=`${mi}.${BA}`,FO=`${mi}.${DA}`,S2=`${mi}.${by}`,b2=`${mi}.${Ey}`,yx=`${mi}.${Ay}`,Wme=[mi,y2,LO,VO,UO,x2,w2,jO,FO,S2,b2,yx,Cy,Ny];function zme(r={}){let e=B(r,"names",{});return new W({name:e.blockName||mi,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({name:e.tbsCertificateVersion||y2})]}),new ge({name:e.tbsCertificateSerialNumber||LO}),ve.schema(e.signature||{names:{blockName:VO}}),Ur.schema(e.issuer||{names:{blockName:UO}}),new W({name:e.tbsCertificateValidity||"tbsCertificate.validity",value:[Yn.schema(e.notBefore||{names:{utcTimeName:x2,generalTimeName:x2}}),Yn.schema(e.notAfter||{names:{utcTimeName:w2,generalTimeName:w2}})]}),Ur.schema(e.subject||{names:{blockName:jO}}),ba.schema(e.subjectPublicKeyInfo||{names:{blockName:FO}}),new gt({name:e.tbsCertificateIssuerUniqueID||S2,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new gt({name:e.tbsCertificateSubjectUniqueID||b2,optional:!0,idBlock:{tagClass:3,tagNumber:2}}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:3},value:[Tn.schema(e.extensions||{names:{blockName:yx}})]})]})}o(zme,"tbsCertificate");var ds=class Nn extends _e{static{o(this,"Certificate")}get tbs(){return dt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,sR,Nn.defaultValues(sR))),this.version=B(e,Zc,Nn.defaultValues(Zc)),this.serialNumber=B(e,CA,Nn.defaultValues(CA)),this.signature=B(e,NA,Nn.defaultValues(NA)),this.issuer=B(e,TA,Nn.defaultValues(TA)),this.notBefore=B(e,IA,Nn.defaultValues(IA)),this.notAfter=B(e,_A,Nn.defaultValues(_A)),this.subject=B(e,BA,Nn.defaultValues(BA)),this.subjectPublicKeyInfo=B(e,DA,Nn.defaultValues(DA)),by in e&&(this.issuerUniqueID=B(e,by,Nn.defaultValues(by))),Ey in e&&(this.subjectUniqueID=B(e,Ey,Nn.defaultValues(Ey))),Ay in e&&(this.extensions=B(e,Ay,Nn.defaultValues(Ay))),this.signatureAlgorithm=B(e,Cy,Nn.defaultValues(Cy)),this.signatureValue=B(e,Ny,Nn.defaultValues(Ny)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case sR:return on;case Zc:return 0;case CA:return new ge;case NA:return new ve;case TA:return new Ur;case IA:return new Yn;case _A:return new Yn;case BA:return new Ur;case DA:return new ba;case by:return on;case Ey:return on;case Ay:return[];case Cy:return new ve;case Ny:return new Ht;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[zme(t.tbsCertificate),ve.schema(t.signatureAlgorithm||{names:{blockName:Cy}}),new Ht({name:t.signatureValue||Ny})]})}fromSchema(e){De(e,Wme);let t=Ie(e,e,Nn.schema({names:{tbsCertificate:{names:{extensions:{names:{extensions:yx}}}}}}));be.assertSchema(t,this.className),this.tbsView=t.result.tbsCertificate.valueBeforeDecodeView,y2 in t.result&&(this.version=t.result[y2].valueBlock.valueDec),this.serialNumber=t.result[LO],this.signature=new ve({schema:t.result[VO]}),this.issuer=new Ur({schema:t.result[UO]}),this.notBefore=new Yn({schema:t.result[x2]}),this.notAfter=new Yn({schema:t.result[w2]}),this.subject=new Ur({schema:t.result[jO]}),this.subjectPublicKeyInfo=new ba({schema:t.result[FO]}),S2 in t.result&&(this.issuerUniqueID=t.result[S2].valueBlock.valueHex),b2 in t.result&&(this.subjectUniqueID=t.result[b2].valueBlock.valueHex),yx in t.result&&(this.extensions=Array.from(t.result[yx],n=>new zi({schema:n}))),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return Zc in this&&this.version!==Nn.defaultValues(Zc)&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({value:this.version})]})),e.push(this.serialNumber),e.push(this.signature.toSchema()),e.push(this.issuer.toSchema()),e.push(new W({value:[this.notBefore.toSchema(),this.notAfter.toSchema()]})),e.push(this.subject.toSchema()),e.push(this.subjectPublicKeyInfo.toSchema()),this.issuerUniqueID&&e.push(new gt({optional:!0,idBlock:{tagClass:3,tagNumber:1},valueHex:this.issuerUniqueID})),this.subjectUniqueID&&e.push(new gt({optional:!0,idBlock:{tagClass:3,tagNumber:2},valueHex:this.subjectUniqueID})),this.extensions&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:3},value:[new W({value:Array.from(this.extensions,t=>t.toSchema())})]})),new W({value:e})}toSchema(e=!1){let t;if(e===!1){if(!this.tbsView.byteLength)return Nn.schema().value[0];let n=Jr(this.tbsView);be.assert(n,"TBS Certificate"),t=n.result}else t=this.encodeTBS();return new W({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:Et.ToHex(this.tbsView),version:this.version,serialNumber:this.serialNumber.toJSON(),signature:this.signature.toJSON(),issuer:this.issuer.toJSON(),notBefore:this.notBefore.toJSON(),notAfter:this.notAfter.toJSON(),subject:this.subject.toJSON(),subjectPublicKeyInfo:this.subjectPublicKeyInfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()};return Zc in this&&this.version!==Nn.defaultValues(Zc)&&(e.version=this.version),this.issuerUniqueID&&(e.issuerUniqueID=Et.ToHex(this.issuerUniqueID)),this.subjectUniqueID&&(e.subjectUniqueID=Et.ToHex(this.subjectUniqueID)),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}async getPublicKey(e,t=Dt(!0)){return t.getPublicKey(this.subjectPublicKeyInfo,this.signatureAlgorithm,e)}async getKeyHash(e="SHA-1",t=Dt(!0)){return t.digest({name:e},this.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView)}async sign(e,t="SHA-1",n=Dt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),i=s.parameters;this.signature=s.signatureAlgorithm,this.signatureAlgorithm=s.signatureAlgorithm,this.tbsView=new Uint8Array(this.encodeTBS().toBER());let a=await n.signWithPrivateKey(this.tbsView,e,i);this.signatureValue=new Ht({valueHex:a})}async verify(e,t=Dt(!0)){let n;if(e?n=e.subjectPublicKeyInfo:this.issuer.isEqual(this.subject)&&(n=this.subjectPublicKeyInfo),!(n instanceof ba))throw new Error("Please provide issuer certificate as a parameter");return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};ds.CLASS_NAME="Certificate";function _K(r,e=null){if(e&&r.issuer.isEqual(e.issuer)&&r.serialNumber.isEqual(e.serialNumber))return null;let t=!1;if(r.extensions){for(let n of r.extensions)if(n.extnID===IO&&n.parsedValue instanceof kO&&n.parsedValue.cA){t=!0;break}}return t?r:null}o(_K,"checkCA");var zd="certId",Jd="certValue",Nd="parsedValue",Jme=[zd,Jd],BK=class Ty extends _e{static{o(this,"CertBag")}constructor(e={}){super(),this.certId=B(e,zd,Ty.defaultValues(zd)),this.certValue=B(e,Jd,Ty.defaultValues(Jd)),Nd in e&&(this.parsedValue=B(e,Nd,Ty.defaultValues(Nd))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case zd:return L;case Jd:return new xt;case Nd:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case zd:return t===L;case Jd:return t instanceof xt;case Nd:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.id||"id"}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new xt({name:t.value||"value"})]})]})}fromSchema(e){De(e,Jme);let t=Ie(e,e,Ty.schema({names:{id:zd,value:Jd}}));be.assertSchema(t,this.className),this.certId=t.result.certId.valueBlock.toString(),this.certValue=t.result.certValue;let n=this.certValue.valueBlock.valueHexView;switch(this.certId){case BH:try{this.parsedValue=ds.fromBER(n)}catch{Nl.fromBER(n)}break;case DH:this.parsedValue=Nl.fromBER(n);break;case Zde:default:throw new Error(`Incorrect CERT_ID value in CertBag: ${this.certId}`)}}toSchema(){return Nd in this&&("acinfo"in this.parsedValue?this.certId=DH:this.certId=BH,this.certValue=new Ve({valueHex:this.parsedValue.toSchema().toBER(!1)})),new W({value:[new rt({value:this.certId}),new oe({idBlock:{tagClass:3,tagNumber:0},value:["toSchema"in this.certValue?this.certValue.toSchema():this.certValue]})]})}toJSON(){return{certId:this.certId,certValue:this.certValue.toJSON()}}};BK.CLASS_NAME="CertBag";var Iy="userCertificate",Yd="revocationDate",sh="crlEntryExtensions",Yme=[Iy,Yd,sh],DK=class _y extends _e{static{o(this,"RevokedCertificate")}constructor(e={}){super(),this.userCertificate=B(e,Iy,_y.defaultValues(Iy)),this.revocationDate=B(e,Yd,_y.defaultValues(Yd)),sh in e&&(this.crlEntryExtensions=B(e,sh,_y.defaultValues(sh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Iy:return new ge;case Yd:return new Yn;case sh:return new Tn;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.userCertificate||Iy}),Yn.schema({names:{utcTimeName:t.revocationDate||Yd,generalTimeName:t.revocationDate||Yd}}),Tn.schema({names:{blockName:t.crlEntryExtensions||sh}},!0)]})}fromSchema(e){De(e,Yme);let t=Ie(e,e,_y.schema());be.assertSchema(t,this.className),this.userCertificate=t.result.userCertificate,this.revocationDate=new Yn({schema:t.result.revocationDate}),sh in t.result&&(this.crlEntryExtensions=new Tn({schema:t.result.crlEntryExtensions}))}toSchema(){let e=[this.userCertificate,this.revocationDate.toSchema()];return this.crlEntryExtensions&&e.push(this.crlEntryExtensions.toSchema()),new W({value:e})}toJSON(){let e={userCertificate:this.userCertificate.toJSON(),revocationDate:this.revocationDate.toJSON()};return this.crlEntryExtensions&&(e.crlEntryExtensions=this.crlEntryExtensions.toJSON()),e}};DK.CLASS_NAME="RevokedCertificate";var iR="tbs",jv="version",aR="signature",oR="issuer",uR="thisUpdate",UE="nextUpdate",jE="revokedCertificates",FE="crlExtensions",By="signatureAlgorithm",Dy="signatureValue",yu="tbsCertList",E2=`${yu}.version`,MO=`${yu}.signature`,qO=`${yu}.issuer`,A2=`${yu}.thisUpdate`,Nx=`${yu}.nextUpdate`,C2=`${yu}.revokedCertificates`,N2=`${yu}.extensions`,Qme=[yu,E2,MO,qO,A2,Nx,C2,N2,By,Dy];function Zme(r={}){let e=B(r,"names",{});return new W({name:e.blockName||yu,value:[new ge({optional:!0,name:e.tbsCertListVersion||E2,value:2}),ve.schema(e.signature||{names:{blockName:MO}}),Ur.schema(e.issuer||{names:{blockName:qO}}),Yn.schema(e.tbsCertListThisUpdate||{names:{utcTimeName:A2,generalTimeName:A2}}),Yn.schema(e.tbsCertListNextUpdate||{names:{utcTimeName:Nx,generalTimeName:Nx}},!0),new W({optional:!0,value:[new Tt({name:e.tbsCertListRevokedCertificates||C2,value:new W({value:[new ge,Yn.schema(),Tn.schema({},!0)]})})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Tn.schema(e.crlExtensions||{names:{blockName:N2}})]})]})}o(Zme,"tbsCertList");var e0e=[BO,tK,Fde,Mde,rK,_O,DO,qde,Hde,nK],Tx=class Ts extends _e{static{o(this,"CertificateRevocationList")}get tbs(){return dt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,iR,Ts.defaultValues(iR))),this.version=B(e,jv,Ts.defaultValues(jv)),this.signature=B(e,aR,Ts.defaultValues(aR)),this.issuer=B(e,oR,Ts.defaultValues(oR)),this.thisUpdate=B(e,uR,Ts.defaultValues(uR)),UE in e&&(this.nextUpdate=B(e,UE,Ts.defaultValues(UE))),jE in e&&(this.revokedCertificates=B(e,jE,Ts.defaultValues(jE))),FE in e&&(this.crlExtensions=B(e,FE,Ts.defaultValues(FE))),this.signatureAlgorithm=B(e,By,Ts.defaultValues(By)),this.signatureValue=B(e,Dy,Ts.defaultValues(Dy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case iR:return on;case jv:return 0;case aR:return new ve;case oR:return new Ur;case uR:return new Yn;case UE:return new Yn;case jE:return[];case FE:return new Tn;case By:return new ve;case Dy:return new Ht;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||"CertificateList",value:[Zme(e),ve.schema(t.signatureAlgorithm||{names:{blockName:By}}),new Ht({name:t.signatureValue||Dy})]})}fromSchema(e){De(e,Qme);let t=Ie(e,e,Ts.schema());be.assertSchema(t,this.className),this.tbsView=t.result.tbsCertList.valueBeforeDecodeView,E2 in t.result&&(this.version=t.result[E2].valueBlock.valueDec),this.signature=new ve({schema:t.result[MO]}),this.issuer=new Ur({schema:t.result[qO]}),this.thisUpdate=new Yn({schema:t.result[A2]}),Nx in t.result&&(this.nextUpdate=new Yn({schema:t.result[Nx]})),C2 in t.result&&(this.revokedCertificates=Array.from(t.result[C2],n=>new DK({schema:n}))),N2 in t.result&&(this.crlExtensions=new Tn({schema:t.result[N2]})),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return this.version!==Ts.defaultValues(jv)&&e.push(new ge({value:this.version})),e.push(this.signature.toSchema()),e.push(this.issuer.toSchema()),e.push(this.thisUpdate.toSchema()),this.nextUpdate&&e.push(this.nextUpdate.toSchema()),this.revokedCertificates&&e.push(new W({value:Array.from(this.revokedCertificates,t=>t.toSchema())})),this.crlExtensions&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.crlExtensions.toSchema()]})),new W({value:e})}toSchema(e=!1){let t;if(e)t=this.encodeTBS();else{if(!this.tbsView.byteLength)return Ts.schema();let n=Jr(this.tbsView);be.assert(n,"TBS Certificate Revocation List"),t=n.result}return new W({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:Et.ToHex(this.tbsView),version:this.version,signature:this.signature.toJSON(),issuer:this.issuer.toJSON(),thisUpdate:this.thisUpdate.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()};return this.version!==Ts.defaultValues(jv)&&(e.version=this.version),this.nextUpdate&&(e.nextUpdate=this.nextUpdate.toJSON()),this.revokedCertificates&&(e.revokedCertificates=Array.from(this.revokedCertificates,t=>t.toJSON())),this.crlExtensions&&(e.crlExtensions=this.crlExtensions.toJSON()),e}isCertificateRevoked(e){if(!this.issuer.isEqual(e.issuer)||!this.revokedCertificates)return!1;for(let t of this.revokedCertificates)if(t.userCertificate.isEqual(e.serialNumber))return!0;return!1}async sign(e,t="SHA-1",n=Dt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),{parameters:i}=s;this.signature=s.signatureAlgorithm,this.signatureAlgorithm=s.signatureAlgorithm,this.tbsView=new Uint8Array(this.encodeTBS().toBER());let a=await n.signWithPrivateKey(this.tbsView,e,i);this.signatureValue=new Ht({valueHex:a})}async verify(e={},t=Dt(!0)){let n;if(e.issuerCertificate&&(n=e.issuerCertificate.subjectPublicKeyInfo,!this.issuer.isEqual(e.issuerCertificate.subject)))return!1;if(e.publicKeyInfo&&(n=e.publicKeyInfo),!n)throw new Error("Issuer's certificate must be provided as an input parameter");if(this.crlExtensions){for(let s of this.crlExtensions.extensions)if(s.critical&&!e0e.includes(s.extnID))return!1}return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};Tx.CLASS_NAME="CertificateRevocationList";var Qd="crlId",Zd="crlValue",Fv="parsedValue",t0e=[Qd,Zd],RK=class Ry extends _e{static{o(this,"CRLBag")}constructor(e={}){super(),this.crlId=B(e,Qd,Ry.defaultValues(Qd)),this.crlValue=B(e,Zd,Ry.defaultValues(Zd)),Fv in e&&(this.parsedValue=B(e,Fv,Ry.defaultValues(Fv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Qd:return L;case Zd:return new xt;case Fv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Qd:return t===L;case Zd:return t instanceof xt;case Fv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.id||"id"}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new xt({name:t.value||"value"})]})]})}fromSchema(e){De(e,t0e);let t=Ie(e,e,Ry.schema({names:{id:Qd,value:Zd}}));switch(be.assertSchema(t,this.className),this.crlId=t.result.crlId.valueBlock.toString(),this.crlValue=t.result.crlValue,this.crlId){case RH:this.parsedValue=Tx.fromBER(this.certValue.valueBlock.valueHex);break;default:throw new Error(`Incorrect CRL_ID value in CRLBag: ${this.crlId}`)}}toSchema(){return this.parsedValue&&(this.crlId=RH,this.crlValue=new Ve({valueHex:this.parsedValue.toSchema().toBER(!1)})),new W({value:[new rt({value:this.crlId}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.crlValue.toSchema()]})]})}toJSON(){return{crlId:this.crlId,crlValue:this.crlValue.toJSON()}}};RK.CLASS_NAME="CRLBag";var em="version",tm="encryptedContentInfo",el="unprotectedAttrs",r0e=[em,tm,el],Ix=class Oy extends _e{static{o(this,"EncryptedData")}constructor(e={}){super(),this.version=B(e,em,Oy.defaultValues(em)),this.encryptedContentInfo=B(e,tm,Oy.defaultValues(tm)),el in e&&(this.unprotectedAttrs=B(e,el,Oy.defaultValues(el))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case em:return 0;case tm:return new ps;case el:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case em:return t===0;case tm:return ps.compareWithDefault("contentType",t.contentType)&&ps.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&ps.compareWithDefault("encryptedContent",t.encryptedContent);case el:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),ps.schema(t.encryptedContentInfo||{}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.unprotectedAttrs||L,value:un.schema()})]})]})}fromSchema(e){De(e,r0e);let t=Ie(e,e,Oy.schema({names:{version:em,encryptedContentInfo:{names:{blockName:tm}},unprotectedAttrs:el}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.encryptedContentInfo=new ps({schema:t.result.encryptedContentInfo}),el in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new un({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(this.encryptedContentInfo.toSchema()),this.unprotectedAttrs&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.unprotectedAttrs,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={version:this.version,encryptedContentInfo:this.encryptedContentInfo.toJSON()};return this.unprotectedAttrs&&(e.unprotectedAttrs=Array.from(this.unprotectedAttrs,t=>t.toJSON())),e}async encrypt(e,t=Dt(!0)){Cr.assert(e,"parameters","object");let n={...e,contentType:"1.2.840.113549.1.7.1"};this.encryptedContentInfo=await t.encryptEncryptedContentInfo(n)}async decrypt(e,t=Dt(!0)){Cr.assert(e,"parameters","object");let n={...e,encryptedContentInfo:this.encryptedContentInfo};return t.decryptEncryptedContentInfo(n)}};Ix.CLASS_NAME="EncryptedData";var ih="encryptionAlgorithm",tl="encryptedData",Mv="parsedValue",n0e=[ih,tl],OK=class rm extends _e{static{o(this,"PKCS8ShroudedKeyBag")}constructor(e={}){super(),this.encryptionAlgorithm=B(e,ih,rm.defaultValues(ih)),this.encryptedData=B(e,tl,rm.defaultValues(tl)),Mv in e&&(this.parsedValue=B(e,Mv,rm.defaultValues(Mv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ih:return new ve;case tl:return new Ve;case Mv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ih:return ve.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case tl:return t.isEqual(rm.defaultValues(e));case Mv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.encryptionAlgorithm||{names:{blockName:ih}}),new Vr({value:[new Ve({name:t.encryptedData||tl}),new Ve({idBlock:{isConstructed:!0},name:t.encryptedData||tl})]})]})}fromSchema(e){De(e,n0e);let t=Ie(e,e,rm.schema({names:{encryptionAlgorithm:{names:{blockName:ih}},encryptedData:tl}}));be.assertSchema(t,this.className),this.encryptionAlgorithm=new ve({schema:t.result.encryptionAlgorithm}),this.encryptedData=t.result.encryptedData}toSchema(){return new W({value:[this.encryptionAlgorithm.toSchema(),this.encryptedData]})}toJSON(){return{encryptionAlgorithm:this.encryptionAlgorithm.toJSON(),encryptedData:this.encryptedData.toJSON()}}async parseInternalValues(e,t=Dt(!0)){let s=await new Ix({encryptedContentInfo:new ps({contentEncryptionAlgorithm:this.encryptionAlgorithm,encryptedContent:this.encryptedData})}).decrypt(e,t);this.parsedValue=Cx.fromBER(s)}async makeInternalValues(e,t=Dt(!0)){if(!this.parsedValue)throw new Error('Please initialize "parsedValue" first');let n=new Ix,s={...e,contentToEncrypt:this.parsedValue.toSchema().toBER(!1)};if(await n.encrypt(s,t),!n.encryptedContentInfo.encryptedContent)throw new Error("The filed `encryptedContent` in EncryptedContentInfo is empty");this.encryptionAlgorithm=n.encryptedContentInfo.contentEncryptionAlgorithm,this.encryptedData=n.encryptedContentInfo.encryptedContent}};OK.CLASS_NAME="PKCS8ShroudedKeyBag";var nm="secretTypeId",sm="secretValue",s0e=[nm,sm],PK=class RA extends _e{static{o(this,"SecretBag")}constructor(e={}){super(),this.secretTypeId=B(e,nm,RA.defaultValues(nm)),this.secretValue=B(e,sm,RA.defaultValues(sm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nm:return L;case sm:return new xt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case nm:return t===L;case sm:return t instanceof xt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.id||"id"}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new xt({name:t.value||"value"})]})]})}fromSchema(e){De(e,s0e);let t=Ie(e,e,RA.schema({names:{id:nm,value:sm}}));be.assertSchema(t,this.className),this.secretTypeId=t.result.secretTypeId.valueBlock.toString(),this.secretValue=t.result.secretValue}toSchema(){return new W({value:[new rt({value:this.secretTypeId}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.secretValue.toSchema()]})]})}toJSON(){return{secretTypeId:this.secretTypeId,secretValue:this.secretValue.toJSON()}}};PK.CLASS_NAME="SecretBag";var i0e=class ah{static{o(this,"SafeBagValueFactory")}static getItems(){return this.items||(this.items={},ah.register("1.2.840.113549.1.12.10.1.1",Cx),ah.register("1.2.840.113549.1.12.10.1.2",OK),ah.register("1.2.840.113549.1.12.10.1.3",BK),ah.register("1.2.840.113549.1.12.10.1.4",RK),ah.register("1.2.840.113549.1.12.10.1.5",PK),ah.register("1.2.840.113549.1.12.10.1.6",f0)),this.items}static register(e,t){this.getItems()[e]=t}static find(e){return this.getItems()[e]||null}},oh="bagId",uh="bagValue",au="bagAttributes",a0e=[oh,uh,au],QR=class Py extends _e{static{o(this,"SafeBag")}constructor(e={}){super(),this.bagId=B(e,oh,Py.defaultValues(oh)),this.bagValue=B(e,uh,Py.defaultValues(uh)),au in e&&(this.bagAttributes=B(e,au,Py.defaultValues(au))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case oh:return L;case uh:return new xt;case au:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case oh:return t===L;case uh:return t instanceof xt;case au:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.bagId||oh}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new xt({name:t.bagValue||uh})]}),new Qr({optional:!0,value:[new Tt({name:t.bagAttributes||au,value:un.schema()})]})]})}fromSchema(e){De(e,a0e);let t=Ie(e,e,Py.schema({names:{bagId:oh,bagValue:uh,bagAttributes:au}}));be.assertSchema(t,this.className),this.bagId=t.result.bagId.valueBlock.toString();let n=i0e.find(this.bagId);if(!n)throw new Error(`Invalid BAG_ID for SafeBag: ${this.bagId}`);this.bagValue=new n({schema:t.result.bagValue}),au in t.result&&(this.bagAttributes=Array.from(t.result.bagAttributes,s=>new un({schema:s})))}toSchema(){let e=[new rt({value:this.bagId}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.bagValue.toSchema()]})];return this.bagAttributes&&e.push(new Qr({value:Array.from(this.bagAttributes,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={bagId:this.bagId,bagValue:this.bagValue.toJSON()};return this.bagAttributes&&(e.bagAttributes=Array.from(this.bagAttributes,t=>t.toJSON())),e}};QR.CLASS_NAME="SafeBag";var Td="safeBags",f0=class ZR extends _e{static{o(this,"SafeContents")}constructor(e={}){super(),this.safeBags=B(e,Td,ZR.defaultValues(Td)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Td:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Td:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.safeBags||L,value:QR.schema()})]})}fromSchema(e){De(e,[Td]);let t=Ie(e,e,ZR.schema({names:{safeBags:Td}}));be.assertSchema(t,this.className),this.safeBags=Array.from(t.result.safeBags,n=>new QR({schema:n}))}toSchema(){return new W({value:Array.from(this.safeBags,e=>e.toSchema())})}toJSON(){return{safeBags:Array.from(this.safeBags,e=>e.toJSON())}}};f0.CLASS_NAME="SafeContents";var ky="otherCertFormat",Ly="otherCert",o0e=[ky,Ly],OA=class PA extends _e{static{o(this,"OtherCertificateFormat")}constructor(e={}){super(),this.otherCertFormat=B(e,ky,PA.defaultValues(ky)),this.otherCert=B(e,Ly,PA.defaultValues(Ly)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ky:return L;case Ly:return new xt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.otherCertFormat||ky}),new xt({name:t.otherCert||Ly})]})}fromSchema(e){De(e,o0e);let t=Ie(e,e,PA.schema());be.assertSchema(t,this.className),this.otherCertFormat=t.result.otherCertFormat.valueBlock.toString(),this.otherCert=t.result.otherCert}toSchema(){return new W({value:[new rt({value:this.otherCertFormat}),this.otherCert]})}toJSON(){let e={otherCertFormat:this.otherCertFormat};return this.otherCert instanceof xt||(e.otherCert=this.otherCert.toJSON()),e}},Vy="certificates",u0e=[Vy],Kh=class eO extends _e{static{o(this,"CertificateSet")}constructor(e={}){super(),this.certificates=B(e,Vy,eO.defaultValues(Vy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Vy:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Qr({name:t.blockName||L,value:[new Tt({name:t.certificates||Vy,value:new Vr({value:[ds.schema(),new oe({idBlock:{tagClass:3,tagNumber:0},value:[new xt]}),new oe({idBlock:{tagClass:3,tagNumber:1},value:[new W]}),new oe({idBlock:{tagClass:3,tagNumber:2},value:Nl.schema().valueBlock.value}),new oe({idBlock:{tagClass:3,tagNumber:3},value:OA.schema().valueBlock.value})]})})]})}fromSchema(e){De(e,u0e);let t=Ie(e,e,eO.schema());be.assertSchema(t,this.className),this.certificates=Array.from(t.result.certificates||[],n=>{let s=n.idBlock.tagNumber;if(n.idBlock.tagClass===1)return new ds({schema:n});let i=new W({value:n.valueBlock.value});switch(s){case 1:return i.valueBlock.value[0].valueBlock.value[0].valueBlock.valueDec===1?new Nl({schema:i}):new v2({schema:i});case 2:return new Nl({schema:i});case 3:return new OA({schema:i})}return n})}toSchema(){return new Qr({value:Array.from(this.certificates,e=>{switch(!0){case e instanceof ds:return e.toSchema();case e instanceof v2:return new oe({idBlock:{tagClass:3,tagNumber:1},value:e.toSchema().valueBlock.value});case e instanceof Nl:return new oe({idBlock:{tagClass:3,tagNumber:2},value:e.toSchema().valueBlock.value});case e instanceof OA:return new oe({idBlock:{tagClass:3,tagNumber:3},value:e.toSchema().valueBlock.value})}return e.toSchema()})})}toJSON(){return{certificates:Array.from(this.certificates,e=>e.toJSON())}}};Kh.CLASS_NAME="CertificateSet";var Uy="otherRevInfoFormat",jy="otherRevInfo",c0e=[Uy,jy],xx=class kA extends _e{static{o(this,"OtherRevocationInfoFormat")}constructor(e={}){super(),this.otherRevInfoFormat=B(e,Uy,kA.defaultValues(Uy)),this.otherRevInfo=B(e,jy,kA.defaultValues(jy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Uy:return L;case jy:return new xt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.otherRevInfoFormat||Uy}),new xt({name:t.otherRevInfo||jy})]})}fromSchema(e){De(e,c0e);let t=Ie(e,e,kA.schema());be.assertSchema(t,this.className),this.otherRevInfoFormat=t.result.otherRevInfoFormat.valueBlock.toString(),this.otherRevInfo=t.result.otherRevInfo}toSchema(){return new W({value:[new rt({value:this.otherRevInfoFormat}),this.otherRevInfo]})}toJSON(){let e={otherRevInfoFormat:this.otherRevInfoFormat};return this.otherRevInfo instanceof xt||(e.otherRevInfo=this.otherRevInfo.toJSON()),e}};xx.CLASS_NAME="OtherRevocationInfoFormat";var Fy="crls",cR="otherRevocationInfos",l0e=[Fy],wx=class LA extends _e{static{o(this,"RevocationInfoChoices")}constructor(e={}){super(),this.crls=B(e,Fy,LA.defaultValues(Fy)),this.otherRevocationInfos=B(e,cR,LA.defaultValues(cR)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fy:return[];case cR:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Qr({name:t.blockName||L,value:[new Tt({name:t.crls||L,value:new Vr({value:[Tx.schema(),new oe({idBlock:{tagClass:3,tagNumber:1},value:[new rt,new xt]})]})})]})}fromSchema(e){De(e,l0e);let t=Ie(e,e,LA.schema({names:{crls:Fy}}));if(be.assertSchema(t,this.className),t.result.crls)for(let n of t.result.crls)n.idBlock.tagClass===1?this.crls.push(new Tx({schema:n})):this.otherRevocationInfos.push(new xx({schema:n}))}toSchema(){let e=[];return e.push(...Array.from(this.crls,t=>t.toSchema())),e.push(...Array.from(this.otherRevocationInfos,t=>{let n=t.toSchema();return n.idBlock.tagClass=3,n.idBlock.tagNumber=1,n})),new Qr({value:e})}toJSON(){return{crls:Array.from(this.crls,e=>e.toJSON()),otherRevocationInfos:Array.from(this.otherRevocationInfos,e=>e.toJSON())}}};wx.CLASS_NAME="RevocationInfoChoices";var My="certs",ch="crls",f0e=[My,ch],VA=class tO extends _e{static{o(this,"OriginatorInfo")}constructor(e={}){super(),this.crls=B(e,ch,tO.defaultValues(ch)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case My:return new Kh;case ch:return new wx;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case My:return t.certificates.length===0;case ch:return t.crls.length===0&&t.otherRevocationInfos.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({name:t.certs||L,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Kh.schema().valueBlock.value}),new oe({name:t.crls||L,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:wx.schema().valueBlock.value})]})}fromSchema(e){De(e,f0e);let t=Ie(e,e,tO.schema({names:{certs:My,crls:ch}}));be.assertSchema(t,this.className),My in t.result&&(this.certs=new Kh({schema:new Qr({value:t.result.certs.valueBlock.value})})),ch in t.result&&(this.crls=new wx({schema:new Qr({value:t.result.crls.valueBlock.value})}))}toSchema(){let e=[];return this.certs&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.certs.toSchema().valueBlock.value})),this.crls&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:this.crls.toSchema().valueBlock.value})),new W({value:e})}toJSON(){let e={};return this.certs&&(e.certs=this.certs.toJSON()),this.crls&&(e.crls=this.crls.toJSON()),e}};VA.CLASS_NAME="OriginatorInfo";var qy="issuer",Hy="serialNumber",h0e=[qy,Hy],Qn=class UA extends _e{static{o(this,"IssuerAndSerialNumber")}constructor(e={}){super(),this.issuer=B(e,qy,UA.defaultValues(qy)),this.serialNumber=B(e,Hy,UA.defaultValues(Hy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case qy:return new Ur;case Hy:return new ge;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[Ur.schema(t.issuer||{}),new ge({name:t.serialNumber||L})]})}fromSchema(e){De(e,h0e);let t=Ie(e,e,UA.schema({names:{issuer:{names:{blockName:qy}},serialNumber:Hy}}));be.assertSchema(t,this.className),this.issuer=new Ur({schema:t.result.issuer}),this.serialNumber=t.result.serialNumber}toSchema(){return new W({value:[this.issuer.toSchema(),this.serialNumber]})}toJSON(){return{issuer:this.issuer.toJSON(),serialNumber:this.serialNumber.toJSON()}}};Qn.CLASS_NAME="IssuerAndSerialNumber";var ME="variant",qv="value",p0e=["blockName"],kK=class jA extends _e{static{o(this,"RecipientIdentifier")}constructor(e={}){super(),this.variant=B(e,ME,jA.defaultValues(ME)),qv in e&&(this.value=B(e,qv,jA.defaultValues(qv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ME:return-1;case qv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ME:return t===-1;case qv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Vr({value:[Qn.schema({names:{blockName:t.blockName||L}}),new gt({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:0}})]})}fromSchema(e){De(e,p0e);let t=Ie(e,e,jA.schema({names:{blockName:"blockName"}}));be.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new Qn({schema:t.result.blockName})):(this.variant=2,this.value=new Ve({valueHex:t.result.blockName.valueBlock.valueHex}))}toSchema(){switch(this.variant){case 1:if(!(this.value instanceof Qn))throw new Error("Incorrect type of RecipientIdentifier.value. It should be IssuerAndSerialNumber.");return this.value.toSchema();case 2:if(!(this.value instanceof Ve))throw new Error("Incorrect type of RecipientIdentifier.value. It should be ASN.1 OctetString.");return new gt({idBlock:{tagClass:3,tagNumber:0},valueHex:this.value.valueBlock.valueHexView});default:return new xt}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2)&&this.value&&(e.value=this.value.toJSON()),e}};kK.CLASS_NAME="RecipientIdentifier";var lh="version",im="rid",am="keyEncryptionAlgorithm",om="encryptedKey",qE="recipientCertificate",d0e=[lh,im,am,om],T2=class ou extends _e{static{o(this,"KeyTransRecipientInfo")}constructor(e={}){super(),this.version=B(e,lh,ou.defaultValues(lh)),this.rid=B(e,im,ou.defaultValues(im)),this.keyEncryptionAlgorithm=B(e,am,ou.defaultValues(am)),this.encryptedKey=B(e,om,ou.defaultValues(om)),this.recipientCertificate=B(e,qE,ou.defaultValues(qE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case lh:return-1;case im:return{};case am:return new ve;case om:return new Ve;case qE:return new ds;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case lh:return t===ou.defaultValues(lh);case im:return Object.keys(t).length===0;case am:case om:return t.isEqual(ou.defaultValues(e));case qE:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),kK.schema(t.rid||{}),ve.schema(t.keyEncryptionAlgorithm||{}),new Ve({name:t.encryptedKey||L})]})}fromSchema(e){De(e,d0e);let t=Ie(e,e,ou.schema({names:{version:lh,rid:{names:{blockName:im}},keyEncryptionAlgorithm:{names:{blockName:am}},encryptedKey:om}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,t.result.rid.idBlock.tagClass===3?this.rid=new Ve({valueHex:t.result.rid.valueBlock.valueHex}):this.rid=new Qn({schema:t.result.rid}),this.keyEncryptionAlgorithm=new ve({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){let e=[];return this.rid instanceof Qn?(this.version=0,e.push(new ge({value:this.version})),e.push(this.rid.toSchema())):(this.version=2,e.push(new ge({value:this.version})),e.push(new gt({idBlock:{tagClass:3,tagNumber:0},valueHex:this.rid.valueBlock.valueHexView}))),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.encryptedKey),new W({value:e})}toJSON(){return{version:this.version,rid:this.rid.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};T2.CLASS_NAME="KeyTransRecipientInfo";var um="algorithm",cm="publicKey",m0e=[um,cm],I2=class Ky extends _e{static{o(this,"OriginatorPublicKey")}constructor(e={}){super(),this.algorithm=B(e,um,Ky.defaultValues(um)),this.publicKey=B(e,cm,Ky.defaultValues(cm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case um:return new ve;case cm:return new Ht;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case um:case cm:return t.isEqual(Ky.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.algorithm||{}),new Ht({name:t.publicKey||L})]})}fromSchema(e){De(e,m0e);let t=Ie(e,e,Ky.schema({names:{algorithm:{names:{blockName:um}},publicKey:cm}}));be.assertSchema(t,this.className),this.algorithm=new ve({schema:t.result.algorithm}),this.publicKey=t.result.publicKey}toSchema(){return new W({value:[this.algorithm.toSchema(),this.publicKey]})}toJSON(){return{algorithm:this.algorithm.toJSON(),publicKey:this.publicKey.toJSON()}}};I2.CLASS_NAME="OriginatorPublicKey";var HE="variant",Hv="value",g0e=["blockName"],Sx=class FA extends _e{static{o(this,"OriginatorIdentifierOrKey")}constructor(e={}){super(),this.variant=B(e,HE,FA.defaultValues(HE)),Hv in e&&(this.value=B(e,Hv,FA.defaultValues(Hv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case HE:return-1;case Hv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case HE:return t===-1;case Hv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Vr({value:[Qn.schema({names:{blockName:t.blockName||L}}),new gt({idBlock:{tagClass:3,tagNumber:0},name:t.blockName||L}),new oe({idBlock:{tagClass:3,tagNumber:1},name:t.blockName||L,value:I2.schema().valueBlock.value})]})}fromSchema(e){De(e,g0e);let t=Ie(e,e,FA.schema({names:{blockName:"blockName"}}));be.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new Qn({schema:t.result.blockName})):t.result.blockName.idBlock.tagNumber===0?(t.result.blockName.idBlock.tagClass=1,t.result.blockName.idBlock.tagNumber=4,this.variant=2,this.value=t.result.blockName):(this.variant=3,this.value=new I2({schema:new W({value:t.result.blockName.valueBlock.value})}))}toSchema(){switch(this.variant){case 1:return this.value.toSchema();case 2:return this.value.idBlock.tagClass=3,this.value.idBlock.tagNumber=0,this.value;case 3:{let e=this.value.toSchema();return e.idBlock.tagClass=3,e.idBlock.tagNumber=1,e}default:return new xt}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2||this.variant===3)&&(e.value=this.value.toJSON()),e}};Sx.CLASS_NAME="OriginatorIdentifierOrKey";var lm="keyAttrId",co="keyAttr",v0e=[lm,co],$h=class MA extends _e{static{o(this,"OtherKeyAttribute")}constructor(e={}){super(),this.keyAttrId=B(e,lm,MA.defaultValues(lm)),co in e&&(this.keyAttr=B(e,co,MA.defaultValues(co))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case lm:return L;case co:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case lm:return typeof t=="string"&&t===L;case co:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({optional:t.optional||!0,name:t.blockName||L,value:[new rt({name:t.keyAttrId||L}),new xt({optional:!0,name:t.keyAttr||L})]})}fromSchema(e){De(e,v0e);let t=Ie(e,e,MA.schema({names:{keyAttrId:lm,keyAttr:co}}));be.assertSchema(t,this.className),this.keyAttrId=t.result.keyAttrId.valueBlock.toString(),co in t.result&&(this.keyAttr=t.result.keyAttr)}toSchema(){let e=[];return e.push(new rt({value:this.keyAttrId})),co in this&&e.push(this.keyAttr),new W({value:e})}toJSON(){let e={keyAttrId:this.keyAttrId};return co in this&&(e.keyAttr=this.keyAttr.toJSON()),e}};$h.CLASS_NAME="OtherKeyAttribute";var fh="subjectKeyIdentifier",rl="date",nl="other",y0e=[fh,rl,nl],_2=class fm extends _e{static{o(this,"RecipientKeyIdentifier")}constructor(e={}){super(),this.subjectKeyIdentifier=B(e,fh,fm.defaultValues(fh)),rl in e&&(this.date=B(e,rl,fm.defaultValues(rl))),nl in e&&(this.other=B(e,nl,fm.defaultValues(nl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fh:return new Ve;case rl:return new Lr;case nl:return new $h;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case fh:return t.isEqual(fm.defaultValues(fh));case rl:return t.year===0&&t.month===0&&t.day===0&&t.hour===0&&t.minute===0&&t.second===0&&t.millisecond===0;case nl:return t.keyAttrId===L&&!("keyAttr"in t);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Ve({name:t.subjectKeyIdentifier||L}),new Lr({optional:!0,name:t.date||L}),$h.schema(t.other||{})]})}fromSchema(e){De(e,y0e);let t=Ie(e,e,fm.schema({names:{subjectKeyIdentifier:fh,date:rl,other:{names:{blockName:nl}}}}));be.assertSchema(t,this.className),this.subjectKeyIdentifier=t.result.subjectKeyIdentifier,rl in t.result&&(this.date=t.result.date),nl in t.result&&(this.other=new $h({schema:t.result.other}))}toSchema(){let e=[];return e.push(this.subjectKeyIdentifier),this.date&&e.push(this.date),this.other&&e.push(this.other.toSchema()),new W({value:e})}toJSON(){let e={subjectKeyIdentifier:this.subjectKeyIdentifier.toJSON()};return this.date&&(e.date=this.date.toJSON()),this.other&&(e.other=this.other.toJSON()),e}};_2.CLASS_NAME="RecipientKeyIdentifier";var KE="variant",$E="value",x0e=["blockName"],p0=class qA extends _e{static{o(this,"KeyAgreeRecipientIdentifier")}constructor(e={}){super(),this.variant=B(e,KE,qA.defaultValues(KE)),this.value=B(e,$E,qA.defaultValues($E)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case KE:return-1;case $E:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case KE:return t===-1;case $E:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Vr({value:[Qn.schema(t.issuerAndSerialNumber||{names:{blockName:t.blockName||L}}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:0},value:_2.schema(t.rKeyId||{names:{blockName:t.blockName||L}}).valueBlock.value})]})}fromSchema(e){De(e,x0e);let t=Ie(e,e,qA.schema({names:{blockName:"blockName"}}));be.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new Qn({schema:t.result.blockName})):(this.variant=2,this.value=new _2({schema:new W({value:t.result.blockName.valueBlock.value})}))}toSchema(){switch(this.variant){case 1:return this.value.toSchema();case 2:return new oe({idBlock:{tagClass:3,tagNumber:0},value:this.value.toSchema().valueBlock.value});default:return new xt}}toJSON(){let e={variant:this.variant};return(this.variant===1||this.variant===2)&&(e.value=this.value.toJSON()),e}};p0.CLASS_NAME="KeyAgreeRecipientIdentifier";var hm="rid",hh="encryptedKey",w0e=[hm,hh],B2=class $y extends _e{static{o(this,"RecipientEncryptedKey")}constructor(e={}){super(),this.rid=B(e,hm,$y.defaultValues(hm)),this.encryptedKey=B(e,hh,$y.defaultValues(hh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case hm:return new p0;case hh:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case hm:return t.variant===-1&&!("value"in t);case hh:return t.isEqual($y.defaultValues(hh));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[p0.schema(t.rid||{}),new Ve({name:t.encryptedKey||L})]})}fromSchema(e){De(e,w0e);let t=Ie(e,e,$y.schema({names:{rid:{names:{blockName:hm}},encryptedKey:hh}}));be.assertSchema(t,this.className),this.rid=new p0({schema:t.result.rid}),this.encryptedKey=t.result.encryptedKey}toSchema(){return new W({value:[this.rid.toSchema(),this.encryptedKey]})}toJSON(){return{rid:this.rid.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};B2.CLASS_NAME="RecipientEncryptedKey";var XE="encryptedKeys",LK="RecipientEncryptedKeys",S0e=[LK],bx=class rO extends _e{static{o(this,"RecipientEncryptedKeys")}constructor(e={}){super(),this.encryptedKeys=B(e,XE,rO.defaultValues(XE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case XE:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case XE:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.RecipientEncryptedKeys||L,value:B2.schema()})]})}fromSchema(e){De(e,S0e);let t=Ie(e,e,rO.schema({names:{RecipientEncryptedKeys:LK}}));be.assertSchema(t,this.className),this.encryptedKeys=Array.from(t.result.RecipientEncryptedKeys,n=>new B2({schema:n}))}toSchema(){return new W({value:Array.from(this.encryptedKeys,e=>e.toSchema())})}toJSON(){return{encryptedKeys:Array.from(this.encryptedKeys,e=>e.toJSON())}}};bx.CLASS_NAME="RecipientEncryptedKeys";var pm="version",dm="originator",uu="ukm",mm="keyEncryptionAlgorithm",gm="recipientEncryptedKeys",GE="recipientCertificate",WE="recipientPublicKey",b0e=[pm,dm,uu,mm,gm],D2=class lo extends _e{static{o(this,"KeyAgreeRecipientInfo")}constructor(e={}){super(),this.version=B(e,pm,lo.defaultValues(pm)),this.originator=B(e,dm,lo.defaultValues(dm)),uu in e&&(this.ukm=B(e,uu,lo.defaultValues(uu))),this.keyEncryptionAlgorithm=B(e,mm,lo.defaultValues(mm)),this.recipientEncryptedKeys=B(e,gm,lo.defaultValues(gm)),this.recipientCertificate=B(e,GE,lo.defaultValues(GE)),this.recipientPublicKey=B(e,WE,lo.defaultValues(WE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case pm:return 0;case dm:return new Sx;case uu:return new Ve;case mm:return new ve;case gm:return new bx;case GE:return new ds;case WE:return null;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case pm:return t===0;case dm:return t.variant===-1&&!("value"in t);case uu:return t.isEqual(lo.defaultValues(uu));case mm:return t.algorithmId===L&&!("algorithmParams"in t);case gm:return t.encryptedKeys.length===0;case GE:return!1;case WE:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new oe({idBlock:{tagClass:3,tagNumber:0},value:[Sx.schema(t.originator||{})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Ve({name:t.ukm||L})]}),ve.schema(t.keyEncryptionAlgorithm||{}),bx.schema(t.recipientEncryptedKeys||{})]})}fromSchema(e){De(e,b0e);let t=Ie(e,e,lo.schema({names:{version:pm,originator:{names:{blockName:dm}},ukm:uu,keyEncryptionAlgorithm:{names:{blockName:mm}},recipientEncryptedKeys:{names:{blockName:gm}}}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.originator=new Sx({schema:t.result.originator}),uu in t.result&&(this.ukm=t.result.ukm),this.keyEncryptionAlgorithm=new ve({schema:t.result.keyEncryptionAlgorithm}),this.recipientEncryptedKeys=new bx({schema:t.result.recipientEncryptedKeys})}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.originator.toSchema()]})),this.ukm&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[this.ukm]})),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.recipientEncryptedKeys.toSchema()),new W({value:e})}toJSON(){let e={version:this.version,originator:this.originator.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),recipientEncryptedKeys:this.recipientEncryptedKeys.toJSON()};return this.ukm&&(e.ukm=this.ukm.toJSON()),e}};D2.CLASS_NAME="KeyAgreeRecipientInfo";var ph="keyIdentifier",sl="date",il="other",E0e=[ph,sl,il],Ex=class vm extends _e{static{o(this,"KEKIdentifier")}constructor(e={}){super(),this.keyIdentifier=B(e,ph,vm.defaultValues(ph)),sl in e&&(this.date=B(e,sl,vm.defaultValues(sl))),il in e&&(this.other=B(e,il,vm.defaultValues(il))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ph:return new Ve;case sl:return new Lr;case il:return new $h;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ph:return t.isEqual(vm.defaultValues(ph));case sl:return t.year===0&&t.month===0&&t.day===0&&t.hour===0&&t.minute===0&&t.second===0&&t.millisecond===0;case il:return t.compareWithDefault("keyAttrId",t.keyAttrId)&&!("keyAttr"in t);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Ve({name:t.keyIdentifier||L}),new Lr({optional:!0,name:t.date||L}),$h.schema(t.other||{})]})}fromSchema(e){De(e,E0e);let t=Ie(e,e,vm.schema({names:{keyIdentifier:ph,date:sl,other:{names:{blockName:il}}}}));be.assertSchema(t,this.className),this.keyIdentifier=t.result.keyIdentifier,sl in t.result&&(this.date=t.result.date),il in t.result&&(this.other=new $h({schema:t.result.other}))}toSchema(){let e=[];return e.push(this.keyIdentifier),this.date&&e.push(this.date),this.other&&e.push(this.other.toSchema()),new W({value:e})}toJSON(){let e={keyIdentifier:this.keyIdentifier.toJSON()};return this.date&&(e.date=this.date),this.other&&(e.other=this.other.toJSON()),e}};Ex.CLASS_NAME="KEKIdentifier";var ym="version",xm="kekid",wm="keyEncryptionAlgorithm",dh="encryptedKey",zE="preDefinedKEK",A0e=[ym,xm,wm,dh],R2=class cu extends _e{static{o(this,"KEKRecipientInfo")}constructor(e={}){super(),this.version=B(e,ym,cu.defaultValues(ym)),this.kekid=B(e,xm,cu.defaultValues(xm)),this.keyEncryptionAlgorithm=B(e,wm,cu.defaultValues(wm)),this.encryptedKey=B(e,dh,cu.defaultValues(dh)),this.preDefinedKEK=B(e,zE,cu.defaultValues(zE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ym:return 0;case xm:return new Ex;case wm:return new ve;case dh:return new Ve;case zE:return on;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"KEKRecipientInfo":return t===cu.defaultValues(ym);case xm:return t.compareWithDefault("keyIdentifier",t.keyIdentifier)&&!("date"in t)&&!("other"in t);case wm:return t.algorithmId===L&&!("algorithmParams"in t);case dh:return t.isEqual(cu.defaultValues(dh));case zE:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),Ex.schema(t.kekid||{}),ve.schema(t.keyEncryptionAlgorithm||{}),new Ve({name:t.encryptedKey||L})]})}fromSchema(e){De(e,A0e);let t=Ie(e,e,cu.schema({names:{version:ym,kekid:{names:{blockName:xm}},keyEncryptionAlgorithm:{names:{blockName:wm}},encryptedKey:dh}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.kekid=new Ex({schema:t.result.kekid}),this.keyEncryptionAlgorithm=new ve({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){return new W({value:[new ge({value:this.version}),this.kekid.toSchema(),this.keyEncryptionAlgorithm.toSchema(),this.encryptedKey]})}toJSON(){return{version:this.version,kekid:this.kekid.toJSON(),keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()}}};R2.CLASS_NAME="KEKRecipientInfo";var Sm="version",al="keyDerivationAlgorithm",bm="keyEncryptionAlgorithm",mh="encryptedKey",JE="password",C0e=[Sm,al,bm,mh],O2=class ol extends _e{static{o(this,"PasswordRecipientinfo")}constructor(e={}){super(),this.version=B(e,Sm,ol.defaultValues(Sm)),al in e&&(this.keyDerivationAlgorithm=B(e,al,ol.defaultValues(al))),this.keyEncryptionAlgorithm=B(e,bm,ol.defaultValues(bm)),this.encryptedKey=B(e,mh,ol.defaultValues(mh)),this.password=B(e,JE,ol.defaultValues(JE)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sm:return-1;case al:return new ve;case bm:return new ve;case mh:return new Ve;case JE:return on;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sm:return t===-1;case al:case bm:return t.algorithmId===L&&!("algorithmParams"in t);case mh:return t.isEqual(ol.defaultValues(mh));case JE:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new oe({name:t.keyDerivationAlgorithm||L,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:ve.schema().valueBlock.value}),ve.schema(t.keyEncryptionAlgorithm||{}),new Ve({name:t.encryptedKey||L})]})}fromSchema(e){De(e,C0e);let t=Ie(e,e,ol.schema({names:{version:Sm,keyDerivationAlgorithm:al,keyEncryptionAlgorithm:{names:{blockName:bm}},encryptedKey:mh}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,al in t.result&&(this.keyDerivationAlgorithm=new ve({schema:new W({value:t.result.keyDerivationAlgorithm.valueBlock.value})})),this.keyEncryptionAlgorithm=new ve({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){let e=[];return e.push(new ge({value:this.version})),this.keyDerivationAlgorithm&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:this.keyDerivationAlgorithm.toSchema().valueBlock.value})),e.push(this.keyEncryptionAlgorithm.toSchema()),e.push(this.encryptedKey),new W({value:e})}toJSON(){let e={version:this.version,keyEncryptionAlgorithm:this.keyEncryptionAlgorithm.toJSON(),encryptedKey:this.encryptedKey.toJSON()};return this.keyDerivationAlgorithm&&(e.keyDerivationAlgorithm=this.keyDerivationAlgorithm.toJSON()),e}};O2.CLASS_NAME="PasswordRecipientInfo";var Em="oriType",gh="oriValue",N0e=[Em,gh],nO=class Xy extends _e{static{o(this,"OtherRecipientInfo")}constructor(e={}){super(),this.oriType=B(e,Em,Xy.defaultValues(Em)),this.oriValue=B(e,gh,Xy.defaultValues(gh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Em:return L;case gh:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Em:return t===L;case gh:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.oriType||L}),new xt({name:t.oriValue||L})]})}fromSchema(e){De(e,N0e);let t=Ie(e,e,Xy.schema({names:{oriType:Em,oriValue:gh}}));be.assertSchema(t,this.className),this.oriType=t.result.oriType.valueBlock.toString(),this.oriValue=t.result.oriValue}toSchema(){return new W({value:[new rt({value:this.oriType}),this.oriValue]})}toJSON(){let e={oriType:this.oriType};return Xy.compareWithDefault(gh,this.oriValue)||(e.oriValue=this.oriValue.toJSON()),e}};nO.CLASS_NAME="OtherRecipientInfo";var YE="variant",Kv="value",T0e=["blockName"],vh=class Gy extends _e{static{o(this,"RecipientInfo")}constructor(e={}){super(),this.variant=B(e,YE,Gy.defaultValues(YE)),Kv in e&&(this.value=B(e,Kv,Gy.defaultValues(Kv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case YE:return-1;case Kv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case YE:return t===Gy.defaultValues(e);case Kv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new Vr({value:[T2.schema({names:{blockName:t.blockName||L}}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:1},value:D2.schema().valueBlock.value}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:2},value:R2.schema().valueBlock.value}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:3},value:O2.schema().valueBlock.value}),new oe({name:t.blockName||L,idBlock:{tagClass:3,tagNumber:4},value:nO.schema().valueBlock.value})]})}fromSchema(e){De(e,T0e);let t=Ie(e,e,Gy.schema({names:{blockName:"blockName"}}));if(be.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1)this.variant=1,this.value=new T2({schema:t.result.blockName});else{let n=new W({value:t.result.blockName.valueBlock.value});switch(t.result.blockName.idBlock.tagNumber){case 1:this.variant=2,this.value=new D2({schema:n});break;case 2:this.variant=3,this.value=new R2({schema:n});break;case 3:this.variant=4,this.value=new O2({schema:n});break;case 4:this.variant=5,this.value=new nO({schema:n});break;default:throw new Error("Incorrect structure of RecipientInfo block")}}}toSchema(){mr.assertEmpty(this.value,"value","RecipientInfo");let e=this.value.toSchema();switch(this.variant){case 1:return e;case 2:case 3:case 4:return e.idBlock.tagClass=3,e.idBlock.tagNumber=this.variant-1,e;default:return new xt}}toJSON(){let e={variant:this.variant};return this.value&&this.variant>=1&&this.variant<=4&&(e.value=this.value.toJSON()),e}};vh.CLASS_NAME="RecipientInfo";var ul="hashAlgorithm",cl="maskGenAlgorithm",ll="pSourceAlgorithm",I0e=[ul,cl,ll],HA=class ya extends _e{static{o(this,"RSAESOAEPParams")}constructor(e={}){super(),this.hashAlgorithm=B(e,ul,ya.defaultValues(ul)),this.maskGenAlgorithm=B(e,cl,ya.defaultValues(cl)),this.pSourceAlgorithm=B(e,ll,ya.defaultValues(ll)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ul:return new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Yr});case cl:return new ve({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new ve({algorithmId:"1.3.14.3.2.26",algorithmParams:new Yr}).toSchema()});case ll:return new ve({algorithmId:"1.2.840.113549.1.1.9",algorithmParams:new Ve({valueHex:new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer})});default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new oe({idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[ve.schema(t.hashAlgorithm||{})]}),new oe({idBlock:{tagClass:3,tagNumber:1},optional:!0,value:[ve.schema(t.maskGenAlgorithm||{})]}),new oe({idBlock:{tagClass:3,tagNumber:2},optional:!0,value:[ve.schema(t.pSourceAlgorithm||{})]})]})}fromSchema(e){De(e,I0e);let t=Ie(e,e,ya.schema({names:{hashAlgorithm:{names:{blockName:ul}},maskGenAlgorithm:{names:{blockName:cl}},pSourceAlgorithm:{names:{blockName:ll}}}}));be.assertSchema(t,this.className),ul in t.result&&(this.hashAlgorithm=new ve({schema:t.result.hashAlgorithm})),cl in t.result&&(this.maskGenAlgorithm=new ve({schema:t.result.maskGenAlgorithm})),ll in t.result&&(this.pSourceAlgorithm=new ve({schema:t.result.pSourceAlgorithm}))}toSchema(){let e=[];return this.hashAlgorithm.isEqual(ya.defaultValues(ul))||e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual(ya.defaultValues(cl))||e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.pSourceAlgorithm.isEqual(ya.defaultValues(ll))||e.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[this.pSourceAlgorithm.toSchema()]})),new W({value:e})}toJSON(){let e={};return this.hashAlgorithm.isEqual(ya.defaultValues(ul))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual(ya.defaultValues(cl))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.pSourceAlgorithm.isEqual(ya.defaultValues(ll))||(e.pSourceAlgorithm=this.pSourceAlgorithm.toJSON()),e}};HA.CLASS_NAME="RSAESOAEPParams";var Am="keyInfo",fl="entityUInfo",Cm="suppPubInfo",_0e=[Am,fl,Cm],sO=class Nm extends _e{static{o(this,"ECCCMSSharedInfo")}constructor(e={}){super(),this.keyInfo=B(e,Am,Nm.defaultValues(Am)),fl in e&&(this.entityUInfo=B(e,fl,Nm.defaultValues(fl))),this.suppPubInfo=B(e,Cm,Nm.defaultValues(Cm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Am:return new ve;case fl:return new Ve;case Cm:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Am:case fl:case Cm:return t.isEqual(Nm.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.keyInfo||{}),new oe({name:t.entityUInfo||L,idBlock:{tagClass:3,tagNumber:0},optional:!0,value:[new Ve]}),new oe({name:t.suppPubInfo||L,idBlock:{tagClass:3,tagNumber:2},value:[new Ve]})]})}fromSchema(e){De(e,_0e);let t=Ie(e,e,Nm.schema({names:{keyInfo:{names:{blockName:Am}},entityUInfo:fl,suppPubInfo:Cm}}));be.assertSchema(t,this.className),this.keyInfo=new ve({schema:t.result.keyInfo}),fl in t.result&&(this.entityUInfo=t.result.entityUInfo.valueBlock.value[0]),this.suppPubInfo=t.result.suppPubInfo.valueBlock.value[0]}toSchema(){let e=[];return e.push(this.keyInfo.toSchema()),this.entityUInfo&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.entityUInfo]})),e.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[this.suppPubInfo]})),new W({value:e})}toJSON(){let e={keyInfo:this.keyInfo.toJSON(),suppPubInfo:this.suppPubInfo.toJSON()};return this.entityUInfo&&(e.entityUInfo=this.entityUInfo.toJSON()),e}};sO.CLASS_NAME="ECCCMSSharedInfo";var Tm="version",hl="originatorInfo",Im="recipientInfos",_m="encryptedContentInfo",pl="unprotectedAttrs",B0e=[Tm,hl,Im,_m,pl],zH={kdfAlgorithm:"SHA-512",kekEncryptionLength:256},D0e={"P-256":256,"P-384":384,"P-521":528},iO=class dl extends _e{static{o(this,"EnvelopedData")}constructor(e={}){super(),this.version=B(e,Tm,dl.defaultValues(Tm)),hl in e&&(this.originatorInfo=B(e,hl,dl.defaultValues(hl))),this.recipientInfos=B(e,Im,dl.defaultValues(Im)),this.encryptedContentInfo=B(e,_m,dl.defaultValues(_m)),pl in e&&(this.unprotectedAttrs=B(e,pl,dl.defaultValues(pl))),this.policy={disableSplit:!!e.disableSplit},e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Tm:return 0;case hl:return new VA;case Im:return[];case _m:return new ps;case pl:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Tm:return t===dl.defaultValues(e);case hl:return t.certs.certificates.length===0&&t.crls.crls.length===0;case Im:case pl:return t.length===0;case _m:return ps.compareWithDefault("contentType",t.contentType)&&ps.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&ps.compareWithDefault("encryptedContent",t.encryptedContent);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||L}),new oe({name:t.originatorInfo||L,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:VA.schema().valueBlock.value}),new Qr({value:[new Tt({name:t.recipientInfos||L,value:vh.schema()})]}),ps.schema(t.encryptedContentInfo||{}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.unprotectedAttrs||L,value:un.schema()})]})]})}fromSchema(e){De(e,B0e);let t=Ie(e,e,dl.schema({names:{version:Tm,originatorInfo:hl,recipientInfos:Im,encryptedContentInfo:{names:{blockName:_m}},unprotectedAttrs:pl}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,hl in t.result&&(this.originatorInfo=new VA({schema:new W({value:t.result.originatorInfo.valueBlock.value})})),this.recipientInfos=Array.from(t.result.recipientInfos,n=>new vh({schema:n})),this.encryptedContentInfo=new ps({schema:t.result.encryptedContentInfo}),pl in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new un({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),this.originatorInfo&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:this.originatorInfo.toSchema().valueBlock.value})),e.push(new Qr({value:Array.from(this.recipientInfos,t=>t.toSchema())})),e.push(this.encryptedContentInfo.toSchema()),this.unprotectedAttrs&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.unprotectedAttrs,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={version:this.version,recipientInfos:Array.from(this.recipientInfos,t=>t.toJSON()),encryptedContentInfo:this.encryptedContentInfo.toJSON()};return this.originatorInfo&&(e.originatorInfo=this.originatorInfo.toJSON()),this.unprotectedAttrs&&(e.unprotectedAttrs=Array.from(this.unprotectedAttrs,t=>t.toJSON())),e}addRecipientByCertificate(e,t,n,s=Dt(!0)){let i=Object.assign({useOAEP:!0,oaepHashAlgorithm:"SHA-512"},zH,t||{});if(e.subjectPublicKeyInfo.algorithm.algorithmId.indexOf("1.2.840.113549")!==-1)n=1;else if(e.subjectPublicKeyInfo.algorithm.algorithmId.indexOf("1.2.840.10045")!==-1)n=2;else throw new Error(`Unknown type of certificate's public key: ${e.subjectPublicKeyInfo.algorithm.algorithmId}`);switch(n){case 1:{let a,u;if(i.useOAEP===!0){a=s.getOIDByAlgorithm({name:"RSA-OAEP"},!0,"keyEncryptionAlgorithm");let f=s.getOIDByAlgorithm({name:i.oaepHashAlgorithm},!0,"RSAES-OAEP-params"),h=new ve({algorithmId:f,algorithmParams:new Yr});u=new HA({hashAlgorithm:h,maskGenAlgorithm:new ve({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:h.toSchema()})}).toSchema()}else{if(a=s.getOIDByAlgorithm({name:"RSAES-PKCS1-v1_5"}),a===L)throw new Error("Can not find OID for RSAES-PKCS1-v1_5");u=new Yr}let c=new T2({version:0,rid:new Qn({issuer:e.issuer,serialNumber:e.serialNumber}),keyEncryptionAlgorithm:new ve({algorithmId:a,algorithmParams:u}),recipientCertificate:e});this.recipientInfos.push(new vh({variant:1,value:c}))}break;case 2:{let a=new p0({variant:1,value:new Qn({issuer:e.issuer,serialNumber:e.serialNumber})});this._addKeyAgreeRecipientInfo(a,i,{recipientCertificate:e},s)}break;default:throw new Error(`Unknown "variant" value: ${n}`)}return!0}addRecipientByPreDefinedData(e,t={},n,s=Dt(!0)){if(Cr.assert(e,"preDefinedData","ArrayBuffer"),!e.byteLength)throw new Error("Pre-defined data could have zero length");if(!t.keyIdentifier){let i=new ArrayBuffer(16),a=new Uint8Array(i);s.getRandomValues(a),t.keyIdentifier=i}switch(t.hmacHashAlgorithm||(t.hmacHashAlgorithm="SHA-512"),t.iterationCount===void 0&&(t.iterationCount=2048),t.keyEncryptionAlgorithm||(t.keyEncryptionAlgorithm={name:"AES-KW",length:256}),t.keyEncryptionAlgorithmParams||(t.keyEncryptionAlgorithmParams=new Yr),n){case 1:{let i=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),a=new R2({version:4,kekid:new Ex({keyIdentifier:new Ve({valueHex:t.keyIdentifier})}),keyEncryptionAlgorithm:new ve({algorithmId:i,algorithmParams:t.keyEncryptionAlgorithmParams}),preDefinedKEK:e});this.recipientInfos.push(new vh({variant:3,value:a}))}break;case 2:{let i=s.getOIDByAlgorithm({name:"PBKDF2"},!0,"keyDerivationAlgorithm"),a=new ArrayBuffer(64),u=new Uint8Array(a);s.getRandomValues(u);let c=s.getOIDByAlgorithm({name:"HMAC",hash:{name:t.hmacHashAlgorithm}},!0,"hmacHashAlgorithm"),f=new h0({salt:new Ve({valueHex:a}),iterationCount:t.iterationCount,prf:new ve({algorithmId:c,algorithmParams:new Yr})}),h=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),m=new O2({version:0,keyDerivationAlgorithm:new ve({algorithmId:i,algorithmParams:f.toSchema()}),keyEncryptionAlgorithm:new ve({algorithmId:h,algorithmParams:t.keyEncryptionAlgorithmParams}),password:e});this.recipientInfos.push(new vh({variant:4,value:m}))}break;default:throw new Error(`Unknown value for "variant": ${n}`)}}addRecipientByKeyIdentifier(e,t,n,s=Dt(!0)){let i=Object.assign({},zH,n||{}),a=new p0({variant:2,value:new _2({subjectKeyIdentifier:new Ve({valueHex:t})})});this._addKeyAgreeRecipientInfo(a,i,{recipientPublicKey:e},s)}_addKeyAgreeRecipientInfo(e,t,n,s=Dt(!0)){let i=new B2({rid:e}),a=s.getOIDByAlgorithm({name:"AES-KW",length:t.kekEncryptionLength},!0,"keyEncryptionAlgorithm"),u=new ve({algorithmId:a}),c=s.getOIDByAlgorithm({name:"ECDH",kdf:t.kdfAlgorithm},!0,"KeyAgreeRecipientInfo"),f=new ArrayBuffer(64),h=new Uint8Array(f);s.getRandomValues(h);let m={version:3,ukm:new Ve({valueHex:f}),keyEncryptionAlgorithm:new ve({algorithmId:c,algorithmParams:u.toSchema()}),recipientEncryptedKeys:new bx({encryptedKeys:[i]})},g=new D2(Object.assign(m,n));this.recipientInfos.push(new vh({variant:2,value:g}))}async encrypt(e,t,n=Dt(!0)){let s=new ArrayBuffer(16),i=new Uint8Array(s);n.getRandomValues(i);let a=new Uint8Array(t),u=n.getOIDByAlgorithm(e,!0,"contentEncryptionAlgorithm"),c=await n.generateKey(e,!0,["encrypt"]),f=await n.encrypt({name:e.name,iv:i},c,a),h=await n.exportKey("raw",c);this.version=2,this.encryptedContentInfo=new ps({disableSplit:this.policy.disableSplit,contentType:"1.2.840.113549.1.7.1",contentEncryptionAlgorithm:new ve({algorithmId:u,algorithmParams:new Ve({valueHex:s})}),encryptedContent:new Ve({valueHex:f})});let m=o(async S=>{let A=this.recipientInfos[S].value,N,b;if(A.recipientPublicKey)N=A.recipientPublicKey.algorithm.namedCurve,b=A.recipientPublicKey;else if(A.recipientCertificate){let Ae=A.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams;if(Ae.constructor.blockName()!==rt.blockName())throw new Error(`Incorrect "recipientCertificate" for index ${S}`);switch(Ae.valueBlock.toString()){case"1.2.840.10045.3.1.7":N="P-256";break;case"1.3.132.0.34":N="P-384";break;case"1.3.132.0.35":N="P-521";break;default:throw new Error(`Incorrect curve OID for index ${S}`)}b=await A.recipientCertificate.getPublicKey({algorithm:{algorithm:{name:"ECDH",namedCurve:N},usages:[]}},n)}else throw new Error("Unsupported RecipientInfo");let E=D0e[N],C=await n.generateKey({name:"ECDH",namedCurve:N},!0,["deriveBits"]),_=await n.exportKey("spki",C.publicKey),M=await n.deriveBits({name:"ECDH",public:b},C.privateKey,E),R=new ve({schema:A.keyEncryptionAlgorithm.algorithmParams}),q=n.getAlgorithmByOID(R.algorithmId,!0,"aesKWAlgorithm"),H=q.length,K=new ArrayBuffer(4),G=new Uint8Array(K);for(let Ae=3;Ae>=0;Ae--)G[Ae]=H,H>>=8;let le=new sO({keyInfo:new ve({algorithmId:R.algorithmId}),entityUInfo:A.ukm,suppPubInfo:new Ve({valueHex:K})}).toSchema().toBER(!1),ue=n.getAlgorithmByOID(A.keyEncryptionAlgorithm.algorithmId,!0,"ecdhAlgorithm"),ee=await LH(ue.kdf,M,q.length,le,n),he=await n.importKey("raw",ee,{name:"AES-KW"},!0,["wrapKey"]),we=await n.wrapKey("raw",c,he,{name:"AES-KW"}),Ke=new Sx;return Ke.variant=3,Ke.value=I2.fromBER(_),A.originator=Ke,A.recipientEncryptedKeys.encryptedKeys[0].encryptedKey=new Ve({valueHex:we}),{ecdhPrivateKey:C.privateKey}},"SubKeyAgreeRecipientInfo"),g=o(async S=>{let A=this.recipientInfos[S].value,N=n.getAlgorithmByOID(A.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm");if(N.name==="RSA-OAEP"){let b=A.keyEncryptionAlgorithm.algorithmParams,E=new HA({schema:b});if(N.hash=n.getAlgorithmByOID(E.hashAlgorithm.algorithmId),!("name"in N.hash))throw new Error(`Incorrect OID for hash algorithm: ${E.hashAlgorithm.algorithmId}`)}try{let b=await A.recipientCertificate.getPublicKey({algorithm:{algorithm:N,usages:["encrypt","wrapKey"]}},n),E=await n.encrypt(b.algorithm,b,h);A.encryptedKey=new Ve({valueHex:E})}catch{}},"SubKeyTransRecipientInfo"),x=o(async S=>{let A=this.recipientInfos[S].value,N=n.getAlgorithmByOID(A.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),b=await n.importKey("raw",new Uint8Array(A.preDefinedKEK),N,!0,["wrapKey"]),E=await n.wrapKey("raw",c,b,N);A.encryptedKey=new Ve({valueHex:E})},"SubKEKRecipientInfo"),v=o(async S=>{let A=this.recipientInfos[S].value,N;if(!A.keyDerivationAlgorithm)throw new Error('Please append encoded "keyDerivationAlgorithm"');if(!A.keyDerivationAlgorithm.algorithmParams)throw new Error('Incorrectly encoded "keyDerivationAlgorithm"');try{N=new h0({schema:A.keyDerivationAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "keyDerivationAlgorithm"')}let b=new Uint8Array(A.password),E=await n.importKey("raw",b,"PBKDF2",!1,["deriveKey"]),C=n.getAlgorithmByOID(A.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),_="SHA-1";N.prf&&(_=n.getAlgorithmByOID(N.prf.algorithmId,!0,"prfAlgorithm").hash.name);let M=new Uint8Array(N.salt.valueBlock.valueHex),R=N.iterationCount,q=await n.deriveKey({name:"PBKDF2",hash:{name:_},salt:M,iterations:R},E,C,!0,["wrapKey"]),H=await n.wrapKey("raw",c,q,C);A.encryptedKey=new Ve({valueHex:H})},"SubPasswordRecipientinfo"),w=[];for(let S=0;S<this.recipientInfos.length;S++)switch(this.recipientInfos[S].variant){case 1:w.push(await g(S));break;case 2:w.push(await m(S));break;case 3:w.push(await x(S));break;case 4:w.push(await v(S));break;default:throw new Error(`Unknown recipient type in array with index ${S}`)}return w}async decrypt(e,t,n=Dt(!0)){let s=t||{};if(e+1>this.recipientInfos.length)throw new Error(`Maximum value for "index" is: ${this.recipientInfos.length-1}`);let i=o(async w=>{let S=this.recipientInfos[w].value,A,N,b,E=S.originator;if(s.recipientCertificate){let ue=s.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams;if(ue.constructor.blockName()!==rt.blockName())throw new Error(`Incorrect "recipientCertificate" for index ${w}`);A=ue.valueBlock.toString()}else if(E.value.algorithm.algorithmParams){let ue=E.value.algorithm.algorithmParams;if(ue.constructor.blockName()!==rt.blockName())throw new Error(`Incorrect originator for index ${w}`);A=ue.valueBlock.toString()}else throw new Error('Parameter "recipientCertificate" is mandatory for "KeyAgreeRecipientInfo" if algorithm params are missing from originator');if(!s.recipientPrivateKey)throw new Error('Parameter "recipientPrivateKey" is mandatory for "KeyAgreeRecipientInfo"');switch(A){case"1.2.840.10045.3.1.7":N="P-256",b=256;break;case"1.3.132.0.34":N="P-384",b=384;break;case"1.3.132.0.35":N="P-521",b=528;break;default:throw new Error(`Incorrect curve OID for index ${w}`)}let C,_=n;dt.isBufferSource(s.recipientPrivateKey)?C=await n.importKey("pkcs8",s.recipientPrivateKey,{name:"ECDH",namedCurve:N},!0,["deriveBits"]):(C=s.recipientPrivateKey,"crypto"in s&&s.crypto&&(_=s.crypto.subtle)),"algorithmParams"in E.value.algorithm||(E.value.algorithm.algorithmParams=new rt({value:A}));let M=E.value.toSchema().toBER(!1),R=await n.importKey("spki",M,{name:"ECDH",namedCurve:N},!0,[]),q=await _.deriveBits({name:"ECDH",public:R},C,b);async function H(ue){ue=ue||!1;let ee=new ve({schema:S.keyEncryptionAlgorithm.algorithmParams}),he=n.getAlgorithmByOID(ee.algorithmId,!0,"kwAlgorithm"),we=he.length,Ke=new ArrayBuffer(4),Ae=new Uint8Array(Ke);for(let ct=3;ct>=0;ct--)Ae[ct]=we,we>>=8;let xe={algorithmId:ee.algorithmId};ue&&(xe.algorithmParams=new Yr);let ze=new sO({keyInfo:new ve(xe),entityUInfo:S.ukm,suppPubInfo:new Ve({valueHex:Ke})}).toSchema().toBER(!1),Ye=n.getAlgorithmByOID(S.keyEncryptionAlgorithm.algorithmId,!0,"ecdhAlgorithm");if(!Ye.name)throw new Error(`Incorrect OID for key encryption algorithm: ${S.keyEncryptionAlgorithm.algorithmId}`);return LH(Ye.kdf,q,he.length,ze,n)}o(H,"applyKDF");let K=await H(),G=o(async ue=>n.importKey("raw",ue,{name:"AES-KW"},!0,["unwrapKey"]),"importAesKwKey"),pe=await G(K),le=o(async ue=>{let ee=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,he=n.getAlgorithmByOID(ee,!0,"contentEncryptionAlgorithm");return n.unwrapKey("raw",S.recipientEncryptedKeys.encryptedKeys[0].encryptedKey.valueBlock.valueHexView,ue,{name:"AES-KW"},he,!0,["decrypt"])},"unwrapSessionKey");try{return await le(pe)}catch{let ue=await H(!0),ee=await G(ue);return le(ee)}},"SubKeyAgreeRecipientInfo"),a=o(async w=>{let S=this.recipientInfos[w].value;if(!s.recipientPrivateKey)throw new Error('Parameter "recipientPrivateKey" is mandatory for "KeyTransRecipientInfo"');let A=n.getAlgorithmByOID(S.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm");if(A.name==="RSA-OAEP"){let M=S.keyEncryptionAlgorithm.algorithmParams,R=new HA({schema:M});if(A.hash=n.getAlgorithmByOID(R.hashAlgorithm.algorithmId),!("name"in A.hash))throw new Error(`Incorrect OID for hash algorithm: ${R.hashAlgorithm.algorithmId}`)}let N,b=n;dt.isBufferSource(s.recipientPrivateKey)?N=await n.importKey("pkcs8",s.recipientPrivateKey,A,!0,["decrypt"]):(N=s.recipientPrivateKey,"crypto"in s&&s.crypto&&(b=s.crypto.subtle));let E=await b.decrypt(N.algorithm,N,S.encryptedKey.valueBlock.valueHexView),C=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,_=n.getAlgorithmByOID(C,!0,"contentEncryptionAlgorithm");if(!("name"in _))throw new Error(`Incorrect "contentEncryptionAlgorithm": ${C}`);return n.importKey("raw",E,_,!0,["decrypt"])},"SubKeyTransRecipientInfo"),u=o(async w=>{let S=this.recipientInfos[w].value;if(!s.preDefinedData)throw new Error('Parameter "preDefinedData" is mandatory for "KEKRecipientInfo"');let A=n.getAlgorithmByOID(S.keyEncryptionAlgorithm.algorithmId,!0,"kekAlgorithm"),N=await n.importKey("raw",s.preDefinedData,A,!0,["unwrapKey"]),b=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,E=n.getAlgorithmByOID(b,!0,"contentEncryptionAlgorithm");if(!E.name)throw new Error(`Incorrect "contentEncryptionAlgorithm": ${b}`);return n.unwrapKey("raw",S.encryptedKey.valueBlock.valueHexView,N,A,E,!0,["decrypt"])},"SubKEKRecipientInfo"),c=o(async w=>{let S=this.recipientInfos[w].value,A;if(!s.preDefinedData)throw new Error('Parameter "preDefinedData" is mandatory for "KEKRecipientInfo"');if(!S.keyDerivationAlgorithm)throw new Error('Please append encoded "keyDerivationAlgorithm"');if(!S.keyDerivationAlgorithm.algorithmParams)throw new Error('Incorrectly encoded "keyDerivationAlgorithm"');try{A=new h0({schema:S.keyDerivationAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "keyDerivationAlgorithm"')}let N=await n.importKey("raw",s.preDefinedData,"PBKDF2",!1,["deriveKey"]),b=n.getAlgorithmByOID(S.keyEncryptionAlgorithm.algorithmId,!0,"keyEncryptionAlgorithm"),E=A.prf?n.getAlgorithmByOID(A.prf.algorithmId,!0,"prfAlgorithm").hash.name:"SHA-1",C=new Uint8Array(A.salt.valueBlock.valueHex),_=A.iterationCount,M=await n.deriveKey({name:"PBKDF2",hash:{name:E},salt:C,iterations:_},N,b,!0,["unwrapKey"]),R=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,q=n.getAlgorithmByOID(R,!0,"contentEncryptionAlgorithm");return n.unwrapKey("raw",S.encryptedKey.valueBlock.valueHexView,M,b,q,!0,["decrypt"])},"SubPasswordRecipientinfo"),f;switch(this.recipientInfos[e].variant){case 1:f=await a(e);break;case 2:f=await i(e);break;case 3:f=await u(e);break;case 4:f=await c(e);break;default:throw new Error(`Unknown recipient type in array with index ${e}`)}let h=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId,m=n.getAlgorithmByOID(h,!0,"contentEncryptionAlgorithm"),g=this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams.valueBlock.valueHex,x=new Uint8Array(g);if(!this.encryptedContentInfo.encryptedContent)throw new Error("Required property `encryptedContent` is empty");let v=this.encryptedContentInfo.getEncryptedContent();return n.decrypt({name:m.name,iv:x},f,v)}};iO.CLASS_NAME="EnvelopedData";var Id="safeContents",$v="parsedValue",JH="contentInfos",aO=class KA extends _e{static{o(this,"AuthenticatedSafe")}constructor(e={}){super(),this.safeContents=B(e,Id,KA.defaultValues(Id)),$v in e&&(this.parsedValue=B(e,$v,KA.defaultValues($v))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Id:return[];case $v:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Id:return t.length===0;case $v:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new Tt({name:t.contentInfos||L,value:en.schema()})]})}fromSchema(e){De(e,[JH]);let t=Ie(e,e,KA.schema({names:{contentInfos:JH}}));be.assertSchema(t,this.className),this.safeContents=Array.from(t.result.contentInfos,n=>new en({schema:n}))}toSchema(){return new W({value:Array.from(this.safeContents,e=>e.toSchema())})}toJSON(){return{safeContents:Array.from(this.safeContents,e=>e.toJSON())}}async parseInternalValues(e,t=Dt(!0)){if(mr.assert(e,Id),Cr.assert(e.safeContents,Id,"Array"),e.safeContents.length!==this.safeContents.length)throw new Cr('Length of "parameters.safeContents" must be equal to "this.safeContents.length"');this.parsedValue={safeContents:[]};for(let[n,s]of this.safeContents.entries()){let i=e.safeContents[n],a=`parameters.safeContents[${n}]`;switch(s.contentType){case RO:{Cr.assert(s.content,"this.safeContents[j].content",Ve);let u=s.content.getValue();this.parsedValue.safeContents.push({privacyMode:0,value:f0.fromBER(u)})}break;case lK:{let u=new iO({schema:s.content});mr.assert(a,i,"recipientCertificate","recipientKey");let c=i,f=c.recipientCertificate,h=c.recipientKey,m=await u.decrypt(0,{recipientCertificate:f,recipientPrivateKey:h},t);this.parsedValue.safeContents.push({privacyMode:2,value:f0.fromBER(m)})}break;case fK:{let u=new Ix({schema:s.content});mr.assert(a,i,"password");let c=i.password,f=await u.decrypt({password:c},t);this.parsedValue.safeContents.push({privacyMode:1,value:f0.fromBER(f)})}break;default:throw new Error(`Unknown "contentType" for AuthenticatedSafe: " ${s.contentType}`)}}}async makeInternalValues(e,t=Dt(!0)){if(!this.parsedValue)throw new Error('Please run "parseValues" first or add "parsedValue" manually');if(Cr.assert(this.parsedValue,"this.parsedValue","object"),Cr.assert(this.parsedValue.safeContents,"this.parsedValue.safeContents","Array"),Cr.assert(e,"parameters","object"),mr.assert(e,"safeContents"),Cr.assert(e.safeContents,"parameters.safeContents","Array"),e.safeContents.length!==this.parsedValue.safeContents.length)throw new Cr('Length of "parameters.safeContents" must be equal to "this.parsedValue.safeContents"');this.safeContents=[];for(let[n,s]of this.parsedValue.safeContents.entries())switch(mr.assert("content",s,"privacyMode","value"),Cr.assert(s.value,"content.value",f0),s.privacyMode){case 0:{let i=s.value.toSchema().toBER(!1);this.safeContents.push(new en({contentType:"1.2.840.113549.1.7.1",content:new Ve({valueHex:i})}))}break;case 1:{let i=new Ix,a=e.safeContents[n];a.contentToEncrypt=s.value.toSchema().toBER(!1),await i.encrypt(a,t),this.safeContents.push(new en({contentType:"1.2.840.113549.1.7.6",content:i.toSchema()}))}break;case 2:{let i=new iO,a=s.value.toSchema().toBER(!1),u=e.safeContents[n];switch(mr.assert(`parameters.safeContents[${n}]`,u,"encryptingCertificate","encryptionAlgorithm"),!0){case u.encryptionAlgorithm.name.toLowerCase()==="aes-cbc":case u.encryptionAlgorithm.name.toLowerCase()==="aes-gcm":break;default:throw new Error(`Incorrect parameter "encryptionAlgorithm" in "parameters.safeContents[i]": ${u.encryptionAlgorithm}`)}switch(!0){case u.encryptionAlgorithm.length===128:case u.encryptionAlgorithm.length===192:case u.encryptionAlgorithm.length===256:break;default:throw new Error(`Incorrect parameter "encryptionAlgorithm.length" in "parameters.safeContents[i]": ${u.encryptionAlgorithm.length}`)}let c=u.encryptionAlgorithm;i.addRecipientByCertificate(u.encryptingCertificate,{},void 0,t),await i.encrypt(c,a,t),this.safeContents.push(new en({contentType:"1.2.840.113549.1.7.3",content:i.toSchema()}))}break;default:throw new Error(`Incorrect value for "content.privacyMode": ${s.privacyMode}`)}return this}};aO.CLASS_NAME="AuthenticatedSafe";var yh="hashAlgorithm",Bm="issuerNameHash",Dm="issuerKeyHash",xh="serialNumber",R0e=[yh,Bm,Dm,xh],di=class ml extends _e{static{o(this,"CertID")}static async create(e,t,n=Dt(!0)){let s=new ml;return await s.createForCertificate(e,t,n),s}constructor(e={}){super(),this.hashAlgorithm=B(e,yh,ml.defaultValues(yh)),this.issuerNameHash=B(e,Bm,ml.defaultValues(Bm)),this.issuerKeyHash=B(e,Dm,ml.defaultValues(Dm)),this.serialNumber=B(e,xh,ml.defaultValues(xh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case yh:return new ve;case Bm:case Dm:return new Ve;case xh:return new ge;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case yh:return t.algorithmId===L&&!("algorithmParams"in t);case Bm:case Dm:case xh:return t.isEqual(ml.defaultValues(xh));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.hashAlgorithmObject||{names:{blockName:t.hashAlgorithm||L}}),new Ve({name:t.issuerNameHash||L}),new Ve({name:t.issuerKeyHash||L}),new ge({name:t.serialNumber||L})]})}fromSchema(e){De(e,R0e);let t=Ie(e,e,ml.schema({names:{hashAlgorithm:yh,issuerNameHash:Bm,issuerKeyHash:Dm,serialNumber:xh}}));be.assertSchema(t,this.className),this.hashAlgorithm=new ve({schema:t.result.hashAlgorithm}),this.issuerNameHash=t.result.issuerNameHash,this.issuerKeyHash=t.result.issuerKeyHash,this.serialNumber=t.result.serialNumber}toSchema(){return new W({value:[this.hashAlgorithm.toSchema(),this.issuerNameHash,this.issuerKeyHash,this.serialNumber]})}toJSON(){return{hashAlgorithm:this.hashAlgorithm.toJSON(),issuerNameHash:this.issuerNameHash.toJSON(),issuerKeyHash:this.issuerKeyHash.toJSON(),serialNumber:this.serialNumber.toJSON()}}isEqual(e){return!(this.hashAlgorithm.algorithmId!==e.hashAlgorithm.algorithmId||!dt.isEqual(this.issuerNameHash.valueBlock.valueHexView,e.issuerNameHash.valueBlock.valueHexView)||!dt.isEqual(this.issuerKeyHash.valueBlock.valueHexView,e.issuerKeyHash.valueBlock.valueHexView)||!this.serialNumber.isEqual(e.serialNumber))}async createForCertificate(e,t,n=Dt(!0)){mr.assert(t,yh,"issuerCertificate");let s=n.getOIDByAlgorithm({name:t.hashAlgorithm},!0,"hashAlgorithm");this.hashAlgorithm=new ve({algorithmId:s,algorithmParams:new Yr});let i=t.issuerCertificate;this.serialNumber=e.serialNumber;let a=await n.digest({name:t.hashAlgorithm},i.subject.toSchema().toBER(!1));this.issuerNameHash=new Ve({valueHex:a});let u=i.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView,c=await n.digest({name:t.hashAlgorithm},u);this.issuerKeyHash=new Ve({valueHex:c})}};di.CLASS_NAME="CertID";var Rm="certID",Om="certStatus",Pm="thisUpdate",gl="nextUpdate",wh="singleExtensions",O0e=[Rm,Om,Pm,gl,wh],oO=class vl extends _e{static{o(this,"SingleResponse")}constructor(e={}){super(),this.certID=B(e,Rm,vl.defaultValues(Rm)),this.certStatus=B(e,Om,vl.defaultValues(Om)),this.thisUpdate=B(e,Pm,vl.defaultValues(Pm)),gl in e&&(this.nextUpdate=B(e,gl,vl.defaultValues(gl))),wh in e&&(this.singleExtensions=B(e,wh,vl.defaultValues(wh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Rm:return new di;case Om:return{};case Pm:case gl:return new Date(0,0,0);case wh:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Rm:return di.compareWithDefault("hashAlgorithm",t.hashAlgorithm)&&di.compareWithDefault("issuerNameHash",t.issuerNameHash)&&di.compareWithDefault("issuerKeyHash",t.issuerKeyHash)&&di.compareWithDefault("serialNumber",t.serialNumber);case Om:return Object.keys(t).length===0;case Pm:case gl:return t===vl.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[di.schema(t.certID||{}),new Vr({value:[new gt({name:t.certStatus||L,idBlock:{tagClass:3,tagNumber:0}}),new oe({name:t.certStatus||L,idBlock:{tagClass:3,tagNumber:1},value:[new Lr,new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Nc]})]}),new gt({name:t.certStatus||L,idBlock:{tagClass:3,tagNumber:2},lenBlock:{length:1}})]}),new Lr({name:t.thisUpdate||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Lr({name:t.nextUpdate||L})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Tn.schema(t.singleExtensions||{})]})]})}fromSchema(e){De(e,O0e);let t=Ie(e,e,vl.schema({names:{certID:{names:{blockName:Rm}},certStatus:Om,thisUpdate:Pm,nextUpdate:gl,singleExtensions:{names:{blockName:wh}}}}));be.assertSchema(t,this.className),this.certID=new di({schema:t.result.certID}),this.certStatus=t.result.certStatus,this.thisUpdate=t.result.thisUpdate.toDate(),gl in t.result&&(this.nextUpdate=t.result.nextUpdate.toDate()),wh in t.result&&(this.singleExtensions=Array.from(t.result.singleExtensions.valueBlock.value,n=>new zi({schema:n})))}toSchema(){let e=[];return e.push(this.certID.toSchema()),e.push(this.certStatus),e.push(new Lr({valueDate:this.thisUpdate})),this.nextUpdate&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new Lr({valueDate:this.nextUpdate})]})),this.singleExtensions&&e.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[new W({value:Array.from(this.singleExtensions,t=>t.toSchema())})]})),new W({value:e})}toJSON(){let e={certID:this.certID.toJSON(),certStatus:this.certStatus.toJSON(),thisUpdate:this.thisUpdate};return this.nextUpdate&&(e.nextUpdate=this.nextUpdate),this.singleExtensions&&(e.singleExtensions=Array.from(this.singleExtensions,t=>t.toJSON())),e}};oO.CLASS_NAME="SingleResponse";var QE="tbs",Sh="version",Wy="responderID",zy="producedAt",Jy="responses",km="responseExtensions",Xh="ResponseData",$A=`${Xh}.${Sh}`,Lm=`${Xh}.${Wy}`,uO=`${Xh}.${zy}`,cO=`${Xh}.${Jy}`,XA=`${Xh}.${km}`,P0e=[Xh,$A,Lm,uO,cO,XA],lu=class fo extends _e{static{o(this,"ResponseData")}get tbs(){return dt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,QE,fo.defaultValues(QE))),Sh in e&&(this.version=B(e,Sh,fo.defaultValues(Sh))),this.responderID=B(e,Wy,fo.defaultValues(Wy)),this.producedAt=B(e,zy,fo.defaultValues(zy)),this.responses=B(e,Jy,fo.defaultValues(Jy)),km in e&&(this.responseExtensions=B(e,km,fo.defaultValues(km))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sh:return 0;case QE:return on;case Wy:return{};case zy:return new Date(0,0,0);case Jy:case km:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case QE:return t.byteLength===0;case Wy:return Object.keys(t).length===0;case zy:return t===fo.defaultValues(e);case Jy:case km:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||Xh,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({name:t.version||$A})]}),new Vr({value:[new oe({name:t.responderID||Lm,idBlock:{tagClass:3,tagNumber:1},value:[Ur.schema(t.ResponseDataByName||{names:{blockName:"ResponseData.byName"}})]}),new oe({name:t.responderID||Lm,idBlock:{tagClass:3,tagNumber:2},value:[new Ve({name:t.ResponseDataByKey||"ResponseData.byKey"})]})]}),new Lr({name:t.producedAt||uO}),new W({value:[new Tt({name:cO,value:oO.schema(t.response||{})})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Tn.schema(t.extensions||{names:{blockName:XA}})]})]})}fromSchema(e){De(e,P0e);let t=Ie(e,e,fo.schema());be.assertSchema(t,this.className),this.tbsView=t.result.ResponseData.valueBeforeDecodeView,$A in t.result&&(this.version=t.result[$A].valueBlock.valueDec),t.result[Lm].idBlock.tagNumber===1?this.responderID=new Ur({schema:t.result[Lm].valueBlock.value[0]}):this.responderID=t.result[Lm].valueBlock.value[0],this.producedAt=t.result[uO].toDate(),this.responses=Array.from(t.result[cO],n=>new oO({schema:n})),XA in t.result&&(this.responseExtensions=Array.from(t.result[XA].valueBlock.value,n=>new zi({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(!this.tbsView.byteLength)return fo.schema();let n=Jr(this.tbsView);be.assert(n,"TBS Response Data"),t=n.result}else{let n=[];Sh in this&&n.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new ge({value:this.version})]})),this.responderID instanceof Ur?n.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.responderID.toSchema()]})):n.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[this.responderID]})),n.push(new Lr({valueDate:this.producedAt})),n.push(new W({value:Array.from(this.responses,s=>s.toSchema())})),this.responseExtensions&&n.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[new W({value:Array.from(this.responseExtensions,s=>s.toSchema())})]})),t=new W({value:n})}return t}toJSON(){let e={};return Sh in this&&(e.version=this.version),this.responderID&&(e.responderID=this.responderID),this.producedAt&&(e.producedAt=this.producedAt),this.responses&&(e.responses=Array.from(this.responses,t=>t.toJSON())),this.responseExtensions&&(e.responseExtensions=Array.from(this.responseExtensions,t=>t.toJSON())),e}};lu.CLASS_NAME="ResponseData";var lR="trustedCerts",fR="certs",hR="crls",pR="ocsps",dR="checkDate",mR="findOrigin",gR="findIssuer",Vh;(function(r){r[r.unknown=-1]="unknown",r[r.success=0]="success",r[r.noRevocation=11]="noRevocation",r[r.noPath=60]="noPath",r[r.noValidPath=97]="noValidPath"})(Vh||(Vh={}));var Vm=class VK extends Error{static{o(this,"ChainValidationError")}constructor(e,t){super(t),this.name=VK.NAME,this.code=e,this.message=t}};Vm.NAME="ChainValidationError";function k0e(r,e){for(let t=0;t<e.length;t++)if(dt.isEqual(r.tbsView,e[t].tbsView))return!0;return!1}o(k0e,"isTrusted");var UK=class jK{static{o(this,"CertificateChainValidationEngine")}constructor(e={}){this.trustedCerts=B(e,lR,this.defaultValues(lR)),this.certs=B(e,fR,this.defaultValues(fR)),this.crls=B(e,hR,this.defaultValues(hR)),this.ocsps=B(e,pR,this.defaultValues(pR)),this.checkDate=B(e,dR,this.defaultValues(dR)),this.findOrigin=B(e,mR,this.defaultValues(mR)),this.findIssuer=B(e,gR,this.defaultValues(gR))}static defaultFindOrigin(e,t){e.tbsView.byteLength===0&&(e.tbsView=new Uint8Array(e.encodeTBS().toBER()));for(let n of t.certs)if(n.tbsView.byteLength===0&&(n.tbsView=new Uint8Array(n.encodeTBS().toBER())),dt.isEqual(e.tbsView,n.tbsView))return"Intermediate Certificates";for(let n of t.trustedCerts)if(n.tbsView.byteLength===0&&(n.tbsView=new Uint8Array(n.encodeTBS().toBER())),dt.isEqual(e.tbsView,n.tbsView))return"Trusted Certificates";return"Unknown"}async defaultFindIssuer(e,t,n=Dt(!0)){let s=[],i=null,a=null,u=null;if(e.subject.isEqual(e.issuer))try{if(await e.verify(void 0,n))return[e]}catch{}if(e.extensions){for(let f of e.extensions)if(f.extnID===BO&&f.parsedValue instanceof PO){f.parsedValue.keyIdentifier?i=f.parsedValue.keyIdentifier:(f.parsedValue.authorityCertIssuer&&(a=f.parsedValue.authorityCertIssuer),f.parsedValue.authorityCertSerialNumber&&(u=f.parsedValue.authorityCertSerialNumber));break}}function c(f){if(i!==null&&f.extensions){let m=!1;for(let g of f.extensions)if(g.extnID===Vde&&g.parsedValue){m=!0,dt.isEqual(g.parsedValue.valueBlock.valueHex,i.valueBlock.valueHexView)&&s.push(f);break}if(m)return}let h=!1;u!==null&&(h=f.serialNumber.isEqual(u)),a!==null?f.subject.isEqual(a)&&h&&s.push(f):e.issuer.isEqual(f.subject)&&s.push(f)}o(c,"checkCertificate");for(let f of t.trustedCerts)c(f);for(let f of t.certs)c(f);for(let f=s.length-1;f>=0;f--)try{await e.verify(s[f],n)===!1&&s.splice(f,1)}catch{s.splice(f,1)}return s}defaultValues(e){switch(e){case lR:return[];case fR:return[];case hR:return[];case pR:return[];case dR:return new Date;case mR:return jK.defaultFindOrigin;case gR:return this.defaultFindIssuer;default:throw new Error(`Invalid member name for CertificateChainValidationEngine class: ${e}`)}}async sort(e=!1,t=Dt(!0)){let n=[],s=o(async(v,w)=>{let S=[];function A(b){let E=!0;for(let C=0;C<b.length;C++){for(let _=0;_<b.length;_++)if(_!==C&&b[C]===b[_]){E=!1;break}if(!E)break}return E}if(o(A,"checkUnique"),k0e(v,this.trustedCerts))return[[v]];let N=await this.findIssuer(v,this,w);if(N.length===0)throw new Error("No valid certificate paths found");for(let b=0;b<N.length;b++){if(dt.isEqual(N[b].tbsView,v.tbsView)){S.push([N[b]]);continue}let E=await s(N[b],w);for(let C=0;C<E.length;C++){let _=E[C].slice();_.splice(0,0,N[b]),A(_)?S.push(_):S.push(E[C])}}return S},"buildPath"),i=o(async v=>{let w=[],S=[],A=[];if(w.push(...n.filter(N=>v.issuer.isEqual(N.subject))),w.length===0)return{status:1,statusMessage:"No certificate's issuers"};if(S.push(...this.crls.filter(N=>N.issuer.isEqual(v.issuer))),S.length===0)return{status:2,statusMessage:"No CRLs for specific certificate issuer"};for(let N=0;N<S.length;N++){let b=S[N];if(!(b.nextUpdate&&b.nextUpdate.value<this.checkDate))for(let E=0;E<w.length;E++)try{if(await S[N].verify({issuerCertificate:w[E]},t)){A.push({crl:S[N],certificate:w[E]});break}}catch{}}return A.length?{status:0,statusMessage:L,result:A}:{status:3,statusMessage:"No valid CRLs found"}},"findCRL"),a=o(async(v,w)=>{let S=t.getAlgorithmByOID(v.signatureAlgorithm.algorithmId);if(!S.name||!S.hash)return 1;for(let A=0;A<this.ocsps.length;A++){let b=await this.ocsps[A].getCertificateStatus(v,w,t);if(b.isForCertificate)return b.status===0?0:1}return 2},"findOCSP");async function u(v,w=!1){let S=!1,A=!1,N=!1,b=!1;if(v.extensions){for(let E=0;E<v.extensions.length;E++){let C=v.extensions[E];if(C.critical&&!C.parsedValue)return{result:!1,resultCode:6,resultMessage:`Unable to parse critical certificate extension: ${C.extnID}`};if(C.extnID===Ude){N=!0;let _=new Uint8Array(C.parsedValue.valueBlock.valueHex);(_[0]&4)===4&&(A=!0),(_[0]&2)===2&&(b=!0)}C.extnID===IO&&"cA"in C.parsedValue&&C.parsedValue.cA===!0&&(S=!0)}if(A===!0&&S===!1)return{result:!1,resultCode:3,resultMessage:'Unable to build certificate chain - using "keyCertSign" flag set without BasicConstraints'};if(N===!0&&S===!0&&A===!1)return{result:!1,resultCode:4,resultMessage:'Unable to build certificate chain - "keyCertSign" flag was not set'};if(S===!0&&N===!0&&w&&b===!1)return{result:!1,resultCode:5,resultMessage:'Unable to build certificate chain - intermediate certificate must have "cRLSign" key usage flag'}}return S===!1?{result:!1,resultCode:7,resultMessage:"Unable to build certificate chain - more than one possible end-user certificate"}:{result:!0,resultCode:0,resultMessage:L}}o(u,"checkForCA");let c=o(async(v,w)=>{for(let S=0;S<v.length;S++)if(v[S].notBefore.value>w||v[S].notAfter.value<w)return{result:!1,resultCode:8,resultMessage:"The certificate is either not yet valid or expired"};if(v.length<2)return{result:!1,resultCode:9,resultMessage:"Too short certificate path"};for(let S=v.length-2;S>=0;S--)if(v[S].issuer.isEqual(v[S].subject)===!1&&v[S].issuer.isEqual(v[S+1].subject)===!1)return{result:!1,resultCode:10,resultMessage:"Incorrect name chaining"};if(this.crls.length!==0||this.ocsps.length!==0)for(let S=0;S<v.length-1;S++){let A=2,N={status:0,statusMessage:L};if(this.ocsps.length!==0)switch(A=await a(v[S],v[S+1]),A){case 0:continue;case 1:return{result:!1,resultCode:12,resultMessage:"One of certificates was revoked via OCSP response"}}if(this.crls.length!==0){if(N=await i(v[S]),N.status===0&&N.result)for(let b=0;b<N.result.length;b++){if(N.result[b].crl.isCertificateRevoked(v[S]))return{result:!1,resultCode:12,resultMessage:"One of certificates had been revoked"};if((await u(N.result[b].certificate,!0)).result===!1)return{result:!1,resultCode:13,resultMessage:"CRL issuer certificate is not a CA certificate or does not have crlSign flag"}}else if(e===!1)throw new Vm(Vh.noRevocation,`No revocation values found for one of certificates: ${N.statusMessage}`)}else if(A===2)return{result:!1,resultCode:11,resultMessage:"No revocation values found for one of certificates"};if(A===2&&N.status===2&&e){let b=v[S+1],E=!1;if(b.extensions)for(let C of b.extensions)switch(C.extnID){case iK:case _O:case DO:E=!0;break}if(E)throw new Vm(Vh.noRevocation,`No revocation values found for one of certificates: ${N.statusMessage}`)}}for(let[S,A]of v.entries()){if(!S)continue;if(!(await u(A)).result)return{result:!1,resultCode:14,resultMessage:"One of intermediate certificates is not a CA certificate"}}return{result:!0}},"basicCheck");n.push(...this.trustedCerts),n.push(...this.certs);for(let v=0;v<n.length;v++)for(let w=0;w<n.length;w++)if(v!==w&&dt.isEqual(n[v].tbsView,n[w].tbsView)){n.splice(w,1),v=0;break}let f=n[n.length-1],h,m=[f];if(h=await s(f,t),h.length===0)throw new Vm(Vh.noPath,"Unable to find certificate path");for(let v=h.length-1;v>=0;v--){let w=!1;for(let S=0;S<h[v].length;S++){let A=h[v][S];for(let N=0;N<this.trustedCerts.length;N++)if(dt.isEqual(A.tbsView,this.trustedCerts[N].tbsView)){w=!0;break}if(w)break}w||h.splice(v,1)}if(h.length===0)throw new Vm(Vh.noValidPath,"No valid certificate paths found");let g=h[0].length,x=0;for(let v=0;v<h.length;v++)h[v].length<g&&(g=h[v].length,x=v);for(let v=0;v<h[x].length;v++)m.push(h[x][v]);if(h=await c(m,this.checkDate),h.result===!1)throw h;return m}async verify(e={},t=Dt(!0)){function n(c,f){let h=Cl(c),m=Cl(f),g=h.split("."),x=m.split("."),v=g.length,w=x.length;if(v===0||w===0||v<w)return!1;for(let S=0;S<v;S++)if(g[S].length===0)return!1;for(let S=0;S<w;S++)if(x[S].length===0){if(S===0){if(w===1)return!1;continue}return!1}for(let S=0;S<w;S++)if(x[w-1-S].length!==0&&g[v-1-S].localeCompare(x[w-1-S])!==0)return!1;return!0}o(n,"compareDNSName");function s(c,f){let h=Cl(c),m=Cl(f),g=h.split("@"),x=m.split("@");if(g.length===0||x.length===0||g.length<x.length)return!1;if(x.length===1){if(n(g[1],x[0])){let w=g[1].split("."),S=x[0].split(".");return S[0].length===0?!0:w.length===S.length}return!1}return h.localeCompare(m)===0}o(s,"compareRFC822Name");function i(c,f){let h=Cl(c),m=Cl(f),g=h.split("/");if(m.split("/").length>1)return!1;if(g.length>1){for(let w=0;w<g.length;w++)if(g[w].length>0&&g[w].charAt(g[w].length-1)!==":"){h=g[w].split(":")[0];break}}if(n(h,m)){let w=h.split("."),S=m.split(".");return S[0].length===0?!0:w.length===S.length}return!1}o(i,"compareUniformResourceIdentifier");function a(c,f){let h=c.valueBlock.valueHexView,m=f.valueBlock.valueHexView;if(h.length===4&&m.length===8){for(let g=0;g<4;g++)if((h[g]^m[g])&m[g+4])return!1;return!0}if(h.length===16&&m.length===32){for(let g=0;g<16;g++)if((h[g]^m[g])&m[g+16])return!1;return!0}return!1}o(a,"compareIPAddress");function u(c,f){if(c.typesAndValues.length===0||f.typesAndValues.length===0)return!0;if(c.typesAndValues.length<f.typesAndValues.length)return!1;let h=!0,m=0;for(let g=0;g<f.typesAndValues.length;g++){let x=!1;for(let v=m;v<c.typesAndValues.length;v++)if(x=c.typesAndValues[v].isEqual(f.typesAndValues[g]),c.typesAndValues[v].type===f.typesAndValues[g].type&&(h=h&&x),x===!0)if(m===0||m===v){m=v+1;break}else return!1;if(x===!1)return!1}return m===0?!1:h}o(u,"compareDirectoryName");try{if(this.certs.length===0)throw new Error("Empty certificate array");let c=e.passedWhenNotRevValues||!1,f=e.initialPolicySet||[$i],h=e.initialExplicitPolicy||!1,m=e.initialPolicyMappingInhibit||!1,g=e.initialInhibitPolicy||!1,x=e.initialPermittedSubtreesSet||[],v=e.initialExcludedSubtreesSet||[],w=e.initialRequiredNameForms||[],S=h,A=m,N=g,b=[!1,!1,!1],E=0,C=0,_=0,M=x,R=v,q=w,H=1;this.certs=await this.sort(c,t);let K=[];K.push($i);let G=[],pe=new Array(this.certs.length-1);for(let Ae=0;Ae<this.certs.length-1;Ae++)pe[Ae]=!0;G.push(pe);let le=new Array(this.certs.length-1),ue=new Array(this.certs.length-1),ee=S?this.certs.length-1:-1;for(let Ae=this.certs.length-2;Ae>=0;Ae--,H++){let xe=this.certs[Ae];if(xe.extensions){for(let je=0;je<xe.extensions.length;je++){let ze=xe.extensions[je];if(ze.extnID===aK){ue[Ae]=ze.parsedValue;for(let Ye=0;Ye<K.length;Ye++)if(K[Ye]===$i){delete G[Ye][Ae];break}for(let Ye=0;Ye<ze.parsedValue.certificatePolicies.length;Ye++){let ct=-1,P=ze.parsedValue.certificatePolicies[Ye].policyIdentifier;for(let D=0;D<K.length;D++)if(P===K[D]){ct=D;break}if(ct===-1){K.push(P);let D=new Array(this.certs.length-1);D[Ae]=!0,G.push(D)}else G[ct][Ae]=!0}}if(ze.extnID===oK){if(A)return{result:!1,resultCode:98,resultMessage:"Policy mapping prohibited"};le[Ae]=ze.parsedValue}ze.extnID===uK&&S===!1&&(ze.parsedValue.requireExplicitPolicy===0?(S=!0,ee=Ae):b[0]===!1?(b[0]=!0,E=ze.parsedValue.requireExplicitPolicy):E=E>ze.parsedValue.requireExplicitPolicy?ze.parsedValue.requireExplicitPolicy:E,ze.parsedValue.inhibitPolicyMapping===0?A=!0:b[1]===!1?(b[1]=!0,C=ze.parsedValue.inhibitPolicyMapping+1):C=C>ze.parsedValue.inhibitPolicyMapping+1?ze.parsedValue.inhibitPolicyMapping+1:C),ze.extnID===Xde&&N===!1&&(ze.parsedValue.valueBlock.valueDec===0?N=!0:b[2]===!1?(b[2]=!0,_=ze.parsedValue.valueBlock.valueDec):_=_>ze.parsedValue.valueBlock.valueDec?ze.parsedValue.valueBlock.valueDec:_)}if(N===!0){let je=-1;for(let ze=0;ze<K.length;ze++)if(K[ze]===$i){je=ze;break}je!==-1&&delete G[0][Ae]}S===!1&&b[0]===!0&&(E--,E===0&&(S=!0,ee=Ae,b[0]=!1)),A===!1&&b[1]===!0&&(C--,C===0&&(A=!0,b[1]=!1)),N===!1&&b[2]===!0&&(_--,_===0&&(N=!0,b[2]=!1))}}for(let Ae=0;Ae<this.certs.length-1;Ae++)if(Ae<this.certs.length-2&&typeof le[Ae+1]<"u")for(let xe=0;xe<le[Ae+1].mappings.length;xe++){if(le[Ae+1].mappings[xe].issuerDomainPolicy===$i||le[Ae+1].mappings[xe].subjectDomainPolicy===$i)return{result:!1,resultCode:99,resultMessage:'The "anyPolicy" should not be a part of policy mapping scheme'};let je=-1,ze=-1;for(let Ye=0;Ye<K.length;Ye++)K[Ye]===le[Ae+1].mappings[xe].issuerDomainPolicy&&(je=Ye),K[Ye]===le[Ae+1].mappings[xe].subjectDomainPolicy&&(ze=Ye);typeof G[je][Ae]<"u"&&delete G[je][Ae];for(let Ye=0;Ye<ue[Ae].certificatePolicies.length;Ye++)if(le[Ae+1].mappings[xe].subjectDomainPolicy===ue[Ae].certificatePolicies[Ye].policyIdentifier&&je!==-1&&ze!==-1)for(let ct=0;ct<=Ae;ct++)typeof G[ze][ct]<"u"&&(G[je][ct]=!0,delete G[ze][ct])}for(let Ae=0;Ae<K.length;Ae++)if(K[Ae]===$i)for(let xe=0;xe<ee;xe++)delete G[Ae][xe];let he=[];for(let Ae=0;Ae<G.length;Ae++){let xe=!0;for(let je=0;je<this.certs.length-1;je++){let ze=!1;if(je<ee&&K[Ae]===$i&&K.length>1){xe=!1;break}if(typeof G[Ae][je]>"u"){if(je>=ee){for(let Ye=0;Ye<K.length;Ye++)if(K[Ye]===$i){G[Ye][je]===!0&&(ze=!0);break}}if(!ze){xe=!1;break}}}xe===!0&&he.push(K[Ae])}let we=[];if(f.length===1&&f[0]===$i&&S===!1)we=f;else if(he.length===1&&he[0]===$i)we=f;else for(let Ae=0;Ae<he.length;Ae++)for(let xe=0;xe<f.length;xe++)if(f[xe]===he[Ae]||f[xe]===$i){we.push(he[Ae]);break}let Ke={result:we.length>0,resultCode:0,resultMessage:we.length>0?L:'Zero "userConstrPolicies" array, no intersections with "authConstrPolicies"',authConstrPolicies:he,userConstrPolicies:we,explicitPolicyIndicator:S,policyMappings:le,certificatePath:this.certs};if(we.length===0||Ke.result===!1)return Ke;H=1;for(let Ae=this.certs.length-2;Ae>=0;Ae--,H++){let xe=this.certs[Ae],je=[],ze=[],Ye=[];if(xe.extensions)for(let se=0;se<xe.extensions.length;se++){let z=xe.extensions[se];z.extnID===sK&&("permittedSubtrees"in z.parsedValue&&(ze=ze.concat(z.parsedValue.permittedSubtrees)),"excludedSubtrees"in z.parsedValue&&(Ye=Ye.concat(z.parsedValue.excludedSubtrees))),z.extnID===eK&&(je=je.concat(z.parsedValue.altNames))}let ct=q.length<=0;for(let se=0;se<q.length;se++)switch(q[se].base.type){case 4:{if(q[se].base.value.typesAndValues.length!==xe.subject.typesAndValues.length)continue;ct=!0;for(let z=0;z<xe.subject.typesAndValues.length;z++)if(xe.subject.typesAndValues[z].type!==q[se].base.value.typesAndValues[z].type){ct=!1;break}if(ct===!0)break}break;default:}if(ct===!1)throw Ke.result=!1,Ke.resultCode=21,Ke.resultMessage="No necessary name form found",Ke;let P=[[],[],[],[],[]];for(let se=0;se<M.length;se++)switch(M[se].base.type){case 1:P[0].push(M[se]);break;case 2:P[1].push(M[se]);break;case 4:P[2].push(M[se]);break;case 6:P[3].push(M[se]);break;case 7:P[4].push(M[se]);break;default:}for(let se=0;se<5;se++){let z=!1,Xe=!1,Re=P[se];for(let Ce=0;Ce<Re.length;Ce++){switch(se){case 0:if(je.length>0)for(let lt=0;lt<je.length;lt++)je[lt].type===1&&(Xe=!0,z=z||s(je[lt].value,Re[Ce].base.value));else for(let lt=0;lt<xe.subject.typesAndValues.length;lt++)(xe.subject.typesAndValues[lt].type==="1.2.840.113549.1.9.1"||xe.subject.typesAndValues[lt].type==="0.9.2342.19200300.100.1.3")&&(Xe=!0,z=z||s(xe.subject.typesAndValues[lt].value.valueBlock.value,Re[Ce].base.value));break;case 1:if(je.length>0)for(let lt=0;lt<je.length;lt++)je[lt].type===2&&(Xe=!0,z=z||n(je[lt].value,Re[Ce].base.value));break;case 2:Xe=!0,z=u(xe.subject,Re[Ce].base.value);break;case 3:if(je.length>0)for(let lt=0;lt<je.length;lt++)je[lt].type===6&&(Xe=!0,z=z||i(je[lt].value,Re[Ce].base.value));break;case 4:if(je.length>0)for(let lt=0;lt<je.length;lt++)je[lt].type===7&&(Xe=!0,z=z||a(je[lt].value,Re[Ce].base.value));break;default:}if(z)break}if(z===!1&&Re.length>0&&Xe)throw Ke.result=!1,Ke.resultCode=41,Ke.resultMessage='Failed to meet "permitted sub-trees" name constraint',Ke}let D=!1;for(let se=0;se<R.length;se++){switch(R[se].base.type){case 1:if(je.length>=0)for(let z=0;z<je.length;z++)je[z].type===1&&(D=D||s(je[z].value,R[se].base.value));else for(let z=0;z<xe.subject.typesAndValues.length;z++)(xe.subject.typesAndValues[z].type==="1.2.840.113549.1.9.1"||xe.subject.typesAndValues[z].type==="0.9.2342.19200300.100.1.3")&&(D=D||s(xe.subject.typesAndValues[z].value.valueBlock.value,R[se].base.value));break;case 2:if(je.length>0)for(let z=0;z<je.length;z++)je[z].type===2&&(D=D||n(je[z].value,R[se].base.value));break;case 4:D=D||u(xe.subject,R[se].base.value);break;case 6:if(je.length>0)for(let z=0;z<je.length;z++)je[z].type===6&&(D=D||i(je[z].value,R[se].base.value));break;case 7:if(je.length>0)for(let z=0;z<je.length;z++)je[z].type===7&&(D=D||a(je[z].value,R[se].base.value));break;default:}if(D)break}if(D===!0)throw Ke.result=!1,Ke.resultCode=42,Ke.resultMessage='Failed to meet "excluded sub-trees" name constraint',Ke;M=M.concat(ze),R=R.concat(Ye)}return Ke}catch(c){return c instanceof Error?c instanceof Vm?{result:!1,resultCode:c.code,resultMessage:c.message,error:c}:{result:!1,resultCode:Vh.unknown,resultMessage:c.message,error:c}:c&&typeof c=="object"&&"resultMessage"in c?c:{result:!1,resultCode:-1,resultMessage:`${c}`}}}},GA="tbsResponseData",Yy="signatureAlgorithm",Qy="signature",Um="certs",_x="BasicOCSPResponse",lO=`${_x}.${GA}`,fO=`${_x}.${Yy}`,hO=`${_x}.${Qy}`,WA=`${_x}.${Um}`,L0e=[lO,fO,hO,WA],Ax=class bh extends _e{static{o(this,"BasicOCSPResponse")}constructor(e={}){super(),this.tbsResponseData=B(e,GA,bh.defaultValues(GA)),this.signatureAlgorithm=B(e,Yy,bh.defaultValues(Yy)),this.signature=B(e,Qy,bh.defaultValues(Qy)),Um in e&&(this.certs=B(e,Um,bh.defaultValues(Um))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case GA:return new lu;case Yy:return new ve;case Qy:return new Ht;case Um:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"type":{let n=lu.compareWithDefault("tbs",t.tbs)&&lu.compareWithDefault("responderID",t.responderID)&&lu.compareWithDefault("producedAt",t.producedAt)&&lu.compareWithDefault("responses",t.responses);return"responseExtensions"in t&&(n=n&&lu.compareWithDefault("responseExtensions",t.responseExtensions)),n}case Yy:return t.algorithmId===L&&!("algorithmParams"in t);case Qy:return t.isEqual(bh.defaultValues(e));case Um:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||_x,value:[lu.schema(t.tbsResponseData||{names:{blockName:lO}}),ve.schema(t.signatureAlgorithm||{names:{blockName:fO}}),new Ht({name:t.signature||hO}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new W({value:[new Tt({name:WA,value:ds.schema(t.certs||{})})]})]})]})}fromSchema(e){De(e,L0e);let t=Ie(e,e,bh.schema());be.assertSchema(t,this.className),this.tbsResponseData=new lu({schema:t.result[lO]}),this.signatureAlgorithm=new ve({schema:t.result[fO]}),this.signature=t.result[hO],WA in t.result&&(this.certs=Array.from(t.result[WA],n=>new ds({schema:n})))}toSchema(){let e=[];return e.push(this.tbsResponseData.toSchema()),e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.certs&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new W({value:Array.from(this.certs,t=>t.toSchema())})]})),new W({value:e})}toJSON(){let e={tbsResponseData:this.tbsResponseData.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signature:this.signature.toJSON()};return this.certs&&(e.certs=Array.from(this.certs,t=>t.toJSON())),e}async getCertificateStatus(e,t,n=Dt(!0)){let s={isForCertificate:!1,status:2},i={},a=[];for(let u of this.tbsResponseData.responses){let c=n.getAlgorithmByOID(u.certID.hashAlgorithm.algorithmId,!0,"CertID.hashAlgorithm");if(!i[c.name]){i[c.name]=1;let f=new di;a.push(f),await f.createForCertificate(e,{hashAlgorithm:c.name,issuerCertificate:t},n)}}for(let u of this.tbsResponseData.responses)for(let c of a)if(u.certID.isEqual(c)){s.isForCertificate=!0;try{switch(u.certStatus.idBlock.isConstructed){case!0:u.certStatus.idBlock.tagNumber===1&&(s.status=1);break;case!1:switch(u.certStatus.idBlock.tagNumber){case 0:s.status=0;break;case 2:s.status=2;break;default:}break;default:}}catch{}return s}return s}async sign(e,t="SHA-1",n=Dt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),i=s.parameters.algorithm;if(!("name"in i))throw new Error("Empty algorithm");this.signatureAlgorithm=s.signatureAlgorithm,this.tbsResponseData.tbsView=new Uint8Array(this.tbsResponseData.toSchema(!0).toBER());let a=await n.signWithPrivateKey(this.tbsResponseData.tbsView,e,{algorithm:i});this.signature=new Ht({valueHex:a})}async verify(e={},t=Dt(!0)){let n=null,s=-1,i=e.trustedCerts||[];if(!this.certs)throw new Error("No certificates attached to the BasicOCSPResponse");switch(!0){case this.tbsResponseData.responderID instanceof Ur:for(let[f,h]of this.certs.entries())if(h.subject.isEqual(this.tbsResponseData.responderID)){s=f;break}break;case this.tbsResponseData.responderID instanceof Ve:for(let[f,h]of this.certs.entries()){let m=await t.digest({name:"sha-1"},h.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView);if(Ac(m,this.tbsResponseData.responderID.valueBlock.valueHex)){s=f;break}}break;default:throw new Error("Wrong value for responderID")}if(s===-1)throw new Error("Correct certificate was not found in OCSP response");n=this.certs[s];let a=[n];for(let f of this.certs){let h=await _K(f,n);h&&a.push(h)}if(!(await new UK({certs:a,trustedCerts:i}).verify({},t)).result)throw new Error("Validation of signer's certificate failed");return t.verifyWithPublicKey(this.tbsResponseData.tbsView,this.signature,this.certs[s].subjectPublicKeyInfo,this.signatureAlgorithm)}};Ax.CLASS_NAME="BasicOCSPResponse";var vR="tbs",yR="version",xR="subject",wR="subjectPublicKeyInfo",_d="attributes",Zy="signatureAlgorithm",ex="signatureValue",g0="CertificationRequestInfo",HO=`${g0}.version`,KO=`${g0}.subject`,$O=`${g0}.subjectPublicKeyInfo`,P2=`${g0}.attributes`,V0e=[g0,HO,KO,$O,P2,Zy,ex];function U0e(r={}){let e=B(r,"names",{});return new W({name:e.CertificationRequestInfo||g0,value:[new ge({name:e.CertificationRequestInfoVersion||HO}),Ur.schema(e.subject||{names:{blockName:KO}}),ba.schema({names:{blockName:$O}}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({optional:!0,name:e.CertificationRequestInfoAttributes||P2,value:un.schema(e.attributes||{})})]})]})}o(U0e,"CertificationRequestInfo");var j0e=class ho extends _e{static{o(this,"CertificationRequest")}get tbs(){return dt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,vR,ho.defaultValues(vR))),this.version=B(e,yR,ho.defaultValues(yR)),this.subject=B(e,xR,ho.defaultValues(xR)),this.subjectPublicKeyInfo=B(e,wR,ho.defaultValues(wR)),_d in e&&(this.attributes=B(e,_d,ho.defaultValues(_d))),this.signatureAlgorithm=B(e,Zy,ho.defaultValues(Zy)),this.signatureValue=B(e,ex,ho.defaultValues(ex)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case vR:return on;case yR:return 0;case xR:return new Ur;case wR:return new ba;case _d:return[];case Zy:return new ve;case ex:return new Ht;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({value:[U0e(t.certificationRequestInfo||{}),new W({name:t.signatureAlgorithm||Zy,value:[new rt,new xt({optional:!0})]}),new Ht({name:t.signatureValue||ex})]})}fromSchema(e){De(e,V0e);let t=Ie(e,e,ho.schema());be.assertSchema(t,this.className),this.tbsView=t.result.CertificationRequestInfo.valueBeforeDecodeView,this.version=t.result[HO].valueBlock.valueDec,this.subject=new Ur({schema:t.result[KO]}),this.subjectPublicKeyInfo=new ba({schema:t.result[$O]}),P2 in t.result&&(this.attributes=Array.from(t.result[P2],n=>new un({schema:n}))),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[new ge({value:this.version}),this.subject.toSchema(),this.subjectPublicKeyInfo.toSchema()];return _d in this&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.attributes||[],t=>t.toSchema())})),new W({value:e})}toSchema(e=!1){let t;if(e===!1){if(this.tbsView.byteLength===0)return ho.schema();let n=Jr(this.tbsView);be.assert(n,"PKCS#10 Certificate Request"),t=n.result}else t=this.encodeTBS();return new W({value:[t,this.signatureAlgorithm.toSchema(),this.signatureValue]})}toJSON(){let e={tbs:Et.ToHex(this.tbsView),version:this.version,subject:this.subject.toJSON(),subjectPublicKeyInfo:this.subjectPublicKeyInfo.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signatureValue:this.signatureValue.toJSON()};return _d in this&&(e.attributes=Array.from(this.attributes||[],t=>t.toJSON())),e}async sign(e,t="SHA-1",n=Dt(!0)){if(!e)throw new Error("Need to provide a private key for signing");let s=await n.getSignatureParameters(e,t),i=s.parameters;this.signatureAlgorithm=s.signatureAlgorithm,this.tbsView=new Uint8Array(this.encodeTBS().toBER());let a=await n.signWithPrivateKey(this.tbsView,e,i);this.signatureValue=new Ht({valueHex:a})}async verify(e=Dt(!0)){return e.verifyWithPublicKey(this.tbsView,this.signatureValue,this.subjectPublicKeyInfo,this.signatureAlgorithm)}async getPublicKey(e,t=Dt(!0)){return t.getPublicKey(this.subjectPublicKeyInfo,this.signatureAlgorithm,e)}};j0e.CLASS_NAME="CertificationRequest";var Eh="digestAlgorithm",Ah="digest",F0e=[Eh,Ah],Uh=class tx extends _e{static{o(this,"DigestInfo")}constructor(e={}){super(),this.digestAlgorithm=B(e,Eh,tx.defaultValues(Eh)),this.digest=B(e,Ah,tx.defaultValues(Ah)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Eh:return new ve;case Ah:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Eh:return ve.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case Ah:return t.isEqual(tx.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.digestAlgorithm||{names:{blockName:Eh}}),new Ve({name:t.digest||Ah})]})}fromSchema(e){De(e,F0e);let t=Ie(e,e,tx.schema({names:{digestAlgorithm:{names:{blockName:Eh}},digest:Ah}}));be.assertSchema(t,this.className),this.digestAlgorithm=new ve({schema:t.result.digestAlgorithm}),this.digest=t.result.digest}toSchema(){return new W({value:[this.digestAlgorithm.toSchema(),this.digest]})}toJSON(){return{digestAlgorithm:this.digestAlgorithm.toJSON(),digest:this.digest.toJSON()}}};Uh.CLASS_NAME="DigestInfo";var jm="eContentType",xa="eContent",M0e=[jm,xa],jh=class Ch extends _e{static{o(this,"EncapsulatedContentInfo")}constructor(e={}){if(super(),this.eContentType=B(e,jm,Ch.defaultValues(jm)),xa in e&&(this.eContent=B(e,xa,Ch.defaultValues(xa)),this.eContent.idBlock.tagClass===1&&this.eContent.idBlock.tagNumber===4&&this.eContent.idBlock.isConstructed===!1)){let t=new Ve({idBlock:{isConstructed:!0},isConstructed:!0}),n=0,s=this.eContent.valueBlock.valueHexView.slice().buffer,i=s.byteLength;for(;i>0;){let a=new Uint8Array(s,n,n+65536>s.byteLength?s.byteLength-n:65536),u=new ArrayBuffer(a.length),c=new Uint8Array(u);for(let f=0;f<c.length;f++)c[f]=a[f];t.valueBlock.value.push(new Ve({valueHex:u})),i-=a.length,n+=a.length}this.eContent=t}e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case jm:return L;case xa:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case jm:return t===L;case xa:return t.idBlock.tagClass===1&&t.idBlock.tagNumber===4?t.isEqual(Ch.defaultValues(xa)):!1;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.eContentType||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new xt({name:t.eContent||L})]})]})}fromSchema(e){De(e,M0e);let t=Ie(e,e,Ch.schema({names:{eContentType:jm,eContent:xa}}));be.assertSchema(t,this.className),this.eContentType=t.result.eContentType.valueBlock.toString(),xa in t.result&&(this.eContent=t.result.eContent)}toSchema(){let e=[];return e.push(new rt({value:this.eContentType})),this.eContent&&Ch.compareWithDefault(xa,this.eContent)===!1&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.eContent]})),new W({value:e})}toJSON(){let e={eContentType:this.eContentType};return this.eContent&&Ch.compareWithDefault(xa,this.eContent)===!1&&(e.eContent=this.eContent.toJSON()),e}};jh.CLASS_NAME="EncapsulatedContentInfo";var Nh="mac",Th="macSalt",fu="iterations",q0e=[Nh,Th,fu],yl=class Ih extends _e{static{o(this,"MacData")}constructor(e={}){super(),this.mac=B(e,Nh,Ih.defaultValues(Nh)),this.macSalt=B(e,Th,Ih.defaultValues(Th)),fu in e&&(this.iterations=B(e,fu,Ih.defaultValues(fu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nh:return new Uh;case Th:return new Ve;case fu:return 1;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Nh:return Uh.compareWithDefault("digestAlgorithm",t.digestAlgorithm)&&Uh.compareWithDefault("digest",t.digest);case Th:return t.isEqual(Ih.defaultValues(e));case fu:return t===Ih.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,optional:t.optional||!0,value:[Uh.schema(t.mac||{names:{blockName:Nh}}),new Ve({name:t.macSalt||Th}),new ge({optional:!0,name:t.iterations||fu})]})}fromSchema(e){De(e,q0e);let t=Ie(e,e,Ih.schema({names:{mac:{names:{blockName:Nh}},macSalt:Th,iterations:fu}}));be.assertSchema(t,this.className),this.mac=new Uh({schema:t.result.mac}),this.macSalt=t.result.macSalt,fu in t.result&&(this.iterations=t.result.iterations.valueBlock.valueDec)}toSchema(){let e=[this.mac.toSchema(),this.macSalt];return this.iterations!==void 0&&e.push(new ge({value:this.iterations})),new W({value:e})}toJSON(){let e={mac:this.mac.toJSON(),macSalt:this.macSalt.toJSON()};return this.iterations!==void 0&&(e.iterations=this.iterations),e}};yl.CLASS_NAME="MacData";var Fh="hashAlgorithm",Mh="hashedMessage",H0e=[Fh,Mh],Sa=class Fm extends _e{static{o(this,"MessageImprint")}static async create(e,t,n=Dt(!0)){let s=n.getOIDByAlgorithm({name:e},!0,"hashAlgorithm"),i=await n.digest(e,t);return new Fm({hashAlgorithm:new ve({algorithmId:s,algorithmParams:new Yr}),hashedMessage:new Ve({valueHex:i})})}constructor(e={}){super(),this.hashAlgorithm=B(e,Fh,Fm.defaultValues(Fh)),this.hashedMessage=B(e,Mh,Fm.defaultValues(Mh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fh:return new ve;case Mh:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Fh:return t.algorithmId===L&&!("algorithmParams"in t);case Mh:return t.isEqual(Fm.defaultValues(e))===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.hashAlgorithm||{}),new Ve({name:t.hashedMessage||L})]})}fromSchema(e){De(e,H0e);let t=Ie(e,e,Fm.schema({names:{hashAlgorithm:{names:{blockName:Fh}},hashedMessage:Mh}}));be.assertSchema(t,this.className),this.hashAlgorithm=new ve({schema:t.result.hashAlgorithm}),this.hashedMessage=t.result.hashedMessage}toSchema(){return new W({value:[this.hashAlgorithm.toSchema(),this.hashedMessage]})}toJSON(){return{hashAlgorithm:this.hashAlgorithm.toJSON(),hashedMessage:this.hashedMessage.toJSON()}}};Sa.CLASS_NAME="MessageImprint";var Mm="reqCert",xl="singleRequestExtensions",K0e=[Mm,xl],k2=class rx extends _e{static{o(this,"Request")}constructor(e={}){super(),this.reqCert=B(e,Mm,rx.defaultValues(Mm)),xl in e&&(this.singleRequestExtensions=B(e,xl,rx.defaultValues(xl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Mm:return new di;case xl:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Mm:return t.isEqual(rx.defaultValues(e));case xl:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[di.schema(t.reqCert||{}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Tn.schema(t.extensions||{names:{blockName:t.singleRequestExtensions||L}})]})]})}fromSchema(e){De(e,K0e);let t=Ie(e,e,rx.schema({names:{reqCert:{names:{blockName:Mm}},extensions:{names:{blockName:xl}}}}));be.assertSchema(t,this.className),this.reqCert=new di({schema:t.result.reqCert}),xl in t.result&&(this.singleRequestExtensions=Array.from(t.result.singleRequestExtensions.valueBlock.value,n=>new zi({schema:n})))}toSchema(){let e=[];return e.push(this.reqCert.toSchema()),this.singleRequestExtensions&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new W({value:Array.from(this.singleRequestExtensions,t=>t.toSchema())})]})),new W({value:e})}toJSON(){let e={reqCert:this.reqCert.toJSON()};return this.singleRequestExtensions&&(e.singleRequestExtensions=Array.from(this.singleRequestExtensions,t=>t.toJSON())),e}};k2.CLASS_NAME="Request";var ZE="tbs",qm="version",Hm="requestorName",eA="requestList",Km="requestExtensions",v0="TBSRequest",zA=`${v0}.${qm}`,JA=`${v0}.${Hm}`,pO=`${v0}.requests`,YA=`${v0}.${Km}`,$0e=[v0,zA,JA,pO,YA],hu=class pu extends _e{static{o(this,"TBSRequest")}get tbs(){return dt.toArrayBuffer(this.tbsView)}set tbs(e){this.tbsView=new Uint8Array(e)}constructor(e={}){super(),this.tbsView=new Uint8Array(B(e,ZE,pu.defaultValues(ZE))),qm in e&&(this.version=B(e,qm,pu.defaultValues(qm))),Hm in e&&(this.requestorName=B(e,Hm,pu.defaultValues(Hm))),this.requestList=B(e,eA,pu.defaultValues(eA)),Km in e&&(this.requestExtensions=B(e,Km,pu.defaultValues(Km))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ZE:return on;case qm:return 0;case Hm:return new Nr;case eA:case Km:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ZE:return t.byteLength===0;case qm:return t===pu.defaultValues(e);case Hm:return t.type===Nr.defaultValues("type")&&Object.keys(t.value).length===0;case eA:case Km:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||v0,value:[new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new ge({name:t.TBSRequestVersion||zA})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Nr.schema(t.requestorName||{names:{blockName:JA}})]}),new W({name:t.requestList||"TBSRequest.requestList",value:[new Tt({name:t.requests||pO,value:k2.schema(t.requestNames||{})})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:2},value:[Tn.schema(t.extensions||{names:{blockName:t.requestExtensions||YA}})]})]})}fromSchema(e){De(e,$0e);let t=Ie(e,e,pu.schema());be.assertSchema(t,this.className),this.tbsView=t.result.TBSRequest.valueBeforeDecodeView,zA in t.result&&(this.version=t.result[zA].valueBlock.valueDec),JA in t.result&&(this.requestorName=new Nr({schema:t.result[JA]})),this.requestList=Array.from(t.result[pO],n=>new k2({schema:n})),YA in t.result&&(this.requestExtensions=Array.from(t.result[YA].valueBlock.value,n=>new zi({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(this.tbsView.byteLength===0)return pu.schema();let n=Jr(this.tbsView);if(be.assert(n,"TBS Request"),!(n.result instanceof W))throw new Error("ASN.1 result should be SEQUENCE");t=n.result}else{let n=[];this.version!==void 0&&n.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[new ge({value:this.version})]})),this.requestorName&&n.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:[this.requestorName.toSchema()]})),n.push(new W({value:Array.from(this.requestList,s=>s.toSchema())})),this.requestExtensions&&n.push(new oe({idBlock:{tagClass:3,tagNumber:2},value:[new W({value:Array.from(this.requestExtensions,s=>s.toSchema())})]})),t=new W({value:n})}return t}toJSON(){let e={};return this.version!=null&&(e.version=this.version),this.requestorName&&(e.requestorName=this.requestorName.toJSON()),e.requestList=Array.from(this.requestList,t=>t.toJSON()),this.requestExtensions&&(e.requestExtensions=Array.from(this.requestExtensions,t=>t.toJSON())),e}};hu.CLASS_NAME="TBSRequest";var Bd="signatureAlgorithm",Dd="signature",Oc="certs",_h=class $m extends _e{static{o(this,"Signature")}constructor(e={}){super(),this.signatureAlgorithm=B(e,Bd,$m.defaultValues(Bd)),this.signature=B(e,Dd,$m.defaultValues(Dd)),Oc in e&&(this.certs=B(e,Oc,$m.defaultValues(Oc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bd:return new ve;case Dd:return new Ht;case Oc:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Bd:return t.algorithmId===L&&!("algorithmParams"in t);case Dd:return t.isEqual($m.defaultValues(e));case Oc:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[ve.schema(t.signatureAlgorithm||{}),new Ht({name:t.signature||L}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new W({value:[new Tt({name:t.certs||L,value:ds.schema({})})]})]})]})}fromSchema(e){De(e,[Bd,Dd,Oc]);let t=Ie(e,e,$m.schema({names:{signatureAlgorithm:{names:{blockName:Bd}},signature:Dd,certs:Oc}}));be.assertSchema(t,this.className),this.signatureAlgorithm=new ve({schema:t.result.signatureAlgorithm}),this.signature=t.result.signature,Oc in t.result&&(this.certs=Array.from(t.result.certs,n=>new ds({schema:n})))}toSchema(){let e=[];return e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.certs&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new W({value:Array.from(this.certs,t=>t.toSchema())})]})),new W({value:e})}toJSON(){let e={signatureAlgorithm:this.signatureAlgorithm.toJSON(),signature:this.signature.toJSON()};return this.certs&&(e.certs=Array.from(this.certs,t=>t.toJSON())),e}};_h.CLASS_NAME="Signature";var Xm="tbsRequest",wl="optionalSignature",X0e=[Xm,wl],G0e=class QA extends _e{static{o(this,"OCSPRequest")}constructor(e={}){super(),this.tbsRequest=B(e,Xm,QA.defaultValues(Xm)),wl in e&&(this.optionalSignature=B(e,wl,QA.defaultValues(wl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Xm:return new hu;case wl:return new _h;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Xm:return hu.compareWithDefault("tbs",t.tbs)&&hu.compareWithDefault("version",t.version)&&hu.compareWithDefault("requestorName",t.requestorName)&&hu.compareWithDefault("requestList",t.requestList)&&hu.compareWithDefault("requestExtensions",t.requestExtensions);case wl:return _h.compareWithDefault("signatureAlgorithm",t.signatureAlgorithm)&&_h.compareWithDefault("signature",t.signature)&&_h.compareWithDefault("certs",t.certs);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||"OCSPRequest",value:[hu.schema(t.tbsRequest||{names:{blockName:Xm}}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[_h.schema(t.optionalSignature||{names:{blockName:wl}})]})]})}fromSchema(e){De(e,X0e);let t=Ie(e,e,QA.schema());be.assertSchema(t,this.className),this.tbsRequest=new hu({schema:t.result.tbsRequest}),wl in t.result&&(this.optionalSignature=new _h({schema:t.result.optionalSignature}))}toSchema(e=!1){let t=[];return t.push(this.tbsRequest.toSchema(e)),this.optionalSignature&&t.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.optionalSignature.toSchema()]})),new W({value:t})}toJSON(){let e={tbsRequest:this.tbsRequest.toJSON()};return this.optionalSignature&&(e.optionalSignature=this.optionalSignature.toJSON()),e}async createForCertificate(e,t,n=Dt(!0)){let s=new di;await s.createForCertificate(e,t,n),this.tbsRequest.requestList.push(new k2({reqCert:s}))}async sign(e,t="SHA-1",n=Dt(!0)){if(mr.assertEmpty(e,"privateKey","OCSPRequest.sign method"),!this.optionalSignature)throw new Error('Need to create "optionalSignature" field before signing');let s=await n.getSignatureParameters(e,t),i=s.parameters;this.optionalSignature.signatureAlgorithm=s.signatureAlgorithm;let a=this.tbsRequest.toSchema(!0).toBER(!1),u=await n.signWithPrivateKey(a,e,i);this.optionalSignature.signature=new Ht({valueHex:u})}verify(){}};G0e.CLASS_NAME="OCSPRequest";var Gm="responseType",Wm="response",W0e=[Gm,Wm],zm=class nx extends _e{static{o(this,"ResponseBytes")}constructor(e={}){super(),this.responseType=B(e,Gm,nx.defaultValues(Gm)),this.response=B(e,Wm,nx.defaultValues(Wm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Gm:return L;case Wm:return new Ve;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Gm:return t===L;case Wm:return t.isEqual(nx.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new rt({name:t.responseType||L}),new Ve({name:t.response||L})]})}fromSchema(e){De(e,W0e);let t=Ie(e,e,nx.schema({names:{responseType:Gm,response:Wm}}));be.assertSchema(t,this.className),this.responseType=t.result.responseType.valueBlock.toString(),this.response=t.result.response}toSchema(){return new W({value:[new rt({value:this.responseType}),this.response]})}toJSON(){return{responseType:this.responseType,response:this.response.toJSON()}}};zm.CLASS_NAME="ResponseBytes";var Rd="responseStatus",Qo="responseBytes",z0e=class sx extends _e{static{o(this,"OCSPResponse")}constructor(e={}){super(),this.responseStatus=B(e,Rd,sx.defaultValues(Rd)),Qo in e&&(this.responseBytes=B(e,Qo,sx.defaultValues(Qo))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Rd:return new Nc;case Qo:return new zm;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Rd:return t.isEqual(sx.defaultValues(e));case Qo:return zm.compareWithDefault("responseType",t.responseType)&&zm.compareWithDefault("response",t.response);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||"OCSPResponse",value:[new Nc({name:t.responseStatus||Rd}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[zm.schema(t.responseBytes||{names:{blockName:Qo}})]})]})}fromSchema(e){De(e,[Rd,Qo]);let t=Ie(e,e,sx.schema());be.assertSchema(t,this.className),this.responseStatus=t.result.responseStatus,Qo in t.result&&(this.responseBytes=new zm({schema:t.result.responseBytes}))}toSchema(){let e=[];return e.push(this.responseStatus),this.responseBytes&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:[this.responseBytes.toSchema()]})),new W({value:e})}toJSON(){let e={responseStatus:this.responseStatus.toJSON()};return this.responseBytes&&(e.responseBytes=this.responseBytes.toJSON()),e}async getCertificateStatus(e,t,n=Dt(!0)){let s,i={isForCertificate:!1,status:2};if(!this.responseBytes||this.responseBytes.responseType!==aA)return i;try{let a=Jr(this.responseBytes.response.valueBlock.valueHexView);be.assert(a,"Basic OCSP response"),s=new Ax({schema:a.result})}catch{return i}return s.getCertificateStatus(e,t,n)}async sign(e,t,n=Dt(!0)){var s;if(this.responseBytes&&this.responseBytes.responseType===aA)return Ax.fromBER(this.responseBytes.response.valueBlock.valueHexView).sign(e,t,n);throw new Error(`Unknown ResponseBytes type: ${((s=this.responseBytes)===null||s===void 0?void 0:s.responseType)||"Unknown"}`)}async verify(e=null,t=Dt(!0)){var n;if(!(Qo in this))throw new Error("Empty ResponseBytes field");if(this.responseBytes&&this.responseBytes.responseType===aA){let s=Ax.fromBER(this.responseBytes.response.valueBlock.valueHexView);return e!==null&&(s.certs||(s.certs=[]),s.certs.push(e)),s.verify({},t)}throw new Error(`Unknown ResponseBytes type: ${((n=this.responseBytes)===null||n===void 0?void 0:n.responseType)||"Unknown"}`)}};z0e.CLASS_NAME="OCSPResponse";var Nf="type",du="attributes",tA="encodedValue",J0e=[du],Qs=class po extends _e{static{o(this,"SignedAndUnsignedAttributes")}constructor(e={}){super(),this.type=B(e,Nf,po.defaultValues(Nf)),this.attributes=B(e,du,po.defaultValues(du)),this.encodedValue=B(e,tA,po.defaultValues(tA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nf:return-1;case du:return[];case tA:return on;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Nf:return t===po.defaultValues(Nf);case du:return t.length===0;case tA:return t.byteLength===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new oe({name:t.blockName||L,optional:!0,idBlock:{tagClass:3,tagNumber:t.tagNumber||0},value:[new Tt({name:t.attributes||L,value:un.schema()})]})}fromSchema(e){De(e,J0e);let t=Ie(e,e,po.schema({names:{tagNumber:this.type,attributes:du}}));be.assertSchema(t,this.className),this.type=t.result.idBlock.tagNumber,this.encodedValue=dt.toArrayBuffer(t.result.valueBeforeDecodeView);let n=new Uint8Array(this.encodedValue);if(n[0]=49,!(du in t.result)){if(this.type===0)throw new Error("Wrong structure of SignedUnsignedAttributes");return}this.attributes=Array.from(t.result.attributes,s=>new un({schema:s}))}toSchema(){if(po.compareWithDefault(Nf,this.type)||po.compareWithDefault(du,this.attributes))throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class');return new oe({optional:!0,idBlock:{tagClass:3,tagNumber:this.type},value:Array.from(this.attributes,e=>e.toSchema())})}toJSON(){if(po.compareWithDefault(Nf,this.type)||po.compareWithDefault(du,this.attributes))throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class');return{type:this.type,attributes:Array.from(this.attributes,e=>e.toJSON())}}};Qs.CLASS_NAME="SignedAndUnsignedAttributes";var Jm="version",Bh="sid",Ym="digestAlgorithm",Sl="signedAttrs",Qm="signatureAlgorithm",ix="signature",bl="unsignedAttrs",Il="SignerInfo",dO=`${Il}.${Jm}`,ax=`${Il}.${Bh}`,mO=`${Il}.${Ym}`,ZA=`${Il}.${Sl}`,gO=`${Il}.${Qm}`,vO=`${Il}.${ix}`,e2=`${Il}.${bl}`,Y0e=[dO,ax,mO,ZA,gO,vO,e2],L2=class jn extends _e{static{o(this,"SignerInfo")}constructor(e={}){super(),this.version=B(e,Jm,jn.defaultValues(Jm)),this.sid=B(e,Bh,jn.defaultValues(Bh)),this.digestAlgorithm=B(e,Ym,jn.defaultValues(Ym)),Sl in e&&(this.signedAttrs=B(e,Sl,jn.defaultValues(Sl))),this.signatureAlgorithm=B(e,Qm,jn.defaultValues(Qm)),this.signature=B(e,ix,jn.defaultValues(ix)),bl in e&&(this.unsignedAttrs=B(e,bl,jn.defaultValues(bl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Jm:return 0;case Bh:return new xt;case Ym:return new ve;case Sl:return new Qs({type:0});case Qm:return new ve;case ix:return new Ve;case bl:return new Qs({type:1});default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Jm:return jn.defaultValues(Jm)===t;case Bh:return t instanceof xt;case Ym:return t instanceof ve?t.isEqual(jn.defaultValues(Ym)):!1;case Sl:return Qs.compareWithDefault("type",t.type)&&Qs.compareWithDefault("attributes",t.attributes)&&Qs.compareWithDefault("encodedValue",t.encodedValue);case Qm:return t instanceof ve?t.isEqual(jn.defaultValues(Qm)):!1;case ix:case bl:return Qs.compareWithDefault("type",t.type)&&Qs.compareWithDefault("attributes",t.attributes)&&Qs.compareWithDefault("encodedValue",t.encodedValue);default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:Il,value:[new ge({name:t.version||dO}),new Vr({value:[Qn.schema(t.sidSchema||{names:{blockName:ax}}),new Vr({value:[new oe({optional:!0,name:t.sid||ax,idBlock:{tagClass:3,tagNumber:0},value:[new Ve]}),new gt({optional:!0,name:t.sid||ax,idBlock:{tagClass:3,tagNumber:0}})]})]}),ve.schema(t.digestAlgorithm||{names:{blockName:mO}}),Qs.schema(t.signedAttrs||{names:{blockName:ZA,tagNumber:0}}),ve.schema(t.signatureAlgorithm||{names:{blockName:gO}}),new Ve({name:t.signature||vO}),Qs.schema(t.unsignedAttrs||{names:{blockName:e2,tagNumber:1}})]})}fromSchema(e){De(e,Y0e);let t=Ie(e,e,jn.schema());be.assertSchema(t,this.className),this.version=t.result[dO].valueBlock.valueDec;let n=t.result[ax];n.idBlock.tagClass===1?this.sid=new Qn({schema:n}):this.sid=n,this.digestAlgorithm=new ve({schema:t.result[mO]}),ZA in t.result&&(this.signedAttrs=new Qs({type:0,schema:t.result[ZA]})),this.signatureAlgorithm=new ve({schema:t.result[gO]}),this.signature=t.result[vO],e2 in t.result&&(this.unsignedAttrs=new Qs({type:1,schema:t.result[e2]}))}toSchema(){if(jn.compareWithDefault(Bh,this.sid))throw new Error('Incorrectly initialized "SignerInfo" class');let e=[];return e.push(new ge({value:this.version})),this.sid instanceof Qn?e.push(this.sid.toSchema()):e.push(this.sid),e.push(this.digestAlgorithm.toSchema()),this.signedAttrs&&jn.compareWithDefault(Sl,this.signedAttrs)===!1&&e.push(this.signedAttrs.toSchema()),e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.unsignedAttrs&&jn.compareWithDefault(bl,this.unsignedAttrs)===!1&&e.push(this.unsignedAttrs.toSchema()),new W({value:e})}toJSON(){if(jn.compareWithDefault(Bh,this.sid))throw new Error('Incorrectly initialized "SignerInfo" class');let e={version:this.version,digestAlgorithm:this.digestAlgorithm.toJSON(),signatureAlgorithm:this.signatureAlgorithm.toJSON(),signature:this.signature.toJSON()};return this.sid instanceof xt||(e.sid=this.sid.toJSON()),this.signedAttrs&&jn.compareWithDefault(Sl,this.signedAttrs)===!1&&(e.signedAttrs=this.signedAttrs.toJSON()),this.unsignedAttrs&&jn.compareWithDefault(bl,this.unsignedAttrs)===!1&&(e.unsignedAttrs=this.unsignedAttrs.toJSON()),e}};L2.CLASS_NAME="SignerInfo";var ox="version",ux="policy",cx="messageImprint",lx="serialNumber",fx="genTime",Dh="ordering",Rh="nonce",Zm="accuracy",e0="tsa",t0="extensions",Ea="TSTInfo",yO=`${Ea}.${ox}`,xO=`${Ea}.${ux}`,wO=`${Ea}.${cx}`,SO=`${Ea}.${lx}`,bO=`${Ea}.${fx}`,t2=`${Ea}.${Zm}`,r2=`${Ea}.${Dh}`,n2=`${Ea}.${Rh}`,s2=`${Ea}.${e0}`,i2=`${Ea}.${t0}`,Q0e=[yO,xO,wO,SO,bO,t2,r2,n2,s2,i2],FK=class Ys extends _e{static{o(this,"TSTInfo")}constructor(e={}){super(),this.version=B(e,ox,Ys.defaultValues(ox)),this.policy=B(e,ux,Ys.defaultValues(ux)),this.messageImprint=B(e,cx,Ys.defaultValues(cx)),this.serialNumber=B(e,lx,Ys.defaultValues(lx)),this.genTime=B(e,fx,Ys.defaultValues(fx)),Zm in e&&(this.accuracy=B(e,Zm,Ys.defaultValues(Zm))),Dh in e&&(this.ordering=B(e,Dh,Ys.defaultValues(Dh))),Rh in e&&(this.nonce=B(e,Rh,Ys.defaultValues(Rh))),e0 in e&&(this.tsa=B(e,e0,Ys.defaultValues(e0))),t0 in e&&(this.extensions=B(e,t0,Ys.defaultValues(t0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ox:return 0;case ux:return L;case cx:return new Sa;case lx:return new ge;case fx:return new Date(0,0,0);case Zm:return new Tf;case Dh:return!1;case Rh:return new ge;case e0:return new Nr;case t0:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ox:case ux:case fx:case Dh:return t===Ys.defaultValues(Dh);case cx:return Sa.compareWithDefault(Fh,t.hashAlgorithm)&&Sa.compareWithDefault(Mh,t.hashedMessage);case lx:case Rh:return t.isEqual(Ys.defaultValues(Rh));case Zm:return Tf.compareWithDefault(Pc,t.seconds)&&Tf.compareWithDefault(kc,t.millis)&&Tf.compareWithDefault(Lc,t.micros);case e0:return Nr.compareWithDefault(Jv,t.type)&&Nr.compareWithDefault(Yv,t.value);case t0:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||Ea,value:[new ge({name:t.version||yO}),new rt({name:t.policy||xO}),Sa.schema(t.messageImprint||{names:{blockName:wO}}),new ge({name:t.serialNumber||SO}),new Lr({name:t.genTime||bO}),Tf.schema(t.accuracy||{names:{blockName:t2}}),new pa({name:t.ordering||r2,optional:!0}),new ge({name:t.nonce||n2,optional:!0}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Nr.schema(t.tsa||{names:{blockName:s2}})]}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Tt({name:t.extensions||i2,value:zi.schema(t.extension||{})})]})]})}fromSchema(e){De(e,Q0e);let t=Ie(e,e,Ys.schema());be.assertSchema(t,this.className),this.version=t.result[yO].valueBlock.valueDec,this.policy=t.result[xO].valueBlock.toString(),this.messageImprint=new Sa({schema:t.result[wO]}),this.serialNumber=t.result[SO],this.genTime=t.result[bO].toDate(),t2 in t.result&&(this.accuracy=new Tf({schema:t.result[t2]})),r2 in t.result&&(this.ordering=t.result[r2].valueBlock.value),n2 in t.result&&(this.nonce=t.result[n2]),s2 in t.result&&(this.tsa=new Nr({schema:t.result[s2]})),i2 in t.result&&(this.extensions=Array.from(t.result[i2],n=>new zi({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(new rt({value:this.policy})),e.push(this.messageImprint.toSchema()),e.push(this.serialNumber),e.push(new Lr({valueDate:this.genTime})),this.accuracy&&e.push(this.accuracy.toSchema()),this.ordering!==void 0&&e.push(new pa({value:this.ordering})),this.nonce&&e.push(this.nonce),this.tsa&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[this.tsa.toSchema()]})),this.extensions&&e.push(new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.extensions,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={version:this.version,policy:this.policy,messageImprint:this.messageImprint.toJSON(),serialNumber:this.serialNumber.toJSON(),genTime:this.genTime};return this.accuracy&&(e.accuracy=this.accuracy.toJSON()),this.ordering!==void 0&&(e.ordering=this.ordering),this.nonce&&(e.nonce=this.nonce.toJSON()),this.tsa&&(e.tsa=this.tsa.toJSON()),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}async verify(e,t=Dt(!0)){if(!e.data)throw new Error('"data" is a mandatory attribute for TST_INFO verification');let n=e.data;if(e.notBefore&&this.genTime<e.notBefore)throw new Error("Generation time for TSTInfo object is less than notBefore value");if(e.notAfter&&this.genTime>e.notAfter)throw new Error("Generation time for TSTInfo object is more than notAfter value");let s=t.getAlgorithmByOID(this.messageImprint.hashAlgorithm.algorithmId,!0,"MessageImprint.hashAlgorithm"),i=await t.digest(s.name,new Uint8Array(n));return dt.isEqual(i,this.messageImprint.hashedMessage.valueBlock.valueHexView)}};FK.CLASS_NAME="TSTInfo";var r0="version",hx="digestAlgorithms",px="encapContentInfo",n0="certificates",s0="crls",dx="signerInfos",Xv="ocsps",Gh="SignedData",EO=`${Gh}.${r0}`,a2=`${Gh}.${hx}`,AO=`${Gh}.${px}`,o2=`${Gh}.${n0}`,u2=`${Gh}.${s0}`,c2=`${Gh}.${dx}`,Z0e=[EO,a2,AO,o2,u2,c2],fs=class extends Error{static{o(this,"SignedDataVerifyError")}constructor({message:e,code:t=0,date:n=new Date,signatureVerified:s=null,signerCertificate:i=null,signerCertificateVerified:a=null,timestampSerial:u=null,certificatePath:c=[]}){super(e),this.name="SignedDataVerifyError",this.date=n,this.code=t,this.timestampSerial=u,this.signatureVerified=s,this.signerCertificate=i,this.signerCertificateVerified=a,this.certificatePath=c}},m0=class wa extends _e{static{o(this,"SignedData")}constructor(e={}){super(),this.version=B(e,r0,wa.defaultValues(r0)),this.digestAlgorithms=B(e,hx,wa.defaultValues(hx)),this.encapContentInfo=B(e,px,wa.defaultValues(px)),n0 in e&&(this.certificates=B(e,n0,wa.defaultValues(n0))),s0 in e&&(this.crls=B(e,s0,wa.defaultValues(s0))),Xv in e&&(this.ocsps=B(e,Xv,wa.defaultValues(Xv))),this.signerInfos=B(e,dx,wa.defaultValues(dx)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case r0:return 0;case hx:return[];case px:return new jh;case n0:return[];case s0:return[];case Xv:return[];case dx:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case r0:return t===wa.defaultValues(r0);case px:return jh.compareWithDefault("eContentType",t.eContentType)&&jh.compareWithDefault("eContent",t.eContent);case hx:case n0:case s0:case Xv:case dx:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return t.optional===void 0&&(t.optional=!1),new W({name:t.blockName||Gh,optional:t.optional,value:[new ge({name:t.version||EO}),new Qr({value:[new Tt({name:t.digestAlgorithms||a2,value:ve.schema()})]}),jh.schema(t.encapContentInfo||{names:{blockName:AO}}),new oe({name:t.certificates||o2,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Kh.schema().valueBlock.value}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:wx.schema(t.crls||{names:{crls:u2}}).valueBlock.value}),new Qr({value:[new Tt({name:t.signerInfos||c2,value:L2.schema()})]})]})}fromSchema(e){De(e,Z0e);let t=Ie(e,e,wa.schema());if(be.assertSchema(t,this.className),this.version=t.result[EO].valueBlock.valueDec,a2 in t.result&&(this.digestAlgorithms=Array.from(t.result[a2],n=>new ve({schema:n}))),this.encapContentInfo=new jh({schema:t.result[AO]}),o2 in t.result){let n=new Kh({schema:new Qr({value:t.result[o2].valueBlock.value})});this.certificates=n.certificates.slice(0)}u2 in t.result&&(this.crls=Array.from(t.result[u2],n=>n.idBlock.tagClass===1?new Tx({schema:n}):(n.idBlock.tagClass=1,n.idBlock.tagNumber=16,new xx({schema:n})))),c2 in t.result&&(this.signerInfos=Array.from(t.result[c2],n=>new L2({schema:n})))}toSchema(e=!1){let t=[];if(this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof OA)||this.crls&&this.crls.length&&this.crls.some(n=>n instanceof xx)?this.version=5:this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof Nl)?this.version=4:this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof v2)||this.signerInfos.some(n=>n.version===3)||this.encapContentInfo.eContentType!==wa.ID_DATA?this.version=3:this.version=1,t.push(new ge({value:this.version})),t.push(new Qr({value:Array.from(this.digestAlgorithms,n=>n.toSchema())})),t.push(this.encapContentInfo.toSchema()),this.certificates){let s=new Kh({certificates:this.certificates}).toSchema();t.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:s.valueBlock.value}))}return this.crls&&t.push(new oe({idBlock:{tagClass:3,tagNumber:1},value:Array.from(this.crls,n=>{if(n instanceof xx){let s=n.toSchema();return s.idBlock.tagClass=3,s.idBlock.tagNumber=1,s}return n.toSchema(e)})})),t.push(new Qr({value:Array.from(this.signerInfos,n=>n.toSchema())})),new W({value:t})}toJSON(){let e={version:this.version,digestAlgorithms:Array.from(this.digestAlgorithms,t=>t.toJSON()),encapContentInfo:this.encapContentInfo.toJSON(),signerInfos:Array.from(this.signerInfos,t=>t.toJSON())};return this.certificates&&(e.certificates=Array.from(this.certificates,t=>t.toJSON())),this.crls&&(e.crls=Array.from(this.crls,t=>t.toJSON())),e}async verify({signer:e=-1,data:t=on,trustedCerts:n=[],checkDate:s=new Date,checkChain:i=!1,passedWhenNotRevValues:a=!1,extendedMode:u=!1,findOrigin:c=null,findIssuer:f=null}={},h=Dt(!0)){let m=null,g=null;try{let x=on,v=L,w=[],S=this.signerInfos[e];if(!S)throw new fs({date:s,code:1,message:"Unable to get signer by supplied index"});if(!this.certificates)throw new fs({date:s,code:2,message:"No certificates attached to this signed data"});if(S.sid instanceof Qn){for(let E of this.certificates)if(E instanceof ds&&E.issuer.isEqual(S.sid.issuer)&&E.serialNumber.isEqual(S.sid.serialNumber)){m=E;break}}else{let E=S.sid,C=E.idBlock.isConstructed?E.valueBlock.value[0].valueBlock.valueHex:E.valueBlock.valueHex;for(let _ of this.certificates){if(!(_ instanceof ds))continue;let M=await h.digest({name:"sha-1"},_.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView);if(Ac(M,C)){m=_;break}}}if(!m)throw new fs({date:s,code:3,message:"Unable to find signer certificate"});if(this.encapContentInfo.eContentType===Qde){if(!this.encapContentInfo.eContent)throw new fs({date:s,code:15,message:"Error during verification: TSTInfo eContent is empty",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0});let E;try{E=FK.fromBER(this.encapContentInfo.eContent.valueBlock.valueHexView)}catch{throw new fs({date:s,code:15,message:"Error during verification: TSTInfo wrong ASN.1 schema ",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}if(s=E.genTime,g=E.serialNumber.valueBlock.valueHexView.slice().buffer,t.byteLength===0)throw new fs({date:s,code:4,message:"Missed detached data input array"});if(!await E.verify({data:t},h))throw new fs({date:s,code:15,message:"Error during verification: TSTInfo verification is failed",signatureVerified:!1,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}if(i){let E=this.certificates.filter(R=>R instanceof ds&&!!_K(R,m)),C={checkDate:s,certs:E,trustedCerts:n};f&&(C.findIssuer=f),c&&(C.findOrigin=c);let _=new UK(C);if(_.certs.push(m),this.crls)for(let R of this.crls)"thisUpdate"in R?_.crls.push(R):R.otherRevInfoFormat===aA&&_.ocsps.push(new Ax({schema:R.otherRevInfo}));this.ocsps&&_.ocsps.push(...this.ocsps);let M=await _.verify({passedWhenNotRevValues:a},h).catch(R=>{throw new fs({date:s,code:5,message:`Validation of signer's certificate failed with error: ${R instanceof Object?R.resultMessage:R}`,signerCertificate:m,signerCertificateVerified:!1})});if(M.certificatePath&&(w=M.certificatePath),!M.result)throw new fs({date:s,code:5,message:`Validation of signer's certificate failed: ${M.resultMessage}`,signerCertificate:m,signerCertificateVerified:!1})}let A=h.getAlgorithmByOID(S.digestAlgorithm.algorithmId);if(!("name"in A))throw new fs({date:s,code:7,message:`Unsupported signature algorithm: ${S.digestAlgorithm.algorithmId}`,signerCertificate:m,signerCertificateVerified:!0});v=A.name;let N=this.encapContentInfo.eContent;if(N)N.idBlock.tagClass===1&&N.idBlock.tagNumber===4?t=N.getValue():t=N.valueBlock.valueBeforeDecodeView.slice().buffer;else if(t.byteLength===0)throw new fs({date:s,code:8,message:"Missed detached data input array",signerCertificate:m,signerCertificateVerified:!0});if(S.signedAttrs){let E=!1,C=!1;for(let _ of S.signedAttrs.attributes)if(_.type==="1.2.840.113549.1.9.3"&&(E=!0),_.type==="1.2.840.113549.1.9.4"&&(C=!0,x=_.values[0].valueBlock.valueHex),E&&C)break;if(E===!1)throw new fs({date:s,code:9,message:'Attribute "content-type" is a mandatory attribute for "signed attributes"',signerCertificate:m,signerCertificateVerified:!0});if(C===!1)throw new fs({date:s,code:10,message:'Attribute "message-digest" is a mandatory attribute for "signed attributes"',signatureVerified:null,signerCertificate:m,signerCertificateVerified:!0})}if(S.signedAttrs){let E=await h.digest(v,new Uint8Array(t));if(!Ac(E,x))throw new fs({date:s,code:15,message:"Error during verification: Message digest doesn't match",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0});t=S.signedAttrs.encodedValue}let b=S.signatureAlgorithm.algorithmId==="1.2.840.113549.1.1.1"?await h.verifyWithPublicKey(t,S.signature,m.subjectPublicKeyInfo,S.signatureAlgorithm,v):await h.verifyWithPublicKey(t,S.signature,m.subjectPublicKeyInfo,S.signatureAlgorithm);return u?{date:s,code:14,message:L,signatureVerified:b,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0,certificatePath:w}:b}catch(x){throw x instanceof fs?x:new fs({date:s,code:15,message:`Error during verification: ${x instanceof Error?x.message:x}`,signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0})}}async sign(e,t,n="SHA-1",s=on,i=Dt(!0)){var a;if(!e)throw new Error("Need to provide a private key for signing");let u=this.signerInfos[t];if(!u)throw new RangeError("SignerInfo index is out of range");!(!((a=u.signedAttrs)===null||a===void 0)&&a.attributes.length)&&"hash"in e.algorithm&&"hash"in e.algorithm&&e.algorithm.hash&&(n=e.algorithm.hash.name);let c=i.getOIDByAlgorithm({name:n},!0,"hashAlgorithm");this.digestAlgorithms.filter(g=>g.algorithmId===c).length===0&&this.digestAlgorithms.push(new ve({algorithmId:c,algorithmParams:new Yr})),u.digestAlgorithm=new ve({algorithmId:c,algorithmParams:new Yr});let f=await i.getSignatureParameters(e,n),h=f.parameters;if(u.signatureAlgorithm=f.signatureAlgorithm,u.signedAttrs)if(u.signedAttrs.encodedValue.byteLength!==0)s=u.signedAttrs.encodedValue;else{s=u.signedAttrs.toSchema().toBER();let g=dt.toUint8Array(s);g[0]=49}else{let g=this.encapContentInfo.eContent;if(g)g.idBlock.tagClass===1&&g.idBlock.tagNumber===4?s=g.getValue():s=g.valueBlock.valueBeforeDecodeView.slice().buffer;else if(s.byteLength===0)throw new Error("Missed detached data input array")}let m=await i.signWithPrivateKey(s,e,h);u.signature=new Ve({valueHex:m})}};m0.CLASS_NAME="SignedData";m0.ID_DATA=RO;var Oh="version",Ph="authSafe",mu="macData",Gv="parsedValue",ege=[Oh,Ph,mu],tge=class kh extends _e{static{o(this,"PFX")}constructor(e={}){super(),this.version=B(e,Oh,kh.defaultValues(Oh)),this.authSafe=B(e,Ph,kh.defaultValues(Ph)),mu in e&&(this.macData=B(e,mu,kh.defaultValues(mu))),Gv in e&&(this.parsedValue=B(e,Gv,kh.defaultValues(Gv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Oh:return 3;case Ph:return new en;case mu:return new yl;case Gv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Oh:return t===kh.defaultValues(e);case Ph:return en.compareWithDefault("contentType",t.contentType)&&en.compareWithDefault("content",t.content);case mu:return yl.compareWithDefault("mac",t.mac)&&yl.compareWithDefault("macSalt",t.macSalt)&&yl.compareWithDefault("iterations",t.iterations);case Gv:return t instanceof Object&&Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.version||Oh}),en.schema(t.authSafe||{names:{blockName:Ph}}),yl.schema(t.macData||{names:{blockName:mu,optional:!0}})]})}fromSchema(e){De(e,ege);let t=Ie(e,e,kh.schema({names:{version:Oh,authSafe:{names:{blockName:Ph}},macData:{names:{blockName:mu}}}}));be.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.authSafe=new en({schema:t.result.authSafe}),mu in t.result&&(this.macData=new yl({schema:t.result.macData}))}toSchema(){let e=[new ge({value:this.version}),this.authSafe.toSchema()];return this.macData&&e.push(this.macData.toSchema()),new W({value:e})}toJSON(){let e={version:this.version,authSafe:this.authSafe.toJSON()};return this.macData&&(e.macData=this.macData.toJSON()),e}async makeInternalValues(e={},t=Dt(!0)){if(Cr.assert(e,"parameters","object"),!this.parsedValue)throw new Error('Please call "parseValues" function first in order to make "parsedValue" data');switch(mr.assertEmpty(this.parsedValue.integrityMode,"integrityMode","parsedValue"),mr.assertEmpty(this.parsedValue.authenticatedSafe,"authenticatedSafe","parsedValue"),this.parsedValue.integrityMode){case 0:{if(!("iterations"in e))throw new mr("iterations");mr.assertEmpty(e.pbkdf2HashAlgorithm,"pbkdf2HashAlgorithm"),mr.assertEmpty(e.hmacHashAlgorithm,"hmacHashAlgorithm"),mr.assertEmpty(e.password,"password");let n=new ArrayBuffer(64),s=new Uint8Array(n);t.getRandomValues(s);let i=this.parsedValue.authenticatedSafe.toSchema().toBER(!1);this.authSafe=new en({contentType:en.DATA,content:new Ve({valueHex:i})});let a=await t.stampDataWithPassword({password:e.password,hashAlgorithm:e.hmacHashAlgorithm,salt:n,iterationCount:e.iterations,contentToStamp:i});this.macData=new yl({mac:new Uh({digestAlgorithm:new ve({algorithmId:t.getOIDByAlgorithm({name:e.hmacHashAlgorithm},!0,"hmacHashAlgorithm")}),digest:new Ve({valueHex:a})}),macSalt:new Ve({valueHex:n}),iterations:e.iterations})}break;case 1:{if(!("signingCertificate"in e))throw new mr("signingCertificate");mr.assertEmpty(e.privateKey,"privateKey"),mr.assertEmpty(e.hashAlgorithm,"hashAlgorithm");let n=this.parsedValue.authenticatedSafe.toSchema().toBER(!1),s=new m0({version:1,encapContentInfo:new jh({eContentType:"1.2.840.113549.1.7.1",eContent:new Ve({valueHex:n})}),certificates:[e.signingCertificate]}),i=await t.digest({name:e.hashAlgorithm},new Uint8Array(n)),a=[];a.push(new un({type:"1.2.840.113549.1.9.3",values:[new rt({value:"1.2.840.113549.1.7.1"})]})),a.push(new un({type:"1.2.840.113549.1.9.5",values:[new Sf({valueDate:new Date})]})),a.push(new un({type:"1.2.840.113549.1.9.4",values:[new Ve({valueHex:i})]})),s.signerInfos.push(new L2({version:1,sid:new Qn({issuer:e.signingCertificate.issuer,serialNumber:e.signingCertificate.serialNumber}),signedAttrs:new Qs({type:0,attributes:a})})),await s.sign(e.privateKey,0,e.hashAlgorithm,void 0,t),this.authSafe=new en({contentType:"1.2.840.113549.1.7.2",content:s.toSchema(!0)})}break;default:throw new Error(`Parameter "integrityMode" has unknown value: ${this.parsedValue.integrityMode}`)}}async parseInternalValues(e,t=Dt(!0)){switch(Cr.assert(e,"parameters","object"),e.checkIntegrity===void 0&&(e.checkIntegrity=!0),this.parsedValue={},this.authSafe.contentType){case en.DATA:{mr.assertEmpty(e.password,"password"),this.parsedValue.integrityMode=0,Cr.assert(this.authSafe.content,"authSafe.content",Ve);let n=this.authSafe.content.getValue();if(this.parsedValue.authenticatedSafe=aO.fromBER(n),e.checkIntegrity){if(!this.macData)throw new Error('Absent "macData" value, can not check PKCS#12 data integrity');let s=t.getAlgorithmByOID(this.macData.mac.digestAlgorithm.algorithmId,!0,"digestAlgorithm");if(!await t.verifyDataStampedWithPassword({password:e.password,hashAlgorithm:s.name,salt:dt.toArrayBuffer(this.macData.macSalt.valueBlock.valueHexView),iterationCount:this.macData.iterations||1,contentToVerify:n,signatureToVerify:dt.toArrayBuffer(this.macData.mac.digest.valueBlock.valueHexView)}))throw new Error("Integrity for the PKCS#12 data is broken!")}}break;case en.SIGNED_DATA:{this.parsedValue.integrityMode=1;let n=new m0({schema:this.authSafe.content}),s=n.encapContentInfo.eContent;mr.assert(s,"eContent","cmsSigned.encapContentInfo"),Cr.assert(s,"eContent",Ve);let i=s.getValue();if(this.parsedValue.authenticatedSafe=aO.fromBER(i),!await n.verify({signer:0,checkChain:!1},t))throw new Error("Integrity for the PKCS#12 data is broken!")}break;default:throw new Error(`Incorrect value for "this.authSafe.contentType": ${this.authSafe.contentType}`)}}};tge.CLASS_NAME="PFX";var i0="status",El="statusStrings",Al="failInfo",rge=[i0,El,Al],YH;(function(r){r[r.granted=0]="granted",r[r.grantedWithMods=1]="grantedWithMods",r[r.rejection=2]="rejection",r[r.waiting=3]="waiting",r[r.revocationWarning=4]="revocationWarning",r[r.revocationNotification=5]="revocationNotification"})(YH||(YH={}));var mx=class Lh extends _e{static{o(this,"PKIStatusInfo")}constructor(e={}){super(),this.status=B(e,i0,Lh.defaultValues(i0)),El in e&&(this.statusStrings=B(e,El,Lh.defaultValues(El))),Al in e&&(this.failInfo=B(e,Al,Lh.defaultValues(Al))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case i0:return 2;case El:return[];case Al:return new Ht;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case i0:return t===Lh.defaultValues(e);case El:return t.length===0;case Al:return t.isEqual(Lh.defaultValues(e));default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||L,value:[new ge({name:t.status||L}),new W({optional:!0,value:[new Tt({name:t.statusStrings||L,value:new Hi})]}),new Ht({name:t.failInfo||L,optional:!0})]})}fromSchema(e){De(e,rge);let t=Ie(e,e,Lh.schema({names:{status:i0,statusStrings:El,failInfo:Al}}));be.assertSchema(t,this.className);let n=t.result.status;if(n.valueBlock.isHexOnly===!0||n.valueBlock.valueDec<0||n.valueBlock.valueDec>5)throw new Error('PKIStatusInfo "status" has invalid value');this.status=n.valueBlock.valueDec,El in t.result&&(this.statusStrings=t.result.statusStrings),Al in t.result&&(this.failInfo=t.result.failInfo)}toSchema(){let e=[];return e.push(new ge({value:this.status})),this.statusStrings&&e.push(new W({optional:!0,value:this.statusStrings})),this.failInfo&&e.push(this.failInfo),new W({value:e})}toJSON(){let e={status:this.status};return this.statusStrings&&(e.statusStrings=Array.from(this.statusStrings,t=>t.toJSON())),this.failInfo&&(e.failInfo=this.failInfo.toJSON()),e}};mx.CLASS_NAME="PKIStatusInfo";var gx="version",vx="messageImprint",a0="reqPolicy",o0="nonce",gu="certReq",u0="extensions",Wh="TimeStampReq",CO=`${Wh}.${gx}`,NO=`${Wh}.${vx}`,l2=`${Wh}.${a0}`,f2=`${Wh}.${o0}`,h2=`${Wh}.${gu}`,p2=`${Wh}.${u0}`,nge=[CO,NO,l2,f2,h2,p2],sge=class Wi extends _e{static{o(this,"TimeStampReq")}constructor(e={}){super(),this.version=B(e,gx,Wi.defaultValues(gx)),this.messageImprint=B(e,vx,Wi.defaultValues(vx)),a0 in e&&(this.reqPolicy=B(e,a0,Wi.defaultValues(a0))),o0 in e&&(this.nonce=B(e,o0,Wi.defaultValues(o0))),gu in e&&(this.certReq=B(e,gu,Wi.defaultValues(gu))),u0 in e&&(this.extensions=B(e,u0,Wi.defaultValues(u0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case gx:return 0;case vx:return new Sa;case a0:return L;case o0:return new ge;case gu:return!1;case u0:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case gx:case a0:case gu:return t===Wi.defaultValues(e);case vx:return Sa.compareWithDefault("hashAlgorithm",t.hashAlgorithm)&&Sa.compareWithDefault("hashedMessage",t.hashedMessage);case o0:return t.isEqual(Wi.defaultValues(e));case u0:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||Wh,value:[new ge({name:t.version||CO}),Sa.schema(t.messageImprint||{names:{blockName:NO}}),new rt({name:t.reqPolicy||l2,optional:!0}),new ge({name:t.nonce||f2,optional:!0}),new pa({name:t.certReq||h2,optional:!0}),new oe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tt({name:t.extensions||p2,value:zi.schema()})]})]})}fromSchema(e){De(e,nge);let t=Ie(e,e,Wi.schema());be.assertSchema(t,this.className),this.version=t.result[CO].valueBlock.valueDec,this.messageImprint=new Sa({schema:t.result[NO]}),l2 in t.result&&(this.reqPolicy=t.result[l2].valueBlock.toString()),f2 in t.result&&(this.nonce=t.result[f2]),h2 in t.result&&(this.certReq=t.result[h2].valueBlock.value),p2 in t.result&&(this.extensions=Array.from(t.result[p2],n=>new zi({schema:n})))}toSchema(){let e=[];return e.push(new ge({value:this.version})),e.push(this.messageImprint.toSchema()),this.reqPolicy&&e.push(new rt({value:this.reqPolicy})),this.nonce&&e.push(this.nonce),gu in this&&Wi.compareWithDefault(gu,this.certReq)===!1&&e.push(new pa({value:this.certReq})),this.extensions&&e.push(new oe({idBlock:{tagClass:3,tagNumber:0},value:Array.from(this.extensions,t=>t.toSchema())})),new W({value:e})}toJSON(){let e={version:this.version,messageImprint:this.messageImprint.toJSON()};return this.reqPolicy!==void 0&&(e.reqPolicy=this.reqPolicy),this.nonce!==void 0&&(e.nonce=this.nonce.toJSON()),this.certReq!==void 0&&Wi.compareWithDefault(gu,this.certReq)===!1&&(e.certReq=this.certReq),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}};sge.CLASS_NAME="TimeStampReq";var c0="status",l0="timeStampToken",XO="TimeStampResp",TO=`${XO}.${c0}`,d2=`${XO}.${l0}`,ige=[TO,d2],age=class m2 extends _e{static{o(this,"TimeStampResp")}constructor(e={}){super(),this.status=B(e,c0,m2.defaultValues(c0)),l0 in e&&(this.timeStampToken=B(e,l0,m2.defaultValues(l0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case c0:return new mx;case l0:return new en;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case c0:return mx.compareWithDefault(c0,t.status)&&!("statusStrings"in t)&&!("failInfo"in t);case l0:return t.contentType===L&&t.content instanceof xt;default:return super.defaultValues(e)}}static schema(e={}){let t=B(e,"names",{});return new W({name:t.blockName||XO,value:[mx.schema(t.status||{names:{blockName:TO}}),en.schema(t.timeStampToken||{names:{blockName:d2,optional:!0}})]})}fromSchema(e){De(e,ige);let t=Ie(e,e,m2.schema());be.assertSchema(t,this.className),this.status=new mx({schema:t.result[TO]}),d2 in t.result&&(this.timeStampToken=new en({schema:t.result[d2]}))}toSchema(){let e=[];return e.push(this.status.toSchema()),this.timeStampToken&&e.push(this.timeStampToken.toSchema()),new W({value:e})}toJSON(){let e={status:this.status.toJSON()};return this.timeStampToken&&(e.timeStampToken=this.timeStampToken.toJSON()),e}async sign(e,t,n=Dt(!0)){return this.assertContentType(),new m0({schema:this.timeStampToken.content}).sign(e,0,t,void 0,n)}async verify(e={signer:0,trustedCerts:[],data:on},t=Dt(!0)){return this.assertContentType(),new m0({schema:this.timeStampToken.content}).verify(e,t)}assertContentType(){if(!this.timeStampToken)throw new Error("timeStampToken is absent in TSP response");if(this.timeStampToken.contentType!==cK)throw new Error(`Wrong format of timeStampToken: ${this.timeStampToken.contentType}`)}};age.CLASS_NAME="TimeStampResp";function oge(){if(typeof globalThis<"u"&&"crypto"in globalThis){let r="webcrypto";"webkitSubtle"in globalThis.crypto&&(r="safari"),g2(r,new d0({name:r,crypto:globalThis.crypto}))}else if(typeof crypto<"u"&&"webcrypto"in crypto){let r="NodeJS ^15",e=crypto.webcrypto;g2(r,new d0({name:r,crypto:e}))}}o(oge,"initCryptoEngine");oge();var GO=null,wn=class{static{o(this,"Application")}static setEngine(e,t){GO=Object.assign(t,{name:e}),g2(e,new d0({name:e,crypto:t}))}static get crypto(){if(!GO)throw new Me(Te.CRYPTOGRAPHIC_NO_MODULE);return GO}static isNodePlugin(){return typeof self>"u"&&typeof window>"u"}};function uge(){wn.isNodePlugin()||wn.setEngine("W3 WebCrypto module",self.crypto)}o(uge,"init");uge();var V2=class{static{o(this,"XmlAlgorithm")}getAlgorithmName(){return this.namespaceURI}},zh=class extends V2{static{o(this,"HashAlgorithm")}async Digest(e){let t;if(typeof e=="string")t=br.FromString(e,"utf8");else if(ArrayBuffer.isView(e))t=new Uint8Array(e.buffer);else if(e instanceof ArrayBuffer)t=new Uint8Array(e);else{let s=ao(e);t=br.FromString(s,"utf8")}let n=await wn.crypto.subtle.digest(this.algorithm,t);return new Uint8Array(n)}},Sn=class extends V2{static{o(this,"SignatureAlgorithm")}async Sign(e,t,n){let s=br.FromString(e,"utf8");return wn.crypto.subtle.sign(n,t,s)}async Verify(e,t,n){let s=this.algorithm,i=br.FromString(e,"utf8");return wn.crypto.subtle.verify(s,t,n,i)}};var Fn="SHA-1",Zn="SHA-256",es="SHA-384",ts="SHA-512",y0="http://www.w3.org/2000/09/xmldsig#sha1",x0="http://www.w3.org/2001/04/xmlenc#sha256",w0="http://www.w3.org/2001/04/xmldsig-more#sha384",S0="http://www.w3.org/2001/04/xmlenc#sha512",U2=class extends zh{static{o(this,"Sha1")}constructor(){super(...arguments),this.algorithm={name:Fn},this.namespaceURI=y0}},Bx=class extends zh{static{o(this,"Sha256")}constructor(){super(...arguments),this.algorithm={name:Zn},this.namespaceURI=x0}},j2=class extends zh{static{o(this,"Sha384")}constructor(){super(...arguments),this.algorithm={name:es},this.namespaceURI=w0}},F2=class extends zh{static{o(this,"Sha512")}constructor(){super(...arguments),this.algorithm={name:ts},this.namespaceURI=S0}};var xu="ECDSA",M2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1",q2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256",H2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384",K2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";function $2(r){if(r.name.toUpperCase()===xu.toUpperCase())switch(r.hash.name.toUpperCase()){case Fn:return new b0;case Zn:return new E0;case es:return new A0;case ts:return new C0}return null}o($2,"fromAlgorithm");var b0=class extends Sn{static{o(this,"EcdsaSha1")}constructor(){super(...arguments),this.algorithm={name:xu,hash:{name:Fn}},this.namespaceURI=M2}static fromAlgorithm(e){return $2(e)}},E0=class extends Sn{static{o(this,"EcdsaSha256")}constructor(){super(...arguments),this.algorithm={name:xu,hash:{name:Zn}},this.namespaceURI=q2}static fromAlgorithm(e){return $2(e)}},A0=class extends Sn{static{o(this,"EcdsaSha384")}constructor(){super(...arguments),this.algorithm={name:xu,hash:{name:es}},this.namespaceURI=H2}static fromAlgorithm(e){return $2(e)}},C0=class extends Sn{static{o(this,"EcdsaSha512")}constructor(){super(...arguments),this.algorithm={name:xu,hash:{name:ts}},this.namespaceURI=K2}static fromAlgorithm(e){return $2(e)}};var N0="HMAC",WO="http://www.w3.org/2000/09/xmldsig#hmac-sha1",zO="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256",JO="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384",YO="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512";function X2(r){if(r.name.toUpperCase()===N0.toUpperCase())switch(r.hash.name.toUpperCase()){case Fn:return new Dx;case Zn:return new Rx;case es:return new Ox;case ts:return new Px}return null}o(X2,"fromAlgorithm");var Dx=class extends Sn{static{o(this,"HmacSha1")}constructor(){super(...arguments),this.algorithm={name:N0,hash:{name:Fn}},this.namespaceURI=WO}static fromAlgorithm(e){return X2(e)}},Rx=class extends Sn{static{o(this,"HmacSha256")}constructor(){super(...arguments),this.algorithm={name:N0,hash:{name:Zn}},this.namespaceURI=zO}static fromAlgorithm(e){return X2(e)}},Ox=class extends Sn{static{o(this,"HmacSha384")}constructor(){super(...arguments),this.algorithm={name:N0,hash:{name:es}},this.namespaceURI=JO}static fromAlgorithm(e){return X2(e)}},Px=class extends Sn{static{o(this,"HmacSha512")}constructor(){super(...arguments),this.algorithm={name:N0,hash:{name:ts}},this.namespaceURI=YO}static fromAlgorithm(e){return X2(e)}};var wu="RSASSA-PKCS1-v1_5",G2="http://www.w3.org/2000/09/xmldsig#rsa-sha1",W2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",z2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384",J2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";function Y2(r){if(r.name.toUpperCase()===wu.toUpperCase())switch(r.hash.name.toUpperCase()){case Fn:return new T0;case Zn:return new I0;case es:return new _0;case ts:return new B0}return null}o(Y2,"fromAlgorithm");var T0=class extends Sn{static{o(this,"RsaPkcs1Sha1")}constructor(){super(...arguments),this.algorithm={name:wu,hash:{name:Fn}},this.namespaceURI=G2}static fromAlgorithm(e){return Y2(e)}},I0=class extends Sn{static{o(this,"RsaPkcs1Sha256")}constructor(){super(...arguments),this.algorithm={name:wu,hash:{name:Zn}},this.namespaceURI=W2}static fromAlgorithm(e){return Y2(e)}},_0=class extends Sn{static{o(this,"RsaPkcs1Sha384")}constructor(){super(...arguments),this.algorithm={name:wu,hash:{name:es}},this.namespaceURI=z2}static fromAlgorithm(e){return Y2(e)}},B0=class extends Sn{static{o(this,"RsaPkcs1Sha512")}constructor(){super(...arguments),this.algorithm={name:wu,hash:{name:ts}},this.namespaceURI=J2}static fromAlgorithm(e){return Y2(e)}};function He(r,e,t,n){var s=arguments.length,i=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,t):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,t,n);else for(var u=r.length-1;u>=0;u--)(a=r[u])&&(i=(s<3?a(i):s>3?a(e,t,i):a(e,t))||i);return s>3&&i&&Object.defineProperty(e,t,i),i}o(He,"__decorate");function ft(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}o(ft,"__metadata");var me={DefaultCanonMethod:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315",DefaultDigestMethod:"http://www.w3.org/2001/04/xmlenc#sha256",DefaultPrefix:"ds",ElementNames:{CanonicalizationMethod:"CanonicalizationMethod",DigestMethod:"DigestMethod",DigestValue:"DigestValue",DSAKeyValue:"DSAKeyValue",DomainParameters:"DomainParameters",EncryptedKey:"EncryptedKey",HMACOutputLength:"HMACOutputLength",RSAPSSParams:"RSAPSSParams",MaskGenerationFunction:"MaskGenerationFunction",SaltLength:"SaltLength",KeyInfo:"KeyInfo",KeyName:"KeyName",KeyValue:"KeyValue",Modulus:"Modulus",Exponent:"Exponent",Manifest:"Manifest",Object:"Object",Reference:"Reference",RetrievalMethod:"RetrievalMethod",RSAKeyValue:"RSAKeyValue",ECDSAKeyValue:"ECDSAKeyValue",NamedCurve:"NamedCurve",PublicKey:"PublicKey",Signature:"Signature",SignatureMethod:"SignatureMethod",SignatureValue:"SignatureValue",SignedInfo:"SignedInfo",Transform:"Transform",Transforms:"Transforms",X509Data:"X509Data",PGPData:"PGPData",SPKIData:"SPKIData",SPKIexp:"SPKIexp",MgmtData:"MgmtData",X509IssuerSerial:"X509IssuerSerial",X509IssuerName:"X509IssuerName",X509SerialNumber:"X509SerialNumber",X509SKI:"X509SKI",X509SubjectName:"X509SubjectName",X509Certificate:"X509Certificate",X509CRL:"X509CRL",XPath:"XPath",X:"X",Y:"Y"},AttributeNames:{Algorithm:"Algorithm",Encoding:"Encoding",Id:"Id",MimeType:"MimeType",Type:"Type",URI:"URI"},AlgorithmNamespaces:{XmlDsigBase64Transform:"http://www.w3.org/2000/09/xmldsig#base64",XmlDsigC14NTransform:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315",XmlDsigC14NWithCommentsTransform:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",XmlDsigEnvelopedSignatureTransform:"http://www.w3.org/2000/09/xmldsig#enveloped-signature",XmlDsigXPathTransform:"http://www.w3.org/TR/1999/REC-xpath-19991116",XmlDsigXsltTransform:"http://www.w3.org/TR/1999/REC-xslt-19991116",XmlDsigExcC14NTransform:"http://www.w3.org/2001/10/xml-exc-c14n#",XmlDsigExcC14NWithCommentsTransform:"http://www.w3.org/2001/10/xml-exc-c14n#WithComments",XmlDecryptionTransform:"http://www.w3.org/2002/07/decrypt#XML",XmlLicenseTransform:"urn:mpeg:mpeg21:2003:01-REL-R-NS:licenseTransform"},Uri:{Manifest:"http://www.w3.org/2000/09/xmldsig#Manifest"},NamespaceURI:"http://www.w3.org/2000/09/xmldsig#",NamespaceURIMore:"http://www.w3.org/2007/05/xmldsig-more#",NamespaceURIPss:"http://www.example.org/xmldsig-pss/#"};var Xr=class extends Xs{static{o(this,"XmlSignatureObject")}};Xr=He([Ft({localName:"xmldsig",namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix})],Xr);var Ji=class extends xd{static{o(this,"XmlSignatureCollection")}};Ji=He([Ft({localName:"xmldsig_collection",namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix})],Ji);var Yi=class extends Xr{static{o(this,"DigestMethod")}constructor(e){super(),e&&(this.Algorithm=e)}};He([kr({localName:me.AttributeNames.Algorithm,required:!0,defaultValue:me.DefaultDigestMethod}),ft("design:type",String)],Yi.prototype,"Algorithm",void 0);Yi=He([Ft({localName:me.ElementNames.DigestMethod}),ft("design:paramtypes",[String])],Yi);var gi=class extends Xr{static{o(this,"KeyInfoClause")}static canImportCryptoKey(e){return!1}};var cge={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},D0=class extends gi{static{o(this,"RsaKeyValue")}constructor(){super(...arguments),this.key=null,this.jwk=null,this.keyUsage=[]}static canImportCryptoKey(e){let t=e.algorithm.name.toUpperCase();return t===wu.toUpperCase()||t===Jh.toUpperCase()}async importKey(e){let t=e.algorithm.name?e.algorithm.name.toUpperCase():"";if(t!==wu.toUpperCase()&&t!==Jh.toUpperCase())throw new Me(Te.ALGORITHM_WRONG_NAME,e.algorithm.name);this.key=e;let n=await wn.crypto.subtle.exportKey("jwk",e);return this.jwk=n,this.Modulus=br.FromBase64Url(n.n||""),this.Exponent=br.FromBase64Url(n.e||""),this.keyUsage=e.usages,this}async exportKey(e=cge){if(this.key)return this.key;if(!this.Modulus)throw new Me(Te.CRYPTOGRAPHIC,"RsaKeyValue has no Modulus");let t=br.ToBase64Url(this.Modulus);if(!this.Exponent)throw new Me(Te.CRYPTOGRAPHIC,"RsaKeyValue has no Exponent");let n=br.ToBase64Url(this.Exponent),s;switch(e.name.toUpperCase()){case wu.toUpperCase():s="R";break;case Jh.toUpperCase():s="P";break;default:throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e.name)}switch(e.hash.name.toUpperCase()){case Fn:s+="S1";break;case Zn:s+="S256";break;case es:s+="S384";break;case ts:s+="S512";break}let i={kty:"RSA",alg:s,n:t,e:n,ext:!0};return wn.crypto.subtle.importKey("jwk",i,e,!0,this.keyUsage)}LoadXml(e){super.LoadXml(e),this.keyUsage=["verify"]}};He([Gt({localName:me.ElementNames.Modulus,prefix:me.DefaultPrefix,namespaceURI:me.NamespaceURI,required:!0,converter:qi}),ft("design:type",Object)],D0.prototype,"Modulus",void 0);He([Gt({localName:me.ElementNames.Exponent,prefix:me.DefaultPrefix,namespaceURI:me.NamespaceURI,required:!0,converter:qi}),ft("design:type",Object)],D0.prototype,"Exponent",void 0);D0=He([Ft({localName:me.ElementNames.RSAKeyValue})],D0);var QO="http://www.w3.org/2007/05/xmldsig-more#",ZO="pss",R0=class extends Xs{static{o(this,"MaskGenerationFunction")}};He([Gt({parser:Yi}),ft("design:type",Yi)],R0.prototype,"DigestMethod",void 0);He([kr({localName:me.AttributeNames.Algorithm,defaultValue:"http://www.w3.org/2007/05/xmldsig-more#MGF1"}),ft("design:type",String)],R0.prototype,"Algorithm",void 0);R0=He([Ft({localName:me.ElementNames.MaskGenerationFunction,prefix:ZO,namespaceURI:QO})],R0);var Aa=class extends Xs{static{o(this,"PssAlgorithmParams")}};He([Gt({parser:Yi}),ft("design:type",Yi)],Aa.prototype,"DigestMethod",void 0);He([Gt({parser:R0}),ft("design:type",R0)],Aa.prototype,"MGF",void 0);He([Gt({converter:Cv,prefix:ZO,namespaceURI:QO}),ft("design:type",Number)],Aa.prototype,"SaltLength",void 0);He([Gt({converter:Cv}),ft("design:type",Number)],Aa.prototype,"TrailerField",void 0);Aa=He([Ft({localName:me.ElementNames.RSAPSSParams,prefix:ZO,namespaceURI:QO})],Aa);var Jh="RSA-PSS",eP="http://www.w3.org/2007/05/xmldsig-more#rsa-pss",Q2=class r extends Sn{static{o(this,"RsaPssWithParams")}constructor(){super(...arguments),this.algorithm={name:Jh,hash:{name:Fn}},this.namespaceURI=eP}static fromAlgorithm(e){let t=null;if(e.name.toUpperCase()===Jh.toUpperCase()){switch(e.hash.name.toUpperCase()){case Fn:t=new r;break;case Zn:t=new r;break;case es:t=new r;break;case ts:t=new r;break}if(t)return t.algorithm.hash.name=e.hash.name,e.saltLength&&(t.algorithm.saltLength=e.saltLength),t}return null}fromMethod(e){if(!e.Any.Some(t=>{if(t instanceof Aa){switch(t.DigestMethod.Algorithm.toLowerCase()){case y0:this.algorithm.hash.name=Fn;break;case x0:this.algorithm.hash.name=Zn;break;case w0:this.algorithm.hash.name=es;break;case S0:this.algorithm.hash.name=ts;break;default:throw new Me(Te.CRYPTOGRAPHIC,`Unsupported hash algorithm: ${t.DigestMethod.Algorithm}`)}return t.SaltLength&&(this.algorithm.saltLength=t.SaltLength),!0}return!1}))throw new Me(Te.CRYPTOGRAPHIC,"RSA-PSS parameters not found in SignatureMethod")}toMethod(e){let t=new Aa;switch(this.algorithm.hash.name.toUpperCase()){case Fn:t.DigestMethod.Algorithm=y0;break;case Zn:t.DigestMethod.Algorithm=x0;break;case es:t.DigestMethod.Algorithm=w0;break;case ts:t.DigestMethod.Algorithm=S0;break;default:throw new Me(Te.CRYPTOGRAPHIC,`Unsupported hash algorithm: ${this.algorithm.hash.name}`)}this.algorithm.saltLength&&(t.SaltLength=this.algorithm.saltLength),e.Any.Add(t)}};var vi;(function(r){r[r.BeforeDocElement=0]="BeforeDocElement",r[r.InsideDocElement=1]="InsideDocElement",r[r.AfterDocElement=2]="AfterDocElement"})(vi||(vi={}));var go=class{static{o(this,"XmlCanonicalizer")}constructor(e,t,n=new wd){this.propagatedNamespaces=new wd,this.result=[],this.visibleNamespaces=new wd,this.inclusiveNamespacesPrefixList=[],this.state=vi.BeforeDocElement,this.withComments=e,this.exclusive=t,this.propagatedNamespaces=n}get InclusiveNamespacesPrefixList(){return this.inclusiveNamespacesPrefixList.join(" ")}set InclusiveNamespacesPrefixList(e){this.inclusiveNamespacesPrefixList=e.split(" ")}Canonicalize(e){if(!e)throw new Me(Te.CRYPTOGRAPHIC,"Parameter 1 is not Node");return this.WriteNode(e),this.result.join("")}WriteNode(e){switch(e.nodeType){case jt.Document:case jt.DocumentFragment:this.WriteDocumentNode(e);break;case jt.Element:this.WriteElementNode(e);break;case jt.CDATA:case jt.SignificantWhitespace:case jt.Text:gf(e.parentNode)||this.WriteTextNode(e);break;case jt.Whitespace:this.state===vi.InsideDocElement&&this.WriteTextNode(e);break;case jt.Comment:this.WriteCommentNode(e);break;case jt.ProcessingInstruction:this.WriteProcessingInstructionNode(e);break;case jt.EntityReference:for(let t=0;t<e.childNodes.length;t++)this.WriteNode(e.childNodes[t]);break;case jt.Attribute:throw new Me(Te.CRYPTOGRAPHIC,"Attribute node is impossible here");case jt.EndElement:throw new Me(Te.CRYPTOGRAPHIC,"Attribute node is impossible here");case jt.EndEntity:throw new Me(Te.CRYPTOGRAPHIC,"Attribute node is impossible here");case jt.DocumentType:case jt.Entity:case jt.Notation:case jt.XmlDeclaration:break}}WriteDocumentNode(e){this.state=vi.BeforeDocElement;for(let t=e.firstChild;t!=null;t=t.nextSibling)this.WriteNode(t)}WriteCommentNode(e){this.withComments&&(this.state===vi.AfterDocElement?this.result.push(`
|
|
97
|
+
<!--`):this.result.push("<!--"),this.result.push(this.NormalizeString(e.nodeValue,jt.Comment)),this.state===vi.BeforeDocElement?this.result.push(`-->
|
|
98
|
+
`):this.result.push("-->"))}WriteTextNode(e){this.result.push(this.NormalizeString(e.nodeValue,e.nodeType))}WriteProcessingInstructionNode(e){let t=e.nodeName||e.tagName;t!=="xml"&&(this.state===vi.AfterDocElement?this.result.push(`
|
|
99
|
+
<?`):this.result.push("<?"),this.result.push(t),e.nodeValue&&(this.result.push(" "),this.result.push(this.NormalizeString(e.nodeValue,jt.ProcessingInstruction))),this.state===vi.BeforeDocElement?this.result.push(`?>
|
|
100
|
+
`):this.result.push("?>"))}WriteElementNode(e){let t=this.state;this.state===vi.BeforeDocElement&&(this.state=vi.InsideDocElement),this.result.push("<"),this.result.push(e.nodeName);let n=this.WriteNamespacesAxis(e);this.WriteAttributesAxis(e),this.result.push(">");for(let s=e.firstChild;s!=null;s=s.nextSibling)this.WriteNode(s);for(this.result.push("</"),this.result.push(e.nodeName),this.result.push(">"),t===vi.BeforeDocElement&&(this.state=vi.AfterDocElement);n--;)this.visibleNamespaces.Pop()}WriteNamespacesAxis(e){let t=[],n=0;for(let i=0;i<e.attributes.length;i++){let a=e.attributes[i];if(!tP(a)){if(a.prefix&&!this.IsNamespaceRendered(a.prefix,a.namespaceURI)){let h={prefix:a.prefix,namespace:a.namespaceURI};t.push(h),this.visibleNamespaces.Add(h),n++}continue}if(a.localName==="xmlns"&&!a.prefix&&!a.nodeValue){let h={prefix:a.prefix,namespace:a.nodeValue};t.push(h),this.visibleNamespaces.Add(h),n++}let u=null,c;(c=/xmlns:([\w.-]+)/.exec(a.nodeName))&&(u=c[1]);let f=!0;if(this.exclusive&&!this.IsNamespaceInclusive(e,u)){let h=MK(e,u);if(h>1)f=!1;else if(h===0)continue}if(!this.IsNamespaceRendered(u,a.nodeValue)&&f){let h={prefix:u,namespace:a.nodeValue};t.push(h),this.visibleNamespaces.Add(h),n++}}if(!this.IsNamespaceRendered(e.prefix,e.namespaceURI)&&e.namespaceURI!=="http://www.w3.org/2000/xmlns/"){let i={prefix:e.prefix,namespace:e.namespaceURI};t.push(i),this.visibleNamespaces.Add(i),n++}t.sort(fge);let s=null;return t.forEach(i=>{i.prefix!==s&&(s=i.prefix,this.result.push(" xmlns"),i.prefix&&this.result.push(":"+i.prefix),this.result.push('="'),this.result.push(i.namespace||""),this.result.push('"'))}),n}WriteAttributesAxis(e){let t=[];for(let n=0;n<e.attributes.length;n++){let s=e.attributes[n];tP(s)||t.push(s)}t.sort(hge),t.forEach(n=>{n!=null&&(this.result.push(" "),this.result.push(n.nodeName),this.result.push('="'),this.result.push(this.NormalizeString(n.nodeValue,jt.Attribute)),this.result.push('"'))})}NormalizeString(e,t){let n=[];if(e)for(let s=0;s<e.length;s++){let i=e[s];i==="<"&&(t===jt.Attribute||this.IsTextNode(t))?n.push("<"):i===">"&&this.IsTextNode(t)?n.push(">"):i==="&"&&(t===jt.Attribute||this.IsTextNode(t))?n.push("&"):i==='"'&&t===jt.Attribute?n.push("""):i===" "&&t===jt.Attribute?n.push("	"):i===`
|
|
101
|
+
`&&t===jt.Attribute?n.push("
"):i==="\r"?n.push("
"):n.push(i)}return n.join("")}IsTextNode(e){switch(e){case jt.Text:case jt.CDATA:case jt.SignificantWhitespace:case jt.Whitespace:return!0}return!1}IsNamespaceInclusive(e,t){let n=t||null;return e.prefix===n?!1:this.inclusiveNamespacesPrefixList.indexOf(n||"")!==-1}IsNamespaceRendered(e,t){if(e=e||"",t=t||"",!e&&!t||e==="xml"&&t==="http://www.w3.org/XML/1998/namespace")return!0;let n=this.visibleNamespaces.GetPrefix(e);return n?n.namespace===t:!1}};function fge(r,e){return r==e?0:r?e?r.prefix?e.prefix?r.prefix<e.prefix?-1:r.prefix>e.prefix?1:0:1:-1:1:-1}o(fge,"XmlDsigC14NTransformNamespacesComparer");function hge(r,e){if(!r.namespaceURI&&e.namespaceURI)return-1;if(!e.namespaceURI&&r.namespaceURI)return 1;let t=(r.namespaceURI||"")+r.localName,n=(e.namespaceURI||"")+e.localName;return t===n?0:t<n?-1:1}o(hge,"XmlDsigC14NTransformAttributesComparer");function MK(r,e,t=0){let n=e||null;if(r.prefix===n)return++t;if(r.attributes)for(let s=0;s<r.attributes.length;s++){let i=r.attributes[s];if(!tP(i)&&e&&r.attributes[s].prefix===e)return++t}for(let s=r.firstChild;s;s=s.nextSibling)if(s.nodeType===jt.Element){let a=MK(s,e,t);if(s.nodeType===jt.Element&&a)return++t+a}return t}o(MK,"IsNamespaceUsed");function tP(r){let e=/xmlns:/;return!!(r!==null&&r.nodeType===jt.Attribute&&(r.nodeName==="xmlns"||e.test(r.nodeName)))}o(tP,"IsNamespaceNode");var Z2=class extends Ji{static{o(this,"SignatureMethodOther")}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(n.nodeType!==jt.Element||n.nodeName===me.ElementNames.HMACOutputLength)continue;let s;switch(n.localName){case me.ElementNames.RSAPSSParams:s=Aa;break;default:break}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};Z2=He([Ft({localName:"Other"})],Z2);var vo=class extends Xr{static{o(this,"SignatureMethod")}};He([kr({localName:me.AttributeNames.Algorithm,required:!0,defaultValue:""}),ft("design:type",String)],vo.prototype,"Algorithm",void 0);He([Gt({localName:me.ElementNames.HMACOutputLength,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,converter:Cv}),ft("design:type",Number)],vo.prototype,"HMACOutputLength",void 0);He([Gt({parser:Z2,noRoot:!0,minOccurs:0}),ft("design:type",Z2)],vo.prototype,"Any",void 0);vo=He([Ft({localName:me.ElementNames.SignatureMethod})],vo);var O0=class extends Xr{static{o(this,"CanonicalizationMethod")}};He([kr({localName:me.AttributeNames.Algorithm,required:!0,defaultValue:me.DefaultCanonMethod}),ft("design:type",String)],O0.prototype,"Algorithm",void 0);O0=He([Ft({localName:me.ElementNames.CanonicalizationMethod})],O0);var P0=class extends Xr{static{o(this,"DataObject")}};He([kr({localName:me.AttributeNames.Id,defaultValue:""}),ft("design:type",String)],P0.prototype,"Id",void 0);He([kr({localName:me.AttributeNames.MimeType,defaultValue:""}),ft("design:type",String)],P0.prototype,"MimeType",void 0);He([kr({localName:me.AttributeNames.Encoding,defaultValue:""}),ft("design:type",String)],P0.prototype,"Encoding",void 0);P0=He([Ft({localName:me.ElementNames.Object})],P0);var kx=class extends Ji{static{o(this,"DataObjects")}};kx=He([Ft({localName:"xmldsig_objects",parser:P0})],kx);var ms=class extends Xr{static{o(this,"Transform")}constructor(){super(...arguments),this.innerXml=null}GetOutput(){throw new Me(Te.METHOD_NOT_IMPLEMENTED)}LoadInnerXml(e){if(!e)throw new Me(Te.PARAM_REQUIRED,"node");this.innerXml=e}GetInnerXml(){return this.innerXml}};He([kr({localName:me.AttributeNames.Algorithm,defaultValue:""}),ft("design:type",String)],ms.prototype,"Algorithm",void 0);He([Gt({localName:me.ElementNames.XPath,defaultValue:""}),ft("design:type",String)],ms.prototype,"XPath",void 0);ms=He([Ft({localName:me.ElementNames.Transform})],ms);var Su=class extends ms{static{o(this,"XmlDsigBase64Transform")}constructor(){super(...arguments),this.Algorithm=me.AlgorithmNamespaces.XmlDsigBase64Transform}GetOutput(){if(!this.innerXml)throw new Me(Te.PARAM_REQUIRED,"innerXml");return br.FromString(this.innerXml.textContent||"","base64")}};var yo=class extends ms{static{o(this,"XmlDsigC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",this.xmlCanonicalizer=new go(!1,!1)}GetOutput(){if(!this.innerXml)throw new Me(Te.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}},xo=class extends yo{static{o(this,"XmlDsigC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",this.xmlCanonicalizer=new go(!0,!1)}};var bu=class extends ms{static{o(this,"XmlDsigEnvelopedSignatureTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"}GetOutput(){if(!this.innerXml)throw new Me(Te.PARAM_REQUIRED,"innerXml");let e=this.innerXml.firstChild,t=[];for(;e;)hi(e)&&e.localName===me.ElementNames.Signature&&e.namespaceURI===me.NamespaceURI&&t.push(e),e=e.nextSibling;for(let n of t)n.parentNode?.removeChild(n);return this.innerXml}};var wo=class extends ms{static{o(this,"XmlDsigExcC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#",this.xmlCanonicalizer=new go(!1,!0)}get InclusiveNamespacesPrefixList(){return this.xmlCanonicalizer.InclusiveNamespacesPrefixList}set InclusiveNamespacesPrefixList(e){this.xmlCanonicalizer.InclusiveNamespacesPrefixList=e}LoadXml(e){if(super.LoadXml(e),this.Element&&this.Element.childNodes)for(let t=0;t<this.Element.childNodes.length;t++){let n=this.Element.childNodes[t];if(n&&n.nodeType===1)switch(n.localName){case"InclusiveNamespaces":this.setInclusiveNamespacesElement(n);break}}}GetOutput(){if(!this.innerXml)throw new Me(Te.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}setInclusiveNamespacesElement(e){let t=e.getAttribute("PrefixList");t&&t.length>0&&(this.xmlCanonicalizer.InclusiveNamespacesPrefixList=t)}},So=class extends wo{static{o(this,"XmlDsigExcC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments",this.xmlCanonicalizer=new go(!0,!0)}};function qK(r){return r.parentNode?qK(r.parentNode):r}o(qK,"lookupParentNode");var k0=class extends ms{static{o(this,"XmlDsigXPathTransform")}constructor(){super(...arguments),this.Algorithm=me.AlgorithmNamespaces.XmlDsigXPathTransform}GetOutput(){if(!this.innerXml)throw new Me(Te.PARAM_REQUIRED,"innerXml");this.Filter(qK(this.innerXml),this.XPath)}Filter(e,t){let n=e.childNodes,s=[];for(let i=0;n&&i<n.length;i++){let a=n.item(i);s.push(a)}s.forEach(i=>{this.Evaluate(i,t)?i.parentNode&&i.parentNode.removeChild(i):this.Filter(i,t)})}GetEvaluator(e){return typeof self<"u"?e.ownerDocument==null?e:e.ownerDocument:yd("xpath")}Evaluate(e,t){try{let n=this.GetEvaluator(e),s=this.GetXml();if(!s||!s.firstChild)throw new Error("XML element or firstChild is not defined");let i=s.firstChild,a=`boolean(${t})`,u=typeof self>"u"?yd("xpath"):self;return!n.evaluate(a,e,{lookupNamespaceURI:o(f=>i.lookupNamespaceURI(f),"lookupNamespaceURI")},u.XPathResult.ANY_TYPE,null).booleanValue}catch{return!1}}};He([Gt({localName:me.ElementNames.XPath,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0}),ft("design:type",String)],k0.prototype,"XPath",void 0);var L0=class extends Ji{static{o(this,"Transforms")}OnLoadXml(e){super.OnLoadXml(e),this.items=this.GetIterator().map(t=>{switch(t.Algorithm){case me.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:return Yh(t,bu);case me.AlgorithmNamespaces.XmlDsigC14NTransform:return Yh(t,yo);case me.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:return Yh(t,xo);case me.AlgorithmNamespaces.XmlDsigExcC14NTransform:return Yh(t,wo);case me.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:return Yh(t,So);case me.AlgorithmNamespaces.XmlDsigBase64Transform:return Yh(t,Su);case me.AlgorithmNamespaces.XmlDsigXPathTransform:return Yh(t,k0);default:try{let n=Lx.CreateFromName(t.Algorithm);if(!t.Element)throw new Error("Transform element is not defined");return n.LoadXml(t.Element),n}catch{throw new Me(Te.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM,t.Algorithm)}}})}};L0=He([Ft({localName:me.ElementNames.Transforms,parser:ms})],L0);function Yh(r,e){let t=new e;if(!r.Element)throw new Error("Transform element is not defined");return t.LoadXml(r.Element),t}o(Yh,"ChangeTransform");var bo=class extends Xr{static{o(this,"Reference")}constructor(e){super(),this.DigestMethod=new Yi,e&&(this.Uri=e)}};He([kr({defaultValue:""}),ft("design:type",String)],bo.prototype,"Id",void 0);He([kr({localName:me.AttributeNames.URI}),ft("design:type",String)],bo.prototype,"Uri",void 0);He([kr({localName:me.AttributeNames.Type,defaultValue:""}),ft("design:type",String)],bo.prototype,"Type",void 0);He([Gt({parser:L0}),ft("design:type",L0)],bo.prototype,"Transforms",void 0);He([Gt({required:!0,parser:Yi}),ft("design:type",Yi)],bo.prototype,"DigestMethod",void 0);He([Gt({required:!0,localName:me.ElementNames.DigestValue,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,converter:qi}),ft("design:type",Uint8Array)],bo.prototype,"DigestValue",void 0);bo=He([Ft({localName:me.ElementNames.Reference}),ft("design:paramtypes",[String])],bo);var V0=class extends Ji{static{o(this,"References")}};V0=He([Ft({localName:"References",parser:bo})],V0);var Eu=class extends Xr{static{o(this,"SignedInfo")}};He([kr({localName:me.AttributeNames.Id,defaultValue:""}),ft("design:type",String)],Eu.prototype,"Id",void 0);He([Gt({parser:O0,required:!0}),ft("design:type",O0)],Eu.prototype,"CanonicalizationMethod",void 0);He([Gt({parser:vo,required:!0}),ft("design:type",vo)],Eu.prototype,"SignatureMethod",void 0);He([Gt({parser:V0,minOccurs:1,noRoot:!0}),ft("design:type",V0)],Eu.prototype,"References",void 0);Eu=He([Ft({localName:me.ElementNames.SignedInfo})],Eu);var M0="http://www.w3.org/2001/04/xmldsig-more#",q0="ecdsa",Qh=class extends Xs{static{o(this,"EcdsaPublicKey")}};He([Gt({localName:me.ElementNames.X,namespaceURI:M0,prefix:q0,required:!0,converter:qi}),ft("design:type",Uint8Array)],Qh.prototype,"X",void 0);He([Gt({localName:me.ElementNames.Y,namespaceURI:M0,prefix:q0,required:!0,converter:qi}),ft("design:type",Uint8Array)],Qh.prototype,"Y",void 0);Qh=He([Ft({localName:me.ElementNames.PublicKey,namespaceURI:M0,prefix:q0})],Qh);var U0=class extends Xs{static{o(this,"NamedCurve")}};He([kr({localName:me.AttributeNames.URI,required:!0}),ft("design:type",String)],U0.prototype,"Uri",void 0);U0=He([Ft({localName:me.ElementNames.NamedCurve,namespaceURI:M0,prefix:q0})],U0);var j0=class extends Xs{static{o(this,"DomainParameters")}};He([Gt({parser:U0}),ft("design:type",U0)],j0.prototype,"NamedCurve",void 0);j0=He([Ft({localName:me.ElementNames.DomainParameters,namespaceURI:M0,prefix:q0})],j0);var F0=class extends gi{static{o(this,"EcdsaKeyValue")}constructor(){super(...arguments),this.name=me.ElementNames.ECDSAKeyValue,this.key=null,this.jwk=null,this.keyUsage=null}static canImportCryptoKey(e){return e.algorithm.name.toUpperCase()===xu.toUpperCase()}get NamedCurve(){return KK(this.DomainParameters.NamedCurve.Uri)}async importKey(e){if(!e.algorithm.name||e.algorithm.name.toUpperCase()!=="ECDSA")throw new Me(Te.ALGORITHM_WRONG_NAME,e.algorithm.name);let t=await wn.crypto.subtle.exportKey("jwk",e);return this.key=e,this.jwk=t,this.PublicKey=new Qh,this.PublicKey.X=br.FromString(t.x||"","base64url"),this.PublicKey.Y=br.FromString(t.y||"","base64url"),this.DomainParameters||(this.DomainParameters=new j0),this.DomainParameters.NamedCurve||(this.DomainParameters.NamedCurve=new U0),this.DomainParameters.NamedCurve.Uri=KK(t.crv||""),this.keyUsage=e.usages,this}async exportKey(e){if(this.key)return this.key;let t=br.ToBase64Url(this.PublicKey.X),n=br.ToBase64Url(this.PublicKey.Y),s=pge(this.DomainParameters.NamedCurve.Uri),i={kty:"EC",crv:s,x:t,y:n,ext:!0};this.keyUsage=["verify"];let a=await wn.crypto.subtle.importKey("jwk",i,{name:"ECDSA",namedCurve:s},!0,this.keyUsage);return this.key=a,this.key}};He([Gt({parser:j0}),ft("design:type",j0)],F0.prototype,"DomainParameters",void 0);He([Gt({parser:Qh,required:!0}),ft("design:type",Qh)],F0.prototype,"PublicKey",void 0);F0=He([Ft({localName:me.ElementNames.ECDSAKeyValue,namespaceURI:M0,prefix:q0})],F0);function KK(r){switch(r){case"P-256":return"urn:oid:1.2.840.10045.3.1.7";case"P-384":return"urn:oid:1.3.132.0.34";case"P-521":return"urn:oid:1.3.132.0.35"}throw new Me(Te.CRYPTOGRAPHIC,"Unknown NamedCurve")}o(KK,"GetNamedCurveOid");function pge(r){switch(r){case"urn:oid:1.2.840.10045.3.1.7":return"P-256";case"urn:oid:1.3.132.0.34":return"P-384";case"urn:oid:1.3.132.0.35":return"P-521"}throw new Me(Te.CRYPTOGRAPHIC,"Unknown NamedCurve OID")}o(pge,"GetNamedCurveFromOid");var dge=class extends Map{static{o(this,"KeyInfoClauseRegistry")}},_l=new dge;_l.set(me.ElementNames.RSAKeyValue,D0);_l.set(me.ElementNames.ECDSAKeyValue,F0);var eC=class{static{o(this,"KeyInfoClauseFactory")}static create(e){let t=_l.get(e);if(!t)throw new Me(Te.KEY_INFO_CLAUSE_NOT_SUPPORTED,e);return new t}};var Vx=class extends gi{static{o(this,"KeyValue")}set Value(e){this.element=null,this.value=e}get Value(){return this.value}constructor(e){super(),e&&(this.Value=e)}async importKey(e){for(let[,t]of _l)if(t.canImportCryptoKey(e)){let n=new t;return await n.importKey(e),this.Value=n,this}throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e.algorithm.name)}async exportKey(e){if(!this.Value)throw new Me(Te.NULL_REFERENCE);return this.Value.exportKey(e)}OnGetXml(e){if(!this.Value)throw new Me(Te.CRYPTOGRAPHIC,"KeyValue has empty value");let t=this.Value.GetXml();t&&e.appendChild(t)}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(hi(n))try{let s=n.localName,i=eC.create(s);i.LoadXml(n),this.value=i;return}catch{}}throw new Me(Te.CRYPTOGRAPHIC,"Unsupported KeyValue in use")}};Vx=He([Ft({localName:me.ElementNames.KeyValue}),ft("design:paramtypes",[gi])],Vx);var mge={"2.5.4.3":{short:"CN",long:"CommonName"},"2.5.4.6":{short:"C",long:"Country"},"2.5.4.5":{long:"DeviceSerialNumber"},"0.9.2342.19200300.100.1.25":{short:"DC",long:"DomainComponent"},"1.2.840.113549.1.9.1":{short:"E",long:"EMail"},"2.5.4.42":{short:"G",long:"GivenName"},"2.5.4.43":{short:"I",long:"Initials"},"2.5.4.7":{short:"L",long:"Locality"},"2.5.4.10":{short:"O",long:"Organization"},"2.5.4.11":{short:"OU",long:"OrganizationUnit"},"2.5.4.8":{short:"ST",long:"State"},"2.5.4.9":{short:"Street",long:"StreetAddress"},"2.5.4.4":{short:"SN",long:"SurName"},"2.5.4.12":{short:"T",long:"Title"},"1.2.840.113549.1.9.8":{long:"UnstructuredAddress"},"1.2.840.113549.1.9.2":{long:"UnstructuredName"}},H0=class{static{o(this,"X509Certificate")}constructor(e){if(this.publicKey=null,e){let t=new Uint8Array(e);this.LoadRaw(t),this.raw=t}}get SerialNumber(){return this.simpl.serialNumber.valueBlock.toString()}get Issuer(){return this.NameToString(this.simpl.issuer)}get Subject(){return this.NameToString(this.simpl.subject)}async Thumbprint(e="SHA-1"){return wn.crypto.subtle.digest(e,this.raw)}get PublicKey(){return this.publicKey}GetRaw(){return this.raw}async exportKey(e){if(e){let t={algorithm:e,usages:["verify"]};if(t.algorithm.name.toUpperCase()===xu){let s=this.simpl.subjectPublicKeyInfo.toJSON();if("crv"in s&&s.crv)t.algorithm.namedCurve=s.crv;else throw new Error("Cannot get Curved name from the ECDSA public key")}this.isHashedAlgorithm(t.algorithm)&&typeof t.algorithm.hash=="string"&&(t.algorithm.hash={name:t.algorithm.hash});let n=await this.simpl.getPublicKey({algorithm:t});return this.publicKey=n,n}return this.simpl.subjectPublicKeyInfo.algorithm.algorithmId==="1.2.840.113549.1.1.1"?this.publicKey=await this.simpl.getPublicKey({algorithm:{algorithm:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},usages:["verify"]}}):this.publicKey=await this.simpl.getPublicKey(),this.publicKey}NameToString(e,t=","){let n=[];return e.typesAndValues.forEach(s=>{let i=s.type,a=mge[i.toString()],u=a?a.short:null;n.push(`${u||i}=${s.value.valueBlock.value}`)}),n.join(t+" ")}LoadRaw(e){this.raw=new Uint8Array(e);let t=Jr(this.raw.buffer);this.simpl=new ds({schema:t.result})}isHashedAlgorithm(e){return!!e.hash}};var tC=class extends Xr{static{o(this,"X509IssuerSerial")}};He([Gt({localName:me.ElementNames.X509IssuerName,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0}),ft("design:type",String)],tC.prototype,"X509IssuerName",void 0);He([Gt({localName:me.ElementNames.X509SerialNumber,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0}),ft("design:type",String)],tC.prototype,"X509SerialNumber",void 0);tC=He([Ft({localName:me.ElementNames.X509IssuerSerial})],tC);var Zh;(function(r){r[r.None=0]="None",r[r.EndCertOnly=1]="EndCertOnly",r[r.ExcludeRoot=2]="ExcludeRoot",r[r.WholeChain=3]="WholeChain"})(Zh||(Zh={}));var K0=class extends gi{static{o(this,"KeyInfoX509Data")}constructor(e,t=Zh.None){if(super(),this.x509crl=null,this.SubjectKeyIdList=[],e){if(e instanceof Uint8Array)this.AddCertificate(new H0(e));else if(e instanceof H0)switch(t){case Zh.None:case Zh.EndCertOnly:this.AddCertificate(e);break;case Zh.ExcludeRoot:this.AddCertificatesChainFrom(e,!1);break;case Zh.WholeChain:this.AddCertificatesChainFrom(e,!0);break}}}async importKey(e){throw new Me(Te.METHOD_NOT_SUPPORTED)}async exportKey(e){if(!this.Certificates.length)throw new Me(Te.NULL_REFERENCE);return this.Key=await this.Certificates[0].exportKey(e),this.Key}get Certificates(){return this.X509CertificateList}get CRL(){return this.x509crl}set CRL(e){this.x509crl=e}get IssuerSerials(){return this.IssuerSerialList}get SubjectKeyIds(){return this.SubjectKeyIdList}get SubjectNames(){return this.SubjectNameList}AddCertificate(e){if(!e)throw new Me(Te.PARAM_REQUIRED,"certificate");this.X509CertificateList||(this.X509CertificateList=[]),this.X509CertificateList.push(e)}AddIssuerSerial(e,t){if(e==null)throw new Me(Te.PARAM_REQUIRED,"issuerName");this.IssuerSerialList==null&&(this.IssuerSerialList=[]);let n={issuerName:e,serialNumber:t};this.IssuerSerialList.push(n)}AddSubjectKeyId(e){if(this.SubjectKeyIdList&&(this.SubjectKeyIdList=[]),typeof e=="string"){if(e!=null){let t=br.FromBase64(e);this.SubjectKeyIdList.push(t)}}else this.SubjectKeyIdList.push(e)}AddSubjectName(e){this.SubjectNameList==null&&(this.SubjectNameList=[]),this.SubjectNameList.push(e)}GetXml(){let e=this.CreateDocument(),t=this.CreateElement(e),n=this.GetPrefix();if(this.IssuerSerialList!=null&&this.IssuerSerialList.length>0&&this.IssuerSerialList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509IssuerSerial),a=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509IssuerName);a.textContent=s.issuerName,i.appendChild(a);let u=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509SerialNumber);u.textContent=s.serialNumber,i.appendChild(u),t.appendChild(i)}),this.SubjectKeyIdList!=null&&this.SubjectKeyIdList.length>0&&this.SubjectKeyIdList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509SKI);i.textContent=br.ToBase64(s),t.appendChild(i)}),this.SubjectNameList!=null&&this.SubjectNameList.length>0&&this.SubjectNameList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509SubjectName);i.textContent=s,t.appendChild(i)}),this.X509CertificateList!=null&&this.X509CertificateList.length>0&&this.X509CertificateList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509Certificate);i.textContent=br.ToBase64(s.GetRaw()),t.appendChild(i)}),this.x509crl!=null){let s=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509CRL);s.textContent=br.ToBase64(this.x509crl),t.appendChild(s)}return t}LoadXml(e){super.LoadXml(e),this.IssuerSerialList&&(this.IssuerSerialList=[]),this.SubjectKeyIdList&&(this.SubjectKeyIdList=[]),this.SubjectNameList&&(this.SubjectNameList=[]),this.X509CertificateList&&(this.X509CertificateList=[]),this.x509crl=null;let t=this.GetChildren(me.ElementNames.X509IssuerSerial);t&&t.forEach(s=>{let i=Xr.GetChild(s,me.ElementNames.X509IssuerName,me.NamespaceURI,!0),a=Xr.GetChild(s,me.ElementNames.X509SerialNumber,me.NamespaceURI,!0);i&&i.textContent&&a&&a.textContent&&this.AddIssuerSerial(i.textContent,a.textContent)}),t=this.GetChildren(me.ElementNames.X509SKI),t&&t.forEach(s=>{if(s.textContent){let i=br.FromBase64(s.textContent);this.AddSubjectKeyId(i)}}),t=this.GetChildren(me.ElementNames.X509SubjectName),t?.forEach(s=>{s.textContent&&this.AddSubjectName(s.textContent)}),t=this.GetChildren(me.ElementNames.X509Certificate),t&&t.forEach(s=>{if(s.textContent){let i=br.FromBase64(s.textContent);this.AddCertificate(new H0(i))}});let n=this.GetChild(me.ElementNames.X509CRL,!1);n&&n.textContent&&(this.x509crl=br.FromBase64(n.textContent))}AddCertificatesChainFrom(e,t){}};K0=He([Ft({localName:me.ElementNames.X509Data}),ft("design:paramtypes",[Object,Object])],K0);var Ux=class extends gi{static{o(this,"SPKIData")}async importKey(e){let t=await wn.crypto.subtle.exportKey("spki",e);return this.SPKIexp=new Uint8Array(t),this.Key=e,this}async exportKey(e){if(!this.SPKIexp)throw new Error("SPKI data is not defined");let t=await wn.crypto.subtle.importKey("spki",this.SPKIexp,e,!0,["verify"]);return this.Key=t,t}};He([Gt({localName:me.ElementNames.SPKIexp,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0,converter:qi}),ft("design:type",Object)],Ux.prototype,"SPKIexp",void 0);Ux=He([Ft({localName:me.ElementNames.SPKIData})],Ux);var ep=class extends Ji{static{o(this,"KeyInfo")}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(n.nodeType!==jt.Element)continue;let s=null;switch(n.localName){case me.ElementNames.KeyValue:s=Vx;break;case me.ElementNames.X509Data:s=K0;break;case me.ElementNames.SPKIData:s=Ux;break;case me.ElementNames.KeyName:case me.ElementNames.RetrievalMethod:case me.ElementNames.PGPData:case me.ElementNames.MgmtData:}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};He([kr({localName:me.AttributeNames.Id,defaultValue:""}),ft("design:type",String)],ep.prototype,"Id",void 0);ep=He([Ft({localName:me.ElementNames.KeyInfo})],ep);var Bl=class extends Xr{static{o(this,"Signature")}};He([kr({localName:me.AttributeNames.Id,defaultValue:""}),ft("design:type",String)],Bl.prototype,"Id",void 0);He([Gt({parser:Eu,required:!0}),ft("design:type",Eu)],Bl.prototype,"SignedInfo",void 0);He([Gt({localName:me.ElementNames.SignatureValue,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0,converter:qi,defaultValue:null}),ft("design:type",Object)],Bl.prototype,"SignatureValue",void 0);He([Gt({parser:ep}),ft("design:type",ep)],Bl.prototype,"KeyInfo",void 0);He([Gt({parser:kx,noRoot:!0}),ft("design:type",kx)],Bl.prototype,"ObjectList",void 0);Bl=He([Ft({localName:me.ElementNames.Signature})],Bl);var vge=class extends Map{static{o(this,"AlgorithmRegistry")}},gr=new vge;gr.set(G2,{type:"signature",algorithm:T0});gr.set(W2,{type:"signature",algorithm:I0});gr.set(z2,{type:"signature",algorithm:_0});gr.set(J2,{type:"signature",algorithm:B0});gr.set(G2,{type:"signature",algorithm:T0});gr.set(W2,{type:"signature",algorithm:I0});gr.set(z2,{type:"signature",algorithm:_0});gr.set(J2,{type:"signature",algorithm:B0});gr.set(eP,{type:"signature",algorithm:Q2});gr.set(M2,{type:"signature",algorithm:b0});gr.set(q2,{type:"signature",algorithm:E0});gr.set(H2,{type:"signature",algorithm:A0});gr.set(K2,{type:"signature",algorithm:C0});gr.set(M2.toUpperCase(),{type:"signature",algorithm:b0});gr.set(q2.toUpperCase(),{type:"signature",algorithm:E0});gr.set(H2.toUpperCase(),{type:"signature",algorithm:A0});gr.set(K2.toUpperCase(),{type:"signature",algorithm:C0});gr.set(WO,{type:"signature",algorithm:Dx});gr.set(zO,{type:"signature",algorithm:Rx});gr.set(JO,{type:"signature",algorithm:Ox});gr.set(YO,{type:"signature",algorithm:Px});gr.set(y0,{type:"hash",algorithm:U2});gr.set(x0,{type:"hash",algorithm:Bx});gr.set(w0,{type:"hash",algorithm:j2});gr.set(S0,{type:"hash",algorithm:F2});var tp=class{static{o(this,"AlgorithmFactory")}static createHashAlgorithmFromNamespace(e){for(let[t,{type:n,algorithm:s}]of gr)if(n==="hash"&&t===e)return new s;throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e)}static createSignatureAlgorithmFromMethod(e){for(let[t,{type:n,algorithm:s}]of gr)if(n==="signature"&&e.Algorithm===t){let i=new s;return i.fromMethod&&i.fromMethod(e),i}throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e.Algorithm)}static createHashAlgorithmFromAlgorithm(e){for(let[,{type:t,algorithm:n}]of gr)if(t==="hash"){let s=new n;if(s.algorithm.name.toUpperCase()===e.name.toUpperCase())return s}throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e.name)}static createSignatureAlgorithmFromAlgorithm(e){for(let[,{type:t,algorithm:n}]of gr)if(t==="signature"){let s=n.fromAlgorithm(e);if(s)return s}throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e.name)}};var yge=class extends Map{static{o(this,"TransformRegistry")}},Au=new yge;Au.set(me.AlgorithmNamespaces.XmlDsigBase64Transform,Su);Au.set(me.AlgorithmNamespaces.XmlDsigC14NTransform,yo);Au.set(me.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform,xo);Au.set(me.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform,bu);Au.set(me.AlgorithmNamespaces.XmlDsigExcC14NTransform,wo);Au.set(me.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform,So);var Lx=class{static{o(this,"CryptoConfig")}static CreateFromName(e){if(!e)throw new Me(Te.PARAM_REQUIRED,"name");let t=Au.get(e);if(t)return new t;let n;switch(e){case me.AlgorithmNamespaces.XmlDsigBase64Transform:n=new Su;break;case me.AlgorithmNamespaces.XmlDsigC14NTransform:n=new yo;break;case me.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:n=new xo;break;case me.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:n=new bu;break;case me.AlgorithmNamespaces.XmlDsigXPathTransform:throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e);case me.AlgorithmNamespaces.XmlDsigXsltTransform:throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e);case me.AlgorithmNamespaces.XmlDsigExcC14NTransform:n=new wo;break;case me.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:n=new So;break;case me.AlgorithmNamespaces.XmlDecryptionTransform:throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e);default:throw new Me(Te.ALGORITHM_NOT_SUPPORTED,e)}return n}static CreateSignatureAlgorithm(e){return tp.createSignatureAlgorithmFromMethod(e)}static CreateHashAlgorithm(e){return tp.createHashAlgorithmFromNamespace(e)}static GetHashAlgorithm(e){let t=typeof e=="string"?{name:e}:e;return tp.createHashAlgorithmFromAlgorithm(t)}static GetSignatureAlgorithm(e){let t=typeof e=="string"?{name:e}:e;return"hash"in t&&typeof t.hash=="string"&&(t.hash={name:t.hash}),tp.createSignatureAlgorithmFromAlgorithm(t)}static CreateSignatureMethod(e){let t=new vo;return t.Algorithm=e.namespaceURI,e.toMethod&&e.toMethod(t),t}static RegisterSignatureAlgorithm(e,t){gr.set(e,{type:"signature",algorithm:t})}static RegisterHashAlgorithm(e,t){gr.set(e,{type:"hash",algorithm:t})}static RegisterKeyInfoClause(e,t){_l.set(e,t)}static RegisterTransform(e,t){Au.set(e,t)}};var rC=Wr(HB(),1);var $K={xmldec:{version:"1.0",encoding:"UTF-8",standalone:void 0}};var XK={explicitArray:!1,explicitRoot:!1,preserveChildrenOrder:!0};var wge=o(r=>!!r&&typeof r=="object"&&"message"in r,"hasMessageInRecord"),rP=o(r=>typeof r=="string"?Da(new Os(r)):r instanceof Error?Da(new Os(r.message,{cause:r.cause})):wge(r)?Da(new Os(r.message)):Da(new Os("unexpected error")),"leftFromError");var nP=class{static{o(this,"Xml2JsToolkit")}xml2js;constructor(e=Sge){this.xml2js=e,c7({XMLSerializer:rC.default.XMLSerializer,DOMParser:rC.default.DOMParser,DOMImplementation:rC.default.DOMImplementation})}async validate(e,t,n){try{return await L9.validate(e,t,GK.default.readFileSync(WK.default.resolve(t,n),"utf8")),Hl()}catch(s){return rP(s)}}parse(e,t){return new Promise((n,s)=>new this.xml2js.Parser({...XK,...t}).parseString(e,(i,a)=>i?s(i):n(a)))}build(e,t){return Promise.resolve(new this.xml2js.Builder({...$K,...t}).buildObject(e))}digest(e,t,n=cg){return this.hash(this.canonicalize(e,n),t)}canonicalize(e,t=cg){let n=Mi(this.clear(e));return new go(t.includeComments,t.exclusive).Canonicalize(n)}getNode(e,t){let s=Mi(e).documentElement.getElementsByTagName(t).item(0);return s?this.clear(ao(s)):null}getFirstNode(e){let n=Mi(e).documentElement.firstChild;return n?this.clear(ao(n)):null}getAttribute(e,t){return Mi(e).documentElement.getAttribute(t)}appendNode(e,t){let n=Mi(e),{documentElement:s}=Mi(t);return n.documentElement.appendChild(s),this.clear(ao(n))}hash(e,t){return zK.default.createHash(t).update(e,"utf8").digest().toString("base64")}clear(e){return['xmlns:default="http://www.w3.org/2000/09/xmldsig#"',' standalone="no"',"default:",":default",`
|
|
102
|
+
`,"\r"," "].reduce((n,s)=>n.replace(s,""),e.replace(/(>)\s*(<)/gm,"$1$2"))}};0&&(module.exports={ASN1,CanonicalizationMethod,Choice,Decimal,DigestAlgorithm,EntitySigner,Environment,IsDecimal,Left,MemoryCacheAdapter,NFeTsError,NativeCertificateRepository,NullCacheAdapter,Right,SignatureAlgorithm,SignatureMethod,SignatureNamespace,Signer,SkipAllValidations,SkipValidation,SkipValidationMetadata,SoapRemoteTransmissionRepository,StateAcronyms,StateCodeAcValidator,StateCodeAlValidator,StateCodeAmValidator,StateCodeApValidator,StateCodeBaValidator,StateCodeCeValidator,StateCodeDfValidator,StateCodeEsValidator,StateCodeGoValidator,StateCodeMaValidator,StateCodeMgValidator,StateCodeMsValidator,StateCodeMtValidator,StateCodePaValidator,StateCodePbValidator,StateCodePeValidator,StateCodePiValidator,StateCodePrValidator,StateCodeRjValidator,StateCodeRnValidator,StateCodeRoValidator,StateCodeRrValidator,StateCodeRsValidator,StateCodeScValidator,StateCodeSeValidator,StateCodeSpValidator,StateCodeToValidator,StateCodes,TransformDateString,TransformDecimal,ValidateErrorsMetadata,Validates,ValidationError,Xml2JsToolkit,XmlSigner,left,leftFromError,mapConstraintsToErrors,plainToInstance,right,unreachable});
|
|
103
|
+
/*! Bundled license information:
|
|
104
|
+
|
|
105
|
+
lodash/lodash.js:
|
|
106
|
+
(**
|
|
107
|
+
* @license
|
|
108
|
+
* Lodash <https://lodash.com/>
|
|
109
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
110
|
+
* Released under MIT license <https://lodash.com/license>
|
|
111
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
112
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
113
|
+
*)
|
|
114
|
+
|
|
115
|
+
mime-db/index.js:
|
|
116
|
+
(*!
|
|
117
|
+
* mime-db
|
|
118
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
119
|
+
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
120
|
+
* MIT Licensed
|
|
121
|
+
*)
|
|
122
|
+
|
|
123
|
+
mime-types/index.js:
|
|
124
|
+
(*!
|
|
125
|
+
* mime-types
|
|
126
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
127
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
128
|
+
* MIT Licensed
|
|
129
|
+
*)
|
|
130
|
+
|
|
131
|
+
axios/dist/node/axios.cjs:
|
|
132
|
+
(*! Axios v1.12.2 Copyright (c) 2025 Matt Zabriskie and contributors *)
|
|
133
|
+
|
|
134
|
+
js-md4/src/md4.js:
|
|
135
|
+
(**
|
|
136
|
+
* [js-md4]{@link https://github.com/emn178/js-md4}
|
|
137
|
+
*
|
|
138
|
+
* @namespace md4
|
|
139
|
+
* @version 0.3.2
|
|
140
|
+
* @author Yi-Cyuan Chen [emn178@gmail.com]
|
|
141
|
+
* @copyright Yi-Cyuan Chen 2015-2027
|
|
142
|
+
* @license MIT
|
|
143
|
+
*)
|
|
144
|
+
|
|
145
|
+
@noble/hashes/utils.js:
|
|
146
|
+
@noble/hashes/esm/utils.js:
|
|
147
|
+
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
148
|
+
|
|
149
|
+
sax/lib/sax.js:
|
|
150
|
+
(*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
|
|
151
|
+
|
|
152
|
+
decimal.js/decimal.mjs:
|
|
153
|
+
(*!
|
|
154
|
+
* decimal.js v10.6.0
|
|
155
|
+
* An arbitrary-precision Decimal type for JavaScript.
|
|
156
|
+
* https://github.com/MikeMcl/decimal.js
|
|
157
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
158
|
+
* MIT Licence
|
|
159
|
+
*)
|
|
160
|
+
|
|
161
|
+
pvtsutils/build/index.es.js:
|
|
162
|
+
(*!
|
|
163
|
+
* MIT License
|
|
164
|
+
*
|
|
165
|
+
* Copyright (c) 2017-2024 Peculiar Ventures, LLC
|
|
166
|
+
*
|
|
167
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
168
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
169
|
+
* in the Software without restriction, including without limitation the rights
|
|
170
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
171
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
172
|
+
* furnished to do so, subject to the following conditions:
|
|
173
|
+
*
|
|
174
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
175
|
+
* copies or substantial portions of the Software.
|
|
176
|
+
*
|
|
177
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
178
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
179
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
180
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
181
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
182
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
183
|
+
* SOFTWARE.
|
|
184
|
+
*
|
|
185
|
+
*)
|
|
186
|
+
|
|
187
|
+
pvutils/build/utils.es.js:
|
|
188
|
+
(*!
|
|
189
|
+
Copyright (c) Peculiar Ventures, LLC
|
|
190
|
+
*)
|
|
191
|
+
|
|
192
|
+
asn1js/build/index.es.js:
|
|
193
|
+
(*!
|
|
194
|
+
* Copyright (c) 2014, GMO GlobalSign
|
|
195
|
+
* Copyright (c) 2015-2022, Peculiar Ventures
|
|
196
|
+
* All rights reserved.
|
|
197
|
+
*
|
|
198
|
+
* Author 2014-2019, Yury Strozhevsky
|
|
199
|
+
*
|
|
200
|
+
* Redistribution and use in source and binary forms, with or without modification,
|
|
201
|
+
* are permitted provided that the following conditions are met:
|
|
202
|
+
*
|
|
203
|
+
* * Redistributions of source code must retain the above copyright notice, this
|
|
204
|
+
* list of conditions and the following disclaimer.
|
|
205
|
+
*
|
|
206
|
+
* * Redistributions in binary form must reproduce the above copyright notice, this
|
|
207
|
+
* list of conditions and the following disclaimer in the documentation and/or
|
|
208
|
+
* other materials provided with the distribution.
|
|
209
|
+
*
|
|
210
|
+
* * Neither the name of the copyright holder nor the names of its
|
|
211
|
+
* contributors may be used to endorse or promote products derived from
|
|
212
|
+
* this software without specific prior written permission.
|
|
213
|
+
*
|
|
214
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
215
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
216
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
217
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
218
|
+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
219
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
220
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
221
|
+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
222
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
223
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
224
|
+
*
|
|
225
|
+
*)
|
|
226
|
+
|
|
227
|
+
pkijs/build/index.es.js:
|
|
228
|
+
(*!
|
|
229
|
+
* Copyright (c) 2014, GlobalSign
|
|
230
|
+
* Copyright (c) 2015-2019, Peculiar Ventures
|
|
231
|
+
* All rights reserved.
|
|
232
|
+
*
|
|
233
|
+
* Author 2014-2019, Yury Strozhevsky
|
|
234
|
+
*
|
|
235
|
+
* Redistribution and use in source and binary forms, with or without modification,
|
|
236
|
+
* are permitted provided that the following conditions are met:
|
|
237
|
+
*
|
|
238
|
+
* * Redistributions of source code must retain the above copyright notice, this
|
|
239
|
+
* list of conditions and the following disclaimer.
|
|
240
|
+
*
|
|
241
|
+
* * Redistributions in binary form must reproduce the above copyright notice, this
|
|
242
|
+
* list of conditions and the following disclaimer in the documentation and/or
|
|
243
|
+
* other materials provided with the distribution.
|
|
244
|
+
*
|
|
245
|
+
* * Neither the name of the {organization} nor the names of its
|
|
246
|
+
* contributors may be used to endorse or promote products derived from
|
|
247
|
+
* this software without specific prior written permission.
|
|
248
|
+
*
|
|
249
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
250
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
251
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
252
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
253
|
+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
254
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
255
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
256
|
+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
257
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
258
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
259
|
+
*
|
|
260
|
+
*)
|
|
261
|
+
*/
|