@peculiar/certificates-viewer 4.0.1 → 4.0.2

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 (141) hide show
  1. package/components/actions.js +21 -0
  2. package/components/actions.js.map +1 -0
  3. package/components/arrow_top.js +1 -1
  4. package/components/button-menu.js +2 -14
  5. package/components/button-menu.js.map +1 -1
  6. package/components/cross.js +47 -0
  7. package/components/cross.js.map +1 -0
  8. package/components/download.js +31 -1
  9. package/components/download.js.map +1 -1
  10. package/components/index.js +5 -1
  11. package/components/index.js.map +1 -1
  12. package/components/issuer_name.js +2 -2
  13. package/components/miscellaneous.js +2 -29
  14. package/components/miscellaneous.js.map +1 -1
  15. package/components/peculiar-certificates-viewer.js +4 -42
  16. package/components/peculiar-certificates-viewer.js.map +1 -1
  17. package/components/peculiar-text-hider.js +1 -1
  18. package/dist/cjs/actions-19013d4a.js +23 -0
  19. package/dist/cjs/actions-19013d4a.js.map +1 -0
  20. package/dist/cjs/cross-9872c473.js +51 -0
  21. package/dist/cjs/cross-9872c473.js.map +1 -0
  22. package/dist/cjs/index.cjs.js +17 -0
  23. package/dist/cjs/index.cjs.js.map +1 -1
  24. package/dist/cjs/link-6aea0be4.js +25 -0
  25. package/dist/cjs/link-6aea0be4.js.map +1 -0
  26. package/dist/cjs/{miscellaneous-806a04a5.js → miscellaneous-e43aaae5.js} +8 -21
  27. package/dist/cjs/miscellaneous-e43aaae5.js.map +1 -0
  28. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +2 -1
  29. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -1
  30. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +2 -14
  31. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -1
  32. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +2 -1
  33. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  34. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +6 -44
  35. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  36. package/dist/collection/index.js +4 -0
  37. package/dist/collection/index.js.map +1 -1
  38. package/dist/esm/actions-8d745b2a.js +21 -0
  39. package/dist/esm/actions-8d745b2a.js.map +1 -0
  40. package/dist/esm/{arrow_top-efd3a56d.js → arrow_top-fc298828.js} +2 -2
  41. package/dist/esm/{arrow_top-efd3a56d.js.map → arrow_top-fc298828.js.map} +1 -1
  42. package/dist/esm/cross-9ec9a759.js +47 -0
  43. package/dist/esm/cross-9ec9a759.js.map +1 -0
  44. package/dist/esm/index.js +7 -0
  45. package/dist/esm/index.js.map +1 -1
  46. package/dist/esm/link-ad24c3be.js +23 -0
  47. package/dist/esm/link-ad24c3be.js.map +1 -0
  48. package/dist/esm/{miscellaneous-1d4e8b41.js → miscellaneous-7793a310.js} +2 -15
  49. package/dist/esm/miscellaneous-7793a310.js.map +1 -0
  50. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +2 -1
  51. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
  52. package/dist/esm/peculiar-button-menu_3.entry.js +2 -14
  53. package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -1
  54. package/dist/esm/peculiar-certificate-viewer.entry.js +2 -1
  55. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  56. package/dist/esm/peculiar-certificates-viewer.entry.js +2 -40
  57. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  58. package/dist/esm/peculiar-text-hider.entry.js +1 -1
  59. package/dist/esm-es5/actions-8d745b2a.js +12 -0
  60. package/dist/esm-es5/actions-8d745b2a.js.map +1 -0
  61. package/dist/esm-es5/{arrow_top-efd3a56d.js → arrow_top-fc298828.js} +2 -2
  62. package/dist/esm-es5/cross-9ec9a759.js +26 -0
  63. package/dist/esm-es5/cross-9ec9a759.js.map +1 -0
  64. package/dist/esm-es5/index.js +1 -1
  65. package/dist/esm-es5/link-ad24c3be.js +12 -0
  66. package/dist/esm-es5/link-ad24c3be.js.map +1 -0
  67. package/dist/esm-es5/{miscellaneous-1d4e8b41.js → miscellaneous-7793a310.js} +2 -9
  68. package/dist/esm-es5/miscellaneous-7793a310.js.map +1 -0
  69. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +1 -1
  70. package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -8
  71. package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -1
  72. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  73. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  74. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +2 -23
  75. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  76. package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
  77. package/dist/peculiar/index.esm.js +1 -1
  78. package/dist/peculiar/{p-7ed7cd97.system.entry.js → p-0b475f2a.system.entry.js} +2 -2
  79. package/dist/peculiar/{p-709994c1.js → p-0fc2e2b4.js} +2 -2
  80. package/dist/peculiar/p-1844b807.system.entry.js +5 -0
  81. package/dist/peculiar/{p-26981468.system.entry.js.map → p-1844b807.system.entry.js.map} +1 -1
  82. package/dist/peculiar/p-1ceb0fe3.js +12 -0
  83. package/dist/peculiar/p-1ceb0fe3.js.map +1 -0
  84. package/dist/peculiar/p-1de0381c.system.js +5 -0
  85. package/dist/peculiar/p-33196289.entry.js +5 -0
  86. package/dist/peculiar/{p-90459cec.entry.js.map → p-33196289.entry.js.map} +1 -1
  87. package/dist/peculiar/p-370cee20.js +26 -0
  88. package/dist/peculiar/p-370cee20.js.map +1 -0
  89. package/dist/peculiar/p-441109db.system.entry.js +13 -0
  90. package/dist/peculiar/p-441109db.system.entry.js.map +1 -0
  91. package/dist/peculiar/{p-8748391f.system.entry.js → p-5151cb6f.system.entry.js} +2 -2
  92. package/dist/peculiar/p-53784f15.system.entry.js +5 -0
  93. package/dist/peculiar/p-53784f15.system.entry.js.map +1 -0
  94. package/dist/peculiar/p-5ab007e9.entry.js +5 -0
  95. package/dist/peculiar/p-5ab007e9.entry.js.map +1 -0
  96. package/dist/peculiar/{p-f3d85a5f.entry.js → p-673336cf.entry.js} +3 -3
  97. package/dist/peculiar/p-6cb88fd6.system.js +13 -0
  98. package/dist/peculiar/p-6cb88fd6.system.js.map +1 -0
  99. package/dist/peculiar/p-7f9fef87.entry.js +5 -0
  100. package/dist/peculiar/{p-fd4b9a50.entry.js.map → p-7f9fef87.entry.js.map} +1 -1
  101. package/dist/peculiar/p-80832207.system.js +1 -1
  102. package/dist/peculiar/p-94a453d7.js +12 -0
  103. package/dist/peculiar/p-94a453d7.js.map +1 -0
  104. package/dist/peculiar/{p-97688065.js → p-a6e2e335.js} +27 -34
  105. package/dist/peculiar/p-a6e2e335.js.map +1 -0
  106. package/dist/peculiar/p-b313be9e.system.js +13 -0
  107. package/dist/peculiar/p-b313be9e.system.js.map +1 -0
  108. package/dist/peculiar/p-bcc86979.entry.js +12 -0
  109. package/dist/peculiar/p-bcc86979.entry.js.map +1 -0
  110. package/dist/peculiar/{p-0bdcdbf7.system.js → p-c362dc5e.system.js} +26 -33
  111. package/dist/peculiar/p-c362dc5e.system.js.map +1 -0
  112. package/dist/peculiar/{p-daf23673.system.js → p-c99507d4.system.js} +3 -3
  113. package/dist/peculiar/p-ddae2f8e.system.js +27 -0
  114. package/dist/peculiar/p-ddae2f8e.system.js.map +1 -0
  115. package/dist/peculiar/peculiar.esm.js +1 -1
  116. package/dist/types/index.d.ts +4 -0
  117. package/package.json +2 -2
  118. package/dist/cjs/miscellaneous-806a04a5.js.map +0 -1
  119. package/dist/esm/miscellaneous-1d4e8b41.js.map +0 -1
  120. package/dist/esm-es5/miscellaneous-1d4e8b41.js.map +0 -1
  121. package/dist/peculiar/p-0bdcdbf7.system.js.map +0 -1
  122. package/dist/peculiar/p-23555789.system.entry.js +0 -34
  123. package/dist/peculiar/p-23555789.system.entry.js.map +0 -1
  124. package/dist/peculiar/p-26981468.system.entry.js +0 -5
  125. package/dist/peculiar/p-5823e6e8.entry.js +0 -12
  126. package/dist/peculiar/p-5823e6e8.entry.js.map +0 -1
  127. package/dist/peculiar/p-596836a7.entry.js +0 -33
  128. package/dist/peculiar/p-596836a7.entry.js.map +0 -1
  129. package/dist/peculiar/p-90459cec.entry.js +0 -5
  130. package/dist/peculiar/p-97688065.js.map +0 -1
  131. package/dist/peculiar/p-bd485115.system.entry.js +0 -13
  132. package/dist/peculiar/p-bd485115.system.entry.js.map +0 -1
  133. package/dist/peculiar/p-e1960173.system.js +0 -5
  134. package/dist/peculiar/p-fd4b9a50.entry.js +0 -5
  135. /package/dist/esm-es5/{arrow_top-efd3a56d.js.map → arrow_top-fc298828.js.map} +0 -0
  136. /package/dist/peculiar/{p-7ed7cd97.system.entry.js.map → p-0b475f2a.system.entry.js.map} +0 -0
  137. /package/dist/peculiar/{p-709994c1.js.map → p-0fc2e2b4.js.map} +0 -0
  138. /package/dist/peculiar/{p-e1960173.system.js.map → p-1de0381c.system.js.map} +0 -0
  139. /package/dist/peculiar/{p-8748391f.system.entry.js.map → p-5151cb6f.system.entry.js.map} +0 -0
  140. /package/dist/peculiar/{p-f3d85a5f.entry.js.map → p-673336cf.entry.js.map} +0 -0
  141. /package/dist/peculiar/{p-daf23673.system.js.map → p-c99507d4.system.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["certificateViewerCss","CertificateViewer","this","getAuthKeyIdParentLink","value","_a","_this","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","class_1","prototype","handleMediaQueryChange","event","mobileScreenView","matches","componentWillLoad","decodeCertificate","certificate","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","isDecodeInProcess","X509Certificate","certificateDecoded","parseExtensions","getThumbprint","_b","sent","certificateDecodeError","error_1","console","error","watchCertificateAndDecode","newValue","oldValue","serialNumber","getIssuerDnLink","issuerDnLink","renderErrorState","h","class","Typography","renderEmptyState","render","Host","String","BasicInformation","Object","assign","SubjectName","name","subject","IssuerName","issuer","PublicKey","publicKey","Signature","signature","Thumbprints","thumbprints","Extensions","extensions","getLEILink","getDNSNameLink","getIPAddressLink","download","Miscellaneous"],"sources":["src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-certificate-viewer&encapsulation=shadow","src/components/certificate-viewer/certificate-viewer.tsx"],"sourcesContent":["@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\n\nimport {\n X509Certificate,\n} from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n IssuerName,\n PublicKey,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CertificateProp = string | X509Certificate;\n\n@Component({\n tag: 'peculiar-certificate-viewer',\n styleUrl: 'certificate-viewer.scss',\n shadow: true,\n})\nexport class CertificateViewer {\n private certificateDecoded: X509Certificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: CertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView: boolean = false;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: CertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Certificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Certificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: CertificateProp, oldValue: CertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof X509Certificate && oldValue instanceof X509Certificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate.\n </Typography>\n </div>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"mappings":";;;+gBAAA,IAAMA,qBAAuB,mhS,ICyChBC,kBAAiB,W,kDAsIpBC,KAAAC,uBAAyB,SAACC,G,MAAkB,OAAAC,EAAAC,EAAKC,uBAAmB,MAAAF,SAAA,SAAAA,EACxEG,QAAQ,gBAAiBJ,E,EAErBF,KAAAO,yBAA2B,SAACL,G,MAAkB,OAAAC,EAAAC,EAAKI,yBAAqB,MAAAL,SAAA,SAAAA,EAC5EG,QAAQ,gBAAiBJ,E,EAErBF,KAAAS,4BAA8B,SAACP,G,MAAkB,OAAAC,EAAAC,EAAKM,4BAAwB,MAAAP,SAAA,SAAAA,EAClFG,QAAQ,mBAAoBJ,E,EAExBF,KAAAW,4BAA8B,SAACT,G,MAAkB,OAAAC,EAAAC,EAAKQ,4BAAwB,MAAAT,SAAA,SAAAA,EAClFG,QAAQ,mBAAoBJ,E,qQA9E4B,qB,sBAEvB,M,uBAEC,I,CAE9BW,EAAAC,UAAAC,uBAAA,SAAuBC,GAC7BhB,KAAKiB,iBAAmBD,EAAME,O,EAGhCL,EAAAC,UAAAK,kBAAA,WACEnB,KAAKoB,kBAAkBpB,KAAKqB,aAEP,CACnBrB,KAAKsB,iBAAmBC,OAAOC,WAAWxB,KAAKyB,wBAC/CzB,KAAKsB,iBAAiBI,iBAAiB,SAAU1B,KAAKe,uBAAuBY,KAAK3B,OAClFA,KAAKiB,iBAAmBjB,KAAKsB,iBAAiBJ,O,GAIlDL,EAAAC,UAAAc,qBAAA,WACE5B,KAAKsB,iBAAiBO,oBAAoB,SAAU7B,KAAKe,uBAAuBY,KAAK3B,M,EAGzEa,EAAAC,UAAAM,kBAAN,SAAwBC,G,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UAGhCZ,EAACa,WAAU,CACTF,KAAM3D,KAAKgC,mBAAmB8B,OAC9BhB,aAAc9C,KAAK6C,oBAGrBG,EAACe,UAAS,CACRC,UAAWhE,KAAKgC,mBAAmBgC,YAGrChB,EAACiB,UAAS,CACRC,UAAWlE,KAAKgC,mBAAmBkC,YAGrClB,EAACmB,YAAW,CACVC,YAAapE,KAAKgC,mBAAmBoC,cAGvCpB,EAACqB,WAAU,CACTC,WAAYtE,KAAKgC,mBAAmBsC,WACpCC,WAAYA,WACZC,eAAgBA,eAChBC,iBAAkBA,iBAClBxE,uBAAwBD,KAAKC,uBAC7BM,yBAA0BP,KAAKO,yBAC/BE,4BAA6BT,KAAKS,4BAClCE,4BAA6BX,KAAKW,8BAGnCX,KAAK0E,UACJ1B,EAAC2B,cAAa,CACZtD,YAAarB,KAAKgC,sB,sJAhOF,G"}
1
+ {"version":3,"names":["certificateViewerCss","CertificateViewer","this","getAuthKeyIdParentLink","value","_a","_this","authKeyIdParentLink","replace","getAuthKeyIdSiblingsLink","authKeyIdSiblingsLink","getSubjectKeyIdChildrenLink","subjectKeyIdChildrenLink","getSubjectKeyIdSiblingsLink","subjectKeyIdSiblingsLink","class_1","prototype","handleMediaQueryChange","event","mobileScreenView","matches","componentWillLoad","decodeCertificate","certificate","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","isDecodeInProcess","X509Certificate","certificateDecoded","parseExtensions","getThumbprint","_b","sent","certificateDecodeError","error_1","console","error","watchCertificateAndDecode","newValue","oldValue","serialNumber","getIssuerDnLink","issuerDnLink","renderErrorState","h","class","Typography","renderEmptyState","render","Host","String","BasicInformation","Object","assign","SubjectName","name","subject","IssuerName","issuer","PublicKey","publicKey","Signature","signature","Thumbprints","thumbprints","Extensions","extensions","getLEILink","getDNSNameLink","getIPAddressLink","download","Miscellaneous"],"sources":["src/components/certificate-viewer/certificate-viewer.scss?tag=peculiar-certificate-viewer&encapsulation=shadow","src/components/certificate-viewer/certificate-viewer.tsx"],"sourcesContent":["@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n position: relative;\n min-width: 280px;\n min-height: 300px;\n word-wrap: break-word;\n word-break: break-word;\n}\n\nth, td {\n border: none;\n}\n\ntable {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n td {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n vertical-align: top;\n\n &:first-child {\n width: 220px;\n }\n\n &:last-child {\n width: calc(100% - 220px)\n }\n\n &.monospace {\n max-width: 0;\n }\n\n &.divider {\n padding: var(--pv-size-base-2) 0;\n\n span {\n height: 1px;\n display: block;\n background-color: var(--pv-color-gray-4);\n }\n }\n }\n\n .title td {\n padding-top: var(--pv-size-base-6);\n padding-bottom: var(--pv-size-base-2);\n }\n\n table {\n border-left: 1px solid var(--pv-color-gray-5);\n }\n}\n\n.status_wrapper {\n min-height: inherit;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tr, td {\n display: block;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n\n &.title {\n padding-top: var(--pv-size-base-6);\n\n td {\n padding: 0 var(--pv-size-base-4);\n }\n }\n }\n\n td {\n padding: 0 var(--pv-size-base-4);\n width: 100% !important;\n max-width: 100% !important;\n\n &.divider {\n padding: 0;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\n\nimport {\n X509Certificate,\n} from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n IssuerName,\n PublicKey,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type CertificateProp = string | X509Certificate;\n\n@Component({\n tag: 'peculiar-certificate-viewer',\n styleUrl: 'certificate-viewer.scss',\n shadow: true,\n})\nexport class CertificateViewer {\n private certificateDecoded: X509Certificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: CertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Issuer DN link.\n * **NOTE**: HTML component attribute must be `issuer-dn-link`.\n */\n @Prop({ reflect: true }) issuerDnLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView: boolean = false;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: CertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509Certificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509Certificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: CertificateProp, oldValue: CertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof X509Certificate && oldValue instanceof X509Certificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getIssuerDnLink() {\n return this.issuerDnLink;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate.\n </Typography>\n </div>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <IssuerName\n name={this.certificateDecoded.issuer}\n issuerDnLink={this.getIssuerDnLink()}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"],"mappings":";;;0iBAAA,IAAMA,qBAAuB,mhS,ICyChBC,kBAAiB,W,kDAsIpBC,KAAAC,uBAAyB,SAACC,G,MAAkB,OAAAC,EAAAC,EAAKC,uBAAmB,MAAAF,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iBAClBxE,uBAAwBD,KAAKC,uBAC7BM,yBAA0BP,KAAKO,yBAC/BE,4BAA6BT,KAAKS,4BAClCE,4BAA6BX,KAAKW,8BAGnCX,KAAK0E,UACJ1B,EAAC2B,cAAa,CACZtD,YAAarB,KAAKgC,sB,sJAhOF,G"}
@@ -1,33 +1,12 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,r,a){function o(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function n(e){try{c(a.next(e))}catch(e){i(e)}}function s(e){try{c(a["throw"](e))}catch(e){i(e)}}function c(e){e.done?r(e.value):o(e.value).then(n,s)}c((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return c([e,t])}}function c(s){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(a=1,o&&(i=s[0]&2?o["return"]:s[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;if(o=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;o=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];o=0}finally{a=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var a=0,o=t.length,i;a<o;a++){if(i||!(a in t)){if(!i)i=Array.prototype.slice.call(t,0,a);i[a]=t[a]}}return e.concat(i||Array.prototype.slice.call(t))};
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */import{h,r as registerInstance,c as createEvent,H as Host}from"./index-4079bbb5.js";import{X as X509Certificate}from"./x509_certificate-dfae6999.js";import{$ as l10n,a0 as dateShort,a1 as OIDs}from"./certification_request-5cadde9f.js";import"./download-57c5bf8f.js";import{T as Typography,B as Button}from"./button-35146bdd.js";import{D as DownloadIcon}from"./download-0cc3077a.js";import{A as ArrowTopIcon,a as ArrowBottomIcon}from"./arrow_top-efd3a56d.js";
4
+ */import{h,r as registerInstance,c as createEvent,H as Host}from"./index-4079bbb5.js";import{X as X509Certificate}from"./x509_certificate-dfae6999.js";import{$ as l10n,a0 as dateShort,a1 as OIDs}from"./certification_request-5cadde9f.js";import"./download-57c5bf8f.js";import{T as Typography,B as Button}from"./button-35146bdd.js";import{D as DetailsIcon,L as LinkIcon,C as CrossIcon}from"./cross-9ec9a759.js";import{D as DownloadIcon}from"./download-0cc3077a.js";import{a as ArrowTopIcon,A as ArrowBottomIcon}from"./arrow_top-fc298828.js";
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
8
8
  *
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
- */var CertificateSummary=function(e){var t=e.certificate,r=e.showIssuer;var a=function(e,t){return h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},e)),h("td",null,h(Typography,{variant:"b2",color:"black"},t)))};return h("table",null,h("tbody",null,a(l10n.getString("subjectName"),t.subjectToString()),r&&a(l10n.getString("issuerName"),t.issuerToString()),a(l10n.getString("serialNumber"),t.serialNumber),a(l10n.getString("version"),t.version),a(l10n.getString("validity"),t.validity),a(l10n.getString("issued"),dateShort(t.notBefore)),a(l10n.getString("expired"),dateShort(t.notAfter))))};
12
- /**
13
- * @license
14
- * Copyright (c) Peculiar Ventures, LLC.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var DetailsIcon=function(e){var t=e.color,r=t===void 0?"secondary":t;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"31",fill:"none"},h("path",{fill:"var(--pv-color-".concat(r,")"),d:"M6.71 19.79a1 1 0 0 0-.33-.21 1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1 1 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1 1 0 0 0 .21-1.09 1 1 0 0 0-.21-.33ZM10 11.5h14a1 1 0 0 0 0-2H10a1 1 0 0 0 0 2Zm-3.29 3.29a1 1 0 0 0-1.09-.21 1.15 1.15 0 0 0-.33.21 1 1 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1 1 0 0 0-.21-.33ZM24 14.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2ZM6.71 9.79a1 1 0 0 0-.33-.21 1 1 0 0 0-1.09.21 1.15 1.15 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a1 1 0 0 0 1.09-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1.15 1.15 0 0 0-.21-.33ZM24 19.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z"}))};
19
- /**
20
- * @license
21
- * Copyright (c) Peculiar Ventures, LLC.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var LinkIcon=function(e){var t=e.color,r=t===void 0?"secondary":t;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"31",fill:"none"},h("path",{fill:"var(--pv-color-".concat(r,")"),d:"M21 14.32a1 1 0 0 0-1 1v7.18a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1h7.18a1 1 0 0 0 0-2H8a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h11a3 3 0 0 0 3-3v-7.18a1 1 0 0 0-1-1Zm3.92-8.2a1 1 0 0 0-.54-.54A1 1 0 0 0 24 5.5h-6a1 1 0 1 0 0 2h3.59l-10.3 10.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219L23 8.91v3.59a1 1 0 0 0 2 0v-6a1.001 1.001 0 0 0-.08-.38Z"}))};
26
- /**
27
- * @license
28
- * Copyright (c) Peculiar Ventures, LLC.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE file in the root directory of this source tree.
32
- */var CrossIcon=function(e){var t=e.color,r=t===void 0?"gray-9":t;return h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none"},h("path",{fill:"var(--pv-color-".concat(r,")"),"fill-rule":"evenodd",d:"m16.37 15 5.442 5.44c.25.252.25.663 0 .914l-.459.457a.646.646 0 0 1-.913 0L15 16.371l-5.44 5.44a.648.648 0 0 1-.915 0l-.457-.457a.649.649 0 0 1 0-.913L13.63 15 8.188 9.56a.649.649 0 0 1 0-.914l.457-.457a.648.648 0 0 1 .915 0l5.44 5.44 5.44-5.44a.646.646 0 0 1 .913 0l.46.457c.25.25.25.662 0 .913L16.37 15Z","clip-rule":"evenodd"}))};var certificatesViewerCss="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative}.search_section{padding:var(--pv-size-base-4);border-bottom:1px solid var(--pv-color-gray-4)}.input_search{height:var(--pv-size-base-8);width:100%;outline:none;background-color:var(--pv-color-gray-1);padding:0 var(--pv-size-base-2);border:1px solid var(--pv-color-gray-7);border-radius:4px;-webkit-transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s}.input_search::-webkit-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-moz-placeholder{color:var(--pv-color-gray-9)}.input_search:-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::placeholder{color:var(--pv-color-gray-9)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table td,table th{border-bottom:1px solid var(--pv-color-gray-4);vertical-align:top;text-align:left}table td:first-child,table th:first-child{padding-right:0;width:var(--pv-size-base-10)}table td:last-child,table th:last-child{padding-left:0;width:var(--pv-size-base-10)}table th{padding:var(--pv-size-base-2) var(--pv-size-base-4)}table th.col_action{padding:0}table td{padding:var(--pv-size-base-4)}table tr.m_expanded{background:var(--pv-color-gray-1)}table tr.m_expanded>td{border-bottom:none}table tr.expanded_summary{background:var(--pv-color-gray-1)}table tr.expanded_summary table{table-layout:initial}table tr.expanded_summary table td{border-bottom:none;padding:var(--pv-size-base-2)}table tr.expanded_summary table td:first-child{width:200px}table tr.expanded_summary table td:last-child{width:auto}.button_table_cell{margin-top:-3px}.status_wrapper{text-align:center;height:var(--pv-size-base-16);vertical-align:middle}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.modal_backdrop{background:var(--pv-color-black);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0;opacity:0.5}.modal_container{background:var(--pv-color-white);width:100%;display:-ms-flexbox;display:flex;max-height:calc(100% - 60px);-ms-flex-direction:column;flex-direction:column;margin:var(--pv-size-base-6);position:relative;outline:none;-webkit-box-shadow:var(--pv-shadow-dark-hight);box-shadow:var(--pv-shadow-dark-hight);overflow:hidden;border:0px;padding:0px;max-width:640px;border-radius:4px}.modal_header{padding:var(--pv-size-base-3) var(--pv-size-base-4);display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:var(--pv-size-base-2);border-bottom:1px solid var(--pv-color-gray-5)}.modal_content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:auto}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tbody,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block;width:100% !important;padding:0;border:none}:host([data-mobile-screen-view=true]) thead{display:none}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table .expanded_summary{padding:0}:host([data-mobile-screen-view=true]) table .certificate_row{border-bottom:1px solid var(--pv-color-gray-5);padding:var(--pv-size-base-2) var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table .certificate_row_actions{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table .certificate_row_actions td{display:-ms-flexbox;display:flex;-ms-flex-pack:right;justify-content:right;gap:var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) .button_table_cell{margin-top:0}";var CertificatesViewer=function(){function e(e){var t=this;registerInstance(this,e);this.detailsOpen=createEvent(this,"detailsOpen",7);this.detailsClose=createEvent(this,"detailsClose",7);this.isHasRoots=false;this.handleClickDetails=function(e){t.certificateSelectedForDetails=e;t.detailsOpen.emit(e)};this.handleModalClose=function(){t.certificateSelectedForDetails=undefined;t.detailsClose.emit()};this.handleSearch=function(e){t.search=e.target.value.trim()};this.certificates=[];this.filterWithSearch=true;this.highlightWithSearch=true;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.search="";this.certificatesDecoded=[];this.expandedRow=undefined;this.certificateSelectedForDetails=undefined;this.isDecodeInProcess=true}e.prototype.handleMediaQueryChange=function(e){this.mobileScreenView=e.matches};e.prototype.componentWillLoad=function(){this.certificatesDecodeAndSet();{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};e.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};e.prototype.watchCertificates=function(e,t){if(JSON.stringify(e)!==JSON.stringify(t)){this.certificatesDecodeAndSet()}};e.prototype.certificatesDecodeAndSet=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,a,o,i,n;return __generator(this,(function(s){switch(s.label){case 0:e=false;if(!Array.isArray(this.certificates)){return[2]}t=[];r=0,a=this.certificates;s.label=1;case 1:if(!(r<a.length))return[3,6];o=a[r];s.label=2;case 2:s.trys.push([2,4,,5]);i=new X509Certificate(o.value);return[4,i.getThumbprint("SHA-1")];case 3:s.sent();t.push({body:i,tests:o.tests,name:o.name});if(!e&&i.isRoot){e=true}return[3,5];case 4:n=s.sent();console.error("Error certificate parse:",n);return[3,5];case 5:r++;return[3,1];case 6:this.isHasRoots=e;this.isDecodeInProcess=false;this.certificatesDecoded=t;return[2]}}))}))};e.prototype.handleClickDownloadAsPem=function(e){e.body.downloadAsPEM(e.name||e.body.commonName)};e.prototype.handleClickDownloadAsDer=function(e){e.body.downloadAsDER(e.name||e.body.commonName)};e.prototype.handleClickRow=function(e){var t=this.expandedRow===e;this.expandedRow=t?undefined:e};e.prototype.getMaxColSpanValue=function(){var e=5;if(!this.isHasRoots){e+=1}return e};e.prototype.renderCertificateButtonActions=function(e){var t=this;var r,a,o;var i=e.tests&&(e.tests.expired||e.tests.revoked||e.tests.valid);return h("peculiar-button-menu",{class:"button_table_cell",groups:__spreadArray([{title:l10n.getString("previewCertificate"),options:[{text:l10n.getString("viewDetails"),startIcon:h(DetailsIcon,null),onClick:function(){return t.handleClickDetails(e.body)}}]},{title:l10n.getString("downloadOptions"),options:[{text:l10n.getString("download.pem"),startIcon:h(DownloadIcon,null),onClick:function(){return t.handleClickDownloadAsPem(e)}},{text:l10n.getString("download.der"),startIcon:h(DownloadIcon,null),onClick:function(){return t.handleClickDownloadAsDer(e)}}]}],i?[{title:l10n.getString("testURLs"),options:__spreadArray(__spreadArray(__spreadArray([],((r=e.tests)===null||r===void 0?void 0:r.valid)?[{text:l10n.getString("valid"),href:e.tests.valid,startIcon:h(LinkIcon,null)}]:[],true),((a=e.tests)===null||a===void 0?void 0:a.revoked)?[{text:l10n.getString("revoked"),href:e.tests.revoked,startIcon:h(LinkIcon,null)}]:[],true),((o=e.tests)===null||o===void 0?void 0:o.expired)?[{text:l10n.getString("expired"),href:e.tests.expired,startIcon:h(LinkIcon,null)}]:[],true)}]:[],true)})};e.prototype.renderExpandedRow=function(e){var t=this.getMaxColSpanValue()-2;return h("tr",{class:"expanded_summary"},h("td",null),h("td",{colSpan:t},h(CertificateSummary,{certificate:e,showIssuer:!e.isRoot})),h("td",null))};e.prototype.renderCertificatesRows=function(){var e=this;var t=this.highlightWithSearch?this.search:"";var r=[];this.certificatesDecoded.forEach((function(a,o){var i=o===e.expandedRow;var n=OIDs[a.body.signature.algorithm]||a.body.signature.algorithm;if(e.filterWithSearch&&e.search){var s=[n,a.body.issuerCommonName,a.name,a.body.commonName,a.body.thumbprints["SHA-1"]].join(" ").toLowerCase();if(s.indexOf(e.search.toLowerCase())===-1){return}}if(e.mobileScreenView){r.push([h("tr",{class:{certificate_row:true,m_expanded:i},key:a.body.thumbprints["SHA-1"]},h("td",null,h("table",null,h("tbody",null,!e.isHasRoots&&h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("issuer"))),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},a.body.issuerCommonName)))),h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("name"))),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},a.name||a.body.commonName)))),h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("publicKey"))),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},n)))),h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("fingerprint"),"  (SHA-1)")),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},a.body.thumbprints["SHA-1"])))),i&&e.renderExpandedRow(a.body),h("tr",{class:"certificate_row_actions"},h("td",null,e.renderCertificateButtonActions(a),h(Button,{onClick:e.handleClickRow.bind(e,o),startIcon:i?h(ArrowTopIcon,null):h(ArrowBottomIcon,null)})))))))]);return}r.push([h("tr",{class:{m_expanded:i},key:a.body.thumbprints["SHA-1"]},h("td",null,h(Button,{class:"button_table_cell",onClick:e.handleClickRow.bind(e,o),startIcon:i?h(ArrowTopIcon,null):h(ArrowBottomIcon,null)})),!e.isHasRoots&&h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},a.body.issuerCommonName))),h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},a.name||a.body.commonName))),h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},n))),h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},a.body.thumbprints["SHA-1"]))),h("td",null,e.renderCertificateButtonActions(a))),i&&e.renderExpandedRow(a.body)])}));return r};e.prototype.renderCertificateDetailsModal=function(){if(!this.certificateSelectedForDetails){return null}return h("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},h("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),h("div",{class:"modal_container",role:"dialog",part:"presentation_container"},h("header",{class:"modal_header"},h(Typography,{variant:"h4"},l10n.getString("certificateDetails")),h(Button,{onClick:this.handleModalClose,startIcon:h(CrossIcon,null)})),h("div",{class:"modal_content"},h("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails,mobileMediaQueryString:this.mobileMediaQueryString}))))};e.prototype.renderSearch=function(){if(!this.filterWithSearch&&!this.highlightWithSearch){return null}return h("div",{class:"search_section"},h("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search t-b3 c-black",disabled:!this.certificatesDecoded.length,placeholder:"Search"}))};e.prototype.renderEmptyState=function(){var e=this.getMaxColSpanValue();return h("tr",null,h("td",{class:"status_wrapper",colSpan:e},h(Typography,{variant:"b1"},"There are no certificates available.")))};e.prototype.renderEmptySearchState=function(){var e=this.getMaxColSpanValue();return h("tr",null,h("td",{class:"status_wrapper",colSpan:e},h(Typography,{variant:"b1"},"No results found for “",this.search,"“")))};e.prototype.renderLoadingState=function(){return h("div",{class:"loading_container"},h("peculiar-circular-progress",null))};e.prototype.renderTableBody=function(){if(this.isDecodeInProcess){return null}if(!this.certificatesDecoded.length){return this.renderEmptyState()}var e=this.renderCertificatesRows();if(this.search&&!e.length){return this.renderEmptySearchState()}return e};e.prototype.render=function(){return h(Host,{"data-mobile-screen-view":String(this.mobileScreenView)},this.renderSearch(),h("table",null,!this.mobileScreenView&&h("thead",null,h("tr",null,h("th",null),!this.isHasRoots&&h("th",{class:"col_issuer"},h(Typography,{variant:"s2"},l10n.getString("issuer"))),h("th",{class:"col_name"},h(Typography,{variant:"s2"},l10n.getString("name"))),h("th",{class:"col_public_key"},h(Typography,{variant:"s2"},l10n.getString("publicKey"))),h("th",{class:"col_fingerprint"},h(Typography,{variant:"s2"},l10n.getString("fingerprint"),"  (SHA-1)")),h("th",null))),h("tbody",null,this.renderTableBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())};Object.defineProperty(e,"watchers",{get:function(){return{certificates:["watchCertificates"]}},enumerable:false,configurable:true});return e}();CertificatesViewer.style=certificatesViewerCss;export{CertificatesViewer as peculiar_certificates_viewer};
11
+ */var CertificateSummary=function(e){var t=e.certificate,r=e.showIssuer;var a=function(e,t){return h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},e)),h("td",null,h(Typography,{variant:"b2",color:"black"},t)))};return h("table",null,h("tbody",null,a(l10n.getString("subjectName"),t.subjectToString()),r&&a(l10n.getString("issuerName"),t.issuerToString()),a(l10n.getString("serialNumber"),t.serialNumber),a(l10n.getString("version"),t.version),a(l10n.getString("validity"),t.validity),a(l10n.getString("issued"),dateShort(t.notBefore)),a(l10n.getString("expired"),dateShort(t.notAfter))))};var certificatesViewerCss="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative}.search_section{padding:var(--pv-size-base-4);border-bottom:1px solid var(--pv-color-gray-4)}.input_search{height:var(--pv-size-base-8);width:100%;outline:none;background-color:var(--pv-color-gray-1);padding:0 var(--pv-size-base-2);border:1px solid var(--pv-color-gray-7);border-radius:4px;-webkit-transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s}.input_search::-webkit-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-moz-placeholder{color:var(--pv-color-gray-9)}.input_search:-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::placeholder{color:var(--pv-color-gray-9)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table td,table th{border-bottom:1px solid var(--pv-color-gray-4);vertical-align:top;text-align:left}table td:first-child,table th:first-child{padding-right:0;width:var(--pv-size-base-10)}table td:last-child,table th:last-child{padding-left:0;width:var(--pv-size-base-10)}table th{padding:var(--pv-size-base-2) var(--pv-size-base-4)}table th.col_action{padding:0}table td{padding:var(--pv-size-base-4)}table tr.m_expanded{background:var(--pv-color-gray-1)}table tr.m_expanded>td{border-bottom:none}table tr.expanded_summary{background:var(--pv-color-gray-1)}table tr.expanded_summary table{table-layout:initial}table tr.expanded_summary table td{border-bottom:none;padding:var(--pv-size-base-2)}table tr.expanded_summary table td:first-child{width:200px}table tr.expanded_summary table td:last-child{width:auto}.button_table_cell{margin-top:-3px}.status_wrapper{text-align:center;height:var(--pv-size-base-16);vertical-align:middle}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.modal_backdrop{background:var(--pv-color-black);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0;opacity:0.5}.modal_container{background:var(--pv-color-white);width:100%;display:-ms-flexbox;display:flex;max-height:calc(100% - 60px);-ms-flex-direction:column;flex-direction:column;margin:var(--pv-size-base-6);position:relative;outline:none;-webkit-box-shadow:var(--pv-shadow-dark-hight);box-shadow:var(--pv-shadow-dark-hight);overflow:hidden;border:0px;padding:0px;max-width:640px;border-radius:4px}.modal_header{padding:var(--pv-size-base-3) var(--pv-size-base-4);display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:var(--pv-size-base-2);border-bottom:1px solid var(--pv-color-gray-5)}.modal_content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:auto}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tbody,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block;width:100% !important;padding:0;border:none}:host([data-mobile-screen-view=true]) thead{display:none}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table .expanded_summary{padding:0}:host([data-mobile-screen-view=true]) table .certificate_row{border-bottom:1px solid var(--pv-color-gray-5);padding:var(--pv-size-base-2) var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table .certificate_row_actions{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table .certificate_row_actions td{display:-ms-flexbox;display:flex;-ms-flex-pack:right;justify-content:right;gap:var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) .button_table_cell{margin-top:0}";var CertificatesViewer=function(){function e(e){var t=this;registerInstance(this,e);this.detailsOpen=createEvent(this,"detailsOpen",7);this.detailsClose=createEvent(this,"detailsClose",7);this.isHasRoots=false;this.handleClickDetails=function(e){t.certificateSelectedForDetails=e;t.detailsOpen.emit(e)};this.handleModalClose=function(){t.certificateSelectedForDetails=undefined;t.detailsClose.emit()};this.handleSearch=function(e){t.search=e.target.value.trim()};this.certificates=[];this.filterWithSearch=true;this.highlightWithSearch=true;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.search="";this.certificatesDecoded=[];this.expandedRow=undefined;this.certificateSelectedForDetails=undefined;this.isDecodeInProcess=true}e.prototype.handleMediaQueryChange=function(e){this.mobileScreenView=e.matches};e.prototype.componentWillLoad=function(){this.certificatesDecodeAndSet();{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};e.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};e.prototype.watchCertificates=function(e,t){if(JSON.stringify(e)!==JSON.stringify(t)){this.certificatesDecodeAndSet()}};e.prototype.certificatesDecodeAndSet=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,a,o,i,n;return __generator(this,(function(s){switch(s.label){case 0:e=false;if(!Array.isArray(this.certificates)){return[2]}t=[];r=0,a=this.certificates;s.label=1;case 1:if(!(r<a.length))return[3,6];o=a[r];s.label=2;case 2:s.trys.push([2,4,,5]);i=new X509Certificate(o.value);return[4,i.getThumbprint("SHA-1")];case 3:s.sent();t.push({body:i,tests:o.tests,name:o.name});if(!e&&i.isRoot){e=true}return[3,5];case 4:n=s.sent();console.error("Error certificate parse:",n);return[3,5];case 5:r++;return[3,1];case 6:this.isHasRoots=e;this.isDecodeInProcess=false;this.certificatesDecoded=t;return[2]}}))}))};e.prototype.handleClickDownloadAsPem=function(e){e.body.downloadAsPEM(e.name||e.body.commonName)};e.prototype.handleClickDownloadAsDer=function(e){e.body.downloadAsDER(e.name||e.body.commonName)};e.prototype.handleClickRow=function(e){var t=this.expandedRow===e;this.expandedRow=t?undefined:e};e.prototype.getMaxColSpanValue=function(){var e=5;if(!this.isHasRoots){e+=1}return e};e.prototype.renderCertificateButtonActions=function(e){var t=this;var r,a,o;var i=e.tests&&(e.tests.expired||e.tests.revoked||e.tests.valid);return h("peculiar-button-menu",{class:"button_table_cell",groups:__spreadArray([{title:l10n.getString("previewCertificate"),options:[{text:l10n.getString("viewDetails"),startIcon:h(DetailsIcon,null),onClick:function(){return t.handleClickDetails(e.body)}}]},{title:l10n.getString("downloadOptions"),options:[{text:l10n.getString("download.pem"),startIcon:h(DownloadIcon,null),onClick:function(){return t.handleClickDownloadAsPem(e)}},{text:l10n.getString("download.der"),startIcon:h(DownloadIcon,null),onClick:function(){return t.handleClickDownloadAsDer(e)}}]}],i?[{title:l10n.getString("testURLs"),options:__spreadArray(__spreadArray(__spreadArray([],((r=e.tests)===null||r===void 0?void 0:r.valid)?[{text:l10n.getString("valid"),href:e.tests.valid,startIcon:h(LinkIcon,null)}]:[],true),((a=e.tests)===null||a===void 0?void 0:a.revoked)?[{text:l10n.getString("revoked"),href:e.tests.revoked,startIcon:h(LinkIcon,null)}]:[],true),((o=e.tests)===null||o===void 0?void 0:o.expired)?[{text:l10n.getString("expired"),href:e.tests.expired,startIcon:h(LinkIcon,null)}]:[],true)}]:[],true)})};e.prototype.renderExpandedRow=function(e){var t=this.getMaxColSpanValue()-2;return h("tr",{class:"expanded_summary"},h("td",null),h("td",{colSpan:t},h(CertificateSummary,{certificate:e,showIssuer:!e.isRoot})),h("td",null))};e.prototype.renderCertificatesRows=function(){var e=this;var t=this.highlightWithSearch?this.search:"";var r=[];this.certificatesDecoded.forEach((function(a,o){var i=o===e.expandedRow;var n=OIDs[a.body.signature.algorithm]||a.body.signature.algorithm;if(e.filterWithSearch&&e.search){var s=[n,a.body.issuerCommonName,a.name,a.body.commonName,a.body.thumbprints["SHA-1"]].join(" ").toLowerCase();if(s.indexOf(e.search.toLowerCase())===-1){return}}if(e.mobileScreenView){r.push([h("tr",{class:{certificate_row:true,m_expanded:i},key:a.body.thumbprints["SHA-1"]},h("td",null,h("table",null,h("tbody",null,!e.isHasRoots&&h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("issuer"))),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},a.body.issuerCommonName)))),h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("name"))),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},a.name||a.body.commonName)))),h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("publicKey"))),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},n)))),h("tr",null,h("td",null,h(Typography,{variant:"b2",color:"gray-9"},l10n.getString("fingerprint"),"  (SHA-1)")),h("td",null,h(Typography,{variant:"b2",color:"black"},h("peculiar-highlight-words",{search:t},a.body.thumbprints["SHA-1"])))),i&&e.renderExpandedRow(a.body),h("tr",{class:"certificate_row_actions"},h("td",null,e.renderCertificateButtonActions(a),h(Button,{onClick:e.handleClickRow.bind(e,o),startIcon:i?h(ArrowTopIcon,null):h(ArrowBottomIcon,null)})))))))]);return}r.push([h("tr",{class:{m_expanded:i},key:a.body.thumbprints["SHA-1"]},h("td",null,h(Button,{class:"button_table_cell",onClick:e.handleClickRow.bind(e,o),startIcon:i?h(ArrowTopIcon,null):h(ArrowBottomIcon,null)})),!e.isHasRoots&&h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},a.body.issuerCommonName))),h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},a.name||a.body.commonName))),h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},n))),h("td",null,h(Typography,null,h("peculiar-highlight-words",{search:t},a.body.thumbprints["SHA-1"]))),h("td",null,e.renderCertificateButtonActions(a))),i&&e.renderExpandedRow(a.body)])}));return r};e.prototype.renderCertificateDetailsModal=function(){if(!this.certificateSelectedForDetails){return null}return h("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},h("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),h("div",{class:"modal_container",role:"dialog",part:"presentation_container"},h("header",{class:"modal_header"},h(Typography,{variant:"h4"},l10n.getString("certificateDetails")),h(Button,{onClick:this.handleModalClose,startIcon:h(CrossIcon,null)})),h("div",{class:"modal_content"},h("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails,mobileMediaQueryString:this.mobileMediaQueryString}))))};e.prototype.renderSearch=function(){if(!this.filterWithSearch&&!this.highlightWithSearch){return null}return h("div",{class:"search_section"},h("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search t-b3 c-black",disabled:!this.certificatesDecoded.length,placeholder:"Search"}))};e.prototype.renderEmptyState=function(){var e=this.getMaxColSpanValue();return h("tr",null,h("td",{class:"status_wrapper",colSpan:e},h(Typography,{variant:"b1"},"There are no certificates available.")))};e.prototype.renderEmptySearchState=function(){var e=this.getMaxColSpanValue();return h("tr",null,h("td",{class:"status_wrapper",colSpan:e},h(Typography,{variant:"b1"},"No results found for “",this.search,"“")))};e.prototype.renderLoadingState=function(){return h("div",{class:"loading_container"},h("peculiar-circular-progress",null))};e.prototype.renderTableBody=function(){if(this.isDecodeInProcess){return null}if(!this.certificatesDecoded.length){return this.renderEmptyState()}var e=this.renderCertificatesRows();if(this.search&&!e.length){return this.renderEmptySearchState()}return e};e.prototype.render=function(){return h(Host,{"data-mobile-screen-view":String(this.mobileScreenView)},this.renderSearch(),h("table",null,!this.mobileScreenView&&h("thead",null,h("tr",null,h("th",null),!this.isHasRoots&&h("th",{class:"col_issuer"},h(Typography,{variant:"s2"},l10n.getString("issuer"))),h("th",{class:"col_name"},h(Typography,{variant:"s2"},l10n.getString("name"))),h("th",{class:"col_public_key"},h(Typography,{variant:"s2"},l10n.getString("publicKey"))),h("th",{class:"col_fingerprint"},h(Typography,{variant:"s2"},l10n.getString("fingerprint"),"  (SHA-1)")),h("th",null))),h("tbody",null,this.renderTableBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())};Object.defineProperty(e,"watchers",{get:function(){return{certificates:["watchCertificates"]}},enumerable:false,configurable:true});return e}();CertificatesViewer.style=certificatesViewerCss;export{CertificatesViewer as peculiar_certificates_viewer};
33
12
  //# sourceMappingURL=peculiar-certificates-viewer.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CertificateSummary","props","certificate","showIssuer","renderRow","name","value","h","Typography","variant","color","l10n","getString","subjectToString","issuerToString","serialNumber","version","validity","dateShort","notBefore","notAfter","DetailsIcon","_d","xmlns","width","height","fill","concat","d","LinkIcon","CrossIcon","certificatesViewerCss","CertificatesViewer","this","isHasRoots","handleClickDetails","_this","certificateSelectedForDetails","detailsOpen","emit","handleModalClose","undefined","detailsClose","handleSearch","event","search","target","trim","class_1","prototype","handleMediaQueryChange","mobileScreenView","matches","componentWillLoad","certificatesDecodeAndSet","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","watchCertificates","newValue","oldValue","JSON","stringify","hasRoots","Array","isArray","certificates","data","_i","length","decoded","X509Certificate","getThumbprint","_e","sent","push","body","tests","isRoot","console","error","error_1","isDecodeInProcess","certificatesDecoded","handleClickDownloadAsPem","downloadAsPEM","commonName","handleClickDownloadAsDer","downloadAsDER","handleClickRow","index","isExpandedRowClicked","expandedRow","getMaxColSpanValue","colSpan","renderCertificateButtonActions","isHasTestURLs","expired","revoked","valid","class","groups","__spreadArray","title","options","text","startIcon","onClick","DownloadIcon","_a","href","_b","_c","renderExpandedRow","renderCertificatesRows","searchHighlight","highlightWithSearch","content","forEach","isExpandedRow","publicKeyValue","OIDs","signature","algorithm","filterWithSearch","certificateStringForSearch","issuerCommonName","thumbprints","join","toLowerCase","indexOf","certificate_row","m_expanded","key","Button","ArrowTopIcon","ArrowBottomIcon","renderCertificateDetailsModal","role","part","renderSearch","onInput","type","disabled","placeholder","renderEmptyState","renderEmptySearchState","renderLoadingState","renderTableBody","certificatesRows","render","Host","String"],"sources":["src/components/certificate-summary/certificate-summary.tsx","src/components/icons/details.tsx","src/components/icons/link.tsx","src/components/icons/cross.tsx","src/components/certificates-viewer/certificates-viewer.scss?tag=peculiar-certificates-viewer&encapsulation=shadow","src/components/certificates-viewer/certificates-viewer.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { X509Certificate } from '../../crypto';\nimport { dateShort, l10n } from '../../utils';\nimport { Typography } from '../typography';\n\ninterface CertificateSummaryProps {\n certificate: X509Certificate;\n showIssuer?: boolean;\n}\n\nexport const CertificateSummary: FunctionalComponent<CertificateSummaryProps> = (props) => {\n const {\n certificate,\n showIssuer,\n } = props;\n\n const renderRow = (name: string | string[], value: string | number) => (\n <tr>\n <td>\n <Typography\n variant=\"b2\"\n color=\"gray-9\"\n >\n {name}\n </Typography>\n </td>\n <td>\n <Typography\n variant=\"b2\"\n color=\"black\"\n >\n {value}\n </Typography>\n </td>\n </tr>\n );\n\n return (\n <table>\n <tbody>\n {renderRow(\n l10n.getString('subjectName'),\n certificate.subjectToString(),\n )}\n {showIssuer && renderRow(\n l10n.getString('issuerName'),\n certificate.issuerToString(),\n )}\n\n {renderRow(\n l10n.getString('serialNumber'),\n certificate.serialNumber,\n )}\n {renderRow(\n l10n.getString('version'),\n certificate.version,\n )}\n {renderRow(\n l10n.getString('validity'),\n certificate.validity,\n )}\n {renderRow(\n l10n.getString('issued'),\n dateShort(certificate.notBefore),\n )}\n {renderRow(\n l10n.getString('expired'),\n dateShort(certificate.notAfter),\n )}\n </tbody>\n </table>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const DetailsIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'secondary' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"31\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n d=\"M6.71 19.79a1 1 0 0 0-.33-.21 1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1 1 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1 1 0 0 0 .21-1.09 1 1 0 0 0-.21-.33ZM10 11.5h14a1 1 0 0 0 0-2H10a1 1 0 0 0 0 2Zm-3.29 3.29a1 1 0 0 0-1.09-.21 1.15 1.15 0 0 0-.33.21 1 1 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1 1 0 0 0-.21-.33ZM24 14.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2ZM6.71 9.79a1 1 0 0 0-.33-.21 1 1 0 0 0-1.09.21 1.15 1.15 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a1 1 0 0 0 1.09-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1.15 1.15 0 0 0-.21-.33ZM24 19.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z\"\n />\n </svg>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const LinkIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'secondary' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"31\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n d=\"M21 14.32a1 1 0 0 0-1 1v7.18a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1h7.18a1 1 0 0 0 0-2H8a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h11a3 3 0 0 0 3-3v-7.18a1 1 0 0 0-1-1Zm3.92-8.2a1 1 0 0 0-.54-.54A1 1 0 0 0 24 5.5h-6a1 1 0 1 0 0 2h3.59l-10.3 10.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219L23 8.91v3.59a1 1 0 0 0 2 0v-6a1.001 1.001 0 0 0-.08-.38Z\"\n />\n </svg>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const CrossIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'gray-9' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n fill-rule=\"evenodd\"\n d=\"m16.37 15 5.442 5.44c.25.252.25.663 0 .914l-.459.457a.646.646 0 0 1-.913 0L15 16.371l-5.44 5.44a.648.648 0 0 1-.915 0l-.457-.457a.649.649 0 0 1 0-.913L13.63 15 8.188 9.56a.649.649 0 0 1 0-.914l.457-.457a.648.648 0 0 1 .915 0l5.44 5.44 5.44-5.44a.646.646 0 0 1 .913 0l.46.457c.25.25.25.662 0 .913L16.37 15Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n );\n};\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n word-wrap: break-word;\n min-width: 280px;\n overflow: auto;\n position: relative;\n}\n\n.search_section {\n padding: var(--pv-size-base-4);\n border-bottom: 1px solid var(--pv-color-gray-4);\n}\n\n.input_search {\n height: var(--pv-size-base-8);\n width: 100%;\n outline: none;\n background-color: var(--pv-color-gray-1);\n padding: 0 var(--pv-size-base-2);\n border: 1px solid var(--pv-color-gray-7);\n border-radius: 4px;\n transition: background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;\n &::placeholder {\n color: var(--pv-color-gray-9);\n }\n}\n\ntable {\n width: 100%;\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n\n td, th {\n border-bottom: 1px solid var(--pv-color-gray-4);\n vertical-align: top;\n text-align: left;\n\n &:first-child {\n padding-right: 0;\n width: var(--pv-size-base-10);\n }\n &:last-child {\n padding-left: 0;\n width: var(--pv-size-base-10);\n }\n }\n\n th {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n\n &.col_action {\n padding: 0;\n }\n }\n\n td {\n padding: var(--pv-size-base-4);\n }\n\n tr {\n &.m_expanded {\n background: var(--pv-color-gray-1);\n\n > td {\n border-bottom: none;\n }\n }\n\n &.expanded_summary {\n background: var(--pv-color-gray-1);\n\n table {\n table-layout: initial;\n\n td {\n border-bottom: none;\n padding: var(--pv-size-base-2);\n\n &:first-child {\n width: 200px;\n }\n\n &:last-child {\n width: auto;\n }\n }\n }\n }\n }\n}\n\n.button_table_cell {\n margin-top: -3px;\n}\n\n.status_wrapper {\n text-align: center;\n height: var(--pv-size-base-16);\n vertical-align: middle;\n}\n\n.modal_wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n animation: fadeIn 200ms;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.modal_backdrop {\n background: var(--pv-color-black);\n z-index: -1;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.5;\n}\n\n.modal_container {\n background: var(--pv-color-white);\n width: 100%;\n display: flex;\n max-height: calc(100% - 60px);\n flex-direction: column;\n margin: var(--pv-size-base-6);\n position: relative;\n outline: none;\n box-shadow: var(--pv-shadow-dark-hight);\n overflow: hidden;\n border: 0px;\n padding: 0px;\n max-width: 640px;\n border-radius: 4px;\n}\n\n.modal_header {\n padding: var(--pv-size-base-3) var(--pv-size-base-4);\n display: flex;\n flex: 0 0 auto;\n -webkit-box-pack: justify;\n justify-content: space-between;\n gap: var(--pv-size-base-2);\n border-bottom: 1px solid var(--pv-color-gray-5);\n}\n\n.modal_content {\n flex: 1 1 auto;\n overflow: auto;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tbody, tr, td {\n display: block;\n width: 100% !important;\n padding: 0;\n border: none;\n }\n\n thead {\n display: none;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n }\n\n .expanded_summary {\n padding: 0;\n }\n\n .certificate_row {\n border-bottom: 1px solid var(--pv-color-gray-5);\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n }\n\n .certificate_row_actions {\n padding-top: var(--pv-size-base-6);\n\n td {\n display: flex;\n justify-content: right;\n gap: var(--pv-size-base-4);\n }\n }\n }\n\n .button_table_cell {\n margin-top: 0;\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Event,\n EventEmitter,\n Build,\n} from '@stencil/core';\n\nimport { X509Certificate } from '../../crypto';\nimport { OIDs } from '../../constants/oids';\nimport { l10n } from '../../utils';\nimport { Typography } from '../typography';\nimport { CertificateSummary } from '../certificate-summary';\nimport { Button } from '../button';\nimport {\n DownloadIcon,\n LinkIcon,\n DetailsIcon,\n ArrowBottomIcon,\n ArrowTopIcon,\n CrossIcon,\n} from '../icons';\n\nexport interface ICertificate {\n value: string;\n name?: string;\n tests?: {\n valid?: string;\n revoked?: string;\n expired?: string;\n };\n}\n\ninterface ICertificateDecoded {\n body: X509Certificate;\n tests?: ICertificate['tests'];\n name?: string;\n}\n\n@Component({\n tag: 'peculiar-certificates-viewer',\n styleUrl: 'certificates-viewer.scss',\n shadow: true,\n})\nexport class CertificatesViewer {\n private isHasRoots: boolean = false;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * List of certificates values for decode and show in the list.\n * <br />\n * **NOTE**: If you do not provide a `name` value when\n * invocing the component it will take the first Subject CN value.\n * <br />\n * **NOTE**: If you do not provide a `tests` this column will be ommited from the rendered page.\n * <br />\n * **NOTE**: If the supplied certificates are self-signed the issuer column will be ommited.\n */\n @Prop() certificates: ICertificate[] = [];\n\n /**\n * Use filter in the list when search is changed.\n */\n @Prop() filterWithSearch: boolean = true;\n\n /**\n * Use highlight chapters in the list when search is changed.\n */\n @Prop() highlightWithSearch: boolean = true;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n /**\n * Emitted when the user open certificate details modal.\n */\n @Event() detailsOpen!: EventEmitter<X509Certificate>;\n\n /**\n * Emitted when the user close certificate details modal.\n */\n @Event() detailsClose!: EventEmitter<void>;\n\n @State() mobileScreenView: boolean = false;\n\n @State() search: string = '';\n\n @State() certificatesDecoded: ICertificateDecoded[] = [];\n\n @State() expandedRow?: number;\n\n @State() certificateSelectedForDetails?: X509Certificate;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.certificatesDecodeAndSet();\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n @Watch('certificates')\n watchCertificates(newValue: ICertificate[], oldValue: ICertificate[]) {\n /**\n * Prevent rerender after set the same `certificates` prop.\n */\n if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {\n this.certificatesDecodeAndSet();\n }\n }\n\n async certificatesDecodeAndSet() {\n let hasRoots = false;\n\n if (!Array.isArray(this.certificates)) {\n return;\n }\n\n const data: ICertificateDecoded[] = [];\n\n // eslint-disable-next-line no-restricted-syntax\n for (const certificate of this.certificates) {\n try {\n const decoded = new X509Certificate(certificate.value);\n\n await decoded.getThumbprint('SHA-1');\n\n data.push({\n body: decoded,\n tests: certificate.tests,\n name: certificate.name,\n });\n\n if (!hasRoots && decoded.isRoot) {\n hasRoots = true;\n }\n } catch (error) {\n console.error('Error certificate parse:', error);\n }\n }\n\n this.isHasRoots = hasRoots;\n this.isDecodeInProcess = false;\n this.certificatesDecoded = data;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsPem(certificate: ICertificateDecoded) {\n certificate.body.downloadAsPEM(certificate.name || certificate.body.commonName);\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsDer(certificate: ICertificateDecoded) {\n certificate.body.downloadAsDER(certificate.name || certificate.body.commonName);\n }\n\n private handleClickDetails = (certificate: X509Certificate) => {\n this.certificateSelectedForDetails = certificate;\n this.detailsOpen.emit(certificate);\n };\n\n private handleModalClose = () => {\n this.certificateSelectedForDetails = undefined;\n\n this.detailsClose.emit();\n };\n\n private handleClickRow(index: number) {\n const isExpandedRowClicked = this.expandedRow === index;\n\n this.expandedRow = isExpandedRowClicked\n ? undefined\n : index;\n }\n\n private handleSearch = (event: any) => {\n this.search = event.target.value.trim();\n };\n\n private getMaxColSpanValue() {\n let colSpan = 5;\n\n if (!this.isHasRoots) {\n colSpan += 1;\n }\n\n return colSpan;\n }\n\n private renderCertificateButtonActions(certificate: ICertificateDecoded) {\n const isHasTestURLs = certificate.tests\n && (certificate.tests.expired || certificate.tests.revoked || certificate.tests.valid);\n\n return (\n <peculiar-button-menu\n class=\"button_table_cell\"\n groups={[\n {\n title: l10n.getString('previewCertificate'),\n options: [\n {\n text: l10n.getString('viewDetails'),\n startIcon: <DetailsIcon />,\n onClick: () => this.handleClickDetails(certificate.body),\n },\n ],\n },\n {\n title: l10n.getString('downloadOptions'),\n options: [\n {\n text: l10n.getString('download.pem'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsPem(certificate),\n },\n {\n text: l10n.getString('download.der'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsDer(certificate),\n },\n ],\n },\n ...(isHasTestURLs ? [{\n title: l10n.getString('testURLs'),\n options: [\n ...(certificate.tests?.valid ? [{\n text: l10n.getString('valid'),\n href: certificate.tests.valid,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.revoked ? [{\n text: l10n.getString('revoked'),\n href: certificate.tests.revoked,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.expired ? [{\n text: l10n.getString('expired'),\n href: certificate.tests.expired,\n startIcon: <LinkIcon />,\n }] : []),\n ],\n }] : []),\n ]}\n />\n );\n }\n\n private renderExpandedRow(certificate: X509Certificate) {\n const colSpan = this.getMaxColSpanValue() - 2;\n\n return (\n <tr class=\"expanded_summary\">\n <td />\n <td colSpan={colSpan}>\n <CertificateSummary\n certificate={certificate}\n showIssuer={!certificate.isRoot}\n />\n </td>\n <td />\n </tr>\n );\n }\n\n private renderCertificatesRows() {\n const searchHighlight = this.highlightWithSearch\n ? this.search\n : '';\n const content = [];\n\n this.certificatesDecoded.forEach((certificate, index) => {\n const isExpandedRow = index === this.expandedRow;\n const publicKeyValue = OIDs[certificate.body.signature.algorithm]\n || certificate.body.signature.algorithm;\n\n if (this.filterWithSearch && this.search) {\n const certificateStringForSearch = [\n publicKeyValue,\n certificate.body.issuerCommonName,\n certificate.name,\n certificate.body.commonName,\n certificate.body.thumbprints['SHA-1'],\n ]\n .join(' ')\n .toLowerCase();\n\n if (certificateStringForSearch.indexOf(this.search.toLowerCase()) === -1) {\n return;\n }\n }\n\n if (this.mobileScreenView) {\n content.push([\n <tr\n class={{\n certificate_row: true,\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <table>\n <tbody>\n {!this.isHasRoots && (\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('issuer')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n )}\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('name')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('publicKey')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('fingerprint')}\n &nbsp; (SHA-1)\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n {isExpandedRow && this.renderExpandedRow(certificate.body)}\n <tr class=\"certificate_row_actions\">\n <td>\n {this.renderCertificateButtonActions(certificate)}\n <Button\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>,\n ]);\n\n return;\n }\n\n content.push([\n <tr\n class={{\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <Button\n class=\"button_table_cell\"\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n {!this.isHasRoots && (\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n )}\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n {this.renderCertificateButtonActions(certificate)}\n </td>\n </tr>,\n isExpandedRow && this.renderExpandedRow(certificate.body),\n ]);\n });\n\n return content;\n }\n\n private renderCertificateDetailsModal() {\n if (!this.certificateSelectedForDetails) {\n return null;\n }\n\n return (\n <div\n class=\"modal_wrapper\"\n role=\"presentation\"\n aria-hidden=\"false\"\n part=\"presentation\"\n >\n <div\n class=\"modal_backdrop\"\n onClick={this.handleModalClose}\n aria-hidden=\"true\"\n />\n <div\n class=\"modal_container\"\n role=\"dialog\"\n part=\"presentation_container\"\n >\n <header class=\"modal_header\">\n <Typography\n variant=\"h4\"\n >\n {l10n.getString('certificateDetails')}\n </Typography>\n <Button\n onClick={this.handleModalClose}\n startIcon={<CrossIcon />}\n />\n </header>\n <div class=\"modal_content\">\n <peculiar-certificate-viewer\n certificate={this.certificateSelectedForDetails}\n mobileMediaQueryString={this.mobileMediaQueryString}\n />\n </div>\n </div>\n </div>\n );\n }\n\n private renderSearch() {\n if (!this.filterWithSearch && !this.highlightWithSearch) {\n return null;\n }\n\n return (\n <div class=\"search_section\">\n <input\n onInput={this.handleSearch}\n type=\"search\"\n value=\"\"\n class=\"input_search t-b3 c-black\"\n disabled={!this.certificatesDecoded.length}\n placeholder=\"Search\"\n />\n </div>\n );\n }\n\n private renderEmptyState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n There are no certificates available.\n </Typography>\n </td>\n </tr>\n );\n }\n\n private renderEmptySearchState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n No results found for &ldquo;\n {this.search}\n &ldquo;\n </Typography>\n </td>\n </tr>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderLoadingState() {\n return (\n <div class=\"loading_container\">\n <peculiar-circular-progress />\n </div>\n );\n }\n\n private renderTableBody() {\n if (this.isDecodeInProcess) {\n return null;\n }\n\n if (!this.certificatesDecoded.length) {\n return this.renderEmptyState();\n }\n\n const certificatesRows = this.renderCertificatesRows();\n\n if (this.search && !certificatesRows.length) {\n return this.renderEmptySearchState();\n }\n\n return certificatesRows;\n }\n\n render() {\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n {this.renderSearch()}\n <table>\n {!this.mobileScreenView && (\n <thead>\n <tr>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n {!this.isHasRoots && (\n <th class=\"col_issuer\">\n <Typography variant=\"s2\">\n {l10n.getString('issuer')}\n </Typography>\n </th>\n )}\n <th class=\"col_name\">\n <Typography variant=\"s2\">\n {l10n.getString('name')}\n </Typography>\n </th>\n <th class=\"col_public_key\">\n <Typography variant=\"s2\">\n {l10n.getString('publicKey')}\n </Typography>\n </th>\n <th class=\"col_fingerprint\">\n <Typography variant=\"s2\">\n {l10n.getString('fingerprint')}\n &nbsp; (SHA-1)\n </Typography>\n </th>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n </tr>\n </thead>\n )}\n <tbody>\n {this.renderTableBody()}\n </tbody>\n </table>\n\n {this.renderCertificateDetailsModal()}\n {this.isDecodeInProcess && this.renderLoadingState()}\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;GAkBO,IAAMA,mBAAmE,SAACC,GAE7E,IAAAC,EAEED,EAAKC,YADPC,EACEF,EAAKE,WAET,IAAMC,EAAY,SAACC,EAAyBC,GAAsB,OAChEC,EAAA,UACEA,EAAA,UACEA,EAACC,WAAU,CACTC,QAAQ,KACRC,MAAM,UAELL,IAGLE,EAAA,UACEA,EAACC,WAAU,CACTC,QAAQ,KACRC,MAAM,SAELJ,IAfyD,EAqBlE,OACEC,EAAA,aACEA,EAAA,aACGH,EACCO,KAAKC,UAAU,eACfV,EAAYW,mBAEbV,GAAcC,EACbO,KAAKC,UAAU,cACfV,EAAYY,kBAGbV,EACCO,KAAKC,UAAU,gBACfV,EAAYa,cAEbX,EACCO,KAAKC,UAAU,WACfV,EAAYc,SAEbZ,EACCO,KAAKC,UAAU,YACfV,EAAYe,UAEbb,EACCO,KAAKC,UAAU,UACfM,UAAUhB,EAAYiB,YAEvBf,EACCO,KAAKC,UAAU,WACfM,UAAUhB,EAAYkB,YAKhC;;;;;;;GCrEO,IAAMC,YAA0D,SAACpB,GAC9D,IAAAqB,EAAwBrB,EAAKS,MAA7BA,EAAKY,SAAA,EAAG,YAAWA,EAE3B,OAC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MACjBE,KAAKC,UAAU,eAGpBL,EAAA,MAAIkG,MAAM,mBACRlG,EAACC,WAAU,CAACC,QAAQ,MACjBE,KAAKC,UAAU,eAAc,cAKlCL,EAAA,aAINA,EAAA,aACG0B,KAAKwH,oBAITxH,KAAK6G,gCACL7G,KAAKsD,mBAAqBtD,KAAKuH,qB,+IA7kBT,G"}
1
+ {"version":3,"names":["CertificateSummary","props","certificate","showIssuer","renderRow","name","value","h","Typography","variant","color","l10n","getString","subjectToString","issuerToString","serialNumber","version","validity","dateShort","notBefore","notAfter","certificatesViewerCss","CertificatesViewer","this","isHasRoots","handleClickDetails","_this","certificateSelectedForDetails","detailsOpen","emit","handleModalClose","undefined","detailsClose","handleSearch","event","search","target","trim","class_1","prototype","handleMediaQueryChange","mobileScreenView","matches","componentWillLoad","certificatesDecodeAndSet","mobileMediaQuery","window","matchMedia","mobileMediaQueryString","addEventListener","bind","disconnectedCallback","removeEventListener","watchCertificates","newValue","oldValue","JSON","stringify","hasRoots","Array","isArray","certificates","data","_d","_i","length","decoded","X509Certificate","getThumbprint","_e","sent","push","body","tests","isRoot","console","error","error_1","isDecodeInProcess","certificatesDecoded","handleClickDownloadAsPem","downloadAsPEM","commonName","handleClickDownloadAsDer","downloadAsDER","handleClickRow","index","isExpandedRowClicked","expandedRow","getMaxColSpanValue","colSpan","renderCertificateButtonActions","isHasTestURLs","expired","revoked","valid","class","groups","__spreadArray","title","options","text","startIcon","DetailsIcon","onClick","DownloadIcon","_a","href","LinkIcon","_b","_c","renderExpandedRow","renderCertificatesRows","searchHighlight","highlightWithSearch","content","forEach","isExpandedRow","publicKeyValue","OIDs","signature","algorithm","filterWithSearch","certificateStringForSearch","issuerCommonName","thumbprints","join","toLowerCase","indexOf","certificate_row","m_expanded","key","Button","ArrowTopIcon","ArrowBottomIcon","renderCertificateDetailsModal","role","part","CrossIcon","renderSearch","onInput","type","disabled","placeholder","renderEmptyState","renderEmptySearchState","renderLoadingState","renderTableBody","certificatesRows","render","Host","String"],"sources":["src/components/certificate-summary/certificate-summary.tsx","src/components/certificates-viewer/certificates-viewer.scss?tag=peculiar-certificates-viewer&encapsulation=shadow","src/components/certificates-viewer/certificates-viewer.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { X509Certificate } from '../../crypto';\nimport { dateShort, l10n } from '../../utils';\nimport { Typography } from '../typography';\n\ninterface CertificateSummaryProps {\n certificate: X509Certificate;\n showIssuer?: boolean;\n}\n\nexport const CertificateSummary: FunctionalComponent<CertificateSummaryProps> = (props) => {\n const {\n certificate,\n showIssuer,\n } = props;\n\n const renderRow = (name: string | string[], value: string | number) => (\n <tr>\n <td>\n <Typography\n variant=\"b2\"\n color=\"gray-9\"\n >\n {name}\n </Typography>\n </td>\n <td>\n <Typography\n variant=\"b2\"\n color=\"black\"\n >\n {value}\n </Typography>\n </td>\n </tr>\n );\n\n return (\n <table>\n <tbody>\n {renderRow(\n l10n.getString('subjectName'),\n certificate.subjectToString(),\n )}\n {showIssuer && renderRow(\n l10n.getString('issuerName'),\n certificate.issuerToString(),\n )}\n\n {renderRow(\n l10n.getString('serialNumber'),\n certificate.serialNumber,\n )}\n {renderRow(\n l10n.getString('version'),\n certificate.version,\n )}\n {renderRow(\n l10n.getString('validity'),\n certificate.validity,\n )}\n {renderRow(\n l10n.getString('issued'),\n dateShort(certificate.notBefore),\n )}\n {renderRow(\n l10n.getString('expired'),\n dateShort(certificate.notAfter),\n )}\n </tbody>\n </table>\n );\n};\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n word-wrap: break-word;\n min-width: 280px;\n overflow: auto;\n position: relative;\n}\n\n.search_section {\n padding: var(--pv-size-base-4);\n border-bottom: 1px solid var(--pv-color-gray-4);\n}\n\n.input_search {\n height: var(--pv-size-base-8);\n width: 100%;\n outline: none;\n background-color: var(--pv-color-gray-1);\n padding: 0 var(--pv-size-base-2);\n border: 1px solid var(--pv-color-gray-7);\n border-radius: 4px;\n transition: background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;\n &::placeholder {\n color: var(--pv-color-gray-9);\n }\n}\n\ntable {\n width: 100%;\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n\n td, th {\n border-bottom: 1px solid var(--pv-color-gray-4);\n vertical-align: top;\n text-align: left;\n\n &:first-child {\n padding-right: 0;\n width: var(--pv-size-base-10);\n }\n &:last-child {\n padding-left: 0;\n width: var(--pv-size-base-10);\n }\n }\n\n th {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n\n &.col_action {\n padding: 0;\n }\n }\n\n td {\n padding: var(--pv-size-base-4);\n }\n\n tr {\n &.m_expanded {\n background: var(--pv-color-gray-1);\n\n > td {\n border-bottom: none;\n }\n }\n\n &.expanded_summary {\n background: var(--pv-color-gray-1);\n\n table {\n table-layout: initial;\n\n td {\n border-bottom: none;\n padding: var(--pv-size-base-2);\n\n &:first-child {\n width: 200px;\n }\n\n &:last-child {\n width: auto;\n }\n }\n }\n }\n }\n}\n\n.button_table_cell {\n margin-top: -3px;\n}\n\n.status_wrapper {\n text-align: center;\n height: var(--pv-size-base-16);\n vertical-align: middle;\n}\n\n.modal_wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n animation: fadeIn 200ms;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.modal_backdrop {\n background: var(--pv-color-black);\n z-index: -1;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.5;\n}\n\n.modal_container {\n background: var(--pv-color-white);\n width: 100%;\n display: flex;\n max-height: calc(100% - 60px);\n flex-direction: column;\n margin: var(--pv-size-base-6);\n position: relative;\n outline: none;\n box-shadow: var(--pv-shadow-dark-hight);\n overflow: hidden;\n border: 0px;\n padding: 0px;\n max-width: 640px;\n border-radius: 4px;\n}\n\n.modal_header {\n padding: var(--pv-size-base-3) var(--pv-size-base-4);\n display: flex;\n flex: 0 0 auto;\n -webkit-box-pack: justify;\n justify-content: space-between;\n gap: var(--pv-size-base-2);\n border-bottom: 1px solid var(--pv-color-gray-5);\n}\n\n.modal_content {\n flex: 1 1 auto;\n overflow: auto;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tbody, tr, td {\n display: block;\n width: 100% !important;\n padding: 0;\n border: none;\n }\n\n thead {\n display: none;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n }\n\n .expanded_summary {\n padding: 0;\n }\n\n .certificate_row {\n border-bottom: 1px solid var(--pv-color-gray-5);\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n }\n\n .certificate_row_actions {\n padding-top: var(--pv-size-base-6);\n\n td {\n display: flex;\n justify-content: right;\n gap: var(--pv-size-base-4);\n }\n }\n }\n\n .button_table_cell {\n margin-top: 0;\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Event,\n EventEmitter,\n Build,\n} from '@stencil/core';\n\nimport { X509Certificate } from '../../crypto';\nimport { OIDs } from '../../constants/oids';\nimport { l10n } from '../../utils';\nimport { Typography } from '../typography';\nimport { CertificateSummary } from '../certificate-summary';\nimport { Button } from '../button';\nimport {\n DownloadIcon,\n LinkIcon,\n DetailsIcon,\n ArrowBottomIcon,\n ArrowTopIcon,\n CrossIcon,\n} from '../icons';\n\nexport interface ICertificate {\n value: string;\n name?: string;\n tests?: {\n valid?: string;\n revoked?: string;\n expired?: string;\n };\n}\n\ninterface ICertificateDecoded {\n body: X509Certificate;\n tests?: ICertificate['tests'];\n name?: string;\n}\n\n@Component({\n tag: 'peculiar-certificates-viewer',\n styleUrl: 'certificates-viewer.scss',\n shadow: true,\n})\nexport class CertificatesViewer {\n private isHasRoots: boolean = false;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * List of certificates values for decode and show in the list.\n * <br />\n * **NOTE**: If you do not provide a `name` value when\n * invocing the component it will take the first Subject CN value.\n * <br />\n * **NOTE**: If you do not provide a `tests` this column will be ommited from the rendered page.\n * <br />\n * **NOTE**: If the supplied certificates are self-signed the issuer column will be ommited.\n */\n @Prop() certificates: ICertificate[] = [];\n\n /**\n * Use filter in the list when search is changed.\n */\n @Prop() filterWithSearch: boolean = true;\n\n /**\n * Use highlight chapters in the list when search is changed.\n */\n @Prop() highlightWithSearch: boolean = true;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n /**\n * Emitted when the user open certificate details modal.\n */\n @Event() detailsOpen!: EventEmitter<X509Certificate>;\n\n /**\n * Emitted when the user close certificate details modal.\n */\n @Event() detailsClose!: EventEmitter<void>;\n\n @State() mobileScreenView: boolean = false;\n\n @State() search: string = '';\n\n @State() certificatesDecoded: ICertificateDecoded[] = [];\n\n @State() expandedRow?: number;\n\n @State() certificateSelectedForDetails?: X509Certificate;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.certificatesDecodeAndSet();\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n @Watch('certificates')\n watchCertificates(newValue: ICertificate[], oldValue: ICertificate[]) {\n /**\n * Prevent rerender after set the same `certificates` prop.\n */\n if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {\n this.certificatesDecodeAndSet();\n }\n }\n\n async certificatesDecodeAndSet() {\n let hasRoots = false;\n\n if (!Array.isArray(this.certificates)) {\n return;\n }\n\n const data: ICertificateDecoded[] = [];\n\n // eslint-disable-next-line no-restricted-syntax\n for (const certificate of this.certificates) {\n try {\n const decoded = new X509Certificate(certificate.value);\n\n await decoded.getThumbprint('SHA-1');\n\n data.push({\n body: decoded,\n tests: certificate.tests,\n name: certificate.name,\n });\n\n if (!hasRoots && decoded.isRoot) {\n hasRoots = true;\n }\n } catch (error) {\n console.error('Error certificate parse:', error);\n }\n }\n\n this.isHasRoots = hasRoots;\n this.isDecodeInProcess = false;\n this.certificatesDecoded = data;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsPem(certificate: ICertificateDecoded) {\n certificate.body.downloadAsPEM(certificate.name || certificate.body.commonName);\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsDer(certificate: ICertificateDecoded) {\n certificate.body.downloadAsDER(certificate.name || certificate.body.commonName);\n }\n\n private handleClickDetails = (certificate: X509Certificate) => {\n this.certificateSelectedForDetails = certificate;\n this.detailsOpen.emit(certificate);\n };\n\n private handleModalClose = () => {\n this.certificateSelectedForDetails = undefined;\n\n this.detailsClose.emit();\n };\n\n private handleClickRow(index: number) {\n const isExpandedRowClicked = this.expandedRow === index;\n\n this.expandedRow = isExpandedRowClicked\n ? undefined\n : index;\n }\n\n private handleSearch = (event: any) => {\n this.search = event.target.value.trim();\n };\n\n private getMaxColSpanValue() {\n let colSpan = 5;\n\n if (!this.isHasRoots) {\n colSpan += 1;\n }\n\n return colSpan;\n }\n\n private renderCertificateButtonActions(certificate: ICertificateDecoded) {\n const isHasTestURLs = certificate.tests\n && (certificate.tests.expired || certificate.tests.revoked || certificate.tests.valid);\n\n return (\n <peculiar-button-menu\n class=\"button_table_cell\"\n groups={[\n {\n title: l10n.getString('previewCertificate'),\n options: [\n {\n text: l10n.getString('viewDetails'),\n startIcon: <DetailsIcon />,\n onClick: () => this.handleClickDetails(certificate.body),\n },\n ],\n },\n {\n title: l10n.getString('downloadOptions'),\n options: [\n {\n text: l10n.getString('download.pem'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsPem(certificate),\n },\n {\n text: l10n.getString('download.der'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsDer(certificate),\n },\n ],\n },\n ...(isHasTestURLs ? [{\n title: l10n.getString('testURLs'),\n options: [\n ...(certificate.tests?.valid ? [{\n text: l10n.getString('valid'),\n href: certificate.tests.valid,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.revoked ? [{\n text: l10n.getString('revoked'),\n href: certificate.tests.revoked,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.expired ? [{\n text: l10n.getString('expired'),\n href: certificate.tests.expired,\n startIcon: <LinkIcon />,\n }] : []),\n ],\n }] : []),\n ]}\n />\n );\n }\n\n private renderExpandedRow(certificate: X509Certificate) {\n const colSpan = this.getMaxColSpanValue() - 2;\n\n return (\n <tr class=\"expanded_summary\">\n <td />\n <td colSpan={colSpan}>\n <CertificateSummary\n certificate={certificate}\n showIssuer={!certificate.isRoot}\n />\n </td>\n <td />\n </tr>\n );\n }\n\n private renderCertificatesRows() {\n const searchHighlight = this.highlightWithSearch\n ? this.search\n : '';\n const content = [];\n\n this.certificatesDecoded.forEach((certificate, index) => {\n const isExpandedRow = index === this.expandedRow;\n const publicKeyValue = OIDs[certificate.body.signature.algorithm]\n || certificate.body.signature.algorithm;\n\n if (this.filterWithSearch && this.search) {\n const certificateStringForSearch = [\n publicKeyValue,\n certificate.body.issuerCommonName,\n certificate.name,\n certificate.body.commonName,\n certificate.body.thumbprints['SHA-1'],\n ]\n .join(' ')\n .toLowerCase();\n\n if (certificateStringForSearch.indexOf(this.search.toLowerCase()) === -1) {\n return;\n }\n }\n\n if (this.mobileScreenView) {\n content.push([\n <tr\n class={{\n certificate_row: true,\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <table>\n <tbody>\n {!this.isHasRoots && (\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('issuer')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n )}\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('name')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('publicKey')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('fingerprint')}\n &nbsp; (SHA-1)\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n {isExpandedRow && this.renderExpandedRow(certificate.body)}\n <tr class=\"certificate_row_actions\">\n <td>\n {this.renderCertificateButtonActions(certificate)}\n <Button\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>,\n ]);\n\n return;\n }\n\n content.push([\n <tr\n class={{\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <Button\n class=\"button_table_cell\"\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n {!this.isHasRoots && (\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n )}\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n {this.renderCertificateButtonActions(certificate)}\n </td>\n </tr>,\n isExpandedRow && this.renderExpandedRow(certificate.body),\n ]);\n });\n\n return content;\n }\n\n private renderCertificateDetailsModal() {\n if (!this.certificateSelectedForDetails) {\n return null;\n }\n\n return (\n <div\n class=\"modal_wrapper\"\n role=\"presentation\"\n aria-hidden=\"false\"\n part=\"presentation\"\n >\n <div\n class=\"modal_backdrop\"\n onClick={this.handleModalClose}\n aria-hidden=\"true\"\n />\n <div\n class=\"modal_container\"\n role=\"dialog\"\n part=\"presentation_container\"\n >\n <header class=\"modal_header\">\n <Typography\n variant=\"h4\"\n >\n {l10n.getString('certificateDetails')}\n </Typography>\n <Button\n onClick={this.handleModalClose}\n startIcon={<CrossIcon />}\n />\n </header>\n <div class=\"modal_content\">\n <peculiar-certificate-viewer\n certificate={this.certificateSelectedForDetails}\n mobileMediaQueryString={this.mobileMediaQueryString}\n />\n </div>\n </div>\n </div>\n );\n }\n\n private renderSearch() {\n if (!this.filterWithSearch && !this.highlightWithSearch) {\n return null;\n }\n\n return (\n <div class=\"search_section\">\n <input\n onInput={this.handleSearch}\n type=\"search\"\n value=\"\"\n class=\"input_search t-b3 c-black\"\n disabled={!this.certificatesDecoded.length}\n placeholder=\"Search\"\n />\n </div>\n );\n }\n\n private renderEmptyState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n There are no certificates available.\n </Typography>\n </td>\n </tr>\n );\n }\n\n private renderEmptySearchState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n No results found for &ldquo;\n {this.search}\n &ldquo;\n </Typography>\n </td>\n </tr>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderLoadingState() {\n return (\n <div class=\"loading_container\">\n <peculiar-circular-progress />\n </div>\n );\n }\n\n private renderTableBody() {\n if (this.isDecodeInProcess) {\n return null;\n }\n\n if (!this.certificatesDecoded.length) {\n return this.renderEmptyState();\n }\n\n const certificatesRows = this.renderCertificatesRows();\n\n if (this.search && !certificatesRows.length) {\n return this.renderEmptySearchState();\n }\n\n return certificatesRows;\n }\n\n render() {\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n {this.renderSearch()}\n <table>\n {!this.mobileScreenView && (\n <thead>\n <tr>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n {!this.isHasRoots && (\n <th class=\"col_issuer\">\n <Typography variant=\"s2\">\n {l10n.getString('issuer')}\n </Typography>\n </th>\n )}\n <th class=\"col_name\">\n <Typography variant=\"s2\">\n {l10n.getString('name')}\n </Typography>\n </th>\n <th class=\"col_public_key\">\n <Typography variant=\"s2\">\n {l10n.getString('publicKey')}\n </Typography>\n </th>\n <th class=\"col_fingerprint\">\n <Typography variant=\"s2\">\n {l10n.getString('fingerprint')}\n &nbsp; (SHA-1)\n </Typography>\n </th>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n </tr>\n </thead>\n )}\n <tbody>\n {this.renderTableBody()}\n </tbody>\n </table>\n\n {this.renderCertificateDetailsModal()}\n {this.isDecodeInProcess && this.renderLoadingState()}\n </Host>\n );\n }\n}\n"],"mappings":";;;;;;;;;;GAkBO,IAAMA,mBAAmE,SAACC,GAE7E,IAAAC,EAEED,EAAKC,YADPC,EACEF,EAAKE,WAET,IAAMC,EAAY,SAACC,EAAyBC,GAAsB,OAChEC,EAAA,UACEA,EAAA,UACEA,EAACC,WAAU,CACTC,QAAQ,KACRC,MAAM,UAELL,IAGLE,EAAA,UACEA,EAACC,WAAU,CACTC,QAAQ,KACRC,MAAM,SAELJ,IAfyD,EAqBlE,OACEC,EAAA,aACEA,EAAA,aACGH,EACCO,KAAKC,UAAU,eACfV,EAAYW,mBAEbV,GAAcC,EACbO,KAAKC,UAAU,cACfV,EAAYY,kBAGbV,EACCO,KAAKC,UAAU,gBACfV,EAAYa,cAEbX,EACCO,KAAKC,UAAU,WACfV,EAAYc,SAEbZ,EACCO,KAAKC,UAAU,YACfV,EAAYe,UAEbb,EACCO,KAAKC,UAAU,UACfM,UAAUhB,EAAYiB,YAEvBf,EACCO,KAAKC,UAAU,WACfM,UAAUhB,EAAYkB,YAKhC,EChFA,IAAMC,sBAAwB,2/W,ICwDjBC,mBAAkB,W,0JACrBC,KAAAC,WAAsB,MAkItBD,KAAAE,mBAAqB,SAACvB,GAC5BwB,EAAKC,8BAAgCzB,EACrCwB,EAAKE,YAAYC,KAAK3B,E,EAGhBqB,KAAAO,iBAAmB,WACzBJ,EAAKC,8BAAgCI,UAErCL,EAAKM,aAAaH,M,EAWZN,KAAAU,aAAe,SAACC,GACtBR,EAAKS,OAASD,EAAME,OAAO9B,MAAM+B,M,oBAxII,G,sBAKH,K,yBAKG,K,4BASqB,qB,sBAYvB,M,YAEX,G,yBAE4B,G,+FAMhB,I,CAE9BC,EAAAC,UAAAC,uBAAA,SAAuBN,GAC7BX,KAAKkB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MAAIyF,MAAM,YACRzF,EAACC,WAAU,CAACC,QAAQ,MACjBE,KAAKC,UAAU,UAGpBL,EAAA,MAAIyF,MAAM,kBACRzF,EAACC,WAAU,CAACC,QAAQ,MACjBE,KAAKC,UAAU,eAGpBL,EAAA,MAAIyF,MAAM,mBACRzF,EAACC,WAAU,CAACC,QAAQ,MACjBE,KAAKC,UAAU,eAAc,cAKlCL,EAAA,aAINA,EAAA,aACGgB,KAAK4H,oBAIT5H,KAAKgH,gCACLhH,KAAKuD,mBAAqBvD,KAAK2H,qB,+IA7kBT,G"}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{r as registerInstance,h,H as Host}from"./index-4079bbb5.js";import{B as Button}from"./button-35146bdd.js";import{A as ArrowTopIcon,a as ArrowBottomIcon}from"./arrow_top-efd3a56d.js";var textHiderCss=".sc-peculiar-text-hider-h{display:-ms-flexbox;display:flex;width:100%;gap:var(--pv-size-base-4)}[aria-expanded=true].sc-peculiar-text-hider-h .content.sc-peculiar-text-hider{white-space:initial}.content.sc-peculiar-text-hider{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.action.sc-peculiar-text-hider{-ms-flex-negative:0;flex-shrink:0;margin-top:calc(var(--pv-size-base) * -1)}";var TextHider=function(){function e(e){registerInstance(this,e);this.opened=false}e.prototype.render=function(){var e=this;return h(Host,{"aria-expanded":String(this.opened)},h("div",{class:"content"},h("slot",null)),h(Button,{class:"action",onClick:function(){e.opened=!e.opened},startIcon:this.opened?h(ArrowTopIcon,{color:"secondary"}):h(ArrowBottomIcon,{color:"secondary"})}))};return e}();TextHider.style=textHiderCss;export{TextHider as peculiar_text_hider};
4
+ import{r as registerInstance,h,H as Host}from"./index-4079bbb5.js";import{B as Button}from"./button-35146bdd.js";import{a as ArrowTopIcon,A as ArrowBottomIcon}from"./arrow_top-fc298828.js";var textHiderCss=".sc-peculiar-text-hider-h{display:-ms-flexbox;display:flex;width:100%;gap:var(--pv-size-base-4)}[aria-expanded=true].sc-peculiar-text-hider-h .content.sc-peculiar-text-hider{white-space:initial}.content.sc-peculiar-text-hider{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.action.sc-peculiar-text-hider{-ms-flex-negative:0;flex-shrink:0;margin-top:calc(var(--pv-size-base) * -1)}";var TextHider=function(){function e(e){registerInstance(this,e);this.opened=false}e.prototype.render=function(){var e=this;return h(Host,{"aria-expanded":String(this.opened)},h("div",{class:"content"},h("slot",null)),h(Button,{class:"action",onClick:function(){e.opened=!e.opened},startIcon:this.opened?h(ArrowTopIcon,{color:"secondary"}):h(ArrowBottomIcon,{color:"secondary"})}))};return e}();TextHider.style=textHiderCss;export{TextHider as peculiar_text_hider};
5
5
  //# sourceMappingURL=peculiar-text-hider.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- export{D as Download,d as downloadFromBuffer}from"./p-a053c132.js";
4
+ export{D as Download,d as downloadFromBuffer}from"./p-a053c132.js";export{B as Button,T as Typography}from"./p-7f9beaa8.js";export{L as Link}from"./p-94a453d7.js";export{C as CrossIcon,D as DetailsIcon,L as LinkIcon}from"./p-370cee20.js";export{D as DownloadIcon}from"./p-17e3c47b.js";export{A as ActionsIcon}from"./p-1ceb0fe3.js";export{A as ArrowBottomIcon,a as ArrowTopIcon}from"./p-0fc2e2b4.js";import"./p-0b356bb5.js";
5
5
  //# sourceMappingURL=index.esm.js.map
@@ -1,7 +1,7 @@
1
1
  var __awaiter=this&&this.__awaiter||function(e,t,r,a){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function n(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a["throw"](e))}catch(e){o(e)}}function c(e){e.done?r(e.value):i(e.value).then(n,s)}c((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,i,o,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(e){return function(t){return c([e,t])}}function c(s){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,s[0]&&(r=0)),r)try{if(a=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];i=0}finally{a=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */System.register(["./p-5aabeba7.system.js","./p-c0a298fd.system.js","./p-ae9189f6.system.js","./p-6667fe6e.system.js","./p-0bdcdbf7.system.js","./p-2fcad8cb.system.js","./p-e6a3b4d4.system.js"],(function(e){"use strict";var t,r,a,i,o,n,s,c,v,l,p,d,h,u,g,b,f,y,m,w,x,k,z,S,L,I,D,K,j,A,C,N,E,P,_,M,Q,T;return{setters:[function(e){t=e.h;r=e.r;a=e.H},function(e){i=e.a1;o=e.$;n=e.a2;s=e.H;c=e.W;v=e.I;l=e.T;p=e.V;d=e.U;h=e.z;u=e.a0;g=e.a3;b=e.a4;f=e.a5},function(e){y=e.b},function(e){m=e.X;w=e.a;x=e.C},function(e){k=e.g;z=e.R;S=e.G;L=e.a;I=e.T;D=e.B;K=e.S;j=e.b;A=e.c;C=e.d;N=e.e;E=e.E;P=e.M;_=e.I;M=e.f;Q=e.P},function(e){T=e.T},function(){}],execute:function(){
4
+ */System.register(["./p-5aabeba7.system.js","./p-c0a298fd.system.js","./p-ae9189f6.system.js","./p-6667fe6e.system.js","./p-c362dc5e.system.js","./p-2fcad8cb.system.js","./p-6cb88fd6.system.js","./p-e6a3b4d4.system.js"],(function(e){"use strict";var t,r,a,i,o,n,s,c,v,l,p,d,h,u,g,b,f,y,m,w,x,k,z,S,L,I,D,K,j,A,C,N,E,P,_,M,Q,T;return{setters:[function(e){t=e.h;r=e.r;a=e.H},function(e){i=e.a1;o=e.$;n=e.a2;s=e.H;c=e.W;v=e.I;l=e.T;p=e.V;d=e.U;h=e.z;u=e.a0;g=e.a3;b=e.a4;f=e.a5},function(e){y=e.b},function(e){m=e.X;w=e.a;x=e.C},function(e){k=e.g;z=e.R;S=e.G;L=e.a;I=e.T;D=e.B;K=e.S;j=e.b;A=e.c;C=e.d;N=e.e;E=e.E;P=e.M;_=e.I;M=e.f;Q=e.P},function(e){T=e.T},function(){},function(){}],execute:function(){
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
@@ -108,4 +108,4 @@ var V=function(e,r){var a=e.attribute;return[t(z,{name:"Name",value:k(a.asn.type
108
108
  * This source code is licensed under the MIT license found in the
109
109
  * LICENSE file in the root directory of this source tree.
110
110
  */var ee=function(e){var r=e.issuer;if(!r){return null}return[t(L,{value:o.getString("issuer")}),r.map((function(e){return t(S,{generalName:e,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}})}))]};var te="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";var re=e("peculiar_attribute_certificate_viewer",function(){function e(e){var t=this;r(this,e);this.getAuthKeyIdParentLink=function(e){var r;return(r=t.authKeyIdParentLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",e)};this.getAuthKeyIdSiblingsLink=function(e){var r;return(r=t.authKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",e)};this.getSubjectKeyIdChildrenLink=function(e){var r;return(r=t.subjectKeyIdChildrenLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var r;return(r=t.subjectKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",e)};this.certificate=undefined;this.download=undefined;this.authKeyIdParentLink=undefined;this.authKeyIdSiblingsLink=undefined;this.subjectKeyIdChildrenLink=undefined;this.subjectKeyIdSiblingsLink=undefined;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true}e.prototype.handleMediaQueryChange=function(e){this.mobileScreenView=e.matches};e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};e.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(e instanceof m){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new m(e)}else{return[2]}this.certificateDecoded.parseExtensions();this.certificateDecoded.parseAttributes();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:t=r.sent();this.certificateDecodeError=t;console.error("Error certificate parse:",t);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};e.prototype.watchCertificateAndDecode=function(e,t){if(typeof e==="string"&&typeof t==="string"){if(e!==t){this.decodeCertificate(e)}return}if(e instanceof m&&t instanceof m){if(e.serialNumber!==t.serialNumber){this.decodeCertificate(e)}}};e.prototype.renderErrorState=function(){return t("div",{class:"status_wrapper"},t(T,null,"There was an error decoding this attribute certificate."))};e.prototype.renderEmptyState=function(){return t("div",{class:"status_wrapper"},t(T,null,"There is no attribute certificate available."))};e.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return t(a,{"data-mobile-screen-view":String(this.mobileScreenView)},t("table",null,t(D,Object.assign({},this.certificateDecoded)),t(ee,{issuer:this.certificateDecoded.issuer}),t(Z,{holder:this.certificateDecoded.holder}),t(K,{signature:this.certificateDecoded.signature}),t(j,{thumbprints:this.certificateDecoded.thumbprints}),t(F,{attributes:this.certificateDecoded.attributes,getLEILink:A,getDNSNameLink:C,getIPAddressLink:N,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(E,{extensions:this.certificateDecoded.extensions,getLEILink:A,getDNSNameLink:C,getIPAddressLink:N,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(P,{certificate:this.certificateDecoded})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}());re.style=te;var ae="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";var ie=e("peculiar_crl_viewer",function(){function e(e){var t=this;r(this,e);this.getAuthKeyIdParentLink=function(e){var r;return(r=t.authKeyIdParentLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",e)};this.getAuthKeyIdSiblingsLink=function(e){var r;return(r=t.authKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{authKeyId}}",e)};this.certificate=undefined;this.download=undefined;this.authKeyIdParentLink=undefined;this.authKeyIdSiblingsLink=undefined;this.issuerDnLink=undefined;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true}e.prototype.handleMediaQueryChange=function(e){this.mobileScreenView=e.matches};e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};e.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(e instanceof w){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new w(e)}else{return[2]}this.certificateDecoded.parseExtensions();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:t=r.sent();this.certificateDecodeError=t;console.error("Error certificate parse:",t);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};e.prototype.getIssuerDnLink=function(){return this.issuerDnLink};e.prototype.watchCertificateAndDecode=function(e,t){if(typeof e==="string"&&typeof t==="string"){if(e!==t){this.decodeCertificate(e)}return}if(e instanceof w&&t instanceof w){if(e.commonName!==t.commonName){this.decodeCertificate(e)}}};e.prototype.renderErrorState=function(){return t("div",{class:"status_wrapper"},t(T,null,"There was an error decoding this certificate revocation list."))};e.prototype.renderEmptyState=function(){return t("div",{class:"status_wrapper"},t(T,null,"There is no certificate revocation list available."))};e.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return t(a,{"data-mobile-screen-view":String(this.mobileScreenView)},t("table",null,t(D,Object.assign({},this.certificateDecoded)),t(_,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),t(K,{signature:this.certificateDecoded.signature}),t(j,{thumbprints:this.certificateDecoded.thumbprints}),t(E,{extensions:this.certificateDecoded.extensions,getLEILink:A,getDNSNameLink:C,getIPAddressLink:N,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink}),t(Y,{revokedCertificates:this.certificateDecoded.revokedCertificates,getDNSNameLink:C,getIPAddressLink:N}),this.download&&t(P,{certificate:this.certificateDecoded})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}());ie.style=ae;var oe="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";var ne=e("peculiar_csr_viewer",function(){function e(e){var t=this;r(this,e);this.getAuthKeyIdParentLink=function(e){return e};this.getAuthKeyIdSiblingsLink=function(e){return e};this.getSubjectKeyIdChildrenLink=function(e){var r;return(r=t.subjectKeyIdChildrenLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var r;return(r=t.subjectKeyIdSiblingsLink)===null||r===void 0?void 0:r.replace("{{subjectKeyId}}",e)};this.certificate=undefined;this.download=undefined;this.subjectKeyIdChildrenLink=undefined;this.subjectKeyIdSiblingsLink=undefined;this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true}e.prototype.handleMediaQueryChange=function(e){this.mobileScreenView=e.matches};e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};e.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(e instanceof x){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new x(e)}else{return[2]}this.certificateDecoded.parseAttributes();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:t=r.sent();this.certificateDecodeError=t;console.error("Error certificate parse:",t);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};e.prototype.watchCertificateAndDecode=function(e,t){if(typeof e==="string"&&typeof t==="string"){if(e!==t){this.decodeCertificate(e)}return}if(e instanceof x&&t instanceof x){if(e.commonName!==t.commonName){this.decodeCertificate(e)}}};e.prototype.renderErrorState=function(){return t("div",{class:"status_wrapper"},t(T,null,"There was an error decoding this certificate request."))};e.prototype.renderEmptyState=function(){return t("div",{class:"status_wrapper"},t(T,null,"There is no certificate request available."))};e.prototype.getExtensionRequestAttribute=function(){if(!this.certificateDecoded){return undefined}return this.certificateDecoded.attributes.find((function(e){return e.asn.type==="1.2.840.113549.1.9.14"}))};e.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}var e=this.getExtensionRequestAttribute();return t(a,{"data-mobile-screen-view":String(this.mobileScreenView)},t("table",null,t(D,Object.assign({},this.certificateDecoded)),t(M,{name:this.certificateDecoded.subject}),t(Q,{publicKey:this.certificateDecoded.publicKey}),t(K,{signature:this.certificateDecoded.signature}),t(j,{thumbprints:this.certificateDecoded.thumbprints}),t(F,{attributes:this.certificateDecoded.attributes,getLEILink:A,getDNSNameLink:C,getIPAddressLink:N,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(E,{extensions:e===null||e===void 0?void 0:e.value,title:"Extension Request",getLEILink:A,getDNSNameLink:C,getIPAddressLink:N,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(P,{certificate:this.certificateDecoded})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}());ne.style=oe}}}));
111
- //# sourceMappingURL=p-7ed7cd97.system.entry.js.map
111
+ //# sourceMappingURL=p-0b475f2a.system.entry.js.map
@@ -15,5 +15,5 @@ import{h as o}from"./p-0b356bb5.js";
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */const r=t=>{const{color:r="gray-10"}=t;return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none"},o("path",{stroke:`var(--pv-color-${r})`,"stroke-linecap":"round","stroke-width":"1.5",d:"m11.222 17.722 3.852-4.28a.2.2 0 0 1 .297 0l3.851 4.28"}))};export{r as A,t as a};
19
- //# sourceMappingURL=p-709994c1.js.map
18
+ */const r=t=>{const{color:r="gray-10"}=t;return o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",fill:"none"},o("path",{stroke:`var(--pv-color-${r})`,"stroke-linecap":"round","stroke-width":"1.5",d:"m11.222 17.722 3.852-4.28a.2.2 0 0 1 .297 0l3.851 4.28"}))};export{t as A,r as a};
19
+ //# sourceMappingURL=p-0fc2e2b4.js.map