@peculiar/certificates-viewer 4.2.0 → 4.2.1

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 (657) hide show
  1. package/components/actions.js +3 -3
  2. package/components/actions.js.map +1 -1
  3. package/components/arrow_top.js +6 -6
  4. package/components/arrow_top.js.map +1 -1
  5. package/components/attribute-certificate-viewer.js +222 -220
  6. package/components/attribute-certificate-viewer.js.map +1 -1
  7. package/components/button-menu.js +36 -35
  8. package/components/button-menu.js.map +1 -1
  9. package/components/button.js +42 -42
  10. package/components/button.js.map +1 -1
  11. package/components/certificate-viewer.js +250 -249
  12. package/components/certificate-viewer.js.map +1 -1
  13. package/components/circular-progress.js +34 -33
  14. package/components/circular-progress.js.map +1 -1
  15. package/components/crl-viewer.js +214 -213
  16. package/components/crl-viewer.js.map +1 -1
  17. package/components/cross.js +9 -9
  18. package/components/cross.js.map +1 -1
  19. package/components/csr-viewer.js +200 -202
  20. package/components/csr-viewer.js.map +1 -1
  21. package/components/download.js +56 -56
  22. package/components/download.js.map +1 -1
  23. package/components/highlight-words.js +45 -44
  24. package/components/highlight-words.js.map +1 -1
  25. package/components/index2.js +146 -156
  26. package/components/index2.js.map +1 -1
  27. package/components/issuer_name.js +6 -6
  28. package/components/issuer_name.js.map +1 -1
  29. package/components/miscellaneous.js +3335 -3403
  30. package/components/miscellaneous.js.map +1 -1
  31. package/components/peculiar-attribute-certificate-viewer.d.ts +2 -2
  32. package/components/peculiar-button-menu.d.ts +2 -2
  33. package/components/peculiar-certificate-decoder.d.ts +2 -2
  34. package/components/peculiar-certificate-decoder.js +183 -182
  35. package/components/peculiar-certificate-decoder.js.map +1 -1
  36. package/components/peculiar-certificate-viewer.d.ts +2 -2
  37. package/components/peculiar-certificates-viewer.d.ts +2 -2
  38. package/components/peculiar-certificates-viewer.js +297 -296
  39. package/components/peculiar-certificates-viewer.js.map +1 -1
  40. package/components/peculiar-circular-progress.d.ts +2 -2
  41. package/components/peculiar-crl-viewer.d.ts +2 -2
  42. package/components/peculiar-csr-viewer.d.ts +2 -2
  43. package/components/peculiar-highlight-words.d.ts +2 -2
  44. package/components/peculiar-text-hider.d.ts +2 -2
  45. package/components/peculiar-text-hider.js +23 -22
  46. package/components/peculiar-text-hider.js.map +1 -1
  47. package/components/subject_name.js +35 -35
  48. package/components/subject_name.js.map +1 -1
  49. package/dist/cjs/actions-789906f5.js +23 -0
  50. package/dist/cjs/{actions-19013d4a.js.map → actions-789906f5.js.map} +1 -1
  51. package/dist/cjs/app-globals-c20ffa41.js +10 -0
  52. package/dist/cjs/app-globals-c20ffa41.js.map +1 -0
  53. package/dist/cjs/arrow_top-76e4261e.js +37 -0
  54. package/dist/cjs/{arrow_top-834fb7ec.js.map → arrow_top-76e4261e.js.map} +1 -1
  55. package/dist/cjs/button-87086210.js +77 -0
  56. package/dist/cjs/{button-14e2b73f.js.map → button-87086210.js.map} +1 -1
  57. package/dist/cjs/{certification_request-5672c667.js → certification_request-b0d72620.js} +2636 -2706
  58. package/dist/cjs/certification_request-b0d72620.js.map +1 -0
  59. package/dist/cjs/crl-812dd7a1.js +312 -0
  60. package/dist/cjs/crl-812dd7a1.js.map +1 -0
  61. package/dist/cjs/cross-bd099933.js +51 -0
  62. package/dist/cjs/{cross-9872c473.js.map → cross-bd099933.js.map} +1 -1
  63. package/dist/cjs/{download-0fa5b33c.js → download-6f550549.js} +50 -50
  64. package/dist/cjs/download-6f550549.js.map +1 -0
  65. package/dist/cjs/download-820d66ba.js +23 -0
  66. package/dist/cjs/{download-254ddc57.js.map → download-820d66ba.js.map} +1 -1
  67. package/dist/cjs/{index-efd561e9.js → index-e2ae280a.js} +398 -145
  68. package/dist/cjs/index-e2ae280a.js.map +1 -0
  69. package/dist/cjs/index.cjs.js +8 -8
  70. package/dist/cjs/link-a3d3799d.js +25 -0
  71. package/dist/cjs/{link-6aea0be4.js.map → link-a3d3799d.js.map} +1 -1
  72. package/dist/cjs/loader.cjs.js +4 -2
  73. package/dist/cjs/loader.cjs.js.map +1 -1
  74. package/dist/cjs/miscellaneous-dcb93a5b.js +1419 -0
  75. package/dist/cjs/miscellaneous-dcb93a5b.js.map +1 -0
  76. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +481 -480
  77. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -1
  78. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +72 -69
  79. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -1
  80. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +151 -150
  81. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  82. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +107 -106
  83. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  84. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +258 -257
  85. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  86. package/dist/cjs/peculiar-text-hider.cjs.entry.js +12 -11
  87. package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -1
  88. package/dist/cjs/peculiar.cjs.js +5 -3
  89. package/dist/cjs/peculiar.cjs.js.map +1 -1
  90. package/dist/cjs/x509_certificate-ebf4cbd4.js +160 -0
  91. package/dist/cjs/x509_certificate-ebf4cbd4.js.map +1 -0
  92. package/dist/collection/collection-manifest.json +2 -2
  93. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +259 -259
  94. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -1
  95. package/dist/collection/components/button/button.js +9 -9
  96. package/dist/collection/components/button/button.js.map +1 -1
  97. package/dist/collection/components/button-menu/button-menu.js +60 -60
  98. package/dist/collection/components/button-menu/button-menu.js.map +1 -1
  99. package/dist/collection/components/certificate-decoder/certificate-decoder.js +211 -211
  100. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  101. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +4 -3
  102. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -1
  103. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +2 -2
  104. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -1
  105. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +6 -6
  106. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -1
  107. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +2 -2
  108. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -1
  109. package/dist/collection/components/certificate-details-parts/attributes/index.js +42 -42
  110. package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
  111. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +3 -3
  112. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -1
  113. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +2 -2
  114. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -1
  115. package/dist/collection/components/certificate-details-parts/attributes/name_part.js +5 -5
  116. package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -1
  117. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +2 -2
  118. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -1
  119. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +2 -2
  120. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -1
  121. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +14 -14
  122. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -1
  123. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +4 -3
  124. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -1
  125. package/dist/collection/components/certificate-details-parts/basic_information.js +12 -12
  126. package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -1
  127. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +2 -2
  128. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -1
  129. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +2 -2
  130. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -1
  131. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +1 -1
  132. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -1
  133. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +8 -8
  134. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -1
  135. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +2 -2
  136. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -1
  137. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +7 -7
  138. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -1
  139. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +5 -5
  140. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -1
  141. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +3 -3
  142. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -1
  143. package/dist/collection/components/certificate-details-parts/extensions/cabforganization_identifier_extension.js +2 -2
  144. package/dist/collection/components/certificate-details-parts/extensions/cabforganization_identifier_extension.js.map +1 -1
  145. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +23 -23
  146. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -1
  147. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +2 -2
  148. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -1
  149. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +5 -5
  150. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -1
  151. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +8 -8
  152. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -1
  153. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +2 -2
  154. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -1
  155. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +2 -2
  156. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -1
  157. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +2 -2
  158. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -1
  159. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +2 -2
  160. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -1
  161. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +5 -5
  162. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -1
  163. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +52 -52
  164. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -1
  165. package/dist/collection/components/certificate-details-parts/extensions/index.js +121 -121
  166. package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -1
  167. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +5 -5
  168. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -1
  169. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +4 -4
  170. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -1
  171. package/dist/collection/components/certificate-details-parts/extensions/key_description_extension.js +58 -58
  172. package/dist/collection/components/certificate-details-parts/extensions/key_description_extension.js.map +1 -1
  173. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +2 -2
  174. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -1
  175. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +2 -2
  176. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -1
  177. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +2 -2
  178. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -1
  179. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +42 -42
  180. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -1
  181. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +5 -5
  182. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -1
  183. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +2 -2
  184. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -1
  185. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +2 -2
  186. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -1
  187. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +2 -2
  188. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -1
  189. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +6 -7
  190. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -1
  191. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +2 -2
  192. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -1
  193. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +29 -29
  194. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -1
  195. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +2 -2
  196. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -1
  197. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +5 -5
  198. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -1
  199. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +8 -8
  200. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -1
  201. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +2 -2
  202. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -1
  203. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +6 -8
  204. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -1
  205. package/dist/collection/components/certificate-details-parts/holder.js +19 -21
  206. package/dist/collection/components/certificate-details-parts/holder.js.map +1 -1
  207. package/dist/collection/components/certificate-details-parts/issuer.js +8 -8
  208. package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -1
  209. package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -6
  210. package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -1
  211. package/dist/collection/components/certificate-details-parts/miscellaneous.js +6 -6
  212. package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -1
  213. package/dist/collection/components/certificate-details-parts/public_key.js +29 -29
  214. package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -1
  215. package/dist/collection/components/certificate-details-parts/revoked_certificates.js +30 -30
  216. package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -1
  217. package/dist/collection/components/certificate-details-parts/row.js +26 -26
  218. package/dist/collection/components/certificate-details-parts/row.js.map +1 -1
  219. package/dist/collection/components/certificate-details-parts/signature.js +13 -13
  220. package/dist/collection/components/certificate-details-parts/signature.js.map +1 -1
  221. package/dist/collection/components/certificate-details-parts/subject_name.js +5 -5
  222. package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -1
  223. package/dist/collection/components/certificate-details-parts/thumbprints.js +12 -12
  224. package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -1
  225. package/dist/collection/components/certificate-summary/certificate-summary.js +3 -3
  226. package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -1
  227. package/dist/collection/components/certificate-viewer/certificate-viewer.js +278 -278
  228. package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -1
  229. package/dist/collection/components/certificates-viewer/certificates-viewer.js +374 -374
  230. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -1
  231. package/dist/collection/components/circular-progress/circular-progress.js +67 -67
  232. package/dist/collection/components/circular-progress/circular-progress.js.map +1 -1
  233. package/dist/collection/components/crl-viewer/crl-viewer.js +229 -229
  234. package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
  235. package/dist/collection/components/csr-viewer/csr-viewer.js +211 -219
  236. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  237. package/dist/collection/components/highlight-words/highlight-words.js +60 -60
  238. package/dist/collection/components/highlight-words/highlight-words.js.map +1 -1
  239. package/dist/collection/components/icons/actions.js +2 -2
  240. package/dist/collection/components/icons/actions.js.map +1 -1
  241. package/dist/collection/components/icons/arrow_bottom.js +2 -2
  242. package/dist/collection/components/icons/arrow_bottom.js.map +1 -1
  243. package/dist/collection/components/icons/arrow_top.js +2 -2
  244. package/dist/collection/components/icons/arrow_top.js.map +1 -1
  245. package/dist/collection/components/icons/cross.js +2 -2
  246. package/dist/collection/components/icons/cross.js.map +1 -1
  247. package/dist/collection/components/icons/details.js +2 -2
  248. package/dist/collection/components/icons/details.js.map +1 -1
  249. package/dist/collection/components/icons/download.js +2 -2
  250. package/dist/collection/components/icons/download.js.map +1 -1
  251. package/dist/collection/components/icons/link.js +2 -2
  252. package/dist/collection/components/icons/link.js.map +1 -1
  253. package/dist/collection/components/link/link.js +4 -4
  254. package/dist/collection/components/link/link.js.map +1 -1
  255. package/dist/collection/components/text-hider/text-hider.js +23 -23
  256. package/dist/collection/components/text-hider/text-hider.js.map +1 -1
  257. package/dist/collection/components/typography/typography.js +32 -32
  258. package/dist/collection/components/typography/typography.js.map +1 -1
  259. package/dist/collection/constants/logs.js +77 -77
  260. package/dist/collection/constants/logs.js.map +1 -1
  261. package/dist/collection/constants/oids.js +2334 -2334
  262. package/dist/collection/constants/oids.js.map +1 -1
  263. package/dist/collection/crypto/asn_data.js +31 -31
  264. package/dist/collection/crypto/asn_data.js.map +1 -1
  265. package/dist/collection/crypto/attribute.js +35 -51
  266. package/dist/collection/crypto/attribute.js.map +1 -1
  267. package/dist/collection/crypto/crl.js +66 -66
  268. package/dist/collection/crypto/crl.js.map +1 -1
  269. package/dist/collection/crypto/csr.js +76 -69
  270. package/dist/collection/crypto/csr.js.map +1 -1
  271. package/dist/collection/crypto/extension.js +63 -138
  272. package/dist/collection/crypto/extension.js.map +1 -1
  273. package/dist/collection/crypto/extensions/cabforganization_identifier.js +20 -15
  274. package/dist/collection/crypto/extensions/cabforganization_identifier.js.map +1 -1
  275. package/dist/collection/crypto/name.js +31 -31
  276. package/dist/collection/crypto/name.js.map +1 -1
  277. package/dist/collection/crypto/provider.js +26 -26
  278. package/dist/collection/crypto/provider.js.map +1 -1
  279. package/dist/collection/crypto/utils.js +23 -23
  280. package/dist/collection/crypto/utils.js.map +1 -1
  281. package/dist/collection/crypto/x509_attribute_certificate.js +66 -66
  282. package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
  283. package/dist/collection/crypto/x509_certificate.js +139 -139
  284. package/dist/collection/crypto/x509_certificate.js.map +1 -1
  285. package/dist/collection/utils/camel_case_to_words.js +2 -2
  286. package/dist/collection/utils/camel_case_to_words.js.map +1 -1
  287. package/dist/collection/utils/date_formatter.js +6 -6
  288. package/dist/collection/utils/date_formatter.js.map +1 -1
  289. package/dist/collection/utils/download.js +24 -24
  290. package/dist/collection/utils/download.js.map +1 -1
  291. package/dist/collection/utils/download_from_buffer.js +25 -25
  292. package/dist/collection/utils/download_from_buffer.js.map +1 -1
  293. package/dist/collection/utils/get_string_by_oid.js +5 -5
  294. package/dist/collection/utils/get_string_by_oid.js.map +1 -1
  295. package/dist/collection/utils/is_link.js +1 -1
  296. package/dist/collection/utils/is_link.js.map +1 -1
  297. package/dist/collection/utils/l10n.js +25 -25
  298. package/dist/collection/utils/l10n.js.map +1 -1
  299. package/dist/collection/utils/read_file.js +40 -40
  300. package/dist/collection/utils/read_file.js.map +1 -1
  301. package/dist/collection/utils/validator.js +13 -13
  302. package/dist/collection/utils/validator.js.map +1 -1
  303. package/dist/esm/actions-aebcbc9d.js +21 -0
  304. package/dist/esm/{actions-8d745b2a.js.map → actions-aebcbc9d.js.map} +1 -1
  305. package/dist/esm/app-globals-5e9b67e0.js +8 -0
  306. package/dist/esm/app-globals-5e9b67e0.js.map +1 -0
  307. package/dist/esm/arrow_top-aee1ee02.js +34 -0
  308. package/dist/esm/{arrow_top-fc298828.js.map → arrow_top-aee1ee02.js.map} +1 -1
  309. package/dist/esm/button-a2fabf9a.js +74 -0
  310. package/dist/esm/{button-35146bdd.js.map → button-a2fabf9a.js.map} +1 -1
  311. package/dist/esm/{certification_request-d5ea5973.js → certification_request-2c054ece.js} +2637 -2707
  312. package/dist/esm/certification_request-2c054ece.js.map +1 -0
  313. package/dist/esm/crl-a7318483.js +308 -0
  314. package/dist/esm/crl-a7318483.js.map +1 -0
  315. package/dist/esm/cross-1377606f.js +47 -0
  316. package/dist/esm/{cross-9ec9a759.js.map → cross-1377606f.js.map} +1 -1
  317. package/dist/esm/download-14dc1047.js +21 -0
  318. package/dist/esm/{download-0cc3077a.js.map → download-14dc1047.js.map} +1 -1
  319. package/dist/esm/{download-aacb6eff.js → download-8c128e2e.js} +50 -50
  320. package/dist/esm/download-8c128e2e.js.map +1 -0
  321. package/dist/esm/{index-4079bbb5.js → index-ae188432.js} +398 -145
  322. package/dist/esm/index-ae188432.js.map +1 -0
  323. package/dist/esm/index.js +8 -8
  324. package/dist/esm/link-7e4e9060.js +23 -0
  325. package/dist/esm/{link-ad24c3be.js.map → link-7e4e9060.js.map} +1 -1
  326. package/dist/esm/loader.js +5 -3
  327. package/dist/esm/loader.js.map +1 -1
  328. package/dist/esm/miscellaneous-0e98b5bc.js +1401 -0
  329. package/dist/esm/miscellaneous-0e98b5bc.js.map +1 -0
  330. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +481 -480
  331. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
  332. package/dist/esm/peculiar-button-menu_3.entry.js +72 -69
  333. package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -1
  334. package/dist/esm/peculiar-certificate-decoder.entry.js +151 -150
  335. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  336. package/dist/esm/peculiar-certificate-viewer.entry.js +107 -106
  337. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  338. package/dist/esm/peculiar-certificates-viewer.entry.js +258 -257
  339. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  340. package/dist/esm/peculiar-text-hider.entry.js +12 -11
  341. package/dist/esm/peculiar-text-hider.entry.js.map +1 -1
  342. package/dist/esm/peculiar.js +6 -4
  343. package/dist/esm/peculiar.js.map +1 -1
  344. package/dist/esm/x509_certificate-ad568d3a.js +158 -0
  345. package/dist/esm/x509_certificate-ad568d3a.js.map +1 -0
  346. package/dist/esm-es5/{actions-8d745b2a.js → actions-aebcbc9d.js} +2 -2
  347. package/dist/esm-es5/app-globals-5e9b67e0.js +5 -0
  348. package/dist/esm-es5/app-globals-5e9b67e0.js.map +1 -0
  349. package/dist/esm-es5/{arrow_top-fc298828.js → arrow_top-aee1ee02.js} +2 -2
  350. package/dist/esm-es5/button-a2fabf9a.js +19 -0
  351. package/dist/esm-es5/{certification_request-d5ea5973.js → certification_request-2c054ece.js} +12 -12
  352. package/dist/esm-es5/certification_request-2c054ece.js.map +1 -0
  353. package/dist/esm-es5/crl-a7318483.js +33 -0
  354. package/dist/esm-es5/crl-a7318483.js.map +1 -0
  355. package/dist/esm-es5/{cross-9ec9a759.js → cross-1377606f.js} +2 -2
  356. package/dist/esm-es5/{download-0cc3077a.js → download-14dc1047.js} +2 -2
  357. package/dist/esm-es5/{download-aacb6eff.js → download-8c128e2e.js} +3 -3
  358. package/dist/esm-es5/{download-aacb6eff.js.map → download-8c128e2e.js.map} +1 -1
  359. package/dist/esm-es5/index-ae188432.js +6 -0
  360. package/dist/esm-es5/index-ae188432.js.map +1 -0
  361. package/dist/esm-es5/index.js +1 -1
  362. package/dist/esm-es5/{link-ad24c3be.js → link-7e4e9060.js} +3 -3
  363. package/dist/esm-es5/loader.js +2 -2
  364. package/dist/esm-es5/loader.js.map +1 -1
  365. package/dist/esm-es5/{miscellaneous-cdfd8905.js → miscellaneous-0e98b5bc.js} +51 -51
  366. package/dist/esm-es5/miscellaneous-0e98b5bc.js.map +1 -0
  367. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +17 -17
  368. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
  369. package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
  370. package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -1
  371. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +3 -3
  372. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  373. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +2 -2
  374. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  375. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +3 -3
  376. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  377. package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
  378. package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -1
  379. package/dist/esm-es5/peculiar.js +2 -2
  380. package/dist/esm-es5/peculiar.js.map +1 -1
  381. package/dist/esm-es5/x509_certificate-ad568d3a.js +12 -0
  382. package/dist/esm-es5/{x509_certificate-a9fcab55.js.map → x509_certificate-ad568d3a.js.map} +1 -1
  383. package/dist/peculiar/index.esm.js +1 -1
  384. package/dist/peculiar/{p-3b395604.system.entry.js → p-00302a20.system.entry.js} +3 -3
  385. package/dist/peculiar/p-00302a20.system.entry.js.map +1 -0
  386. package/dist/peculiar/p-0dbc8238.system.js +13 -0
  387. package/dist/peculiar/{p-ab7dc738.system.js.map → p-0dbc8238.system.js.map} +1 -1
  388. package/dist/peculiar/{p-4a6ceeda.js → p-1302bd67.js} +11 -11
  389. package/dist/peculiar/p-1302bd67.js.map +1 -0
  390. package/dist/peculiar/{p-59e5ac12.js → p-1f766dd5.js} +1 -1
  391. package/dist/peculiar/p-243244af.system.js +13 -0
  392. package/dist/peculiar/{p-0fc2e2b4.js → p-27ca6743.js} +2 -2
  393. package/dist/peculiar/p-3cb79cd9.js +6 -0
  394. package/dist/peculiar/p-3cb79cd9.js.map +1 -0
  395. package/dist/peculiar/{p-48474b8d.js → p-3d44cbd2.js} +3 -3
  396. package/dist/peculiar/p-3f9af5f5.system.js +97 -0
  397. package/dist/peculiar/p-3f9af5f5.system.js.map +1 -0
  398. package/dist/peculiar/{p-a67b8793.system.entry.js → p-496449cf.system.entry.js} +10 -10
  399. package/dist/peculiar/p-496449cf.system.entry.js.map +1 -0
  400. package/dist/peculiar/p-4bc5ddbe.js +19 -0
  401. package/dist/peculiar/{p-609ee9f0.entry.js → p-54b37ef9.entry.js} +2 -2
  402. package/dist/peculiar/p-54b37ef9.entry.js.map +1 -0
  403. package/dist/peculiar/p-5a662d6f.system.js +13 -0
  404. package/dist/peculiar/{p-a7386b78.entry.js → p-5c6f9a14.entry.js} +3 -3
  405. package/dist/peculiar/p-5c6f9a14.entry.js.map +1 -0
  406. package/dist/peculiar/p-5cf4562f.system.entry.js +111 -0
  407. package/dist/peculiar/p-5cf4562f.system.entry.js.map +1 -0
  408. package/dist/peculiar/{p-c35b180c.entry.js → p-5f3b0fc7.entry.js} +3 -3
  409. package/dist/peculiar/p-5f3b0fc7.entry.js.map +1 -0
  410. package/dist/peculiar/{p-a720c0a5.system.entry.js → p-6680f277.system.entry.js} +10 -10
  411. package/dist/peculiar/p-6680f277.system.entry.js.map +1 -0
  412. package/dist/peculiar/p-713563fb.entry.js +5 -0
  413. package/dist/peculiar/p-713563fb.entry.js.map +1 -0
  414. package/dist/peculiar/{p-67156853.js → p-75166532.js} +5 -5
  415. package/dist/peculiar/p-75166532.js.map +1 -0
  416. package/dist/peculiar/p-821bdcdc.system.js +6 -0
  417. package/dist/peculiar/p-821bdcdc.system.js.map +1 -0
  418. package/dist/peculiar/p-8393399a.system.js +5 -0
  419. package/dist/peculiar/p-8393399a.system.js.map +1 -0
  420. package/dist/peculiar/p-8bbee8f4.system.js +13 -0
  421. package/dist/peculiar/p-924790f5.js +33 -0
  422. package/dist/peculiar/p-924790f5.js.map +1 -0
  423. package/dist/peculiar/p-9712b827.system.js +20 -0
  424. package/dist/peculiar/{p-2fcad8cb.system.js.map → p-9712b827.system.js.map} +1 -1
  425. package/dist/peculiar/{p-370cee20.js → p-99efefea.js} +2 -2
  426. package/dist/peculiar/{p-1ceb0fe3.js → p-a9487007.js} +2 -2
  427. package/dist/peculiar/{p-17e3c47b.js → p-ae91d778.js} +2 -2
  428. package/dist/peculiar/p-afbd1c8e.entry.js +5 -0
  429. package/dist/peculiar/p-afbd1c8e.entry.js.map +1 -0
  430. package/dist/peculiar/p-b2890eb8.system.js +5 -0
  431. package/dist/peculiar/p-b5389885.system.entry.js +5 -0
  432. package/dist/peculiar/p-b5389885.system.entry.js.map +1 -0
  433. package/dist/peculiar/p-c156b495.system.js +33 -0
  434. package/dist/peculiar/p-c156b495.system.js.map +1 -0
  435. package/dist/peculiar/p-c23fd001.entry.js +110 -0
  436. package/dist/peculiar/p-c23fd001.entry.js.map +1 -0
  437. package/dist/peculiar/p-c241e4ba.system.js +20 -0
  438. package/dist/peculiar/{p-c99507d4.system.js.map → p-c241e4ba.system.js.map} +1 -1
  439. package/dist/peculiar/p-c2995a63.system.js +5 -0
  440. package/dist/peculiar/p-c2995a63.system.js.map +1 -0
  441. package/dist/peculiar/p-dac867e8.js +5 -0
  442. package/dist/peculiar/p-dac867e8.js.map +1 -0
  443. package/dist/peculiar/p-dde511c8.system.js +43 -0
  444. package/dist/{cjs/download-0fa5b33c.js.map → peculiar/p-dde511c8.system.js.map} +1 -1
  445. package/dist/peculiar/p-e4ad4f13.system.entry.js +5 -0
  446. package/dist/peculiar/p-e4ad4f13.system.entry.js.map +1 -0
  447. package/dist/peculiar/p-e6a6e602.js +12 -0
  448. package/dist/peculiar/p-eea904d7.system.js +27 -0
  449. package/dist/peculiar/{p-ddae2f8e.system.js.map → p-eea904d7.system.js.map} +1 -1
  450. package/dist/peculiar/p-ff3ced3c.system.js +369 -0
  451. package/dist/peculiar/p-ff3ced3c.system.js.map +1 -0
  452. package/dist/peculiar/peculiar.esm.js +1 -1
  453. package/dist/peculiar/peculiar.esm.js.map +1 -1
  454. package/dist/peculiar/peculiar.js +15 -15
  455. package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +68 -68
  456. package/dist/types/components/button/button.d.ts +4 -4
  457. package/dist/types/components/button-menu/button-menu.d.ts +7 -7
  458. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +31 -31
  459. package/dist/types/components/certificate-details-parts/attributes/activity_description_attribute.d.ts +1 -1
  460. package/dist/types/components/certificate-details-parts/attributes/as_string_attribute.d.ts +1 -1
  461. package/dist/types/components/certificate-details-parts/attributes/basic_attribute.d.ts +1 -1
  462. package/dist/types/components/certificate-details-parts/attributes/challenge_password_attribute.d.ts +1 -1
  463. package/dist/types/components/certificate-details-parts/attributes/index.d.ts +1 -1
  464. package/dist/types/components/certificate-details-parts/attributes/insurance_value_attribute.d.ts +1 -1
  465. package/dist/types/components/certificate-details-parts/attributes/name_attribute.d.ts +1 -1
  466. package/dist/types/components/certificate-details-parts/attributes/name_part.d.ts +1 -1
  467. package/dist/types/components/certificate-details-parts/attributes/type_relationship_attribute.d.ts +1 -1
  468. package/dist/types/components/certificate-details-parts/attributes/unstructured_name_attribute.d.ts +1 -1
  469. package/dist/types/components/certificate-details-parts/attributes/valuation_ranking_attribute.d.ts +1 -1
  470. package/dist/types/components/certificate-details-parts/attributes/web_gdpr_attribute.d.ts +1 -1
  471. package/dist/types/components/certificate-details-parts/basic_information.d.ts +8 -8
  472. package/dist/types/components/certificate-details-parts/extensions/archive_rev_info_extension.d.ts +1 -1
  473. package/dist/types/components/certificate-details-parts/extensions/as_string_extension.d.ts +1 -1
  474. package/dist/types/components/certificate-details-parts/extensions/authority_key_identifier_extension.d.ts +1 -1
  475. package/dist/types/components/certificate-details-parts/extensions/basic_constraints_extension.d.ts +1 -1
  476. package/dist/types/components/certificate-details-parts/extensions/basic_extension.d.ts +1 -1
  477. package/dist/types/components/certificate-details-parts/extensions/biometric_syntax_extension.d.ts +1 -1
  478. package/dist/types/components/certificate-details-parts/extensions/ca_version_extension.d.ts +1 -1
  479. package/dist/types/components/certificate-details-parts/extensions/cabforganization_identifier_extension.d.ts +1 -1
  480. package/dist/types/components/certificate-details-parts/extensions/certificate_policies_extension.d.ts +1 -1
  481. package/dist/types/components/certificate-details-parts/extensions/certificate_template_extension.d.ts +1 -1
  482. package/dist/types/components/certificate-details-parts/extensions/certificate_transparency_extension.d.ts +1 -1
  483. package/dist/types/components/certificate-details-parts/extensions/crl_distribution_points_extension.d.ts +1 -1
  484. package/dist/types/components/certificate-details-parts/extensions/crl_number_extension.d.ts +1 -1
  485. package/dist/types/components/certificate-details-parts/extensions/crl_reason_extension.d.ts +1 -1
  486. package/dist/types/components/certificate-details-parts/extensions/enroll_cert_type_extension.d.ts +1 -1
  487. package/dist/types/components/certificate-details-parts/extensions/entrust_version_info_extension.d.ts +1 -1
  488. package/dist/types/components/certificate-details-parts/extensions/extended_key_usage_extension.d.ts +1 -1
  489. package/dist/types/components/certificate-details-parts/extensions/general_name_part.d.ts +1 -1
  490. package/dist/types/components/certificate-details-parts/extensions/index.d.ts +2 -2
  491. package/dist/types/components/certificate-details-parts/extensions/info_access_syntax_extension.d.ts +1 -1
  492. package/dist/types/components/certificate-details-parts/extensions/issuing_distribution_point_extension.d.ts +1 -1
  493. package/dist/types/components/certificate-details-parts/extensions/key_description_extension.d.ts +1 -1
  494. package/dist/types/components/certificate-details-parts/extensions/key_usage_extension.d.ts +1 -1
  495. package/dist/types/components/certificate-details-parts/extensions/lei_extension.d.ts +1 -1
  496. package/dist/types/components/certificate-details-parts/extensions/lei_role_extennsion.d.ts +1 -1
  497. package/dist/types/components/certificate-details-parts/extensions/logotype_extension.d.ts +1 -1
  498. package/dist/types/components/certificate-details-parts/extensions/name_constraints_extension.d.ts +1 -1
  499. package/dist/types/components/certificate-details-parts/extensions/netscape_cert_type_extension.d.ts +1 -1
  500. package/dist/types/components/certificate-details-parts/extensions/netscape_comment_extension.d.ts +1 -1
  501. package/dist/types/components/certificate-details-parts/extensions/policy_constraints_extension.d.ts +1 -1
  502. package/dist/types/components/certificate-details-parts/extensions/policy_mappings_extension.d.ts +1 -1
  503. package/dist/types/components/certificate-details-parts/extensions/private_key_usage_period_extension.d.ts +1 -1
  504. package/dist/types/components/certificate-details-parts/extensions/qc_statements_extension.d.ts +1 -1
  505. package/dist/types/components/certificate-details-parts/extensions/subject_alternative_name_extension.d.ts +1 -1
  506. package/dist/types/components/certificate-details-parts/extensions/subject_directory_attributes_extension.d.ts +1 -1
  507. package/dist/types/components/certificate-details-parts/extensions/subject_key_identifier_extension.d.ts +1 -1
  508. package/dist/types/components/certificate-details-parts/extensions/timestamp_extension.d.ts +1 -1
  509. package/dist/types/components/certificate-details-parts/extensions/tn_auth_list_extension.d.ts +1 -1
  510. package/dist/types/components/certificate-details-parts/holder.d.ts +1 -1
  511. package/dist/types/components/certificate-details-parts/issuer.d.ts +1 -1
  512. package/dist/types/components/certificate-details-parts/issuer_name.d.ts +2 -2
  513. package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
  514. package/dist/types/components/certificate-details-parts/public_key.d.ts +1 -1
  515. package/dist/types/components/certificate-details-parts/revoked_certificates.d.ts +1 -1
  516. package/dist/types/components/certificate-details-parts/row.d.ts +7 -7
  517. package/dist/types/components/certificate-details-parts/signature.d.ts +1 -1
  518. package/dist/types/components/certificate-details-parts/subject_name.d.ts +1 -1
  519. package/dist/types/components/certificate-details-parts/thumbprints.d.ts +1 -1
  520. package/dist/types/components/certificate-summary/certificate-summary.d.ts +2 -2
  521. package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +74 -74
  522. package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +75 -75
  523. package/dist/types/components/circular-progress/circular-progress.d.ts +10 -10
  524. package/dist/types/components/crl-viewer/crl-viewer.d.ts +56 -56
  525. package/dist/types/components/csr-viewer/csr-viewer.d.ts +52 -53
  526. package/dist/types/components/highlight-words/highlight-words.d.ts +8 -8
  527. package/dist/types/components/icons/actions.d.ts +1 -1
  528. package/dist/types/components/icons/arrow_bottom.d.ts +1 -1
  529. package/dist/types/components/icons/arrow_top.d.ts +1 -1
  530. package/dist/types/components/icons/cross.d.ts +1 -1
  531. package/dist/types/components/icons/details.d.ts +1 -1
  532. package/dist/types/components/icons/download.d.ts +1 -1
  533. package/dist/types/components/icons/link.d.ts +1 -1
  534. package/dist/types/components/link/link.d.ts +2 -2
  535. package/dist/types/components/text-hider/text-hider.d.ts +2 -2
  536. package/dist/types/components/typography/typography.d.ts +4 -4
  537. package/dist/types/components.d.ts +24 -0
  538. package/dist/types/constants/logs.d.ts +77 -77
  539. package/dist/types/constants/oids.d.ts +2326 -2326
  540. package/dist/types/crypto/asn_data.d.ts +6 -6
  541. package/dist/types/crypto/attribute.d.ts +21 -6
  542. package/dist/types/crypto/crl.d.ts +23 -23
  543. package/dist/types/crypto/csr.d.ts +23 -21
  544. package/dist/types/crypto/extension.d.ts +51 -5
  545. package/dist/types/crypto/extensions/cabforganization_identifier.d.ts +5 -5
  546. package/dist/types/crypto/name.d.ts +7 -7
  547. package/dist/types/crypto/provider.d.ts +15 -15
  548. package/dist/types/crypto/x509_attribute_certificate.d.ts +24 -24
  549. package/dist/types/crypto/x509_certificate.d.ts +33 -33
  550. package/dist/types/stencil-public-runtime.d.ts +29 -0
  551. package/dist/types/utils/download.d.ts +16 -16
  552. package/dist/types/utils/l10n.d.ts +56 -56
  553. package/dist/types/utils/read_file.d.ts +7 -7
  554. package/hydrate/index.d.ts +2 -2
  555. package/hydrate/index.js +11363 -9541
  556. package/package.json +21 -13
  557. package/dist/cjs/actions-19013d4a.js +0 -23
  558. package/dist/cjs/arrow_top-834fb7ec.js +0 -37
  559. package/dist/cjs/button-14e2b73f.js +0 -77
  560. package/dist/cjs/certification_request-5672c667.js.map +0 -1
  561. package/dist/cjs/crl-3f681d44.js +0 -322
  562. package/dist/cjs/crl-3f681d44.js.map +0 -1
  563. package/dist/cjs/cross-9872c473.js +0 -51
  564. package/dist/cjs/download-254ddc57.js +0 -23
  565. package/dist/cjs/index-efd561e9.js.map +0 -1
  566. package/dist/cjs/link-6aea0be4.js +0 -25
  567. package/dist/cjs/miscellaneous-905ec852.js +0 -1416
  568. package/dist/cjs/miscellaneous-905ec852.js.map +0 -1
  569. package/dist/cjs/x509_certificate-69764c52.js +0 -160
  570. package/dist/cjs/x509_certificate-69764c52.js.map +0 -1
  571. package/dist/esm/actions-8d745b2a.js +0 -21
  572. package/dist/esm/arrow_top-fc298828.js +0 -34
  573. package/dist/esm/button-35146bdd.js +0 -74
  574. package/dist/esm/certification_request-d5ea5973.js.map +0 -1
  575. package/dist/esm/crl-d13d9ec5.js +0 -318
  576. package/dist/esm/crl-d13d9ec5.js.map +0 -1
  577. package/dist/esm/cross-9ec9a759.js +0 -47
  578. package/dist/esm/download-0cc3077a.js +0 -21
  579. package/dist/esm/download-aacb6eff.js.map +0 -1
  580. package/dist/esm/index-4079bbb5.js.map +0 -1
  581. package/dist/esm/link-ad24c3be.js +0 -23
  582. package/dist/esm/miscellaneous-cdfd8905.js +0 -1399
  583. package/dist/esm/miscellaneous-cdfd8905.js.map +0 -1
  584. package/dist/esm/x509_certificate-a9fcab55.js +0 -158
  585. package/dist/esm/x509_certificate-a9fcab55.js.map +0 -1
  586. package/dist/esm-es5/button-35146bdd.js +0 -19
  587. package/dist/esm-es5/certification_request-d5ea5973.js.map +0 -1
  588. package/dist/esm-es5/crl-d13d9ec5.js +0 -33
  589. package/dist/esm-es5/crl-d13d9ec5.js.map +0 -1
  590. package/dist/esm-es5/index-4079bbb5.js +0 -6
  591. package/dist/esm-es5/index-4079bbb5.js.map +0 -1
  592. package/dist/esm-es5/miscellaneous-cdfd8905.js.map +0 -1
  593. package/dist/esm-es5/x509_certificate-a9fcab55.js +0 -12
  594. package/dist/peculiar/p-0b356bb5.js +0 -6
  595. package/dist/peculiar/p-0b356bb5.js.map +0 -1
  596. package/dist/peculiar/p-14f281b0.system.js +0 -43
  597. package/dist/peculiar/p-14f281b0.system.js.map +0 -1
  598. package/dist/peculiar/p-2fcad8cb.system.js +0 -20
  599. package/dist/peculiar/p-33196289.entry.js +0 -5
  600. package/dist/peculiar/p-33196289.entry.js.map +0 -1
  601. package/dist/peculiar/p-3b395604.system.entry.js.map +0 -1
  602. package/dist/peculiar/p-4a6ceeda.js.map +0 -1
  603. package/dist/peculiar/p-5151cb6f.system.entry.js +0 -5
  604. package/dist/peculiar/p-5151cb6f.system.entry.js.map +0 -1
  605. package/dist/peculiar/p-53784f15.system.entry.js +0 -5
  606. package/dist/peculiar/p-53784f15.system.entry.js.map +0 -1
  607. package/dist/peculiar/p-5aabeba7.system.js +0 -6
  608. package/dist/peculiar/p-5aabeba7.system.js.map +0 -1
  609. package/dist/peculiar/p-5ab007e9.entry.js +0 -5
  610. package/dist/peculiar/p-5ab007e9.entry.js.map +0 -1
  611. package/dist/peculiar/p-609ee9f0.entry.js.map +0 -1
  612. package/dist/peculiar/p-67156853.js.map +0 -1
  613. package/dist/peculiar/p-6cb88fd6.system.js +0 -13
  614. package/dist/peculiar/p-6daee4d7.system.js +0 -369
  615. package/dist/peculiar/p-6daee4d7.system.js.map +0 -1
  616. package/dist/peculiar/p-6e48afc4.system.js +0 -34
  617. package/dist/peculiar/p-6e48afc4.system.js.map +0 -1
  618. package/dist/peculiar/p-718982f4.system.entry.js +0 -111
  619. package/dist/peculiar/p-718982f4.system.entry.js.map +0 -1
  620. package/dist/peculiar/p-7f9beaa8.js +0 -19
  621. package/dist/peculiar/p-80832207.system.js +0 -5
  622. package/dist/peculiar/p-80832207.system.js.map +0 -1
  623. package/dist/peculiar/p-8fac1d56.js +0 -33
  624. package/dist/peculiar/p-8fac1d56.js.map +0 -1
  625. package/dist/peculiar/p-94a453d7.js +0 -12
  626. package/dist/peculiar/p-a3eeb94b.system.js +0 -5
  627. package/dist/peculiar/p-a67b8793.system.entry.js.map +0 -1
  628. package/dist/peculiar/p-a720c0a5.system.entry.js.map +0 -1
  629. package/dist/peculiar/p-a7386b78.entry.js.map +0 -1
  630. package/dist/peculiar/p-ab7dc738.system.js +0 -13
  631. package/dist/peculiar/p-b313be9e.system.js +0 -13
  632. package/dist/peculiar/p-c35b180c.entry.js.map +0 -1
  633. package/dist/peculiar/p-c99507d4.system.js +0 -20
  634. package/dist/peculiar/p-ddae2f8e.system.js +0 -27
  635. package/dist/peculiar/p-e0f4bda5.system.js +0 -97
  636. package/dist/peculiar/p-e0f4bda5.system.js.map +0 -1
  637. package/dist/peculiar/p-e6a3b4d4.system.js +0 -13
  638. package/dist/peculiar/p-f86279f6.entry.js +0 -110
  639. package/dist/peculiar/p-f86279f6.entry.js.map +0 -1
  640. /package/dist/esm-es5/{actions-8d745b2a.js.map → actions-aebcbc9d.js.map} +0 -0
  641. /package/dist/esm-es5/{arrow_top-fc298828.js.map → arrow_top-aee1ee02.js.map} +0 -0
  642. /package/dist/esm-es5/{button-35146bdd.js.map → button-a2fabf9a.js.map} +0 -0
  643. /package/dist/esm-es5/{cross-9ec9a759.js.map → cross-1377606f.js.map} +0 -0
  644. /package/dist/esm-es5/{download-0cc3077a.js.map → download-14dc1047.js.map} +0 -0
  645. /package/dist/esm-es5/{link-ad24c3be.js.map → link-7e4e9060.js.map} +0 -0
  646. /package/dist/peculiar/{p-59e5ac12.js.map → p-1f766dd5.js.map} +0 -0
  647. /package/dist/peculiar/{p-6cb88fd6.system.js.map → p-243244af.system.js.map} +0 -0
  648. /package/dist/peculiar/{p-0fc2e2b4.js.map → p-27ca6743.js.map} +0 -0
  649. /package/dist/peculiar/{p-48474b8d.js.map → p-3d44cbd2.js.map} +0 -0
  650. /package/dist/peculiar/{p-7f9beaa8.js.map → p-4bc5ddbe.js.map} +0 -0
  651. /package/dist/peculiar/{p-b313be9e.system.js.map → p-5a662d6f.system.js.map} +0 -0
  652. /package/dist/peculiar/{p-e6a3b4d4.system.js.map → p-8bbee8f4.system.js.map} +0 -0
  653. /package/dist/peculiar/{p-370cee20.js.map → p-99efefea.js.map} +0 -0
  654. /package/dist/peculiar/{p-1ceb0fe3.js.map → p-a9487007.js.map} +0 -0
  655. /package/dist/peculiar/{p-17e3c47b.js.map → p-ae91d778.js.map} +0 -0
  656. /package/dist/peculiar/{p-a3eeb94b.system.js.map → p-b2890eb8.system.js.map} +0 -0
  657. /package/dist/peculiar/{p-94a453d7.js.map → p-e6a6e602.js.map} +0 -0
@@ -24,6 +24,7 @@ function _interopNamespace(e) {
24
24
  }
25
25
 
26
26
  const NAMESPACE = 'peculiar';
27
+ const BUILD = /* peculiar */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
27
28
 
28
29
  /**
29
30
  * Virtual DOM patching algorithm based on Snabbdom by
@@ -63,6 +64,13 @@ const HYDRATE_ID = 's-id';
63
64
  const HYDRATED_STYLE_ID = 'sty-id';
64
65
  const HYDRATE_CHILD_ID = 'c-id';
65
66
  const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
67
+ /**
68
+ * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
69
+ *
70
+ * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
71
+ * support as of Stencil v4.
72
+ */
73
+ const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
66
74
  const XLINK_NS = 'http://www.w3.org/1999/xlink';
67
75
  /**
68
76
  * Default style mode id
@@ -267,6 +275,17 @@ const convertToPrivate = (node) => {
267
275
  vnode.$name$ = node.vname;
268
276
  return vnode;
269
277
  };
278
+ /**
279
+ * Entrypoint of the client-side hydration process. Facilitates calls to hydrate the
280
+ * document and all its nodes.
281
+ *
282
+ * This process will also reconstruct the shadow root and slot DOM nodes for components using shadow DOM.
283
+ *
284
+ * @param hostElm The element to hydrate.
285
+ * @param tagName The element's tag name.
286
+ * @param hostId The host ID assigned to the element by the server.
287
+ * @param hostRef The host reference for the element.
288
+ */
270
289
  const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
271
290
  const endHydrate = createTime('hydrateClient', tagName);
272
291
  const shadowRoot = hostElm.shadowRoot;
@@ -284,6 +303,8 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
284
303
  const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
285
304
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
286
305
  const node = c.$elm$;
306
+ // Put the node back in its original location since the native Shadow DOM
307
+ // can handle rendering it its correct location now
287
308
  if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
288
309
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
289
310
  }
@@ -305,6 +326,22 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
305
326
  }
306
327
  endHydrate();
307
328
  };
329
+ /**
330
+ * Recursively constructs the virtual node tree for a host element and its children.
331
+ * The tree is constructed by parsing the annotations set on the nodes by the server.
332
+ *
333
+ * In addition to constructing the vNode tree, we also track information about the node's
334
+ * descendants like which are slots, which should exist in the shadow root, and which
335
+ * are nodes that should be rendered as children of the parent node.
336
+ *
337
+ * @param parentVNode The vNode representing the parent node.
338
+ * @param childRenderNodes An array of all child nodes in the parent's node tree.
339
+ * @param slotNodes An array of all slot nodes in the parent's node tree.
340
+ * @param shadowRootNodes An array all nodes that should be rendered in the shadow root in the parent's node tree.
341
+ * @param hostElm The parent element.
342
+ * @param node The node to construct the vNode tree for.
343
+ * @param hostId The host ID assigned to the element by the server.
344
+ */
308
345
  const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
309
346
  let childNodeType;
310
347
  let childIdSplt;
@@ -449,6 +486,13 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
449
486
  parentVNode.$children$ = [vnode];
450
487
  }
451
488
  };
489
+ /**
490
+ * Recursively locate any comments representing an original location for a node in a node's
491
+ * children or shadowRoot children.
492
+ *
493
+ * @param node The node to search.
494
+ * @param orgLocNodes A map of the original location annotation and the current node being searched.
495
+ */
452
496
  const initializeDocumentHydrate = (node, orgLocNodes) => {
453
497
  if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
454
498
  let i = 0;
@@ -593,6 +637,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
593
637
  }
594
638
  styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
595
639
  }
640
+ // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
641
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
642
+ styleElm.innerHTML += SLOT_FB_CSS;
643
+ }
596
644
  if (appliedStyles) {
597
645
  appliedStyles.add(scopeId);
598
646
  }
@@ -727,11 +775,19 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
727
775
  // except for the first character, we keep the event name case
728
776
  memberName = ln[2] + memberName.slice(3);
729
777
  }
730
- if (oldValue) {
731
- plt.rel(elm, memberName, oldValue, false);
732
- }
733
- if (newValue) {
734
- plt.ael(elm, memberName, newValue, false);
778
+ if (oldValue || newValue) {
779
+ // Need to account for "capture" events.
780
+ // If the event name ends with "Capture", we'll update the name to remove
781
+ // the "Capture" suffix and make sure the event listener is setup to handle the capture event.
782
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
783
+ // Make sure we only replace the last instance of "Capture"
784
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
785
+ if (oldValue) {
786
+ plt.rel(elm, memberName, oldValue, capture);
787
+ }
788
+ if (newValue) {
789
+ plt.ael(elm, memberName, newValue, capture);
790
+ }
735
791
  }
736
792
  }
737
793
  else {
@@ -753,7 +809,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
753
809
  elm[memberName] = newValue;
754
810
  }
755
811
  }
756
- catch (e) { }
812
+ catch (e) {
813
+ /**
814
+ * in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
815
+ */
816
+ }
757
817
  }
758
818
  /**
759
819
  * Need to manually update attribute if:
@@ -792,7 +852,14 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
792
852
  }
793
853
  };
794
854
  const parseClassListRegex = /\s/;
855
+ /**
856
+ * Parsed a string of classnames into an array
857
+ * @param value className string, e.g. "foo bar baz"
858
+ * @returns list of classes, e.g. ["foo", "bar", "baz"]
859
+ */
795
860
  const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
861
+ const CAPTURE_EVENT_SUFFIX = 'Capture';
862
+ const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
796
863
  const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
797
864
  // if the element passed in is a shadow root, which is a document fragment
798
865
  // then we want to be adding attrs/props to the shadow root's "host" element
@@ -826,6 +893,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
826
893
  * @returns the newly created node
827
894
  */
828
895
  const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
896
+ var _a;
829
897
  // tslint:disable-next-line: prefer-const
830
898
  const newVNode = newParentVNode.$children$[childIndex];
831
899
  let i = 0;
@@ -899,8 +967,10 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
899
967
  }
900
968
  }
901
969
  }
970
+ // This needs to always happen so we can hide nodes that are projected
971
+ // to another component but don't end up in a slot
972
+ elm['s-hn'] = hostTagName;
902
973
  {
903
- elm['s-hn'] = hostTagName;
904
974
  if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
905
975
  // remember the content reference comment
906
976
  elm['s-sr'] = true;
@@ -908,12 +978,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
908
978
  elm['s-cr'] = contentRef;
909
979
  // remember the slot name, or empty string for default slot
910
980
  elm['s-sn'] = newVNode.$name$ || '';
981
+ // remember the ref callback function
982
+ elm['s-rf'] = (_a = newVNode.$attrs$) === null || _a === void 0 ? void 0 : _a.ref;
911
983
  // check if we've got an old vnode for this slot
912
984
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
913
985
  if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
914
- // we've got an old slot vnode and the wrapper is being replaced
915
- // so let's move the old slot content back to it's original location
916
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
986
+ {
987
+ // we've got an old slot vnode and the wrapper is being replaced
988
+ // so let's move the old slot content back to its original location
989
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
990
+ }
917
991
  }
918
992
  }
919
993
  }
@@ -921,20 +995,27 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
921
995
  };
922
996
  const putBackInOriginalLocation = (parentElm, recursive) => {
923
997
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
924
- const oldSlotChildNodes = parentElm.childNodes;
998
+ const oldSlotChildNodes = Array.from(parentElm.childNodes);
999
+ if (parentElm['s-sr'] && BUILD.experimentalSlotFixes) {
1000
+ let node = parentElm;
1001
+ while ((node = node.nextSibling)) {
1002
+ if (node && node['s-sn'] === parentElm['s-sn'] && node['s-sh'] === hostTagName) {
1003
+ oldSlotChildNodes.push(node);
1004
+ }
1005
+ }
1006
+ }
925
1007
  for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
926
1008
  const childNode = oldSlotChildNodes[i];
927
1009
  if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
928
- // // this child node in the old element is from another component
929
- // // remove this node from the old slot's parent
930
- // childNode.remove();
931
1010
  // and relocate it back to it's original location
932
1011
  parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
933
1012
  // remove the old original location comment entirely
934
1013
  // later on the patch function will know what to do
935
- // and move this to the correct spot in need be
1014
+ // and move this to the correct spot if need be
936
1015
  childNode['s-ol'].remove();
937
1016
  childNode['s-ol'] = undefined;
1017
+ // Reset so we can correctly move the node around again.
1018
+ childNode['s-sh'] = undefined;
938
1019
  checkSlotRelocate = true;
939
1020
  }
940
1021
  if (recursive) {
@@ -1079,8 +1160,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
1079
1160
  * @param oldCh the old children of the parent node
1080
1161
  * @param newVNode the new VNode which will replace the parent
1081
1162
  * @param newCh the new children of the parent node
1163
+ * @param isInitialRender whether or not this is the first render of the vdom
1082
1164
  */
1083
- const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1165
+ const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
1084
1166
  let oldStartIdx = 0;
1085
1167
  let newStartIdx = 0;
1086
1168
  let idxInOld = 0;
@@ -1107,24 +1189,24 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1107
1189
  else if (newEndVnode == null) {
1108
1190
  newEndVnode = newCh[--newEndIdx];
1109
1191
  }
1110
- else if (isSameVnode(oldStartVnode, newStartVnode)) {
1192
+ else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
1111
1193
  // if the start nodes are the same then we should patch the new VNode
1112
1194
  // onto the old one, and increment our `newStartIdx` and `oldStartIdx`
1113
1195
  // indices to reflect that. We don't need to move any DOM Nodes around
1114
1196
  // since things are matched up in order.
1115
- patch(oldStartVnode, newStartVnode);
1197
+ patch(oldStartVnode, newStartVnode, isInitialRender);
1116
1198
  oldStartVnode = oldCh[++oldStartIdx];
1117
1199
  newStartVnode = newCh[++newStartIdx];
1118
1200
  }
1119
- else if (isSameVnode(oldEndVnode, newEndVnode)) {
1201
+ else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
1120
1202
  // likewise, if the end nodes are the same we patch new onto old and
1121
1203
  // decrement our end indices, and also likewise in this case we don't
1122
1204
  // need to move any DOM Nodes.
1123
- patch(oldEndVnode, newEndVnode);
1205
+ patch(oldEndVnode, newEndVnode, isInitialRender);
1124
1206
  oldEndVnode = oldCh[--oldEndIdx];
1125
1207
  newEndVnode = newCh[--newEndIdx];
1126
1208
  }
1127
- else if (isSameVnode(oldStartVnode, newEndVnode)) {
1209
+ else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
1128
1210
  // case: "Vnode moved right"
1129
1211
  //
1130
1212
  // We've found that the last node in our window on the new children is
@@ -1142,7 +1224,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1142
1224
  if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1143
1225
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1144
1226
  }
1145
- patch(oldStartVnode, newEndVnode);
1227
+ patch(oldStartVnode, newEndVnode, isInitialRender);
1146
1228
  // We need to move the element for `oldStartVnode` into a position which
1147
1229
  // will be appropriate for `newEndVnode`. For this we can use
1148
1230
  // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
@@ -1164,7 +1246,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1164
1246
  oldStartVnode = oldCh[++oldStartIdx];
1165
1247
  newEndVnode = newCh[--newEndIdx];
1166
1248
  }
1167
- else if (isSameVnode(oldEndVnode, newStartVnode)) {
1249
+ else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
1168
1250
  // case: "Vnode moved left"
1169
1251
  //
1170
1252
  // We've found that the first node in our window on the new children is
@@ -1183,7 +1265,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1183
1265
  if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
1184
1266
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1185
1267
  }
1186
- patch(oldEndVnode, newStartVnode);
1268
+ patch(oldEndVnode, newStartVnode, isInitialRender);
1187
1269
  // We've already checked above if `oldStartVnode` and `newStartVnode` are
1188
1270
  // the same node, so since we're here we know that they are not. Thus we
1189
1271
  // can move the element for `oldEndVnode` _before_ the element for
@@ -1220,7 +1302,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1220
1302
  node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
1221
1303
  }
1222
1304
  else {
1223
- patch(elmToMove, newStartVnode);
1305
+ patch(elmToMove, newStartVnode, isInitialRender);
1224
1306
  // invalidate the matching old node so that we won't try to update it
1225
1307
  // again later on
1226
1308
  oldCh[idxInOld] = undefined;
@@ -1271,19 +1353,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
1271
1353
  *
1272
1354
  * @param leftVNode the first VNode to check
1273
1355
  * @param rightVNode the second VNode to check
1356
+ * @param isInitialRender whether or not this is the first render of the vdom
1274
1357
  * @returns whether they're equal or not
1275
1358
  */
1276
- const isSameVnode = (leftVNode, rightVNode) => {
1359
+ const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1277
1360
  // compare if two vnode to see if they're "technically" the same
1278
1361
  // need to have the same element tag, and same key to be the same
1279
1362
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1280
1363
  if (leftVNode.$tag$ === 'slot') {
1281
1364
  return leftVNode.$name$ === rightVNode.$name$;
1282
1365
  }
1283
- // this will be set if components in the build have `key` attrs set on them
1284
- {
1366
+ // this will be set if JSX tags in the build have `key` attrs set on them
1367
+ // we only want to check this if we're not on the first render since on
1368
+ // first render `leftVNode.$key$` will always be `null`, so we can be led
1369
+ // astray and, for instance, accidentally delete a DOM node that we want to
1370
+ // keep around.
1371
+ if (!isInitialRender) {
1285
1372
  return leftVNode.$key$ === rightVNode.$key$;
1286
1373
  }
1374
+ return true;
1287
1375
  }
1288
1376
  return false;
1289
1377
  };
@@ -1302,8 +1390,9 @@ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).paren
1302
1390
  *
1303
1391
  * @param oldVNode an old VNode whose DOM element and children we want to update
1304
1392
  * @param newVNode a new VNode representing an updated version of the old one
1393
+ * @param isInitialRender whether or not this is the first render of the vdom
1305
1394
  */
1306
- const patch = (oldVNode, newVNode) => {
1395
+ const patch = (oldVNode, newVNode, isInitialRender = false) => {
1307
1396
  const elm = (newVNode.$elm$ = oldVNode.$elm$);
1308
1397
  const oldChildren = oldVNode.$children$;
1309
1398
  const newChildren = newVNode.$children$;
@@ -1317,8 +1406,7 @@ const patch = (oldVNode, newVNode) => {
1317
1406
  isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
1318
1407
  }
1319
1408
  {
1320
- if (tag === 'slot')
1321
- ;
1409
+ if (tag === 'slot' && !useNativeShadowDom) ;
1322
1410
  else {
1323
1411
  // either this is the first render of an element OR it's an update
1324
1412
  // AND we already know it's possible it could have changed
@@ -1329,7 +1417,7 @@ const patch = (oldVNode, newVNode) => {
1329
1417
  if (oldChildren !== null && newChildren !== null) {
1330
1418
  // looks like there's child vnodes for both the old and new vnodes
1331
1419
  // so we need to call `updateChildren` to reconcile them
1332
- updateChildren(elm, oldChildren, newVNode, newChildren);
1420
+ updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
1333
1421
  }
1334
1422
  else if (newChildren !== null) {
1335
1423
  // no old child vnodes, but there are new child vnodes to add
@@ -1358,42 +1446,53 @@ const patch = (oldVNode, newVNode) => {
1358
1446
  elm.data = text;
1359
1447
  }
1360
1448
  };
1449
+ /**
1450
+ * Adjust the `.hidden` property as-needed on any nodes in a DOM subtree which
1451
+ * are slot fallbacks nodes.
1452
+ *
1453
+ * A slot fallback node should be visible by default. Then, it should be
1454
+ * conditionally hidden if:
1455
+ *
1456
+ * - it has a sibling with a `slot` property set to its slot name or if
1457
+ * - it is a default fallback slot node, in which case we hide if it has any
1458
+ * content
1459
+ *
1460
+ * @param elm the element of interest
1461
+ */
1361
1462
  const updateFallbackSlotVisibility = (elm) => {
1362
- // tslint:disable-next-line: prefer-const
1363
1463
  const childNodes = elm.childNodes;
1364
- let childNode;
1365
- let i;
1366
- let ilen;
1367
- let j;
1368
- let slotNameAttr;
1369
- let nodeType;
1370
- for (i = 0, ilen = childNodes.length; i < ilen; i++) {
1371
- childNode = childNodes[i];
1464
+ for (const childNode of childNodes) {
1372
1465
  if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1373
1466
  if (childNode['s-sr']) {
1374
1467
  // this is a slot fallback node
1375
1468
  // get the slot name for this slot reference node
1376
- slotNameAttr = childNode['s-sn'];
1469
+ const slotName = childNode['s-sn'];
1377
1470
  // by default always show a fallback slot node
1378
1471
  // then hide it if there are other slots in the light dom
1379
1472
  childNode.hidden = false;
1380
- for (j = 0; j < ilen; j++) {
1381
- nodeType = childNodes[j].nodeType;
1382
- if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
1383
- // this sibling node is from a different component OR is a named fallback slot node
1384
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
1385
- childNode.hidden = true;
1386
- break;
1473
+ // we need to check all of its sibling nodes in order to see if
1474
+ // `childNode` should be hidden
1475
+ for (const siblingNode of childNodes) {
1476
+ // Don't check the node against itself
1477
+ if (siblingNode !== childNode) {
1478
+ if (siblingNode['s-hn'] !== childNode['s-hn'] || slotName !== '') {
1479
+ // this sibling node is from a different component OR is a named
1480
+ // fallback slot node
1481
+ if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
1482
+ (slotName === siblingNode.getAttribute('slot') || slotName === siblingNode['s-sn'])) {
1483
+ childNode.hidden = true;
1484
+ break;
1485
+ }
1387
1486
  }
1388
- }
1389
- else {
1390
- // this is a default fallback slot node
1391
- // any element or text node (with content)
1392
- // should hide the default fallback slot node
1393
- if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1394
- (nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
1395
- childNode.hidden = true;
1396
- break;
1487
+ else {
1488
+ // this is a default fallback slot node
1489
+ // any element or text node (with content)
1490
+ // should hide the default fallback slot node
1491
+ if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ ||
1492
+ (siblingNode.nodeType === 3 /* NODE_TYPE.TextNode */ && siblingNode.textContent.trim() !== '')) {
1493
+ childNode.hidden = true;
1494
+ break;
1495
+ }
1397
1496
  }
1398
1497
  }
1399
1498
  }
@@ -1403,45 +1502,67 @@ const updateFallbackSlotVisibility = (elm) => {
1403
1502
  }
1404
1503
  }
1405
1504
  };
1505
+ /**
1506
+ * Component-global information about nodes which are either currently being
1507
+ * relocated or will be shortly.
1508
+ */
1406
1509
  const relocateNodes = [];
1407
- const relocateSlotContent = (elm) => {
1510
+ /**
1511
+ * Mark the contents of a slot for relocation via adding references to them to
1512
+ * the {@link relocateNodes} data structure. The actual work of relocating them
1513
+ * will then be handled in {@link renderVdom}.
1514
+ *
1515
+ * @param elm a render node whose child nodes need to be relocated
1516
+ */
1517
+ const markSlotContentForRelocation = (elm) => {
1408
1518
  // tslint:disable-next-line: prefer-const
1409
- let childNode;
1410
1519
  let node;
1411
1520
  let hostContentNodes;
1412
- let slotNameAttr;
1413
- let relocateNodeData;
1414
1521
  let j;
1415
- let i = 0;
1416
- const childNodes = elm.childNodes;
1417
- const ilen = childNodes.length;
1418
- for (; i < ilen; i++) {
1419
- childNode = childNodes[i];
1522
+ for (const childNode of elm.childNodes) {
1523
+ // we need to find child nodes which are slot references so we can then try
1524
+ // to match them up with nodes that need to be relocated
1420
1525
  if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
1421
- // first got the content reference comment node
1422
- // then we got it's parent, which is where all the host content is in now
1526
+ // first get the content reference comment node ('s-cr'), then we get
1527
+ // its parent, which is where all the host content is now
1423
1528
  hostContentNodes = node.parentNode.childNodes;
1424
- slotNameAttr = childNode['s-sn'];
1529
+ const slotName = childNode['s-sn'];
1530
+ // iterate through all the nodes under the location where the host was
1531
+ // originally rendered
1425
1532
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1426
1533
  node = hostContentNodes[j];
1427
- if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {
1428
- // let's do some relocating to its new home
1429
- // but never relocate a content reference node
1430
- // that is suppose to always represent the original content location
1431
- if (isNodeLocatedInSlot(node, slotNameAttr)) {
1534
+ // check that the node is not a content reference node or a node
1535
+ // reference and then check that the host name does not match that of
1536
+ // childNode.
1537
+ // In addition, check that the slot either has not already been relocated, or
1538
+ // that its current location's host is not childNode's host. This is essentially
1539
+ // a check so that we don't try to relocate (and then hide) a node that is already
1540
+ // where it should be.
1541
+ if (!node['s-cn'] &&
1542
+ !node['s-nr'] &&
1543
+ node['s-hn'] !== childNode['s-hn'] &&
1544
+ (!BUILD.experimentalSlotFixes )) {
1545
+ // if `node` is located in the slot that `childNode` refers to (via the
1546
+ // `'s-sn'` property) then we need to relocate it from it's current spot
1547
+ // (under the host element parent) to the right slot location
1548
+ if (isNodeLocatedInSlot(node, slotName)) {
1432
1549
  // it's possible we've already decided to relocate this node
1433
- relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1550
+ let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1434
1551
  // made some changes to slots
1435
1552
  // let's make sure we also double check
1436
1553
  // fallbacks are correctly hidden or shown
1437
1554
  checkSlotFallbackVisibility = true;
1438
- node['s-sn'] = node['s-sn'] || slotNameAttr;
1555
+ // ensure that the slot-name attr is correct
1556
+ node['s-sn'] = node['s-sn'] || slotName;
1439
1557
  if (relocateNodeData) {
1440
- // previously we never found a slot home for this node
1441
- // but turns out we did, so let's remember it now
1558
+ relocateNodeData.$nodeToRelocate$['s-sh'] = childNode['s-hn'];
1559
+ // we marked this node for relocation previously but didn't find
1560
+ // out the slot reference node to which it needs to be relocated
1561
+ // so write it down now!
1442
1562
  relocateNodeData.$slotRefNode$ = childNode;
1443
1563
  }
1444
1564
  else {
1565
+ node['s-sh'] = childNode['s-hn'];
1445
1566
  // add to our list of nodes to relocate
1446
1567
  relocateNodes.push({
1447
1568
  $slotRefNode$: childNode,
@@ -1460,8 +1581,10 @@ const relocateSlotContent = (elm) => {
1460
1581
  }
1461
1582
  }
1462
1583
  else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
1463
- // so far this element does not have a slot home, not setting slotRefNode on purpose
1464
- // if we never find a home for this element then we'll need to hide it
1584
+ // the node is not found within the slot (`childNode`) that we're
1585
+ // currently looking at, so we stick it into `relocateNodes` to
1586
+ // handle later. If we never find a home for this element then
1587
+ // we'll need to hide it
1465
1588
  relocateNodes.push({
1466
1589
  $nodeToRelocate$: node,
1467
1590
  });
@@ -1469,30 +1592,41 @@ const relocateSlotContent = (elm) => {
1469
1592
  }
1470
1593
  }
1471
1594
  }
1595
+ // if we're dealing with any type of element (capable of itself being a
1596
+ // slot reference or containing one) then we recur
1472
1597
  if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1473
- relocateSlotContent(childNode);
1598
+ markSlotContentForRelocation(childNode);
1474
1599
  }
1475
1600
  }
1476
1601
  };
1477
- const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
1602
+ /**
1603
+ * Check whether a node is located in a given named slot.
1604
+ *
1605
+ * @param nodeToRelocate the node of interest
1606
+ * @param slotName the slot name to check
1607
+ * @returns whether the node is located in the slot or not
1608
+ */
1609
+ const isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1478
1610
  if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1479
- if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
1611
+ if (nodeToRelocate.getAttribute('slot') === null && slotName === '') {
1612
+ // if the node doesn't have a slot attribute, and the slot we're checking
1613
+ // is not a named slot, then we assume the node should be within the slot
1480
1614
  return true;
1481
1615
  }
1482
- if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {
1616
+ if (nodeToRelocate.getAttribute('slot') === slotName) {
1483
1617
  return true;
1484
1618
  }
1485
1619
  return false;
1486
1620
  }
1487
- if (nodeToRelocate['s-sn'] === slotNameAttr) {
1621
+ if (nodeToRelocate['s-sn'] === slotName) {
1488
1622
  return true;
1489
1623
  }
1490
- return slotNameAttr === '';
1624
+ return slotName === '';
1491
1625
  };
1492
1626
  /**
1493
- * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
1494
- * calling them with `null`. This signals that the DOM element corresponding to
1495
- * the VDom node has been removed from the DOM.
1627
+ * 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
1628
+ * them with `null`. This signals that the DOM element corresponding to the VDom
1629
+ * node has been removed from the DOM.
1496
1630
  *
1497
1631
  * @param vNode a virtual DOM node
1498
1632
  */
@@ -1516,6 +1650,7 @@ const nullifyVNodeRefs = (vNode) => {
1516
1650
  * @param isInitialLoad whether or not this is the first call after page load
1517
1651
  */
1518
1652
  const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1653
+ var _a, _b, _c, _d;
1519
1654
  const hostElm = hostRef.$hostElement$;
1520
1655
  const cmpMeta = hostRef.$cmpMeta$;
1521
1656
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -1558,56 +1693,61 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1558
1693
  {
1559
1694
  scopeId = hostElm['s-sc'];
1560
1695
  }
1696
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1561
1697
  {
1562
1698
  contentRef = hostElm['s-cr'];
1563
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
1564
1699
  // always reset
1565
1700
  checkSlotFallbackVisibility = false;
1566
1701
  }
1567
1702
  // synchronous patch
1568
- patch(oldVNode, rootVnode);
1703
+ patch(oldVNode, rootVnode, isInitialLoad);
1569
1704
  {
1570
1705
  // while we're moving nodes around existing nodes, temporarily disable
1571
1706
  // the disconnectCallback from working
1572
1707
  plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
1573
1708
  if (checkSlotRelocate) {
1574
- relocateSlotContent(rootVnode.$elm$);
1575
- let relocateData;
1576
- let nodeToRelocate;
1577
- let orgLocationNode;
1578
- let parentNodeRef;
1579
- let insertBeforeNode;
1580
- let refNode;
1581
- let i = 0;
1582
- for (; i < relocateNodes.length; i++) {
1583
- relocateData = relocateNodes[i];
1584
- nodeToRelocate = relocateData.$nodeToRelocate$;
1709
+ markSlotContentForRelocation(rootVnode.$elm$);
1710
+ for (const relocateData of relocateNodes) {
1711
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
1585
1712
  if (!nodeToRelocate['s-ol']) {
1586
1713
  // add a reference node marking this node's original location
1587
1714
  // keep a reference to this node for later lookups
1588
- orgLocationNode =
1589
- doc.createTextNode('');
1715
+ const orgLocationNode = doc.createTextNode('');
1590
1716
  orgLocationNode['s-nr'] = nodeToRelocate;
1591
1717
  nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
1592
1718
  }
1593
1719
  }
1594
- for (i = 0; i < relocateNodes.length; i++) {
1595
- relocateData = relocateNodes[i];
1596
- nodeToRelocate = relocateData.$nodeToRelocate$;
1597
- if (relocateData.$slotRefNode$) {
1598
- // by default we're just going to insert it directly
1599
- // after the slot reference node
1600
- parentNodeRef = relocateData.$slotRefNode$.parentNode;
1601
- insertBeforeNode = relocateData.$slotRefNode$.nextSibling;
1602
- orgLocationNode = nodeToRelocate['s-ol'];
1603
- while ((orgLocationNode = orgLocationNode.previousSibling)) {
1604
- refNode = orgLocationNode['s-nr'];
1605
- if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1606
- refNode = refNode.nextSibling;
1607
- if (!refNode || !refNode['s-nr']) {
1608
- insertBeforeNode = refNode;
1609
- break;
1720
+ for (const relocateData of relocateNodes) {
1721
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
1722
+ const slotRefNode = relocateData.$slotRefNode$;
1723
+ if (slotRefNode) {
1724
+ const parentNodeRef = slotRefNode.parentNode;
1725
+ // When determining where to insert content, the most simple case would be
1726
+ // to relocate the node immediately following the slot reference node. We do this
1727
+ // by getting a reference to the node immediately following the slot reference node
1728
+ // since we will use `insertBefore` to manipulate the DOM.
1729
+ //
1730
+ // If there is no node immediately following the slot reference node, then we will just
1731
+ // end up appending the node as the last child of the parent.
1732
+ let insertBeforeNode = slotRefNode.nextSibling;
1733
+ // If the node we're currently planning on inserting the new node before is an element,
1734
+ // we need to do some additional checks to make sure we're inserting the node in the correct order.
1735
+ // The use case here would be that we have multiple nodes being relocated to the same slot. So, we want
1736
+ // to make sure they get inserted into their new home in the same order they were declared in their original location.
1737
+ //
1738
+ // TODO(STENCIL-914): Remove `experimentalSlotFixes` check
1739
+ {
1740
+ let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
1741
+ while (orgLocationNode) {
1742
+ let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
1743
+ if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
1744
+ refNode = refNode.nextSibling;
1745
+ if (!refNode || !refNode['s-nr']) {
1746
+ insertBeforeNode = refNode;
1747
+ break;
1748
+ }
1610
1749
  }
1750
+ orgLocationNode = orgLocationNode.previousSibling;
1611
1751
  }
1612
1752
  }
1613
1753
  if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
@@ -1620,14 +1760,30 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1620
1760
  // probably a component in the index.html that doesn't have its hostname set
1621
1761
  nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
1622
1762
  }
1623
- // add it back to the dom but in its new home
1763
+ // Add it back to the dom but in its new home
1764
+ // If we get to this point and `insertBeforeNode` is `null`, that means
1765
+ // we're just going to append the node as the last child of the parent. Passing
1766
+ // `null` as the second arg here will trigger that behavior.
1624
1767
  parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
1768
+ // Reset the `hidden` value back to what it was defined as originally
1769
+ // This solves a problem where a `slot` is dynamically rendered and `hidden` may have
1770
+ // been set on content originally, but now it has a slot to go to so it should have
1771
+ // the value it was defined as having in the DOM, not what we overrode it to.
1772
+ if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1773
+ nodeToRelocate.hidden = (_c = nodeToRelocate['s-ih']) !== null && _c !== void 0 ? _c : false;
1774
+ }
1625
1775
  }
1626
1776
  }
1777
+ nodeToRelocate && typeof slotRefNode['s-rf'] === 'function' && slotRefNode['s-rf'](nodeToRelocate);
1627
1778
  }
1628
1779
  else {
1629
1780
  // this node doesn't have a slot home to go to, so let's hide it
1630
1781
  if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
1782
+ // Store the initial value of `hidden` so we can reset it later when
1783
+ // moving nodes around.
1784
+ if (isInitialLoad) {
1785
+ nodeToRelocate['s-ih'] = (_d = nodeToRelocate.hidden) !== null && _d !== void 0 ? _d : false;
1786
+ }
1631
1787
  nodeToRelocate.hidden = true;
1632
1788
  }
1633
1789
  }
@@ -1642,6 +1798,8 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1642
1798
  // always reset
1643
1799
  relocateNodes.length = 0;
1644
1800
  }
1801
+ // Clear the content ref so we don't create a memory leak
1802
+ contentRef = undefined;
1645
1803
  };
1646
1804
  const attachToAncestor = (hostRef, ancestorComponent) => {
1647
1805
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
@@ -1790,6 +1948,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
1790
1948
  */
1791
1949
  const callRender = (hostRef, instance, elm, isInitialLoad) => {
1792
1950
  try {
1951
+ /**
1952
+ * minification optimization: `allRenderFn` is `true` if all components have a `render`
1953
+ * method, so we can call the method immediately. If not, check before calling it.
1954
+ */
1793
1955
  instance = instance.render() ;
1794
1956
  {
1795
1957
  hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
@@ -1866,6 +2028,16 @@ const appDidLoad = (who) => {
1866
2028
  }
1867
2029
  nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
1868
2030
  };
2031
+ /**
2032
+ * Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
2033
+ * e.g. custom element node. If a build figures out that e.g. no component
2034
+ * has a `componentDidLoad` method, the instance method gets removed from the
2035
+ * output bundle and this function returns `undefined`.
2036
+ * @param instance any object that may or may not contain methods
2037
+ * @param method method name
2038
+ * @param arg single arbitrary argument
2039
+ * @returns result of method call if it exists, otherwise `undefined`
2040
+ */
1869
2041
  const safeCall = (instance, method, arg) => {
1870
2042
  if (instance && instance[method]) {
1871
2043
  try {
@@ -1934,13 +2106,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
1934
2106
  */
1935
2107
  const proxyComponent = (Cstr, cmpMeta, flags) => {
1936
2108
  var _a;
2109
+ const prototype = Cstr.prototype;
1937
2110
  if (cmpMeta.$members$) {
1938
2111
  if (Cstr.watchers) {
1939
2112
  cmpMeta.$watchers$ = Cstr.watchers;
1940
2113
  }
1941
2114
  // It's better to have a const than two Object.entries()
1942
2115
  const members = Object.entries(cmpMeta.$members$);
1943
- const prototype = Cstr.prototype;
1944
2116
  members.map(([memberName, [memberFlags]]) => {
1945
2117
  if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
1946
2118
  ((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
@@ -1963,6 +2135,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
1963
2135
  const attrNameToPropName = new Map();
1964
2136
  prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
1965
2137
  plt.jmp(() => {
2138
+ var _a;
1966
2139
  const propName = attrNameToPropName.get(attrName);
1967
2140
  // In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
1968
2141
  // in the case where an attribute was set inline.
@@ -2018,11 +2191,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2018
2191
  // 1. The instance is ready
2019
2192
  // 2. The watchers are ready
2020
2193
  // 3. The value has changed
2021
- if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
2194
+ if (flags &&
2195
+ !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
2022
2196
  flags & 128 /* HOST_FLAGS.isWatchReady */ &&
2023
2197
  newValue !== oldValue) {
2024
2198
  const instance = hostRef.$lazyInstance$ ;
2025
- const entry = cmpMeta.$watchers$[attrName];
2199
+ const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
2026
2200
  entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
2027
2201
  if (instance[callbackName] != null) {
2028
2202
  instance[callbackName].call(instance, newValue, oldValue, attrName);
@@ -2044,10 +2218,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2044
2218
  ...members
2045
2219
  .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
2046
2220
  .map(([propName, m]) => {
2221
+ var _a;
2047
2222
  const attrName = m[1] || propName;
2048
2223
  attrNameToPropName.set(attrName, propName);
2049
2224
  if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
2050
- cmpMeta.$attrsToReflect$.push([propName, attrName]);
2225
+ (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
2051
2226
  }
2052
2227
  return attrName;
2053
2228
  }),
@@ -2056,12 +2231,24 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
2056
2231
  }
2057
2232
  return Cstr;
2058
2233
  };
2059
- const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
2234
+ /**
2235
+ * Initialize a Stencil component given a reference to its host element, its
2236
+ * runtime bookkeeping data structure, runtime metadata about the component,
2237
+ * and (optionally) an HMR version ID.
2238
+ *
2239
+ * @param elm a host element
2240
+ * @param hostRef the element's runtime bookkeeping object
2241
+ * @param cmpMeta runtime metadata for the Stencil component
2242
+ * @param hmrVersionId an (optional) HMR version ID
2243
+ */
2244
+ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2245
+ let Cstr;
2060
2246
  // initializeComponent
2061
2247
  if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
2062
2248
  // Let the runtime know that the component has been initialized
2063
2249
  hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
2064
- {
2250
+ const bundleId = cmpMeta.$lazyBundleId$;
2251
+ if (bundleId) {
2065
2252
  // lazy loaded components
2066
2253
  // request the component's implementation to be
2067
2254
  // wired up with the host element
@@ -2107,6 +2294,14 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
2107
2294
  }
2108
2295
  endNewInstance();
2109
2296
  }
2297
+ else {
2298
+ // sync constructor component
2299
+ Cstr = elm.constructor;
2300
+ // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
2301
+ // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
2302
+ // Stencil has completed instantiating the component.
2303
+ customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));
2304
+ }
2110
2305
  if (Cstr.style) {
2111
2306
  // this component has styles but we haven't registered them yet
2112
2307
  let style = Cstr.style;
@@ -2243,7 +2438,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2243
2438
  const customElements = win.customElements;
2244
2439
  const head = doc.head;
2245
2440
  const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
2246
- const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
2441
+ const dataStyles = /*@__PURE__*/ doc.createElement('style');
2247
2442
  const deferredConnectedCallbacks = [];
2248
2443
  const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2249
2444
  let appLoadFallback;
@@ -2261,6 +2456,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2261
2456
  registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
2262
2457
  }
2263
2458
  }
2459
+ let hasSlotRelocation = false;
2264
2460
  lazyBundles.map((lazyBundle) => {
2265
2461
  lazyBundle[1].map((compactMeta) => {
2266
2462
  var _a;
@@ -2270,6 +2466,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2270
2466
  $members$: compactMeta[2],
2271
2467
  $listeners$: compactMeta[3],
2272
2468
  };
2469
+ // Check if we are using slots outside the shadow DOM in this component.
2470
+ // We'll use this information later to add styles for `slot-fb` elements
2471
+ if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
2472
+ hasSlotRelocation = true;
2473
+ }
2273
2474
  {
2274
2475
  cmpMeta.$members$ = compactMeta[2];
2275
2476
  }
@@ -2326,15 +2527,29 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2326
2527
  }
2327
2528
  });
2328
2529
  });
2329
- {
2330
- visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
2331
- visibilityStyle.setAttribute('data-styles', '');
2332
- // Apply CSP nonce to the style tag if it exists
2333
- const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
2334
- if (nonce != null) {
2335
- visibilityStyle.setAttribute('nonce', nonce);
2530
+ // Only bother generating CSS if we have components
2531
+ // TODO(STENCIL-1118): Add test cases for CSS content based on conditionals
2532
+ if (cmpTags.length > 0) {
2533
+ // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
2534
+ if (hasSlotRelocation) {
2535
+ dataStyles.textContent += SLOT_FB_CSS;
2536
+ }
2537
+ // Add hydration styles
2538
+ {
2539
+ dataStyles.textContent += cmpTags + HYDRATED_CSS;
2540
+ }
2541
+ // If we have styles, add them to the DOM
2542
+ if (dataStyles.innerHTML.length) {
2543
+ dataStyles.setAttribute('data-styles', '');
2544
+ // Apply CSP nonce to the style tag if it exists
2545
+ const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
2546
+ if (nonce != null) {
2547
+ dataStyles.setAttribute('nonce', nonce);
2548
+ }
2549
+ // Insert the styles into the document head
2550
+ // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
2551
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
2336
2552
  }
2337
- head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
2338
2553
  }
2339
2554
  // Process deferred connectedCallbacks now all components have been registered
2340
2555
  isBootstrapping = false;
@@ -2356,22 +2571,60 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
2356
2571
  * @returns void
2357
2572
  */
2358
2573
  const setNonce = (nonce) => (plt.$nonce$ = nonce);
2359
- const hostRefs = /*@__PURE__*/ new WeakMap();
2574
+ /**
2575
+ * A WeakMap mapping runtime component references to their corresponding host reference
2576
+ * instances.
2577
+ *
2578
+ * **Note**: If we're in an HMR context we need to store a reference to this
2579
+ * value on `window` in order to maintain the mapping of {@link d.RuntimeRef}
2580
+ * to {@link d.HostRef} across HMR updates.
2581
+ *
2582
+ * This is necessary because when HMR updates for a component are processed by
2583
+ * the browser-side dev server client the JS bundle for that component is
2584
+ * re-fetched. Since the module containing {@link hostRefs} is included in
2585
+ * that bundle, if we do not store a reference to it the new iteration of the
2586
+ * component will not have access to the previous hostRef map, leading to a
2587
+ * bug where the new version of the component cannot properly initialize.
2588
+ */
2589
+ const hostRefs = new WeakMap();
2590
+ /**
2591
+ * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
2592
+ *
2593
+ * @param ref the runtime ref of interest
2594
+ * @returns the Host reference (if found) or undefined
2595
+ */
2360
2596
  const getHostRef = (ref) => hostRefs.get(ref);
2597
+ /**
2598
+ * Register a lazy instance with the {@link hostRefs} object so it's
2599
+ * corresponding {@link d.HostRef} can be retrieved later.
2600
+ *
2601
+ * @param lazyInstance the lazy instance of interest
2602
+ * @param hostRef that instances `HostRef` object
2603
+ * @returns a reference to the host ref WeakMap
2604
+ */
2361
2605
  const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
2362
- const registerHost = (elm, cmpMeta) => {
2606
+ /**
2607
+ * Register a host element for a Stencil component, setting up various metadata
2608
+ * and callbacks based on {@link BUILD} flags as well as the component's runtime
2609
+ * metadata.
2610
+ *
2611
+ * @param hostElement the host element to register
2612
+ * @param cmpMeta runtime metadata for that component
2613
+ * @returns a reference to the host ref WeakMap
2614
+ */
2615
+ const registerHost = (hostElement, cmpMeta) => {
2363
2616
  const hostRef = {
2364
2617
  $flags$: 0,
2365
- $hostElement$: elm,
2618
+ $hostElement$: hostElement,
2366
2619
  $cmpMeta$: cmpMeta,
2367
2620
  $instanceValues$: new Map(),
2368
2621
  };
2369
2622
  {
2370
2623
  hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
2371
- elm['s-p'] = [];
2372
- elm['s-rc'] = [];
2624
+ hostElement['s-p'] = [];
2625
+ hostElement['s-rc'] = [];
2373
2626
  }
2374
- return hostRefs.set(elm, hostRef);
2627
+ return hostRefs.set(hostElement, hostRef);
2375
2628
  };
2376
2629
  const isMemberInElement = (elm, memberName) => memberName in elm;
2377
2630
  const consoleError = (e, el) => (0, console.error)(e, el);
@@ -2462,7 +2715,7 @@ const flush = () => {
2462
2715
  }
2463
2716
  }
2464
2717
  };
2465
- const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
2718
+ const nextTick = (cb) => promiseResolve().then(cb);
2466
2719
  const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
2467
2720
 
2468
2721
  exports.Host = Host;
@@ -2474,4 +2727,4 @@ exports.promiseResolve = promiseResolve;
2474
2727
  exports.registerInstance = registerInstance;
2475
2728
  exports.setNonce = setNonce;
2476
2729
 
2477
- //# sourceMappingURL=index-efd561e9.js.map
2730
+ //# sourceMappingURL=index-e2ae280a.js.map