@peculiar/certificates-viewer 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,459 +0,0 @@
1
- var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]};return e(t,i)};return function(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(t,i);function a(){this.constructor=t}t.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}();var __awaiter=this&&this.__awaiter||function(e,t,i,a){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a["throw"](e))}catch(e){r(e)}}function c(e){e.done?i(e.value):n(e.value).then(o,s)}c((a=a.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,n,r,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(a)throw new TypeError("Generator is already executing.");while(i)try{if(a=1,n&&(r=o[0]&2?n["return"]:o[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;if(n=0,r)o=[o[0]&2,r.value];switch(o[0]){case 0:case 1:r=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;n=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!r||o[1]>r[0]&&o[1]<r[3])){i.label=o[1];break}if(o[0]===6&&i.label<r[1]){i.label=r[1];r=o;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(o);break}if(r[2])i.ops.pop();i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e];n=0}finally{a=r=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};
2
- /*!
3
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
- */import{h,r as registerInstance,H as Host,c as createEvent}from"./index-bbd484d9.js";import{A as AsnData,a as Attribute$1,i as id_pkcs9_at_extensionRequest,b as AsnParser,E as ExtensionRequest,c as Extension,d as AsnConvert,e as id_pkcs9_at_unstructuredName,U as UnstructuredName,f as id_pkcs9_at_challengePassword,C as ChallengePassword,g as id_ValuationRanking,V as ValuationRanking,h as id_InsuranceValue,I as InsuranceValue,j as id_WebGDPR,W as WebGDPR,k as id_ActivityDescription,l as ActivityDescription,m as id_TypeRelationship,T as TypeRelationship,n as id_DomainNameTechnicalOperator,D as DomainNameTechnicalOperator,o as id_DomainNameOwner,p as DomainNameOwner,q as id_DomainNameLegalRepresentative,r as DomainNameLegalRepresentative,s as id_DomainNameBeneficiary,t as DomainNameBeneficiary,u as certificateRawToBuffer,v as AttributeCertificate,w as getCertificateThumbprint,x as hexFormat,y as base64Format,z as CertificationRequest,N as Name,B as id_ecPublicKey,F as ECParameters,G as id_rsaEncryption,R as RSAPublicKey,O as OIDs,H as Name$1,J as OtherName,K as DisplayText,L as UserNotice,M as EDIPartyName,P as AsnIntegerArrayBufferConverter,Q as KeyUsage,S as BasicConstraints,X as ExtendedKeyUsage,Y as SubjectKeyIdentifier,Z as AuthorityKeyIdentifier,_ as CRLDistributionPoints,$ as AuthorityInfoAccessSyntax,a0 as SubjectInfoAccessSyntax,a1 as SubjectAlternativeName,a2 as CertificatePolicies,a3 as CertificateTransparency,a4 as NameConstraints,a5 as CertificateTemplate,a6 as EnrollCertTypeChoice,a7 as CaVersion,a8 as QCStatements,a9 as NetscapeComment,aa as NetscapeCertType,ab as LeiRole,ac as LeiChoice,ad as Timestamp,ae as ArchiveRevInfo,af as CRLReason,ag as SubjectDirectoryAttributes,ah as PrivateKeyUsagePeriod,ai as EntrustVersionInfo,aj as BiometricSyntax,ak as LogotypeExtn,al as TNAuthorizationList,am as PolicyConstraints,an as PolicyMappings,ao as isPem,ap as isX509Pem,aq as isPkcs10Pem,ar as isX509AttributePem,as as X509Certificate}from"./certification_request-48e8b956.js";import{b as build,D as Download}from"./download-cf68ac2c.js";import{d as dateDiff,l as l10n,a as dateShort,h as history}from"./l10n-ead9928b.js";import"./_commonjsHelpers-bfbd2ad8.js";
5
- /**
6
- * @license
7
- * Copyright (c) Peculiar Ventures, LLC.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */function readAsBinaryString(e){return new Promise((function(t,i){var a=new FileReader;a.onload=function(){return t({value:a.result,fileName:e.name,fileSize:e.size,sourceMime:e.type})};a.onerror=function(){return i(a.error)};a.readAsBinaryString(e)}))}
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 Attribute=function(e){__extends(t,e);function t(t){var i=e.call(this,t,Attribute$1)||this;var a=i.getAsnExtnValue();switch(i.asn.type){case id_DomainNameBeneficiary:i.value=AsnParser.parse(a,DomainNameBeneficiary);break;case id_DomainNameLegalRepresentative:i.value=AsnParser.parse(a,DomainNameLegalRepresentative);break;case id_DomainNameOwner:i.value=AsnParser.parse(a,DomainNameOwner);break;case id_DomainNameTechnicalOperator:i.value=AsnParser.parse(a,DomainNameTechnicalOperator);break;case id_TypeRelationship:i.value=AsnParser.parse(a,TypeRelationship);break;case id_ActivityDescription:i.value=AsnParser.parse(a,ActivityDescription);break;case id_WebGDPR:i.value=AsnParser.parse(a,WebGDPR);break;case id_InsuranceValue:i.value=AsnParser.parse(a,InsuranceValue);break;case id_ValuationRanking:i.value=AsnParser.parse(a,ValuationRanking);break;case id_pkcs9_at_challengePassword:i.value=AsnParser.parse(a,ChallengePassword);break;case id_pkcs9_at_unstructuredName:i.value=AsnParser.parse(a,UnstructuredName);break;case id_pkcs9_at_extensionRequest:{var n=AsnParser.parse(a,ExtensionRequest);i.value=n.map((function(e){return new Extension(AsnConvert.serialize(e))}));break}default:i.value=build.Convert.ToHex(a)}return i}t.prototype.getAsnExtnValue=function(){return this.asn.values[0]};return t}(AsnData);
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 X509AttributeCertificate=function(e){__extends(t,e);function t(t){var i=this;var a;i=e.call(this,certificateRawToBuffer(t),AttributeCertificate)||this;i.thumbprints={};i.type="X.509 Attribute Certificate";var n=i.asn.acinfo;i.serialNumber=build.Convert.ToHex(n.serialNumber);i.version=n.version;var r=n.attrCertValidityPeriod.notBeforeTime;if(!r){throw new Error("Cannot get 'notBefore' value")}i.notBefore=r;var o=n.attrCertValidityPeriod.notAfterTime;if(!o){throw new Error("Cannot get 'notAfter' value")}i.notAfter=o;i.validity=dateDiff(i.notBefore,i.notAfter);i.issuer=n.issuer.v1Form||((a=n.issuer.v2Form)===null||a===void 0?void 0:a.issuerName);i.holder=n.holder;return i}Object.defineProperty(t.prototype,"signature",{get:function(){var e=this.asn,t=e.signatureValue,i=e.signatureAlgorithm;return{value:t,algorithm:i.algorithm}},enumerable:false,configurable:true});t.prototype.parseExtensions=function(){var e=this.asn.acinfo;if(e.extensions){this.extensions=e.extensions.map((function(e){return new Extension(AsnConvert.serialize(e))}))}};t.prototype.parseAttributes=function(){var e=this.asn.acinfo;if(e.attributes){this.attributes=e.attributes.map((function(e){return new Attribute(AsnConvert.serialize(e))}))}};t.prototype.getThumbprint=function(e){if(e===void 0){e="SHA-1"}return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);return[4,getCertificateThumbprint(e,this.raw)];case 1:t=a.sent();this.thumbprints[e["name"]||e]=build.Convert.ToHex(t);return[3,3];case 2:i=a.sent();console.error("Error thumbprint get:",i);return[3,3];case 3:return[2]}}))}))};t.prototype.exportAsBase64=function(){return build.Convert.ToBase64(this.raw)};t.prototype.exportAsHexFormatted=function(){return hexFormat(build.Convert.ToHex(this.raw))};t.prototype.exportAsPemFormatted=function(){return"-----BEGIN ATTRIBUTE CERTIFICATE-----\n".concat(base64Format(this.exportAsBase64()),"\n-----END ATTRIBUTE CERTIFICATE-----")};Object.defineProperty(t.prototype,"commonName",{get:function(){return"attribute-certificate-".concat(this.thumbprints["SHA-1"])},enumerable:false,configurable:true});return t}(AsnData);
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 CSR=function(e){__extends(t,e);function t(t){var i=e.call(this,certificateRawToBuffer(t),CertificationRequest)||this;i.thumbprints={};i.type="PKCS#10 Certificate Request";var a=i.asn.certificationRequestInfo;i.subject=new Name(a.subject).toJSON();i.version=a.version;return i}Object.defineProperty(t.prototype,"publicKey",{get:function(){var e=this.asn.certificationRequestInfo.subjectPKInfo,t=e.subjectPublicKey,i=e.algorithm;var a;if(i.algorithm===id_ecPublicKey&&i.parameters){a=AsnConvert.parse(i.parameters,ECParameters)}if(i.algorithm===id_rsaEncryption){a=AsnConvert.parse(t,RSAPublicKey)}var n=AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);return{params:a,value:n,algorithm:i.algorithm}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"signature",{get:function(){var e=this.asn,t=e.signature,i=e.signatureAlgorithm;return{value:t,algorithm:i.algorithm}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"commonName",{get:function(){if(!this.subject){return""}for(var e=0;e<this.subject.length;e+=1){var t=this.subject[e];if(t.shortName==="CN"||t.shortName==="E"||t.shortName==="O"){return t.value}}return""},enumerable:false,configurable:true});t.prototype.getThumbprint=function(e){if(e===void 0){e="SHA-1"}return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);return[4,getCertificateThumbprint(e,this.raw)];case 1:t=a.sent();this.thumbprints[e["name"]||e]=build.Convert.ToHex(t);return[3,3];case 2:i=a.sent();console.error("Error thumbprint get:",i);return[3,3];case 3:return[2]}}))}))};t.prototype.parseAttributes=function(){var e=this.asn.certificationRequestInfo;if(e.attributes){this.attributes=e.attributes.map((function(e){return new Attribute(AsnConvert.serialize(e))}))}};t.prototype.exportAsBase64=function(){return build.Convert.ToBase64(this.raw)};t.prototype.exportAsHexFormatted=function(){return hexFormat(build.Convert.ToHex(this.raw))};t.prototype.exportAsPemFormatted=function(){return"-----BEGIN CERTIFICATE REQUEST-----\n".concat(base64Format(this.exportAsBase64()),"\n-----END CERTIFICATE REQUEST-----")};return t}(AsnData);
33
- /**
34
- * @license
35
- * Copyright (c) Peculiar Ventures, LLC.
36
- *
37
- * This source code is licensed under the MIT license found in the
38
- * LICENSE file in the root directory of this source tree.
39
- */function getStringByOID(e){var t=OIDs[e];if(t){return"".concat(t," (").concat(e,")")}return e}
40
- /**
41
- * @license
42
- * Copyright (c) Peculiar Ventures, LLC.
43
- *
44
- * This source code is licensed under the MIT license found in the
45
- * LICENSE file in the root directory of this source tree.
46
- */function isLink(e){return e.indexOf("http")===0}
47
- /**
48
- * @license
49
- * Copyright (c) Peculiar Ventures, LLC.
50
- *
51
- * This source code is licensed under the MIT license found in the
52
- * LICENSE file in the root directory of this source tree.
53
- */var RowTitle=function(e){var t=e.value;if(!t){return null}return h("tr",{class:"title"},h("td",{colSpan:2},h("peculiar-typography",{type:"h6"},t)))};var RowValue=function(e){var t=e.name,i=e.value,a=e.monospace,n=e.collapse,r=e.href,o=e.extraValue;if(!t){return null}if(i===undefined||i===null){return null}var s;if(n){s=h("peculiar-text-hider",null,i)}else{s=i}var c=!!i.toString();return h("tr",null,h("td",{colSpan:c?1:2},h("peculiar-typography",{color:"grey_5"},t,c?":":"")),c&&h("td",{class:{monospace:a}},isLink(i.toString())||r?h("peculiar-link",{href:r||i.toString()},i):h("peculiar-typography",{monospace:a},s,o)))};
54
- /**
55
- * @license
56
- * Copyright (c) Peculiar Ventures, LLC.
57
- *
58
- * This source code is licensed under the MIT license found in the
59
- * LICENSE file in the root directory of this source tree.
60
- */var Signature=function(e){var t=e.signature;if(!t){return null}return[h(RowTitle,{value:l10n.getString("signature")}),h(RowValue,{name:l10n.getString("algorithm"),value:getStringByOID(t.algorithm)}),h(RowValue,{name:l10n.getString("value"),value:build.Convert.ToHex(t.value),monospace:true,collapse:true})]};
61
- /**
62
- * @license
63
- * Copyright (c) Peculiar Ventures, LLC.
64
- *
65
- * This source code is licensed under the MIT license found in the
66
- * LICENSE file in the root directory of this source tree.
67
- */var BasicAttribute=function(e,t){var i=e.attribute;return[h(RowValue,{name:"Name",value:getStringByOID(i.asn.type)}),t,h("tr",null,h("td",{colSpan:2,class:"divider"},h("span",{class:"bg_fill"})))]};
68
- /**
69
- * @license
70
- * Copyright (c) Peculiar Ventures, LLC.
71
- *
72
- * This source code is licensed under the MIT license found in the
73
- * LICENSE file in the root directory of this source tree.
74
- */var NamePart=function(e){var t=e.name;if(!t){return null}return t.map((function(e){return e.map((function(e){return h(RowValue,{name:OIDs[e.type]||e.type,value:e.value.toString()})}))}))};
75
- /**
76
- * @license
77
- * Copyright (c) Peculiar Ventures, LLC.
78
- *
79
- * This source code is licensed under the MIT license found in the
80
- * LICENSE file in the root directory of this source tree.
81
- */var NameAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(NamePart,{name:t.value}))};
82
- /**
83
- * @license
84
- * Copyright (c) Peculiar Ventures, LLC.
85
- *
86
- * This source code is licensed under the MIT license found in the
87
- * LICENSE file in the root directory of this source tree.
88
- */var names={otherName:"Other Name",rfc822Name:"RFC 822 Name",dNSName:"DNS Name",x400Address:"X400 Address",directoryName:"Directory Name",ediPartyName:"Edi Party Name ",uniformResourceIdentifier:"URI",iPAddress:"IP Address",registeredID:"Registered ID"};var GeneralNamePart=function(e){var t=e.generalName,i=e.getDNSNameLink,a=e.getIPAddressLink;if(!t){return null}return Object.keys(t).map((function(e){var n=t[e];if(n instanceof Name$1){return[h(RowValue,{name:names[e]||e,value:""}),n.map((function(e){return e.map((function(e){return h(RowValue,{name:OIDs[e.type]||e.type,value:e.value.toString()})}))}))]}if(n instanceof OtherName){try{var r=AsnParser.parse(n.value,DisplayText);return h(RowValue,{name:OIDs[n.typeId]||n.typeId,value:r.toString()})}catch(e){}try{var r=AsnParser.parse(n.value,UserNotice);if(r.explicitText){return h(RowValue,{name:OIDs[n.typeId]||n.typeId,value:r.explicitText.toString()})}}catch(e){}return h(RowValue,{name:OIDs[n.typeId]||n.typeId,value:build.Convert.ToHex(n.value),monospace:true})}if(build.BufferSourceConverter.isBufferSource(n)){return h(RowValue,{name:names[e]||e,value:build.Convert.ToString(n)})}if(n instanceof EDIPartyName){return h(RowValue,{name:names[e]||e,value:build.Convert.ToString(n.partyName)})}if(e==="dNSName"){return h(RowValue,{name:names[e]||e,value:n,href:i(n)})}if(e==="iPAddress"){return h(RowValue,{name:names[e]||e,value:n,href:a(n)})}return h(RowValue,{name:names[e]||e,value:n})}))};
89
- /**
90
- * @license
91
- * Copyright (c) Peculiar Ventures, LLC.
92
- *
93
- * This source code is licensed under the MIT license found in the
94
- * LICENSE file in the root directory of this source tree.
95
- */var ActivityDescriptionAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Code Authority",value:""}),h(GeneralNamePart,{generalName:t.value.codeAuthority,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Code Id",value:""}),h(GeneralNamePart,{generalName:t.value.codeId,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Short Name",value:t.value.shortName}),h(RowValue,{name:"Short Description",value:t.value.shortDescription}))};
96
- /**
97
- * @license
98
- * Copyright (c) Peculiar Ventures, LLC.
99
- *
100
- * This source code is licensed under the MIT license found in the
101
- * LICENSE file in the root directory of this source tree.
102
- */var WebGdprAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Assessment Authority",value:""}),h(GeneralNamePart,{generalName:t.value.assessmentAuthority,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Assessment Location",value:""}),h(GeneralNamePart,{generalName:t.value.assessmentLocation,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Assessment Ref",value:""}),h(GeneralNamePart,{generalName:t.value.assessmentRef,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}}),h(RowValue,{name:"Data Storage Territory",value:t.value.dataStorageTerritory}),h(RowValue,{name:"Description",value:t.value.description}))};
103
- /**
104
- * @license
105
- * Copyright (c) Peculiar Ventures, LLC.
106
- *
107
- * This source code is licensed under the MIT license found in the
108
- * LICENSE file in the root directory of this source tree.
109
- */var InsuranceValueAttribute=function(e){var t=e.attribute;var i="".concat(t.value.base," * 10^").concat(t.value.degree," ").concat(t.value.location);return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:i}))};
110
- /**
111
- * @license
112
- * Copyright (c) Peculiar Ventures, LLC.
113
- *
114
- * This source code is licensed under the MIT license found in the
115
- * LICENSE file in the root directory of this source tree.
116
- */var TypeRelationshipAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},Object.keys(t.value).map((function(e){return h(RowValue,{name:e,value:t.value[e].toNumber()?"YES":"NO"})})))};
117
- /**
118
- * @license
119
- * Copyright (c) Peculiar Ventures, LLC.
120
- *
121
- * This source code is licensed under the MIT license found in the
122
- * LICENSE file in the root directory of this source tree.
123
- */var getValueRank=function(e){var t=1;if(e/100>1){t=100}else if(e/10>1){t=10}return"".concat(e,"/").concat(5*t)};var ValuationRankingAttribute=function(e){var t=e.attribute;var i=Object.keys(t.value).map((function(e){return[getValueRank(t.value[e]),h("br",null)]}));return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:i}))};
124
- /**
125
- * @license
126
- * Copyright (c) Peculiar Ventures, LLC.
127
- *
128
- * This source code is licensed under the MIT license found in the
129
- * LICENSE file in the root directory of this source tree.
130
- */var AsStringAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:t.value,monospace:true}))};
131
- /**
132
- * @license
133
- * Copyright (c) Peculiar Ventures, LLC.
134
- *
135
- * This source code is licensed under the MIT license found in the
136
- * LICENSE file in the root directory of this source tree.
137
- */var UnstructuredNameAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:t.value.utf8String}))};
138
- /**
139
- * @license
140
- * Copyright (c) Peculiar Ventures, LLC.
141
- *
142
- * This source code is licensed under the MIT license found in the
143
- * LICENSE file in the root directory of this source tree.
144
- */var ChallengePasswordAttribute=function(e){var t=e.attribute;return h(BasicAttribute,{attribute:t},h(RowValue,{name:"Value",value:t.value.toString()}))};
145
- /**
146
- * @license
147
- * Copyright (c) Peculiar Ventures, LLC.
148
- *
149
- * This source code is licensed under the MIT license found in the
150
- * LICENSE file in the root directory of this source tree.
151
- */var Attributes=function(e){var t=e.attributes;if(!t||!t.length){return null}return[h(RowTitle,{value:"Attributes"}),t.map((function(e){try{if(e.value instanceof Name$1){return h(NameAttribute,{attribute:e})}if(e.value instanceof ActivityDescription){return h(ActivityDescriptionAttribute,{attribute:e})}if(e.value instanceof WebGDPR){return h(WebGdprAttribute,{attribute:e})}if(e.value instanceof InsuranceValue){return h(InsuranceValueAttribute,{attribute:e})}if(e.value instanceof TypeRelationship){return h(TypeRelationshipAttribute,{attribute:e})}if(e.value instanceof ValuationRanking){return h(ValuationRankingAttribute,{attribute:e})}if(e.value instanceof UnstructuredName){return h(UnstructuredNameAttribute,{attribute:e})}if(e.value instanceof ChallengePassword){return h(ChallengePasswordAttribute,{attribute:e})}if(typeof e.value==="string"){return h(AsStringAttribute,{attribute:e})}return h(BasicAttribute,{attribute:e})}catch(t){console.error("Error render attribute:",e.asn.type);return null}}))]};
152
- /**
153
- * @license
154
- * Copyright (c) Peculiar Ventures, LLC.
155
- *
156
- * This source code is licensed under the MIT license found in the
157
- * LICENSE file in the root directory of this source tree.
158
- */var Thumbprints=function(e){var t=e.thumbprints;if(!t){return null}var i=Object.keys(t);if(!i.length){return null}return[h(RowTitle,{value:l10n.getString("fingerprints")}),i.map((function(e){return h(RowValue,{name:e,value:t[e],monospace:true})}))]};
159
- /**
160
- * @license
161
- * Copyright (c) Peculiar Ventures, LLC.
162
- *
163
- * This source code is licensed under the MIT license found in the
164
- * LICENSE file in the root directory of this source tree.
165
- */var BasicExtension=function(e,t){var i=e.extension;return[h(RowValue,{name:"Name",value:getStringByOID(i.asn.extnID)}),h(RowValue,{name:"Critical",value:i.asn.critical?"YES":"NO"}),t,h("tr",null,h("td",{colSpan:2,class:"divider"},h("span",{class:"bg_fill"})))]};
166
- /**
167
- * @license
168
- * Copyright (c) Peculiar Ventures, LLC.
169
- *
170
- * This source code is licensed under the MIT license found in the
171
- * LICENSE file in the root directory of this source tree.
172
- */var KeyUsageExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Usage",value:t.value.toJSON().join(", ")}))};
173
- /**
174
- * @license
175
- * Copyright (c) Peculiar Ventures, LLC.
176
- *
177
- * This source code is licensed under the MIT license found in the
178
- * LICENSE file in the root directory of this source tree.
179
- */var BasicConstraintsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Certificate Authority",value:t.value.cA?"YES":"NO"}),h(RowValue,{name:"Path Length Constraint",value:t.value.pathLenConstraint}))};
180
- /**
181
- * @license
182
- * Copyright (c) Peculiar Ventures, LLC.
183
- *
184
- * This source code is licensed under the MIT license found in the
185
- * LICENSE file in the root directory of this source tree.
186
- */var ExtendedKeyUsageExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return h(RowValue,{name:"Purpose #".concat(t+1),value:getStringByOID(e)})})))};
187
- /**
188
- * @license
189
- * Copyright (c) Peculiar Ventures, LLC.
190
- *
191
- * This source code is licensed under the MIT license found in the
192
- * LICENSE file in the root directory of this source tree.
193
- */var SubjectKeyIdentifierExtension=function(e){var t=e.extension,i=e.getSubjectKeyIdChildrenLink,a=e.getSubjectKeyIdSiblingsLink;var n=build.Convert.ToHex(t.value.buffer);var r=i(n);var o=a(n);return h(BasicExtension,{extension:t},h(RowValue,{name:"Key ID",value:n,monospace:true,extraValue:[r&&h("span",null," [",h("peculiar-link",{href:r},"children"),"]"),o&&h("span",null," [",h("peculiar-link",{href:o},"siblings"),"]")]}))};
194
- /**
195
- * @license
196
- * Copyright (c) Peculiar Ventures, LLC.
197
- *
198
- * This source code is licensed under the MIT license found in the
199
- * LICENSE file in the root directory of this source tree.
200
- */var AuthorityKeyIdentifierExtension=function(e){var t=e.extension,i=e.getAuthKeyIdParentLink,a=e.getAuthKeyIdSiblingsLink;var n=build.Convert.ToHex(t.value.keyIdentifier.buffer);var r=i(n);var o=a(n);return h(BasicExtension,{extension:t},h(RowValue,{name:"Key ID",value:n,monospace:true,extraValue:[r&&h("span",null," [",h("peculiar-link",{href:r},"parents"),"]"),o&&h("span",null," [",h("peculiar-link",{href:o},"siblings"),"]")]}))};
201
- /**
202
- * @license
203
- * Copyright (c) Peculiar Ventures, LLC.
204
- *
205
- * This source code is licensed under the MIT license found in the
206
- * LICENSE file in the root directory of this source tree.
207
- */var CRLDistributionPointsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(t){var i,a;return[(i=t.distributionPoint)===null||i===void 0?void 0:i.fullName.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t},e))})),(a=t.cRLIssuer)===null||a===void 0?void 0:a.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t},e))}))]})))};
208
- /**
209
- * @license
210
- * Copyright (c) Peculiar Ventures, LLC.
211
- *
212
- * This source code is licensed under the MIT license found in the
213
- * LICENSE file in the root directory of this source tree.
214
- */var InfoAccessSyntaxExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(t,i){return[h(RowValue,{name:"Description #".concat(i+1),value:""}),h(RowValue,{name:"Method",value:getStringByOID(t.accessMethod)}),h(GeneralNamePart,Object.assign({generalName:t.accessLocation},e))]})))};
215
- /**
216
- * @license
217
- * Copyright (c) Peculiar Ventures, LLC.
218
- *
219
- * This source code is licensed under the MIT license found in the
220
- * LICENSE file in the root directory of this source tree.
221
- */var SubjectAlternativeNameExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t},e))})))};
222
- /**
223
- * @license
224
- * Copyright (c) Peculiar Ventures, LLC.
225
- *
226
- * This source code is licensed under the MIT license found in the
227
- * LICENSE file in the root directory of this source tree.
228
- */var CertificatePoliciesExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){var i;return[h(RowValue,{name:"Policy #".concat(t+1),value:""}),h(RowValue,{name:"ID",value:getStringByOID(e.policyIdentifier)}),(i=e.policyQualifiers)===null||i===void 0?void 0:i.map((function(e,i){var a=[h(RowValue,{name:"Qualifier #".concat(t+1,".").concat(i+1),value:""}),h(RowValue,{name:"ID",value:getStringByOID(e.policyQualifierId)})];if(e.policyQualifierId==="1.3.6.1.5.5.7.2.1"){var n=AsnParser.parse(e.qualifier,DisplayText);a.push(h(RowValue,{name:"Value",value:n.toString()}))}if(e.policyQualifierId==="1.3.6.1.5.5.7.2.2"){var n=AsnParser.parse(e.qualifier,UserNotice);if(n.explicitText){a.push(h(RowValue,{name:"Value",value:n.explicitText.toString()}))}}return a}))]})))};
229
- /**
230
- * @license
231
- * Copyright (c) Peculiar Ventures, LLC.
232
- *
233
- * This source code is licensed under the MIT license found in the
234
- * LICENSE file in the root directory of this source tree.
235
- */var logs={"9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5":"Akamai CT","39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9":"Alpha CT",a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638:"CNNIC CT",cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900:"Certly.IO","1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4":"Cloudflare “Nimbus2017”",db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64:"Cloudflare “Nimbus2018”","747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56":"Cloudflare “Nimbus2019”","5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558":"Cloudflare “Nimbus2020”","4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8":"Cloudflare “Nimbus2021”","41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6":"Cloudflare “Nimbus2022”","7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52":"Cloudflare “Nimbus2023”","6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5":"DigiCert Nessie2018",fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c:"DigiCert Nessie2019",c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565:"DigiCert Nessie2020",eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9:"DigiCert Nessie2021","51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5":"DigiCert Nessie2022",b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a:"DigiCert Nessie2023","5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd":"DigiCert Server","8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f":"DigiCert Server 2",c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360:"DigiCert Yeti2018",e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe:"DigiCert Yeti2019",f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273:"DigiCert Yeti2020","5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca":"DigiCert Yeti2021","2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02":"DigiCert Yeti2022","35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c":"DigiCert Yeti2023","717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668":"GDCA 1","14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a":"GDCA 2",c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa:"GDCA CT #1","924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01":"GDCA CT #2",fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28:"Google “Argon2017”",a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25:"Google “Argon2018”","63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d":"Google “Argon2019”",b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e:"Google “Argon2020”",f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3:"Google “Argon2021”","2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784":"Google “Argon2022”","68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4":"Google “Aviator”",c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6:"Google “Crucible”","1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb":"Google “Daedalus”","293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478":"Google “Icarus”",a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10:"Google “Pilot”",ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb:"Google “Rocketeer”",bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185:"Google “Skydiver”","52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03":"Google “Solera2018”","0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00":"Google “Solera2019”","1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7":"Google “Solera2020”",a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7:"Google “Solera2021”","697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3":"Google “Solera2022”",a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681:"Google “Submariner”",b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77:"Google “Testtube”",b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e:"Google “Xenon2018”","084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0":"Google “Xenon2019”","07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c":"Google “Xenon2020”","7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7":"Google “Xenon2021”","46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47":"Google “Xenon2022”","7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3":"Izenpe","8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566":"Izenpe “Argi”","296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd":"Let“s Encrypt ”Clicky”","537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440":"Nordu “flimsy”",aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd:"Nordu “plausible”",e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273:"PuChuangSiDa CT",cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6:"SHECA CT 1","32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623":"SHECA CT 2",db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98:"Sectigo (Comodo) “Dodo” CT","6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913":"Sectigo (Comodo) “Mammoth” CT","5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c":"Sectigo (Comodo) “Sabre” CT","34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef":"StartCom",ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc:"Symantec",a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2:"Symantec Deneb","15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f":"Symantec “Sirius”",bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5:"Symantec “Vega”",b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b:"Up In The Air “Behind the Sofa”",ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d:"Venafi","03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b":"Venafi Gen2 CT","41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263":"WoSign","63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7":"WoSign 2","9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b":"WoSign CT #1"};
236
- /**
237
- * @license
238
- * Copyright (c) Peculiar Ventures, LLC.
239
- *
240
- * This source code is licensed under the MIT license found in the
241
- * LICENSE file in the root directory of this source tree.
242
- */var CertificateTransparencyExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.toJSON().map((function(e,t){return[h(RowValue,{name:"SCT #".concat(t+1),value:""}),h(RowValue,{name:"Version",value:e.version+1}),h(RowValue,{name:"Log Operator",value:logs[e.logId]||e.logId}),h(RowValue,{name:"Log Key ID",value:e.logId,monospace:true}),h(RowValue,{name:"Timestamp",value:dateShort(e.timestamp)}),h(RowValue,{name:"Signature Algorithm",value:"".concat(e.hashAlgorithm," ").concat(e.signatureAlgorithm).toUpperCase()}),h(RowValue,{name:"Signature",value:e.signature,monospace:true})]})))};
243
- /**
244
- * @license
245
- * Copyright (c) Peculiar Ventures, LLC.
246
- *
247
- * This source code is licensed under the MIT license found in the
248
- * LICENSE file in the root directory of this source tree.
249
- */var NameConstraintsExtension=function(e){var t,i;var a=e.extension;return h(BasicExtension,{extension:a},(t=a.value.excludedSubtrees)===null||t===void 0?void 0:t.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t.base},e))})),(i=a.value.permittedSubtrees)===null||i===void 0?void 0:i.map((function(t){return h(GeneralNamePart,Object.assign({generalName:t.base},e))})))};
250
- /**
251
- * @license
252
- * Copyright (c) Peculiar Ventures, LLC.
253
- *
254
- * This source code is licensed under the MIT license found in the
255
- * LICENSE file in the root directory of this source tree.
256
- */var CertificateTemplateExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Template ID",value:t.value.templateID}),h(RowValue,{name:"Template Major Version",value:t.value.templateMajorVersion}),h(RowValue,{name:"Template Minor Version",value:t.value.templateMinorVersion}))};
257
- /**
258
- * @license
259
- * Copyright (c) Peculiar Ventures, LLC.
260
- *
261
- * This source code is licensed under the MIT license found in the
262
- * LICENSE file in the root directory of this source tree.
263
- */var EnrollCertTypeChoiceExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Name",value:t.value.toString()}))};
264
- /**
265
- * @license
266
- * Copyright (c) Peculiar Ventures, LLC.
267
- *
268
- * This source code is licensed under the MIT license found in the
269
- * LICENSE file in the root directory of this source tree.
270
- */var CaVersionExtension=function(e){var t=e.extension;var i=t.value.getVersion();return h(BasicExtension,{extension:t},h(RowValue,{name:"Certificate Index",value:i.certificateIndex}),h(RowValue,{name:"Key Index",value:i.keyIndex}))};
271
- /**
272
- * @license
273
- * Copyright (c) Peculiar Ventures, LLC.
274
- *
275
- * This source code is licensed under the MIT license found in the
276
- * LICENSE file in the root directory of this source tree.
277
- */var QCStatementsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Statement #".concat(t+1),value:""}),h(RowValue,{name:"ID",value:getStringByOID(e.statementId)}),h(RowValue,{name:"Info",value:e.statementInfo.byteLength?build.Convert.ToHex(e.statementInfo):null,monospace:true})]})))};
278
- /**
279
- * @license
280
- * Copyright (c) Peculiar Ventures, LLC.
281
- *
282
- * This source code is licensed under the MIT license found in the
283
- * LICENSE file in the root directory of this source tree.
284
- */var NetscapeCommentExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Comment",value:t.value.value}))};
285
- /**
286
- * @license
287
- * Copyright (c) Peculiar Ventures, LLC.
288
- *
289
- * This source code is licensed under the MIT license found in the
290
- * LICENSE file in the root directory of this source tree.
291
- */var NetscapeCertTypeExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Type",value:t.value.toJSON().join(", ")}))};
292
- /**
293
- * @license
294
- * Copyright (c) Peculiar Ventures, LLC.
295
- *
296
- * This source code is licensed under the MIT license found in the
297
- * LICENSE file in the root directory of this source tree.
298
- */var LeiRoleExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Role",value:t.value.text}))};
299
- /**
300
- * @license
301
- * Copyright (c) Peculiar Ventures, LLC.
302
- *
303
- * This source code is licensed under the MIT license found in the
304
- * LICENSE file in the root directory of this source tree.
305
- */var LeiExtension=function(e){var t=e.extension,i=e.getLEILink;return h(BasicExtension,{extension:t},h(RowValue,{name:"Identifier",value:t.value.text,href:i(t.value.text)}))};
306
- /**
307
- * @license
308
- * Copyright (c) Peculiar Ventures, LLC.
309
- *
310
- * This source code is licensed under the MIT license found in the
311
- * LICENSE file in the root directory of this source tree.
312
- */var TimestampExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Version",value:t.value.version}),h(GeneralNamePart,Object.assign({generalName:t.value.location},e)),h(RowValue,{name:"Requires Auth",value:t.value.requiresAuth?"YES":"NO"}))};
313
- /**
314
- * @license
315
- * Copyright (c) Peculiar Ventures, LLC.
316
- *
317
- * This source code is licensed under the MIT license found in the
318
- * LICENSE file in the root directory of this source tree.
319
- */var ArchiveRevInfoExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Version",value:t.value.version}))};
320
- /**
321
- * @license
322
- * Copyright (c) Peculiar Ventures, LLC.
323
- *
324
- * This source code is licensed under the MIT license found in the
325
- * LICENSE file in the root directory of this source tree.
326
- */var CRLReasonExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Reason",value:t.value.toJSON()}))};
327
- /**
328
- * @license
329
- * Copyright (c) Peculiar Ventures, LLC.
330
- *
331
- * This source code is licensed under the MIT license found in the
332
- * LICENSE file in the root directory of this source tree.
333
- */function getAttributeValue(e){return build.Convert.ToString(e.values[0])}
334
- /**
335
- * @license
336
- * Copyright (c) Peculiar Ventures, LLC.
337
- *
338
- * This source code is licensed under the MIT license found in the
339
- * LICENSE file in the root directory of this source tree.
340
- */var SubjectDirectoryAttributesExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Attribute #".concat(t+1),value:""}),h(RowValue,{name:"Type",value:getStringByOID(e.type)}),h(RowValue,{name:"Value",value:getAttributeValue(e)})]})))};
341
- /**
342
- * @license
343
- * Copyright (c) Peculiar Ventures, LLC.
344
- *
345
- * This source code is licensed under the MIT license found in the
346
- * LICENSE file in the root directory of this source tree.
347
- */var AsStringExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Value",value:t.value,monospace:true}))};
348
- /**
349
- * @license
350
- * Copyright (c) Peculiar Ventures, LLC.
351
- *
352
- * This source code is licensed under the MIT license found in the
353
- * LICENSE file in the root directory of this source tree.
354
- */var PrivateKeyUsagePeriodExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Not Before",value:dateShort(t.value.notBefore)}),h(RowValue,{name:"Not After",value:dateShort(t.value.notAfter)}))};
355
- /**
356
- * @license
357
- * Copyright (c) Peculiar Ventures, LLC.
358
- *
359
- * This source code is licensed under the MIT license found in the
360
- * LICENSE file in the root directory of this source tree.
361
- */var EntrustVersionInfoExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},h(RowValue,{name:"Version",value:t.value.entrustVers}),h(RowValue,{name:"Info Flags",value:t.value.entrustInfoFlags.toJSON().join(", ")}))};
362
- /**
363
- * @license
364
- * Copyright (c) Peculiar Ventures, LLC.
365
- *
366
- * This source code is licensed under the MIT license found in the
367
- * LICENSE file in the root directory of this source tree.
368
- */var BiometricSyntaxExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Biometric #".concat(t+1),value:""}),h(RowValue,{name:"OID",value:getStringByOID(e.typeOfBiometricData.biometricDataOid)}),h(RowValue,{name:"Type",value:e.typeOfBiometricData.predefinedBiometricType}),h(RowValue,{name:"Algorithm",value:getStringByOID(e.hashAlgorithm.algorithm)}),h(RowValue,{name:"Hash",value:build.Convert.ToHex(e.biometricDataHash.buffer),monospace:true}),h(RowValue,{name:"Source Uri",value:e.sourceDataUri})]})))};
369
- /**
370
- * @license
371
- * Copyright (c) Peculiar Ventures, LLC.
372
- *
373
- * This source code is licensed under the MIT license found in the
374
- * LICENSE file in the root directory of this source tree.
375
- */var LogotypeExtension=function(e){var t=e.extension;var i=function(e){if(!e){return null}return e.map((function(e){var t=e.imageDetails;return[h(RowValue,{name:"Image Type",value:t.mediaType}),h(RowValue,{name:"Image Hash",value:build.Convert.ToHex(t.logotypeHash[0].hashValue),monospace:true}),h(RowValue,{name:"Image URL",value:t.logotypeURI[0],monospace:true,collapse:true}),h(RowValue,{name:"Image Hash Algorithm",value:getStringByOID(t.logotypeHash[0].hashAlg.algorithm)})]}))};var a=function(e){if(!e){return null}return e.map((function(e){var t=e.audioDetails;return[h(RowValue,{name:"Audio Type",value:t.mediaType}),h(RowValue,{name:"Audio Hash",value:build.Convert.ToHex(t.logotypeHash[0].hashValue),monospace:true}),h(RowValue,{name:"Audio URL",value:t.logotypeURI[0],monospace:true,collapse:true}),h(RowValue,{name:"Audio Hash Algorithm",value:getStringByOID(t.logotypeHash[0].hashAlg.algorithm)})]}))};var n=function(e,t){if(!t||!t.direct){return null}var n=t.direct,r=n.image,o=n.audio;return[h(RowValue,{name:"Type",value:e}),i(r),a(o),h("tr",null,h("td",null),h("td",null))]};return h(BasicExtension,{extension:t},n("Subject",t.value.subjectLogo),n("Issuer",t.value.issuerLogo))};
376
- /**
377
- * @license
378
- * Copyright (c) Peculiar Ventures, LLC.
379
- *
380
- * This source code is licensed under the MIT license found in the
381
- * LICENSE file in the root directory of this source tree.
382
- */var TNAuthListExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Entry #".concat(t+1),value:""}),h(RowValue,{name:"SPC",value:e.spc}),h(RowValue,{name:"Range",value:e.range?"start=".concat(e.range.start," count==").concat(e.range.count):null}),h(RowValue,{name:"One",value:e.one})]})))};
383
- /**
384
- * @license
385
- * Copyright (c) Peculiar Ventures, LLC.
386
- *
387
- * This source code is licensed under the MIT license found in the
388
- * LICENSE file in the root directory of this source tree.
389
- */var PolicyConstraintsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.requireExplicitPolicy&&h(RowValue,{name:"Require Explicit Policy",value:AsnIntegerArrayBufferConverter.toASN(t.value.requireExplicitPolicy).valueBlock.toString()}),t.value.inhibitPolicyMapping&&h(RowValue,{name:"Inhibit Policy Mapping",value:AsnIntegerArrayBufferConverter.toASN(t.value.inhibitPolicyMapping).valueBlock.toString()}))};
390
- /**
391
- * @license
392
- * Copyright (c) Peculiar Ventures, LLC.
393
- *
394
- * This source code is licensed under the MIT license found in the
395
- * LICENSE file in the root directory of this source tree.
396
- */var PolicyMappingsExtension=function(e){var t=e.extension;return h(BasicExtension,{extension:t},t.value.map((function(e,t){return[h(RowValue,{name:"Policy #".concat(t+1),value:""}),h(RowValue,{name:"Issuer Domain",value:getStringByOID(e.issuerDomainPolicy)}),h(RowValue,{name:"Subject Domain",value:getStringByOID(e.subjectDomainPolicy)})]})))};
397
- /**
398
- * @license
399
- * Copyright (c) Peculiar Ventures, LLC.
400
- *
401
- * This source code is licensed under the MIT license found in the
402
- * LICENSE file in the root directory of this source tree.
403
- */var Extensions=function(e){var t=e.extensions,i=e.title;if(!t||!t.length){return null}return[h(RowTitle,{value:i||"Extensions"}),t.map((function(t){try{if(t.value instanceof KeyUsage){return h(KeyUsageExtension,{extension:t})}if(t.value instanceof BasicConstraints){return h(BasicConstraintsExtension,{extension:t})}if(t.value instanceof ExtendedKeyUsage){return h(ExtendedKeyUsageExtension,{extension:t})}if(t.value instanceof SubjectKeyIdentifier){return h(SubjectKeyIdentifierExtension,Object.assign({extension:t},e))}if(t.value instanceof AuthorityKeyIdentifier){return h(AuthorityKeyIdentifierExtension,Object.assign({extension:t},e))}if(t.value instanceof CRLDistributionPoints){return h(CRLDistributionPointsExtension,Object.assign({extension:t},e))}if(t.value instanceof AuthorityInfoAccessSyntax||t.value instanceof SubjectInfoAccessSyntax){return h(InfoAccessSyntaxExtension,Object.assign({extension:t},e))}if(t.value instanceof SubjectAlternativeName){return h(SubjectAlternativeNameExtension,Object.assign({extension:t},e))}if(t.value instanceof CertificatePolicies){return h(CertificatePoliciesExtension,{extension:t})}if(t.value instanceof CertificateTransparency){return h(CertificateTransparencyExtension,{extension:t})}if(t.value instanceof NameConstraints){return h(NameConstraintsExtension,Object.assign({extension:t},e))}if(t.value instanceof CertificateTemplate){return h(CertificateTemplateExtension,{extension:t})}if(t.value instanceof EnrollCertTypeChoice){return h(EnrollCertTypeChoiceExtension,{extension:t})}if(t.value instanceof CaVersion){return h(CaVersionExtension,{extension:t})}if(t.value instanceof QCStatements){return h(QCStatementsExtension,{extension:t})}if(t.value instanceof NetscapeComment){return h(NetscapeCommentExtension,{extension:t})}if(t.value instanceof NetscapeCertType){return h(NetscapeCertTypeExtension,{extension:t})}if(t.value instanceof LeiRole){return h(LeiRoleExtension,{extension:t})}if(t.value instanceof LeiChoice){return h(LeiExtension,Object.assign({extension:t},e))}if(t.value instanceof Timestamp){return h(TimestampExtension,Object.assign({extension:t},e))}if(t.value instanceof ArchiveRevInfo){return h(ArchiveRevInfoExtension,{extension:t})}if(t.value instanceof CRLReason){return h(CRLReasonExtension,{extension:t})}if(t.value instanceof SubjectDirectoryAttributes){return h(SubjectDirectoryAttributesExtension,{extension:t})}if(t.value instanceof PrivateKeyUsagePeriod){return h(PrivateKeyUsagePeriodExtension,{extension:t})}if(t.value instanceof EntrustVersionInfo){return h(EntrustVersionInfoExtension,{extension:t})}if(t.value instanceof BiometricSyntax){return h(BiometricSyntaxExtension,{extension:t})}if(t.value instanceof LogotypeExtn){return h(LogotypeExtension,{extension:t})}if(t.value instanceof TNAuthorizationList){return h(TNAuthListExtension,{extension:t})}if(t.value instanceof PolicyConstraints){return h(PolicyConstraintsExtension,{extension:t})}if(t.value instanceof PolicyMappings){return h(PolicyMappingsExtension,{extension:t})}if(typeof t.value==="string"){return h(AsStringExtension,{extension:t})}return h(BasicExtension,{extension:t})}catch(e){console.error("Error render extension:",t.asn.extnID);return null}}))]};
404
- /**
405
- * @license
406
- * Copyright (c) Peculiar Ventures, LLC.
407
- *
408
- * This source code is licensed under the MIT license found in the
409
- * LICENSE file in the root directory of this source tree.
410
- */var BasicInformation=function(e){var t=e.serialNumber,i=e.version,a=e.validity,n=e.notBefore,r=e.notAfter,o=e.type;return[h(RowTitle,{value:l10n.getString("basicInformation")}),h(RowValue,{name:l10n.getString("type"),value:o}),h(RowValue,{name:l10n.getString("serialNumber"),value:t,monospace:true}),h(RowValue,{name:l10n.getString("version"),value:i}),h(RowValue,{name:l10n.getString("validity"),value:a}),h(RowValue,{name:l10n.getString("issued"),value:n?dateShort(n):undefined}),h(RowValue,{name:l10n.getString("expired"),value:r?dateShort(r):undefined})]};
411
- /**
412
- * @license
413
- * Copyright (c) Peculiar Ventures, LLC.
414
- *
415
- * This source code is licensed under the MIT license found in the
416
- * LICENSE file in the root directory of this source tree.
417
- */function downloadCertificateAsPem(e){if(e instanceof CSR){Download.pkcs10.asPEM(e.exportAsPemFormatted(),e.commonName)}else{Download.x509.asPEM(e.exportAsPemFormatted(),e.commonName)}}function downloadCertificateAsDer(e){if(e instanceof CSR){Download.pkcs10.asDER(e.exportAsHexFormatted(),e.commonName)}else{Download.x509.asDER(e.exportAsHexFormatted(),e.commonName)}}var Miscellaneous=function(e){var t=e.certificate;return[h(RowTitle,{value:l10n.getString("miscellaneous")}),h("tr",null,h("td",{class:"vertical_align_middle"},h("peculiar-typography",{color:"grey_5"},l10n.getString("download"),":")),h("td",null,h("peculiar-button-split",{onClick:downloadCertificateAsPem.bind(undefined,t),actions:[{text:l10n.getString("download.der"),onClick:downloadCertificateAsDer.bind(undefined,t)}]},l10n.getString("download.pem"))))]};
418
- /**
419
- * @license
420
- * Copyright (c) Peculiar Ventures, LLC.
421
- *
422
- * This source code is licensed under the MIT license found in the
423
- * LICENSE file in the root directory of this source tree.
424
- */var getLEILink=function(e){return"https://search.gleif.org/#/record/".concat(e)};var getDNSNameLink=function(e){return"https://search.censys.io/search?resource=hosts&q=dns.names%3A".concat(e)};var getIPAddressLink=function(e){return"https://search.censys.io/search?resource=hosts&q=ip%3A".concat(e)};
425
- /**
426
- * @license
427
- * Copyright (c) Peculiar Ventures, LLC.
428
- *
429
- * This source code is licensed under the MIT license found in the
430
- * LICENSE file in the root directory of this source tree.
431
- */var Issuer=function(e){var t=e.issuer;if(!t){return null}return[h(RowTitle,{value:l10n.getString("issuer")}),t.map((function(e){return h(GeneralNamePart,{generalName:e,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}})}))]};
432
- /**
433
- * @license
434
- * Copyright (c) Peculiar Ventures, LLC.
435
- *
436
- * This source code is licensed under the MIT license found in the
437
- * LICENSE file in the root directory of this source tree.
438
- */var Holder=function(e){var t=e.holder;if(!t){return null}var i=t.baseCertificateID,a=t.objectDigestInfo;return[h(RowTitle,{value:l10n.getString("holder")}),i&&[i.issuer.map((function(e){return h(GeneralNamePart,{generalName:e,getDNSNameLink:function(){return""},getIPAddressLink:function(){return""}})})),h("tr",null,h("td",null),h("td",null)),h(RowValue,{name:l10n.getString("serialNumber"),value:build.Convert.ToHex(i.serial),monospace:true}),h("tr",null,h("td",null),h("td",null))],a&&[h(RowValue,{name:l10n.getString("digestInfo"),value:""}),h(RowValue,{name:l10n.getString("algorithm"),value:getStringByOID(a.digestAlgorithm.algorithm)}),h(RowValue,{name:l10n.getString("value"),value:build.Convert.ToHex(a.objectDigest),monospace:true}),h(RowValue,{name:l10n.getString("type"),value:a.digestedObjectType})]]};var certificateViewerCss$2=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";var AttributeCertificateViewer=function(){function e(e){var t=this;registerInstance(this,e);this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(e){var i;return(i=t.authKeyIdParentLink)===null||i===void 0?void 0:i.replace("{{authKeyId}}",e)};this.getAuthKeyIdSiblingsLink=function(e){var i;return(i=t.authKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{authKeyId}}",e)};this.getSubjectKeyIdChildrenLink=function(e){var i;return(i=t.subjectKeyIdChildrenLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var i;return(i=t.subjectKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)}}e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate)};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:this.isDecodeInProcess=true;i.label=1;case 1:i.trys.push([1,4,,5]);if(e instanceof X509AttributeCertificate){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new X509AttributeCertificate(e)}else{return[2]}this.certificateDecoded.parseExtensions();this.certificateDecoded.parseAttributes();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:i.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:i.sent();return[3,5];case 4:t=i.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 X509AttributeCertificate&&t instanceof X509AttributeCertificate){if(e.serialNumber!==t.serialNumber){this.decodeCertificate(e)}}};e.prototype.renderErrorState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this attribute certificate."))};e.prototype.renderEmptyState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no attribute certificate available."))};e.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return h(Host,null,h("table",null,h(BasicInformation,Object.assign({},this.certificateDecoded)),h(Issuer,{issuer:this.certificateDecoded.issuer}),h(Holder,{holder:this.certificateDecoded.holder}),h(Signature,{signature:this.certificateDecoded.signature}),h(Thumbprints,{thumbprints:this.certificateDecoded.thumbprints}),h(Attributes,{attributes:this.certificateDecoded.attributes,getLEILink:getLEILink,getDNSNameLink:getDNSNameLink,getIPAddressLink:getIPAddressLink,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),h(Extensions,{extensions:this.certificateDecoded.extensions,getLEILink:getLEILink,getDNSNameLink:getDNSNameLink,getIPAddressLink:getIPAddressLink,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&h(Miscellaneous,{certificate:this.certificateDecoded})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}();AttributeCertificateViewer.style=certificateViewerCss$2;var buttonCss=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline-block;width:auto;cursor:pointer;position:relative;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;--pv-button-padding-end:5px;--pv-button-padding-start:5px}.button{font-family:"Open Sans", "Arial", sans-serif;font-family:var(--pv-font-family);font-size:13px;font-size:var(--pv-font-size-b3);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;border-style:solid;border-width:1px;font-weight:400;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;vertical-align:middle;cursor:inherit;height:30px;line-height:30px;border-radius:2px;padding:0 5px;padding:0 var(--pv-button-padding-end) 0 var(--pv-button-padding-start)}.button::-moz-focus-inner{border:0}.button:focus{outline:none;-webkit-box-shadow:0 4px 10px 0 rgba(var(--pv-color-dark-rgb), 0.1);box-shadow:0 4px 10px 0 rgba(var(--pv-color-dark-rgb), 0.1)}.button[disabled]{opacity:0.5;cursor:not-allowed}.button_stroke{border-color:rgba(53, 132, 247, 0.3);border-color:rgba(var(--pv-color-primary-rgb), 0.3);color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1);background-color:transparent}.button_fill{border-color:#3584f7;border-color:rgba(var(--pv-color-primary-rgb), 1);background-color:#3584f7;background-color:rgba(var(--pv-color-primary-rgb), 1);color:white;color:rgba(var(--pv-color-light-rgb), 1)}.button_label{-webkit-transition:opacity 200ms;transition:opacity 200ms}.button:hover .button_label{opacity:0.7}';var Button=function(){function e(e){var t=this;registerInstance(this,e);this.fill="stroke";this.handleClick=function(e){if(t.disabled){e.preventDefault();e.stopPropagation();return}if(t.onClick){t.onClick(e)}}}e.prototype.render=function(){var e=!!this.href;var t=e?"a":"button";return h(t,{class:{button:true,button_stroke:this.fill==="stroke",button_fill:this.fill==="fill",button_disabled:this.disabled},disabled:this.disabled,type:!e&&"button",href:e&&this.href,target:e&&this.target?this.target:null,rel:e&&"noreferrer noopener",onClick:this.handleClick,part:"base"},h("span",{part:"label",class:"button_label"},h("slot",null)))};return e}();Button.style=buttonCss;var buttonSplitCss=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline-block;vertical-align:top;position:relative;white-space:nowrap;font-size:0}.button_split_icon{width:7px;height:5px;display:inline-block;vertical-align:middle}.button_split_with_icon{width:25px;border-bottom-left-radius:0;border-top-left-radius:0}.button_split_with_icon.m_open::part(base):before{position:fixed;width:100%;height:100%;top:0;left:0;content:""}.button_split_action{width:100%}.button_split_container{position:absolute;bottom:calc(100% + 1px);left:0;width:100%;border-radius:2px;-webkit-box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);z-index:1}.button_split>peculiar-button:first-of-type::part(base){border-top-right-radius:0;border-bottom-right-radius:0}.button_split>peculiar-button:last-of-type::part(base){border-top-left-radius:0;border-bottom-left-radius:0}.button_split>peculiar-button:not(:first-child){margin-left:-1px}';var ButtonSplit=function(){function e(e){var t=this;registerInstance(this,e);this.fill="stroke";this.actions=[];this.open=false;this.onClickSplitButton=function(e){e.stopPropagation();t.open=!t.open}}e.prototype.onClickActiveButton=function(e,t){this.open=false;e(t)};e.prototype.renderActiveSplitState=function(){var e=this;if(!this.open){return null}return h("div",{class:"button_split_container"},this.actions.map((function(t){return h("peculiar-button",{fill:"fill",class:"button_split_action",onClick:e.onClickActiveButton.bind(e,t.onClick)},t.text)})))};e.prototype.render=function(){return h("div",{class:{button_split:true}},h("peculiar-button",{fill:this.fill,onClick:this.onClick},h("slot",null)),h("peculiar-button",{fill:this.fill,onClick:this.onClickSplitButton,class:{button_split_with_icon:true,m_open:this.open}},h("svg",{viewBox:"0 0 7 5",xmlns:"http://www.w3.org/2000/svg",class:"button_split_icon"},h("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z"}))),this.renderActiveSplitState())};return e}();ButtonSplit.style=buttonSplitCss;var certificateDecoderCss=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block;width:100%;font-size:0}.textarea{min-height:300px;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:14px;font-family:monospace;resize:vertical;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);font-size:14px;font-size:var(--pv-font-size-h7)}.controls{margin-top:10px}.button{position:relative}.button:not(:first-child){margin-left:10px}.viewer{margin-top:64px}.input_file{opacity:0;width:100%;height:100%;top:0;left:0;display:block;position:absolute}";var CertificateDecoder=function(){function e(e){var t=this;registerInstance(this,e);this.onClickDecode=function(){var e=t.inputPaste.value;if(e){t.decode(e)}};this.onClickExample=function(){t.decode(t.certificateExample)};this.onClickClear=function(){t.clearValue()};this.onChangeInputFile=function(e){return __awaiter(t,void 0,void 0,(function(){var t,i;return __generator(this,(function(a){switch(a.label){case 0:t=e.target;if(!t.files)return[3,2];return[4,readAsBinaryString(t.files[0])];case 1:i=a.sent();if(typeof i.value==="string"){this.decode(i.value)}t.value="";a.label=2;case 2:return[2]}}))}))};this.onDropFile=function(e){return __awaiter(t,void 0,void 0,(function(){var t,i;return __generator(this,(function(a){switch(a.label){case 0:e.stopPropagation();e.preventDefault();t=e.dataTransfer;if(!t.files)return[3,2];return[4,readAsBinaryString(t.files[0])];case 1:i=a.sent();if(typeof i.value==="string"){this.decode(i.value)}a.label=2;case 2:return[2]}}))}))}}e.prototype.componentDidLoad=function(){var e=this;var t=history.parseHash(window.location.search);if(t.cert){setTimeout((function(){return e.decode(t.cert)}),100)}};e.prototype.clearValue=function(){this.inputPaste.value="";this.certificateDecoded=null;history.replace({search:""})};e.prototype.setValue=function(e){this.certificateDecoded=e;this.inputPaste.value=e.exportAsPemFormatted();history.replace({search:history.queryStringify({cert:e.exportAsBase64()})})};e.prototype.decode=function(e){var t=isPem(e);var i=isX509Pem(e);var a=isPkcs10Pem(e);var n=isX509AttributePem(e);var r;var o;if(t&&!(i||n||a)){this.clearValue();alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest.");return}try{if(i){r=new X509Certificate(e)}if(n){r=new X509AttributeCertificate(e)}if(a){r=new CSR(e)}}catch(e){o=e}if(!r){try{r=new X509Certificate(e)}catch(e){o=e}}if(!r){try{r=new X509AttributeCertificate(e)}catch(e){o=e}}if(!r){try{r=new CSR(e)}catch(e){o=e}}if(!r){this.clearValue();console.log(o);alert("Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest.")}else{this.setValue(r)}};e.prototype.render=function(){var e=this;return h(Host,null,h("textarea",{placeholder:"Certificate DER or PEM",class:"textarea",ref:function(t){e.inputPaste=t},onDrop:this.onDropFile}),h("div",{class:"controls"},h("peculiar-button",{fill:"fill",class:"button",onClick:this.onClickDecode},"Decode"),h("peculiar-button",{class:"button"},"Choose file",h("input",{type:"file",class:"input_file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,.csr,.req",onChange:this.onChangeInputFile,value:""})),h("peculiar-button",{class:"button",onClick:this.onClickClear},"Clear"),this.certificateExample&&h("peculiar-button",{class:"button",onClick:this.onClickExample},"Example")),this.certificateDecoded instanceof X509Certificate&&h("peculiar-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof X509AttributeCertificate&&h("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}),this.certificateDecoded instanceof CSR&&h("peculiar-csr-viewer",{certificate:this.certificateDecoded,class:"viewer",download:true}))};return e}();CertificateDecoder.style=certificateDecoderCss;
439
- /**
440
- * @license
441
- * Copyright (c) Peculiar Ventures, LLC.
442
- *
443
- * This source code is licensed under the MIT license found in the
444
- * LICENSE file in the root directory of this source tree.
445
- */function getPublicKeyModulus(e){var t;if((t=e.params)===null||t===void 0?void 0:t["modulus"]){var i=e.params["modulus"].byteLength;if(i%2){i-=1}return i*8}return null}function getPublicKeyExponent(e){var t;if((t=e.params)===null||t===void 0?void 0:t["publicExponent"]){return e.params["publicExponent"].byteLength===3?65537:3}return null}var PublicKey=function(e){var t;var i=e.publicKey;if(!i){return null}return[h(RowTitle,{value:l10n.getString("publicKeyInfo")}),h(RowValue,{name:l10n.getString("algorithm"),value:getStringByOID(i.algorithm)}),h(RowValue,{name:l10n.getString("namedCurve"),value:getStringByOID((t=i.params)===null||t===void 0?void 0:t["namedCurve"])}),h(RowValue,{name:l10n.getString("exponent"),value:getPublicKeyExponent(i)}),h(RowValue,{name:l10n.getString("modulus"),value:getPublicKeyModulus(i)}),h(RowValue,{name:l10n.getString("value"),value:build.Convert.ToHex(i.value),monospace:true,collapse:true})]};
446
- /**
447
- * @license
448
- * Copyright (c) Peculiar Ventures, LLC.
449
- *
450
- * This source code is licensed under the MIT license found in the
451
- * LICENSE file in the root directory of this source tree.
452
- */var SubjectName=function(e){var t=e.name;return[h(RowTitle,{value:l10n.getString("subjectName")}),t.map((function(e){return h(RowValue,{name:e.name||e.type,value:e.value})}))]};
453
- /**
454
- * @license
455
- * Copyright (c) Peculiar Ventures, LLC.
456
- *
457
- * This source code is licensed under the MIT license found in the
458
- * LICENSE file in the root directory of this source tree.
459
- */var IssuerName=function(e){var t=e.name,i=e.issuerDnLink;var a=l10n.getString("issuerName");return[h(RowTitle,{value:i?h("peculiar-link",{href:i,type:"h6"},a):a}),t.map((function(e){return h(RowValue,{name:e.name||e.type,value:e.value})}))]};var certificateViewerCss$1=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";var CertificateViewer=function(){function e(e){var t=this;registerInstance(this,e);this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(e){var i;return(i=t.authKeyIdParentLink)===null||i===void 0?void 0:i.replace("{{authKeyId}}",e)};this.getAuthKeyIdSiblingsLink=function(e){var i;return(i=t.authKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{authKeyId}}",e)};this.getSubjectKeyIdChildrenLink=function(e){var i;return(i=t.subjectKeyIdChildrenLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var i;return(i=t.subjectKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)}}e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate)};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:this.isDecodeInProcess=true;i.label=1;case 1:i.trys.push([1,4,,5]);if(e instanceof X509Certificate){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new X509Certificate(e)}else{return[2]}this.certificateDecoded.parseExtensions();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:i.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:i.sent();return[3,5];case 4:t=i.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 X509Certificate&&t instanceof X509Certificate){if(e.serialNumber!==t.serialNumber){this.decodeCertificate(e)}}};e.prototype.getIssuerDnLink=function(){return this.issuerDnLink};e.prototype.renderErrorState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate."))};e.prototype.renderEmptyState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate available."))};e.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return h(Host,{"data-view":this.view},h("table",null,h(BasicInformation,Object.assign({},this.certificateDecoded)),h(SubjectName,{name:this.certificateDecoded.subject}),h(IssuerName,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),h(PublicKey,{publicKey:this.certificateDecoded.publicKey}),h(Signature,{signature:this.certificateDecoded.signature}),h(Thumbprints,{thumbprints:this.certificateDecoded.thumbprints}),h(Extensions,{extensions:this.certificateDecoded.extensions,getLEILink:getLEILink,getDNSNameLink:getDNSNameLink,getIPAddressLink:getIPAddressLink,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&h(Miscellaneous,{certificate:this.certificateDecoded})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}();CertificateViewer.style=certificateViewerCss$1;var certificateViewerCss=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";var CsrViewer=function(){function e(e){var t=this;registerInstance(this,e);this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(e){return e};this.getAuthKeyIdSiblingsLink=function(e){return e};this.getSubjectKeyIdChildrenLink=function(e){var i;return(i=t.subjectKeyIdChildrenLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)};this.getSubjectKeyIdSiblingsLink=function(e){var i;return(i=t.subjectKeyIdSiblingsLink)===null||i===void 0?void 0:i.replace("{{subjectKeyId}}",e)}}e.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate)};e.prototype.decodeCertificate=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:this.isDecodeInProcess=true;i.label=1;case 1:i.trys.push([1,4,,5]);if(e instanceof CSR){this.certificateDecoded=e}else if(typeof e==="string"){this.certificateDecoded=new CSR(e)}else{return[2]}this.certificateDecoded.parseAttributes();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:i.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:i.sent();return[3,5];case 4:t=i.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 CSR&&t instanceof CSR){if(e.commonName!==t.commonName){this.decodeCertificate(e)}}};e.prototype.renderErrorState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate request."))};e.prototype.renderEmptyState=function(){return h("div",{class:"status_wrapper"},h("peculiar-typography",{type:"b1",class:"interaction_text"},"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 h(Host,{"data-view":this.view},h("table",null,h(BasicInformation,Object.assign({},this.certificateDecoded)),h(SubjectName,{name:this.certificateDecoded.subject}),h(PublicKey,{publicKey:this.certificateDecoded.publicKey}),h(Signature,{signature:this.certificateDecoded.signature}),h(Thumbprints,{thumbprints:this.certificateDecoded.thumbprints}),h(Attributes,{attributes:this.certificateDecoded.attributes,getLEILink:getLEILink,getDNSNameLink:getDNSNameLink,getIPAddressLink:getIPAddressLink,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),h(Extensions,{extensions:e===null||e===void 0?void 0:e.value,title:"Extension Request",getLEILink:getLEILink,getDNSNameLink:getDNSNameLink,getIPAddressLink:getIPAddressLink,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&h(Miscellaneous,{certificate:this.certificateDecoded})))};Object.defineProperty(e,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return e}();CsrViewer.style=certificateViewerCss;var linkCss=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:inline-block}.link{font-family:"Open Sans", "Arial", sans-serif;font-family:var(--pv-font-family);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);line-height:1.4;line-height:var(--pv-line-height-normal);color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1);font-weight:400;margin:0;padding:0;word-break:break-all}.link_type_h4{font-size:17px;font-size:var(--pv-font-size-h4);font-weight:600}.link_type_h6{font-size:15px;font-size:var(--pv-font-size-h6);font-weight:600}.link_type_h7{font-size:14px;font-size:var(--pv-font-size-h7);font-weight:600}.link_type_b1{font-size:15px;font-size:var(--pv-font-size-b1)}.link_type_b3{font-size:13px;font-size:var(--pv-font-size-b3)}.link:hover{text-decoration:none}';var Link=function(){function e(e){registerInstance(this,e);this.type="b3"}e.prototype.render=function(){var e;return h("a",{href:this.href,target:"_blank",rel:"noreferrer noopener",class:(e={link:true},e["link_type_".concat(this.type||"b3")]=true,e)},h("slot",null))};return e}();Link.style=linkCss;var textHiderCss=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}.text{display:inline-block;width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.text.m_opened{white-space:initial}.action{vertical-align:top;display:inline-block;width:60px;text-align:right;position:relative;top:-6px}.button_action{width:30px}.expand_icon{width:7px;height:5px;display:inline-block}.m_opened .expand_icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}";var TextHider=function(){function e(e){registerInstance(this,e);this.textExpand=createEvent(this,"textExpand",7);this.opened=false}e.prototype.textExpandHandler=function(){this.opened=!this.opened};e.prototype.render=function(){return h(Host,null,h("div",{class:"root"},h("div",{class:{text:true,m_opened:this.opened}},h("slot",null)),h("div",{class:"action"},h("peculiar-button",{onClick:this.textExpand.emit,class:{button_action:true,m_opened:this.opened},fill:this.opened?"fill":"stroke"},h("svg",{viewBox:"0 0 7 5",xmlns:"http://www.w3.org/2000/svg",class:"expand_icon"},h("path",{"fill-rule":"evenodd","clip-rule":"evenodd",fill:"currentColor",d:"M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z"}))))))};return e}();TextHider.style=textHiderCss;var typographyCss=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block}.typography{font-family:"Open Sans", "Arial", sans-serif;font-family:var(--pv-font-family);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);line-height:1.4;line-height:var(--pv-line-height-normal);font-weight:400;margin:0;padding:0;display:block}.typography_type_h4{font-size:17px;font-size:var(--pv-font-size-h4);font-weight:600}.typography_type_h6{font-size:15px;font-size:var(--pv-font-size-h6);font-weight:600}.typography_type_h7{font-size:14px;font-size:var(--pv-font-size-h7);font-weight:600}.typography_type_b1{font-size:15px;font-size:var(--pv-font-size-b1)}.typography_type_b3{font-size:13px;font-size:var(--pv-font-size-b3)}.typography_color_dark{color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.typography_color_light{color:white;color:rgba(var(--pv-color-light-rgb), 1)}.typography_color_grey_3{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.typography_color_grey_5{color:#869196;color:rgba(var(--pv-color-grey_5-rgb), 1)}.typography_color_attention{color:#f7a831;color:rgba(var(--pv-color-attention-rgb), 1)}.typography_color_primary{color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1)}.typography_ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.typography_monospace{font-family:monospace}.typography_align_left{text-align:left}.typography_align_center{text-align:center}.typography_align_right{text-align:right}';var PeculiarTypography=function(){function e(e){registerInstance(this,e);this.type="b3";this.color="dark"}e.prototype.render=function(){var e;var t=this.type&&this.type.includes("h")?this.type:"p";return h(t,{class:(e={typography:true},e["typography_type_".concat(this.type||"b3")]=true,e["typography_color_".concat(this.color||"dark")]=true,e["typography_align_".concat(this.align)]=!!this.align,e.typography_ellipsis=this.ellipsis,e.typography_monospace=this.monospace,e)},h("slot",null))};return e}();PeculiarTypography.style=typographyCss;export{AttributeCertificateViewer as peculiar_attribute_certificate_viewer,Button as peculiar_button,ButtonSplit as peculiar_button_split,CertificateDecoder as peculiar_certificate_decoder,CertificateViewer as peculiar_certificate_viewer,CsrViewer as peculiar_csr_viewer,Link as peculiar_link,TextHider as peculiar_text_hider,PeculiarTypography as peculiar_typography};
@@ -1,4 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-bbd484d9.js";import{l as l10n,a as dateShort}from"./l10n-ead9928b.js";import"./_commonjsHelpers-bfbd2ad8.js";var certificateSummaryCss=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}td{border:none;padding:0}table{width:100%;border-spacing:0;border-collapse:collapse}td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td:first-child{width:130px;padding-right:10px}table td:last-child{width:calc(100% - 130px)}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{width:100%}}";var CertificateSummary=function(){function t(t){registerInstance(this,t);this.showIssuer=true}t.prototype.renderRow=function(t,r,e){return h("tr",null,h("td",null,h("peculiar-typography",{color:"grey_5"},t,":")),h("td",null,h("peculiar-typography",{class:"meta_value",monospace:e},r)))};t.prototype.render=function(){return h(Host,null,h("table",null,h("tbody",null,this.renderRow(l10n.getString("subjectName"),this.certificate.subjectToString()),this.showIssuer&&this.renderRow(l10n.getString("issuerName"),this.certificate.issuerToString()),this.renderRow(l10n.getString("serialNumber"),this.certificate.serialNumber,true),this.renderRow(l10n.getString("version"),this.certificate.version),this.renderRow(l10n.getString("validity"),this.certificate.validity),this.renderRow(l10n.getString("issued"),dateShort(this.certificate.notBefore)),this.renderRow(l10n.getString("expired"),dateShort(this.certificate.notAfter)))))};return t}();CertificateSummary.style=certificateSummaryCss;var circularProgressCss=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}@-webkit-keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}@keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}.circle_progress{margin:0 auto}.circle_progress_svg{-webkit-animation:circular-rotate 1.4s linear infinite;animation:circular-rotate 1.4s linear infinite}.circle_progress_circle{stroke-linecap:round;-webkit-animation:circular-dash 1.4s ease-in-out infinite;animation:circular-dash 1.4s ease-in-out infinite;stroke-dasharray:80, 200;stroke-dashoffset:0;stroke:#3584f7;stroke:rgba(var(--pv-color-primary-rgb), 1)}.circle_progress_backdrop{stroke:#d1d5d9;stroke:rgba(var(--pv-color-grey_3-rgb), 1)}";var CircularProgress=function(){function t(t){registerInstance(this,t);this.size=24;this.width=4;this.box=50}t.prototype.render=function(){return h(Host,null,h("div",{class:"circle_progress",style:{width:"".concat(this.size,"px"),height:"".concat(this.size,"px")}},h("svg",{class:"circle_progress_svg",viewBox:"0 0 ".concat(this.box," ").concat(this.box)},h("circle",{class:"circle_progress_backdrop",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:"".concat(this.width,"px")}}),h("circle",{class:"circle_progress_circle",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:"".concat(this.width,"px")}}))))};return t}();CircularProgress.style=circularProgressCss;var highlightWordsCss=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline}::slotted(mark){background-color:rgba(247, 168, 49, 0.4);background-color:rgba(var(--pv-color-attention-rgb), 0.4)}";var HighlightWords=function(){function t(t){registerInstance(this,t);this.tag="mark"}t.prototype.componentDidLoad=function(){this.handleHighlightSearch()};t.prototype.componentDidUpdate=function(){this.handleHighlightSearch()};t.prototype.handleHighlightSearch=function(){var t=this.resetHighlightSearch(this.host.innerHTML);var r=t;if(this.search){var e=new RegExp("(".concat(this.search,")"),"gi");r=t.replace(e,"<".concat(this.tag,">$1</").concat(this.tag,">"))}this.host.innerHTML=r};t.prototype.resetHighlightSearch=function(t){var r=new RegExp("</?".concat(this.tag,">"),"g");return t.replace(r,"")};t.prototype.render=function(){return h(Host,null,h("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();HighlightWords.style=highlightWordsCss;export{CertificateSummary as peculiar_certificate_summary,CircularProgress as peculiar_circular_progress,HighlightWords as peculiar_highlight_words};