@peculiar/certificates-viewer 4.3.1 → 4.4.0

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.
Files changed (501) hide show
  1. package/components/actions.js +1 -0
  2. package/components/actions.js.map +1 -1
  3. package/components/arrow_top.js +1 -0
  4. package/components/arrow_top.js.map +1 -1
  5. package/components/attribute-certificate-viewer.js +23 -22
  6. package/components/attribute-certificate-viewer.js.map +1 -1
  7. package/components/attribute.js +4 -3
  8. package/components/attribute.js.map +1 -1
  9. package/components/button-menu.js +4 -4
  10. package/components/button-menu.js.map +1 -1
  11. package/components/button.js +1 -0
  12. package/components/button.js.map +1 -1
  13. package/components/certificate-chain-viewer.js +64 -0
  14. package/components/certificate-chain-viewer.js.map +1 -0
  15. package/components/certificate-viewer.js +21 -21
  16. package/components/certificate-viewer.js.map +1 -1
  17. package/components/circular-progress.js +12 -6
  18. package/components/circular-progress.js.map +1 -1
  19. package/components/crl-viewer.js +22 -20
  20. package/components/crl-viewer.js.map +1 -1
  21. package/components/cross.js +1 -0
  22. package/components/cross.js.map +1 -1
  23. package/components/csr-viewer.js +13 -10
  24. package/components/csr-viewer.js.map +1 -1
  25. package/components/download.js +1096 -1598
  26. package/components/download.js.map +1 -1
  27. package/components/highlight-words.js +3 -4
  28. package/components/highlight-words.js.map +1 -1
  29. package/components/index.js +1 -0
  30. package/components/index2.js +4 -3
  31. package/components/index2.js.map +1 -1
  32. package/components/issuer_name.js +2 -1
  33. package/components/issuer_name.js.map +1 -1
  34. package/components/miscellaneous.js +21 -20
  35. package/components/miscellaneous.js.map +1 -1
  36. package/components/peculiar-attribute-certificate-viewer.js +1 -0
  37. package/components/peculiar-button-menu.js +1 -0
  38. package/components/peculiar-certificate-chain-viewer.d.ts +11 -0
  39. package/components/peculiar-certificate-chain-viewer.js +12 -0
  40. package/components/peculiar-certificate-chain-viewer.js.map +1 -0
  41. package/components/peculiar-certificate-decoder.js +106 -23
  42. package/components/peculiar-certificate-decoder.js.map +1 -1
  43. package/components/peculiar-certificate-viewer.js +1 -0
  44. package/components/peculiar-certificates-viewer.js +35 -14
  45. package/components/peculiar-certificates-viewer.js.map +1 -1
  46. package/components/peculiar-circular-progress.js +1 -0
  47. package/components/peculiar-crl-viewer.js +1 -0
  48. package/components/peculiar-csr-viewer.js +1 -0
  49. package/components/peculiar-highlight-words.js +1 -0
  50. package/components/peculiar-text-hider.js +3 -3
  51. package/components/peculiar-text-hider.js.map +1 -1
  52. package/components/pkcs10_certificate_request.js +8 -7
  53. package/components/pkcs10_certificate_request.js.map +1 -1
  54. package/components/read_file.js +1 -0
  55. package/components/read_file.js.map +1 -1
  56. package/components/subject_name.js +4 -3
  57. package/components/subject_name.js.map +1 -1
  58. package/dist/cjs/{actions-789906f5.js → actions-Dl4HXXlI.js} +3 -2
  59. package/dist/cjs/actions-Dl4HXXlI.js.map +1 -0
  60. package/dist/cjs/{app-globals-c20ffa41.js → app-globals-BOZYdIuK.js} +2 -1
  61. package/dist/cjs/app-globals-BOZYdIuK.js.map +1 -0
  62. package/dist/cjs/{arrow_top-76e4261e.js → arrow_top-DBMPHVlB.js} +3 -2
  63. package/dist/cjs/arrow_top-DBMPHVlB.js.map +1 -0
  64. package/dist/cjs/{button-87086210.js → button-C5jDF-CZ.js} +3 -2
  65. package/dist/cjs/button-C5jDF-CZ.js.map +1 -0
  66. package/dist/cjs/{certification_request-ad267278.js → certification_request-Bipg1Az7.js} +1119 -1620
  67. package/dist/cjs/certification_request-Bipg1Az7.js.map +1 -0
  68. package/dist/cjs/{cross-bd099933.js → cross-pi7K0cHC.js} +3 -2
  69. package/dist/cjs/cross-pi7K0cHC.js.map +1 -0
  70. package/dist/cjs/{download-820d66ba.js → download-D9skkVoT.js} +3 -2
  71. package/dist/cjs/download-D9skkVoT.js.map +1 -0
  72. package/dist/cjs/index-BO3rFndV.js +2301 -0
  73. package/dist/cjs/index-BO3rFndV.js.map +1 -0
  74. package/dist/cjs/index.cjs.js +11 -12
  75. package/dist/cjs/index.cjs.js.map +1 -1
  76. package/dist/cjs/{link-a3d3799d.js → link-CwLq-Nge.js} +4 -3
  77. package/dist/cjs/link-CwLq-Nge.js.map +1 -0
  78. package/dist/cjs/loader.cjs.js +4 -5
  79. package/dist/cjs/loader.cjs.js.map +1 -1
  80. package/dist/cjs/{miscellaneous-67439e59.js → miscellaneous-C0sOAo-1.js} +25 -24
  81. package/dist/cjs/miscellaneous-C0sOAo-1.js.map +1 -0
  82. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +1 -0
  83. package/dist/cjs/{peculiar-attribute-certificate-viewer_3.cjs.entry.js → peculiar-attribute-certificate-viewer_4.cjs.entry.js} +75 -45
  84. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +1 -0
  85. package/dist/cjs/peculiar-button-menu.peculiar-circular-progress.peculiar-highlight-words.entry.cjs.js.map +1 -0
  86. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +20 -19
  87. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -1
  88. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +104 -29
  89. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  90. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -0
  91. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +19 -21
  92. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  93. package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -0
  94. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +43 -24
  95. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  96. package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -0
  97. package/dist/cjs/peculiar-text-hider.cjs.entry.js +6 -8
  98. package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -1
  99. package/dist/cjs/peculiar-text-hider.entry.cjs.js.map +1 -0
  100. package/dist/cjs/peculiar.cjs.js +14 -13
  101. package/dist/cjs/peculiar.cjs.js.map +1 -1
  102. package/dist/cjs/{pkcs10_certificate_request-64898c88.js → pkcs10_certificate_request-BDz0P_px.js} +11 -10
  103. package/dist/cjs/pkcs10_certificate_request-BDz0P_px.js.map +1 -0
  104. package/dist/cjs/{read_file-2e22a97e.js → read_file-DWtcn3zU.js} +2 -1
  105. package/dist/cjs/read_file-DWtcn3zU.js.map +1 -0
  106. package/dist/cjs/{x509_certificate-4b0894c2.js → x509_certificate-DRvXOszL.js} +10 -9
  107. package/dist/cjs/x509_certificate-DRvXOszL.js.map +1 -0
  108. package/dist/cjs/{x509_crl-fc8d41a1.js → x509_crl-DVGVym_S.js} +17 -16
  109. package/dist/cjs/x509_crl-DVGVym_S.js.map +1 -0
  110. package/dist/collection/collection-manifest.json +3 -2
  111. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +24 -9
  112. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -1
  113. package/dist/collection/components/button-menu/button-menu.js +4 -2
  114. package/dist/collection/components/button-menu/button-menu.js.map +1 -1
  115. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.css +1019 -0
  116. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js +99 -0
  117. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js.map +1 -0
  118. package/dist/collection/components/certificate-decoder/certificate-decoder.css +1 -4
  119. package/dist/collection/components/certificate-decoder/certificate-decoder.js +39 -20
  120. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  121. package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -1
  122. package/dist/collection/components/certificate-viewer/certificate-viewer.js +26 -10
  123. package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -1
  124. package/dist/collection/components/certificates-viewer/certificates-viewer.js +40 -11
  125. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -1
  126. package/dist/collection/components/circular-progress/circular-progress.js +14 -4
  127. package/dist/collection/components/circular-progress/circular-progress.js.map +1 -1
  128. package/dist/collection/components/crl-viewer/crl-viewer.js +22 -8
  129. package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
  130. package/dist/collection/components/csr-viewer/csr-viewer.js +20 -7
  131. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  132. package/dist/collection/components/highlight-words/highlight-words.js +3 -2
  133. package/dist/collection/components/highlight-words/highlight-words.js.map +1 -1
  134. package/dist/collection/components/text-hider/text-hider.js +1 -1
  135. package/dist/collection/components/text-hider/text-hider.js.map +1 -1
  136. package/dist/collection/constants/oids.js +3 -0
  137. package/dist/collection/constants/oids.js.map +1 -1
  138. package/dist/collection/crypto/index.js +1 -0
  139. package/dist/collection/crypto/index.js.map +1 -1
  140. package/dist/collection/crypto/pem_converter.js +169 -0
  141. package/dist/collection/crypto/pem_converter.js.map +1 -0
  142. package/dist/collection/crypto/pkcs10_certificate_request.js +6 -5
  143. package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -1
  144. package/dist/collection/crypto/utils.js +18 -21
  145. package/dist/collection/crypto/utils.js.map +1 -1
  146. package/dist/collection/crypto/x509_attribute_certificate.js +6 -5
  147. package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
  148. package/dist/collection/crypto/x509_certificate.js +6 -5
  149. package/dist/collection/crypto/x509_certificate.js.map +1 -1
  150. package/dist/collection/crypto/x509_certificates.js +69 -0
  151. package/dist/collection/crypto/x509_certificates.js.map +1 -0
  152. package/dist/collection/crypto/x509_crl.js +6 -5
  153. package/dist/collection/crypto/x509_crl.js.map +1 -1
  154. package/dist/collection/utils/index.js +0 -2
  155. package/dist/collection/utils/index.js.map +1 -1
  156. package/dist/collection/www-copy/index.js +123 -121
  157. package/dist/esm/{actions-aebcbc9d.js → actions-DzoPRObK.js} +3 -2
  158. package/dist/esm/actions-DzoPRObK.js.map +1 -0
  159. package/dist/esm/{app-globals-5e9b67e0.js → app-globals-zVR349KA.js} +2 -1
  160. package/dist/esm/app-globals-zVR349KA.js.map +1 -0
  161. package/dist/esm/{arrow_top-aee1ee02.js → arrow_top-CF9pv-tQ.js} +3 -2
  162. package/dist/esm/arrow_top-CF9pv-tQ.js.map +1 -0
  163. package/dist/esm/{button-a2fabf9a.js → button-Djn8UI82.js} +3 -2
  164. package/dist/esm/button-Djn8UI82.js.map +1 -0
  165. package/dist/esm/{certification_request-a4699dcf.js → certification_request-BTbyumBe.js} +1097 -1599
  166. package/dist/esm/certification_request-BTbyumBe.js.map +1 -0
  167. package/dist/esm/{cross-1377606f.js → cross-DdCuR1F2.js} +3 -2
  168. package/dist/esm/cross-DdCuR1F2.js.map +1 -0
  169. package/dist/esm/{download-14dc1047.js → download-Cqfc-Sxf.js} +3 -2
  170. package/dist/esm/download-Cqfc-Sxf.js.map +1 -0
  171. package/dist/esm/index-DDDrq3In.js +2292 -0
  172. package/dist/esm/index-DDDrq3In.js.map +1 -0
  173. package/dist/esm/index.js +11 -10
  174. package/dist/esm/index.js.map +1 -1
  175. package/dist/esm/{link-7e4e9060.js → link-BfDk078v.js} +4 -3
  176. package/dist/esm/link-BfDk078v.js.map +1 -0
  177. package/dist/esm/loader.js +5 -4
  178. package/dist/esm/loader.js.map +1 -1
  179. package/dist/esm/{miscellaneous-ba1fd2bd.js → miscellaneous-CGtCg3Q9.js} +27 -26
  180. package/dist/esm/miscellaneous-CGtCg3Q9.js.map +1 -0
  181. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -0
  182. package/dist/esm/{peculiar-attribute-certificate-viewer_3.entry.js → peculiar-attribute-certificate-viewer_4.entry.js} +76 -45
  183. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -0
  184. package/dist/esm/peculiar-button-menu.peculiar-circular-progress.peculiar-highlight-words.entry.js.map +1 -0
  185. package/dist/esm/peculiar-button-menu_3.entry.js +20 -17
  186. package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -1
  187. package/dist/esm/peculiar-certificate-decoder.entry.js +105 -28
  188. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  189. package/dist/esm/peculiar-certificate-viewer.entry.js +19 -19
  190. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  191. package/dist/esm/peculiar-certificates-viewer.entry.js +43 -22
  192. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  193. package/dist/esm/peculiar-text-hider.entry.js +6 -6
  194. package/dist/esm/peculiar-text-hider.entry.js.map +1 -1
  195. package/dist/esm/peculiar.js +14 -12
  196. package/dist/esm/peculiar.js.map +1 -1
  197. package/dist/esm/{pkcs10_certificate_request-785a4794.js → pkcs10_certificate_request-CrA_WcgY.js} +11 -10
  198. package/dist/esm/pkcs10_certificate_request-CrA_WcgY.js.map +1 -0
  199. package/dist/esm/{read_file-bb0b1450.js → read_file-F2F0McJX.js} +2 -1
  200. package/dist/esm/read_file-F2F0McJX.js.map +1 -0
  201. package/dist/esm/{x509_certificate-05a23c0e.js → x509_certificate-DX7sKoAD.js} +10 -9
  202. package/dist/esm/x509_certificate-DX7sKoAD.js.map +1 -0
  203. package/dist/esm/{x509_crl-26081461.js → x509_crl-DRjoh8Yp.js} +17 -16
  204. package/dist/esm/x509_crl-DRjoh8Yp.js.map +1 -0
  205. package/dist/esm-es5/{actions-aebcbc9d.js → actions-DzoPRObK.js} +2 -2
  206. package/dist/esm-es5/actions-DzoPRObK.js.map +1 -0
  207. package/dist/esm-es5/{app-globals-5e9b67e0.js → app-globals-zVR349KA.js} +1 -1
  208. package/dist/esm-es5/app-globals-zVR349KA.js.map +1 -0
  209. package/dist/esm-es5/{arrow_top-aee1ee02.js → arrow_top-CF9pv-tQ.js} +2 -2
  210. package/dist/esm-es5/arrow_top-CF9pv-tQ.js.map +1 -0
  211. package/dist/esm-es5/{button-a2fabf9a.js → button-Djn8UI82.js} +2 -2
  212. package/dist/esm-es5/button-Djn8UI82.js.map +1 -0
  213. package/dist/esm-es5/certification_request-BTbyumBe.js +142 -0
  214. package/dist/esm-es5/certification_request-BTbyumBe.js.map +1 -0
  215. package/dist/esm-es5/{cross-1377606f.js → cross-DdCuR1F2.js} +2 -2
  216. package/dist/esm-es5/cross-DdCuR1F2.js.map +1 -0
  217. package/dist/esm-es5/{download-14dc1047.js → download-Cqfc-Sxf.js} +2 -2
  218. package/dist/esm-es5/download-Cqfc-Sxf.js.map +1 -0
  219. package/dist/esm-es5/index-DDDrq3In.js +6 -0
  220. package/dist/esm-es5/index-DDDrq3In.js.map +1 -0
  221. package/dist/esm-es5/index.js +1 -1
  222. package/dist/esm-es5/index.js.map +1 -1
  223. package/dist/esm-es5/link-BfDk078v.js +12 -0
  224. package/dist/esm-es5/link-BfDk078v.js.map +1 -0
  225. package/dist/esm-es5/loader.js +2 -2
  226. package/dist/esm-es5/loader.js.map +1 -1
  227. package/dist/esm-es5/{miscellaneous-ba1fd2bd.js → miscellaneous-CGtCg3Q9.js} +15 -15
  228. package/dist/esm-es5/miscellaneous-CGtCg3Q9.js.map +1 -0
  229. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -0
  230. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js +110 -0
  231. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -0
  232. package/dist/esm-es5/peculiar-button-menu.peculiar-circular-progress.peculiar-highlight-words.entry.js.map +1 -0
  233. package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
  234. package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -1
  235. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +2 -2
  236. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  237. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +2 -2
  238. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  239. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +2 -2
  240. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  241. package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
  242. package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -1
  243. package/dist/esm-es5/peculiar.js +1 -1
  244. package/dist/esm-es5/peculiar.js.map +1 -1
  245. package/dist/esm-es5/pkcs10_certificate_request-CrA_WcgY.js +19 -0
  246. package/dist/esm-es5/pkcs10_certificate_request-CrA_WcgY.js.map +1 -0
  247. package/dist/esm-es5/{read_file-bb0b1450.js → read_file-F2F0McJX.js} +1 -1
  248. package/dist/esm-es5/read_file-F2F0McJX.js.map +1 -0
  249. package/dist/esm-es5/x509_certificate-DX7sKoAD.js +12 -0
  250. package/dist/esm-es5/x509_certificate-DX7sKoAD.js.map +1 -0
  251. package/dist/esm-es5/x509_crl-DRjoh8Yp.js +19 -0
  252. package/dist/esm-es5/x509_crl-DRjoh8Yp.js.map +1 -0
  253. package/dist/peculiar/index.esm.js +1 -1
  254. package/dist/peculiar/index.esm.js.map +1 -1
  255. package/dist/peculiar/loader.esm.js.map +1 -0
  256. package/dist/peculiar/p-092074e8.system.entry.js +5 -0
  257. package/dist/peculiar/p-092074e8.system.entry.js.map +1 -0
  258. package/dist/peculiar/p-12d2e080.entry.js +5 -0
  259. package/dist/peculiar/p-12d2e080.entry.js.map +1 -0
  260. package/dist/peculiar/p-1af57833.system.entry.js +5 -0
  261. package/dist/peculiar/p-1af57833.system.entry.js.map +1 -0
  262. package/dist/peculiar/p-1b3855ec.system.entry.js +111 -0
  263. package/dist/peculiar/p-1b3855ec.system.entry.js.map +1 -0
  264. package/dist/peculiar/p-4IvcYmU7.js +19 -0
  265. package/dist/peculiar/p-4IvcYmU7.js.map +1 -0
  266. package/dist/peculiar/{p-9263e7ee.system.entry.js → p-73a75d1e.system.entry.js} +3 -3
  267. package/dist/peculiar/p-73a75d1e.system.entry.js.map +1 -0
  268. package/dist/peculiar/p-7Nmqck4T.system.js.map +1 -0
  269. package/dist/peculiar/p-80fc5538.entry.js +5 -0
  270. package/dist/peculiar/p-80fc5538.entry.js.map +1 -0
  271. package/dist/peculiar/{p-bafd67f3.entry.js → p-85667993.entry.js} +2 -2
  272. package/dist/peculiar/p-85667993.entry.js.map +1 -0
  273. package/dist/peculiar/p-B0CjUC4o.system.js +142 -0
  274. package/dist/peculiar/p-B0CjUC4o.system.js.map +1 -0
  275. package/dist/peculiar/{p-c241e4ba.system.js → p-B2YrZuK2.system.js} +2 -2
  276. package/dist/peculiar/p-B2YrZuK2.system.js.map +1 -0
  277. package/dist/peculiar/p-B7TxZGea.system.js +19 -0
  278. package/dist/peculiar/p-B7TxZGea.system.js.map +1 -0
  279. package/dist/peculiar/{p-243244af.system.js → p-B859JpGw.system.js} +3 -3
  280. package/dist/peculiar/p-B859JpGw.system.js.map +1 -0
  281. package/dist/peculiar/{p-eea904d7.system.js → p-BBgwMHRZ.system.js} +3 -3
  282. package/dist/peculiar/p-BBgwMHRZ.system.js.map +1 -0
  283. package/dist/peculiar/p-BCATfe_H.js +19 -0
  284. package/dist/peculiar/p-BCATfe_H.js.map +1 -0
  285. package/dist/peculiar/p-BFenL1ap.system.js +6 -0
  286. package/dist/peculiar/p-BFenL1ap.system.js.map +1 -0
  287. package/dist/peculiar/{p-ae91d778.js → p-BHBizfwo.js} +3 -3
  288. package/dist/peculiar/p-BHBizfwo.js.map +1 -0
  289. package/dist/peculiar/{p-5a662d6f.system.js → p-BOSH9vjy.system.js} +3 -3
  290. package/dist/{esm-es5/actions-aebcbc9d.js.map → peculiar/p-BOSH9vjy.system.js.map} +1 -1
  291. package/dist/peculiar/{p-8bbee8f4.system.js → p-BP2bmYR2.system.js} +3 -3
  292. package/dist/peculiar/p-BP2bmYR2.system.js.map +1 -0
  293. package/dist/peculiar/{p-9712b827.system.js → p-BRhx1gbw.system.js} +4 -4
  294. package/dist/peculiar/p-BRhx1gbw.system.js.map +1 -0
  295. package/dist/peculiar/p-BTbyumBe.js +142 -0
  296. package/dist/peculiar/p-BTbyumBe.js.map +1 -0
  297. package/dist/peculiar/p-BX9qW3ww.system.js.map +1 -0
  298. package/dist/peculiar/p-BbPo3hge.system.js.map +1 -0
  299. package/dist/peculiar/{p-e6a6e602.js → p-BisXzAqN.js} +2 -2
  300. package/dist/peculiar/p-BisXzAqN.js.map +1 -0
  301. package/dist/peculiar/p-Bw_icgVx.js +19 -0
  302. package/dist/peculiar/p-Bw_icgVx.js.map +1 -0
  303. package/dist/peculiar/p-C_7Koml8.system.js.map +1 -0
  304. package/dist/peculiar/{p-27ca6743.js → p-CeKqQ13Z.js} +4 -4
  305. package/dist/peculiar/p-CeKqQ13Z.js.map +1 -0
  306. package/dist/peculiar/p-CpTwQbPC.js +12 -0
  307. package/dist/peculiar/p-CpTwQbPC.js.map +1 -0
  308. package/dist/peculiar/p-Ct0zEUB_.js +369 -0
  309. package/dist/peculiar/p-Ct0zEUB_.js.map +1 -0
  310. package/dist/peculiar/{p-c2995a63.system.js → p-CwlxH4oM.system.js} +1 -1
  311. package/dist/peculiar/p-CwlxH4oM.system.js.map +1 -0
  312. package/dist/peculiar/p-D13P_msn.system.js.map +1 -0
  313. package/dist/peculiar/{p-55303453.system.js → p-D2QB-8Q6.system.js} +1 -1
  314. package/dist/peculiar/p-D2QB-8Q6.system.js.map +1 -0
  315. package/dist/peculiar/p-D5BWI7FK.system.js +5 -0
  316. package/dist/peculiar/p-D5BWI7FK.system.js.map +1 -0
  317. package/dist/peculiar/p-DDDrq3In.js +6 -0
  318. package/dist/peculiar/p-DDDrq3In.js.map +1 -0
  319. package/dist/peculiar/{p-a9487007.js → p-DhdG07f8.js} +2 -2
  320. package/dist/peculiar/p-DhdG07f8.js.map +1 -0
  321. package/dist/peculiar/{p-99efefea.js → p-DkAhB3Vy.js} +2 -2
  322. package/dist/peculiar/p-DkAhB3Vy.js.map +1 -0
  323. package/dist/peculiar/p-DxdVL_Kj.system.js +13 -0
  324. package/dist/peculiar/p-DxdVL_Kj.system.js.map +1 -0
  325. package/dist/peculiar/{p-25a532a3.js → p-F2F0McJX.js} +1 -1
  326. package/dist/peculiar/p-F2F0McJX.js.map +1 -0
  327. package/dist/peculiar/p-FVz6FuoZ.system.js.map +1 -0
  328. package/dist/peculiar/p-RW7UbzcZ.system.js.map +1 -0
  329. package/dist/peculiar/p-ab220e36.system.entry.js +5 -0
  330. package/dist/peculiar/p-ab220e36.system.entry.js.map +1 -0
  331. package/dist/peculiar/{p-67e82386.entry.js → p-c2a805b3.entry.js} +3 -3
  332. package/dist/peculiar/p-c2a805b3.entry.js.map +1 -0
  333. package/dist/peculiar/p-cae95996.system.entry.js +5 -0
  334. package/dist/peculiar/p-cae95996.system.entry.js.map +1 -0
  335. package/dist/peculiar/p-e7266b0a.entry.js +110 -0
  336. package/dist/peculiar/p-e7266b0a.entry.js.map +1 -0
  337. package/dist/peculiar/p-f4490197.entry.js +5 -0
  338. package/dist/peculiar/p-f4490197.entry.js.map +1 -0
  339. package/dist/peculiar/p-lnQq6VON.system.js +20 -0
  340. package/dist/peculiar/p-lnQq6VON.system.js.map +1 -0
  341. package/dist/peculiar/{p-2bc2abea.system.js → p-vMACJe_C.system.js} +54 -54
  342. package/dist/peculiar/{p-6e2ad7eb.js.map → p-vMACJe_C.system.js.map} +1 -1
  343. package/dist/peculiar/p-wgYkE8CV.system.js +5 -0
  344. package/dist/peculiar/p-wgYkE8CV.system.js.map +1 -0
  345. package/dist/peculiar/{p-dac867e8.js → p-zVR349KA.js} +1 -1
  346. package/dist/peculiar/p-zVR349KA.js.map +1 -0
  347. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +1 -0
  348. package/dist/peculiar/peculiar-button-menu.peculiar-circular-progress.peculiar-highlight-words.entry.esm.js.map +1 -0
  349. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -0
  350. package/dist/peculiar/peculiar-certificate-viewer.entry.esm.js.map +1 -0
  351. package/dist/peculiar/peculiar-certificates-viewer.entry.esm.js.map +1 -0
  352. package/dist/peculiar/{p-b5389885.system.entry.js.map → peculiar-text-hider.entry.esm.js.map} +1 -1
  353. package/dist/peculiar/peculiar.esm.js +1 -1
  354. package/dist/peculiar/peculiar.esm.js.map +1 -1
  355. package/dist/peculiar/peculiar.js +1 -1
  356. package/dist/types/components/certificate-chain-viewer/certificate-chain-viewer.d.ts +21 -0
  357. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +5 -4
  358. package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +2 -2
  359. package/dist/types/components/typography/typography.d.ts +0 -1
  360. package/dist/types/components.d.ts +33 -4
  361. package/dist/types/constants/oids.d.ts +3 -0
  362. package/dist/types/crypto/index.d.ts +1 -0
  363. package/dist/types/crypto/pem_converter.d.ts +71 -0
  364. package/dist/types/crypto/pkcs10_certificate_request.d.ts +2 -2
  365. package/dist/types/crypto/utils.d.ts +7 -3
  366. package/dist/types/crypto/x509_attribute_certificate.d.ts +2 -2
  367. package/dist/types/crypto/x509_certificate.d.ts +2 -2
  368. package/dist/types/crypto/x509_certificates.d.ts +9 -0
  369. package/dist/types/crypto/x509_crl.d.ts +2 -2
  370. package/dist/types/stencil-public-runtime.d.ts +10 -10
  371. package/dist/types/utils/index.d.ts +0 -2
  372. package/hydrate/index.d.ts +53 -12
  373. package/hydrate/index.js +28615 -18748
  374. package/hydrate/index.mjs +34759 -0
  375. package/hydrate/package.json +7 -1
  376. package/loader/cdn.js +1 -1
  377. package/loader/index.cjs.js +1 -1
  378. package/loader/index.d.ts +3 -0
  379. package/loader/index.es2017.js +1 -1
  380. package/loader/index.js +1 -1
  381. package/package.json +32 -29
  382. package/dist/cjs/actions-789906f5.js.map +0 -1
  383. package/dist/cjs/app-globals-c20ffa41.js.map +0 -1
  384. package/dist/cjs/arrow_top-76e4261e.js.map +0 -1
  385. package/dist/cjs/button-87086210.js.map +0 -1
  386. package/dist/cjs/certification_request-ad267278.js.map +0 -1
  387. package/dist/cjs/cross-bd099933.js.map +0 -1
  388. package/dist/cjs/download-820d66ba.js.map +0 -1
  389. package/dist/cjs/index-e2ae280a.js +0 -2730
  390. package/dist/cjs/index-e2ae280a.js.map +0 -1
  391. package/dist/cjs/link-a3d3799d.js.map +0 -1
  392. package/dist/cjs/miscellaneous-67439e59.js.map +0 -1
  393. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +0 -1
  394. package/dist/cjs/pkcs10_certificate_request-64898c88.js.map +0 -1
  395. package/dist/cjs/read_file-2e22a97e.js.map +0 -1
  396. package/dist/cjs/x509_certificate-4b0894c2.js.map +0 -1
  397. package/dist/cjs/x509_crl-fc8d41a1.js.map +0 -1
  398. package/dist/collection/utils/validator.js +0 -25
  399. package/dist/collection/utils/validator.js.map +0 -1
  400. package/dist/esm/actions-aebcbc9d.js.map +0 -1
  401. package/dist/esm/app-globals-5e9b67e0.js.map +0 -1
  402. package/dist/esm/arrow_top-aee1ee02.js.map +0 -1
  403. package/dist/esm/button-a2fabf9a.js.map +0 -1
  404. package/dist/esm/certification_request-a4699dcf.js.map +0 -1
  405. package/dist/esm/cross-1377606f.js.map +0 -1
  406. package/dist/esm/download-14dc1047.js.map +0 -1
  407. package/dist/esm/index-ae188432.js +0 -2701
  408. package/dist/esm/index-ae188432.js.map +0 -1
  409. package/dist/esm/link-7e4e9060.js.map +0 -1
  410. package/dist/esm/miscellaneous-ba1fd2bd.js.map +0 -1
  411. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +0 -1
  412. package/dist/esm/pkcs10_certificate_request-785a4794.js.map +0 -1
  413. package/dist/esm/read_file-bb0b1450.js.map +0 -1
  414. package/dist/esm/x509_certificate-05a23c0e.js.map +0 -1
  415. package/dist/esm/x509_crl-26081461.js.map +0 -1
  416. package/dist/esm-es5/app-globals-5e9b67e0.js.map +0 -1
  417. package/dist/esm-es5/arrow_top-aee1ee02.js.map +0 -1
  418. package/dist/esm-es5/button-a2fabf9a.js.map +0 -1
  419. package/dist/esm-es5/certification_request-a4699dcf.js +0 -135
  420. package/dist/esm-es5/certification_request-a4699dcf.js.map +0 -1
  421. package/dist/esm-es5/cross-1377606f.js.map +0 -1
  422. package/dist/esm-es5/download-14dc1047.js.map +0 -1
  423. package/dist/esm-es5/index-ae188432.js +0 -6
  424. package/dist/esm-es5/index-ae188432.js.map +0 -1
  425. package/dist/esm-es5/link-7e4e9060.js +0 -12
  426. package/dist/esm-es5/link-7e4e9060.js.map +0 -1
  427. package/dist/esm-es5/miscellaneous-ba1fd2bd.js.map +0 -1
  428. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +0 -110
  429. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +0 -1
  430. package/dist/esm-es5/pkcs10_certificate_request-785a4794.js +0 -19
  431. package/dist/esm-es5/pkcs10_certificate_request-785a4794.js.map +0 -1
  432. package/dist/esm-es5/read_file-bb0b1450.js.map +0 -1
  433. package/dist/esm-es5/x509_certificate-05a23c0e.js +0 -12
  434. package/dist/esm-es5/x509_certificate-05a23c0e.js.map +0 -1
  435. package/dist/esm-es5/x509_crl-26081461.js +0 -19
  436. package/dist/esm-es5/x509_crl-26081461.js.map +0 -1
  437. package/dist/peculiar/p-1566ad92.system.entry.js +0 -5
  438. package/dist/peculiar/p-1566ad92.system.entry.js.map +0 -1
  439. package/dist/peculiar/p-243244af.system.js.map +0 -1
  440. package/dist/peculiar/p-25a532a3.js.map +0 -1
  441. package/dist/peculiar/p-27ca6743.js.map +0 -1
  442. package/dist/peculiar/p-2bc2abea.system.js.map +0 -1
  443. package/dist/peculiar/p-32807e5e.js +0 -135
  444. package/dist/peculiar/p-32807e5e.js.map +0 -1
  445. package/dist/peculiar/p-3cb79cd9.js +0 -6
  446. package/dist/peculiar/p-3cb79cd9.js.map +0 -1
  447. package/dist/peculiar/p-4bc5ddbe.js +0 -19
  448. package/dist/peculiar/p-4bc5ddbe.js.map +0 -1
  449. package/dist/peculiar/p-55303453.system.js.map +0 -1
  450. package/dist/peculiar/p-5a662d6f.system.js.map +0 -1
  451. package/dist/peculiar/p-5d1d4a96.entry.js +0 -110
  452. package/dist/peculiar/p-5d1d4a96.entry.js.map +0 -1
  453. package/dist/peculiar/p-67e82386.entry.js.map +0 -1
  454. package/dist/peculiar/p-6e2ad7eb.js +0 -369
  455. package/dist/peculiar/p-713563fb.entry.js +0 -5
  456. package/dist/peculiar/p-713563fb.entry.js.map +0 -1
  457. package/dist/peculiar/p-7ddd9a82.system.js +0 -19
  458. package/dist/peculiar/p-7ddd9a82.system.js.map +0 -1
  459. package/dist/peculiar/p-821bdcdc.system.js +0 -6
  460. package/dist/peculiar/p-821bdcdc.system.js.map +0 -1
  461. package/dist/peculiar/p-8393399a.system.js +0 -5
  462. package/dist/peculiar/p-8393399a.system.js.map +0 -1
  463. package/dist/peculiar/p-8bbee8f4.system.js.map +0 -1
  464. package/dist/peculiar/p-9263e7ee.system.entry.js.map +0 -1
  465. package/dist/peculiar/p-9712b827.system.js.map +0 -1
  466. package/dist/peculiar/p-98e3a016.system.js +0 -13
  467. package/dist/peculiar/p-98e3a016.system.js.map +0 -1
  468. package/dist/peculiar/p-99efefea.js.map +0 -1
  469. package/dist/peculiar/p-9ad547d2.system.entry.js +0 -5
  470. package/dist/peculiar/p-9ad547d2.system.entry.js.map +0 -1
  471. package/dist/peculiar/p-a1a48332.system.js +0 -5
  472. package/dist/peculiar/p-a1a48332.system.js.map +0 -1
  473. package/dist/peculiar/p-a9487007.js.map +0 -1
  474. package/dist/peculiar/p-ab5a4988.js +0 -12
  475. package/dist/peculiar/p-ab5a4988.js.map +0 -1
  476. package/dist/peculiar/p-ae44c2b0.system.js +0 -20
  477. package/dist/peculiar/p-ae44c2b0.system.js.map +0 -1
  478. package/dist/peculiar/p-ae91d778.js.map +0 -1
  479. package/dist/peculiar/p-afbd1c8e.entry.js +0 -5
  480. package/dist/peculiar/p-afbd1c8e.entry.js.map +0 -1
  481. package/dist/peculiar/p-b5389885.system.entry.js +0 -5
  482. package/dist/peculiar/p-bafd67f3.entry.js.map +0 -1
  483. package/dist/peculiar/p-c241e4ba.system.js.map +0 -1
  484. package/dist/peculiar/p-c2995a63.system.js.map +0 -1
  485. package/dist/peculiar/p-cd1b1876.entry.js +0 -5
  486. package/dist/peculiar/p-cd1b1876.entry.js.map +0 -1
  487. package/dist/peculiar/p-d5ba4fc2.js +0 -19
  488. package/dist/peculiar/p-d5ba4fc2.js.map +0 -1
  489. package/dist/peculiar/p-dac867e8.js.map +0 -1
  490. package/dist/peculiar/p-e37e4df2.system.js +0 -135
  491. package/dist/peculiar/p-e37e4df2.system.js.map +0 -1
  492. package/dist/peculiar/p-e4ad4f13.system.entry.js +0 -5
  493. package/dist/peculiar/p-e4ad4f13.system.entry.js.map +0 -1
  494. package/dist/peculiar/p-e6a6e602.js.map +0 -1
  495. package/dist/peculiar/p-eea904d7.system.js.map +0 -1
  496. package/dist/peculiar/p-f8c91ee4.js +0 -19
  497. package/dist/peculiar/p-f8c91ee4.js.map +0 -1
  498. package/dist/peculiar/p-f9c07207.system.entry.js +0 -111
  499. package/dist/peculiar/p-f9c07207.system.entry.js.map +0 -1
  500. package/dist/types/utils/validator.d.ts +0 -10
  501. package/loader/package.json +0 -11
@@ -51,12 +51,16 @@ function downloadFromBuffer(value, name, extension, mime = 'application/octet-st
51
51
  });
52
52
  }
53
53
 
54
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
54
+ function getDefaultExportFromCjs (x) {
55
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
56
+ }
57
+
58
+ var build = {};
55
59
 
56
60
  /*!
57
61
  * MIT License
58
62
  *
59
- * Copyright (c) 2017-2022 Peculiar Ventures, LLC
63
+ * Copyright (c) 2017-2024 Peculiar Ventures, LLC
60
64
  *
61
65
  * Permission is hereby granted, free of charge, to any person obtaining a copy
62
66
  * of this software and associated documentation files (the "Software"), to deal
@@ -78,354 +82,388 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof win
78
82
  *
79
83
  */
80
84
 
81
- const ARRAY_BUFFER_NAME = "[object ArrayBuffer]";
82
- class BufferSourceConverter {
83
- static isArrayBuffer(data) {
84
- return Object.prototype.toString.call(data) === ARRAY_BUFFER_NAME;
85
- }
86
- static toArrayBuffer(data) {
87
- if (this.isArrayBuffer(data)) {
88
- return data;
89
- }
90
- if (data.byteLength === data.buffer.byteLength) {
91
- return data.buffer;
92
- }
93
- if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
94
- return data.buffer;
95
- }
96
- return this.toUint8Array(data.buffer)
97
- .slice(data.byteOffset, data.byteOffset + data.byteLength)
98
- .buffer;
99
- }
100
- static toUint8Array(data) {
101
- return this.toView(data, Uint8Array);
102
- }
103
- static toView(data, type) {
104
- if (data.constructor === type) {
105
- return data;
106
- }
107
- if (this.isArrayBuffer(data)) {
108
- return new type(data);
109
- }
110
- if (this.isArrayBufferView(data)) {
111
- return new type(data.buffer, data.byteOffset, data.byteLength);
112
- }
113
- throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");
114
- }
115
- static isBufferSource(data) {
116
- return this.isArrayBufferView(data)
117
- || this.isArrayBuffer(data);
118
- }
119
- static isArrayBufferView(data) {
120
- return ArrayBuffer.isView(data)
121
- || (data && this.isArrayBuffer(data.buffer));
122
- }
123
- static isEqual(a, b) {
124
- const aView = BufferSourceConverter.toUint8Array(a);
125
- const bView = BufferSourceConverter.toUint8Array(b);
126
- if (aView.length !== bView.byteLength) {
127
- return false;
128
- }
129
- for (let i = 0; i < aView.length; i++) {
130
- if (aView[i] !== bView[i]) {
131
- return false;
132
- }
133
- }
134
- return true;
135
- }
136
- static concat(...args) {
137
- let buffers;
138
- if (Array.isArray(args[0]) && !(args[1] instanceof Function)) {
139
- buffers = args[0];
140
- }
141
- else if (Array.isArray(args[0]) && args[1] instanceof Function) {
142
- buffers = args[0];
143
- }
144
- else {
145
- if (args[args.length - 1] instanceof Function) {
146
- buffers = args.slice(0, args.length - 1);
147
- }
148
- else {
149
- buffers = args;
150
- }
151
- }
152
- let size = 0;
153
- for (const buffer of buffers) {
154
- size += buffer.byteLength;
155
- }
156
- const res = new Uint8Array(size);
157
- let offset = 0;
158
- for (const buffer of buffers) {
159
- const view = this.toUint8Array(buffer);
160
- res.set(view, offset);
161
- offset += view.length;
162
- }
163
- if (args[args.length - 1] instanceof Function) {
164
- return this.toView(res, args[args.length - 1]);
165
- }
166
- return res.buffer;
167
- }
168
- }
169
-
170
- const STRING_TYPE = "string";
171
- const HEX_REGEX = /^[0-9a-f]+$/i;
172
- const BASE64_REGEX = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
173
- const BASE64URL_REGEX = /^[a-zA-Z0-9-_]+$/;
174
- class Utf8Converter {
175
- static fromString(text) {
176
- const s = unescape(encodeURIComponent(text));
177
- const uintArray = new Uint8Array(s.length);
178
- for (let i = 0; i < s.length; i++) {
179
- uintArray[i] = s.charCodeAt(i);
180
- }
181
- return uintArray.buffer;
182
- }
183
- static toString(buffer) {
184
- const buf = BufferSourceConverter.toUint8Array(buffer);
185
- let encodedString = "";
186
- for (let i = 0; i < buf.length; i++) {
187
- encodedString += String.fromCharCode(buf[i]);
188
- }
189
- const decodedString = decodeURIComponent(escape(encodedString));
190
- return decodedString;
191
- }
192
- }
193
- class Utf16Converter {
194
- static toString(buffer, littleEndian = false) {
195
- const arrayBuffer = BufferSourceConverter.toArrayBuffer(buffer);
196
- const dataView = new DataView(arrayBuffer);
197
- let res = "";
198
- for (let i = 0; i < arrayBuffer.byteLength; i += 2) {
199
- const code = dataView.getUint16(i, littleEndian);
200
- res += String.fromCharCode(code);
201
- }
202
- return res;
203
- }
204
- static fromString(text, littleEndian = false) {
205
- const res = new ArrayBuffer(text.length * 2);
206
- const dataView = new DataView(res);
207
- for (let i = 0; i < text.length; i++) {
208
- dataView.setUint16(i * 2, text.charCodeAt(i), littleEndian);
209
- }
210
- return res;
211
- }
212
- }
213
- class Convert {
214
- static isHex(data) {
215
- return typeof data === STRING_TYPE
216
- && HEX_REGEX.test(data);
217
- }
218
- static isBase64(data) {
219
- return typeof data === STRING_TYPE
220
- && BASE64_REGEX.test(data);
221
- }
222
- static isBase64Url(data) {
223
- return typeof data === STRING_TYPE
224
- && BASE64URL_REGEX.test(data);
225
- }
226
- static ToString(buffer, enc = "utf8") {
227
- const buf = BufferSourceConverter.toUint8Array(buffer);
228
- switch (enc.toLowerCase()) {
229
- case "utf8":
230
- return this.ToUtf8String(buf);
231
- case "binary":
232
- return this.ToBinary(buf);
233
- case "hex":
234
- return this.ToHex(buf);
235
- case "base64":
236
- return this.ToBase64(buf);
237
- case "base64url":
238
- return this.ToBase64Url(buf);
239
- case "utf16le":
240
- return Utf16Converter.toString(buf, true);
241
- case "utf16":
242
- case "utf16be":
243
- return Utf16Converter.toString(buf);
244
- default:
245
- throw new Error(`Unknown type of encoding '${enc}'`);
246
- }
247
- }
248
- static FromString(str, enc = "utf8") {
249
- if (!str) {
250
- return new ArrayBuffer(0);
251
- }
252
- switch (enc.toLowerCase()) {
253
- case "utf8":
254
- return this.FromUtf8String(str);
255
- case "binary":
256
- return this.FromBinary(str);
257
- case "hex":
258
- return this.FromHex(str);
259
- case "base64":
260
- return this.FromBase64(str);
261
- case "base64url":
262
- return this.FromBase64Url(str);
263
- case "utf16le":
264
- return Utf16Converter.fromString(str, true);
265
- case "utf16":
266
- case "utf16be":
267
- return Utf16Converter.fromString(str);
268
- default:
269
- throw new Error(`Unknown type of encoding '${enc}'`);
270
- }
271
- }
272
- static ToBase64(buffer) {
273
- const buf = BufferSourceConverter.toUint8Array(buffer);
274
- if (typeof btoa !== "undefined") {
275
- const binary = this.ToString(buf, "binary");
276
- return btoa(binary);
277
- }
278
- else {
279
- return Buffer.from(buf).toString("base64");
280
- }
281
- }
282
- static FromBase64(base64) {
283
- const formatted = this.formatString(base64);
284
- if (!formatted) {
285
- return new ArrayBuffer(0);
286
- }
287
- if (!Convert.isBase64(formatted)) {
288
- throw new TypeError("Argument 'base64Text' is not Base64 encoded");
289
- }
290
- if (typeof atob !== "undefined") {
291
- return this.FromBinary(atob(formatted));
292
- }
293
- else {
294
- return new Uint8Array(Buffer.from(formatted, "base64")).buffer;
295
- }
296
- }
297
- static FromBase64Url(base64url) {
298
- const formatted = this.formatString(base64url);
299
- if (!formatted) {
300
- return new ArrayBuffer(0);
301
- }
302
- if (!Convert.isBase64Url(formatted)) {
303
- throw new TypeError("Argument 'base64url' is not Base64Url encoded");
304
- }
305
- return this.FromBase64(this.Base64Padding(formatted.replace(/\-/g, "+").replace(/\_/g, "/")));
306
- }
307
- static ToBase64Url(data) {
308
- return this.ToBase64(data).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
309
- }
310
- static FromUtf8String(text, encoding = Convert.DEFAULT_UTF8_ENCODING) {
311
- switch (encoding) {
312
- case "ascii":
313
- return this.FromBinary(text);
314
- case "utf8":
315
- return Utf8Converter.fromString(text);
316
- case "utf16":
317
- case "utf16be":
318
- return Utf16Converter.fromString(text);
319
- case "utf16le":
320
- case "usc2":
321
- return Utf16Converter.fromString(text, true);
322
- default:
323
- throw new Error(`Unknown type of encoding '${encoding}'`);
324
- }
325
- }
326
- static ToUtf8String(buffer, encoding = Convert.DEFAULT_UTF8_ENCODING) {
327
- switch (encoding) {
328
- case "ascii":
329
- return this.ToBinary(buffer);
330
- case "utf8":
331
- return Utf8Converter.toString(buffer);
332
- case "utf16":
333
- case "utf16be":
334
- return Utf16Converter.toString(buffer);
335
- case "utf16le":
336
- case "usc2":
337
- return Utf16Converter.toString(buffer, true);
338
- default:
339
- throw new Error(`Unknown type of encoding '${encoding}'`);
340
- }
341
- }
342
- static FromBinary(text) {
343
- const stringLength = text.length;
344
- const resultView = new Uint8Array(stringLength);
345
- for (let i = 0; i < stringLength; i++) {
346
- resultView[i] = text.charCodeAt(i);
347
- }
348
- return resultView.buffer;
349
- }
350
- static ToBinary(buffer) {
351
- const buf = BufferSourceConverter.toUint8Array(buffer);
352
- let res = "";
353
- for (let i = 0; i < buf.length; i++) {
354
- res += String.fromCharCode(buf[i]);
355
- }
356
- return res;
357
- }
358
- static ToHex(buffer) {
359
- const buf = BufferSourceConverter.toUint8Array(buffer);
360
- let result = "";
361
- const len = buf.length;
362
- for (let i = 0; i < len; i++) {
363
- const byte = buf[i];
364
- if (byte < 16) {
365
- result += "0";
366
- }
367
- result += byte.toString(16);
368
- }
369
- return result;
370
- }
371
- static FromHex(hexString) {
372
- let formatted = this.formatString(hexString);
373
- if (!formatted) {
374
- return new ArrayBuffer(0);
375
- }
376
- if (!Convert.isHex(formatted)) {
377
- throw new TypeError("Argument 'hexString' is not HEX encoded");
378
- }
379
- if (formatted.length % 2) {
380
- formatted = `0${formatted}`;
381
- }
382
- const res = new Uint8Array(formatted.length / 2);
383
- for (let i = 0; i < formatted.length; i = i + 2) {
384
- const c = formatted.slice(i, i + 2);
385
- res[i / 2] = parseInt(c, 16);
386
- }
387
- return res.buffer;
388
- }
389
- static ToUtf16String(buffer, littleEndian = false) {
390
- return Utf16Converter.toString(buffer, littleEndian);
391
- }
392
- static FromUtf16String(text, littleEndian = false) {
393
- return Utf16Converter.fromString(text, littleEndian);
394
- }
395
- static Base64Padding(base64) {
396
- const padCount = 4 - (base64.length % 4);
397
- if (padCount < 4) {
398
- for (let i = 0; i < padCount; i++) {
399
- base64 += "=";
400
- }
401
- }
402
- return base64;
403
- }
404
- static formatString(data) {
405
- return (data === null || data === void 0 ? void 0 : data.replace(/[\n\r\t ]/g, "")) || "";
406
- }
407
- }
408
- Convert.DEFAULT_UTF8_ENCODING = "utf8";
409
- function isEqual(bytes1, bytes2) {
410
- if (!(bytes1 && bytes2)) {
411
- return false;
412
- }
413
- if (bytes1.byteLength !== bytes2.byteLength) {
414
- return false;
415
- }
416
- const b1 = new Uint8Array(bytes1);
417
- const b2 = new Uint8Array(bytes2);
418
- for (let i = 0; i < bytes1.byteLength; i++) {
419
- if (b1[i] !== b2[i]) {
420
- return false;
421
- }
422
- }
423
- return true;
424
- }
425
-
426
- var BufferSourceConverter_1 = BufferSourceConverter;
427
- var Convert_1 = Convert;
428
- var isEqual_1 = isEqual;
85
+ var hasRequiredBuild;
86
+
87
+ function requireBuild () {
88
+ if (hasRequiredBuild) return build;
89
+ hasRequiredBuild = 1;
90
+
91
+ const ARRAY_BUFFER_NAME = "[object ArrayBuffer]";
92
+ class BufferSourceConverter {
93
+ static isArrayBuffer(data) {
94
+ return Object.prototype.toString.call(data) === ARRAY_BUFFER_NAME;
95
+ }
96
+ static toArrayBuffer(data) {
97
+ if (this.isArrayBuffer(data)) {
98
+ return data;
99
+ }
100
+ if (data.byteLength === data.buffer.byteLength) {
101
+ return data.buffer;
102
+ }
103
+ if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
104
+ return data.buffer;
105
+ }
106
+ return this.toUint8Array(data.buffer)
107
+ .slice(data.byteOffset, data.byteOffset + data.byteLength)
108
+ .buffer;
109
+ }
110
+ static toUint8Array(data) {
111
+ return this.toView(data, Uint8Array);
112
+ }
113
+ static toView(data, type) {
114
+ if (data.constructor === type) {
115
+ return data;
116
+ }
117
+ if (this.isArrayBuffer(data)) {
118
+ return new type(data);
119
+ }
120
+ if (this.isArrayBufferView(data)) {
121
+ return new type(data.buffer, data.byteOffset, data.byteLength);
122
+ }
123
+ throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");
124
+ }
125
+ static isBufferSource(data) {
126
+ return this.isArrayBufferView(data)
127
+ || this.isArrayBuffer(data);
128
+ }
129
+ static isArrayBufferView(data) {
130
+ return ArrayBuffer.isView(data)
131
+ || (data && this.isArrayBuffer(data.buffer));
132
+ }
133
+ static isEqual(a, b) {
134
+ const aView = BufferSourceConverter.toUint8Array(a);
135
+ const bView = BufferSourceConverter.toUint8Array(b);
136
+ if (aView.length !== bView.byteLength) {
137
+ return false;
138
+ }
139
+ for (let i = 0; i < aView.length; i++) {
140
+ if (aView[i] !== bView[i]) {
141
+ return false;
142
+ }
143
+ }
144
+ return true;
145
+ }
146
+ static concat(...args) {
147
+ let buffers;
148
+ if (Array.isArray(args[0]) && !(args[1] instanceof Function)) {
149
+ buffers = args[0];
150
+ }
151
+ else if (Array.isArray(args[0]) && args[1] instanceof Function) {
152
+ buffers = args[0];
153
+ }
154
+ else {
155
+ if (args[args.length - 1] instanceof Function) {
156
+ buffers = args.slice(0, args.length - 1);
157
+ }
158
+ else {
159
+ buffers = args;
160
+ }
161
+ }
162
+ let size = 0;
163
+ for (const buffer of buffers) {
164
+ size += buffer.byteLength;
165
+ }
166
+ const res = new Uint8Array(size);
167
+ let offset = 0;
168
+ for (const buffer of buffers) {
169
+ const view = this.toUint8Array(buffer);
170
+ res.set(view, offset);
171
+ offset += view.length;
172
+ }
173
+ if (args[args.length - 1] instanceof Function) {
174
+ return this.toView(res, args[args.length - 1]);
175
+ }
176
+ return res.buffer;
177
+ }
178
+ }
179
+
180
+ const STRING_TYPE = "string";
181
+ const HEX_REGEX = /^[0-9a-f\s]+$/i;
182
+ const BASE64_REGEX = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
183
+ const BASE64URL_REGEX = /^[a-zA-Z0-9-_]+$/;
184
+ class Utf8Converter {
185
+ static fromString(text) {
186
+ const s = unescape(encodeURIComponent(text));
187
+ const uintArray = new Uint8Array(s.length);
188
+ for (let i = 0; i < s.length; i++) {
189
+ uintArray[i] = s.charCodeAt(i);
190
+ }
191
+ return uintArray.buffer;
192
+ }
193
+ static toString(buffer) {
194
+ const buf = BufferSourceConverter.toUint8Array(buffer);
195
+ let encodedString = "";
196
+ for (let i = 0; i < buf.length; i++) {
197
+ encodedString += String.fromCharCode(buf[i]);
198
+ }
199
+ const decodedString = decodeURIComponent(escape(encodedString));
200
+ return decodedString;
201
+ }
202
+ }
203
+ class Utf16Converter {
204
+ static toString(buffer, littleEndian = false) {
205
+ const arrayBuffer = BufferSourceConverter.toArrayBuffer(buffer);
206
+ const dataView = new DataView(arrayBuffer);
207
+ let res = "";
208
+ for (let i = 0; i < arrayBuffer.byteLength; i += 2) {
209
+ const code = dataView.getUint16(i, littleEndian);
210
+ res += String.fromCharCode(code);
211
+ }
212
+ return res;
213
+ }
214
+ static fromString(text, littleEndian = false) {
215
+ const res = new ArrayBuffer(text.length * 2);
216
+ const dataView = new DataView(res);
217
+ for (let i = 0; i < text.length; i++) {
218
+ dataView.setUint16(i * 2, text.charCodeAt(i), littleEndian);
219
+ }
220
+ return res;
221
+ }
222
+ }
223
+ class Convert {
224
+ static isHex(data) {
225
+ return typeof data === STRING_TYPE
226
+ && HEX_REGEX.test(data);
227
+ }
228
+ static isBase64(data) {
229
+ return typeof data === STRING_TYPE
230
+ && BASE64_REGEX.test(data);
231
+ }
232
+ static isBase64Url(data) {
233
+ return typeof data === STRING_TYPE
234
+ && BASE64URL_REGEX.test(data);
235
+ }
236
+ static ToString(buffer, enc = "utf8") {
237
+ const buf = BufferSourceConverter.toUint8Array(buffer);
238
+ switch (enc.toLowerCase()) {
239
+ case "utf8":
240
+ return this.ToUtf8String(buf);
241
+ case "binary":
242
+ return this.ToBinary(buf);
243
+ case "hex":
244
+ return this.ToHex(buf);
245
+ case "base64":
246
+ return this.ToBase64(buf);
247
+ case "base64url":
248
+ return this.ToBase64Url(buf);
249
+ case "utf16le":
250
+ return Utf16Converter.toString(buf, true);
251
+ case "utf16":
252
+ case "utf16be":
253
+ return Utf16Converter.toString(buf);
254
+ default:
255
+ throw new Error(`Unknown type of encoding '${enc}'`);
256
+ }
257
+ }
258
+ static FromString(str, enc = "utf8") {
259
+ if (!str) {
260
+ return new ArrayBuffer(0);
261
+ }
262
+ switch (enc.toLowerCase()) {
263
+ case "utf8":
264
+ return this.FromUtf8String(str);
265
+ case "binary":
266
+ return this.FromBinary(str);
267
+ case "hex":
268
+ return this.FromHex(str);
269
+ case "base64":
270
+ return this.FromBase64(str);
271
+ case "base64url":
272
+ return this.FromBase64Url(str);
273
+ case "utf16le":
274
+ return Utf16Converter.fromString(str, true);
275
+ case "utf16":
276
+ case "utf16be":
277
+ return Utf16Converter.fromString(str);
278
+ default:
279
+ throw new Error(`Unknown type of encoding '${enc}'`);
280
+ }
281
+ }
282
+ static ToBase64(buffer) {
283
+ const buf = BufferSourceConverter.toUint8Array(buffer);
284
+ if (typeof btoa !== "undefined") {
285
+ const binary = this.ToString(buf, "binary");
286
+ return btoa(binary);
287
+ }
288
+ else {
289
+ return Buffer.from(buf).toString("base64");
290
+ }
291
+ }
292
+ static FromBase64(base64) {
293
+ const formatted = this.formatString(base64);
294
+ if (!formatted) {
295
+ return new ArrayBuffer(0);
296
+ }
297
+ if (!Convert.isBase64(formatted)) {
298
+ throw new TypeError("Argument 'base64Text' is not Base64 encoded");
299
+ }
300
+ if (typeof atob !== "undefined") {
301
+ return this.FromBinary(atob(formatted));
302
+ }
303
+ else {
304
+ return new Uint8Array(Buffer.from(formatted, "base64")).buffer;
305
+ }
306
+ }
307
+ static FromBase64Url(base64url) {
308
+ const formatted = this.formatString(base64url);
309
+ if (!formatted) {
310
+ return new ArrayBuffer(0);
311
+ }
312
+ if (!Convert.isBase64Url(formatted)) {
313
+ throw new TypeError("Argument 'base64url' is not Base64Url encoded");
314
+ }
315
+ return this.FromBase64(this.Base64Padding(formatted.replace(/\-/g, "+").replace(/\_/g, "/")));
316
+ }
317
+ static ToBase64Url(data) {
318
+ return this.ToBase64(data).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
319
+ }
320
+ static FromUtf8String(text, encoding = Convert.DEFAULT_UTF8_ENCODING) {
321
+ switch (encoding) {
322
+ case "ascii":
323
+ return this.FromBinary(text);
324
+ case "utf8":
325
+ return Utf8Converter.fromString(text);
326
+ case "utf16":
327
+ case "utf16be":
328
+ return Utf16Converter.fromString(text);
329
+ case "utf16le":
330
+ case "usc2":
331
+ return Utf16Converter.fromString(text, true);
332
+ default:
333
+ throw new Error(`Unknown type of encoding '${encoding}'`);
334
+ }
335
+ }
336
+ static ToUtf8String(buffer, encoding = Convert.DEFAULT_UTF8_ENCODING) {
337
+ switch (encoding) {
338
+ case "ascii":
339
+ return this.ToBinary(buffer);
340
+ case "utf8":
341
+ return Utf8Converter.toString(buffer);
342
+ case "utf16":
343
+ case "utf16be":
344
+ return Utf16Converter.toString(buffer);
345
+ case "utf16le":
346
+ case "usc2":
347
+ return Utf16Converter.toString(buffer, true);
348
+ default:
349
+ throw new Error(`Unknown type of encoding '${encoding}'`);
350
+ }
351
+ }
352
+ static FromBinary(text) {
353
+ const stringLength = text.length;
354
+ const resultView = new Uint8Array(stringLength);
355
+ for (let i = 0; i < stringLength; i++) {
356
+ resultView[i] = text.charCodeAt(i);
357
+ }
358
+ return resultView.buffer;
359
+ }
360
+ static ToBinary(buffer) {
361
+ const buf = BufferSourceConverter.toUint8Array(buffer);
362
+ let res = "";
363
+ for (let i = 0; i < buf.length; i++) {
364
+ res += String.fromCharCode(buf[i]);
365
+ }
366
+ return res;
367
+ }
368
+ static ToHex(buffer) {
369
+ const buf = BufferSourceConverter.toUint8Array(buffer);
370
+ let result = "";
371
+ const len = buf.length;
372
+ for (let i = 0; i < len; i++) {
373
+ const byte = buf[i];
374
+ if (byte < 16) {
375
+ result += "0";
376
+ }
377
+ result += byte.toString(16);
378
+ }
379
+ return result;
380
+ }
381
+ static FromHex(hexString) {
382
+ let formatted = this.formatString(hexString);
383
+ if (!formatted) {
384
+ return new ArrayBuffer(0);
385
+ }
386
+ if (!Convert.isHex(formatted)) {
387
+ throw new TypeError("Argument 'hexString' is not HEX encoded");
388
+ }
389
+ if (formatted.length % 2) {
390
+ formatted = `0${formatted}`;
391
+ }
392
+ const res = new Uint8Array(formatted.length / 2);
393
+ for (let i = 0; i < formatted.length; i = i + 2) {
394
+ const c = formatted.slice(i, i + 2);
395
+ res[i / 2] = parseInt(c, 16);
396
+ }
397
+ return res.buffer;
398
+ }
399
+ static ToUtf16String(buffer, littleEndian = false) {
400
+ return Utf16Converter.toString(buffer, littleEndian);
401
+ }
402
+ static FromUtf16String(text, littleEndian = false) {
403
+ return Utf16Converter.fromString(text, littleEndian);
404
+ }
405
+ static Base64Padding(base64) {
406
+ const padCount = 4 - (base64.length % 4);
407
+ if (padCount < 4) {
408
+ for (let i = 0; i < padCount; i++) {
409
+ base64 += "=";
410
+ }
411
+ }
412
+ return base64;
413
+ }
414
+ static formatString(data) {
415
+ return (data === null || data === void 0 ? void 0 : data.replace(/[\n\r\t ]/g, "")) || "";
416
+ }
417
+ }
418
+ Convert.DEFAULT_UTF8_ENCODING = "utf8";
419
+
420
+ function assign(target, ...sources) {
421
+ const res = arguments[0];
422
+ for (let i = 1; i < arguments.length; i++) {
423
+ const obj = arguments[i];
424
+ for (const prop in obj) {
425
+ res[prop] = obj[prop];
426
+ }
427
+ }
428
+ return res;
429
+ }
430
+ function combine(...buf) {
431
+ const totalByteLength = buf.map((item) => item.byteLength).reduce((prev, cur) => prev + cur);
432
+ const res = new Uint8Array(totalByteLength);
433
+ let currentPos = 0;
434
+ buf.map((item) => new Uint8Array(item)).forEach((arr) => {
435
+ for (const item2 of arr) {
436
+ res[currentPos++] = item2;
437
+ }
438
+ });
439
+ return res.buffer;
440
+ }
441
+ function isEqual(bytes1, bytes2) {
442
+ if (!(bytes1 && bytes2)) {
443
+ return false;
444
+ }
445
+ if (bytes1.byteLength !== bytes2.byteLength) {
446
+ return false;
447
+ }
448
+ const b1 = new Uint8Array(bytes1);
449
+ const b2 = new Uint8Array(bytes2);
450
+ for (let i = 0; i < bytes1.byteLength; i++) {
451
+ if (b1[i] !== b2[i]) {
452
+ return false;
453
+ }
454
+ }
455
+ return true;
456
+ }
457
+
458
+ build.BufferSourceConverter = BufferSourceConverter;
459
+ build.Convert = Convert;
460
+ build.assign = assign;
461
+ build.combine = combine;
462
+ build.isEqual = isEqual;
463
+ return build;
464
+ }
465
+
466
+ var buildExports = requireBuild();
429
467
 
430
468
  /**
431
469
  * @license
@@ -438,7 +476,7 @@ class Download {
438
476
  }
439
477
  Download.cert = {
440
478
  asPEM: (pem, name) => {
441
- downloadFromBuffer(Convert_1.FromString(pem), name, 'cer', 'application/pkix-cert');
479
+ downloadFromBuffer(buildExports.Convert.FromString(pem), name, 'cer', 'application/pkix-cert');
442
480
  },
443
481
  asDER: (raw, name) => {
444
482
  downloadFromBuffer(raw, name, 'cer', 'application/pkix-cert');
@@ -446,7 +484,7 @@ Download.cert = {
446
484
  };
447
485
  Download.attrCert = {
448
486
  asPEM: (pem, name) => {
449
- downloadFromBuffer(Convert_1.FromString(pem), name, 'cer', 'application/pkix-attr-cert');
487
+ downloadFromBuffer(buildExports.Convert.FromString(pem), name, 'cer', 'application/pkix-attr-cert');
450
488
  },
451
489
  asDER: (raw, name) => {
452
490
  downloadFromBuffer(raw, name, 'cer', 'application/pkix-attr-cert');
@@ -454,7 +492,7 @@ Download.attrCert = {
454
492
  };
455
493
  Download.csr = {
456
494
  asPEM: (pem, name) => {
457
- downloadFromBuffer(Convert_1.FromString(pem), name, 'csr', 'application/pkcs10');
495
+ downloadFromBuffer(buildExports.Convert.FromString(pem), name, 'csr', 'application/pkcs10');
458
496
  },
459
497
  asDER: (raw, name) => {
460
498
  downloadFromBuffer(raw, name, 'csr', 'application/pkcs10');
@@ -462,7 +500,7 @@ Download.csr = {
462
500
  };
463
501
  Download.crl = {
464
502
  asPEM: (pem, name) => {
465
- downloadFromBuffer(Convert_1.FromString(pem), name, 'crl', 'application/pkix-crl');
503
+ downloadFromBuffer(buildExports.Convert.FromString(pem), name, 'crl', 'application/pkix-crl');
466
504
  },
467
505
  asDER: (raw, name) => {
468
506
  downloadFromBuffer(raw, name, 'crl', 'application/pkix-crl');
@@ -472,6 +510,7 @@ Download.crl = {
472
510
  /*!
473
511
  Copyright (c) Peculiar Ventures, LLC
474
512
  */
513
+
475
514
  function utilFromBase(inputBuffer, inputBase) {
476
515
  let result = 0;
477
516
  if (inputBuffer.length === 1) {
@@ -643,6 +682,7 @@ function padNumber(inputNumber, fullLength) {
643
682
  *
644
683
  */
645
684
 
685
+
646
686
  function assertBigInt() {
647
687
  if (typeof BigInt === "undefined") {
648
688
  throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.");
@@ -726,7 +766,7 @@ function HexBlock(BaseClass) {
726
766
  super(...args);
727
767
  const params = args[0] || {};
728
768
  this.isHexOnly = (_a = params.isHexOnly) !== null && _a !== void 0 ? _a : false;
729
- this.valueHexView = params.valueHex ? BufferSourceConverter_1.toUint8Array(params.valueHex) : EMPTY_VIEW;
769
+ this.valueHexView = params.valueHex ? buildExports.BufferSourceConverter.toUint8Array(params.valueHex) : EMPTY_VIEW;
730
770
  }
731
771
  get valueHex() {
732
772
  return this.valueHexView.slice().buffer;
@@ -764,7 +804,7 @@ function HexBlock(BaseClass) {
764
804
  return {
765
805
  ...super.toJSON(),
766
806
  isHexOnly: this.isHexOnly,
767
- valueHex: Convert_1.ToHex(this.valueHexView),
807
+ valueHex: buildExports.Convert.ToHex(this.valueHexView),
768
808
  };
769
809
  }
770
810
  },
@@ -777,7 +817,7 @@ class LocalBaseBlock {
777
817
  this.blockLength = blockLength;
778
818
  this.error = error;
779
819
  this.warnings = warnings;
780
- this.valueBeforeDecodeView = BufferSourceConverter_1.toUint8Array(valueBeforeDecode);
820
+ this.valueBeforeDecodeView = buildExports.BufferSourceConverter.toUint8Array(valueBeforeDecode);
781
821
  }
782
822
  static blockName() {
783
823
  return this.NAME;
@@ -794,7 +834,7 @@ class LocalBaseBlock {
794
834
  blockLength: this.blockLength,
795
835
  error: this.error,
796
836
  warnings: this.warnings,
797
- valueBeforeDecode: Convert_1.ToHex(this.valueBeforeDecodeView),
837
+ valueBeforeDecode: buildExports.Convert.ToHex(this.valueBeforeDecodeView),
798
838
  };
799
839
  }
800
840
  }
@@ -816,7 +856,7 @@ class LocalIdentificationBlock extends HexBlock(LocalBaseBlock) {
816
856
  super();
817
857
  if (idBlock) {
818
858
  this.isHexOnly = (_a = idBlock.isHexOnly) !== null && _a !== void 0 ? _a : false;
819
- this.valueHexView = idBlock.valueHex ? BufferSourceConverter_1.toUint8Array(idBlock.valueHex) : EMPTY_VIEW;
859
+ this.valueHexView = idBlock.valueHex ? buildExports.BufferSourceConverter.toUint8Array(idBlock.valueHex) : EMPTY_VIEW;
820
860
  this.tagClass = (_b = idBlock.tagClass) !== null && _b !== void 0 ? _b : -1;
821
861
  this.tagNumber = (_c = idBlock.tagNumber) !== null && _c !== void 0 ? _c : -1;
822
862
  this.isConstructed = (_d = idBlock.isConstructed) !== null && _d !== void 0 ? _d : false;
@@ -882,7 +922,7 @@ class LocalIdentificationBlock extends HexBlock(LocalBaseBlock) {
882
922
  return retView.buffer;
883
923
  }
884
924
  fromBER(inputBuffer, inputOffset, inputLength) {
885
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
925
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
886
926
  if (!checkBufferParams(this, inputView, inputOffset, inputLength)) {
887
927
  return -1;
888
928
  }
@@ -991,7 +1031,7 @@ class LocalLengthBlock extends LocalBaseBlock {
991
1031
  this.length = (_c = lenBlock.length) !== null && _c !== void 0 ? _c : 0;
992
1032
  }
993
1033
  fromBER(inputBuffer, inputOffset, inputLength) {
994
- const view = BufferSourceConverter_1.toUint8Array(inputBuffer);
1034
+ const view = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
995
1035
  if (!checkBufferParams(this, view, inputOffset, inputLength)) {
996
1036
  return -1;
997
1037
  }
@@ -1150,10 +1190,10 @@ class BaseBlock extends LocalBaseBlock {
1150
1190
  if (encoding === "ascii") {
1151
1191
  return this.onAsciiEncoding();
1152
1192
  }
1153
- return Convert_1.ToHex(this.toBER());
1193
+ return buildExports.Convert.ToHex(this.toBER());
1154
1194
  }
1155
1195
  onAsciiEncoding() {
1156
- return `${this.constructor.NAME} : ${Convert_1.ToHex(this.valueBlock.valueBeforeDecodeView)}`;
1196
+ return `${this.constructor.NAME} : ${buildExports.Convert.ToHex(this.valueBlock.valueBeforeDecodeView)}`;
1157
1197
  }
1158
1198
  isEqual(other) {
1159
1199
  if (this === other) {
@@ -1451,7 +1491,7 @@ function fromBER(inputBuffer) {
1451
1491
  result
1452
1492
  };
1453
1493
  }
1454
- return localFromBER(BufferSourceConverter_1.toUint8Array(inputBuffer).slice(), 0, inputBuffer.byteLength);
1494
+ return localFromBER(buildExports.BufferSourceConverter.toUint8Array(inputBuffer).slice(), 0, inputBuffer.byteLength);
1455
1495
  }
1456
1496
 
1457
1497
  function checkLen(indefiniteLength, length) {
@@ -1467,7 +1507,7 @@ class LocalConstructedValueBlock extends ValueBlock {
1467
1507
  this.isIndefiniteForm = isIndefiniteForm;
1468
1508
  }
1469
1509
  fromBER(inputBuffer, inputOffset, inputLength) {
1470
- const view = BufferSourceConverter_1.toUint8Array(inputBuffer);
1510
+ const view = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
1471
1511
  if (!checkBufferParams(this, view, inputOffset, inputLength)) {
1472
1512
  return -1;
1473
1513
  }
@@ -1637,7 +1677,7 @@ class LocalBooleanValueBlock extends HexBlock(ValueBlock) {
1637
1677
  constructor({ value, ...parameters } = {}) {
1638
1678
  super(parameters);
1639
1679
  if (parameters.valueHex) {
1640
- this.valueHexView = BufferSourceConverter_1.toUint8Array(parameters.valueHex);
1680
+ this.valueHexView = buildExports.BufferSourceConverter.toUint8Array(parameters.valueHex);
1641
1681
  }
1642
1682
  else {
1643
1683
  this.valueHexView = new Uint8Array(1);
@@ -1658,7 +1698,7 @@ class LocalBooleanValueBlock extends HexBlock(ValueBlock) {
1658
1698
  this.valueHexView[0] = value ? 0xFF : 0x00;
1659
1699
  }
1660
1700
  fromBER(inputBuffer, inputOffset, inputLength) {
1661
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
1701
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
1662
1702
  if (!checkBufferParams(this, inputView, inputOffset, inputLength)) {
1663
1703
  return -1;
1664
1704
  }
@@ -1757,7 +1797,7 @@ class LocalOctetStringValueBlock extends HexBlock(LocalConstructedValueBlock) {
1757
1797
  LocalOctetStringValueBlock.NAME = "OctetStringValueBlock";
1758
1798
 
1759
1799
  var _a$r;
1760
- class OctetString$1 extends BaseBlock {
1800
+ let OctetString$1 = class OctetString extends BaseBlock {
1761
1801
  constructor({ idBlock = {}, lenBlock = {}, ...parameters } = {}) {
1762
1802
  var _b, _c;
1763
1803
  (_b = parameters.isConstructed) !== null && _b !== void 0 ? _b : (parameters.isConstructed = !!((_c = parameters.value) === null || _c === void 0 ? void 0 : _c.length));
@@ -1805,7 +1845,7 @@ class OctetString$1 extends BaseBlock {
1805
1845
  if (this.valueBlock.isConstructed || (this.valueBlock.value && this.valueBlock.value.length)) {
1806
1846
  return Constructed.prototype.onAsciiEncoding.call(this);
1807
1847
  }
1808
- return `${this.constructor.NAME} : ${Convert_1.ToHex(this.valueBlock.valueHexView)}`;
1848
+ return `${this.constructor.NAME} : ${buildExports.Convert.ToHex(this.valueBlock.valueHexView)}`;
1809
1849
  }
1810
1850
  getValue() {
1811
1851
  if (!this.idBlock.isConstructed) {
@@ -1813,13 +1853,13 @@ class OctetString$1 extends BaseBlock {
1813
1853
  }
1814
1854
  const array = [];
1815
1855
  for (const content of this.valueBlock.value) {
1816
- if (content instanceof OctetString$1) {
1856
+ if (content instanceof OctetString) {
1817
1857
  array.push(content.valueBlock.valueHexView);
1818
1858
  }
1819
1859
  }
1820
- return BufferSourceConverter_1.concat(array);
1860
+ return buildExports.BufferSourceConverter.concat(array);
1821
1861
  }
1822
- }
1862
+ };
1823
1863
  _a$r = OctetString$1;
1824
1864
  (() => {
1825
1865
  typeStore.OctetString = _a$r;
@@ -1865,7 +1905,7 @@ class LocalBitStringValueBlock extends HexBlock(LocalConstructedValueBlock) {
1865
1905
  }
1866
1906
  return resultOffset;
1867
1907
  }
1868
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
1908
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
1869
1909
  if (!checkBufferParams(this, inputView, inputOffset, inputLength)) {
1870
1910
  return -1;
1871
1911
  }
@@ -1918,7 +1958,7 @@ class LocalBitStringValueBlock extends HexBlock(LocalConstructedValueBlock) {
1918
1958
  LocalBitStringValueBlock.NAME = "BitStringValueBlock";
1919
1959
 
1920
1960
  var _a$q;
1921
- class BitString$1 extends BaseBlock {
1961
+ let BitString$1 = class BitString extends BaseBlock {
1922
1962
  constructor({ idBlock = {}, lenBlock = {}, ...parameters } = {}) {
1923
1963
  var _b, _c;
1924
1964
  (_b = parameters.isConstructed) !== null && _b !== void 0 ? _b : (parameters.isConstructed = !!((_c = parameters.value) === null || _c === void 0 ? void 0 : _c.length));
@@ -1955,7 +1995,7 @@ class BitString$1 extends BaseBlock {
1955
1995
  return `${this.constructor.NAME} : ${bitsStr.substring(0, bitsStr.length - this.valueBlock.unusedBits)}`;
1956
1996
  }
1957
1997
  }
1958
- }
1998
+ };
1959
1999
  _a$q = BitString$1;
1960
2000
  (() => {
1961
2001
  typeStore.BitString = _a$q;
@@ -2205,13 +2245,13 @@ class Integer extends BaseBlock {
2205
2245
  const bigIntValue = BigInt(value);
2206
2246
  const writer = new ViewWriter();
2207
2247
  const hex = bigIntValue.toString(16).replace(/^-/, "");
2208
- const view = new Uint8Array(Convert_1.FromHex(hex));
2248
+ const view = new Uint8Array(buildExports.Convert.FromHex(hex));
2209
2249
  if (bigIntValue < 0) {
2210
2250
  const first = new Uint8Array(view.length + (view[0] & 0x80 ? 1 : 0));
2211
2251
  first[0] |= 0x80;
2212
- const firstInt = BigInt(`0x${Convert_1.ToHex(first)}`);
2252
+ const firstInt = BigInt(`0x${buildExports.Convert.ToHex(first)}`);
2213
2253
  const secondInt = firstInt + bigIntValue;
2214
- const second = BufferSourceConverter_1.toUint8Array(Convert_1.FromHex(secondInt.toString(16)));
2254
+ const second = buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromHex(secondInt.toString(16)));
2215
2255
  second[0] |= 0x80;
2216
2256
  writer.write(second);
2217
2257
  }
@@ -2272,7 +2312,7 @@ class LocalSidValueBlock extends HexBlock(ValueBlock) {
2272
2312
  if (!inputLength) {
2273
2313
  return inputOffset;
2274
2314
  }
2275
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
2315
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
2276
2316
  if (!checkBufferParams(this, inputView, inputOffset, inputLength)) {
2277
2317
  return -1;
2278
2318
  }
@@ -2344,7 +2384,7 @@ class LocalSidValueBlock extends HexBlock(ValueBlock) {
2344
2384
  toString() {
2345
2385
  let result = "";
2346
2386
  if (this.isHexOnly)
2347
- result = Convert_1.ToHex(this.valueHexView);
2387
+ result = buildExports.Convert.ToHex(this.valueHexView);
2348
2388
  else {
2349
2389
  if (this.isFirstSid) {
2350
2390
  let sidValue = this.valueDec;
@@ -2541,7 +2581,7 @@ class LocalRelativeSidValueBlock extends HexBlock(LocalBaseBlock) {
2541
2581
  fromBER(inputBuffer, inputOffset, inputLength) {
2542
2582
  if (inputLength === 0)
2543
2583
  return inputOffset;
2544
- const inputView = BufferSourceConverter_1.toUint8Array(inputBuffer);
2584
+ const inputView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
2545
2585
  if (!checkBufferParams(this, inputView, inputOffset, inputLength))
2546
2586
  return -1;
2547
2587
  const intBuffer = inputView.subarray(inputOffset, inputOffset + inputLength);
@@ -2599,7 +2639,7 @@ class LocalRelativeSidValueBlock extends HexBlock(LocalBaseBlock) {
2599
2639
  toString() {
2600
2640
  let result = "";
2601
2641
  if (this.isHexOnly)
2602
- result = Convert_1.ToHex(this.valueHexView);
2642
+ result = buildExports.Convert.ToHex(this.valueHexView);
2603
2643
  else {
2604
2644
  result = this.valueDec.toString();
2605
2645
  }
@@ -2781,7 +2821,7 @@ class LocalSimpleStringBlock extends BaseStringBlock {
2781
2821
  super(parameters, LocalSimpleStringValueBlock);
2782
2822
  }
2783
2823
  fromBuffer(inputBuffer) {
2784
- this.valueBlock.value = String.fromCharCode.apply(null, BufferSourceConverter_1.toUint8Array(inputBuffer));
2824
+ this.valueBlock.value = String.fromCharCode.apply(null, buildExports.BufferSourceConverter.toUint8Array(inputBuffer));
2785
2825
  }
2786
2826
  fromString(inputString) {
2787
2827
  const strLen = inputString.length;
@@ -2795,17 +2835,17 @@ LocalSimpleStringBlock.NAME = "SIMPLE STRING";
2795
2835
 
2796
2836
  class LocalUtf8StringValueBlock extends LocalSimpleStringBlock {
2797
2837
  fromBuffer(inputBuffer) {
2798
- this.valueBlock.valueHexView = BufferSourceConverter_1.toUint8Array(inputBuffer);
2838
+ this.valueBlock.valueHexView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
2799
2839
  try {
2800
- this.valueBlock.value = Convert_1.ToUtf8String(inputBuffer);
2840
+ this.valueBlock.value = buildExports.Convert.ToUtf8String(inputBuffer);
2801
2841
  }
2802
2842
  catch (ex) {
2803
2843
  this.warnings.push(`Error during "decodeURIComponent": ${ex}, using raw string`);
2804
- this.valueBlock.value = Convert_1.ToBinary(inputBuffer);
2844
+ this.valueBlock.value = buildExports.Convert.ToBinary(inputBuffer);
2805
2845
  }
2806
2846
  }
2807
2847
  fromString(inputString) {
2808
- this.valueBlock.valueHexView = new Uint8Array(Convert_1.FromUtf8String(inputString));
2848
+ this.valueBlock.valueHexView = new Uint8Array(buildExports.Convert.FromUtf8String(inputString));
2809
2849
  this.valueBlock.value = inputString;
2810
2850
  }
2811
2851
  }
@@ -2827,12 +2867,12 @@ Utf8String.NAME = "UTF8String";
2827
2867
 
2828
2868
  class LocalBmpStringValueBlock extends LocalSimpleStringBlock {
2829
2869
  fromBuffer(inputBuffer) {
2830
- this.valueBlock.value = Convert_1.ToUtf16String(inputBuffer);
2831
- this.valueBlock.valueHexView = BufferSourceConverter_1.toUint8Array(inputBuffer);
2870
+ this.valueBlock.value = buildExports.Convert.ToUtf16String(inputBuffer);
2871
+ this.valueBlock.valueHexView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer);
2832
2872
  }
2833
2873
  fromString(inputString) {
2834
2874
  this.valueBlock.value = inputString;
2835
- this.valueBlock.valueHexView = new Uint8Array(Convert_1.FromUtf16String(inputString));
2875
+ this.valueBlock.valueHexView = new Uint8Array(buildExports.Convert.FromUtf16String(inputString));
2836
2876
  }
2837
2877
  }
2838
2878
  LocalBmpStringValueBlock.NAME = "BmpStringValueBlock";
@@ -3044,7 +3084,7 @@ class UTCTime extends VisibleString {
3044
3084
  this.idBlock.tagNumber = 23;
3045
3085
  }
3046
3086
  fromBuffer(inputBuffer) {
3047
- this.fromString(String.fromCharCode.apply(null, BufferSourceConverter_1.toUint8Array(inputBuffer)));
3087
+ this.fromString(String.fromCharCode.apply(null, buildExports.BufferSourceConverter.toUint8Array(inputBuffer)));
3048
3088
  }
3049
3089
  toBuffer() {
3050
3090
  const str = this.toString();
@@ -3394,17 +3434,17 @@ class Repeated extends Any {
3394
3434
 
3395
3435
  class RawData {
3396
3436
  constructor({ data = EMPTY_VIEW } = {}) {
3397
- this.dataView = BufferSourceConverter_1.toUint8Array(data);
3437
+ this.dataView = buildExports.BufferSourceConverter.toUint8Array(data);
3398
3438
  }
3399
3439
  get data() {
3400
3440
  return this.dataView.slice().buffer;
3401
3441
  }
3402
3442
  set data(value) {
3403
- this.dataView = BufferSourceConverter_1.toUint8Array(value);
3443
+ this.dataView = buildExports.BufferSourceConverter.toUint8Array(value);
3404
3444
  }
3405
3445
  fromBER(inputBuffer, inputOffset, inputLength) {
3406
3446
  const endLength = inputOffset + inputLength;
3407
- this.dataView = BufferSourceConverter_1.toUint8Array(inputBuffer).subarray(inputOffset, endLength);
3447
+ this.dataView = buildExports.BufferSourceConverter.toUint8Array(inputBuffer).subarray(inputOffset, endLength);
3408
3448
  return endLength;
3409
3449
  }
3410
3450
  toBER(sizeOnly) {
@@ -3723,7 +3763,7 @@ function verifySchema(inputBuffer, inputSchema) {
3723
3763
  result: { error: "Wrong ASN.1 schema type" }
3724
3764
  };
3725
3765
  }
3726
- const asn1 = localFromBER(BufferSourceConverter_1.toUint8Array(inputBuffer));
3766
+ const asn1 = localFromBER(buildExports.BufferSourceConverter.toUint8Array(inputBuffer));
3727
3767
  if (asn1.offset === -1) {
3728
3768
  return {
3729
3769
  verified: false,
@@ -3733,7 +3773,7 @@ function verifySchema(inputBuffer, inputSchema) {
3733
3773
  return compareSchema(asn1.result, asn1.result, inputSchema);
3734
3774
  }
3735
3775
 
3736
- const asn1js = /*#__PURE__*/Object.freeze({
3776
+ var asn1js = /*#__PURE__*/Object.freeze({
3737
3777
  __proto__: null,
3738
3778
  Any: Any,
3739
3779
  BaseBlock: BaseBlock,
@@ -3826,9 +3866,9 @@ class BitString {
3826
3866
  if (typeof params === "number") {
3827
3867
  this.fromNumber(params);
3828
3868
  }
3829
- else if (BufferSourceConverter_1.isBufferSource(params)) {
3869
+ else if (buildExports.BufferSourceConverter.isBufferSource(params)) {
3830
3870
  this.unusedBits = unusedBits;
3831
- this.value = BufferSourceConverter_1.toArrayBuffer(params);
3871
+ this.value = buildExports.BufferSourceConverter.toArrayBuffer(params);
3832
3872
  }
3833
3873
  else {
3834
3874
  throw TypeError("Unsupported type of 'params' argument for BitString");
@@ -3866,7 +3906,11 @@ class BitString {
3866
3906
  const octetSize = (bits.length + 7) >> 3;
3867
3907
  this.unusedBits = (octetSize << 3) - bits.length;
3868
3908
  const octets = new Uint8Array(octetSize);
3869
- bits = bits.padStart(octetSize << 3, "0").split("").reverse().join("");
3909
+ bits = bits
3910
+ .padStart(octetSize << 3, "0")
3911
+ .split("")
3912
+ .reverse()
3913
+ .join("");
3870
3914
  let index = 0;
3871
3915
  while (index < octetSize) {
3872
3916
  octets[index] = parseInt(bits.slice(index << 3, (index << 3) + 8), 2);
@@ -3888,8 +3932,8 @@ class OctetString {
3888
3932
  this.buffer = new ArrayBuffer(param);
3889
3933
  }
3890
3934
  else {
3891
- if (BufferSourceConverter_1.isBufferSource(param)) {
3892
- this.buffer = BufferSourceConverter_1.toArrayBuffer(param);
3935
+ if (buildExports.BufferSourceConverter.isBufferSource(param)) {
3936
+ this.buffer = buildExports.BufferSourceConverter.toArrayBuffer(param);
3893
3937
  }
3894
3938
  else if (Array.isArray(param)) {
3895
3939
  this.buffer = new Uint8Array(param);
@@ -4127,7 +4171,7 @@ class AsnSchemaStorage {
4127
4171
  const item = schema.items[key];
4128
4172
  const name = useNames ? key : "";
4129
4173
  let asn1Item;
4130
- if (typeof (item.type) === "number") {
4174
+ if (typeof item.type === "number") {
4131
4175
  const Asn1TypeName = exports.AsnPropTypes[item.type];
4132
4176
  const Asn1Type = asn1js[Asn1TypeName];
4133
4177
  if (!Asn1Type) {
@@ -4155,9 +4199,7 @@ class AsnSchemaStorage {
4155
4199
  const optional = !!item.optional || item.defaultValue !== undefined;
4156
4200
  if (item.repeated) {
4157
4201
  asn1Item.name = "";
4158
- const Container = item.repeated === "set"
4159
- ? Set
4160
- : Sequence;
4202
+ const Container = item.repeated === "set" ? Set : Sequence;
4161
4203
  asn1Item = new Container({
4162
4204
  name: "",
4163
4205
  value: [
@@ -4171,9 +4213,7 @@ class AsnSchemaStorage {
4171
4213
  if (item.context !== null && item.context !== undefined) {
4172
4214
  if (item.implicit) {
4173
4215
  if (typeof item.type === "number" || isConvertible(item.type)) {
4174
- const Container = item.repeated
4175
- ? Constructed
4176
- : Primitive;
4216
+ const Container = item.repeated ? Constructed : Primitive;
4177
4217
  asn1Value.push(new Container({
4178
4218
  name,
4179
4219
  optional,
@@ -4186,10 +4226,11 @@ class AsnSchemaStorage {
4186
4226
  else {
4187
4227
  this.cache(item.type);
4188
4228
  const isRepeated = !!item.repeated;
4189
- let value = !isRepeated
4190
- ? this.get(item.type, true).schema
4191
- : asn1Item;
4192
- value = "valueBlock" in value ? value.valueBlock.value : value.value;
4229
+ let value = !isRepeated ? this.get(item.type, true).schema : asn1Item;
4230
+ value =
4231
+ "valueBlock" in value
4232
+ ? value.valueBlock.value
4233
+ : value.value;
4193
4234
  asn1Value.push(new Constructed({
4194
4235
  name: !isRepeated ? name : "",
4195
4236
  optional,
@@ -4350,16 +4391,15 @@ class AsnParser {
4350
4391
  }
4351
4392
  if (schemaItem.repeated) {
4352
4393
  if (schemaItem.implicit) {
4353
- const Container = schemaItem.repeated === "sequence"
4354
- ? Sequence
4355
- : Set;
4394
+ const Container = schemaItem.repeated === "sequence" ? Sequence : Set;
4356
4395
  const newItem = new Container();
4357
4396
  newItem.valueBlock = asn1SchemaValue.valueBlock;
4358
4397
  const newItemAsn = fromBER(newItem.toBER(false));
4359
4398
  if (newItemAsn.offset === -1) {
4360
4399
  throw new Error(`Cannot parse the child item. ${newItemAsn.result.error}`);
4361
4400
  }
4362
- if (!("value" in newItemAsn.result.valueBlock && Array.isArray(newItemAsn.result.valueBlock.value))) {
4401
+ if (!("value" in newItemAsn.result.valueBlock &&
4402
+ Array.isArray(newItemAsn.result.valueBlock.value))) {
4363
4403
  throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");
4364
4404
  }
4365
4405
  const value = newItemAsn.result.valueBlock.value;
@@ -4450,19 +4490,23 @@ class AsnSerializer {
4450
4490
  for (const key in schema.items) {
4451
4491
  const schemaItem = schema.items[key];
4452
4492
  const objProp = obj[key];
4453
- if (objProp === undefined
4454
- || schemaItem.defaultValue === objProp
4455
- || (typeof schemaItem.defaultValue === "object" && typeof objProp === "object"
4456
- && isArrayEqual(this.serialize(schemaItem.defaultValue), this.serialize(objProp)))) {
4493
+ if (objProp === undefined ||
4494
+ schemaItem.defaultValue === objProp ||
4495
+ (typeof schemaItem.defaultValue === "object" &&
4496
+ typeof objProp === "object" &&
4497
+ isArrayEqual(this.serialize(schemaItem.defaultValue), this.serialize(objProp)))) {
4457
4498
  continue;
4458
4499
  }
4459
4500
  const asn1Item = AsnSerializer.toAsnItem(schemaItem, key, target, objProp);
4460
4501
  if (typeof schemaItem.context === "number") {
4461
4502
  if (schemaItem.implicit) {
4462
- if (!schemaItem.repeated
4463
- && (typeof schemaItem.type === "number" || isConvertible(schemaItem.type))) {
4503
+ if (!schemaItem.repeated &&
4504
+ (typeof schemaItem.type === "number" || isConvertible(schemaItem.type))) {
4464
4505
  const value = {};
4465
- value.valueHex = asn1Item instanceof Null ? asn1Item.valueBeforeDecodeView : asn1Item.valueBlock.toBER();
4506
+ value.valueHex =
4507
+ asn1Item instanceof Null
4508
+ ? asn1Item.valueBeforeDecodeView
4509
+ : asn1Item.valueBlock.toBER();
4466
4510
  asn1Value.push(new Primitive({
4467
4511
  optional: schemaItem.optional,
4468
4512
  idBlock: {
@@ -4521,7 +4565,7 @@ class AsnSerializer {
4521
4565
  }
4522
4566
  static toAsnItem(schemaItem, key, target, objProp) {
4523
4567
  let asn1Item;
4524
- if (typeof (schemaItem.type) === "number") {
4568
+ if (typeof schemaItem.type === "number") {
4525
4569
  const converter = schemaItem.converter;
4526
4570
  if (!converter) {
4527
4571
  throw new Error(`Property '${key}' doesn't have converter for type ${exports.AsnPropTypes[schemaItem.type]} in schema '${target.name}'`);
@@ -4531,9 +4575,7 @@ class AsnSerializer {
4531
4575
  throw new TypeError("Parameter 'objProp' should be type of Array.");
4532
4576
  }
4533
4577
  const items = Array.from(objProp, (element) => converter.toASN(element));
4534
- const Container = schemaItem.repeated === "sequence"
4535
- ? Sequence
4536
- : Set;
4578
+ const Container = schemaItem.repeated === "sequence" ? Sequence : Set;
4537
4579
  asn1Item = new Container({
4538
4580
  value: items,
4539
4581
  });
@@ -4548,1086 +4590,186 @@ class AsnSerializer {
4548
4590
  throw new TypeError("Parameter 'objProp' should be type of Array.");
4549
4591
  }
4550
4592
  const items = Array.from(objProp, (element) => this.toASN(element));
4551
- const Container = schemaItem.repeated === "sequence"
4552
- ? Sequence
4553
- : Set;
4554
- asn1Item = new Container({
4555
- value: items,
4556
- });
4557
- }
4558
- else {
4559
- asn1Item = this.toASN(objProp);
4560
- }
4561
- }
4562
- return asn1Item;
4563
- }
4564
- }
4565
-
4566
- class AsnArray extends Array {
4567
- constructor(items = []) {
4568
- if (typeof items === "number") {
4569
- super(items);
4570
- }
4571
- else {
4572
- super();
4573
- for (const item of items) {
4574
- this.push(item);
4575
- }
4576
- }
4577
- }
4578
- }
4579
-
4580
- class AsnConvert {
4581
- static serialize(obj) {
4582
- return AsnSerializer.serialize(obj);
4583
- }
4584
- static parse(data, target) {
4585
- return AsnParser.parse(data, target);
4586
- }
4587
- static toString(data) {
4588
- const buf = BufferSourceConverter_1.isBufferSource(data)
4589
- ? BufferSourceConverter_1.toArrayBuffer(data)
4590
- : AsnConvert.serialize(data);
4591
- const asn = fromBER(buf);
4592
- if (asn.offset === -1) {
4593
- throw new Error(`Cannot decode ASN.1 data. ${asn.result.error}`);
4594
- }
4595
- return asn.result.toString();
4596
- }
4597
- }
4598
-
4599
- /******************************************************************************
4600
- Copyright (c) Microsoft Corporation.
4601
-
4602
- Permission to use, copy, modify, and/or distribute this software for any
4603
- purpose with or without fee is hereby granted.
4604
-
4605
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
4606
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
4607
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
4608
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
4609
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
4610
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4611
- PERFORMANCE OF THIS SOFTWARE.
4612
- ***************************************************************************** */
4613
-
4614
- function __decorate$1(decorators, target, key, desc) {
4615
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4616
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4617
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4618
- return c > 3 && r && Object.defineProperty(target, key, r), r;
4619
- }
4620
-
4621
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
4622
- var e = new Error(message);
4623
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
4624
- };
4625
-
4626
- var ipaddr = {exports: {}};
4627
-
4628
- (function (module) {
4629
- (function (root) {
4630
- // A list of regular expressions that match arbitrary IPv4 addresses,
4631
- // for which a number of weird notations exist.
4632
- // Note that an address like 0010.0xa5.1.1 is considered legal.
4633
- const ipv4Part = '(0?\\d+|0x[a-f0-9]+)';
4634
- const ipv4Regexes = {
4635
- fourOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}$`, 'i'),
4636
- threeOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}$`, 'i'),
4637
- twoOctet: new RegExp(`^${ipv4Part}\\.${ipv4Part}$`, 'i'),
4638
- longValue: new RegExp(`^${ipv4Part}$`, 'i')
4639
- };
4640
-
4641
- // Regular Expression for checking Octal numbers
4642
- const octalRegex = new RegExp(`^0[0-7]+$`, 'i');
4643
- const hexRegex = new RegExp(`^0x[a-f0-9]+$`, 'i');
4644
-
4645
- const zoneIndex = '%[0-9a-z]{1,}';
4646
-
4647
- // IPv6-matching regular expressions.
4648
- // For IPv6, the task is simpler: it is enough to match the colon-delimited
4649
- // hexadecimal IPv6 and a transitional variant with dotted-decimal IPv4 at
4650
- // the end.
4651
- const ipv6Part = '(?:[0-9a-f]+::?)+';
4652
- const ipv6Regexes = {
4653
- zoneIndex: new RegExp(zoneIndex, 'i'),
4654
- 'native': new RegExp(`^(::)?(${ipv6Part})?([0-9a-f]+)?(::)?(${zoneIndex})?$`, 'i'),
4655
- deprecatedTransitional: new RegExp(`^(?:::)(${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}(${zoneIndex})?)$`, 'i'),
4656
- transitional: new RegExp(`^((?:${ipv6Part})|(?:::)(?:${ipv6Part})?)${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}\\.${ipv4Part}(${zoneIndex})?$`, 'i')
4657
- };
4658
-
4659
- // Expand :: in an IPv6 address or address part consisting of `parts` groups.
4660
- function expandIPv6 (string, parts) {
4661
- // More than one '::' means invalid adddress
4662
- if (string.indexOf('::') !== string.lastIndexOf('::')) {
4663
- return null;
4664
- }
4665
-
4666
- let colonCount = 0;
4667
- let lastColon = -1;
4668
- let zoneId = (string.match(ipv6Regexes.zoneIndex) || [])[0];
4669
- let replacement, replacementCount;
4670
-
4671
- // Remove zone index and save it for later
4672
- if (zoneId) {
4673
- zoneId = zoneId.substring(1);
4674
- string = string.replace(/%.+$/, '');
4675
- }
4676
-
4677
- // How many parts do we already have?
4678
- while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) {
4679
- colonCount++;
4680
- }
4681
-
4682
- // 0::0 is two parts more than ::
4683
- if (string.substr(0, 2) === '::') {
4684
- colonCount--;
4685
- }
4686
-
4687
- if (string.substr(-2, 2) === '::') {
4688
- colonCount--;
4689
- }
4690
-
4691
- // The following loop would hang if colonCount > parts
4692
- if (colonCount > parts) {
4693
- return null;
4694
- }
4695
-
4696
- // replacement = ':' + '0:' * (parts - colonCount)
4697
- replacementCount = parts - colonCount;
4698
- replacement = ':';
4699
- while (replacementCount--) {
4700
- replacement += '0:';
4701
- }
4702
-
4703
- // Insert the missing zeroes
4704
- string = string.replace('::', replacement);
4705
-
4706
- // Trim any garbage which may be hanging around if :: was at the edge in
4707
- // the source strin
4708
- if (string[0] === ':') {
4709
- string = string.slice(1);
4710
- }
4711
-
4712
- if (string[string.length - 1] === ':') {
4713
- string = string.slice(0, -1);
4714
- }
4715
-
4716
- parts = (function () {
4717
- const ref = string.split(':');
4718
- const results = [];
4719
-
4720
- for (let i = 0; i < ref.length; i++) {
4721
- results.push(parseInt(ref[i], 16));
4722
- }
4723
-
4724
- return results;
4725
- })();
4726
-
4727
- return {
4728
- parts: parts,
4729
- zoneId: zoneId
4730
- };
4731
- }
4732
-
4733
- // A generic CIDR (Classless Inter-Domain Routing) RFC1518 range matcher.
4734
- function matchCIDR (first, second, partSize, cidrBits) {
4735
- if (first.length !== second.length) {
4736
- throw new Error('ipaddr: cannot match CIDR for objects with different lengths');
4737
- }
4738
-
4739
- let part = 0;
4740
- let shift;
4741
-
4742
- while (cidrBits > 0) {
4743
- shift = partSize - cidrBits;
4744
- if (shift < 0) {
4745
- shift = 0;
4746
- }
4747
-
4748
- if (first[part] >> shift !== second[part] >> shift) {
4749
- return false;
4750
- }
4751
-
4752
- cidrBits -= partSize;
4753
- part += 1;
4754
- }
4755
-
4756
- return true;
4757
- }
4758
-
4759
- function parseIntAuto (string) {
4760
- // Hexadedimal base 16 (0x#)
4761
- if (hexRegex.test(string)) {
4762
- return parseInt(string, 16);
4763
- }
4764
- // While octal representation is discouraged by ECMAScript 3
4765
- // and forbidden by ECMAScript 5, we silently allow it to
4766
- // work only if the rest of the string has numbers less than 8.
4767
- if (string[0] === '0' && !isNaN(parseInt(string[1], 10))) {
4768
- if (octalRegex.test(string)) {
4769
- return parseInt(string, 8);
4770
- }
4771
- throw new Error(`ipaddr: cannot parse ${string} as octal`);
4772
- }
4773
- // Always include the base 10 radix!
4774
- return parseInt(string, 10);
4775
- }
4776
-
4777
- function padPart (part, length) {
4778
- while (part.length < length) {
4779
- part = `0${part}`;
4780
- }
4781
-
4782
- return part;
4783
- }
4784
-
4785
- const ipaddr = {};
4786
-
4787
- // An IPv4 address (RFC791).
4788
- ipaddr.IPv4 = (function () {
4789
- // Constructs a new IPv4 address from an array of four octets
4790
- // in network order (MSB first)
4791
- // Verifies the input.
4792
- function IPv4 (octets) {
4793
- if (octets.length !== 4) {
4794
- throw new Error('ipaddr: ipv4 octet count should be 4');
4795
- }
4796
-
4797
- let i, octet;
4798
-
4799
- for (i = 0; i < octets.length; i++) {
4800
- octet = octets[i];
4801
- if (!((0 <= octet && octet <= 255))) {
4802
- throw new Error('ipaddr: ipv4 octet should fit in 8 bits');
4803
- }
4804
- }
4805
-
4806
- this.octets = octets;
4807
- }
4808
-
4809
- // Special IPv4 address ranges.
4810
- // See also https://en.wikipedia.org/wiki/Reserved_IP_addresses
4811
- IPv4.prototype.SpecialRanges = {
4812
- unspecified: [[new IPv4([0, 0, 0, 0]), 8]],
4813
- broadcast: [[new IPv4([255, 255, 255, 255]), 32]],
4814
- // RFC3171
4815
- multicast: [[new IPv4([224, 0, 0, 0]), 4]],
4816
- // RFC3927
4817
- linkLocal: [[new IPv4([169, 254, 0, 0]), 16]],
4818
- // RFC5735
4819
- loopback: [[new IPv4([127, 0, 0, 0]), 8]],
4820
- // RFC6598
4821
- carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]],
4822
- // RFC1918
4823
- 'private': [
4824
- [new IPv4([10, 0, 0, 0]), 8],
4825
- [new IPv4([172, 16, 0, 0]), 12],
4826
- [new IPv4([192, 168, 0, 0]), 16]
4827
- ],
4828
- // Reserved and testing-only ranges; RFCs 5735, 5737, 2544, 1700
4829
- reserved: [
4830
- [new IPv4([192, 0, 0, 0]), 24],
4831
- [new IPv4([192, 0, 2, 0]), 24],
4832
- [new IPv4([192, 88, 99, 0]), 24],
4833
- [new IPv4([198, 18, 0, 0]), 15],
4834
- [new IPv4([198, 51, 100, 0]), 24],
4835
- [new IPv4([203, 0, 113, 0]), 24],
4836
- [new IPv4([240, 0, 0, 0]), 4]
4837
- ]
4838
- };
4839
-
4840
- // The 'kind' method exists on both IPv4 and IPv6 classes.
4841
- IPv4.prototype.kind = function () {
4842
- return 'ipv4';
4843
- };
4844
-
4845
- // Checks if this address matches other one within given CIDR range.
4846
- IPv4.prototype.match = function (other, cidrRange) {
4847
- let ref;
4848
- if (cidrRange === undefined) {
4849
- ref = other;
4850
- other = ref[0];
4851
- cidrRange = ref[1];
4852
- }
4853
-
4854
- if (other.kind() !== 'ipv4') {
4855
- throw new Error('ipaddr: cannot match ipv4 address with non-ipv4 one');
4856
- }
4857
-
4858
- return matchCIDR(this.octets, other.octets, 8, cidrRange);
4859
- };
4860
-
4861
- // returns a number of leading ones in IPv4 address, making sure that
4862
- // the rest is a solid sequence of 0's (valid netmask)
4863
- // returns either the CIDR length or null if mask is not valid
4864
- IPv4.prototype.prefixLengthFromSubnetMask = function () {
4865
- let cidr = 0;
4866
- // non-zero encountered stop scanning for zeroes
4867
- let stop = false;
4868
- // number of zeroes in octet
4869
- const zerotable = {
4870
- 0: 8,
4871
- 128: 7,
4872
- 192: 6,
4873
- 224: 5,
4874
- 240: 4,
4875
- 248: 3,
4876
- 252: 2,
4877
- 254: 1,
4878
- 255: 0
4879
- };
4880
- let i, octet, zeros;
4881
-
4882
- for (i = 3; i >= 0; i -= 1) {
4883
- octet = this.octets[i];
4884
- if (octet in zerotable) {
4885
- zeros = zerotable[octet];
4886
- if (stop && zeros !== 0) {
4887
- return null;
4888
- }
4889
-
4890
- if (zeros !== 8) {
4891
- stop = true;
4892
- }
4893
-
4894
- cidr += zeros;
4895
- } else {
4896
- return null;
4897
- }
4898
- }
4899
-
4900
- return 32 - cidr;
4901
- };
4902
-
4903
- // Checks if the address corresponds to one of the special ranges.
4904
- IPv4.prototype.range = function () {
4905
- return ipaddr.subnetMatch(this, this.SpecialRanges);
4906
- };
4907
-
4908
- // Returns an array of byte-sized values in network order (MSB first)
4909
- IPv4.prototype.toByteArray = function () {
4910
- return this.octets.slice(0);
4911
- };
4912
-
4913
- // Converts this IPv4 address to an IPv4-mapped IPv6 address.
4914
- IPv4.prototype.toIPv4MappedAddress = function () {
4915
- return ipaddr.IPv6.parse(`::ffff:${this.toString()}`);
4916
- };
4917
-
4918
- // Symmetrical method strictly for aligning with the IPv6 methods.
4919
- IPv4.prototype.toNormalizedString = function () {
4920
- return this.toString();
4921
- };
4922
-
4923
- // Returns the address in convenient, decimal-dotted format.
4924
- IPv4.prototype.toString = function () {
4925
- return this.octets.join('.');
4926
- };
4927
-
4928
- return IPv4;
4929
- })();
4930
-
4931
- // A utility function to return broadcast address given the IPv4 interface and prefix length in CIDR notation
4932
- ipaddr.IPv4.broadcastAddressFromCIDR = function (string) {
4933
-
4934
- try {
4935
- const cidr = this.parseCIDR(string);
4936
- const ipInterfaceOctets = cidr[0].toByteArray();
4937
- const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
4938
- const octets = [];
4939
- let i = 0;
4940
- while (i < 4) {
4941
- // Broadcast address is bitwise OR between ip interface and inverted mask
4942
- octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255);
4943
- i++;
4944
- }
4945
-
4946
- return new this(octets);
4947
- } catch (e) {
4948
- throw new Error('ipaddr: the address does not have IPv4 CIDR format');
4949
- }
4950
- };
4951
-
4952
- // Checks if a given string is formatted like IPv4 address.
4953
- ipaddr.IPv4.isIPv4 = function (string) {
4954
- return this.parser(string) !== null;
4955
- };
4956
-
4957
- // Checks if a given string is a valid IPv4 address.
4958
- ipaddr.IPv4.isValid = function (string) {
4959
- try {
4960
- new this(this.parser(string));
4961
- return true;
4962
- } catch (e) {
4963
- return false;
4964
- }
4965
- };
4966
-
4967
- // Checks if a given string is a full four-part IPv4 Address.
4968
- ipaddr.IPv4.isValidFourPartDecimal = function (string) {
4969
- if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) {
4970
- return true;
4971
- } else {
4972
- return false;
4973
- }
4974
- };
4975
-
4976
- // A utility function to return network address given the IPv4 interface and prefix length in CIDR notation
4977
- ipaddr.IPv4.networkAddressFromCIDR = function (string) {
4978
- let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets;
4979
-
4980
- try {
4981
- cidr = this.parseCIDR(string);
4982
- ipInterfaceOctets = cidr[0].toByteArray();
4983
- subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
4984
- octets = [];
4985
- i = 0;
4986
- while (i < 4) {
4987
- // Network address is bitwise AND between ip interface and mask
4988
- octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10));
4989
- i++;
4990
- }
4991
-
4992
- return new this(octets);
4993
- } catch (e) {
4994
- throw new Error('ipaddr: the address does not have IPv4 CIDR format');
4995
- }
4996
- };
4997
-
4998
- // Tries to parse and validate a string with IPv4 address.
4999
- // Throws an error if it fails.
5000
- ipaddr.IPv4.parse = function (string) {
5001
- const parts = this.parser(string);
5002
-
5003
- if (parts === null) {
5004
- throw new Error('ipaddr: string is not formatted like an IPv4 Address');
5005
- }
5006
-
5007
- return new this(parts);
5008
- };
5009
-
5010
- // Parses the string as an IPv4 Address with CIDR Notation.
5011
- ipaddr.IPv4.parseCIDR = function (string) {
5012
- let match;
5013
-
5014
- if ((match = string.match(/^(.+)\/(\d+)$/))) {
5015
- const maskLength = parseInt(match[2]);
5016
- if (maskLength >= 0 && maskLength <= 32) {
5017
- const parsed = [this.parse(match[1]), maskLength];
5018
- Object.defineProperty(parsed, 'toString', {
5019
- value: function () {
5020
- return this.join('/');
5021
- }
5022
- });
5023
- return parsed;
5024
- }
5025
- }
5026
-
5027
- throw new Error('ipaddr: string is not formatted like an IPv4 CIDR range');
5028
- };
5029
-
5030
- // Classful variants (like a.b, where a is an octet, and b is a 24-bit
5031
- // value representing last three octets; this corresponds to a class C
5032
- // address) are omitted due to classless nature of modern Internet.
5033
- ipaddr.IPv4.parser = function (string) {
5034
- let match, part, value;
5035
-
5036
- // parseInt recognizes all that octal & hexadecimal weirdness for us
5037
- if ((match = string.match(ipv4Regexes.fourOctet))) {
5038
- return (function () {
5039
- const ref = match.slice(1, 6);
5040
- const results = [];
5041
-
5042
- for (let i = 0; i < ref.length; i++) {
5043
- part = ref[i];
5044
- results.push(parseIntAuto(part));
5045
- }
5046
-
5047
- return results;
5048
- })();
5049
- } else if ((match = string.match(ipv4Regexes.longValue))) {
5050
- value = parseIntAuto(match[1]);
5051
- if (value > 0xffffffff || value < 0) {
5052
- throw new Error('ipaddr: address outside defined range');
5053
- }
5054
-
5055
- return ((function () {
5056
- const results = [];
5057
- let shift;
5058
-
5059
- for (shift = 0; shift <= 24; shift += 8) {
5060
- results.push((value >> shift) & 0xff);
5061
- }
5062
-
5063
- return results;
5064
- })()).reverse();
5065
- } else if ((match = string.match(ipv4Regexes.twoOctet))) {
5066
- return (function () {
5067
- const ref = match.slice(1, 4);
5068
- const results = [];
5069
-
5070
- value = parseIntAuto(ref[1]);
5071
- if (value > 0xffffff || value < 0) {
5072
- throw new Error('ipaddr: address outside defined range');
5073
- }
5074
-
5075
- results.push(parseIntAuto(ref[0]));
5076
- results.push((value >> 16) & 0xff);
5077
- results.push((value >> 8) & 0xff);
5078
- results.push( value & 0xff);
5079
-
5080
- return results;
5081
- })();
5082
- } else if ((match = string.match(ipv4Regexes.threeOctet))) {
5083
- return (function () {
5084
- const ref = match.slice(1, 5);
5085
- const results = [];
5086
-
5087
- value = parseIntAuto(ref[2]);
5088
- if (value > 0xffff || value < 0) {
5089
- throw new Error('ipaddr: address outside defined range');
5090
- }
5091
-
5092
- results.push(parseIntAuto(ref[0]));
5093
- results.push(parseIntAuto(ref[1]));
5094
- results.push((value >> 8) & 0xff);
5095
- results.push( value & 0xff);
5096
-
5097
- return results;
5098
- })();
5099
- } else {
5100
- return null;
5101
- }
5102
- };
5103
-
5104
- // A utility function to return subnet mask in IPv4 format given the prefix length
5105
- ipaddr.IPv4.subnetMaskFromPrefixLength = function (prefix) {
5106
- prefix = parseInt(prefix);
5107
- if (prefix < 0 || prefix > 32) {
5108
- throw new Error('ipaddr: invalid IPv4 prefix length');
5109
- }
5110
-
5111
- const octets = [0, 0, 0, 0];
5112
- let j = 0;
5113
- const filledOctetCount = Math.floor(prefix / 8);
5114
-
5115
- while (j < filledOctetCount) {
5116
- octets[j] = 255;
5117
- j++;
5118
- }
5119
-
5120
- if (filledOctetCount < 4) {
5121
- octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8);
5122
- }
5123
-
5124
- return new this(octets);
5125
- };
5126
-
5127
- // An IPv6 address (RFC2460)
5128
- ipaddr.IPv6 = (function () {
5129
- // Constructs an IPv6 address from an array of eight 16 - bit parts
5130
- // or sixteen 8 - bit parts in network order(MSB first).
5131
- // Throws an error if the input is invalid.
5132
- function IPv6 (parts, zoneId) {
5133
- let i, part;
5134
-
5135
- if (parts.length === 16) {
5136
- this.parts = [];
5137
- for (i = 0; i <= 14; i += 2) {
5138
- this.parts.push((parts[i] << 8) | parts[i + 1]);
5139
- }
5140
- } else if (parts.length === 8) {
5141
- this.parts = parts;
5142
- } else {
5143
- throw new Error('ipaddr: ipv6 part count should be 8 or 16');
5144
- }
5145
-
5146
- for (i = 0; i < this.parts.length; i++) {
5147
- part = this.parts[i];
5148
- if (!((0 <= part && part <= 0xffff))) {
5149
- throw new Error('ipaddr: ipv6 part should fit in 16 bits');
5150
- }
5151
- }
5152
-
5153
- if (zoneId) {
5154
- this.zoneId = zoneId;
5155
- }
5156
- }
5157
-
5158
- // Special IPv6 ranges
5159
- IPv6.prototype.SpecialRanges = {
5160
- // RFC4291, here and after
5161
- unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128],
5162
- linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10],
5163
- multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8],
5164
- loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128],
5165
- uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7],
5166
- ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96],
5167
- // RFC6145
5168
- rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96],
5169
- // RFC6052
5170
- rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],
5171
- // RFC3056
5172
- '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16],
5173
- // RFC6052, RFC6146
5174
- teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32],
5175
- // RFC4291
5176
- reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]],
5177
- benchmarking: [new IPv6([0x2001, 0x2, 0, 0, 0, 0, 0, 0]), 48],
5178
- amt: [new IPv6([0x2001, 0x3, 0, 0, 0, 0, 0, 0]), 32],
5179
- as112v6: [new IPv6([0x2001, 0x4, 0x112, 0, 0, 0, 0, 0]), 48],
5180
- deprecated: [new IPv6([0x2001, 0x10, 0, 0, 0, 0, 0, 0]), 28],
5181
- orchid2: [new IPv6([0x2001, 0x20, 0, 0, 0, 0, 0, 0]), 28]
5182
- };
5183
-
5184
- // Checks if this address is an IPv4-mapped IPv6 address.
5185
- IPv6.prototype.isIPv4MappedAddress = function () {
5186
- return this.range() === 'ipv4Mapped';
5187
- };
5188
-
5189
- // The 'kind' method exists on both IPv4 and IPv6 classes.
5190
- IPv6.prototype.kind = function () {
5191
- return 'ipv6';
5192
- };
5193
-
5194
- // Checks if this address matches other one within given CIDR range.
5195
- IPv6.prototype.match = function (other, cidrRange) {
5196
- let ref;
5197
-
5198
- if (cidrRange === undefined) {
5199
- ref = other;
5200
- other = ref[0];
5201
- cidrRange = ref[1];
5202
- }
5203
-
5204
- if (other.kind() !== 'ipv6') {
5205
- throw new Error('ipaddr: cannot match ipv6 address with non-ipv6 one');
5206
- }
5207
-
5208
- return matchCIDR(this.parts, other.parts, 16, cidrRange);
5209
- };
5210
-
5211
- // returns a number of leading ones in IPv6 address, making sure that
5212
- // the rest is a solid sequence of 0's (valid netmask)
5213
- // returns either the CIDR length or null if mask is not valid
5214
- IPv6.prototype.prefixLengthFromSubnetMask = function () {
5215
- let cidr = 0;
5216
- // non-zero encountered stop scanning for zeroes
5217
- let stop = false;
5218
- // number of zeroes in octet
5219
- const zerotable = {
5220
- 0: 16,
5221
- 32768: 15,
5222
- 49152: 14,
5223
- 57344: 13,
5224
- 61440: 12,
5225
- 63488: 11,
5226
- 64512: 10,
5227
- 65024: 9,
5228
- 65280: 8,
5229
- 65408: 7,
5230
- 65472: 6,
5231
- 65504: 5,
5232
- 65520: 4,
5233
- 65528: 3,
5234
- 65532: 2,
5235
- 65534: 1,
5236
- 65535: 0
5237
- };
5238
- let part, zeros;
5239
-
5240
- for (let i = 7; i >= 0; i -= 1) {
5241
- part = this.parts[i];
5242
- if (part in zerotable) {
5243
- zeros = zerotable[part];
5244
- if (stop && zeros !== 0) {
5245
- return null;
5246
- }
5247
-
5248
- if (zeros !== 16) {
5249
- stop = true;
5250
- }
5251
-
5252
- cidr += zeros;
5253
- } else {
5254
- return null;
5255
- }
5256
- }
5257
-
5258
- return 128 - cidr;
5259
- };
5260
-
5261
-
5262
- // Checks if the address corresponds to one of the special ranges.
5263
- IPv6.prototype.range = function () {
5264
- return ipaddr.subnetMatch(this, this.SpecialRanges);
5265
- };
5266
-
5267
- // Returns an array of byte-sized values in network order (MSB first)
5268
- IPv6.prototype.toByteArray = function () {
5269
- let part;
5270
- const bytes = [];
5271
- const ref = this.parts;
5272
- for (let i = 0; i < ref.length; i++) {
5273
- part = ref[i];
5274
- bytes.push(part >> 8);
5275
- bytes.push(part & 0xff);
5276
- }
5277
-
5278
- return bytes;
5279
- };
5280
-
5281
- // Returns the address in expanded format with all zeroes included, like
5282
- // 2001:0db8:0008:0066:0000:0000:0000:0001
5283
- IPv6.prototype.toFixedLengthString = function () {
5284
- const addr = ((function () {
5285
- const results = [];
5286
- for (let i = 0; i < this.parts.length; i++) {
5287
- results.push(padPart(this.parts[i].toString(16), 4));
5288
- }
5289
-
5290
- return results;
5291
- }).call(this)).join(':');
5292
-
5293
- let suffix = '';
5294
-
5295
- if (this.zoneId) {
5296
- suffix = `%${this.zoneId}`;
5297
- }
5298
-
5299
- return addr + suffix;
5300
- };
5301
-
5302
- // Converts this address to IPv4 address if it is an IPv4-mapped IPv6 address.
5303
- // Throws an error otherwise.
5304
- IPv6.prototype.toIPv4Address = function () {
5305
- if (!this.isIPv4MappedAddress()) {
5306
- throw new Error('ipaddr: trying to convert a generic ipv6 address to ipv4');
5307
- }
5308
-
5309
- const ref = this.parts.slice(-2);
5310
- const high = ref[0];
5311
- const low = ref[1];
5312
-
5313
- return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]);
5314
- };
5315
-
5316
- // Returns the address in expanded format with all zeroes included, like
5317
- // 2001:db8:8:66:0:0:0:1
5318
- //
5319
- // Deprecated: use toFixedLengthString() instead.
5320
- IPv6.prototype.toNormalizedString = function () {
5321
- const addr = ((function () {
5322
- const results = [];
5323
-
5324
- for (let i = 0; i < this.parts.length; i++) {
5325
- results.push(this.parts[i].toString(16));
5326
- }
5327
-
5328
- return results;
5329
- }).call(this)).join(':');
5330
-
5331
- let suffix = '';
5332
-
5333
- if (this.zoneId) {
5334
- suffix = `%${this.zoneId}`;
5335
- }
5336
-
5337
- return addr + suffix;
5338
- };
5339
-
5340
- // Returns the address in compact, human-readable format like
5341
- // 2001:db8:8:66::1
5342
- // in line with RFC 5952 (see https://tools.ietf.org/html/rfc5952#section-4)
5343
- IPv6.prototype.toRFC5952String = function () {
5344
- const regex = /((^|:)(0(:|$)){2,})/g;
5345
- const string = this.toNormalizedString();
5346
- let bestMatchIndex = 0;
5347
- let bestMatchLength = -1;
5348
- let match;
5349
-
5350
- while ((match = regex.exec(string))) {
5351
- if (match[0].length > bestMatchLength) {
5352
- bestMatchIndex = match.index;
5353
- bestMatchLength = match[0].length;
5354
- }
5355
- }
5356
-
5357
- if (bestMatchLength < 0) {
5358
- return string;
5359
- }
5360
-
5361
- return `${string.substring(0, bestMatchIndex)}::${string.substring(bestMatchIndex + bestMatchLength)}`;
5362
- };
5363
-
5364
- // Returns the address in compact, human-readable format like
5365
- // 2001:db8:8:66::1
5366
- // Calls toRFC5952String under the hood.
5367
- IPv6.prototype.toString = function () {
5368
- return this.toRFC5952String();
5369
- };
5370
-
5371
- return IPv6;
5372
-
5373
- })();
5374
-
5375
- // A utility function to return broadcast address given the IPv6 interface and prefix length in CIDR notation
5376
- ipaddr.IPv6.broadcastAddressFromCIDR = function (string) {
5377
- try {
5378
- const cidr = this.parseCIDR(string);
5379
- const ipInterfaceOctets = cidr[0].toByteArray();
5380
- const subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
5381
- const octets = [];
5382
- let i = 0;
5383
- while (i < 16) {
5384
- // Broadcast address is bitwise OR between ip interface and inverted mask
5385
- octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255);
5386
- i++;
5387
- }
5388
-
5389
- return new this(octets);
5390
- } catch (e) {
5391
- throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`);
5392
- }
5393
- };
5394
-
5395
- // Checks if a given string is formatted like IPv6 address.
5396
- ipaddr.IPv6.isIPv6 = function (string) {
5397
- return this.parser(string) !== null;
5398
- };
5399
-
5400
- // Checks to see if string is a valid IPv6 Address
5401
- ipaddr.IPv6.isValid = function (string) {
5402
-
5403
- // Since IPv6.isValid is always called first, this shortcut
5404
- // provides a substantial performance gain.
5405
- if (typeof string === 'string' && string.indexOf(':') === -1) {
5406
- return false;
5407
- }
5408
-
5409
- try {
5410
- const addr = this.parser(string);
5411
- new this(addr.parts, addr.zoneId);
5412
- return true;
5413
- } catch (e) {
5414
- return false;
5415
- }
5416
- };
5417
-
5418
- // A utility function to return network address given the IPv6 interface and prefix length in CIDR notation
5419
- ipaddr.IPv6.networkAddressFromCIDR = function (string) {
5420
- let cidr, i, ipInterfaceOctets, octets, subnetMaskOctets;
5421
-
5422
- try {
5423
- cidr = this.parseCIDR(string);
5424
- ipInterfaceOctets = cidr[0].toByteArray();
5425
- subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
5426
- octets = [];
5427
- i = 0;
5428
- while (i < 16) {
5429
- // Network address is bitwise AND between ip interface and mask
5430
- octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10));
5431
- i++;
5432
- }
5433
-
5434
- return new this(octets);
5435
- } catch (e) {
5436
- throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`);
5437
- }
5438
- };
5439
-
5440
- // Tries to parse and validate a string with IPv6 address.
5441
- // Throws an error if it fails.
5442
- ipaddr.IPv6.parse = function (string) {
5443
- const addr = this.parser(string);
5444
-
5445
- if (addr.parts === null) {
5446
- throw new Error('ipaddr: string is not formatted like an IPv6 Address');
5447
- }
5448
-
5449
- return new this(addr.parts, addr.zoneId);
5450
- };
5451
-
5452
- ipaddr.IPv6.parseCIDR = function (string) {
5453
- let maskLength, match, parsed;
5454
-
5455
- if ((match = string.match(/^(.+)\/(\d+)$/))) {
5456
- maskLength = parseInt(match[2]);
5457
- if (maskLength >= 0 && maskLength <= 128) {
5458
- parsed = [this.parse(match[1]), maskLength];
5459
- Object.defineProperty(parsed, 'toString', {
5460
- value: function () {
5461
- return this.join('/');
5462
- }
5463
- });
5464
- return parsed;
5465
- }
5466
- }
5467
-
5468
- throw new Error('ipaddr: string is not formatted like an IPv6 CIDR range');
5469
- };
5470
-
5471
- // Parse an IPv6 address.
5472
- ipaddr.IPv6.parser = function (string) {
5473
- let addr, i, match, octet, octets, zoneId;
5474
-
5475
- if ((match = string.match(ipv6Regexes.deprecatedTransitional))) {
5476
- return this.parser(`::ffff:${match[1]}`);
5477
- }
5478
- if (ipv6Regexes.native.test(string)) {
5479
- return expandIPv6(string, 8);
5480
- }
5481
- if ((match = string.match(ipv6Regexes.transitional))) {
5482
- zoneId = match[6] || '';
5483
- addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6);
5484
- if (addr.parts) {
5485
- octets = [
5486
- parseInt(match[2]),
5487
- parseInt(match[3]),
5488
- parseInt(match[4]),
5489
- parseInt(match[5])
5490
- ];
5491
- for (i = 0; i < octets.length; i++) {
5492
- octet = octets[i];
5493
- if (!((0 <= octet && octet <= 255))) {
5494
- return null;
5495
- }
5496
- }
5497
-
5498
- addr.parts.push(octets[0] << 8 | octets[1]);
5499
- addr.parts.push(octets[2] << 8 | octets[3]);
5500
- return {
5501
- parts: addr.parts,
5502
- zoneId: addr.zoneId
5503
- };
4593
+ const Container = schemaItem.repeated === "sequence" ? Sequence : Set;
4594
+ asn1Item = new Container({
4595
+ value: items,
4596
+ });
4597
+ }
4598
+ else {
4599
+ asn1Item = this.toASN(objProp);
5504
4600
  }
5505
4601
  }
4602
+ return asn1Item;
4603
+ }
4604
+ }
5506
4605
 
5507
- return null;
5508
- };
5509
-
5510
- // A utility function to return subnet mask in IPv6 format given the prefix length
5511
- ipaddr.IPv6.subnetMaskFromPrefixLength = function (prefix) {
5512
- prefix = parseInt(prefix);
5513
- if (prefix < 0 || prefix > 128) {
5514
- throw new Error('ipaddr: invalid IPv6 prefix length');
4606
+ class AsnArray extends Array {
4607
+ constructor(items = []) {
4608
+ if (typeof items === "number") {
4609
+ super(items);
5515
4610
  }
5516
-
5517
- const octets = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
5518
- let j = 0;
5519
- const filledOctetCount = Math.floor(prefix / 8);
5520
-
5521
- while (j < filledOctetCount) {
5522
- octets[j] = 255;
5523
- j++;
4611
+ else {
4612
+ super();
4613
+ for (const item of items) {
4614
+ this.push(item);
4615
+ }
5524
4616
  }
4617
+ }
4618
+ }
5525
4619
 
5526
- if (filledOctetCount < 16) {
5527
- octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8);
4620
+ class AsnConvert {
4621
+ static serialize(obj) {
4622
+ return AsnSerializer.serialize(obj);
4623
+ }
4624
+ static parse(data, target) {
4625
+ return AsnParser.parse(data, target);
4626
+ }
4627
+ static toString(data) {
4628
+ const buf = buildExports.BufferSourceConverter.isBufferSource(data)
4629
+ ? buildExports.BufferSourceConverter.toArrayBuffer(data)
4630
+ : AsnConvert.serialize(data);
4631
+ const asn = fromBER(buf);
4632
+ if (asn.offset === -1) {
4633
+ throw new Error(`Cannot decode ASN.1 data. ${asn.result.error}`);
5528
4634
  }
4635
+ return asn.result.toString();
4636
+ }
4637
+ }
5529
4638
 
5530
- return new this(octets);
5531
- };
4639
+ /******************************************************************************
4640
+ Copyright (c) Microsoft Corporation.
5532
4641
 
5533
- // Try to parse an array in network order (MSB first) for IPv4 and IPv6
5534
- ipaddr.fromByteArray = function (bytes) {
5535
- const length = bytes.length;
4642
+ Permission to use, copy, modify, and/or distribute this software for any
4643
+ purpose with or without fee is hereby granted.
5536
4644
 
5537
- if (length === 4) {
5538
- return new ipaddr.IPv4(bytes);
5539
- } else if (length === 16) {
5540
- return new ipaddr.IPv6(bytes);
5541
- } else {
5542
- throw new Error('ipaddr: the binary input is neither an IPv6 nor IPv4 address');
5543
- }
5544
- };
4645
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
4646
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
4647
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
4648
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
4649
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
4650
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4651
+ PERFORMANCE OF THIS SOFTWARE.
4652
+ ***************************************************************************** */
4653
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
5545
4654
 
5546
- // Checks if the address is valid IP address
5547
- ipaddr.isValid = function (string) {
5548
- return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string);
5549
- };
5550
4655
 
4656
+ function __decorate$1(decorators, target, key, desc) {
4657
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4658
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4659
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4660
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
4661
+ }
5551
4662
 
5552
- // Attempts to parse an IP Address, first through IPv6 then IPv4.
5553
- // Throws an error if it could not be parsed.
5554
- ipaddr.parse = function (string) {
5555
- if (ipaddr.IPv6.isValid(string)) {
5556
- return ipaddr.IPv6.parse(string);
5557
- } else if (ipaddr.IPv4.isValid(string)) {
5558
- return ipaddr.IPv4.parse(string);
5559
- } else {
5560
- throw new Error('ipaddr: the address has neither IPv6 nor IPv4 format');
5561
- }
5562
- };
4663
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
4664
+ var e = new Error(message);
4665
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
4666
+ };
5563
4667
 
5564
- // Attempt to parse CIDR notation, first through IPv6 then IPv4.
5565
- // Throws an error if it could not be parsed.
5566
- ipaddr.parseCIDR = function (string) {
5567
- try {
5568
- return ipaddr.IPv6.parseCIDR(string);
5569
- } catch (e) {
5570
- try {
5571
- return ipaddr.IPv4.parseCIDR(string);
5572
- } catch (e2) {
5573
- throw new Error('ipaddr: the address has neither IPv6 nor IPv4 CIDR format');
4668
+ class IpConverter {
4669
+ static isIPv4(ip) {
4670
+ return /^(\d{1,3}\.){3}\d{1,3}$/.test(ip);
4671
+ }
4672
+ static parseIPv4(ip) {
4673
+ const parts = ip.split(".");
4674
+ if (parts.length !== 4) {
4675
+ throw new Error("Invalid IPv4 address");
4676
+ }
4677
+ return parts.map((part) => {
4678
+ const num = parseInt(part, 10);
4679
+ if (isNaN(num) || num < 0 || num > 255) {
4680
+ throw new Error("Invalid IPv4 address part");
5574
4681
  }
4682
+ return num;
4683
+ });
4684
+ }
4685
+ static parseIPv6(ip) {
4686
+ const expandedIP = this.expandIPv6(ip);
4687
+ const parts = expandedIP.split(":");
4688
+ if (parts.length !== 8) {
4689
+ throw new Error("Invalid IPv6 address");
5575
4690
  }
5576
- };
5577
-
5578
- // Parse an address and return plain IPv4 address if it is an IPv4-mapped address
5579
- ipaddr.process = function (string) {
5580
- const addr = this.parse(string);
5581
-
5582
- if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) {
5583
- return addr.toIPv4Address();
5584
- } else {
5585
- return addr;
5586
- }
5587
- };
5588
-
5589
- // An utility function to ease named range matching. See examples below.
5590
- // rangeList can contain both IPv4 and IPv6 subnet entries and will not throw errors
5591
- // on matching IPv4 addresses to IPv6 ranges or vice versa.
5592
- ipaddr.subnetMatch = function (address, rangeList, defaultName) {
5593
- let i, rangeName, rangeSubnets, subnet;
5594
-
5595
- if (defaultName === undefined || defaultName === null) {
5596
- defaultName = 'unicast';
5597
- }
5598
-
5599
- for (rangeName in rangeList) {
5600
- if (Object.prototype.hasOwnProperty.call(rangeList, rangeName)) {
5601
- rangeSubnets = rangeList[rangeName];
5602
- // ECMA5 Array.isArray isn't available everywhere
5603
- if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) {
5604
- rangeSubnets = [rangeSubnets];
4691
+ return parts.reduce((bytes, part) => {
4692
+ const num = parseInt(part, 16);
4693
+ if (isNaN(num) || num < 0 || num > 0xffff) {
4694
+ throw new Error("Invalid IPv6 address part");
4695
+ }
4696
+ bytes.push((num >> 8) & 0xff);
4697
+ bytes.push(num & 0xff);
4698
+ return bytes;
4699
+ }, []);
4700
+ }
4701
+ static expandIPv6(ip) {
4702
+ if (!ip.includes("::")) {
4703
+ return ip;
4704
+ }
4705
+ const parts = ip.split("::");
4706
+ if (parts.length > 2) {
4707
+ throw new Error("Invalid IPv6 address");
4708
+ }
4709
+ const left = parts[0] ? parts[0].split(":") : [];
4710
+ const right = parts[1] ? parts[1].split(":") : [];
4711
+ const missing = 8 - (left.length + right.length);
4712
+ if (missing < 0) {
4713
+ throw new Error("Invalid IPv6 address");
4714
+ }
4715
+ return [...left, ...Array(missing).fill("0"), ...right].join(":");
4716
+ }
4717
+ static formatIPv6(bytes) {
4718
+ const parts = [];
4719
+ for (let i = 0; i < 16; i += 2) {
4720
+ parts.push(((bytes[i] << 8) | bytes[i + 1]).toString(16));
4721
+ }
4722
+ return this.compressIPv6(parts.join(":"));
4723
+ }
4724
+ static compressIPv6(ip) {
4725
+ const parts = ip.split(":");
4726
+ let longestZeroStart = -1;
4727
+ let longestZeroLength = 0;
4728
+ let currentZeroStart = -1;
4729
+ let currentZeroLength = 0;
4730
+ for (let i = 0; i < parts.length; i++) {
4731
+ if (parts[i] === "0") {
4732
+ if (currentZeroStart === -1) {
4733
+ currentZeroStart = i;
5605
4734
  }
5606
-
5607
- for (i = 0; i < rangeSubnets.length; i++) {
5608
- subnet = rangeSubnets[i];
5609
- if (address.kind() === subnet[0].kind() && address.match.apply(address, subnet)) {
5610
- return rangeName;
5611
- }
4735
+ currentZeroLength++;
4736
+ }
4737
+ else {
4738
+ if (currentZeroLength > longestZeroLength) {
4739
+ longestZeroStart = currentZeroStart;
4740
+ longestZeroLength = currentZeroLength;
5612
4741
  }
4742
+ currentZeroStart = -1;
4743
+ currentZeroLength = 0;
5613
4744
  }
5614
4745
  }
5615
-
5616
- return defaultName;
5617
- };
5618
-
5619
- // Export for both the CommonJS and browser-like environment
5620
- if (module.exports) {
5621
- module.exports = ipaddr;
5622
-
5623
- } else {
5624
- root.ipaddr = ipaddr;
4746
+ if (currentZeroLength > longestZeroLength) {
4747
+ longestZeroStart = currentZeroStart;
4748
+ longestZeroLength = currentZeroLength;
4749
+ }
4750
+ if (longestZeroLength > 1) {
4751
+ const before = parts.slice(0, longestZeroStart).join(":");
4752
+ const after = parts.slice(longestZeroStart + longestZeroLength).join(":");
4753
+ return `${before}::${after}`;
4754
+ }
4755
+ return ip;
4756
+ }
4757
+ static parseCIDR(text) {
4758
+ const [addr, prefixStr] = text.split("/");
4759
+ const prefix = parseInt(prefixStr, 10);
4760
+ if (this.isIPv4(addr)) {
4761
+ if (prefix < 0 || prefix > 32) {
4762
+ throw new Error("Invalid IPv4 prefix length");
4763
+ }
4764
+ return [this.parseIPv4(addr), prefix];
4765
+ }
4766
+ else {
4767
+ if (prefix < 0 || prefix > 128) {
4768
+ throw new Error("Invalid IPv6 prefix length");
4769
+ }
4770
+ return [this.parseIPv6(addr), prefix];
4771
+ }
5625
4772
  }
5626
-
5627
- }(commonjsGlobal));
5628
- }(ipaddr));
5629
-
5630
- class IpConverter {
5631
4773
  static decodeIP(value) {
5632
4774
  if (value.length === 64 && parseInt(value, 16) === 0) {
5633
4775
  return "::/0";
@@ -5637,24 +4779,62 @@ class IpConverter {
5637
4779
  }
5638
4780
  const mask = parseInt(value.slice(8), 16)
5639
4781
  .toString(2)
5640
- .split('')
5641
- .reduce((a, k) => a + (+k), 0);
5642
- let ip = value.slice(0, 8)
5643
- .replace(/(.{2})/g, match => `${parseInt(match, 16)}.`);
4782
+ .split("")
4783
+ .reduce((a, k) => a + +k, 0);
4784
+ let ip = value.slice(0, 8).replace(/(.{2})/g, (match) => `${parseInt(match, 16)}.`);
5644
4785
  ip = ip.slice(0, -1);
5645
4786
  return `${ip}/${mask}`;
5646
4787
  }
5647
4788
  static toString(buf) {
5648
- if (buf.byteLength === 4 || buf.byteLength === 16) {
5649
- const uint8 = new Uint8Array(buf);
5650
- const addr = ipaddr.exports.fromByteArray(Array.from(uint8));
5651
- return addr.toString();
4789
+ const uint8 = new Uint8Array(buf);
4790
+ if (uint8.length === 4) {
4791
+ return Array.from(uint8).join(".");
4792
+ }
4793
+ if (uint8.length === 16) {
4794
+ return this.formatIPv6(uint8);
4795
+ }
4796
+ if (uint8.length === 8 || uint8.length === 32) {
4797
+ const half = uint8.length / 2;
4798
+ const addrBytes = uint8.slice(0, half);
4799
+ const maskBytes = uint8.slice(half);
4800
+ const isAllZeros = uint8.every((byte) => byte === 0);
4801
+ if (isAllZeros) {
4802
+ return uint8.length === 8 ? "0.0.0.0/0" : "::/0";
4803
+ }
4804
+ const prefixLen = maskBytes.reduce((a, b) => a + (b.toString(2).match(/1/g) || []).length, 0);
4805
+ if (uint8.length === 8) {
4806
+ const addrStr = Array.from(addrBytes).join(".");
4807
+ return `${addrStr}/${prefixLen}`;
4808
+ }
4809
+ else {
4810
+ const addrStr = this.formatIPv6(addrBytes);
4811
+ return `${addrStr}/${prefixLen}`;
4812
+ }
5652
4813
  }
5653
- return this.decodeIP(Convert_1.ToHex(buf));
4814
+ return this.decodeIP(buildExports.Convert.ToHex(buf));
5654
4815
  }
5655
4816
  static fromString(text) {
5656
- const addr = ipaddr.exports.parse(text);
5657
- return new Uint8Array(addr.toByteArray()).buffer;
4817
+ if (text.includes("/")) {
4818
+ const [addr, prefix] = this.parseCIDR(text);
4819
+ const maskBytes = new Uint8Array(addr.length);
4820
+ let bitsLeft = prefix;
4821
+ for (let i = 0; i < maskBytes.length; i++) {
4822
+ if (bitsLeft >= 8) {
4823
+ maskBytes[i] = 0xff;
4824
+ bitsLeft -= 8;
4825
+ }
4826
+ else if (bitsLeft > 0) {
4827
+ maskBytes[i] = 0xff << (8 - bitsLeft);
4828
+ bitsLeft = 0;
4829
+ }
4830
+ }
4831
+ const out = new Uint8Array(addr.length * 2);
4832
+ out.set(addr, 0);
4833
+ out.set(maskBytes, addr.length);
4834
+ return out.buffer;
4835
+ }
4836
+ const bytes = this.isIPv4(text) ? this.parseIPv4(text) : this.parseIPv6(text);
4837
+ return new Uint8Array(bytes).buffer;
5658
4838
  }
5659
4839
  }
5660
4840
 
@@ -5664,8 +4844,12 @@ let DirectoryString = class DirectoryString {
5664
4844
  Object.assign(this, params);
5665
4845
  }
5666
4846
  toString() {
5667
- return this.bmpString || this.printableString || this.teletexString || this.universalString
5668
- || this.utf8String || "";
4847
+ return (this.bmpString ||
4848
+ this.printableString ||
4849
+ this.teletexString ||
4850
+ this.universalString ||
4851
+ this.utf8String ||
4852
+ "");
5669
4853
  }
5670
4854
  };
5671
4855
  __decorate$1([
@@ -5692,7 +4876,7 @@ let AttributeValue = class AttributeValue extends DirectoryString {
5692
4876
  Object.assign(this, params);
5693
4877
  }
5694
4878
  toString() {
5695
- return this.ia5String || (this.anyValue ? Convert_1.ToHex(this.anyValue) : super.toString());
4879
+ return this.ia5String || (this.anyValue ? buildExports.Convert.ToHex(this.anyValue) : super.toString());
5696
4880
  }
5697
4881
  };
5698
4882
  __decorate$1([
@@ -5801,7 +4985,12 @@ __decorate$1([
5801
4985
  AsnProp({ type: exports.AsnPropTypes.IA5String, context: 6, implicit: true })
5802
4986
  ], GeneralName.prototype, "uniformResourceIdentifier", void 0);
5803
4987
  __decorate$1([
5804
- AsnProp({ type: exports.AsnPropTypes.OctetString, context: 7, implicit: true, converter: AsnIpConverter })
4988
+ AsnProp({
4989
+ type: exports.AsnPropTypes.OctetString,
4990
+ context: 7,
4991
+ implicit: true,
4992
+ converter: AsnIpConverter,
4993
+ })
5805
4994
  ], GeneralName.prototype, "iPAddress", void 0);
5806
4995
  __decorate$1([
5807
4996
  AsnProp({ type: exports.AsnPropTypes.ObjectIdentifier, context: 8, implicit: true })
@@ -6135,19 +5324,39 @@ __decorate$1([
6135
5324
  AsnProp({ type: DistributionPointName, context: 0, optional: true })
6136
5325
  ], IssuingDistributionPoint.prototype, "distributionPoint", void 0);
6137
5326
  __decorate$1([
6138
- AsnProp({ type: exports.AsnPropTypes.Boolean, context: 1, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
5327
+ AsnProp({
5328
+ type: exports.AsnPropTypes.Boolean,
5329
+ context: 1,
5330
+ defaultValue: IssuingDistributionPoint.ONLY,
5331
+ implicit: true,
5332
+ })
6139
5333
  ], IssuingDistributionPoint.prototype, "onlyContainsUserCerts", void 0);
6140
5334
  __decorate$1([
6141
- AsnProp({ type: exports.AsnPropTypes.Boolean, context: 2, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
5335
+ AsnProp({
5336
+ type: exports.AsnPropTypes.Boolean,
5337
+ context: 2,
5338
+ defaultValue: IssuingDistributionPoint.ONLY,
5339
+ implicit: true,
5340
+ })
6142
5341
  ], IssuingDistributionPoint.prototype, "onlyContainsCACerts", void 0);
6143
5342
  __decorate$1([
6144
5343
  AsnProp({ type: Reason, context: 3, optional: true, implicit: true })
6145
5344
  ], IssuingDistributionPoint.prototype, "onlySomeReasons", void 0);
6146
5345
  __decorate$1([
6147
- AsnProp({ type: exports.AsnPropTypes.Boolean, context: 4, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
5346
+ AsnProp({
5347
+ type: exports.AsnPropTypes.Boolean,
5348
+ context: 4,
5349
+ defaultValue: IssuingDistributionPoint.ONLY,
5350
+ implicit: true,
5351
+ })
6148
5352
  ], IssuingDistributionPoint.prototype, "indirectCRL", void 0);
6149
5353
  __decorate$1([
6150
- AsnProp({ type: exports.AsnPropTypes.Boolean, context: 5, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
5354
+ AsnProp({
5355
+ type: exports.AsnPropTypes.Boolean,
5356
+ context: 5,
5357
+ defaultValue: IssuingDistributionPoint.ONLY,
5358
+ implicit: true,
5359
+ })
6151
5360
  ], IssuingDistributionPoint.prototype, "onlyContainsAttributeCerts", void 0);
6152
5361
 
6153
5362
  const id_ce_cRLReasons = `${id_ce}.21`;
@@ -6334,13 +5543,19 @@ class PolicyConstraints {
6334
5543
  }
6335
5544
  __decorate$1([
6336
5545
  AsnProp({
6337
- type: exports.AsnPropTypes.Integer, context: 0, implicit: true, optional: true,
5546
+ type: exports.AsnPropTypes.Integer,
5547
+ context: 0,
5548
+ implicit: true,
5549
+ optional: true,
6338
5550
  converter: AsnIntegerArrayBufferConverter,
6339
5551
  })
6340
5552
  ], PolicyConstraints.prototype, "requireExplicitPolicy", void 0);
6341
5553
  __decorate$1([
6342
5554
  AsnProp({
6343
- type: exports.AsnPropTypes.Integer, context: 1, implicit: true, optional: true,
5555
+ type: exports.AsnPropTypes.Integer,
5556
+ context: 1,
5557
+ implicit: true,
5558
+ optional: true,
6344
5559
  converter: AsnIntegerArrayBufferConverter,
6345
5560
  })
6346
5561
  ], PolicyConstraints.prototype, "inhibitPolicyMapping", void 0);
@@ -6382,13 +5597,13 @@ exports.SubjectAlternativeName = SubjectAlternativeName_1 = __decorate$1([
6382
5597
  AsnType({ type: exports.AsnTypeTypes.Sequence })
6383
5598
  ], exports.SubjectAlternativeName);
6384
5599
 
6385
- class Attribute$1 {
5600
+ let Attribute$1 = class Attribute {
6386
5601
  constructor(params = {}) {
6387
5602
  this.type = "";
6388
5603
  this.values = [];
6389
5604
  Object.assign(this, params);
6390
5605
  }
6391
- }
5606
+ };
6392
5607
  __decorate$1([
6393
5608
  AsnProp({ type: exports.AsnPropTypes.ObjectIdentifier })
6394
5609
  ], Attribute$1.prototype, "type", void 0);
@@ -6422,7 +5637,7 @@ __decorate$1([
6422
5637
  AsnProp({ type: exports.AsnPropTypes.GeneralizedTime, context: 0, implicit: true, optional: true })
6423
5638
  ], PrivateKeyUsagePeriod.prototype, "notBefore", void 0);
6424
5639
  __decorate$1([
6425
- AsnProp({ type: exports.AsnPropTypes.GeneralizedTime, context: 1, implicit: true, optional: true, })
5640
+ AsnProp({ type: exports.AsnPropTypes.GeneralizedTime, context: 1, implicit: true, optional: true })
6426
5641
  ], PrivateKeyUsagePeriod.prototype, "notAfter", void 0);
6427
5642
 
6428
5643
  const id_entrust_entrustVersInfo = "1.2.840.113533.7.65.0";
@@ -6453,7 +5668,7 @@ class EntrustInfo extends BitString {
6453
5668
  }
6454
5669
  class EntrustVersionInfo {
6455
5670
  constructor(params = {}) {
6456
- this.entrustVers = '';
5671
+ this.entrustVers = "";
6457
5672
  this.entrustInfoFlags = new EntrustInfo();
6458
5673
  Object.assign(this, params);
6459
5674
  }
@@ -6483,12 +5698,12 @@ class AlgorithmIdentifier {
6483
5698
  Object.assign(this, params);
6484
5699
  }
6485
5700
  isEqual(data) {
6486
- return data instanceof AlgorithmIdentifier
6487
- && data.algorithm == this.algorithm
6488
- && ((data.parameters && this.parameters
6489
- && isEqual_1(data.parameters, this.parameters))
6490
- ||
6491
- (data.parameters === this.parameters));
5701
+ return (data instanceof AlgorithmIdentifier &&
5702
+ data.algorithm == this.algorithm &&
5703
+ ((data.parameters &&
5704
+ this.parameters &&
5705
+ buildExports.isEqual(data.parameters, this.parameters)) ||
5706
+ data.parameters === this.parameters));
6492
5707
  }
6493
5708
  }
6494
5709
  __decorate$1([
@@ -6574,14 +5789,14 @@ __decorate$1([
6574
5789
  ], Validity.prototype, "notAfter", void 0);
6575
5790
 
6576
5791
  var Extensions_1;
6577
- class Extension$1 {
5792
+ let Extension$1 = class Extension {
6578
5793
  constructor(params = {}) {
6579
5794
  this.extnID = "";
6580
- this.critical = Extension$1.CRITICAL;
5795
+ this.critical = Extension.CRITICAL;
6581
5796
  this.extnValue = new OctetString();
6582
5797
  Object.assign(this, params);
6583
5798
  }
6584
- }
5799
+ };
6585
5800
  Extension$1.CRITICAL = false;
6586
5801
  __decorate$1([
6587
5802
  AsnProp({ type: exports.AsnPropTypes.ObjectIdentifier })
@@ -6923,7 +6138,10 @@ const mgf1SHA1 = new AlgorithmIdentifier({
6923
6138
  });
6924
6139
  const pSpecifiedEmpty = new AlgorithmIdentifier({
6925
6140
  algorithm: id_pSpecified,
6926
- parameters: AsnConvert.serialize(AsnOctetStringConverter.toASN(new Uint8Array([0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, 0xaf, 0xd8, 0x07, 0x09]).buffer)),
6141
+ parameters: AsnConvert.serialize(AsnOctetStringConverter.toASN(new Uint8Array([
6142
+ 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18,
6143
+ 0x90, 0xaf, 0xd8, 0x07, 0x09,
6144
+ ]).buffer)),
6927
6145
  });
6928
6146
  create(id_rsaEncryption);
6929
6147
  create(id_md2WithRSAEncryption);
@@ -7114,13 +6332,13 @@ exports.CompositeSignatureValue = CompositeSignatureValue_1 = __decorate$1([
7114
6332
 
7115
6333
  class EncryptedData extends OctetString {
7116
6334
  }
7117
- class EncryptedPrivateKeyInfo$1 {
6335
+ let EncryptedPrivateKeyInfo$1 = class EncryptedPrivateKeyInfo {
7118
6336
  constructor(params = {}) {
7119
6337
  this.encryptionAlgorithm = new AlgorithmIdentifier();
7120
6338
  this.encryptedData = new EncryptedData();
7121
6339
  Object.assign(this, params);
7122
6340
  }
7123
- }
6341
+ };
7124
6342
  __decorate$1([
7125
6343
  AsnProp({ type: AlgorithmIdentifier })
7126
6344
  ], EncryptedPrivateKeyInfo$1.prototype, "encryptionAlgorithm", void 0);
@@ -7144,14 +6362,14 @@ let Attributes$1 = Attributes_1$1 = class Attributes extends AsnArray {
7144
6362
  Attributes$1 = Attributes_1$1 = __decorate$1([
7145
6363
  AsnType({ type: exports.AsnTypeTypes.Sequence, itemType: Attribute$1 })
7146
6364
  ], Attributes$1);
7147
- class PrivateKeyInfo$1 {
6365
+ let PrivateKeyInfo$1 = class PrivateKeyInfo {
7148
6366
  constructor(params = {}) {
7149
6367
  this.version = Version$3.v1;
7150
6368
  this.privateKeyAlgorithm = new AlgorithmIdentifier();
7151
6369
  this.privateKey = new PrivateKey();
7152
6370
  Object.assign(this, params);
7153
6371
  }
7154
- }
6372
+ };
7155
6373
  __decorate$1([
7156
6374
  AsnProp({ type: exports.AsnPropTypes.Integer })
7157
6375
  ], PrivateKeyInfo$1.prototype, "version", void 0);
@@ -7242,43 +6460,41 @@ CompositePrivateKey = CompositePrivateKey_1 = __decorate$1([
7242
6460
  AsnType({ type: exports.AsnTypeTypes.Sequence, itemType: OneAsymmetricKey })
7243
6461
  ], CompositePrivateKey);
7244
6462
 
7245
- /**
7246
- * @license
7247
- * Copyright (c) Peculiar Ventures, LLC.
7248
- *
7249
- * This source code is licensed under the MIT license found in the
7250
- * LICENSE file in the root directory of this source tree.
7251
- */
7252
- /* eslint-disable no-useless-escape */
7253
- const isHex = (value) => (/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/
7254
- .test(value));
7255
- const isPem = (value) => (/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/
7256
- .test(value));
7257
- const isBase64 = (value) => {
7258
- try {
7259
- window.atob(value);
7260
- return true;
7261
- }
7262
- catch (error) {
7263
- return false;
7264
- }
7265
- };
6463
+ var dayjs_min$1 = {exports: {}};
6464
+
6465
+ var dayjs_min = dayjs_min$1.exports;
6466
+
6467
+ var hasRequiredDayjs_min;
6468
+
6469
+ function requireDayjs_min () {
6470
+ if (hasRequiredDayjs_min) return dayjs_min$1.exports;
6471
+ hasRequiredDayjs_min = 1;
6472
+ (function (module, exports) {
6473
+ !function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
6474
+ } (dayjs_min$1));
6475
+ return dayjs_min$1.exports;
6476
+ }
7266
6477
 
7267
- var dayjs_min = {exports: {}};
6478
+ var dayjs_minExports = requireDayjs_min();
6479
+ var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
7268
6480
 
7269
- (function (module, exports) {
7270
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
7271
- }(dayjs_min));
6481
+ var relativeTime$2 = {exports: {}};
7272
6482
 
7273
- const dayjs = dayjs_min.exports;
6483
+ var relativeTime$1 = relativeTime$2.exports;
7274
6484
 
7275
- var relativeTime$1 = {exports: {}};
6485
+ var hasRequiredRelativeTime;
7276
6486
 
7277
- (function (module, exports) {
7278
- !function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
7279
- }(relativeTime$1));
6487
+ function requireRelativeTime () {
6488
+ if (hasRequiredRelativeTime) return relativeTime$2.exports;
6489
+ hasRequiredRelativeTime = 1;
6490
+ (function (module, exports) {
6491
+ !function(r,e){module.exports=e();}(relativeTime$1,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,true):i.diff(e,y.d,true));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,true)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
6492
+ } (relativeTime$2));
6493
+ return relativeTime$2.exports;
6494
+ }
7280
6495
 
7281
- const relativeTime = relativeTime$1.exports;
6496
+ var relativeTimeExports = requireRelativeTime();
6497
+ var relativeTime = /*@__PURE__*/getDefaultExportFromCjs(relativeTimeExports);
7282
6498
 
7283
6499
  /**
7284
6500
  * @license
@@ -7343,7 +6559,7 @@ const crlEntryExtensions = "CRL Entry Extensions";
7343
6559
  const previewCertificate = "Preview certificate";
7344
6560
  const viewDetails = "View details";
7345
6561
  const downloadOptions = "Download options";
7346
- const en = {
6562
+ var en = {
7347
6563
  basicInformation: basicInformation,
7348
6564
  subjectName: subjectName,
7349
6565
  issuerName: issuerName,
@@ -9497,6 +8713,9 @@ const OIDs = {
9497
8713
  '2.16.840.1.101.3.4.2.4': 'SHA-224',
9498
8714
  '2.16.840.1.101.3.4.3.1': 'DSA with Sha224',
9499
8715
  '2.16.840.1.101.3.4.3.2': 'DSA with Sha256',
8716
+ '2.16.840.1.101.3.4.3.17': 'ML-DSA-44',
8717
+ '2.16.840.1.101.3.4.3.18': 'ML-DSA-65',
8718
+ '2.16.840.1.101.3.4.3.19': 'ML-DSA-87',
9500
8719
  '2.16.840.1.113719.1.2.8': 'Novell Algorithm',
9501
8720
  '2.16.840.1.113719.1.2.8.22': 'DES Cbc IV8',
9502
8721
  '2.16.840.1.113719.1.2.8.23': 'DES Cbc Pad IV8',
@@ -9804,7 +9023,7 @@ var _Name_asn;
9804
9023
  class Name {
9805
9024
  constructor(data) {
9806
9025
  _Name_asn.set(this, new exports.Name$1());
9807
- if (BufferSourceConverter_1.isBufferSource(data)) {
9026
+ if (buildExports.BufferSourceConverter.isBufferSource(data)) {
9808
9027
  __classPrivateFieldSet$1(this, _Name_asn, AsnParser.parse(data, exports.Name$1), "f");
9809
9028
  }
9810
9029
  else {
@@ -10012,8 +9231,8 @@ exports.CaVersion = class CaVersion {
10012
9231
  data.set(new Uint8Array(this.value), 4 - this.value.byteLength);
10013
9232
  }
10014
9233
  return {
10015
- keyIndex: parseInt(Convert_1.ToHex(data.slice(0, 2)), 16),
10016
- certificateIndex: parseInt(Convert_1.ToHex(data.slice(2)), 16),
9234
+ keyIndex: parseInt(buildExports.Convert.ToHex(data.slice(0, 2)), 16),
9235
+ certificateIndex: parseInt(buildExports.Convert.ToHex(data.slice(2)), 16),
10017
9236
  };
10018
9237
  }
10019
9238
  };
@@ -10434,7 +9653,7 @@ class ByteStream {
10434
9653
  }
10435
9654
  constructor(bytes) {
10436
9655
  this.offset = 0;
10437
- this.view = BufferSourceConverter_1.toUint8Array(bytes);
9656
+ this.view = buildExports.BufferSourceConverter.toUint8Array(bytes);
10438
9657
  }
10439
9658
  read(size = 1) {
10440
9659
  const res = this.view.slice(this.offset, this.offset + size);
@@ -10450,7 +9669,7 @@ class ByteStream {
10450
9669
  }
10451
9670
  readNumber(size) {
10452
9671
  const bytes = this.read(size);
10453
- const hex = Convert_1.ToHex(bytes);
9672
+ const hex = buildExports.Convert.ToHex(bytes);
10454
9673
  return parseInt(hex, 16);
10455
9674
  }
10456
9675
  readEnd() {
@@ -10463,7 +9682,7 @@ class ByteStream {
10463
9682
 
10464
9683
  class Structure {
10465
9684
  static createStream(bytes) {
10466
- const view = BufferSourceConverter_1.toUint8Array(bytes);
9685
+ const view = buildExports.BufferSourceConverter.toUint8Array(bytes);
10467
9686
  return new ByteStream(view);
10468
9687
  }
10469
9688
  }
@@ -10507,7 +9726,7 @@ class SignedCertificateTimestamp extends Structure {
10507
9726
  parse(stream) {
10508
9727
  this.version = stream.readByte();
10509
9728
  stream.read(2);
10510
- this.logId = BufferSourceConverter_1.toArrayBuffer(stream.read(32));
9729
+ this.logId = buildExports.BufferSourceConverter.toArrayBuffer(stream.read(32));
10511
9730
  this.timestamp = new Date(stream.readNumber(8));
10512
9731
  const extLen = stream.readNumber(2);
10513
9732
  this.extensions = stream.read(extLen).buffer;
@@ -10518,12 +9737,12 @@ class SignedCertificateTimestamp extends Structure {
10518
9737
  toJSON() {
10519
9738
  return {
10520
9739
  version: this.version,
10521
- logId: Convert_1.ToHex(this.logId),
9740
+ logId: buildExports.Convert.ToHex(this.logId),
10522
9741
  timestamp: this.timestamp,
10523
- extensions: Convert_1.ToBase64(this.extensions),
9742
+ extensions: buildExports.Convert.ToBase64(this.extensions),
10524
9743
  hashAlgorithm: HashAlgorithm[this.hashAlgorithm] || "undefined",
10525
9744
  signatureAlgorithm: SignatureAlgorithm[this.signatureAlgorithm] || "undefined",
10526
- signature: Convert_1.ToBase64(this.signature),
9745
+ signature: buildExports.Convert.ToBase64(this.signature),
10527
9746
  };
10528
9747
  }
10529
9748
  }
@@ -10545,7 +9764,7 @@ class CertificateTransparency extends OctetString {
10545
9764
  return this;
10546
9765
  }
10547
9766
  toJSON() {
10548
- return this.items.map(o => o.toJSON());
9767
+ return this.items.map((o) => o.toJSON());
10549
9768
  }
10550
9769
  }
10551
9770
 
@@ -10689,7 +9908,12 @@ class LogotypeImageInfo {
10689
9908
  }
10690
9909
  }
10691
9910
  __decorate$1([
10692
- AsnProp({ type: exports.AsnPropTypes.Integer, context: 0, implicit: true, defaultValue: LogotypeImageType.color })
9911
+ AsnProp({
9912
+ type: exports.AsnPropTypes.Integer,
9913
+ context: 0,
9914
+ implicit: true,
9915
+ defaultValue: LogotypeImageType.color,
9916
+ })
10693
9917
  ], LogotypeImageInfo.prototype, "type", void 0);
10694
9918
  __decorate$1([
10695
9919
  AsnProp({ type: exports.AsnPropTypes.Integer })
@@ -10807,7 +10031,7 @@ let JWTClaimNames = JWTClaimNames_1 = class JWTClaimNames extends AsnArray {
10807
10031
  JWTClaimNames = JWTClaimNames_1 = __decorate$1([
10808
10032
  AsnType({
10809
10033
  type: exports.AsnTypeTypes.Sequence,
10810
- itemType: exports.AsnPropTypes.IA5String
10034
+ itemType: exports.AsnPropTypes.IA5String,
10811
10035
  })
10812
10036
  ], JWTClaimNames);
10813
10037
  class JWTClaimPermittedValues {
@@ -10837,7 +10061,7 @@ let JWTClaimPermittedValuesList = JWTClaimPermittedValuesList_1 = class JWTClaim
10837
10061
  JWTClaimPermittedValuesList = JWTClaimPermittedValuesList_1 = __decorate$1([
10838
10062
  AsnType({
10839
10063
  type: exports.AsnTypeTypes.Sequence,
10840
- itemType: JWTClaimPermittedValues
10064
+ itemType: JWTClaimPermittedValues,
10841
10065
  })
10842
10066
  ], JWTClaimPermittedValuesList);
10843
10067
  class JWTClaimConstraints {
@@ -11079,6 +10303,12 @@ __decorate$1([
11079
10303
  __decorate$1([
11080
10304
  AsnProp({ context: 720, type: exports.AsnPropTypes.Null, optional: true })
11081
10305
  ], AuthorizationList.prototype, "deviceUniqueAttestation", void 0);
10306
+ __decorate$1([
10307
+ AsnProp({ context: 723, type: OctetString, optional: true })
10308
+ ], AuthorizationList.prototype, "attestationIdSecondImei", void 0);
10309
+ __decorate$1([
10310
+ AsnProp({ context: 724, type: OctetString, optional: true })
10311
+ ], AuthorizationList.prototype, "moduleHash", void 0);
11082
10312
  var SecurityLevel;
11083
10313
  (function (SecurityLevel) {
11084
10314
  SecurityLevel[SecurityLevel["software"] = 0] = "software";
@@ -11093,6 +10323,8 @@ var Version;
11093
10323
  Version[Version["KM4_1"] = 4] = "KM4_1";
11094
10324
  Version[Version["keyMint1"] = 100] = "keyMint1";
11095
10325
  Version[Version["keyMint2"] = 200] = "keyMint2";
10326
+ Version[Version["keyMint3"] = 300] = "keyMint3";
10327
+ Version[Version["keyMint4"] = 400] = "keyMint4";
11096
10328
  })(Version || (Version = {}));
11097
10329
  class KeyDescription {
11098
10330
  constructor(params = {}) {
@@ -11131,6 +10363,67 @@ __decorate$1([
11131
10363
  __decorate$1([
11132
10364
  AsnProp({ type: AuthorizationList })
11133
10365
  ], KeyDescription.prototype, "teeEnforced", void 0);
10366
+ class KeyMintKeyDescription {
10367
+ constructor(params = {}) {
10368
+ this.attestationVersion = Version.keyMint4;
10369
+ this.attestationSecurityLevel = SecurityLevel.software;
10370
+ this.keyMintVersion = 0;
10371
+ this.keyMintSecurityLevel = SecurityLevel.software;
10372
+ this.attestationChallenge = new OctetString();
10373
+ this.uniqueId = new OctetString();
10374
+ this.softwareEnforced = new AuthorizationList();
10375
+ this.hardwareEnforced = new AuthorizationList();
10376
+ Object.assign(this, params);
10377
+ }
10378
+ toLegacyKeyDescription() {
10379
+ return new KeyDescription({
10380
+ attestationVersion: this.attestationVersion,
10381
+ attestationSecurityLevel: this.attestationSecurityLevel,
10382
+ keymasterVersion: this.keyMintVersion,
10383
+ keymasterSecurityLevel: this.keyMintSecurityLevel,
10384
+ attestationChallenge: this.attestationChallenge,
10385
+ uniqueId: this.uniqueId,
10386
+ softwareEnforced: this.softwareEnforced,
10387
+ teeEnforced: this.hardwareEnforced,
10388
+ });
10389
+ }
10390
+ static fromLegacyKeyDescription(keyDesc) {
10391
+ return new KeyMintKeyDescription({
10392
+ attestationVersion: keyDesc.attestationVersion,
10393
+ attestationSecurityLevel: keyDesc.attestationSecurityLevel,
10394
+ keyMintVersion: keyDesc.keymasterVersion,
10395
+ keyMintSecurityLevel: keyDesc.keymasterSecurityLevel,
10396
+ attestationChallenge: keyDesc.attestationChallenge,
10397
+ uniqueId: keyDesc.uniqueId,
10398
+ softwareEnforced: keyDesc.softwareEnforced,
10399
+ hardwareEnforced: keyDesc.teeEnforced,
10400
+ });
10401
+ }
10402
+ }
10403
+ __decorate$1([
10404
+ AsnProp({ type: exports.AsnPropTypes.Integer })
10405
+ ], KeyMintKeyDescription.prototype, "attestationVersion", void 0);
10406
+ __decorate$1([
10407
+ AsnProp({ type: exports.AsnPropTypes.Enumerated })
10408
+ ], KeyMintKeyDescription.prototype, "attestationSecurityLevel", void 0);
10409
+ __decorate$1([
10410
+ AsnProp({ type: exports.AsnPropTypes.Integer })
10411
+ ], KeyMintKeyDescription.prototype, "keyMintVersion", void 0);
10412
+ __decorate$1([
10413
+ AsnProp({ type: exports.AsnPropTypes.Enumerated })
10414
+ ], KeyMintKeyDescription.prototype, "keyMintSecurityLevel", void 0);
10415
+ __decorate$1([
10416
+ AsnProp({ type: OctetString })
10417
+ ], KeyMintKeyDescription.prototype, "attestationChallenge", void 0);
10418
+ __decorate$1([
10419
+ AsnProp({ type: OctetString })
10420
+ ], KeyMintKeyDescription.prototype, "uniqueId", void 0);
10421
+ __decorate$1([
10422
+ AsnProp({ type: AuthorizationList })
10423
+ ], KeyMintKeyDescription.prototype, "softwareEnforced", void 0);
10424
+ __decorate$1([
10425
+ AsnProp({ type: AuthorizationList })
10426
+ ], KeyMintKeyDescription.prototype, "hardwareEnforced", void 0);
11134
10427
 
11135
10428
  var NonStandardAuthorizationList_1;
11136
10429
  let NonStandardAuthorization = class NonStandardAuthorization extends AuthorizationList {
@@ -11144,7 +10437,7 @@ let NonStandardAuthorizationList = NonStandardAuthorizationList_1 = class NonSta
11144
10437
  Object.setPrototypeOf(this, NonStandardAuthorizationList_1.prototype);
11145
10438
  }
11146
10439
  findProperty(key) {
11147
- const prop = this.find((o => key in o));
10440
+ const prop = this.find((o) => key in o);
11148
10441
  if (prop) {
11149
10442
  return prop[key];
11150
10443
  }
@@ -11155,6 +10448,24 @@ NonStandardAuthorizationList = NonStandardAuthorizationList_1 = __decorate$1([
11155
10448
  AsnType({ type: exports.AsnTypeTypes.Sequence, itemType: NonStandardAuthorization })
11156
10449
  ], NonStandardAuthorizationList);
11157
10450
  class NonStandardKeyDescription {
10451
+ get keyMintVersion() {
10452
+ return this.keymasterVersion;
10453
+ }
10454
+ set keyMintVersion(value) {
10455
+ this.keymasterVersion = value;
10456
+ }
10457
+ get keyMintSecurityLevel() {
10458
+ return this.keymasterSecurityLevel;
10459
+ }
10460
+ set keyMintSecurityLevel(value) {
10461
+ this.keymasterSecurityLevel = value;
10462
+ }
10463
+ get hardwareEnforced() {
10464
+ return this.teeEnforced;
10465
+ }
10466
+ set hardwareEnforced(value) {
10467
+ this.teeEnforced = value;
10468
+ }
11158
10469
  constructor(params = {}) {
11159
10470
  this.attestationVersion = Version.KM4;
11160
10471
  this.attestationSecurityLevel = SecurityLevel.software;
@@ -11191,6 +10502,23 @@ __decorate$1([
11191
10502
  __decorate$1([
11192
10503
  AsnProp({ type: NonStandardAuthorizationList })
11193
10504
  ], NonStandardKeyDescription.prototype, "teeEnforced", void 0);
10505
+ let NonStandardKeyMintKeyDescription = class NonStandardKeyMintKeyDescription extends NonStandardKeyDescription {
10506
+ constructor(params = {}) {
10507
+ if ("keymasterVersion" in params && !("keyMintVersion" in params)) {
10508
+ params.keyMintVersion = params.keymasterVersion;
10509
+ }
10510
+ if ("keymasterSecurityLevel" in params && !("keyMintSecurityLevel" in params)) {
10511
+ params.keyMintSecurityLevel = params.keymasterSecurityLevel;
10512
+ }
10513
+ if ("teeEnforced" in params && !("hardwareEnforced" in params)) {
10514
+ params.hardwareEnforced = params.teeEnforced;
10515
+ }
10516
+ super(params);
10517
+ }
10518
+ };
10519
+ NonStandardKeyMintKeyDescription = __decorate$1([
10520
+ AsnType({ type: exports.AsnTypeTypes.Sequence })
10521
+ ], NonStandardKeyMintKeyDescription);
11194
10522
 
11195
10523
  class AttestationPackageInfo {
11196
10524
  constructor(params = {}) {
@@ -11293,7 +10621,7 @@ class AsnData {
11293
10621
  else {
11294
10622
  // raw, type
11295
10623
  __classPrivateFieldSet(this, _AsnData_asn, AsnConvert.parse(args[0], args[1]), "f");
11296
- __classPrivateFieldSet(this, _AsnData_raw, BufferSourceConverter_1.toArrayBuffer(args[0]), "f");
10624
+ __classPrivateFieldSet(this, _AsnData_raw, buildExports.BufferSourceConverter.toArrayBuffer(args[0]), "f");
11297
10625
  }
11298
10626
  }
11299
10627
  get asn() {
@@ -11370,15 +10698,180 @@ class Extension extends AsnData {
11370
10698
  }
11371
10699
  else {
11372
10700
  console.warn(`Didn't detect parser for "${this.asn.extnID}" extension.`);
11373
- this.value = Convert_1.ToHex(asnExtnValue);
10701
+ this.value = buildExports.Convert.ToHex(asnExtnValue);
11374
10702
  }
11375
10703
  }
11376
10704
  catch (error) {
11377
10705
  console.error(`Error parse "${this.asn.extnID}" extension:`, error.message);
11378
- this.value = Convert_1.ToHex(asnExtnValue);
10706
+ this.value = buildExports.Convert.ToHex(asnExtnValue);
10707
+ }
10708
+ }
10709
+ }
10710
+
10711
+ /**
10712
+ * @license
10713
+ * Copyright (c) Peculiar Ventures, LLC.
10714
+ *
10715
+ * This source code is licensed under the MIT license found in the
10716
+ * LICENSE file in the root directory of this source tree.
10717
+ */
10718
+ const rPaddingTag = '-{5}';
10719
+ const rEolChars = '\\n';
10720
+ const rNameTag = `[^${rEolChars}]+`;
10721
+ const rBeginTag = `${rPaddingTag}BEGIN (${rNameTag}(?=${rPaddingTag}))${rPaddingTag}`;
10722
+ const rEndTag = `${rPaddingTag}END \\1${rPaddingTag}`;
10723
+ const rEolGroup = '\\n';
10724
+ const rHeaderKey = `[^:${rEolChars}]+`;
10725
+ const rHeaderValue = `(?:[^${rEolChars}]+${rEolGroup}(?: +[^${rEolChars}]+${rEolGroup})*)`;
10726
+ const rBase64Chars = '[a-zA-Z0-9=+/]+';
10727
+ const rBase64 = `(?:${rBase64Chars}${rEolGroup})+`;
10728
+ const rPem = `${rBeginTag}${rEolGroup}(?:((?:${rHeaderKey}: ${rHeaderValue})+))?${rEolGroup}?(${rBase64})${rEndTag}`;
10729
+ /**
10730
+ * Represents PEM Converter.
10731
+ */
10732
+ class PemConverter {
10733
+ static isPem(data) {
10734
+ return typeof data === 'string'
10735
+ && new RegExp(rPem, 'g').test(data);
10736
+ }
10737
+ static decodeWithHeaders(pem) {
10738
+ // eslint-disable-next-line no-param-reassign
10739
+ pem = pem.replace(/\r/g, ''); // CRLF -> LF
10740
+ const pattern = new RegExp(rPem, 'g');
10741
+ const res = [];
10742
+ let matches = null;
10743
+ // eslint-disable-next-line no-cond-assign
10744
+ while (matches = pattern.exec(pem)) {
10745
+ // prepare pem encoded message
10746
+ const base64 = matches[3]
10747
+ .replace(new RegExp(`[${rEolChars}]+`, 'g'), '');
10748
+ const pemStruct = {
10749
+ type: matches[1],
10750
+ headers: [],
10751
+ rawData: buildExports.Convert.FromBase64(base64),
10752
+ };
10753
+ // read headers
10754
+ const headersString = matches[2];
10755
+ if (headersString) {
10756
+ const headers = headersString.split(new RegExp(rEolGroup, 'g'));
10757
+ let lastHeader = null;
10758
+ // eslint-disable-next-line no-restricted-syntax
10759
+ for (const header of headers) {
10760
+ const [key, value] = header.split(/:(.*)/);
10761
+ if (value === undefined) {
10762
+ // value
10763
+ if (!lastHeader) {
10764
+ throw new Error('Cannot parse PEM string. Incorrect header value');
10765
+ }
10766
+ lastHeader.value += key.trim();
10767
+ }
10768
+ else {
10769
+ // key and value
10770
+ if (lastHeader) {
10771
+ pemStruct.headers.push(lastHeader);
10772
+ }
10773
+ lastHeader = { key, value: value.trim() };
10774
+ }
10775
+ }
10776
+ // add last header
10777
+ if (lastHeader) {
10778
+ pemStruct.headers.push(lastHeader);
10779
+ }
10780
+ }
10781
+ res.push(pemStruct);
10782
+ }
10783
+ return res;
10784
+ }
10785
+ /**
10786
+ * Decodes PEM to a list of raws
10787
+ * @param pem message in PEM format
10788
+ */
10789
+ static decode(pem) {
10790
+ const blocks = this.decodeWithHeaders(pem);
10791
+ return blocks.map((o) => o.rawData);
10792
+ }
10793
+ static encode(rawData, tag) {
10794
+ if (Array.isArray(rawData)) {
10795
+ const raws = new Array();
10796
+ if (tag) {
10797
+ // encode BufferSource[]
10798
+ rawData.forEach((element) => {
10799
+ if (!buildExports.BufferSourceConverter.isBufferSource(element)) {
10800
+ throw new TypeError('Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource');
10801
+ }
10802
+ raws.push(this.encodeStruct({
10803
+ type: tag,
10804
+ rawData: buildExports.BufferSourceConverter.toArrayBuffer(element),
10805
+ }));
10806
+ });
10807
+ }
10808
+ else {
10809
+ // encode PemStruct[]
10810
+ rawData.forEach((element) => {
10811
+ if (!('type' in element)) {
10812
+ throw new TypeError('Cannot encode array of PemStruct in PEM format. Not all items of the array are PemStrut');
10813
+ }
10814
+ raws.push(this.encodeStruct(element));
10815
+ });
10816
+ }
10817
+ return raws.join('\n');
10818
+ }
10819
+ if (!tag) {
10820
+ throw new Error("Required argument 'tag' is missed");
11379
10821
  }
10822
+ return this.encodeStruct({
10823
+ type: tag,
10824
+ rawData: buildExports.BufferSourceConverter.toArrayBuffer(rawData),
10825
+ });
10826
+ }
10827
+ /**
10828
+ * Encodes PEMStruct in PEM block
10829
+ * @param pem PEM structure for encoding
10830
+ * @returns Returns PEM encoded block
10831
+ */
10832
+ static encodeStruct(pem) {
10833
+ var _a;
10834
+ const upperCaseType = pem.type.toLocaleUpperCase();
10835
+ const res = [];
10836
+ res.push(`-----BEGIN ${upperCaseType}-----`);
10837
+ if ((_a = pem.headers) === null || _a === void 0 ? void 0 : _a.length) {
10838
+ // eslint-disable-next-line no-restricted-syntax
10839
+ for (const header of pem.headers) {
10840
+ res.push(`${header.key}: ${header.value}`);
10841
+ }
10842
+ res.push(''); // blank line
10843
+ }
10844
+ const base64 = buildExports.Convert.ToBase64(pem.rawData);
10845
+ let sliced;
10846
+ let offset = 0;
10847
+ const rows = Array();
10848
+ while (offset < base64.length) {
10849
+ if (base64.length - offset < 64) {
10850
+ sliced = base64.substring(offset);
10851
+ }
10852
+ else {
10853
+ sliced = base64.substring(offset, offset + 64);
10854
+ offset += 64;
10855
+ }
10856
+ if (sliced.length !== 0) {
10857
+ rows.push(sliced);
10858
+ if (sliced.length < 64) {
10859
+ break;
10860
+ }
10861
+ }
10862
+ else {
10863
+ break;
10864
+ }
10865
+ }
10866
+ res.push(...rows);
10867
+ res.push(`-----END ${upperCaseType}-----`);
10868
+ return res.join('\n');
11380
10869
  }
11381
10870
  }
10871
+ PemConverter.CertificateTag = 'CERTIFICATE';
10872
+ PemConverter.CrlTag = 'CRL';
10873
+ PemConverter.CertificateRequestTag = 'CERTIFICATE REQUEST';
10874
+ PemConverter.AttributeCertificateTag = 'ATTRIBUTE CERTIFICATE';
11382
10875
 
11383
10876
  /**
11384
10877
  * @license
@@ -11422,30 +10915,27 @@ class CryptoProvider {
11422
10915
  CryptoProvider.DEFAULT = 'default';
11423
10916
  const cryptoProvider = new CryptoProvider();
11424
10917
 
11425
- const base64Re = /-----BEGIN [^-]+-----([A-Za-z0-9+/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+/=\s]+)====/;
11426
- const base64Clarify = (base64) => {
11427
- const execArray = base64Re.exec(base64);
11428
- return execArray ? (execArray[1] || execArray[2]) : base64;
11429
- };
11430
- const hexFormat = (hex) => (hex
11431
- .replace(/(.{32})/g, '$1\n')
11432
- .replace(/(.{4})/g, '$1 ')
11433
- .trim());
11434
- const base64Format = (base64) => (base64
11435
- .replace(/(.{64})/g, '$1\n'));
10918
+ /**
10919
+ * @license
10920
+ * Copyright (c) Peculiar Ventures, LLC.
10921
+ *
10922
+ * This source code is licensed under the MIT license found in the
10923
+ * LICENSE file in the root directory of this source tree.
10924
+ */
11436
10925
  const certificateRawToBuffer = (raw) => {
11437
- const rawClarified = base64Clarify(raw);
11438
- let buffer;
11439
- if (isHex(rawClarified)) {
11440
- buffer = Convert_1.FromHex(rawClarified);
10926
+ if (PemConverter.isPem(raw)) {
10927
+ return PemConverter.decode(raw)[0];
11441
10928
  }
11442
- else if (isBase64(rawClarified) || isPem(rawClarified)) {
11443
- buffer = Convert_1.FromBase64(rawClarified);
10929
+ if (buildExports.Convert.isHex(raw)) {
10930
+ return buildExports.Convert.FromHex(raw);
11444
10931
  }
11445
- else {
11446
- buffer = Convert_1.FromBinary(raw);
10932
+ if (buildExports.Convert.isBase64(raw)) {
10933
+ return buildExports.Convert.FromBase64(raw);
11447
10934
  }
11448
- return buffer;
10935
+ if (buildExports.Convert.isBase64Url(raw)) {
10936
+ return buildExports.Convert.FromBase64Url(raw);
10937
+ }
10938
+ throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url");
11449
10939
  };
11450
10940
  const getCertificateThumbprint = async (algorithm, data) => {
11451
10941
  const crypto = cryptoProvider.get();
@@ -12013,7 +11503,7 @@ exports.WebGDPR = __decorate$1([
12013
11503
 
12014
11504
  class IssuerAndSerialNumber {
12015
11505
  constructor(params = {}) {
12016
- this.issuer = new exports.Name$1;
11506
+ this.issuer = new exports.Name$1();
12017
11507
  this.serialNumber = new ArrayBuffer(0);
12018
11508
  Object.assign(this, params);
12019
11509
  }
@@ -12161,32 +11651,32 @@ __decorate$1([
12161
11651
  __decorate$1([
12162
11652
  AsnProp({ type: exports.AsnPropTypes.Any })
12163
11653
  ], OtherCertificateFormat.prototype, "otherCert", void 0);
12164
- let CertificateChoices = class CertificateChoices {
11654
+ exports.CertificateChoices = class CertificateChoices {
12165
11655
  constructor(params = {}) {
12166
11656
  Object.assign(this, params);
12167
11657
  }
12168
11658
  };
12169
11659
  __decorate$1([
12170
11660
  AsnProp({ type: Certificate })
12171
- ], CertificateChoices.prototype, "certificate", void 0);
11661
+ ], exports.CertificateChoices.prototype, "certificate", void 0);
12172
11662
  __decorate$1([
12173
11663
  AsnProp({ type: AttributeCertificate, context: 2, implicit: true })
12174
- ], CertificateChoices.prototype, "v2AttrCert", void 0);
11664
+ ], exports.CertificateChoices.prototype, "v2AttrCert", void 0);
12175
11665
  __decorate$1([
12176
11666
  AsnProp({ type: OtherCertificateFormat, context: 3, implicit: true })
12177
- ], CertificateChoices.prototype, "other", void 0);
12178
- CertificateChoices = __decorate$1([
11667
+ ], exports.CertificateChoices.prototype, "other", void 0);
11668
+ exports.CertificateChoices = __decorate$1([
12179
11669
  AsnType({ type: exports.AsnTypeTypes.Choice })
12180
- ], CertificateChoices);
12181
- let CertificateSet = CertificateSet_1 = class CertificateSet extends AsnArray {
11670
+ ], exports.CertificateChoices);
11671
+ exports.CertificateSet = CertificateSet_1 = class CertificateSet extends AsnArray {
12182
11672
  constructor(items) {
12183
11673
  super(items);
12184
11674
  Object.setPrototypeOf(this, CertificateSet_1.prototype);
12185
11675
  }
12186
11676
  };
12187
- CertificateSet = CertificateSet_1 = __decorate$1([
12188
- AsnType({ type: exports.AsnTypeTypes.Set, itemType: CertificateChoices })
12189
- ], CertificateSet);
11677
+ exports.CertificateSet = CertificateSet_1 = __decorate$1([
11678
+ AsnType({ type: exports.AsnTypeTypes.Set, itemType: exports.CertificateChoices })
11679
+ ], exports.CertificateSet);
12190
11680
 
12191
11681
  class ContentInfo {
12192
11682
  constructor(params = {}) {
@@ -12202,20 +11692,20 @@ __decorate$1([
12202
11692
  AsnProp({ type: exports.AsnPropTypes.Any, context: 0 })
12203
11693
  ], ContentInfo.prototype, "content", void 0);
12204
11694
 
12205
- let EncapsulatedContent = class EncapsulatedContent {
11695
+ exports.EncapsulatedContent = class EncapsulatedContent {
12206
11696
  constructor(params = {}) {
12207
11697
  Object.assign(this, params);
12208
11698
  }
12209
11699
  };
12210
11700
  __decorate$1([
12211
11701
  AsnProp({ type: OctetString })
12212
- ], EncapsulatedContent.prototype, "single", void 0);
11702
+ ], exports.EncapsulatedContent.prototype, "single", void 0);
12213
11703
  __decorate$1([
12214
11704
  AsnProp({ type: exports.AsnPropTypes.Any })
12215
- ], EncapsulatedContent.prototype, "any", void 0);
12216
- EncapsulatedContent = __decorate$1([
11705
+ ], exports.EncapsulatedContent.prototype, "any", void 0);
11706
+ exports.EncapsulatedContent = __decorate$1([
12217
11707
  AsnType({ type: exports.AsnTypeTypes.Choice })
12218
- ], EncapsulatedContent);
11708
+ ], exports.EncapsulatedContent);
12219
11709
  class EncapsulatedContentInfo {
12220
11710
  constructor(params = {}) {
12221
11711
  this.eContentType = "";
@@ -12226,7 +11716,7 @@ __decorate$1([
12226
11716
  AsnProp({ type: exports.AsnPropTypes.ObjectIdentifier })
12227
11717
  ], EncapsulatedContentInfo.prototype, "eContentType", void 0);
12228
11718
  __decorate$1([
12229
- AsnProp({ type: EncapsulatedContent, context: 0, optional: true })
11719
+ AsnProp({ type: exports.EncapsulatedContent, context: 0, optional: true })
12230
11720
  ], EncapsulatedContentInfo.prototype, "eContent", void 0);
12231
11721
 
12232
11722
  let EncryptedContent = class EncryptedContent {
@@ -12238,7 +11728,14 @@ __decorate$1([
12238
11728
  AsnProp({ type: OctetString, context: 0, implicit: true, optional: true })
12239
11729
  ], EncryptedContent.prototype, "value", void 0);
12240
11730
  __decorate$1([
12241
- AsnProp({ type: OctetString, converter: AsnConstructedOctetStringConverter, context: 0, implicit: true, optional: true, repeated: "sequence" })
11731
+ AsnProp({
11732
+ type: OctetString,
11733
+ converter: AsnConstructedOctetStringConverter,
11734
+ context: 0,
11735
+ implicit: true,
11736
+ optional: true,
11737
+ repeated: "sequence",
11738
+ })
12242
11739
  ], EncryptedContent.prototype, "constructedValue", void 0);
12243
11740
  EncryptedContent = __decorate$1([
12244
11741
  AsnType({ type: exports.AsnTypeTypes.Choice })
@@ -12564,7 +12061,7 @@ class OriginatorInfo {
12564
12061
  }
12565
12062
  }
12566
12063
  __decorate$1([
12567
- AsnProp({ type: CertificateSet, context: 0, implicit: true, optional: true })
12064
+ AsnProp({ type: exports.CertificateSet, context: 0, implicit: true, optional: true })
12568
12065
  ], OriginatorInfo.prototype, "certs", void 0);
12569
12066
  __decorate$1([
12570
12067
  AsnProp({ type: RevocationInfoChoices, context: 1, implicit: true, optional: true })
@@ -12633,7 +12130,7 @@ __decorate$1([
12633
12130
  AsnProp({ type: EncapsulatedContentInfo })
12634
12131
  ], SignedData.prototype, "encapContentInfo", void 0);
12635
12132
  __decorate$1([
12636
- AsnProp({ type: CertificateSet, context: 0, implicit: true, optional: true })
12133
+ AsnProp({ type: exports.CertificateSet, context: 0, implicit: true, optional: true })
12637
12134
  ], SignedData.prototype, "certificates", void 0);
12638
12135
  __decorate$1([
12639
12136
  AsnProp({ type: RevocationInfoChoices, context: 1, implicit: true, optional: true })
@@ -13060,14 +12557,13 @@ exports.Attribute = Attribute$1;
13060
12557
  exports.AttributeCertificate = AttributeCertificate;
13061
12558
  exports.AuthorityKeyIdentifier = AuthorityKeyIdentifier;
13062
12559
  exports.BasicConstraints = BasicConstraints;
13063
- exports.BufferSourceConverter_1 = BufferSourceConverter_1;
13064
12560
  exports.CabforganizationIdentifier = CabforganizationIdentifier;
13065
12561
  exports.Certificate = Certificate;
13066
12562
  exports.CertificateList = CertificateList;
13067
12563
  exports.CertificateTemplate = CertificateTemplate;
13068
12564
  exports.CertificateTransparency = CertificateTransparency;
13069
12565
  exports.CertificationRequest = CertificationRequest;
13070
- exports.Convert_1 = Convert_1;
12566
+ exports.ContentInfo = ContentInfo;
13071
12567
  exports.Download = Download;
13072
12568
  exports.EDIPartyName = EDIPartyName;
13073
12569
  exports.EntrustVersionInfo = EntrustVersionInfo;
@@ -13080,23 +12576,25 @@ exports.NameConstraints = NameConstraints;
13080
12576
  exports.NetscapeCertType = NetscapeCertType;
13081
12577
  exports.NonStandardKeyDescription = NonStandardKeyDescription;
13082
12578
  exports.OIDs = OIDs;
12579
+ exports.OctetString = OctetString;
13083
12580
  exports.OtherName = OtherName;
12581
+ exports.PemConverter = PemConverter;
13084
12582
  exports.PolicyConstraints = PolicyConstraints;
13085
12583
  exports.PrivateKeyUsagePeriod = PrivateKeyUsagePeriod;
13086
12584
  exports.RSAPublicKey = RSAPublicKey;
13087
12585
  exports.RootOfTrust = RootOfTrust;
13088
12586
  exports.SemanticsInformation = SemanticsInformation;
12587
+ exports.SignedData = SignedData;
13089
12588
  exports.SubjectKeyIdentifier = SubjectKeyIdentifier;
13090
12589
  exports.Timestamp = Timestamp;
13091
12590
  exports.UserNotice = UserNotice;
13092
12591
  exports.__decorate = __decorate$1;
13093
- exports.base64Format = base64Format;
12592
+ exports.buildExports = buildExports;
13094
12593
  exports.certificateRawToBuffer = certificateRawToBuffer;
13095
12594
  exports.dateDiff = dateDiff;
13096
12595
  exports.dateShort = dateShort;
13097
12596
  exports.downloadFromBuffer = downloadFromBuffer;
13098
12597
  exports.getCertificateThumbprint = getCertificateThumbprint;
13099
- exports.hexFormat = hexFormat;
13100
12598
  exports.id_ActivityDescription = id_ActivityDescription;
13101
12599
  exports.id_DomainNameBeneficiary = id_DomainNameBeneficiary;
13102
12600
  exports.id_DomainNameLegalRepresentative = id_DomainNameLegalRepresentative;
@@ -13115,5 +12613,6 @@ exports.id_pkcs9_at_unstructuredName = id_pkcs9_at_unstructuredName;
13115
12613
  exports.id_qcs_pkixQCSyntax_v2 = id_qcs_pkixQCSyntax_v2;
13116
12614
  exports.id_rsaEncryption = id_rsaEncryption;
13117
12615
  exports.l10n = l10n;
12616
+ //# sourceMappingURL=certification_request-Bipg1Az7.js.map
13118
12617
 
13119
- //# sourceMappingURL=certification_request-ad267278.js.map
12618
+ //# sourceMappingURL=certification_request-Bipg1Az7.js.map