티스토리 수익 글 보기
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[20876],{3585:(e,t,s)=>{s.d(t,{$:()=>k});var a=s(28278),n=s(68273),i=s(21728),o=s(30459),l=s(70263),r=s(83494),d=s(69676),c=s(45800),m=s(57478),u=s(69726),h=s(86877),f=s(99511),g=s(4175),x=s(26108),p=s(15220),b=s(59014),v=s(38621),j=s(73017),y=s(40523);let N=(0,n.GV)()?function(e){let t,s,n=(0,i.c)(5),{children:o,footerButtons:l}=e;n[0]===Symbol.for(“react.memo_cache_sentinel”)?(t={bindKeys:d.z0.ArrowHorizontal|d.z0.Tab,focusInStrategy:”closest”},n[0]=t):t=n[0];let{containerRef:r}=(0,c.G)(t);return n[1]!==o||n[2]!==l||n[3]!==r?(s=l?(0,a.jsx)(p.l.Footer,{ref:r,children:(0,a.jsxs)(“div”,{className:”d-flex flex-column”,children:[(0,a.jsx)(“div”,{className:”d-flex flex-row gap-2 flex-justify-end”,children:(0,a.jsx)(p.l.Buttons,{buttons:l})}),o]})}):null,n[1]=o,n[2]=l,n[3]=r,n[4]=s):s=n[4],s}:function({children:e,footerButtons:t}){let{containerRef:s}=(0,c.G)({bindKeys:d.z0.ArrowHorizontal|d.z0.Tab,focusInStrategy:”closest”});return t?(0,a.jsx)(p.l.Footer,{ref:s,children:(0,a.jsxs)(“div”,{className:”d-flex flex-column”,children:[(0,a.jsx)(“div”,{className:”d-flex flex-row gap-2 flex-justify-end”,children:(0,a.jsx)(p.l.Buttons,{buttons:t})}),e]})}):null},C=”CHANGE_COMMIT_MESSAGE”,w=”CHANGE_EXTENDED_DESCRIPTION”,S=”There was an error trying to commit changes”;function A(e,t){switch(t.type){case C:return{…e,commitMessage:t.payload};case w:return{…e,extendedDescription:t.payload};default:return console.error(“Unknown suggested change action.”),e}}function _(e){return 1===e.length?`Apply suggestion from @${e[0]}`:1===new Set(e).size?`Apply suggestions from @${e[0]}`:”Apply suggestions from code review”}let k=(0,n.GV)()?function(e){let t,s,n,d,c,k,R,E,O,F,D,G,L,M,$,U,P,V,z,B,H,Q=(0,i.c)(60),{authorLogins:q,batchSize:K,onClose:Y,onCommit:Z,defaultCommitMessage:W,dialogTitle:X,suggestions:J,onRemoveSuggestion:ee,onDiscardBatch:et}=e,es=(0,l.A)(),{sendAnalyticsEvent:ea}=(0,o.s)(),[en,ei]=(0,b.useState)(!1),[eo,el]=(0,b.useState)(!1),[er,ed]=(0,b.useState)();Q[0]!==q||Q[1]!==W?(t=W||_(q),Q[0]=q,Q[1]=W,Q[2]=t):t=Q[2],Q[3]!==t?(s={commitMessage:t,extendedDescription:””},Q[3]=t,Q[4]=s):s=Q[4];let[ec,em]=(0,b.useReducer)(A,s);Q[5]!==es?(n=(e,t,s)=>{let a;es()&&(a=s?S+`: ${s}`:S+”.”,ei(!1),ed(a))},Q[5]=es,Q[6]=n):n=Q[6];let eu=n;Q[7]!==er||Q[8]!==es?(d=()=>{es()&&(ei(!1),er&&ed(void 0))},Q[7]=er,Q[8]=es,Q[9]=d):d=Q[9];let eh=d;Q[10]!==K||Q[11]!==ec.commitMessage||Q[12]!==ec.extendedDescription||Q[13]!==eh||Q[14]!==eu||Q[15]!==en||Q[16]!==Z||Q[17]!==ea?(c=()=>{en||(ei(!0),ea(“comments.commit_suggestion”,”COMMIT_SUGGESTION_DIALOG_BUTTON”,{batchSize:K}),Z(`${ec.commitMessage}
${ec.extendedDescription}`,eu,eh))},Q[10]=K,Q[11]=ec.commitMessage,Q[12]=ec.extendedDescription,Q[13]=eh,Q[14]=eu,Q[15]=en,Q[16]=Z,Q[17]=ea,Q[18]=c):c=Q[18];let ef=c;Q[19]===Symbol.for(“react.memo_cache_sentinel”)?(k=()=>{el(!0)},Q[19]=k):k=Q[19];let eg=k;Q[20]!==et?(R=()=>{el(!1),et?.()},Q[20]=et,Q[21]=R):R=Q[21];let ex=R;Q[22]===Symbol.for(“react.memo_cache_sentinel”)?(E=()=>{el(!1)},Q[22]=E):E=Q[22];let ep=E,eb=K>1?”Apply suggestions”:”Apply suggestion”;Q[23]!==er||Q[24]!==ef||Q[25]!==en||Q[26]!==Y||Q[27]!==et||Q[28]!==J?(O=()=>et?(0,a.jsx)(p.l.Footer,{children:(0,a.jsxs)(“div”,{className:”d-flex flex-column width-full”,children:[(0,a.jsxs)(“div”,{className:”d-flex flex-row flex-justify-between width-full”,children:[(0,a.jsx)(p.l.Buttons,{buttons:[{content:”Discard batch”,onClick:eg,buttonType:”danger”}]}),(0,a.jsx)(“div”,{className:”d-flex flex-row gap-2″,children:(0,a.jsx)(p.l.Buttons,{buttons:[{content:”Cancel”,onClick:Y},{content:(0,a.jsxs)(“span”,{className:”d-flex flex-row flex-items-center”,children:[“Apply suggestions”,J&&(0,a.jsx)(m.A,{className:”ml-1 color-fg-inherit”,children:J.length}),en&&(0,a.jsx)(u.A,{size:”small”,className:”ml-1″})]}),onClick:ef,buttonType:”primary”}]})})]}),er&&(0,a.jsx)(h.A.Validation,{variant:”error”,className:”mt-2 pt-1 flex-justify-end”,children:er})]})}):(0,a.jsx)(N,{footerButtons:[{content:”Cancel”,onClick:Y},{content:(0,a.jsxs)(“span”,{className:”d-flex flex-row flex-items-center”,children:[“Apply Suggestion”,en&&(0,a.jsx)(u.A,{size:”small”,className:”ml-1″})]}),onClick:ef,buttonType:”primary”}],children:er&&(0,a.jsx)(h.A.Validation,{variant:”error”,className:”mt-2 pt-1 flex-justify-end”,children:er})}),Q[23]=er,Q[24]=ef,Q[25]=en,Q[26]=Y,Q[27]=et,Q[28]=J,Q[29]=O):O=Q[29];let ev=O;Q[30]!==ef?(F={“github:submit-form”:ef},Q[30]=ef,Q[31]=F):F=Q[31];let ej=X||eb;Q[32]===Symbol.for(“react.memo_cache_sentinel”)?(D=(0,a.jsx)(h.A.Label,{required:!0,children:”Commit message”}),Q[32]=D):D=Q[32],Q[33]===Symbol.for(“react.memo_cache_sentinel”)?(G=e=>em({type:C,payload:e.target.value}),Q[33]=G):G=Q[33],Q[34]!==ec.commitMessage?(L=(0,a.jsxs)(h.A,{className:”mb-2″,children:[D,(0,a.jsx)(f.A,{block:!0,name:”commit_message”,onChange:G,value:ec.commitMessage})]}),Q[34]=ec.commitMessage,Q[35]=L):L=Q[35],Q[36]===Symbol.for(“react.memo_cache_sentinel”)?(M=(0,a.jsx)(h.A.Label,{children:”Extended description”}),Q[36]=M):M=Q[36],Q[37]===Symbol.for(“react.memo_cache_sentinel”)?($=e=>em({type:w,payload:e.target.value}),Q[37]=$):$=Q[37],Q[38]!==ec.extendedDescription?(U=(0,a.jsxs)(h.A,{children:[M,(0,a.jsx)(g.Ay,{block:!0,rows:3,placeholder:”Add an optional description…”,onChange:$,value:ec.extendedDescription})]}),Q[38]=ec.extendedDescription,Q[39]=U):U=Q[39],Q[40]!==ee||Q[41]!==J?(P=J&&J.length>0&&(0,a.jsxs)(“div”,{className:”mb-3 mt-3″,children:[(0,a.jsxs)(“p”,{className:”f6 text-bold mb-2″,children:[“Suggestions to apply “,(0,a.jsx)(m.A,{children:J.length})]}),(0,a.jsx)(“div”,{style:{maxHeight:”200px”,overflowY:”auto”},children:J.map(e=>(0,a.jsxs)(“div”,{className:”border rounded-2 mb-2″,children:[(0,a.jsxs)(“div”,{className:”d-flex flex-items-center flex-justify-between p-2″,style:{transition:”background-color 0.1s”},onMouseEnter:T,onMouseLeave:I,children:[(0,a.jsx)(v.FileIcon,{className:”mr-2″,size:16}),(0,a.jsx)(“span”,{className:”flex-1 text-mono f6″,style:{overflow:”hidden”,textOverflow:”ellipsis”,whiteSpace:”nowrap”},children:e.path}),ee&&(0,a.jsx)(x.K,{“aria-label”:`Remove suggestion from ${e.path}`,icon:v.XIcon,size:”small”,variant:”invisible”,onClick:()=>ee({commentDatabaseId:e.commentDatabaseId,suggestionIndex:e.suggestionIndex})})]}),(0,a.jsx)(“div”,{className:”p-2″,children:(0,a.jsx)(j.vb,{className:”markdown-body”,”comment-testid”:”Comment body html for comment”,html:e.bodyHTML})})]},e.commentDatabaseId))})]}),Q[40]=ee,Q[41]=J,Q[42]=P):P=Q[42],Q[43]!==Y||Q[44]!==ev||Q[45]!==ej||Q[46]!==L||Q[47]!==U||Q[48]!==P?(V=(0,a.jsxs)(p.l,{title:ej,renderFooter:ev,onClose:Y,children:[L,U,P]}),Q[43]=Y,Q[44]=ev,Q[45]=ej,Q[46]=L,Q[47]=U,Q[48]=P,Q[49]=V):V=Q[49],Q[50]!==F||Q[51]!==V?(z=(0,a.jsx)(r.tL,{commands:F,children:V}),Q[50]=F,Q[51]=V,Q[52]=z):z=Q[52];let ey=J?.length||K;return Q[53]!==ex||Q[54]!==eo||Q[55]!==ey?(B=(0,a.jsx)(y.G,{isOpen:eo,onConfirm:ex,onCancel:ep,suggestionsCount:ey}),Q[53]=ex,Q[54]=eo,Q[55]=ey,Q[56]=B):B=Q[56],Q[57]!==z||Q[58]!==B?(H=(0,a.jsxs)(a.Fragment,{children:[z,B]}),Q[57]=z,Q[58]=B,Q[59]=H):H=Q[59],H}:function({authorLogins:e,batchSize:t,onClose:s,onCommit:n,defaultCommitMessage:i,dialogTitle:d,suggestions:c,onRemoveSuggestion:k,onDiscardBatch:I}){let T=(0,l.A)(),{sendAnalyticsEvent:R}=(0,o.s)(),[E,O]=(0,b.useState)(!1),[F,D]=(0,b.useState)(!1),[G,L]=(0,b.useState)(),[M,$]=(0,b.useReducer)(A,{commitMessage:i||_(e),extendedDescription:””}),U=(0,b.useCallback)((e,t,s)=>{if(!T())return;let a=S;s?a+=`: ${s}`:a+=”.”,O(!1),L(a)},[T]),P=(0,b.useCallback)(()=>{T()&&(O(!1),G&&L(void 0))},[G,T]),V=(0,b.useCallback)(()=>{E||(O(!0),R(“comments.commit_suggestion”,”COMMIT_SUGGESTION_DIALOG_BUTTON”,{batchSize:t}),n(`${M.commitMessage}
${M.extendedDescription}`,U,P))},[t,M.commitMessage,M.extendedDescription,P,U,E,n,R]),z=(0,b.useCallback)(()=>{D(!0)},[]),B=(0,b.useCallback)(()=>{D(!1),I?.()},[I]),H=(0,b.useCallback)(()=>{D(!1)},[]),Q=t>1?”Apply suggestions”:”Apply suggestion”;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.tL,{commands:{“github:submit-form”:V},children:(0,a.jsxs)(p.l,{title:d||Q,renderFooter:()=>I?(0,a.jsx)(p.l.Footer,{children:(0,a.jsxs)(“div”,{className:”d-flex flex-column width-full”,children:[(0,a.jsxs)(“div”,{className:”d-flex flex-row flex-justify-between width-full”,children:[(0,a.jsx)(p.l.Buttons,{buttons:[{content:”Discard batch”,onClick:z,buttonType:”danger”}]}),(0,a.jsx)(“div”,{className:”d-flex flex-row gap-2″,children:(0,a.jsx)(p.l.Buttons,{buttons:[{content:”Cancel”,onClick:s},{content:(0,a.jsxs)(“span”,{className:”d-flex flex-row flex-items-center”,children:[“Apply suggestions”,c&&(0,a.jsx)(m.A,{className:”ml-1 color-fg-inherit”,children:c.length}),E&&(0,a.jsx)(u.A,{size:”small”,className:”ml-1″})]}),onClick:V,buttonType:”primary”}]})})]}),G&&(0,a.jsx)(h.A.Validation,{variant:”error”,className:”mt-2 pt-1 flex-justify-end”,children:G})]})}):(0,a.jsx)(N,{footerButtons:[{content:”Cancel”,onClick:s},{content:(0,a.jsxs)(“span”,{className:”d-flex flex-row flex-items-center”,children:[“Apply Suggestion”,E&&(0,a.jsx)(u.A,{size:”small”,className:”ml-1″})]}),onClick:V,buttonType:”primary”}],children:G&&(0,a.jsx)(h.A.Validation,{variant:”error”,className:”mt-2 pt-1 flex-justify-end”,children:G})}),onClose:s,children:[(0,a.jsxs)(h.A,{className:”mb-2″,children:[(0,a.jsx)(h.A.Label,{required:!0,children:”Commit message”}),(0,a.jsx)(f.A,{block:!0,name:”commit_message”,onChange:e=>$({type:C,payload:e.target.value}),value:M.commitMessage})]}),(0,a.jsxs)(h.A,{children:[(0,a.jsx)(h.A.Label,{children:”Extended description”}),(0,a.jsx)(g.Ay,{block:!0,rows:3,placeholder:”Add an optional description…”,onChange:e=>$({type:w,payload:e.target.value}),value:M.extendedDescription})]}),c&&c.length>0&&(0,a.jsxs)(“div”,{className:”mb-3 mt-3″,children:[(0,a.jsxs)(“p”,{className:”f6 text-bold mb-2″,children:[“Suggestions to apply “,(0,a.jsx)(m.A,{children:c.length})]}),(0,a.jsx)(“div”,{style:{maxHeight:”200px”,overflowY:”auto”},children:c.map(e=>(0,a.jsxs)(“div”,{className:”border rounded-2 mb-2″,children:[(0,a.jsxs)(“div”,{className:”d-flex flex-items-center flex-justify-between p-2″,style:{transition:”background-color 0.1s”},onMouseEnter:e=>e.currentTarget.style.backgroundColor=”var(–bgColor-muted, #f6f8fa)”,onMouseLeave:e=>e.currentTarget.style.backgroundColor=”transparent”,children:[(0,a.jsx)(v.FileIcon,{className:”mr-2″,size:16}),(0,a.jsx)(“span”,{className:”flex-1 text-mono f6″,style:{overflow:”hidden”,textOverflow:”ellipsis”,whiteSpace:”nowrap”},children:e.path}),k&&(0,a.jsx)(x.K,{“aria-label”:`Remove suggestion from ${e.path}`,icon:v.XIcon,size:”small”,variant:”invisible”,onClick:()=>k({commentDatabaseId:e.commentDatabaseId,suggestionIndex:e.suggestionIndex})})]}),(0,a.jsx)(“div”,{className:”p-2″,children:(0,a.jsx)(j.vb,{className:”markdown-body”,”comment-testid”:”Comment body html for comment”,html:e.bodyHTML})})]},e.commentDatabaseId))})]})]})}),(0,a.jsx)(y.G,{isOpen:F,onConfirm:B,onCancel:H,suggestionsCount:c?.length||t})]})};function I(e){return e.currentTarget.style.backgroundColor=”transparent”}function T(e){return e.currentTarget.style.backgroundColor=”var(–bgColor-muted, #f6f8fa)”}try{N.displayName||(N.displayName=”DialogFooter”)}catch{}try{k.displayName||(k.displayName=”ApplySuggestionDialog”)}catch{}},8748:(e,t,s)=>{s.d(t,{u:()=>o});var a=s(68273),n=s(21728),i=s(59014);let o=(0,a.GV)()?function(e){let t,s,a=(0,n.c)(6),{isAnchorable:o,commentId:l,commentAnchor:r,containerRef:d}=e;a[0]!==r||a[1]!==l||a[2]!==d||a[3]!==o?(t=()=>{o&&l&&r&&window.location.hash.split(“#”).pop()===r&&d.current?.focus()},s=[r,l,o,d],a[0]=r,a[1]=l,a[2]=d,a[3]=o,a[4]=t,a[5]=s):(t=a[4],s=a[5]),(0,i.useEffect)(t,s)}:function({isAnchorable:e,commentId:t,commentAnchor:s,containerRef:a}){(0,i.useEffect)(()=>{e&&t&&s&&window.location.hash.split(“#”).pop()===s&&a.current?.focus()},[s,t,e,a])}},40523:(e,t,s)=>{s.d(t,{G:()=>l});var a=s(28278),n=s(68273),i=s(21728),o=s(15220);let l=(0,n.GV)()?function(e){let t,s,n,l,r,d,c,m,u=(0,i.c)(19),{isOpen:h,onConfirm:f,onCancel:g,suggestionsCount:x}=e;if(!h)return null;u[0]!==g?(t={content:”Cancel”,onClick:g},u[0]=g,u[1]=t):t=u[1],u[2]!==f?(s={content:”Discard”,buttonType:”danger”,onClick:f},u[2]=f,u[3]=s):s=u[3],u[4]!==t||u[5]!==s?(n=[t,s],u[4]=t,u[5]=s,u[6]=n):n=u[6],u[7]!==x?(l=(0,a.jsxs)(“span”,{children:[“Are you sure you want to discard this batch? This will remove all “,x,” “]}),u[7]=x,u[8]=l):l=u[8];let p=1===x?”suggestion”:”suggestions”;return u[9]!==p?(r=(0,a.jsx)(“span”,{children:p}),u[9]=p,u[10]=r):r=u[10],u[11]===Symbol.for(“react.memo_cache_sentinel”)?(d=(0,a.jsx)(“span”,{children:” from the batch.”}),u[11]=d):d=u[11],u[12]!==l||u[13]!==r?(c=(0,a.jsxs)(“p”,{children:[l,r,d]}),u[12]=l,u[13]=r,u[14]=c):c=u[14],u[15]!==g||u[16]!==n||u[17]!==c?(m=(0,a.jsx)(o.l,{title:”Discard batch?”,onClose:g,footerButtons:n,width:”medium”,children:c}),u[15]=g,u[16]=n,u[17]=c,u[18]=m):m=u[18],m}:function({isOpen:e,onConfirm:t,onCancel:s,suggestionsCount:n}){return e?(0,a.jsx)(o.l,{title:”Discard batch?”,onClose:s,footerButtons:[{content:”Cancel”,onClick:s},{content:”Discard”,buttonType:”danger”,onClick:t}],width:”medium”,children:(0,a.jsxs)(“p”,{children:[(0,a.jsxs)(“span”,{children:[“Are you sure you want to discard this batch? This will remove all “,n,” “]}),(0,a.jsx)(“span”,{children:1===n?”suggestion”:”suggestions”}),(0,a.jsx)(“span”,{children:” from the batch.”})]})}):null};try{l.displayName||(l.displayName=”DiscardBatchConfirmationDialog”)}catch{}},48505:(e,t,s)=>{s.d(t,{UZ:()=>a,fO:()=>i,hH:()=>n,vk:()=>o});let a={Failure:”FAILURE”,Notice:”NOTICE”,Warning:”WARNING”},n={Vanilla:”vanilla”,CodeScanning:”code_scanning”,Copilot:”copilot”,Dependabot:”dependabot”,CodeQuality:”code_quality”,Automated:”automated”},i={NoSuggestion:”no_suggestion”,Pending:”pending”,Present:”present”,Outdated:”outdated”,Error:”error”,Applied:”applied”},o={CodeScanning:”code_scanning”,CodeQuality:”code_quality”,LicenseCompliance:”license_compliance”}},57311:(e,t,s)=>{s.d(t,{B:()=>l});var a=s(28278),n=s(38621),i=s(26607),o=s(89758);function l({severity:e}){switch(e){case o.U.Note:return(0,a.jsxs)(i.A,{variant:”secondary”,children:[(0,a.jsx)(n.NoteIcon,{className:”color-fg-default pr-1″}),”Note”]});case o.U.Warning:return(0,a.jsxs)(i.A,{variant:”secondary”,children:[(0,a.jsx)(n.AlertIcon,{className:”color-fg-attention pr-1″}),”Warning”]});case o.U.Error:return(0,a.jsxs)(i.A,{variant:”secondary”,children:[(0,a.jsx)(n.CircleSlashIcon,{className:”color-fg-danger pr-1″}),”Error”]})}}try{l.displayName||(l.displayName=”RuleSeverityBadge”)}catch{}},63352:(e,t,s)=>{s.d(t,{Z:()=>N});var a=s(28278),n=s(21728),i=s(75202),o=s(71315),l=s(59014),r=s(38621),d=s(26108),c=s(15220),m=s(64451),u=s(86877),h=s(46720),f=s(4175),g=s(21373);let x=[{label:”Comment is harmful or unsafe”,value:”OFFENSIVE_OR_DISCRIMINATORY”},{label:”Comment is poorly formatted”,value:”POORLY_FORMATTED”},{label:”Comment is not true”,value:”INCORRECT”},{label:”Comment is not helpful”,value:”UNHELPFUL”},{label:”Comment is attached to the wrong line(s)”,value:”INCORRECT_LINE”},{label:”Comment is a duplicate of another comment”,value:”DUPLICATE”},{label:”Code suggestion is harmful or unsafe”,value:”SUGGESTION_OFFENSIVE_OR_DISCRIMINATORY”},{label:”Code suggestion is poorly formatted”,value:”SUGGESTION_POORLY_FORMATTED”},{label:”Code suggestion does not solve the problem in the comment”,value:”SUGGESTION_UNHELPFUL”},{label:”Code suggestion is invalid”,value:”SUGGESTION_INVALID”}],p=e=>{let t,s,i,o,r=(0,n.c)(16),{commentId:d,onClose:p,onSubmit:b,feedbackOptions:v,returnFocusRef:j}=e,y=void 0===v?x:v,[N,C]=(0,l.useState)(!1);r[0]===Symbol.for(“react.memo_cache_sentinel”)?(t=[],r[0]=t):t=r[0];let[w,S]=(0,l.useState)(t),[A,_]=(0,l.useState)(“”);r[1]!==d||r[2]!==w||r[3]!==b||r[4]!==A?(s=e=>{e.preventDefault(),C(!0),w.length&&b({commentId:d,type:”NEGATIVE”,feedbackChoice:w,textResponse:A})},r[1]=d,r[2]=w,r[3]=b,r[4]=A,r[5]=s):s=r[5];let k=s,I=(0,l.useId)(),T=N&&0===w.length;return r[6]!==y||r[7]!==k||r[8]!==T||r[9]!==A||r[10]!==I?(i=()=>(0,a.jsxs)(“form”,{onSubmit:k,children:[(0,a.jsxs)(c.l.Body,{children:[(0,a.jsx)(“div”,{className:”mb-3″,children:(0,a.jsxs)(m.A,{onChange:S,required:!0,children:[(0,a.jsx)(m.A.Label,{children:”Category”}),y.map(e=>(0,a.jsxs)(u.A,{id:`feedback_choice_${e.value}`,children:[(0,a.jsx)(h.A,{value:e.value,”aria-describedby”:T?I:void 0}),(0,a.jsx)(u.A.Label,{children:e.label})]},e.value)),T&&(0,a.jsx)(m.A.Validation,{variant:”error”,children:”Please select a feedback category”})]})}),(0,a.jsxs)(u.A,{id:”text_response”,children:[(0,a.jsx)(u.A.Label,{children:”How should we improve this response?”}),(0,a.jsx)(f.Ay,{block:!0,rows:2,wrap:”wrap”,name:”text_response”,value:A,resize:”vertical”,onChange:e=>_(e.currentTarget.value)})]})]}),(0,a.jsx)(c.l.Footer,{children:(0,a.jsx)(g.Q,{type:”submit”,disabled:T,children:”Submit”})})]}),r[6]=y,r[7]=k,r[8]=T,r[9]=A,r[10]=I,r[11]=i):i=r[11],r[12]!==p||r[13]!==j||r[14]!==i?(o=(0,a.jsx)(c.l,{onClose:p,title:”Provide additional feedback”,subtitle:”Please help us improve GitHub Copilot by sharing more details about this comment.”,returnFocusRef:j,renderBody:i}),r[12]=p,r[13]=j,r[14]=i,r[15]=o):o=r[15],o};try{p.displayName||(p.displayName=”NegativeFeedbackForm”)}catch{}let b=e=>{let t,s,i=(0,n.c)(6),{onClick:o,commentId:l,disabled:c}=e;return i[0]!==l||i[1]!==o?(t=()=>o({type:”POSITIVE”,commentId:l}),i[0]=l,i[1]=o,i[2]=t):t=i[2],i[3]!==c||i[4]!==t?(s=(0,a.jsx)(d.K,{size:”small”,variant:”invisible”,disabled:c,icon:r.ThumbsupIcon,title:”Positive Feedback”,”aria-label”:”Positive Feedback”,onClick:t}),i[3]=c,i[4]=t,i[5]=s):s=i[5],s},v=e=>{let t,s,i,o,c,m=(0,n.c)(18),{onClick:u,commentId:h,disabled:f,feedbackOptions:g,showNegativeFeedbackModal:x}=e,b=void 0===x||x,[v,j]=(0,l.useState)(!1),y=(0,l.useRef)(null);m[0]!==u?(t=e=>{u(e),j(!1)},m[0]=u,m[1]=t):t=m[1];let N=t;m[2]!==h||m[3]!==u||m[4]!==b?(s=()=>{b?j(!0):u({type:”NEGATIVE”,commentId:h})},m[2]=h,m[3]=u,m[4]=b,m[5]=s):s=m[5];let C=s;return m[6]!==h||m[7]!==v||m[8]!==g||m[9]!==N||m[10]!==b?(i=v&&b&&(0,a.jsx)(p,{onClose:()=>j(!1),onSubmit:N,commentId:h,feedbackOptions:g,returnFocusRef:y}),m[6]=h,m[7]=v,m[8]=g,m[9]=N,m[10]=b,m[11]=i):i=m[11],m[12]!==f||m[13]!==C?(o=(0,a.jsx)(d.K,{ref:y,size:”small”,variant:”invisible”,disabled:f,icon:r.ThumbsdownIcon,title:”Negative Feedback”,”aria-label”:”Negative Feedback”,onClick:C}),m[12]=f,m[13]=C,m[14]=o):o=m[14],m[15]!==i||m[16]!==o?(c=(0,a.jsxs)(a.Fragment,{children:[i,o]}),m[15]=i,m[16]=o,m[17]=c):c=m[17],c};try{b.displayName||(b.displayName=”PositiveFeedbackButton”)}catch{}try{v.displayName||(v.displayName=”NegativeFeedbackButton”)}catch{}var j=s(96379);let y=e=>{let t,s,i,r,d,c,m=(0,n.c)(21),{commentId:u,commentUrl:h,feedbackPath:f,feedbackOptions:g,additionalParameters:x,showNegativeFeedbackModal:p}=e,y=void 0===p||p,[N,C]=(0,l.useState)();e:{if(f){t=f;break e}if(h){let e;m[0]!==h?((e=new URL(h,o.fV.origin)).hash=””,m[0]=h,m[1]=e):e=m[1],t=`${e}/code_review_feedback`;break e}throw Error(“missing feedbackPath and commentUrl”)}let w=t;m[2]!==x||m[3]!==w?(s={path:w,additionalParameters:x},m[2]=x,m[3]=w,m[4]=s):s=m[4];let S=(({path:e,additionalParameters:t})=>(0,l.useCallback)(({type:s,commentId:a,feedbackChoice:n,textResponse:i})=>{try{let o=new FormData;if(o.set(“comment_id”,a),o.set(“feedback”,s),t)for(let[e,s]of Object.entries(t))o.set(e,s);for(let e of n??[])o.append(“feedback_choice[]”,e);i&&o.set(“text_response”,i),(0,j.DI)(e,{method:”POST”,body:o})}catch{}},[e,t]))(s);m[5]!==S?(i=e=>{C(e.type),S(e)},m[5]=S,m[6]=i):i=m[6];let A=i,_=`copilot-code-review-feedback-${u}`;return m[7]!==u||m[8]!==A||m[9]!==N?(r=”NEGATIVE”!==N&&(0,a.jsx)(b,{disabled:!!N,commentId:u,onClick:A}),m[7]=u,m[8]=A,m[9]=N,m[10]=r):r=m[10],m[11]!==u||m[12]!==g||m[13]!==A||m[14]!==y||m[15]!==N?(d=”POSITIVE”!==N&&(0,a.jsx)(v,{disabled:!!N,onClick:A,commentId:u,feedbackOptions:g,showNegativeFeedbackModal:y}),m[11]=u,m[12]=g,m[13]=A,m[14]=y,m[15]=N,m[16]=d):d=m[16],m[17]!==_||m[18]!==r||m[19]!==d?(c=(0,a.jsxs)(“div”,{“data-testid”:_,className:”d-flex gap-1″,children:[r,d]}),m[17]=_,m[18]=r,m[19]=d,m[20]=c):c=m[20],c},N=e=>{let t,s=(0,n.c)(2);return s[0]!==e?(t=(0,a.jsx)(i.t,{fallback:null,children:(0,a.jsx)(y,{…e})}),s[0]=e,s[1]=t):t=s[1],t};try{y.displayName||(y.displayName=”Feedback”)}catch{}try{N.displayName||(N.displayName=”CopilotCodeReviewFeedback”)}catch{}},84363:(e,t,s)=>{s.d(t,{t:()=>n});var a=s(59403);let n=({items:e,filter:t,key:s,secondaryKey:n})=>{let i=e.map(e=>[(0,a.dt)(t,s(e)),e]);return n&&(i=i.map(([e,s])=>[Math.max(e,(0,a.dt)(t,n(s))),s])),i.filter(([e])=>e>a.IP).sort(([e,t],[a,n])=>a===e?s(t).localeCompare(s(n)):a-e).map(([,e])=>e)}},89758:(e,t,s)=>{s.d(t,{U:()=>a});let a={None:”none”,Error:”error”,Warning:”warning”,Note:”note”}},95542:(e,t,s)=>{s.d(t,{y:()=>er,k:()=>eg});var a,n,i=s(28278),o=s(68273),l=s(21728),r=s(57311),d=s(26156),c=s(18559),m=s(81156),u=s(73189),h=s(73017),f=s(71315),g=s(38621),x=s(72511),p=s(59014),b=s(8748);let v=”AutomatedReviewThreadComment-module__automatedComment–xAOVq”,j=”AutomatedReviewThreadComment-module__automatedComment__headerContainer–ryz0T”,y=”AutomatedReviewThreadComment-module__automatedComment__bodyContainer–rNhxB”,N=”AutomatedReviewThreadComment-module__automatedComment__body–hjhIQ”,C=”AutomatedReviewThreadComment-module__automatedComment__content–FCGsQ”,w=”AutomatedReviewThreadComment-module__automatedComment__title–G1Aug”,S=”AutomatedReviewThreadComment-module__automatedComment__message–KWGoo”;var A=s(48505),_=s(57478),k=s(69726),I=s(21373),T=s(26108),R=s(98091);let E=”AutomatedReviewDiffEntry-module__diffEntryHeader–GNsEP”,O=”AutomatedReviewDiffEntry-module__automatedReviewDiff–scQuw”;var F=s(34164);let D=(0,o.GV)()?function(e){let t,s,a,n,o,r,d=(0,l.c)(19),{diffEntry:c}=e,[m,u]=(0,p.useState)(!1);d[0]!==m?(t=()=>u(!m),d[0]=m,d[1]=t):t=d[1];let h=t,f=c.path,x=m&&”rounded-2″;d[2]!==x?(s=(0,F.$)(“d-flex flex-items-center px-3 py-2 text-small gap-2 text-mono”,E,x),d[2]=x,d[3]=s):s=d[3];let b=m?”Open review comment”:”Close review comment”,v=m?g.ChevronRightIcon:g.ChevronDownIcon;return d[4]!==h||d[5]!==b||d[6]!==v?(a=(0,i.jsx)(T.K,{“aria-label”:b,icon:v,size:”small”,variant:”invisible”,onClick:h}),d[4]=h,d[5]=b,d[6]=v,d[7]=a):a=d[7],d[8]!==c.path||d[9]!==s||d[10]!==a?(n=(0,i.jsxs)(“div”,{className:s,children:[a,c.path]}),d[8]=c.path,d[9]=s,d[10]=a,d[11]=n):n=d[11],d[12]!==c.diffLines||d[13]!==m?(o=!m&&(0,i.jsx)(R.i,{tabSize:4,className:(0,F.$)(“m-0 border-bottom borderColor-default overflow-hidden”,O),diffTableClassName:”borderColor-default”,diffLines:c.diffLines}),d[12]=c.diffLines,d[13]=m,d[14]=o):o=d[14],d[15]!==c.path||d[16]!==n||d[17]!==o?(r=(0,i.jsxs)(“div”,{className:”d-flex flex-column overflow-hidden”,children:[n,o]},f),d[15]=c.path,d[16]=n,d[17]=o,d[18]=r):r=d[18],r}:function({diffEntry:e}){let[t,s]=(0,p.useState)(!1);return(0,i.jsxs)(“div”,{className:”d-flex flex-column overflow-hidden”,children:[(0,i.jsxs)(“div”,{className:(0,F.$)(“d-flex flex-items-center px-3 py-2 text-small gap-2 text-mono”,E,t&&”rounded-2″),children:[(0,i.jsx)(T.K,{“aria-label”:t?”Open review comment”:”Close review comment”,icon:t?g.ChevronRightIcon:g.ChevronDownIcon,size:”small”,variant:”invisible”,onClick:()=>s(!t)}),e.path]}),!t&&(0,i.jsx)(R.i,{tabSize:4,className:(0,F.$)(“m-0 border-bottom borderColor-default overflow-hidden”,O),diffTableClassName:”borderColor-default”,diffLines:e.diffLines})]},e.path)};try{D.displayName||(D.displayName=”AutomatedReviewDiffEntry”)}catch{}var G=s(3585),L=s(48845),M=s(94747),$=s(25407);let U=(0,o.Z6)()?function(e,t){let s,a,n=(0,l.c)(5);n[0]!==e||n[1]!==t?(s=(0,$.m5w)({basePath:t,automatedReviewCommentId:e}),n[0]=e,n[1]=t,n[2]=s):s=n[2];let i=s;return n[3]!==i?(a={mutationFn:async e=>{let{message:t}=e,s=await (0,L.q$)(i,{method:”POST”,body:{message:t}}),a=await (0,L.hp)(s);return(0,L.R)(s,a),a},onSuccess:P},n[3]=i,n[4]=a):a=n[4],(0,M.n)(a)}:function(e,t){let s=(0,$.m5w)({basePath:t,automatedReviewCommentId:e});return(0,M.n)({mutationFn:async({message:e})=>{let t=await (0,L.q$)(s,{method:”POST”,body:{message:e}}),a=await (0,L.hp)(t);return(0,L.R)(t,a),a},onSuccess:()=>{f.cg?.location.reload()}})};function P(){f.cg?.location.reload()}let V=”AutomatedReviewSuggestionStates-module__suggestion–VptIw”,z=”AutomatedReviewSuggestionStates-module__suggestionPending–BZd8B”,B=”AutomatedReviewSuggestionStates-module__suggestionError–FZ0LD”,H=”AutomatedReviewSuggestionStates-module__suggestionErrorTitle–iGoNX”,Q=”AutomatedReviewSuggestionStates-module__suggestionApplied–BwHeB”,q=”AutomatedReviewSuggestionStates-module__suggestionAppliedText–aHYoo”,K=(0,o.GV)()?function(e){let t,s,a,n,o=(0,l.c)(10),{suggestion:r,actions:d}=e;o[0]!==r.diffEntries?(t=r.diffEntries||[],o[0]=r.diffEntries,o[1]=t):t=o[1];let c=t,m=c.length||0;return o[2]!==m?(s=m>0&&(0,i.jsx)(“div”,{className:”d-flex flex-items-center flex-justify-between text-small color-fg-muted pt-2″,children:(0,i.jsxs)(“div”,{children:[“Suggested changeset “,(0,i.jsx)(_.A,{scheme:”secondary”,children:m})]})}),o[2]=m,o[3]=s):s=o[3],o[4]!==c?(a=c.map(Y),o[4]=c,o[5]=a):a=o[5],o[6]!==d||o[7]!==s||o[8]!==a?(n=(0,i.jsxs)(“div”,{className:`d-flex flex-column color-fg-default ${V}`,”data-testid”:”automated-review-suggestion”,children:[s,a,d]}),o[6]=d,o[7]=s,o[8]=a,o[9]=n):n=o[9],n}:function({suggestion:e,actions:t}){let s=e.diffEntries||[],a=s.length||0;return(0,i.jsxs)(“div”,{className:`d-flex flex-column color-fg-default ${V}`,”data-testid”:”automated-review-suggestion”,children:[a>0&&(0,i.jsx)(“div”,{className:”d-flex flex-items-center flex-justify-between text-small color-fg-muted pt-2″,children:(0,i.jsxs)(“div”,{children:[“Suggested changeset “,(0,i.jsx)(_.A,{scheme:”secondary”,children:a})]})}),s.map(e=>(0,i.jsx)(D,{diffEntry:e},e.path)),t]})};function Y(e){return(0,i.jsx)(D,{diffEntry:e},e.path)}let Z=(0,o.GV)()?function(e){let t,s=(0,l.c)(1);return s[0]===Symbol.for(“react.memo_cache_sentinel”)?(t=(0,i.jsxs)(“div”,{className:z,”data-testid”:”automated-review-suggestion-pending”,children:[(0,i.jsx)(k.A,{size:”medium”}),”Loading suggestion…”]}),s[0]=t):t=s[0],t}:function(e){return(0,i.jsxs)(“div”,{className:z,”data-testid”:”automated-review-suggestion-pending”,children:[(0,i.jsx)(k.A,{size:”medium”}),”Loading suggestion…”]})},W=(0,o.GV)()?function(e){let t,s,a=(0,l.c)(2);return a[0]===Symbol.for(“react.memo_cache_sentinel”)?(t=(0,i.jsx)(“h3″,{className:H,children:”Sorry, we could not generate an autofix suggestion.”}),a[0]=t):t=a[0],a[1]===Symbol.for(“react.memo_cache_sentinel”)?(s=(0,i.jsxs)(“div”,{className:B,”data-testid”:”automated-review-suggestion-error”,children:[t,(0,i.jsxs)(“p”,{className:”color-fg-muted”,children:[“Try pushing a new commit or if the problem persists”,” “,(0,i.jsx)(“a”,{className:”fgColor-link”,href:”https://support.github.com/”,children:(0,i.jsx)(“u”,{children:”contact support”})}),”.”]})]}),a[1]=s):s=a[1],s}:function(e){return(0,i.jsxs)(“div”,{className:B,”data-testid”:”automated-review-suggestion-error”,children:[(0,i.jsx)(“h3″,{className:H,children:”Sorry, we could not generate an autofix suggestion.”}),(0,i.jsxs)(“p”,{className:”color-fg-muted”,children:[“Try pushing a new commit or if the problem persists”,” “,(0,i.jsx)(“a”,{className:”fgColor-link”,href:”https://support.github.com/”,children:(0,i.jsx)(“u”,{children:”contact support”})}),”.”]})]})},X=(0,o.GV)()?function(e){let t,s,a=(0,l.c)(3),{suggestion:n}=e;a[0]===Symbol.for(“react.memo_cache_sentinel”)?(t=(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(“div”,{className:”d-flex flex-items-center flex-justify-between”,children:[(0,i.jsx)(“span”,{className:”color-fg-muted text-small”,children:”Unable to commit as this autofix suggestion is now outdated.”}),(0,i.jsx)(I.Q,{size:”small”,disabled:!0,children:”Commit suggestion”})]})}),a[0]=t):t=a[0];let o=t;return a[1]!==n?(s=n&&(0,i.jsx)(K,{suggestion:n,actions:o}),a[1]=n,a[2]=s):s=a[2],s}:function({suggestion:e}){let t=(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(“div”,{className:”d-flex flex-items-center flex-justify-between”,children:[(0,i.jsx)(“span”,{className:”color-fg-muted text-small”,children:”Unable to commit as this autofix suggestion is now outdated.”}),(0,i.jsx)(I.Q,{size:”small”,disabled:!0,children:”Commit suggestion”})]})});return e&&(0,i.jsx)(K,{suggestion:e,actions:t})},J=(0,o.GV)()?function(e){let t,s,a,n,o,r=(0,l.c)(13),{suggestion:d}=e,[c,m]=(0,p.useState)(!0);r[0]!==c?(t=()=>m(!c),r[0]=c,r[1]=t):t=r[1];let u=t;r[2]===Symbol.for(“react.memo_cache_sentinel”)?(s=(0,i.jsx)(“span”,{className:q,children:”This autofix suggestion was applied.”}),r[2]=s):s=r[2];let h=c?g.UnfoldIcon:g.FoldIcon,f=c?”Show”:”Hide”;return r[3]!==u||r[4]!==h||r[5]!==f?(a=(0,i.jsxs)(“div”,{className:”d-flex flex-justify-between flex-items-center”,children:[s,(0,i.jsxs)(I.Q,{variant:”invisible”,onClick:u,leadingVisual:h,size:”small”,className:”color-fg-muted”,children:[f,” autofix suggestion”]})]}),r[3]=u,r[4]=h,r[5]=f,r[6]=a):a=r[6],r[7]!==c||r[8]!==d?(n=!c&&d&&(0,i.jsx)(K,{suggestion:d}),r[7]=c,r[8]=d,r[9]=n):n=r[9],r[10]!==a||r[11]!==n?(o=(0,i.jsxs)(“div”,{className:Q,children:[a,n]}),r[10]=a,r[11]=n,r[12]=o):o=r[12],o}:function({suggestion:e}){let[t,s]=(0,p.useState)(!0);return(0,i.jsxs)(“div”,{className:Q,children:[(0,i.jsxs)(“div”,{className:”d-flex flex-justify-between flex-items-center”,children:[(0,i.jsx)(“span”,{className:q,children:”This autofix suggestion was applied.”}),(0,i.jsxs)(I.Q,{variant:”invisible”,onClick:()=>s(!t),leadingVisual:t?g.UnfoldIcon:g.FoldIcon,size:”small”,className:”color-fg-muted”,children:[t?”Show”:”Hide”,” autofix suggestion”]})]}),!t&&e&&(0,i.jsx)(K,{suggestion:e})]})},ee=(0,o.GV)()?function(e){let t,s,a,n,o,r,d,c=(0,l.c)(19),{automatedCommentId:m,basePath:u,commentAuthorLogin:h,commentTitle:f,suggestion:g}=e,[x,b]=(0,p.useState)(!1);c[0]!==g?.diffEntries?(t=g?.diffEntries||[],c[0]=g?.diffEntries,c[1]=t):t=c[1];let v=t.length||0,j=(0,p.useRef)(null),y=`Potential fix for pull request finding${f?` ‘${f}’`:””}`,{mutate:N}=U(m,u);c[2]===Symbol.for(“react.memo_cache_sentinel”)?(s=()=>b(!1),c[2]=s):s=c[2];let C=s;c[3]!==N?(a=(e,t,s)=>{N({message:e},{onSuccess:()=>{C(),s()},onError:e=>{t(e,”applyAutomatedSuggestion”,”Failed to commit suggested changes”)}})},c[3]=N,c[4]=a):a=c[4];let w=a;c[5]!==x?(n=(0,i.jsx)(“div”,{className:”d-flex flex-items-center flex-justify-end”,children:(0,i.jsx)(I.Q,{“data-testid”:”commit-suggestion-button”,size:”small”,variant:”primary”,ref:j,onClick:()=>b(!x),children:”Commit suggestion”})}),c[5]=x,c[6]=n):n=c[6],c[7]!==h||c[8]!==y||c[9]!==w||c[10]!==x||c[11]!==v?(o=x&&v>0&&(0,i.jsx)(G.$,{authorLogins:h?[h]:[],batchSize:v,defaultCommitMessage:y,onClose:C,onCommit:w,dialogTitle:”Commit suggestion”}),c[7]=h,c[8]=y,c[9]=w,c[10]=x,c[11]=v,c[12]=o):o=c[12],c[13]!==n||c[14]!==o?(r=(0,i.jsxs)(i.Fragment,{children:[n,o]}),c[13]=n,c[14]=o,c[15]=r):r=c[15];let S=r;return c[16]!==S||c[17]!==g?(d=g&&(0,i.jsx)(K,{suggestion:g,actions:S}),c[16]=S,c[17]=g,c[18]=d):d=c[18],d}:function({automatedCommentId:e,basePath:t,commentAuthorLogin:s,commentTitle:a,suggestion:n}){let[o,l]=(0,p.useState)(!1),r=(n?.diffEntries||[]).length||0,d=(0,p.useRef)(null),c=”Commit suggestion”,m=`Potential fix for pull request finding${a?` ‘${a}’`:””}`,{mutate:u}=U(e,t),h=(0,p.useCallback)(()=>l(!1),[]),f=(0,p.useCallback)((e,t,s)=>{u({message:e},{onSuccess:()=>{h(),s()},onError:e=>{t(e,”applyAutomatedSuggestion”,”Failed to commit suggested changes”)}})},[u,h]),g=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(“div”,{className:”d-flex flex-items-center flex-justify-end”,children:(0,i.jsx)(I.Q,{“data-testid”:”commit-suggestion-button”,size:”small”,variant:”primary”,ref:d,onClick:()=>l(!o),children:c})}),o&&r>0&&(0,i.jsx)(G.$,{authorLogins:s?[s]:[],batchSize:r,defaultCommitMessage:m,onClose:h,onCommit:f,dialogTitle:c})]});return n&&(0,i.jsx)(K,{suggestion:n,actions:g})};try{K.displayName||(K.displayName=”AutomatedReviewSuggestionBase”)}catch{}try{Z.displayName||(Z.displayName=”AutomatedReviewSuggestionPending”)}catch{}try{W.displayName||(W.displayName=”AutomatedReviewSuggestionError”)}catch{}try{X.displayName||(X.displayName=”AutomatedReviewSuggestionOutdated”)}catch{}try{(a=Actions).displayName||(a.displayName=”Actions”)}catch{}try{J.displayName||(J.displayName=”AutomatedReviewSuggestionApplied”)}catch{}try{ee.displayName||(ee.displayName=”AutomatedReviewSuggestionPresent”)}catch{}try{(n=Actions).displayName||(n.displayName=”Actions”)}catch{}let et={[A.fO.Pending]:Z,[A.fO.Error]:W,[A.fO.Outdated]:X,[A.fO.Applied]:J,[A.fO.Present]:ee},es=(0,o.GV)()?function(e){let t,s=(0,l.c)(8),{automatedCommentId:a,basePath:n,commentAuthorLogin:o,commentTitle:r,feedbackOptions:d,suggestion:c,suggestionState:m}=e;if(!m||m===A.fO.NoSuggestion)return null;let u=et[m];return u?(s[0]!==u||s[1]!==a||s[2]!==n||s[3]!==o||s[4]!==r||s[5]!==d||s[6]!==c?(t=(0,i.jsx)(u,{automatedCommentId:a,basePath:n,commentTitle:r,commentAuthorLogin:o,feedbackOptions:d,suggestion:c}),s[0]=u,s[1]=a,s[2]=n,s[3]=o,s[4]=r,s[5]=d,s[6]=c,s[7]=t):t=s[7],t):null}:function({automatedCommentId:e,basePath:t,commentAuthorLogin:s,commentTitle:a,feedbackOptions:n,suggestion:o,suggestionState:l}){if(!l||l===A.fO.NoSuggestion)return null;let r=et[l];return r?(0,i.jsx)(r,{automatedCommentId:e,basePath:t,commentTitle:a,commentAuthorLogin:s,feedbackOptions:n,suggestion:o}):null};try{es.displayName||(es.displayName=”AutomatedReviewSuggestion”)}catch{}var ea=s(76720),en=s(63352);function ei(e,t){return{feedbackPath:(0,$.YLS)({basePath:t,automatedReviewCommentId:e})}}let eo=(0,o.GV)()?function(e){let t,s,a=(0,l.c)(8),{automatedCommentId:n,feedbackOptions:o,basePath:r,showNegativeFeedbackModal:d}=e,{feedbackPath:c}=ei(n,r),m=`automated-review-feedback-${n}`;return a[0]!==n||a[1]!==o||a[2]!==c||a[3]!==d?(t=(0,i.jsx)(en.Z,{commentId:n,feedbackPath:c,feedbackOptions:o,showNegativeFeedbackModal:d}),a[0]=n,a[1]=o,a[2]=c,a[3]=d,a[4]=t):t=a[4],a[5]!==m||a[6]!==t?(s=(0,i.jsx)(“div”,{“data-testid”:m,children:t}),a[5]=m,a[6]=t,a[7]=s):s=a[7],s}:function({automatedCommentId:e,feedbackOptions:t,basePath:s,showNegativeFeedbackModal:a}){let{feedbackPath:n}=ei(e,s);return(0,i.jsx)(“div”,{“data-testid”:`automated-review-feedback-${e}`,children:(0,i.jsx)(en.Z,{commentId:e,feedbackPath:n,feedbackOptions:t,showNegativeFeedbackModal:a})})};try{eo.displayName||(eo.displayName=”AutomatedReviewFeedback”)}catch{}function el(e){if(e)return e.replace(/\[bot\]$/i,””)}let er=(0,o.GV)()?function(e){let t,s,a,n,o,A,_,k,I,T,R,E,O,F,D,G,L,M,$,U=(0,l.c)(73),{anchorPrefix:P,basePath:V,comment:z,isAnchorable:B,isInDialogMode:H,isOutdated:Q,onQuoteReply:q,originalDiffPathUri:K,showNegativeFeedbackModal:Y,threadId:Z,threadPositionNumber:W}=e,X=void 0!==B&&B,J=void 0===q?u.l:q,[ee,et]=(0,p.useState)(z.isHidden),[ea]=(0,p.useState)(“”),en=(0,p.useRef)(null),ei=(0,p.useRef)(null);U[0]!==z.automatedComment?(t=z.automatedComment||{},U[0]=z.automatedComment,U[1]=t):t=U[1];let{id:er,title:ef,message:eg,severity:ex,suggestion:ep,suggestionState:eb,feedbackOptions:ev,showFeedbackButtons:ej,showAiNote:ey}=t,eN=ej&&er&&ev,eC=eN||ey;U[2]!==z.databaseId||U[3]!==z.id?(s=z.databaseId?.toString()||z.id,U[2]=z.databaseId,U[3]=z.id,U[4]=s):s=U[4];let ew=s,eS=ew?`${void 0===P?”r”:P}${ew}`:void 0,eA=ee?”hidden”:”visible”;U[5]!==eS?(a=eS&&f.fV?new URL(`${f.fV.pathname}#${eS}`,f.fV.origin).toString():””,U[5]=eS,U[6]=a):a=U[6];let e_=a;U[7]!==eS||U[8]!==ew||U[9]!==X?(n={isAnchorable:X,commentId:ew,commentAnchor:eS,containerRef:ei},U[7]=eS,U[8]=ew,U[9]=X,U[10]=n):n=U[10],(0,b.u)(n),U[11]===Symbol.for(“react.memo_cache_sentinel”)?(o={as:”h3″},U[11]=o):o=U[11];let ek=z.author?.avatarUrl??m.t.ghostUser.avatarUrl,eI=z.reference.text??`#${z.reference.number}`;U[12]!==z||U[13]!==e_||U[14]!==eI?(A={…z,bodyForClipboard:z.body,url:e_,referenceText:eI,viewerCanMinimize:!1,viewerCanUpdate:!1,viewerCanDelete:!1,viewerCanBlockFromOrg:!1,viewerCanUnblockFromOrg:!1,viewerCanReport:!1,viewerCanReportToMaintainer:!1,viewerCanReferenceInIssue:!1,viewerCanQuoteReply:!1},U[12]=z,U[13]=e_,U[14]=eI,U[15]=A):A=U[15],U[16]===Symbol.for(“react.memo_cache_sentinel”)?(_={},U[16]=_):_=U[16],U[17]!==z.author?.login?(k=el(z.author?.login)??m.t.ghostUser.login,U[17]=z.author?.login,U[18]=k):k=U[18],U[19]!==ee||U[20]!==Q||U[21]!==J||U[22]!==K||U[23]!==A||U[24]!==k||U[25]!==ek?(I={headingProps:o,avatarUrl:ek,comment:A,commentRef:ei,editHistoryComponent:void 0,onBlock:void 0,onUnblock:void 0,onMinimize:et,onSuccessfulBlock:eh,isMinimized:ee,navigate:u.l,onReplySelect:J,isReply:!1,forceInlineAvatar:!0,containerStyle:_,originalDiffPathUri:K,isOutdated:Q,editComment:eu,deleteComment:em,hideComment:ec,unhideComment:ed,commentAuthorSlug:void 0,commentAuthorType:d.S.Bot,commentAuthorLogin:k,hideProfileLink:!0},U[19]=ee,U[20]=Q,U[21]=J,U[22]=K,U[23]=A,U[24]=k,U[25]=ek,U[26]=I):I=U[26];let eT=I;U[27]!==W?(T=()=>void 0!==W?`Comment ${W}`:”Comment”,U[27]=W,U[28]=T):T=U[28];let eR=T,eE=X?eS:void 0,eO=X?”120px”:0;return U[29]!==eO?(R={scrollMarginTop:eO},U[29]=eO,U[30]=R):R=U[30],U[31]!==eR||U[32]!==H?(E=H?{role:”document”,”aria-roledescription”:”comment”,”aria-label”:eR()}:{},U[31]=eR,U[32]=H,U[33]=E):E=U[33],U[34]!==eT?(O=(0,i.jsx)(c.p,{…eT}),U[34]=eT,U[35]=O):O=U[35],U[36]!==ex?(F=ex&&(0,i.jsx)(r.B,{severity:ex}),U[36]=ex,U[37]=F):F=U[37],U[38]!==z.body||U[39]!==eT||U[40]!==H||U[41]!==Q||U[42]!==O||U[43]!==F?(D=(0,i.jsx)(“div”,{className:j,children:(0,i.jsx)(d.v,{…eT,commentBody:z.body,isInDialogMode:H,actions:O,badges:F,isOutdated:Q})}),U[38]=z.body,U[39]=eT,U[40]=H,U[41]=Q,U[42]=O,U[43]=F,U[44]=D):D=U[44],U[45]!==ea?(G=ea&&(0,i.jsxs)(x.A,{variant:”danger”,className:”m-3″,children:[(0,i.jsx)(g.StopIcon,{className:”mr-2″}),ea]}),U[45]=ea,U[46]=G):G=U[46],U[47]!==er||U[48]!==V||U[49]!==z.author?.login||U[50]!==ew||U[51]!==eA||U[52]!==ev||U[53]!==eg||U[54]!==ey||U[55]!==eN||U[56]!==eC||U[57]!==Y||U[58]!==ep||U[59]!==eb||U[60]!==ef?(L=”visible”===eA&&(0,i.jsxs)(“div”,{className:N,children:[(0,i.jsxs)(“div”,{className:C,children:[ef&&(0,i.jsx)(“div”,{className:”d-flex flex-items-center”,children:(0,i.jsx)(“h3″,{className:w,children:ef})}),(0,i.jsx)(h.JR,{ref:en,className:`${S} markdown-body`,”comment-testid”:`Comment message html for automated comment ${ew}`,html:eg})]}),er&&(0,i.jsx)(es,{commentTitle:ef,commentAuthorLogin:z.author?.login,feedbackOptions:ev,suggestion:ep,suggestionState:eb,automatedCommentId:er,basePath:V}),eC&&(0,i.jsxs)(“div”,{className:”d-flex flex-items-center flex-justify-between gap-2″,children:[eN&&(0,i.jsx)(eo,{automatedCommentId:er,basePath:V,feedbackOptions:ev,showNegativeFeedbackModal:Y}),ey&&(0,i.jsx)(“div”,{className:”text-small color-fg-muted pt-2″,children:”Copilot uses AI. Check for mistakes.”})]})]}),U[47]=er,U[48]=V,U[49]=z.author?.login,U[50]=ew,U[51]=eA,U[52]=ev,U[53]=eg,U[54]=ey,U[55]=eN,U[56]=eC,U[57]=Y,U[58]=ep,U[59]=eb,U[60]=ef,U[61]=L):L=U[61],U[62]!==L?(M=(0,i.jsx)(“div”,{className:y,children:L}),U[62]=L,U[63]=M):M=U[63],U[64]!==z.id||U[65]!==eE||U[66]!==R||U[67]!==E||U[68]!==D||U[69]!==G||U[70]!==M||U[71]!==Z?($=(0,i.jsxs)(“div”,{ref:ei,id:eE,className:v,style:R,”data-first-thread-comment”:!0,”data-marker-navigation-comment-thread-id”:Z,”data-marker-navigation-comment-id”:z.id,”data-testid”:”automated-review-comment”,…E,children:[D,G,M]}),U[64]=z.id,U[65]=eE,U[66]=R,U[67]=E,U[68]=D,U[69]=G,U[70]=M,U[71]=Z,U[72]=$):$=U[72],$}:function({anchorPrefix:e=”r”,basePath:t,comment:s,isAnchorable:a=!1,isInDialogMode:n,isOutdated:o,onQuoteReply:l=u.l,originalDiffPathUri:A,showNegativeFeedbackModal:_,threadId:k,threadPositionNumber:I}){let[T,R]=(0,p.useState)(s.isHidden),[E,O]=(0,p.useState)(“”),F=(0,p.useRef)(null),D=(0,p.useRef)(null),{id:G,title:L,message:M,severity:$,suggestion:U,suggestionState:P,feedbackOptions:V,showFeedbackButtons:z,showAiNote:B}=s.automatedComment||{},H=z&&G&&V,Q=H||B,q=s.databaseId?.toString()||s.id,K=q?`${e}${q}`:void 0,Y=T?”hidden”:”visible”,Z=K&&f.fV?new URL(`${f.fV.pathname}#${K}`,f.fV.origin).toString():””;(0,b.u)({isAnchorable:a,commentId:q,commentAnchor:K,containerRef:D});let W={headingProps:{as:”h3″},avatarUrl:s.author?.avatarUrl??m.t.ghostUser.avatarUrl,comment:{…s,bodyForClipboard:s.body,url:Z,referenceText:s.reference.text??`#${s.reference.number}`,viewerCanMinimize:!1,viewerCanUpdate:!1,viewerCanDelete:!1,viewerCanBlockFromOrg:!1,viewerCanUnblockFromOrg:!1,viewerCanReport:!1,viewerCanReportToMaintainer:!1,viewerCanReferenceInIssue:!1,viewerCanQuoteReply:!1},commentRef:D,editHistoryComponent:void 0,onBlock:void 0,onUnblock:void 0,onMinimize:R,onSuccessfulBlock:()=>{setTimeout(()=>f.cg?.location.reload(),800)},isMinimized:T,navigate:u.l,onReplySelect:l,isReply:!1,forceInlineAvatar:!0,containerStyle:{},originalDiffPathUri:A,isOutdated:o,editComment:()=>null,deleteComment:()=>null,hideComment:()=>null,unhideComment:()=>null,commentAuthorSlug:void 0,commentAuthorType:d.S.Bot,commentAuthorLogin:el(s.author?.login)??m.t.ghostUser.login,hideProfileLink:!0};return(0,i.jsxs)(“div”,{ref:D,id:a?K:void 0,className:v,style:{scrollMarginTop:a?”120px”:0},”data-first-thread-comment”:!0,”data-marker-navigation-comment-thread-id”:k,”data-marker-navigation-comment-id”:s.id,”data-testid”:”automated-review-comment”,…n?{role:”document”,”aria-roledescription”:”comment”,”aria-label”:void 0!==I?`Comment ${I}`:”Comment”}:{},children:[(0,i.jsx)(“div”,{className:j,children:(0,i.jsx)(d.v,{…W,commentBody:s.body,isInDialogMode:n,actions:(0,i.jsx)(c.p,{…W}),badges:$&&(0,i.jsx)(r.B,{severity:$}),isOutdated:o})}),E&&(0,i.jsxs)(x.A,{variant:”danger”,className:”m-3″,children:[(0,i.jsx)(g.StopIcon,{className:”mr-2″}),E]}),(0,i.jsx)(“div”,{className:y,children:”visible”===Y&&(0,i.jsxs)(“div”,{className:N,children:[(0,i.jsxs)(“div”,{className:C,children:[L&&(0,i.jsx)(“div”,{className:”d-flex flex-items-center”,children:(0,i.jsx)(“h3″,{className:w,children:L})}),(0,i.jsx)(h.JR,{ref:F,className:`${S} markdown-body`,”comment-testid”:`Comment message html for automated comment ${q}`,html:M})]}),G&&(0,i.jsx)(es,{commentTitle:L,commentAuthorLogin:s.author?.login,feedbackOptions:V,suggestion:U,suggestionState:P,automatedCommentId:G,basePath:t}),Q&&(0,i.jsxs)(“div”,{className:”d-flex flex-items-center flex-justify-between gap-2″,children:[H&&(0,i.jsx)(eo,{automatedCommentId:G,basePath:t,feedbackOptions:V,showNegativeFeedbackModal:_}),B&&(0,i.jsx)(“div”,{className:”text-small color-fg-muted pt-2″,children:”Copilot uses AI. Check for mistakes.”})]})]})})]})};function ed(){return null}function ec(){return null}function em(){return null}function eu(){return null}function eh(){setTimeout(ef,800)}function ef(){return f.cg?.location.reload()}let eg=(0,o.GV)()?function(){let e,t,s,a=(0,l.c)(3);return a[0]===Symbol.for(“react.memo_cache_sentinel”)?(e=(0,i.jsx)(ea.E.Visual,{children:(0,i.jsx)(g.AlertIcon,{size:24,className:”fgColor-muted mt-3 mb-3″})}),a[0]=e):e=a[0],a[1]===Symbol.for(“react.memo_cache_sentinel”)?(t=(0,i.jsx)(ea.E.Heading,{children:(0,i.jsx)(“strong”,{children:”There was a problem loading this review comment”})}),a[1]=t):t=a[1],a[2]===Symbol.for(“react.memo_cache_sentinel”)?(s=(0,i.jsx)(“div”,{className:”position-relative”,children:(0,i.jsxs)(ea.E,{border:!0,children:[e,t,(0,i.jsx)(“div”,{className:”mb-n2″,children:(0,i.jsx)(ea.E.Description,{children:”Refresh the page or try again later”})}),(0,i.jsx)(ea.E.SecondaryAction,{href:”https://www.githubstatus.com/”,children:”GitHub status”})]})}),a[2]=s):s=a[2],s}:function(){return(0,i.jsx)(“div”,{className:”position-relative”,children:(0,i.jsxs)(ea.E,{border:!0,children:[(0,i.jsx)(ea.E.Visual,{children:(0,i.jsx)(g.AlertIcon,{size:24,className:”fgColor-muted mt-3 mb-3″})}),(0,i.jsx)(ea.E.Heading,{children:(0,i.jsx)(“strong”,{children:”There was a problem loading this review comment”})}),(0,i.jsx)(“div”,{className:”mb-n2″,children:(0,i.jsx)(ea.E.Description,{children:”Refresh the page or try again later”})}),(0,i.jsx)(ea.E.SecondaryAction,{href:”https://www.githubstatus.com/”,children:”GitHub status”})]})})};try{er.displayName||(er.displayName=”AutomatedReviewThreadComment”)}catch{}try{eg.displayName||(eg.displayName=”AutomatedReviewThreadCommentErrorFallback”)}catch{}}}]);
//# sourceMappingURL=20876-b6a7ff3e81c9.js.map