@peculiar/certificates-viewer 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/cjs/{certification_request-878e786a.js → certification_request-cde57123.js} +137 -266
  2. package/dist/cjs/csr-78378ed0.js +150 -0
  3. package/dist/cjs/download-6724f3a7.js +79 -0
  4. package/dist/cjs/{download-5e7d5455.js → index-ff818d4d.js} +0 -72
  5. package/dist/cjs/index.cjs.js +2 -1
  6. package/dist/cjs/l10n-a048a686.js +145 -0
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/peculiar-attribute-certificate-viewer_2.cjs.entry.js +479 -0
  9. package/dist/cjs/peculiar-button_5.cjs.entry.js +148 -0
  10. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +173 -0
  11. package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +1 -1
  12. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +124 -0
  13. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +6 -4
  14. package/dist/cjs/peculiar.cjs.js +1 -1
  15. package/dist/cjs/public_key-2f5bd471.js +1104 -0
  16. package/dist/cjs/x509_attribute_certificate-cc325b70.js +87 -0
  17. package/dist/cjs/x509_certificate-51a97033.js +139 -0
  18. package/dist/collection/components/certificate-decoder/certificate-decoder.js +54 -23
  19. package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +1 -1
  20. package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +1 -1
  21. package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +1 -1
  22. package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +1 -1
  23. package/dist/collection/utils/index.js +0 -1
  24. package/dist/collection/www-copy/index.js +80 -0
  25. package/dist/esm/{certification_request-3402a181.js → certification_request-c0674647.js} +76 -205
  26. package/dist/esm/csr-c1b6a176.js +147 -0
  27. package/dist/esm/download-735fb2eb.js +76 -0
  28. package/dist/esm/{download-cf68ac2c.js → index-0ba131b0.js} +1 -71
  29. package/dist/esm/index.js +2 -1
  30. package/dist/esm/l10n-ac28fa92.js +141 -0
  31. package/dist/esm/loader.js +1 -1
  32. package/dist/esm/peculiar-attribute-certificate-viewer_2.entry.js +474 -0
  33. package/dist/esm/peculiar-button_5.entry.js +140 -0
  34. package/dist/esm/peculiar-certificate-decoder.entry.js +169 -0
  35. package/dist/esm/peculiar-certificate-summary_3.entry.js +1 -1
  36. package/dist/esm/peculiar-certificate-viewer.entry.js +120 -0
  37. package/dist/esm/peculiar-certificates-viewer.entry.js +5 -3
  38. package/dist/esm/peculiar.js +1 -1
  39. package/dist/esm/public_key-38c9ddc8.js +1089 -0
  40. package/dist/esm/x509_attribute_certificate-a6d4aa15.js +85 -0
  41. package/dist/esm/x509_certificate-12f6d344.js +137 -0
  42. package/dist/peculiar/index.esm.js +1 -1
  43. package/dist/peculiar/p-006865d7.js +4 -0
  44. package/dist/peculiar/p-17c4da7b.js +11 -0
  45. package/dist/peculiar/{p-b09a1f0b.entry.js → p-38635919.entry.js} +1 -1
  46. package/dist/peculiar/p-3f8d1008.entry.js +4 -0
  47. package/dist/peculiar/p-42da7f97.js +11 -0
  48. package/dist/peculiar/p-464e0943.js +87 -0
  49. package/dist/peculiar/p-4f4c1d30.js +12 -0
  50. package/dist/peculiar/p-6011646e.entry.js +11 -0
  51. package/dist/peculiar/p-6bfd077c.entry.js +18 -0
  52. package/dist/peculiar/p-6c510523.js +18 -0
  53. package/dist/peculiar/p-986cc770.entry.js +11 -0
  54. package/dist/peculiar/p-b765873e.js +78 -0
  55. package/dist/peculiar/p-d7a13cb4.js +18 -0
  56. package/dist/peculiar/p-dafae164.entry.js +4 -0
  57. package/dist/peculiar/peculiar.esm.js +1 -1
  58. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +13 -1
  59. package/dist/types/components.d.ts +20 -0
  60. package/dist/types/utils/index.d.ts +0 -1
  61. package/package.json +2 -3
  62. package/dist/cjs/l10n-d4a77087.js +0 -767
  63. package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +0 -2187
  64. package/dist/collection/utils/history.js +0 -19
  65. package/dist/collection/utils/parse_hash.js +0 -28
  66. package/dist/collection/utils/query_stringify.js +0 -21
  67. package/dist/esm/l10n-9ac63748.js +0 -762
  68. package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +0 -2175
  69. package/dist/peculiar/p-08538084.entry.js +0 -113
  70. package/dist/peculiar/p-3fc37750.entry.js +0 -4
  71. package/dist/peculiar/p-8ad24aa3.js +0 -87
  72. package/dist/peculiar/p-99797a49.js +0 -34
  73. package/dist/peculiar/p-c774ec0b.js +0 -18
  74. package/dist/types/utils/history.d.ts +0 -9
  75. package/dist/types/utils/parse_hash.d.ts +0 -9
  76. package/dist/types/utils/query_stringify.d.ts +0 -8
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{c as t,a as n}from"./p-d0b55fbb.js";var r=t((function(t){t.exports=function(){var t=6e4,n=36e5,r="millisecond",i="second",e="minute",s="hour",u="day",a="week",o="month",h="quarter",c="year",f="date",d="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},M=function(t,n,r){var i=String(t);return!i||i.length>=n?t:""+Array(n+1-i.length).join(r)+t},y={s:M,z:function(t){var n=-t.utcOffset(),r=Math.abs(n),i=Math.floor(r/60),e=r%60;return(n<=0?"+":"-")+M(i,2,"0")+":"+M(e,2,"0")},m:function t(n,r){if(n.date()<r.date())return-t(r,n);var i=12*(r.year()-n.year())+(r.month()-n.month()),e=n.clone().add(i,o),s=r-e<0,u=n.clone().add(i+(s?-1:1),o);return+(-(i+(r-e)/(s?e-u:u-e))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:o,y:c,w:a,d:u,D:f,h:s,m:e,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",g={};g[D]=v;var p=function(t){return t instanceof _},w=function t(n,r,i){var e;if(!n)return D;if("string"==typeof n){var s=n.toLowerCase();g[s]&&(e=s),r&&(g[s]=r,e=s);var u=n.split("-");if(!e&&u.length>1)return t(u[0])}else{var a=n.name;g[a]=n,e=a}return!i&&e&&(D=e),e||!i&&D},S=function(t,n){if(p(t))return t.clone();var r="object"==typeof n?n:{};return r.date=t,r.args=arguments,new _(r)},b=y;b.l=w,b.i=p,b.w=function(t,n){return S(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var _=function(){function v(t){this.$L=w(t.locale,null,!0),this.parse(t)}var M=v.prototype;return M.parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(b.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var i=n.match(l);if(i){var e=i[2]-1||0,s=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},M.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},M.$utils=function(){return b},M.isValid=function(){return!(this.$d.toString()===d)},M.isSame=function(t,n){var r=S(t);return this.startOf(n)<=r&&r<=this.endOf(n)},M.isAfter=function(t,n){return S(t)<this.startOf(n)},M.isBefore=function(t,n){return this.endOf(n)<S(t)},M.$g=function(t,n,r){return b.u(t)?this[n]:this.set(r,t)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(t,n){var r=this,h=!!b.u(n)||n,d=b.p(t),l=function(t,n){var i=b.w(r.$u?Date.UTC(r.$y,n,t):new Date(r.$y,n,t),r);return h?i:i.endOf(u)},m=function(t,n){return b.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(n)),r)},v=this.$W,M=this.$M,y=this.$D,D="set"+(this.$u?"UTC":"");switch(d){case c:return h?l(1,0):l(31,11);case o:return h?l(1,M):l(0,M+1);case a:var g=this.$locale().weekStart||0,p=(v<g?v+7:v)-g;return l(h?y-p:y+(6-p),M);case u:case f:return m(D+"Hours",0);case s:return m(D+"Minutes",1);case e:return m(D+"Seconds",2);case i:return m(D+"Milliseconds",3);default:return this.clone()}},M.endOf=function(t){return this.startOf(t,!1)},M.$set=function(t,n){var a,h=b.p(t),d="set"+(this.$u?"UTC":""),l=(a={},a[u]=d+"Date",a[f]=d+"Date",a[o]=d+"Month",a[c]=d+"FullYear",a[s]=d+"Hours",a[e]=d+"Minutes",a[i]=d+"Seconds",a[r]=d+"Milliseconds",a)[h],m=h===u?this.$D+(n-this.$W):n;if(h===o||h===c){var v=this.clone().set(f,1);v.$d[l](m),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else l&&this.$d[l](m);return this.init(),this},M.set=function(t,n){return this.clone().$set(t,n)},M.get=function(t){return this[b.p(t)]()},M.add=function(r,h){var f,d=this;r=Number(r);var l=b.p(h),m=function(t){var n=S(d);return b.w(n.date(n.date()+Math.round(t*r)),d)};if(l===o)return this.set(o,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===u)return m(1);if(l===a)return m(7);var v=(f={},f[e]=t,f[s]=n,f[i]=1e3,f)[l]||1,M=this.$d.getTime()+r*v;return b.w(M,this)},M.subtract=function(t,n){return this.add(-1*t,n)},M.format=function(t){var n=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var i=t||"YYYY-MM-DDTHH:mm:ssZ",e=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=r.weekdays,h=r.months,c=function(t,r,e,s){return t&&(t[r]||t(n,i))||e[r].slice(0,s)},f=function(t){return b.s(s%12||12,t,"0")},l=r.meridiem||function(t,n,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i},v={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:b.s(a+1,2,"0"),MMM:c(r.monthsShort,a,h,3),MMMM:c(h,a),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:c(r.weekdaysMin,this.$W,o,2),ddd:c(r.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:b.s(s,2,"0"),h:f(1),hh:f(2),a:l(s,u,!0),A:l(s,u,!1),m:String(u),mm:b.s(u,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:e};return i.replace(m,(function(t,n){return n||v[t]||e.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(r,f,d){var l,m=b.p(f),v=S(r),M=(v.utcOffset()-this.utcOffset())*t,y=this-v,D=b.m(this,v);return D=(l={},l[c]=D/12,l[o]=D,l[h]=D/3,l[a]=(y-M)/6048e5,l[u]=(y-M)/864e5,l[s]=y/n,l[e]=y/t,l[i]=y/1e3,l)[m]||y,d?D:b.a(D)},M.daysInMonth=function(){return this.endOf(o).$D},M.$locale=function(){return g[this.$L]},M.locale=function(t,n){if(!t)return this.$L;var r=this.clone(),i=w(t,n,!0);return i&&(r.$L=i),r},M.clone=function(){return b.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},v}(),N=_.prototype;return S.prototype=N,[["$ms",r],["$s",i],["$m",e],["$H",s],["$W",u],["$M",o],["$y",c],["$D",f]].forEach((function(t){N[t[1]]=function(n){return this.$g(n,t[0],t[1])}})),S.extend=function(t,n){return t.$i||(t(n,_,S),t.$i=!0),S},S.locale=w,S.isDayjs=p,S.unix=function(t){return S(1e3*t)},S.en=g[D],S.Ls=g,S.p={},S}()})),i=t((function(t){t.exports=function(t,n,r){t=t||{};var i=n.prototype,e={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(t,n,r,e){return i.fromToBase(t,n,r,e)}r.en.relativeTime=e,i.fromToBase=function(n,i,s,u,a){for(var o,h,c,f=s.$locale().relativeTime||e,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=d.length,m=0;m<l;m+=1){var v=d[m];v.d&&(o=u?r(n).diff(s,v.d,!0):s.diff(n,v.d,!0));var M=(t.rounding||Math.round)(Math.abs(o));if(c=o>0,M<=v.r||!v.r){M<=1&&m>0&&(v=d[m-1]);var y=f[v.l];a&&(M=a(""+M)),h="string"==typeof y?y.replace("%d",M):y(M,i,v.l,c);break}}if(i)return h;var D=c?f.future:f.past;return"function"==typeof D?D(h):D.replace("%s",h)},i.to=function(t,n){return s(t,n,this,!0)},i.from=function(t,n){return s(t,n,this)};var u=function(t){return t.$u?r.utc():r()};i.toNow=function(t){return this.to(u(this),t)},i.fromNow=function(t){return this.from(u(this),t)}}}));
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
+ */
12
+ r.extend(i);const e=t=>new Date(t).toUTCString(),s=(t,n)=>{if(!t||!n)return"";const i=r(t),e=r(n);return i.to(e,!0)},u={en:{basicInformation:"Basic Information",subjectName:"Subject Name",issuerName:"Issuer Name",publicKeyInfo:"Public Key Info",signature:"Signature",extensions:"Extensions",miscellaneous:"Miscellaneous",download:"Download","download.pem":"Download PEM","download.der":"Download DER",serialNumber:"Serial Number",version:"Version",validity:"Validity",issued:"Issued",expired:"Expired",algorithm:"Algorithm",namedCurve:"Named Curve",exponent:"Exponent",modulus:"Modulus",value:"Value",valid:"Valid",revoked:"Revoked",issuer:"Issuer",name:"Name",publicKey:"Public Key",fingerprint:"Fingerprint",fingerprints:"Fingerprints",actions:"Actions",details:"Details",testURLs:"Test URLs",certificateDetails:"Certificate Details",holder:"Holder",digestInfo:"Digest Info",type:"Type"}},a=new class{constructor(){this.setLocale=t=>{this.locale=t&&u[t]?t:"en"},this.getLocale=()=>this.locale;const t=window.navigator.language.slice(0,2).toLowerCase();this.setLocale(t)}getString(t,n){const r=u[this.locale][t];if(!r)return"";if(!n)return r;const i=r.split(n.pattern);return i.length>1?[i[0],n.replacer,i[1]]:r}};export{e as a,s as d,a as l}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{r as t,c as i,h as e,H as o}from"./p-f7683ba5.js";import{i as s,a as r,b as a,c}from"./p-464e0943.js";import"./p-4f4c1d30.js";import{X as n}from"./p-17c4da7b.js";import{X as l}from"./p-42da7f97.js";import{C as p}from"./p-6c510523.js";import"./p-006865d7.js";import"./p-d0b55fbb.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 h(t){return new Promise(((i,e)=>{const o=new FileReader;o.onload=()=>i({value:o.result,fileName:t.name,fileSize:t.size,sourceMime:t.type}),o.onerror=()=>e(o.error),o.readAsBinaryString(t)}))}const d=class{constructor(e){t(this,e),this.successParse=i(this,"successParse",7),this.clearCertificate=i(this,"clearCertificate",7),this.onClickDecode=()=>{const{value:t}=this.inputPaste;t&&this.decode(t)},this.onClickExample=()=>{this.decode(this.certificateExample)},this.onClickClear=()=>{this.clearValue()},this.onChangeInputFile=async t=>{const i=t.target;if(i.files){const t=await h(i.files[0]);"string"==typeof t.value&&this.decode(t.value),i.value=""}},this.onDropFile=async t=>{t.stopPropagation(),t.preventDefault();const i=t.dataTransfer;if(i.files){const t=await h(i.files[0]);"string"==typeof t.value&&this.decode(t.value)}}}componentDidLoad(){this.defaultCertificate&&setTimeout((()=>this.decode(this.defaultCertificate)),100)}clearValue(){this.inputPaste.value="",this.certificateDecoded=null,this.clearCertificate.emit()}setValue(t){this.certificateDecoded=t,this.inputPaste.value=t.exportAsPemFormatted(),this.successParse.emit(t.exportAsBase64())}decode(t){const i=s(t),e=r(t),o=a(t),h=c(t);let d,f;if(i&&!(e||h||o))return this.clearValue(),void alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest.");try{e&&(d=new n(t)),h&&(d=new l(t)),o&&(d=new p(t))}catch(t){f=t}if(!d)try{d=new n(t)}catch(t){f=t}if(!d)try{d=new l(t)}catch(t){f=t}if(!d)try{d=new p(t)}catch(t){f=t}d?this.setValue(d):(this.clearValue(),console.log(f),alert("Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest."))}render(){return e(o,null,e("textarea",{placeholder:"Certificate DER or PEM",class:"textarea",ref:t=>{this.inputPaste=t},onDrop:this.onDropFile}),e("div",{class:"controls"},e("peculiar-button",{fill:"fill",class:"button",onClick:this.onClickDecode},"Decode"),e("peculiar-button",{class:"button"},"Choose file",e("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:""})),e("peculiar-button",{class:"button",onClick:this.onClickClear},"Clear"),this.certificateExample&&e("peculiar-button",{class:"button",onClick:this.onClickExample},"Example")),this.certificateDecoded instanceof n&&e("peculiar-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}),this.certificateDecoded instanceof l&&e("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}),this.certificateDecoded instanceof p&&e("peculiar-csr-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}))}};d.style=":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}";export{d as peculiar_certificate_decoder}
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{h as t,r as e,H as i}from"./p-f7683ba5.js";import{O as a,P as r,y as s,W as n,I as d,T as o,V as l,U as h,t as c}from"./p-464e0943.js";import{b as p}from"./p-006865d7.js";import{l as b}from"./p-4f4c1d30.js";import{X as g}from"./p-42da7f97.js";import{g as u,R as m,G as x,a as v,B as f,S as w,T as y,b as k,c as L,d as I,E as S,M as A,e as N,P as j}from"./p-b765873e.js";import{C as _}from"./p-6c510523.js";import"./p-d0b55fbb.js";import"./p-d7a13cb4.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
+ */const K=(e,i)=>{const{attribute:a}=e;return[t(m,{name:"Name",value:u(a.asn.type)}),i,t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]},D=e=>{const{name:i}=e;return i?i.map((e=>e.map((e=>t(m,{name:a[e.type]||e.type,value:e.value.toString()}))))):null},P=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(D,{name:i.value}))},C=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Code Authority",value:""}),t(x,{generalName:i.value.codeAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Code Id",value:""}),t(x,{generalName:i.value.codeId,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Short Name",value:i.value.shortName}),t(m,{name:"Short Description",value:i.value.shortDescription}))},E=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Assessment Authority",value:""}),t(x,{generalName:i.value.assessmentAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Assessment Location",value:""}),t(x,{generalName:i.value.assessmentLocation,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Assessment Ref",value:""}),t(x,{generalName:i.value.assessmentRef,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Data Storage Territory",value:i.value.dataStorageTerritory}),t(m,{name:"Description",value:i.value.description}))},z=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:`${i.value.base} * 10^${i.value.degree} ${i.value.location}`}))},T=e=>{const{attribute:i}=e;return t(K,{attribute:i},Object.keys(i.value).map((e=>t(m,{name:e,value:i.value[e].toNumber()?"Yes":"No"}))))},V=t=>{let e=1;return t/100>1?e=100:t/10>1&&(e=10),`${t}/${5*e}`},H=e=>{const{attribute:i}=e,a=Object.keys(i.value).map((e=>[V(i.value[e]),t("br",null)]));return t(K,{attribute:i},t(m,{name:"Value",value:a}))},O=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:i.value,monospace:!0}))},$=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:i.value.utf8String}))},q=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:i.value.toString()}))},R=e=>{const{attributes:i}=e;return i&&i.length?[t(v,{value:"Attributes"}),i.map((e=>{try{return t(e.value instanceof r?P:e.value instanceof s?C:e.value instanceof n?E:e.value instanceof d?z:e.value instanceof o?T:e.value instanceof l?H:e.value instanceof h?$:e.value instanceof c?q:"string"==typeof e.value?O:K,{attribute:e})}catch(t){return console.error("Error render attribute:",e.asn.type),null}}))]:null},W=e=>{const{issuer:i}=e;return i?[t(v,{value:b.getString("issuer")}),i.map((e=>t(x,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""})))]:null},B=e=>{const{holder:i}=e;if(!i)return null;const{baseCertificateID:a,objectDigestInfo:r}=i;return[t(v,{value:b.getString("holder")}),a&&[a.issuer.map((e=>t(x,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""}))),t("tr",null,t("td",null),t("td",null)),t(m,{name:b.getString("serialNumber"),value:p.Convert.ToHex(a.serial),monospace:!0}),t("tr",null,t("td",null),t("td",null))],r&&[t(m,{name:b.getString("digestInfo"),value:""}),t(m,{name:b.getString("algorithm"),value:u(r.digestAlgorithm.algorithm)}),t(m,{name:b.getString("value"),value:p.Convert.ToHex(r.objectDigest),monospace:!0}),t(m,{name:b.getString("type"),value:r.digestedObjectType})]]},G=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var e;return null===(e=this.authKeyIdParentLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var e;return null===(e=this.authKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof g)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new g(t)}this.certificateDecoded.parseExtensions(),this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof g&&e instanceof g&&t.serialNumber!==e.serialNumber&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this attribute certificate."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no attribute certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(i,null,t("table",null,t(f,Object.assign({},this.certificateDecoded)),t(W,{issuer:this.certificateDecoded.issuer}),t(B,{holder:this.certificateDecoded.holder}),t(w,{signature:this.certificateDecoded.signature}),t(y,{thumbprints:this.certificateDecoded.thumbprints}),t(R,{attributes:this.certificateDecoded.attributes,getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(S,{extensions:this.certificateDecoded.extensions,getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(A,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};
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
+ */G.style=":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}";const M=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>t,this.getAuthKeyIdSiblingsLink=t=>t,this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof _)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new _(t)}this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof _&&e instanceof _&&t.commonName!==e.commonName&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate request."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate request available."))}getExtensionRequestAttribute(){if(this.certificateDecoded)return this.certificateDecoded.attributes.find((t=>"1.2.840.113549.1.9.14"===t.asn.type))}render(){if(this.certificateDecodeError)return this.renderErrorState();if(!this.certificateDecoded)return this.renderEmptyState();const e=this.getExtensionRequestAttribute();return t(i,{"data-view":this.view},t("table",null,t(f,Object.assign({},this.certificateDecoded)),t(N,{name:this.certificateDecoded.subject}),t(j,{publicKey:this.certificateDecoded.publicKey}),t(w,{signature:this.certificateDecoded.signature}),t(y,{thumbprints:this.certificateDecoded.thumbprints}),t(R,{attributes:this.certificateDecoded.attributes,getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(S,{extensions:null==e?void 0:e.value,title:"Extension Request",getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(A,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};M.style=":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}";export{G as peculiar_attribute_certificate_viewer,M as peculiar_csr_viewer}
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{A as s,n as t,o as a,p as e,q as r,E as i,e as h,r as n,U as c,s as o,t as u,u as b,V as m,v as l,I as p,w as g,W as E,x as k,y as f,z as A,T as x,B as C,D as I,F as R,G as T,H as d,J as w,K as y,L as F,d as N,M as j,N as q,f as K,g as S,h as v,R as B,l as H,j as P,k as U}from"./p-464e0943.js";import{b as D}from"./p-006865d7.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
+ */class G extends s{constructor(s){super(s,t);const N=this.getAsnExtnValue();switch(this.asn.type){case y:this.value=e.parse(N,F);break;case d:this.value=e.parse(N,w);break;case R:this.value=e.parse(N,T);break;case C:this.value=e.parse(N,I);break;case A:this.value=e.parse(N,x);break;case k:this.value=e.parse(N,f);break;case g:this.value=e.parse(N,E);break;case l:this.value=e.parse(N,p);break;case b:this.value=e.parse(N,m);break;case o:this.value=e.parse(N,u);break;case n:this.value=e.parse(N,c);break;case a:{const s=e.parse(N,r);this.value=s.map((s=>new i(h.serialize(s))));break}default:this.value=D.Convert.ToHex(N)}}getAsnExtnValue(){return this.asn.values[0]}}
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
+ */class Q extends s{constructor(s){super(N(s),j),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:t}=this.asn;this.subject=new q(t.subject).toJSON(),this.version=t.version}get publicKey(){const{subjectPublicKey:s,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;return t.algorithm===K&&t.parameters&&(a=h.parse(t.parameters,S)),t.algorithm===v&&(a=h.parse(s,B)),{params:a,value:h.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:t.algorithm}}get signature(){const{signature:s,signatureAlgorithm:t}=this.asn;return{value:s,algorithm:t.algorithm}}get commonName(){if(!this.subject)return"";for(let s=0;s<this.subject.length;s+=1){const t=this.subject[s];if("CN"===t.shortName||"E"===t.shortName||"O"===t.shortName)return t.value}return""}async getThumbprint(s="SHA-1"){try{const t=await H(s,this.raw);t&&(this.thumbprints[s.name||s]=D.Convert.ToHex(t))}catch(s){console.error("Error thumbprint get:",s)}}parseAttributes(){const{certificationRequestInfo:s}=this.asn;s.attributes&&(this.attributes=s.attributes.map((s=>new G(h.serialize(s)))))}exportAsBase64(){return D.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(D.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${U(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}}export{G as A,Q as C}
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{h as t,r as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-17c4da7b.js";import"./p-464e0943.js";import"./p-006865d7.js";import{l as r}from"./p-4f4c1d30.js";import{a as d,R as s,B as o,e as n,P as l,S as p,T as h,E as c,b,c as g,d as m,M as x}from"./p-b765873e.js";import"./p-d0b55fbb.js";import"./p-6c510523.js";import"./p-d7a13cb4.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
+ */const u=i=>{const{name:e,issuerDnLink:a}=i,o=r.getString("issuerName");return[t(d,{value:a?t("peculiar-link",{href:a,type:"h6"},o):o}),e.map((i=>t(s,{name:i.name||i.type,value:i.value})))]},f=class{constructor(t){i(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var i;return null===(i=this.authKeyIdParentLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var i;return null===(i=this.authKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var i;return null===(i=this.subjectKeyIdChildrenLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var i;return null===(i=this.subjectKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof a)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new a(t)}this.certificateDecoded.parseExtensions(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,i){"string"!=typeof t||"string"!=typeof i?t instanceof a&&i instanceof a&&t.serialNumber!==i.serialNumber&&this.decodeCertificate(t):t!==i&&this.decodeCertificate(t)}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(e,{"data-view":this.view},t("table",null,t(o,Object.assign({},this.certificateDecoded)),t(n,{name:this.certificateDecoded.subject}),t(u,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),t(l,{publicKey:this.certificateDecoded.publicKey}),t(p,{signature:this.certificateDecoded.signature}),t(h,{thumbprints:this.certificateDecoded.thumbprints}),t(c,{extensions:this.certificateDecoded.extensions,getLEILink:b,getDNSNameLink:g,getIPAddressLink:m,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(x,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};f.style=":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}";export{f as peculiar_certificate_viewer}
@@ -0,0 +1,78 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{h as e}from"./p-f7683ba5.js";import{b as a}from"./p-006865d7.js";import{l as n,a as c}from"./p-4f4c1d30.js";import{O as o,P as t,Q as f,p as s,S as i,X as d,Y as b,Z as r,_ as l,$ as u,a0 as m,a1 as v,a2 as g,a3 as p,a4 as x,a5 as C,a6 as h,a7 as y,a8 as N,a9 as S,aa as D,ab as A,ac as I,ad as G,ae as j,af as T,ag as O,ah as $,ai as k,aj as P,ak as V,al as L,am as R,an as E,ao as K,ap as Y,aq as H,ar as X,as as M}from"./p-464e0943.js";import{C as U}from"./p-6c510523.js";import{D as _}from"./p-d7a13cb4.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 q(e){const a=o[e];return a?`${a} (${e})`: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
+ */
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
+ */
26
+ const B=a=>{const{value:n}=a;return n?e("tr",{class:"title"},e("td",{colSpan:2},e("peculiar-typography",{type:"h6"},n))):null},w=a=>{const{name:n,value:c,monospace:o,collapse:t,href:f,extraValue:s}=a;if(!n)return null;if(null==c)return null;let i;i=t?e("peculiar-text-hider",null,c):c;const d=!!c.toString();return e("tr",null,e("td",{colSpan:d?1:2},e("peculiar-typography",{color:"grey_5"},n,d?":":"")),d&&e("td",{class:{monospace:o}},function(e){return 0===e.indexOf("http")}(c.toString())||f?e("peculiar-link",{href:f||c.toString()},c):e("peculiar-typography",{monospace:o},i,s)))},W=c=>{const{signature:o}=c;return o?[e(B,{value:n.getString("signature")}),e(w,{name:n.getString("algorithm"),value:q(o.algorithm)}),e(w,{name:n.getString("value"),value:a.Convert.ToHex(o.value),monospace:!0,collapse:!0})]:null},z={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"},F=n=>{const{generalName:c,getDNSNameLink:r,getIPAddressLink:l}=n;return c?Object.keys(c).map((n=>{const u=c[n];if(u instanceof t)return[e(w,{name:z[n]||n,value:""}),u.map((a=>a.map((a=>e(w,{name:o[a.type]||a.type,value:a.value.toString()})))))];if(u instanceof f){try{const a=s.parse(u.value,i);return e(w,{name:o[u.typeId]||u.typeId,value:a.toString()})}catch(e){}try{const a=s.parse(u.value,d);if(a.explicitText)return e(w,{name:o[u.typeId]||u.typeId,value:a.explicitText.toString()})}catch(e){}return e(w,{name:o[u.typeId]||u.typeId,value:a.Convert.ToHex(u.value),monospace:!0})}return a.BufferSourceConverter.isBufferSource(u)?e(w,{name:z[n]||n,value:a.Convert.ToString(u)}):e(w,u instanceof b?{name:z[n]||n,value:a.Convert.ToString(u.partyName)}:"dNSName"===n?{name:z[n]||n,value:u,href:r(u)}:"iPAddress"===n?{name:z[n]||n,value:u,href:l(u)}:{name:z[n]||n,value:u})})):null},Q=a=>{const{thumbprints:c}=a;if(!c)return null;const o=Object.keys(c);return o.length?[e(B,{value:n.getString("fingerprints")}),o.map((a=>e(w,{name:a,value:c[a],monospace:!0})))]:null},Z=(a,n)=>{const{extension:c}=a;return[e(w,{name:"Name",value:q(c.asn.extnID)}),e(w,{name:"Critical",value:c.asn.critical?"Yes":"No"}),n,e("tr",null,e("td",{colSpan:2,class:"divider"},e("span",{class:"bg_fill"})))]},J=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Usage",value:n.value.toJSON().join(", ")}))},ee=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Certificate Authority",value:n.value.cA?"Yes":"No"}),e(w,{name:"Path Length Constraint",value:n.value.pathLenConstraint}))},ae=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>e(w,{name:`Purpose #${n+1}`,value:q(a)}))))},ne=n=>{const{extension:c,getSubjectKeyIdChildrenLink:o,getSubjectKeyIdSiblingsLink:t}=n,f=a.Convert.ToHex(c.value.buffer),s=o(f),i=t(f);return e(Z,{extension:c},e(w,{name:"Key ID",value:f,monospace:!0,extraValue:[s&&e("span",null," [",e("peculiar-link",{href:s},"children"),"]"),i&&e("span",null," [",e("peculiar-link",{href:i},"siblings"),"]")]}))},ce=n=>{const{extension:c,getAuthKeyIdParentLink:o,getAuthKeyIdSiblingsLink:t}=n,f=a.Convert.ToHex(c.value.keyIdentifier.buffer),s=o(f),i=t(f);return e(Z,{extension:c},e(w,{name:"Key ID",value:f,monospace:!0,extraValue:[s&&e("span",null," [",e("peculiar-link",{href:s},"parents"),"]"),i&&e("span",null," [",e("peculiar-link",{href:i},"siblings"),"]")]}))},oe=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map((n=>{var c,o;return[null===(c=n.distributionPoint)||void 0===c?void 0:c.fullName.map((n=>e(F,Object.assign({generalName:n},a)))),null===(o=n.cRLIssuer)||void 0===o?void 0:o.map((n=>e(F,Object.assign({generalName:n},a))))]})))},te=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((n,c)=>[e(w,{name:`Description #${c+1}`,value:""}),e(w,{name:"Method",value:q(n.accessMethod)}),e(F,Object.assign({generalName:n.accessLocation},a))])))},fe=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map((n=>e(F,Object.assign({generalName:n},a)))))},se=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>{var c;return[e(w,{name:`Policy #${n+1}`,value:""}),e(w,{name:"ID",value:q(a.policyIdentifier)}),null===(c=a.policyQualifiers)||void 0===c?void 0:c.map(((a,c)=>{const o=[e(w,{name:`Qualifier #${n+1}.${c+1}`,value:""}),e(w,{name:"ID",value:q(a.policyQualifierId)})];if("1.3.6.1.5.5.7.2.1"===a.policyQualifierId){const n=s.parse(a.qualifier,i);o.push(e(w,{name:"Value",value:n.toString()}))}if("1.3.6.1.5.5.7.2.2"===a.policyQualifierId){const n=s.parse(a.qualifier,d);n.explicitText&&o.push(e(w,{name:"Value",value:n.explicitText.toString()}))}return o}))]})))},ie={"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"},de=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.toJSON().map(((a,n)=>[e(w,{name:`SCT #${n+1}`,value:""}),e(w,{name:"Version",value:a.version+1}),e(w,{name:"Log Operator",value:ie[a.logId]||a.logId}),e(w,{name:"Log Key ID",value:a.logId,monospace:!0}),e(w,{name:"Timestamp",value:c(a.timestamp)}),e(w,{name:"Signature Algorithm",value:`${a.hashAlgorithm} ${a.signatureAlgorithm}`.toUpperCase()}),e(w,{name:"Signature",value:a.signature,monospace:!0})])))},be=a=>{var n,c;const{extension:o}=a;return e(Z,{extension:o},null===(n=o.value.excludedSubtrees)||void 0===n?void 0:n.map((n=>e(F,Object.assign({generalName:n.base},a)))),null===(c=o.value.permittedSubtrees)||void 0===c?void 0:c.map((n=>e(F,Object.assign({generalName:n.base},a)))))},re=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Template ID",value:n.value.templateID}),e(w,{name:"Template Major Version",value:n.value.templateMajorVersion}),e(w,{name:"Template Minor Version",value:n.value.templateMinorVersion}))},le=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Name",value:n.value.toString()}))},ue=a=>{const{extension:n}=a,c=n.value.getVersion();return e(Z,{extension:n},e(w,{name:"Certificate Index",value:c.certificateIndex}),e(w,{name:"Key Index",value:c.keyIndex}))},me=n=>{const{extension:c}=n;return e(Z,{extension:c},c.value.map(((n,c)=>[e(w,{name:`Statement #${c+1}`,value:""}),e(w,{name:"ID",value:q(n.statementId)}),e(w,{name:"Info",value:n.statementInfo.byteLength?a.Convert.ToHex(n.statementInfo):null,monospace:!0})])))},ve=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Comment",value:n.value.value}))},ge=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Type",value:n.value.toJSON().join(", ")}))},pe=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Role",value:n.value.text}))},xe=a=>{const{extension:n,getLEILink:c}=a;return e(Z,{extension:n},e(w,{name:"Identifier",value:n.value.text,href:c(n.value.text)}))},Ce=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Version",value:n.value.version}),e(F,Object.assign({generalName:n.value.location},a)),e(w,{name:"Requires Auth",value:n.value.requiresAuth?"Yes":"No"}))},he=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Version",value:n.value.version}))},ye=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Reason",value:n.value.toJSON()}))};
27
+ /**
28
+ * @license
29
+ * Copyright (c) Peculiar Ventures, LLC.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */
34
+ function Ne(e){return a.Convert.ToString(e.values[0])}
35
+ /**
36
+ * @license
37
+ * Copyright (c) Peculiar Ventures, LLC.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */const Se=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Attribute #${n+1}`,value:""}),e(w,{name:"Type",value:q(a.type)}),e(w,{name:"Value",value:Ne(a)})])))},De=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Value",value:n.value,monospace:!0}))},Ae=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Not Before",value:c(n.value.notBefore)}),e(w,{name:"Not After",value:c(n.value.notAfter)}))},Ie=a=>{const{extension:n}=a;return e(Z,{extension:n},e(w,{name:"Version",value:n.value.entrustVers}),e(w,{name:"Info Flags",value:n.value.entrustInfoFlags.toJSON().join(", ")}))},Ge=n=>{const{extension:c}=n;return e(Z,{extension:c},c.value.map(((n,c)=>[e(w,{name:`Biometric #${c+1}`,value:""}),e(w,{name:"OID",value:q(n.typeOfBiometricData.biometricDataOid)}),e(w,{name:"Type",value:n.typeOfBiometricData.predefinedBiometricType}),e(w,{name:"Algorithm",value:q(n.hashAlgorithm.algorithm)}),e(w,{name:"Hash",value:a.Convert.ToHex(n.biometricDataHash.buffer),monospace:!0}),e(w,{name:"Source Uri",value:n.sourceDataUri})])))},je=n=>{const{extension:c}=n,o=n=>n?n.map((n=>{const{imageDetails:c}=n;return[e(w,{name:"Image Type",value:c.mediaType}),e(w,{name:"Image Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Image URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Image Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,t=n=>n?n.map((n=>{const{audioDetails:c}=n;return[e(w,{name:"Audio Type",value:c.mediaType}),e(w,{name:"Audio Hash",value:a.Convert.ToHex(c.logotypeHash[0].hashValue),monospace:!0}),e(w,{name:"Audio URL",value:c.logotypeURI[0],monospace:!0,collapse:!0}),e(w,{name:"Audio Hash Algorithm",value:q(c.logotypeHash[0].hashAlg.algorithm)})]})):null,f=(a,n)=>{if(!n||!n.direct)return null;const{image:c,audio:f}=n.direct;return[e(w,{name:"Type",value:a}),o(c),t(f),e("tr",null,e("td",null),e("td",null))]};return e(Z,{extension:c},f("Subject",c.value.subjectLogo),f("Issuer",c.value.issuerLogo))},Te=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Entry #${n+1}`,value:""}),e(w,{name:"SPC",value:a.spc}),e(w,{name:"Range",value:a.range?`start=${a.range.start} count==${a.range.count}`:null}),e(w,{name:"One",value:a.one})])))},Oe=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.requireExplicitPolicy&&e(w,{name:"Require Explicit Policy",value:r.toASN(n.value.requireExplicitPolicy).valueBlock.toString()}),n.value.inhibitPolicyMapping&&e(w,{name:"Inhibit Policy Mapping",value:r.toASN(n.value.inhibitPolicyMapping).valueBlock.toString()}))},$e=a=>{const{extension:n}=a;return e(Z,{extension:n},n.value.map(((a,n)=>[e(w,{name:`Policy #${n+1}`,value:""}),e(w,{name:"Issuer Domain",value:q(a.issuerDomainPolicy)}),e(w,{name:"Subject Domain",value:q(a.subjectDomainPolicy)})])))},ke=a=>{const{extensions:n,title:c}=a;return n&&n.length?[e(B,{value:c||"Extensions"}),n.map((n=>{try{return n.value instanceof l?e(J,{extension:n}):n.value instanceof u?e(ee,{extension:n}):n.value instanceof m?e(ae,{extension:n}):n.value instanceof v?e(ne,Object.assign({extension:n},a)):n.value instanceof g?e(ce,Object.assign({extension:n},a)):n.value instanceof p?e(oe,Object.assign({extension:n},a)):n.value instanceof x||n.value instanceof C?e(te,Object.assign({extension:n},a)):n.value instanceof h?e(fe,Object.assign({extension:n},a)):n.value instanceof y?e(se,{extension:n}):n.value instanceof N?e(de,{extension:n}):n.value instanceof S?e(be,Object.assign({extension:n},a)):n.value instanceof D?e(re,{extension:n}):n.value instanceof A?e(le,{extension:n}):n.value instanceof I?e(ue,{extension:n}):n.value instanceof G?e(me,{extension:n}):n.value instanceof j?e(ve,{extension:n}):n.value instanceof T?e(ge,{extension:n}):n.value instanceof O?e(pe,{extension:n}):n.value instanceof $?e(xe,Object.assign({extension:n},a)):n.value instanceof k?e(Ce,Object.assign({extension:n},a)):e(n.value instanceof P?he:n.value instanceof V?ye:n.value instanceof L?Se:n.value instanceof R?Ae:n.value instanceof E?Ie:n.value instanceof K?Ge:n.value instanceof Y?je:n.value instanceof H?Te:n.value instanceof X?Oe:n.value instanceof M?$e:"string"==typeof n.value?De:Z,{extension:n})}catch(e){return console.error("Error render extension:",n.asn.extnID),null}}))]:null},Pe=a=>{const{serialNumber:o,version:t,validity:f,notBefore:s,notAfter:i,type:d}=a;return[e(B,{value:n.getString("basicInformation")}),e(w,{name:n.getString("type"),value:d}),e(w,{name:n.getString("serialNumber"),value:o,monospace:!0}),e(w,{name:n.getString("version"),value:t}),e(w,{name:n.getString("validity"),value:f}),e(w,{name:n.getString("issued"),value:s?c(s):void 0}),e(w,{name:n.getString("expired"),value:i?c(i):void 0})]};
42
+ /**
43
+ * @license
44
+ * Copyright (c) Peculiar Ventures, LLC.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE file in the root directory of this source tree.
48
+ */
49
+ /**
50
+ * @license
51
+ * Copyright (c) Peculiar Ventures, LLC.
52
+ *
53
+ * This source code is licensed under the MIT license found in the
54
+ * LICENSE file in the root directory of this source tree.
55
+ */
56
+ function Ve(e){e instanceof U?_.pkcs10.asPEM(e.exportAsPemFormatted(),e.commonName):_.x509.asPEM(e.exportAsPemFormatted(),e.commonName)}function Le(e){e instanceof U?_.pkcs10.asDER(e.exportAsHexFormatted(),e.commonName):_.x509.asDER(e.exportAsHexFormatted(),e.commonName)}const Re=a=>{const{certificate:c}=a;return[e(B,{value:n.getString("miscellaneous")}),e("tr",null,e("td",{class:"vertical_align_middle"},e("peculiar-typography",{color:"grey_5"},n.getString("download"),":")),e("td",null,e("peculiar-button-split",{onClick:Ve.bind(void 0,c),actions:[{text:n.getString("download.der"),onClick:Le.bind(void 0,c)}]},n.getString("download.pem"))))]},Ee=e=>`https://search.gleif.org/#/record/${e}`,Ke=e=>`https://search.censys.io/search?resource=hosts&q=dns.names%3A${e}`,Ye=e=>`https://search.censys.io/search?resource=hosts&q=ip%3A${e}`
57
+ /**
58
+ * @license
59
+ * Copyright (c) Peculiar Ventures, LLC.
60
+ *
61
+ * This source code is licensed under the MIT license found in the
62
+ * LICENSE file in the root directory of this source tree.
63
+ */,He=a=>{const{name:c}=a;return[e(B,{value:n.getString("subjectName")}),c.map((a=>e(w,{name:a.name||a.type,value:a.value})))]};
64
+ /**
65
+ * @license
66
+ * Copyright (c) Peculiar Ventures, LLC.
67
+ *
68
+ * This source code is licensed under the MIT license found in the
69
+ * LICENSE file in the root directory of this source tree.
70
+ */
71
+ /**
72
+ * @license
73
+ * Copyright (c) Peculiar Ventures, LLC.
74
+ *
75
+ * This source code is licensed under the MIT license found in the
76
+ * LICENSE file in the root directory of this source tree.
77
+ */
78
+ function Xe(e){var a;if(null===(a=e.params)||void 0===a?void 0:a.modulus){let a=e.params.modulus.byteLength;return a%2&&(a-=1),8*a}return null}function Me(e){var a;return(null===(a=e.params)||void 0===a?void 0:a.publicExponent)?3===e.params.publicExponent.byteLength?65537:3:null}const Ue=c=>{var o;const{publicKey:t}=c;return t?[e(B,{value:n.getString("publicKeyInfo")}),e(w,{name:n.getString("algorithm"),value:q(t.algorithm)}),e(w,{name:n.getString("namedCurve"),value:q(null===(o=t.params)||void 0===o?void 0:o.namedCurve)}),e(w,{name:n.getString("exponent"),value:Me(t)}),e(w,{name:n.getString("modulus"),value:Xe(t)}),e(w,{name:n.getString("value"),value:a.Convert.ToHex(t.value),monospace:!0,collapse:!0})]:null};export{Pe as B,ke as E,F as G,Re as M,Ue as P,w as R,W as S,Q as T,B as a,Ee as b,Ke as c,Ye as d,He as e,q as g}
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{b as e}from"./p-006865d7.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 t(e,t,o,n="application/octet-stream"){const c=new Blob([e],{type:n});if(navigator.msSaveBlob)return navigator.msSaveBlob(c,`${t}.${o}`),new Promise((e=>setTimeout(e,100)));const a=window.URL.createObjectURL(c),i=document.createElement("a"),s=document.createElement("iframe");return i.style.display="none",s.style.display="none",s.name=a,document.body.appendChild(s),i.href=a,i.target=a,i.download=`${t}.${o}`,document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click")),document.body.removeChild(i),new Promise((e=>setTimeout((()=>{document.body.removeChild(s),e(void 0)}),100)))}
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
+ */class o{}o.x509={asPEM:(o,n)=>{t(e.Convert.FromString(o),n,"cer","application/pkix-cert")},asDER:(o,n)=>{t(e.Convert.FromString(o),n,"cer","application/pkix-cert")}},o.pkcs10={asPEM:(o,n)=>{t(e.Convert.FromString(o),n,"csr","application/pkcs10")},asDER:(o,n)=>{t(e.Convert.FromString(o),n,"csr","application/pkcs10")}};export{o as D,t as d}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ import{r as t,h as o,c as i,H as e}from"./p-f7683ba5.js";const r=class{constructor(o){t(this,o),this.fill="stroke",this.handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.onClick&&this.onClick(t)}}render(){const t=!!this.href;return o(t?"a":"button",{class:{button:!0,button_stroke:"stroke"===this.fill,button_fill:"fill"===this.fill,button_disabled:this.disabled},disabled:this.disabled,type:!t&&"button",href:t&&this.href,target:t&&this.target?this.target:null,rel:t&&"noreferrer noopener",onClick:this.handleClick,part:"base"},o("span",{part:"label",class:"button_label"},o("slot",null)))}};r.style=':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}';const n=class{constructor(o){t(this,o),this.fill="stroke",this.actions=[],this.open=!1,this.onClickSplitButton=t=>{t.stopPropagation(),this.open=!this.open}}onClickActiveButton(t,o){this.open=!1,t(o)}renderActiveSplitState(){return this.open?o("div",{class:"button_split_container"},this.actions.map((t=>o("peculiar-button",{fill:"fill",class:"button_split_action",onClick:this.onClickActiveButton.bind(this,t.onClick)},t.text)))):null}render(){return o("div",{class:{button_split:!0}},o("peculiar-button",{fill:this.fill,onClick:this.onClick},o("slot",null)),o("peculiar-button",{fill:this.fill,onClick:this.onClickSplitButton,class:{button_split_with_icon:!0,m_open:this.open}},o("svg",{viewBox:"0 0 7 5",xmlns:"http://www.w3.org/2000/svg",class:"button_split_icon"},o("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())}};n.style=':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}';const s=class{constructor(o){t(this,o),this.type="b3"}render(){return o("a",{href:this.href,target:"_blank",rel:"noreferrer noopener",class:{link:!0,[`link_type_${this.type||"b3"}`]:!0}},o("slot",null))}};s.style=':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}';const a=class{constructor(o){t(this,o),this.textExpand=i(this,"textExpand",7),this.opened=!1}textExpandHandler(){this.opened=!this.opened}render(){return o(e,null,o("div",{class:"root"},o("div",{class:{text:!0,m_opened:this.opened}},o("slot",null)),o("div",{class:"action"},o("peculiar-button",{onClick:this.textExpand.emit,class:{button_action:!0,m_opened:this.opened},fill:this.opened?"fill":"stroke"},o("svg",{viewBox:"0 0 7 5",xmlns:"http://www.w3.org/2000/svg",class:"expand_icon"},o("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"}))))))}};a.style=":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)}";const l=class{constructor(o){t(this,o),this.type="b3",this.color="dark"}render(){const t=this.type&&this.type.includes("h")?this.type:"p";return o(t,{class:{typography:!0,[`typography_type_${this.type||"b3"}`]:!0,[`typography_color_${this.color||"dark"}`]:!0,[`typography_align_${this.align}`]:!!this.align,typography_ellipsis:this.ellipsis,typography_monospace:this.monospace}},o("slot",null))}};l.style=':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}';export{r as peculiar_button,n as peculiar_button_split,s as peculiar_link,a as peculiar_text_hider,l as peculiar_typography}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-08538084",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],certificateDecoded:[32]}],[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{href:[513],type:[513]}],[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}],[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-b09a1f0b",[[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]],["p-3fc37750",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]]],e)));
4
+ import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-dafae164",[[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{href:[513],type:[513]}],[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}],[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-3f8d1008",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]],["p-6bfd077c",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}]]],["p-986cc770",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}]]],["p-6011646e",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-38635919",[[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],e)));
@@ -5,6 +5,7 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
+ import { EventEmitter } from '../../stencil-public-runtime';
8
9
  import { X509Certificate, X509AttributeCertificate, CSR } from '../../crypto';
9
10
  export declare class CertificateDecoder {
10
11
  private inputPaste?;
@@ -12,9 +13,20 @@ export declare class CertificateDecoder {
12
13
  * The example certificate value for decode and show details. Use PEM or DER.
13
14
  */
14
15
  certificateExample?: string;
16
+ /**
17
+ * The default certificate value for decode and show details. Use PEM or DER.
18
+ */
19
+ defaultCertificate?: string;
15
20
  certificateDecoded: X509Certificate | X509AttributeCertificate | CSR;
21
+ /**
22
+ * Emitted when the certificate has been successfully parsed.
23
+ */
24
+ successParse: EventEmitter<string>;
25
+ /**
26
+ * Emitted when the certificate has been removed.
27
+ */
28
+ clearCertificate: EventEmitter<void>;
16
29
  componentDidLoad(): void;
17
- private fetchAndDecodeFile;
18
30
  private onClickDecode;
19
31
  private onClickExample;
20
32
  private onClickClear;
@@ -69,6 +69,10 @@ export namespace Components {
69
69
  * The example certificate value for decode and show details. Use PEM or DER.
70
70
  */
71
71
  "certificateExample"?: string;
72
+ /**
73
+ * The default certificate value for decode and show details. Use PEM or DER.
74
+ */
75
+ "defaultCertificate"?: string;
72
76
  }
73
77
  interface PeculiarCertificateSummary {
74
78
  "certificate": X509Certificate;
@@ -193,6 +197,10 @@ export namespace Components {
193
197
  "type": 'h4' | 'h6' | 'h7' | 'b1' | 'b3';
194
198
  }
195
199
  }
200
+ export interface PeculiarCertificateDecoderCustomEvent<T> extends CustomEvent<T> {
201
+ detail: T;
202
+ target: HTMLPeculiarCertificateDecoderElement;
203
+ }
196
204
  export interface PeculiarCertificatesViewerCustomEvent<T> extends CustomEvent<T> {
197
205
  detail: T;
198
206
  target: HTMLPeculiarCertificatesViewerElement;
@@ -353,6 +361,18 @@ declare namespace LocalJSX {
353
361
  * The example certificate value for decode and show details. Use PEM or DER.
354
362
  */
355
363
  "certificateExample"?: string;
364
+ /**
365
+ * The default certificate value for decode and show details. Use PEM or DER.
366
+ */
367
+ "defaultCertificate"?: string;
368
+ /**
369
+ * Emitted when the certificate has been removed.
370
+ */
371
+ "onClearCertificate"?: (event: PeculiarCertificateDecoderCustomEvent<void>) => void;
372
+ /**
373
+ * Emitted when the certificate has been successfully parsed.
374
+ */
375
+ "onSuccessParse"?: (event: PeculiarCertificateDecoderCustomEvent<string>) => void;
356
376
  }
357
377
  interface PeculiarCertificateSummary {
358
378
  "certificate"?: X509Certificate;
@@ -1,5 +1,4 @@
1
1
  import * as validator from './validator';
2
- export { default as history } from './history';
3
2
  export * from './read_file';
4
3
  export * from './date_formatter';
5
4
  export * from './l10n';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peculiar/certificates-viewer",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "private": false,
5
5
  "description": "Peculiar Certificate Viewer web-components makes it easy for you to display certificate related details in your web application.",
6
6
  "keywords": [
@@ -58,7 +58,6 @@
58
58
  "@peculiar/asn1-x509-netscape": "^2.1.9",
59
59
  "@peculiar/asn1-x509-qualified": "^2.1.9",
60
60
  "dayjs": "^1.11.3",
61
- "history": "^4.10.1",
62
61
  "pvtsutils": "^1.3.2"
63
62
  },
64
63
  "license": "MIT",
@@ -71,5 +70,5 @@
71
70
  "publishConfig": {
72
71
  "access": "public"
73
72
  },
74
- "gitHead": "1f05b0457b2637021271db822dafbd81ebcb97d9"
73
+ "gitHead": "2e33190dcfdd66757f40f6cc20c4e90dfd12180a"
75
74
  }