performance.mark("js-parse-end:11592-55cf8e73f70e5cef.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["11592"],{12315(e,i,t){t.d(i,{h:()=>N});var s=t(74848),r=t(16522),a=t(4925),n=t(4978),o=t(83223),l=t(61398),c=t(56819),m=t(58209);function d(e){let i,t,a=(0,r.c)(42),{reason:n,isViewer:l,hasSignature:c,verificationStatus:d,signatureType:h,signedByGitHub:u,keyExpired:g,keyRevoked:_}=e,f="SshSignature"===h?"SSH":"GPG";a[0]!==g||a[1]!==_?(i=g?(0,s.jsxs)("span",{children:[" The key has expired",_&&(0,s.jsx)("span",{children:" and has been revoked"}),"."]}):_?(0,s.jsx)("span",{children:" The key has been revoked."}):(0,s.jsx)(s.Fragment,{}),a[0]=g,a[1]=_,a[2]=i):i=a[2];let x=i;if("unverified"===d)if(c&&"GPGVERIFY_UNAVAILABLE"===n){let e;return a[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"The commit signature verification service is not available"}),a[3]=e):e=a[3],e}else if(c)switch(n){case"INVALID":{let e;return a[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"The signature in this commit could not be verified. Someone may be trying to trick you."}),a[5]=e):e=a[5],e}case"MALFORMED_SIG":{let e;return a[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"We were unable to parse the signature in this commit."}),a[6]=e):e=a[6],e}case"UNKNOWN_KEY":if(l){let e;return a[7]!==f?(e=(0,s.jsxs)("span",{children:[(0,s.jsxs)(o.A,{inline:!0,href:"/settings/keys",children:["Upload your public signing ",f," key"]})," ","to verify your signature."]}),a[7]=f,a[8]=e):e=a[8],e}{let e;return a[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"This user has not yet uploaded their public signing key."}),a[9]=e):e=a[9],e}case"BAD_EMAIL":{let e;return a[10]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"The email in this signature doesn\u2019t match the committer email."}),a[10]=e):e=a[10],e}case"UNVERIFIED_EMAIL":if(l){let e;return a[11]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsxs)("span",{children:[(0,s.jsx)(o.A,{inline:!0,href:"/settings/emails",children:"Verify your email address"})," ","to verify your signature."]}),a[11]=e):e=a[11],e}{let e;return a[12]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"The committer email address is not verified."}),a[12]=e):e=a[12],e}case"NO_USER":{let e;return a[13]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"No user is associated with the committer email."}),a[13]=e):e=a[13],e}case"UNKNOWN_SIG_TYPE":{let e;return a[14]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"GitHub supports GPG and S/MIME signatures. We don't know what type of signature this is."}),a[14]=e):e=a[14],e}case"GPGVERIFY_ERROR":{let e;return a[15]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"We had a problem verifying this signature. Please try again later."}),a[15]=e):e=a[15],e}case"NOT_SIGNING_KEY":{let e;return a[16]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"The key that signed this doesn't have usage flags that allow signing."}),a[16]=e):e=a[16],e}case"EXPIRED_KEY":{let e;return a[17]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"The key that signed this is expired."}),a[17]=e):e=a[17],e}case"OCSP_ERROR":{let e;return a[18]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"We had a problem checking for revoked certificates. Please try again later."}),a[18]=e):e=a[18],e}case"OCSP_REVOKED":{let e;return a[19]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"One or more certificates in the chain has been revoked."}),a[19]=e):e=a[19],e}case"BAD_CERT":{let e;return a[20]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"The signing certificate or its chain could not be verified."}),a[20]=e):e=a[20],e}default:{let e;return a[21]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"We were unable to verify this signature."}),a[21]=e):e=a[21],e}}else{let e;return a[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"This commit is not signed, but one or more authors requires that any commit attributed to them is signed."}),a[4]=e):e=a[4],e}if("partially_verified"===d)if(u)if((0,m.kA)()){let e,i;return a[22]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{className:"text-bold",children:"verified signature"}),a[22]=e):e=a[22],a[23]!==x?(i=(0,s.jsxs)("span",{children:["This commit was created on GitHub Enterprise Server and signed with a"," ",e,".",x]}),a[23]=x,a[24]=i):i=a[24],i}else{let e,i;return a[25]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{className:"text-semibold",children:"verified signature"}),a[25]=e):e=a[25],a[26]!==x?(i=(0,s.jsxs)("span",{children:["This commit was created on GitHub.com and signed with GitHub's"," ",e,".",x]}),a[26]=x,a[27]=i):i=a[27],i}else{let e,i;return a[28]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{className:"text-semibold",children:"verified signature"}),a[28]=e):e=a[28],a[29]!==x?(i=(0,s.jsxs)("span",{children:["This commit was signed with the committer's ",e,".",x]}),a[29]=x,a[30]=i):i=a[30],i}if("verified"===d)switch(n){case"VALID":if(u)if((0,m.kA)()){let e,i;return a[31]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{className:"text-semibold",children:"verified signature"}),a[31]=e):e=a[31],a[32]!==x?(i=(0,s.jsxs)("span",{children:["This commit was created on GitHub Enterprise Server and signed with a"," ",e,".",x]}),a[32]=x,a[33]=i):i=a[33],i}else{let e,i;return a[34]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{className:"text-semibold",children:"verified signature"}),a[34]=e):e=a[34],a[35]!==x?(i=(0,s.jsxs)("span",{children:["This commit was created on GitHub.com and signed with GitHub's"," ",e,".",x]}),a[35]=x,a[36]=i):i=a[36],i}{let e,i;return a[37]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{className:"text-semibold",children:"verified signature"}),a[37]=e):e=a[37],a[38]!==x?(i=(0,s.jsxs)("span",{children:["This commit was signed with the committer's ",e,".",x]}),a[38]=x,a[39]=i):i=a[39],i}case"OCSP_PENDING":{let e;return a[40]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("span",{children:"This commit was signed with a verified signature, though we're still working on certificate revocation checking."}),a[40]=e):e=a[40],e}}return a[41]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)("span",{}),a[41]=t):t=a[41],t}d.displayName="ReasonLabel";function h(e){let i,t,a,n,o=(0,r.c)(18),{icon:l,iconColor:m,id:h,reason:u,isViewer:g,hasSignature:_,verificationStatus:f,signatureType:x,signedByGitHub:p,keyExpired:y,keyRevoked:j}=e;return o[0]!==m?(i={color:m},o[0]=m,o[1]=i):i=o[1],o[2]!==l||o[3]!==i?(t=(0,s.jsx)("div",{className:"pr-2",children:(0,s.jsx)(c.m4,{icon:l,sx:i})}),o[2]=l,o[3]=i,o[4]=t):t=o[4],o[5]!==_||o[6]!==g||o[7]!==y||o[8]!==j||o[9]!==u||o[10]!==x||o[11]!==p||o[12]!==f?(a=(0,s.jsx)("div",{className:"SignedCommitHeader-module__messageContent__E8UdA",children:(0,s.jsx)(d,{reason:u,isViewer:g,hasSignature:_,verificationStatus:f,signatureType:x,signedByGitHub:p,keyExpired:y,keyRevoked:j})}),o[5]=_,o[6]=g,o[7]=y,o[8]=j,o[9]=u,o[10]=x,o[11]=p,o[12]=f,o[13]=a):a=o[13],o[14]!==h||o[15]!==t||o[16]!==a?(n=(0,s.jsxs)("div",{id:h,"data-testid":"signed-commit-header",className:"d-flex p-2",children:[t,a]}),o[14]=h,o[15]=t,o[16]=a,o[17]=n):n=o[17],n}h.displayName="SignedCommitHeader";var u=t(38621),g=t(62935),_=t(10095),f=t(206);function x(e){let i,t=(0,r.c)(10),{keyHex:n,signatureType:l,signer:c,verifiedAt:m,showPartiallyVerifiedMessage:d,signingLinkComponent:h,keyExpired:x,keyRevoked:p}=e,y="SshSignature"===l?"SSH Key Fingerprint:":"GPG Key ID:",j="SshSignature"===l?"SSH":"GPG";return t[0]!==x||t[1]!==n||t[2]!==y||t[3]!==j||t[4]!==p||t[5]!==d||t[6]!==c||t[7]!==h||t[8]!==m?(i=(0,s.jsx)("div",{"data-testid":"signed-commit-footer",className:"d-flex",children:(0,s.jsx)("div",{className:"SignedCommitFooter-module__footerContent__wvcZE",children:d&&c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"tmp-pt-3 tmp-pb-3",children:(0,s.jsxs)("div",{className:"d-flex",children:[(0,s.jsx)(f.r,{src:c.avatar_url,size:20,className:"mr-2 tmp-ml-3"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)(o.A,{href:`/${c.login}`,className:"SignedCommitFooter-module__Link__FPvy7",children:c.login}),(0,s.jsxs)("span",{children:["'s contribution has been verified via ",j," key."]})]})]})}),(0,s.jsxs)("div",{className:"bgColor-attention-muted tmp-p-3 d-flex",children:[(0,s.jsx)(_.A,{icon:u.InfoIcon,className:"mr-2"}),"We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed."]})]}):(0,s.jsxs)(s.Fragment,{children:[c&&c.login?(0,s.jsx)("div",{"data-testid":"github-user-data",className:"tmp-pl-3 tmp-pr-3 tmp-pt-3",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.r,{src:c.avatar_url,size:20,className:"mr-2"}),(0,s.jsx)(o.A,{href:`/${c.login}`,className:"SignedCommitFooter-module__Link_1__BwwyB",children:c.login})]})}):(0,s.jsx)(s.Fragment,{}),(0,s.jsxs)("div",{className:"tmp-p-3 flex-column",children:[n&&(0,s.jsxs)("div",{children:[y," ",(0,s.jsx)("span",{className:"bgColor-muted",children:n})]}),m&&(0,s.jsxs)("div",{children:["Verified"," ",(0,s.jsx)(g.A,{datetime:m,threshold:"PT0S",year:"numeric",hour:"2-digit",minute:"2-digit"})]}),n&&(x||p)&&(0,s.jsxs)("div",{className:"pt-1 pb-1",children:[x&&(0,s.jsx)(a.A,{variant:"accent",className:"mr-1",children:"Expired"}),p&&(0,s.jsx)(a.A,{variant:"attention",children:"Revoked"})]}),h]})]})})}),t[0]=x,t[1]=n,t[2]=y,t[3]=j,t[4]=p,t[5]=d,t[6]=c,t[7]=h,t[8]=m,t[9]=i):i=t[9],i}x.displayName="SignedCommitFooter";let p="SmimeCommitFooter-module__sectionHeading__iTxmy",y="SmimeCommitFooter-module__attributeLabel__A5RcX",j="SmimeCommitFooter-module__attributeValue__kxoAk";function b(e){let i,t,a,n,o,l,c,m,d,h,u,_,f,x=(0,r.c)(30),{subject:b,issuer:v,signingLinkComponent:S,verifiedAt:N}=e;return b.organization&&b.organization_unit?_="O/OU":b.organization?_="O":b.organization_unit&&(_="OU"),v.organization&&v.organization_unit?f="O/OU":v.organization?f="O":v.organization_unit&&(f="OU"),x[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("span",{className:p,children:"Certificate subject"}),x[0]=i):i=x[0],x[1]!==b.common_name?(t=b.common_name&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:y,children:"CN"}),(0,s.jsx)("td",{className:j,children:b.common_name})]}),x[1]=b.common_name,x[2]=t):t=x[2],x[3]!==b.email_address?(a=b.email_address&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:y,children:"emailAddress"}),(0,s.jsx)("td",{className:j,children:b.email_address})]}),x[3]=b.email_address,x[4]=a):a=x[4],x[5]!==b.organization||x[6]!==b.organization_unit||x[7]!==_?(n=_&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:y,children:_}),(0,s.jsxs)("td",{children:[b.organization,"O/OU"===_&&"/",b.organization_unit]})]}),x[5]=b.organization,x[6]=b.organization_unit,x[7]=_,x[8]=n):n=x[8],x[9]!==t||x[10]!==a||x[11]!==n?(o=(0,s.jsxs)("table",{className:"mb-1",children:[t,a,n]}),x[9]=t,x[10]=a,x[11]=n,x[12]=o):o=x[12],x[13]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)("span",{className:p,children:"Certificate issuer"}),x[13]=l):l=x[13],x[14]!==v.common_name?(c=v.common_name&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:y,children:"CN"}),(0,s.jsx)("td",{children:v.common_name})]}),x[14]=v.common_name,x[15]=c):c=x[15],x[16]!==v.organization||x[17]!==v.organization_unit||x[18]!==f?(m=f&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:y,children:f}),(0,s.jsxs)("td",{children:[v.organization,"O/OU"===f&&"/",v.organization_unit]})]}),x[16]=v.organization,x[17]=v.organization_unit,x[18]=f,x[19]=m):m=x[19],x[20]!==c||x[21]!==m?(d=(0,s.jsxs)("table",{className:"mb-1",children:[c,m]}),x[20]=c,x[21]=m,x[22]=d):d=x[22],x[23]!==N?(h=N&&(0,s.jsxs)("div",{children:["Verified"," ",(0,s.jsx)(g.A,{datetime:N,threshold:"PT0S",year:"numeric",hour:"2-digit",minute:"2-digit"})]}),x[23]=N,x[24]=h):h=x[24],x[25]!==S||x[26]!==h||x[27]!==o||x[28]!==d?(u=(0,s.jsx)("div",{"data-testid":"smime-commit-footer",className:"d-flex",children:(0,s.jsxs)("div",{className:"SmimeCommitFooter-module__smimeDetailsContent__SZY5g",children:[i,o,l,d,h,S]})}),x[25]=S,x[26]=h,x[27]=o,x[28]=d,x[29]=u):u=x[29],u}b.displayName="SmimeCommitFooter";function v(e){var i;let t,a,n,c,m,d,g=(0,r.c)(34),{ariaLabel:_,hasSignature:f,isOpen:p,onDismiss:y,signature:j,verificationStatus:v}=e;g[0]!==j.helpUrl?(i=j.helpUrl,t={footerLabel:"Learn about vigilant mode",footerUrl:`${i}/github/authenticating-to-github/displaying-verification-statuses-for-all-of-your-commits`},g[0]=j.helpUrl,g[1]=t):t=g[1];let{footerLabel:S,footerUrl:N}=t;g[2]!==j.signatureVerificationReason?(a=j.signatureVerificationReason.toUpperCase(),g[2]=j.signatureVerificationReason,g[3]=a):a=g[3];let k=a,C=j.signedByGitHub;g[4]!==v?(n="unverified"===v?{icon:u.UnverifiedIcon,icon_color:"fg.muted"}:{icon:u.VerifiedIcon,icon_color:"success.fg"},g[4]=v,g[5]=n):n=g[5];let{icon:T,icon_color:w}=n;g[6]!==j.signerAvatarUrl||g[7]!==j.signerLogin||g[8]!==C||g[9]!==v?(c=void 0,"unverified"===v||C||(c={avatar_url:j.signerAvatarUrl,login:j.signerLogin}),g[6]=j.signerAvatarUrl,g[7]=j.signerLogin,g[8]=C,g[9]=v,g[10]=c):c=g[10],g[11]!==S||g[12]!==N?(m=(0,s.jsx)(o.A,{href:N,"data-testid":"signature-link",className:"Link--inTextBlock",children:S}),g[11]=S,g[12]=N,g[13]=m):m=g[13];let A=m;return g[14]!==_||g[15]!==f||g[16]!==T||g[17]!==w||g[18]!==p||g[19]!==y||g[20]!==k||g[21]!==j.isViewer||g[22]!==j.keyExpired||g[23]!==j.keyId||g[24]!==j.keyRevoked||g[25]!==j.signatureCertificateIssuer||g[26]!==j.signatureCertificateSubject||g[27]!==j.signatureType||g[28]!==j.verifiedAt||g[29]!==A||g[30]!==C||g[31]!==c||g[32]!==v?(d=p?(0,s.jsx)(l.l,{onClose:y,title:v,width:"small",renderHeader:e=>{let{dialogLabelId:i,dialogDescriptionId:t}=e;return(0,s.jsxs)("div",{"data-testid":"signed-commit-dialog",className:"SignedCommitDialog-module__dialogHeaderContainer__rrNZr",children:[(0,s.jsx)(l.l.Title,{id:i,className:"sr-only",children:_??v}),(0,s.jsx)(h,{reason:k,icon:T,iconColor:w,id:t,verificationStatus:v,isViewer:j.isViewer,hasSignature:f,signatureType:j.signatureType,signedByGitHub:C,keyExpired:j.keyExpired,keyRevoked:j.keyRevoked}),(0,s.jsx)(l.l.CloseButton,{onClose:y})]})},renderBody:()=>(0,s.jsx)(l.l.Body,{className:"p-0",children:"GpgSignature"===j.signatureType||"SshSignature"===j.signatureType?(0,s.jsx)(x,{keyHex:j.keyId,signatureType:j.signatureType,signer:c,verifiedAt:j.verifiedAt,showPartiallyVerifiedMessage:"partially_verified"===v,signingLinkComponent:A,keyExpired:j.keyExpired,keyRevoked:j.keyRevoked}):"SmimeSignature"===j.signatureType&&j.signatureCertificateSubject&&j.signatureCertificateIssuer?(0,s.jsx)(b,{issuer:j.signatureCertificateIssuer,subject:j.signatureCertificateSubject,signingLinkComponent:A,verifiedAt:j.verifiedAt}):(0,s.jsx)("div",{className:"d-flex",children:(0,s.jsx)("div",{className:"SignedCommitDialog-module__signatureLinkContent__YyQz7",children:A})})}),className:"overflow-y-auto bgColor-default "}):null,g[14]=_,g[15]=f,g[16]=T,g[17]=w,g[18]=p,g[19]=y,g[20]=k,g[21]=j.isViewer,g[22]=j.keyExpired,g[23]=j.keyId,g[24]=j.keyRevoked,g[25]=j.signatureCertificateIssuer,g[26]=j.signatureCertificateSubject,g[27]=j.signatureType,g[28]=j.verifiedAt,g[29]=A,g[30]=C,g[31]=c,g[32]=v,g[33]=d):d=g[33],d}v.displayName="SignedCommitDialog";var S=t(96540);function N(e){let i,t,a,o,l,c,m,d=(0,r.c)(20),{hasSignature:h,verificationStatus:u,signature:g,commitOid:_,badgeSize:f}=e,x=void 0===f?"small":f,[p,y]=(0,S.useState)(!1),j=(0,S.useRef)(null);if(!u||!g){let e;return d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(n.A,{"aria-label":"Verification status not available",direction:"n",noDelay:!0,children:(0,s.jsx)(C,{verificationStatus:"error",labelProps:{size:"small"}})}),d[0]=e):e=d[0],e}if("unsigned"===u){let e;return d[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(s.Fragment,{}),d[1]=e):e=d[1],e}d[2]===Symbol.for("react.memo_cache_sentinel")?(i=()=>y(!0),d[2]=i):i=d[2],d[3]===Symbol.for("react.memo_cache_sentinel")?(t={cursor:"pointer"},d[3]=t):t=d[3],d[4]!==x?(a={as:"button",onClick:i,ref:j,size:x,sx:t},d[4]=x,d[5]=a):a=d[5];let b=a;d[6]!==b?(o={...b},d[6]=b,d[7]=o):o=d[7],d[8]!==o||d[9]!==u?(l=(0,s.jsx)(C,{labelProps:o,verificationStatus:u}),d[8]=o,d[9]=u,d[10]=l):l=d[10];let N=l;return d[11]!==_||d[12]!==h||d[13]!==p||d[14]!==g||d[15]!==u?(c=p&&(0,s.jsx)(v,{isOpen:p,onDismiss:()=>{y(!1),setTimeout(()=>{j.current?.focus()},0)},verificationStatus:u,signature:g,hasSignature:h,ariaLabel:`${u.replace("_"," ")}: ${_.slice(0,7)}`}),d[11]=_,d[12]=h,d[13]=p,d[14]=g,d[15]=u,d[16]=c):c=d[16],d[17]!==c||d[18]!==N?(m=(0,s.jsxs)(s.Fragment,{children:[N,c]}),d[17]=c,d[18]=N,d[19]=m):m=d[19],m}N.displayName="SignedCommitBadge";let k={verified:{label:"Verified",variant:"success"},unverified:{label:"Unverified",variant:"attention"},partially_verified:{label:"Partially verified",variant:"success"},error:{label:"Verification error",variant:"secondary"}},C=e=>{let i,t=(0,r.c)(6),{ref:n,verificationStatus:o,labelProps:l}=e,c=k[o];if(!c){let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(s.Fragment,{}),t[0]=e):e=t[0],e}let m=c.variant;return t[1]!==c.label||t[2]!==l||t[3]!==n||t[4]!==m?(i=(0,s.jsx)(a.A,{variant:m,...l,ref:n,children:c.label}),t[1]=c.label,t[2]=l,t[3]=n,t[4]=m,t[5]=i):i=t[5],i};C.displayName="VerificationLabel"}}]); //# sourceMappingURL=11592-55cf8e73f70e5cef-9c4b54e5086f5695.js.map