performance.mark("js-parse-end:17115-7200aa4a9123d8d0.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["17115"],{60720(e,t,n){n.d(t,{A:()=>i});let i={"file-tree-row":"DiffFileTree-module__file-tree-row__PCB1B"}},93899(e,t,n){n.d(t,{P:()=>a});var i=n(74848),o=n(16522),r=n(34164);function a(e){let t,n,a,s,l,c,d,m,u=(0,o.c)(15);return u[0]!==e?({reason:a,icon:t,...n}=e,u[0]=e,u[1]=t,u[2]=n,u[3]=a):(t=u[1],n=u[2],a=u[3]),u[4]===Symbol.for("react.memo_cache_sentinel")?(s=(0,r.$)("blankslate","ReadonlyCommentBox-module__ReadonlyCommentBoxContainer__DyUsE"),u[4]=s):s=u[4],u[5]!==t?(l=t&&(0,i.jsx)(t,{size:24}),u[5]=t,u[6]=l):l=u[6],u[7]!==a?(c=(0,i.jsx)("div",{className:"readonly-comment-box-module__reason__DQJKT",children:a}),u[7]=a,u[8]=c):c=u[8],u[9]!==l||u[10]!==c?(d=(0,i.jsxs)("div",{className:"ReadonlyCommentBox-module__centeredContent__WhreX",children:[l,c]}),u[9]=l,u[10]=c,u[11]=d):d=u[11],u[12]!==n||u[13]!==d?(m=(0,i.jsx)("div",{className:s,...n,children:d}),u[12]=n,u[13]=d,u[14]=m):m=u[14],m}a.displayName="ReadonlyCommentBox"},40442(e,t,n){n.d(t,{x:()=>h});var i=n(16522),o=n(61441),r=n(39423),a=n(84403),s=n(67461),l=n(95751),c=n(96540),d=n(22766),m=n(93238),u=n(35665);function h(e){let t,n,h,f,p,x,g,y,C,v,w,b,j=(0,i.c)(31),{commentBoxRef:_,markdownComposerRef:S,onChange:N,onCancel:k,referenceId:I,insidePortal:E}=e;j[0]!==I?(t=m.t.localStorageKeys.issueNewComment("viewer",I),j[0]=I,j[1]=t):t=j[1];let[T,D,B]=(0,l.Fo)(t,""),[A,L]=(0,c.useState)(T);j[2]!==A?(n=(0,o.KG)(A),j[2]=A,j[3]=n):n=j[3];let M=n,{anyItemPickerOpen:O}=(0,a.t)();j[4]!==D?(h=e=>{L(e),D(e)},j[4]=D,j[5]=h):h=j[5];let P=h;j[6]!==P||j[7]!==k||j[8]!==N?(f=e=>{P(e),N(),""===e&&k()},j[6]=P,j[7]=k,j[8]=N,j[9]=f):f=j[9];let R=f;j[10]!==_||j[11]!==R||j[12]!==A?(p=()=>({appendText:e=>{R(`${A} ${e}`)},setText:e=>{R(e)},focus:()=>{_.current?.focus()}}),x=[R,A,_],j[10]=_,j[11]=R,j[12]=A,j[13]=p,j[14]=x):(p=j[13],x=j[14]),(0,c.useImperativeHandle)(S,p,x),j[15]===Symbol.for("react.memo_cache_sentinel")?(g=(0,r.zw)(),j[15]=g):g=j[15];let $=g;j[16]!==O||j[17]!==P||j[18]!==_?(y=e=>{if(!(!$||O())&&_&&_.current){e.preventDefault();let t=window.getSelection();if(t&&t.anchorNode){let e={anchorNode:t.anchorNode,range:t.getRangeAt(0)},n=t.anchorNode.parentElement,i=n?.closest((0,d.Sp)(d.mU.issueComment))??n?.closest((0,d.Sp)(d.mU.issueBody));if(i&&i instanceof HTMLDivElement){let t=(0,u.E)(i,e);P(`${t}`)}}_.current.scrollIntoView(),_.current.focus()}},j[16]=O,j[17]=P,j[18]=_,j[19]=y):y=j[19];let F=y;j[20]!==_||j[21]!==B?(C=()=>{_.current?_.current.reset():L(""),B()},j[20]=_,j[21]=B,j[22]=C):C=j[22];let V=C;return j[23]===Symbol.for("react.memo_cache_sentinel")?(v=["r"],j[23]=v):v=j[23],j[24]!==E?(w={triggerWhenInputElementHasFocus:!1,triggerWhenPortalIsActive:E},j[24]=E,j[25]=w):w=j[25],(0,s._)(v,F,w),j[26]!==R||j[27]!==A||j[28]!==M||j[29]!==V?(b={handleMarkdownBodyChanged:R,markdownValidationResult:M,markdownBody:A,resetMarkdownBody:V},j[26]=R,j[27]=A,j[28]=M,j[29]=V,j[30]=b):b=j[30],b}},78093(e,t,n){n.d(t,{i:()=>o});var i=n(94527);function o(e,t,n=null,r="issue",a=!1){return e?i.k.repoArchived:a?i.k.repoLockedForMigration:t?i.k.issueLockedToCollaborators:n||i.k.canNotComment(r)}},37929(e,t,n){n.d(t,{d:()=>a});var i=n(74848),o=n(16522),r=n(13940);function a(e){let t,n,a=(0,o.c)(9),{status:s,oid:l,repo:c,badgeProps:d,descriptionString:m}=e;a[0]!==d?(t=void 0===d?{}:d,a[0]=d,a[1]=t):t=a[1];let u=t,h=void 0===m?"":m,[f,p]=(0,r.ym)(l,c),x=`${c.ownerLogin}/${c.name}`;return a[2]!==u||a[3]!==h||a[4]!==f||a[5]!==p||a[6]!==x||a[7]!==s?(n=s?(0,i.jsx)(r.B6,{disablePopover:!1,size:"small",statusRollup:s,combinedStatus:f,descriptionText:h,onWillOpenPopup:p,repositoryNwo:x,buttonClassName:"AsyncChecksStatusBadge-module__ChecksStatusBadge__wbwBt",...u}):null,a[2]=u,a[3]=h,a[4]=f,a[5]=p,a[6]=x,a[7]=s,a[8]=n):n=a[8],n}a.displayName="AsyncChecksStatusBadge"},66588(e,t,n){n.d(t,{$:()=>el,N:()=>es});var i=n(74848),o=n(96540),r=n(16522),a=n(22766),s=n(54242),l=n(36594),c=n(26316),d=n(38621),m=n(59134),u=n(21373),h=n(7771),f=n(34164),p=n(69895),x=n(89684),g=n(5823),y=n(16899);let C=()=>{let e,t=(0,r.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"d-flex gap-2",children:(0,i.jsx)("div",{className:"flex-1 border overflow-x-auto rounded-2 borderColor-muted color-shadow-small",children:(0,i.jsxs)("div",{className:"d-flex flex-column gap-2 tmp-m-3",children:[(0,i.jsxs)("div",{className:"d-flex flex-items-center gap-2",children:[(0,i.jsx)(y.O,{variant:"elliptical",height:"xl",width:"xl"}),(0,i.jsx)(y.O,{variant:"rounded",height:"sm",width:"150px"})]}),[void 0,void 0].map(v),(0,i.jsx)(g.e,{})]})})}),t[0]=e):e=t[0],e};function v(e,t){return(0,i.jsx)(y.O,{variant:"rounded",height:"sm",width:"random"},t)}C.displayName="CommentLoading";var w=n(22182),b=n(57053),j=n(43145),_=n(20875),S=n(38633),N=n(29886),k=n(38771),I=n(70415),E=n(96495),T=n(18292),D=n(11675),B=n(40442);let A=({ref:e=null,initialMarkdown:t,onCancel:n,onSave:r,referenceId:a,buttonText:s,commentContent:l})=>{let[c,d]=(0,o.useState)(!1),m=(0,o.useRef)(null),u=(0,o.useRef)(void 0),{commentBoxSubject:h}=(0,I.X)(),f=(0,o.useCallback)(()=>{},[]),{markdownBody:p,resetMarkdownBody:x,markdownValidationResult:g,handleMarkdownBodyChanged:y}=(0,B.x)({commentBoxRef:m,markdownComposerRef:e,onChange:f,onCancel:()=>{},referenceId:a,insidePortal:!1});(0,o.useEffect)(()=>{t&&!p&&y(t)},[t]),(0,o.useEffect)(()=>{if(l&&u.current!==l){y(l),u.current=l;let e=window.setTimeout(()=>{m.current&&(m.current?.scrollIntoView(),m.current?.focus())},0);return()=>{window.clearTimeout(e)}}},[l]),(0,o.useLayoutEffect)(()=>{if(m&&m.current){let e=window.setTimeout(()=>{m.current?.focus()},0);return()=>{window.clearTimeout(e)}}},[m]);let C=async()=>{d(!0),await r(p,x),d(!1)};return(0,i.jsx)(D.hF,{ref:m,validationResult:g,disabled:c,onChange:e=>{y(e)},onCancel:()=>{y(""),n?.()},onSave:C,saveButtonText:s,saveButtonTrailingIcon:!1,value:p,teamHovercardsEnabled:!0,fileUploadsEnabled:!0,subject:h})};function L(e){let t,n,a=(0,r.c)(10),{comment:s,commitOid:l,onCancel:c,onUpdate:d}=e,{editComment:m}=(0,I.X)(),u=(0,o.useRef)(null);a[0]!==s||a[1]!==m||a[2]!==d?(t=async e=>{let t=await m(e,s);t.updatedFields&&d({...s,...t.updatedFields})},a[0]=s,a[1]=m,a[2]=d,a[3]=t):t=a[3];let h=t,f=`${l}-${s.id}`;return a[4]!==s.body||a[5]!==l||a[6]!==c||a[7]!==h||a[8]!==f?(n=(0,i.jsx)(A,{commitOid:l,initialMarkdown:s.body,ref:u,onSave:h,onCancel:c,referenceId:f,buttonText:"Update comment"}),a[4]=s.body,a[5]=l,a[6]=c,a[7]=h,a[8]=f,a[9]=n):n=a[9],n}function M(e){let t,n,o=(0,r.c)(17),{comments:a,commit:s,locked:l,deleteComment:c,updateComment:d,setNewCommentContent:m,repoOwnerGlobalRelayId:u}=e;if(0===a.length)return null;if(o[0]!==a||o[1]!==s||o[2]!==c||o[3]!==l||o[4]!==u||o[5]!==m||o[6]!==d){let e;o[8]!==s||o[9]!==c||o[10]!==l||o[11]!==u||o[12]!==m||o[13]!==d?(e=e=>(0,i.jsx)(O,{comment:e,commit:s,locked:l,deleteComment:c,updateComment:d,setNewCommentContent:m,repoOwnerGlobalRelayId:u},e.id),o[8]=s,o[9]=c,o[10]=l,o[11]=u,o[12]=m,o[13]=d,o[14]=e):e=o[14],t=a.map(e),o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=m,o[6]=d,o[7]=t}else t=o[7];return o[15]!==t?(n=(0,i.jsx)("div",{className:"d-flex flex-column gap-3",children:t}),o[15]=t,o[16]=n):n=o[16],n}function O(e){let t,n,a,l,c,d,m,u,h,f,p,x=(0,r.c)(46),{comment:y,commit:C,locked:v,deleteComment:w,updateComment:b,setNewCommentContent:j,repoOwnerGlobalRelayId:_}=e,S=(0,s.t)(),[D,B]=(0,o.useState)(!1),[A,M]=(0,o.useState)(y.isHidden),O=(0,o.useRef)(null),{deleteComment:V,hideComment:U,unhideComment:H}=(0,I.X)();x[0]!==y.id||x[1]!==V||x[2]!==w?(t=async()=>{let e=await V(y.id.toString());"canceled"===e||"error"!==e&&"success"===e&&w(y.id)},x[0]=y.id,x[1]=V,x[2]=w,x[3]=t):t=x[3];let z=t;x[4]!==b?(n=e=>{b(e),B(!1)},x[4]=b,x[5]=n):n=x[5];let W=n;x[6]!==y||x[7]!==U||x[8]!==b?(a=async e=>{let t=await U(y.id.toString(),e);"error"!==t&&"success"===t&&(b({...y,isHidden:!0,minimizedReason:e}),M(!0))},x[6]=y,x[7]=U,x[8]=b,x[9]=a):a=x[9];let K=a;x[10]!==y||x[11]!==H||x[12]!==b?(l=async()=>{let e=await H(y.id.toString());"error"!==e&&"success"===e&&(b({...y,isHidden:!1,minimizedReason:null}),M(!1))},x[10]=y,x[11]=H,x[12]=b,x[13]=l):l=x[13];let Q=l,X=C.authors.length>0?C.authors[0]?.login:"";x[14]!==y||x[15]!==C||x[16]!==S||x[17]!==_?(c=(0,E.p)(y,C,S,_),x[14]=y,x[15]=C,x[16]=S,x[17]=_,x[18]=c):c=x[18],x[19]!==C.oid?(d=(0,T.F)(C.oid),x[19]=C.oid,x[20]=d):d=x[20],x[21]!==c||x[22]!==d?(m={...c,referenceText:d},x[21]=c,x[22]=d,x[23]=m):m=x[23];let G=m;x[24]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{B(!0)},x[24]=u):u=x[24];let Y=y.viewerCanReadUserContentEdits&&!!y.lastUserContentEdit;return x[25]!==y||x[26]!==X||x[27]!==A||x[28]!==z||x[29]!==K||x[30]!==Q||x[31]!==j||x[32]!==Y||x[33]!==G?(h=(0,i.jsx)(F,{comment:G,commentAuthorLogin:y.author.login,commentSubjectAuthorLogin:X,commentSubjectType:"commit",avatarUrl:y.author.avatarUrl,isMinimized:A,editComment:u,onReplySelect:j,onMinimize:M,navigate:$,hideComment:K,unhideComment:Q,deleteComment:z,commentRef:O,showEditHistory:Y,commitComment:y}),x[25]=y,x[26]=X,x[27]=A,x[28]=z,x[29]=K,x[30]=Q,x[31]=j,x[32]=Y,x[33]=G,x[34]=h):h=x[34],x[35]!==y||x[36]!==C.oid||x[37]!==D||x[38]!==A||x[39]!==v||x[40]!==W?(f=A?null:D?(0,i.jsx)("div",{className:"m-2",children:(0,i.jsx)(L,{comment:y,commitOid:C.oid,onUpdate:W,onCancel:()=>B(!1)})}):(0,i.jsxs)("div",{className:"d-flex flex-column tmp-m-3 gap-3",style:{gap:"12px"},children:[(0,i.jsx)("div",{className:"markdown-body","data-turbolinks":"false",children:(0,i.jsx)(N.G,{disabled:!1,verifiedHTML:y.htmlBody,markdownValue:y.body,onChange:R,onLinkClick:P,teamHovercardsEnabled:!0})}),(0,i.jsx)(o.Suspense,{fallback:(0,i.jsx)(g.e,{}),children:(0,i.jsx)(k.ReactionViewerRelayQueryComponent,{id:y.relayId,subjectLocked:v})})]}),x[35]=y,x[36]=C.oid,x[37]=D,x[38]=A,x[39]=v,x[40]=W,x[41]=f):f=x[41],x[42]!==y.urlFragment||x[43]!==h||x[44]!==f?(p=(0,i.jsxs)("div",{className:"border rounded-2",ref:O,id:y.urlFragment,tabIndex:-1,children:[h,f]}),x[42]=y.urlFragment,x[43]=h,x[44]=f,x[45]=p):p=x[45],p}function P(){}function R(){}function $(){}function F(e){let t,n,a,s,l,c,d=(0,r.c)(15);d[0]!==e?({hideActions:t,...n}=e,d[0]=e,d[1]=t,d[2]=n):(t=d[1],n=d[2]);let m=n.commitComment;if(n.showEditHistory){let e,t;d[3]!==m.relayId?(e=(0,i.jsx)(o.Suspense,{fallback:null,children:(0,i.jsx)(H,{id:m.relayId})}),d[3]=m.relayId,d[4]=e):e=d[4],l=e,d[5]!==n.comment.id?(t=(0,i.jsx)(z,{id:n.comment.id}),d[5]=n.comment.id,d[6]=t):t=d[6],c=t}return d[7]!==t||d[8]!==n?(a=t?void 0:(0,i.jsx)(b.p,{onSuccessfulBlock:V,...n}),d[7]=t,d[8]=n,d[9]=a):a=d[9],d[10]!==l||d[11]!==c||d[12]!==n||d[13]!==a?(s=(0,i.jsx)(w.v,{lastEditedByMessage:c,editHistoryComponent:l,forceInlineAvatar:!0,...n,actions:a}),d[10]=l,d[11]=c,d[12]=n,d[13]=a,d[14]=s):s=d[14],s}function V(){setTimeout(U,800)}function U(){return c.cg?.location.reload()}function H(e){let t,n,o=(0,r.c)(4),{id:a}=e;o[0]!==a?(t={id:a},o[0]=a,o[1]=t):t=o[1];let s=(0,S.f)(t);return o[2]!==s?(n=s?(0,i.jsx)(j.W,{editHistory:s}):null,o[2]=s,o[3]=n):n=o[3],n}function z(e){let t,n,o=(0,r.c)(4),{id:a}=e;o[0]!==a?(t={id:a},o[0]=a,o[1]=t):t=o[1];let s=(0,S.f)(t);return o[2]!==s?(n=s?(0,i.jsx)(_._,{editInformation:s}):null,o[2]=s,o[3]=n):n=o[3],n}A.displayName="CommitCommentEditor",L.displayName="UpdateCommitComment",M.displayName="ExistingCommitComments",O.displayName="ExistingCommitComment",F.displayName="CommitCommentHeader",H.displayName="CommitCommentHeaderEditHistory",z.displayName="CommitCommentHeaderLastEditedBy";var W=n(23666),K=n(50964),Q=n(78597),X=n(26707);function G(e){let t,n,a,l,c,d,u,h,f,p,x=(0,r.c)(33),{commitOid:g,locked:y,onClose:C}=e,v=(0,s.t)(),{helpUrl:w}=(0,K.X)(),[b,j]=(0,o.useState)(!1),_=y?"Unlock":"Lock",S=y?"lock":"unlock";x[0]!==g||x[1]!==C||x[2]!==v?(t=async()=>{(await (0,Q.DI)(`${(0,W.$Qz)({owner:v.ownerLogin,repo:v.name,commitish:g})}/lock`,{method:"PUT",headers:{Accept:"application/json"}})).ok?C(!0):j(!0)},x[0]=g,x[1]=C,x[2]=v,x[3]=t):t=x[3];let N=t;x[4]!==g||x[5]!==C||x[6]!==v?(n=async()=>{(await (0,Q.lS)(`${(0,W.$Qz)({owner:v.ownerLogin,repo:v.name,commitish:g})}/unlock`,{method:"PUT",headers:{Accept:"application/json"}})).ok?C(!1):j(!0)},x[4]=g,x[5]=C,x[6]=v,x[7]=n):n=x[7];let k=n;x[8]!==C?(a=()=>C(),x[8]=C,x[9]=a):a=x[9];let I=`${_} conversation on this commit`,E=`${_} conversation`;x[10]===Symbol.for("react.memo_cache_sentinel")?(l={width:"100%"},x[10]=l):l=x[10];let T=y?k:N;return x[11]!==E||x[12]!==T?(c=[{content:E,buttonType:"danger",style:l,onClick:T}],x[11]=E,x[12]=T,x[13]=c):c=x[13],x[14]!==_||x[15]!==b?(d=b&&(0,i.jsxs)(m.A,{className:"mb-2",variant:"danger",children:["There was an error ",_.toLocaleLowerCase(),"ing this conversation. Please try again."]}),x[14]=_,x[15]=b,x[16]=d):d=x[16],x[17]!==_?(u=(0,i.jsxs)("p",{children:[_,"ing the conversation means:"]}),x[17]=_,x[18]=u):u=x[18],x[19]!==w||x[20]!==y||x[21]!==v?(h=(0,i.jsx)("ul",{className:"tmp-ml-4",children:y?(0,i.jsxs)("li",{children:[(0,i.jsx)("strong",{children:"Everyone"})," will be able to comment on this commit once more."]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("li",{children:["Other users ",(0,i.jsx)("strong",{children:"can\u2019t add new comments"})," to this commit."]}),v.isOrgOwned?(0,i.jsxs)("li",{children:["You and other members of teams with"," ",(0,i.jsx)("a",{href:`${w}/get-started/learning-about-github/access-permissions-on-github`,children:"write access"})," ","to this repository ",(0,i.jsx)("strong",{children:"can still leave comments"})," that others can see."]}):(0,i.jsxs)("li",{children:["You and other collaborators"," ",(0,i.jsx)("a",{href:`${w}/get-started/learning-about-github/access-permissions-on-github`,children:"with access"})," to this repository ",(0,i.jsx)("strong",{children:"can still leave comments"})," that others can see."]})]})}),x[19]=w,x[20]=y,x[21]=v,x[22]=h):h=x[22],x[23]!==S?(f=(0,i.jsxs)("p",{className:"mb-0 mt-2",children:["You can always ",S," this commit again in the future."]}),x[23]=S,x[24]=f):f=x[24],x[25]!==u||x[26]!==h||x[27]!==f||x[28]!==a||x[29]!==I||x[30]!==c||x[31]!==d?(p=(0,i.jsxs)(X.l,{onClose:a,width:"large",title:I,footerButtons:c,children:[d,u,h,f]}),x[25]=u,x[26]=h,x[27]=f,x[28]=a,x[29]=I,x[30]=c,x[31]=d,x[32]=p):p=x[32],p}G.displayName="LockConversationDialog";var Y=n(7909),q=n(93899),J=n(78093),Z=n(34810),ee=n(93238),et=n(206);function en(e){let t,n,a,s,l,m=(0,r.c)(16),{commitOid:u,onAddComment:h,onExpandCommentEditor:f,newCommentContent:p,canComment:x,locked:g,repoArchived:y,avatarURL:C}=e;m[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,Y.M3)(),m[0]=t):t=m[0];let v=t,{addComment:w}=(0,I.X)(),b=(0,o.useRef)(null);m[1]!==w||m[2]!==h?(n=async(e,t)=>{let n=await w(e);n.comment&&(h(n.comment),t())},m[1]=w,m[2]=h,m[3]=n):n=m[3];let j=n;m[4]===Symbol.for("react.memo_cache_sentinel")?(a=v?void 0:(0,i.jsx)(eo,{redirectUrl:c.fV?.href}),m[4]=a):a=m[4],m[5]!==g||m[6]!==y?(s=(0,J.i)(y,g,a,"commit"),m[5]=g,m[6]=y,m[7]=s):s=m[7];let _=s;return m[8]!==C||m[9]!==x||m[10]!==u||m[11]!==p||m[12]!==f||m[13]!==j||m[14]!==_?(l=(0,i.jsx)("div",{className:"d-flex flex-column gap-2 tmp-pt-3",children:x?(0,i.jsx)(ei,{commitOid:u,commentEditor:b,onExpandEditor:f,onSave:j,newCommentContent:p,avatarURL:C||ee.t.ghostUser.avatarUrl}):(0,i.jsx)(q.P,{icon:d.LockIcon,reason:_})}),m[8]=C,m[9]=x,m[10]=u,m[11]=p,m[12]=f,m[13]=j,m[14]=_,m[15]=l):l=m[15],l}function ei(e){let[t,n]=(0,o.useState)(()=>void 0!==e.newCommentContent),[r,s]=(0,o.useState)(e.newCommentContent);t||void 0===e.newCommentContent||r===e.newCommentContent||(n(!0),s(e.newCommentContent));let l="Comment";return t?(0,i.jsx)("div",{id:a.Bq.issueCommentComposer,children:(0,i.jsx)(A,{commitOid:e.commitOid,ref:e.commentEditor,onSave:e.onSave,referenceId:`new-discussion-comment-${e.commitOid}`,commentContent:e.newCommentContent,initialMarkdown:e.newCommentContent,buttonText:l,onCancel:()=>{n(!1)}})}):(0,i.jsxs)("div",{id:a.Bq.issueCommentComposer,className:"d-flex flex-items-center border rounded-2 p-2 gap-2 color-bg-subtle",children:[(0,i.jsx)(et.r,{src:e.avatarURL,size:20}),(0,i.jsx)(Z.z,{onClick:()=>{n(!0),e.onExpandEditor?.()},children:l})]})}function eo(e){let t,n=(0,r.c)(2),{redirectUrl:o}=e,a=o?`/login?return_to=${o}`:"/login";return n[0]!==a?(t=(0,i.jsxs)("span",{children:["Please ",(0,i.jsx)("a",{href:a,children:"sign in"})," to comment."]}),n[0]=a,n[1]=t):t=n[1],t}en.displayName="NewCommitComment",ei.displayName="CompactEditor",eo.displayName="LoggedOutMessage";var er=n(29207);let ea=e=>{let t,n,a,l,c,m=(0,r.c)(15),{ref:h,commitOid:f,subscribed:p}=e,[x,g]=(0,o.useState)(p),[y,C]=(0,o.useState)(!1),v=(0,s.t)(),w=(0,er.H)("/notifications/thread","post");t=y?`You're now ${x?"subscribed":"unsubscribed"} to this thread.`:x?"You're receiving notifications because you're subscribed to this thread.":"You're not receiving notifications from this thread.",m[0]!==f||m[1]!==v.id||m[2]!==x||m[3]!==w?(n=async()=>{let e=new FormData;e.append("repository_id",v.id.toString()),e.append("thread_id",f),e.append("thread_class","Commit"),e.append("id",x?"unsubscribe":"subscribe"),e.append("authenticity_token",w??""),(await (0,Q.DI)("/notifications/thread",{method:"POST",body:e})).ok&&(g(!x),C(!0))},m[0]=f,m[1]=v.id,m[2]=x,m[3]=w,m[4]=n):n=m[4];let b=n,j=x?d.BellSlashIcon:d.BellIcon,_=x?"Unsubscribe":"Subscribe";return m[5]!==j||m[6]!==_||m[7]!==b?(a=(0,i.jsx)(u.Q,{onClick:b,size:"small",leadingVisual:j,children:_}),m[5]=j,m[6]=_,m[7]=b,m[8]=a):a=m[8],m[9]!==t?(l=(0,i.jsx)("p",{role:"status",className:"f6 fgColor-muted mb-0",children:t}),m[9]=t,m[10]=l):l=m[10],m[11]!==h||m[12]!==a||m[13]!==l?(c=(0,i.jsxs)("div",{className:"d-flex flex-items-center border rounded-2 p-2 gap-2",ref:h,children:[a,l]}),m[11]=h,m[12]=a,m[13]=l,m[14]=c):c=m[14],c};ea.displayName="NotificationsFooter",ea.displayName="NotificationsFooter";let es="comments";function el(e){let t,n,s=(0,r.c)(3);return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,f.$)("d-flex flex-column gap-2 tmp-pt-3",a.mU.commentsContainer,"Comment-module__commit-discussion-comments___VBnj"),s[0]=t):t=s[0],s[1]!==e?(n=(0,i.jsx)("div",{className:t,id:es,children:(0,o.createElement)(ec,{...e,key:e.commit.oid})}),s[1]=e,s[2]=n):n=s[2],n}function ec(e){let t,n,a,d,h,f,g,y,v,w,b,j,_=(0,r.c)(50),{commit:S,commentInfo:N,repoOwnerGlobalRelayId:k}=e,I=(0,s.t)(),E=(0,l.i)(),{retry:T,loadMore:D,canLoadMore:B,addComment:A,deleteComment:L,updateComment:O,count:P,comments:R,subscribed:$,providerState:F}=(0,p.y)(),[V,U]=(0,o.useState)(void 0),[H,z]=(0,o.useState)(N.locked);_[0]!==S.oid||_[1]!==I.id?(t=(0,x.N)(S.oid,I.id),_[0]=S.oid,_[1]=I.id,_[2]=t):t=_[2];let W=t,K=(0,o.useRef)(null);_[3]!==R?(n=()=>{if(c.cg?.location.hash){let e=c.cg.location.hash.slice(1);if(R.find(t=>t.urlFragment===e)){let t=document.getElementById(e);t&&(t.scrollIntoView(),t.focus())}}},a=[R],_[3]=R,_[4]=n,_[5]=a):(n=_[4],a=_[5]),(0,o.useEffect)(n,a),_[6]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{setTimeout(()=>K.current?.scrollIntoView({behavior:"smooth",block:"nearest"}),0)},_[6]=d):d=_[6];let Q=d;return _[7]!==P||_[8]!==N.canLock||_[9]!==S.oid||_[10]!==H?(h=(0,i.jsx)(em,{commitOid:S.oid,commentCount:P,canLock:N.canLock,locked:H,setLocked:z}),_[7]=P,_[8]=N.canLock,_[9]=S.oid,_[10]=H,_[11]=h):h=_[11],_[12]!==F?(f="loading"===F&&(0,i.jsx)(C,{}),_[12]=F,_[13]=f):f=_[13],_[14]!==F||_[15]!==T?(g="error"===F&&(0,i.jsxs)(m.A,{className:"d-flex flex-justify-between flex-items-center",variant:"danger",children:[(0,i.jsx)("span",{children:"Failed to load comments."}),(0,i.jsx)(u.Q,{onClick:()=>T(),children:"Retry"})]}),_[14]=F,_[15]=T,_[16]=g):g=_[16],_[17]!==B||_[18]!==D||_[19]!==F?(y="loaded"===F&&B&&(0,i.jsx)(u.Q,{className:"width-full",onClick:()=>D(),children:"Load more comments"}),_[17]=B,_[18]=D,_[19]=F,_[20]=y):y=_[20],_[21]!==R||_[22]!==S||_[23]!==L||_[24]!==H||_[25]!==k||_[26]!==O?(v=(0,i.jsx)(M,{comments:R,commit:S,locked:H,repoOwnerGlobalRelayId:k,deleteComment:L,updateComment:O,setNewCommentContent:U}),_[21]=R,_[22]=S,_[23]=L,_[24]=H,_[25]=k,_[26]=O,_[27]=v):v=_[27],_[28]!==W?(w=W?(0,i.jsx)("div",{className:"text-center",children:[...Array(38)].map(ed)}):null,_[28]=W,_[29]=w):w=_[29],_[30]!==A||_[31]!==N.canComment||_[32]!==N.commitCommentsEnabled||_[33]!==N.repoArchived||_[34]!==R||_[35]!==S.oid||_[36]!==E||_[37]!==H||_[38]!==V||_[39]!==F||_[40]!==$?(b="loaded"===F||0!==R.length?(0,i.jsxs)(i.Fragment,{children:[N.commitCommentsEnabled??!0?(0,i.jsx)(en,{commitOid:S.oid,onAddComment:A,onExpandCommentEditor:Q,newCommentContent:V,canComment:N.canComment,locked:H,repoArchived:N.repoArchived,avatarURL:E?.avatarURL}):null,E?(0,i.jsx)(ea,{ref:K,commitOid:S.oid,subscribed:$??!1}):null]}):null,_[30]=A,_[31]=N.canComment,_[32]=N.commitCommentsEnabled,_[33]=N.repoArchived,_[34]=R,_[35]=S.oid,_[36]=E,_[37]=H,_[38]=V,_[39]=F,_[40]=$,_[41]=b):b=_[41],_[42]!==w||_[43]!==b||_[44]!==h||_[45]!==f||_[46]!==g||_[47]!==y||_[48]!==v?(j=(0,i.jsxs)(i.Fragment,{children:[h,f,g,y,v,w,b]}),_[42]=w,_[43]=b,_[44]=h,_[45]=f,_[46]=g,_[47]=y,_[48]=v,_[49]=j):j=_[49],j}function ed(e,t){return(0,i.jsx)("img",{alt:"rose",src:"/images/icons/emoji/rose.png",className:"Comment-module__discussion-comments-rose__sMl1p"},`rose-${t}`)}function em(e){let t,n,a,s,l,c,m=(0,r.c)(17),{commitOid:f,commentCount:p,locked:x,setLocked:g,canLock:y}=e,[C,v]=(0,o.useState)(!1);return m[0]!==p?(t=(0,i.jsxs)("h2",{className:"sr-only",children:[p," commit comments"]}),m[0]=p,m[1]=t):t=m[1],m[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)("div",{className:"h4 pr-2",children:"Comments"}),m[2]=n):n=m[2],m[3]!==p?(a=void 0!==p&&(0,i.jsx)(h.A,{children:p}),m[3]=p,m[4]=a):a=m[4],m[5]!==a?(s=(0,i.jsxs)("div",{className:"d-flex flex-items-center",children:[n,a]}),m[5]=a,m[6]=s):s=m[6],m[7]!==y||m[8]!==f||m[9]!==C||m[10]!==x||m[11]!==g?(l=y&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(u.Q,{leadingVisual:x?d.KeyIcon:d.LockIcon,variant:"invisible",onClick:()=>v(!0),children:[x?"Unlock":"Lock"," conversation"]}),C&&(0,i.jsx)(G,{commitOid:f,locked:x,onClose:e=>{v(!1),void 0!==e&&g(e)}})]}),m[7]=y,m[8]=f,m[9]=C,m[10]=x,m[11]=g,m[12]=l):l=m[12],m[13]!==t||m[14]!==s||m[15]!==l?(c=(0,i.jsxs)("div",{className:"d-flex flex-items-center flex-justify-between",children:[t,s,l]}),m[13]=t,m[14]=s,m[15]=l,m[16]=c):c=m[16],c}el.displayName="DiscussionComments",ec.displayName="DiscussionCommentsInternal",em.displayName="DiscussionCommentsHeader"},73286(e,t,n){n.d(t,{C:()=>m,j:()=>d});var i=n(74848),o=n(16522),r=n(36570),a=n(16899),s=n(19519),l=n(62935),c=n(80855);function d(e){let t,n,d,m,u=(0,o.c)(18),{commit:h,repo:f,children:p,settings:x,textVariant:g}=e,y=(0,c.NO)(h.oid),{isServer:C}=(0,s.V)(),v=y?.onBehalfOf;return u[0]!==x?(t={fontWeight:"var(--base-text-weight-normal)",fontColor:"var(--fgColor-muted)",avatarSize:16,...x},u[0]=x,u[1]=t):t=u[1],u[2]!==h.committedDate||u[3]!==C?(n=!C&&(0,i.jsx)(l.A,{className:"pl-1",datetime:h.committedDate}),u[2]=h.committedDate,u[3]=C,u[4]=n):n=u[4],u[5]!==C?(d=C&&(0,i.jsx)(a.O,{variant:"rounded",className:"d-none d-sm-flex ml-1",width:"60px"}),u[5]=C,u[6]=d):d=u[6],u[7]!==p||u[8]!==h.authors||u[9]!==h.committer||u[10]!==h.committerAttribution||u[11]!==f||u[12]!==v||u[13]!==t||u[14]!==n||u[15]!==d||u[16]!==g?(m=(0,i.jsxs)(r.jF,{authors:h.authors,committer:h.committer,committerAttribution:h.committerAttribution,onBehalfOf:v,repo:f,includeVerbs:!0,authorSettings:t,textVariant:g,children:[n,d,p]}),u[7]=p,u[8]=h.authors,u[9]=h.committer,u[10]=h.committerAttribution,u[11]=f,u[12]=v,u[13]=t,u[14]=n,u[15]=d,u[16]=g,u[17]=m):m=u[17],m}function m(e){let t,n,c,d=(0,o.c)(11),{commit:m,repo:u,textVariant:h}=e,{isServer:f}=(0,s.V)();return d[0]!==m.pushedDate||d[1]!==f?(t=!f&&(0,i.jsx)(l.A,{className:"pl-1",datetime:m.pushedDate}),d[0]=m.pushedDate,d[1]=f,d[2]=t):t=d[2],d[3]!==f?(n=f&&(0,i.jsx)(a.O,{variant:"rounded",className:"d-none d-sm-flex ml-1",width:"60px"}),d[3]=f,d[4]=n):n=d[4],d[5]!==m.pusher||d[6]!==u||d[7]!==t||d[8]!==n||d[9]!==h?(c=(0,i.jsxs)(r.Cf,{pusher:m.pusher,repo:u,textVariant:h,children:[t,n]}),d[5]=m.pusher,d[6]=u,d[7]=t,d[8]=n,d[9]=h,d[10]=c):c=d[10],c}d.displayName="CommitAttribution",m.displayName="PushAttribution"},27020(e,t,n){n.d(t,{s:()=>f});var i=n(74848),o=n(16522),r=n(38621),a=n(11882),s=n(46249),l=n(10095),c=n(34164);let d={timelineRowItem:"TimelineRow-module__timelineRowItem__feuol",timelineRowBadge:"TimelineRow-module__timelineRowBadge__YaFlf",bottom:"TimelineRow-module__bottom__wWHQx",top:"TimelineRow-module__top__wbFNk"},m=()=>{let e,t=(0,o.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(l.A,{icon:r.GitCommitIcon}),t[0]=e):e=t[0],e};function u(e){let t,n,r,s,l,u=(0,o.c)(13),{children:h,leadingVisual:f,clipTimeline:p,className:x}=e,g=void 0===p?"none":p,y="none"!==g&&d[g];return u[0]!==x||u[1]!==y?(t=(0,c.$)(x,d.timelineRowItem,y),u[0]=x,u[1]=y,u[2]=t):t=u[2],u[3]!==f?(n=f??(0,i.jsx)(m,{}),u[3]=f,u[4]=n):n=u[4],u[5]!==n?(r=(0,i.jsx)(a.A.Badge,{className:d.timelineRowBadge,children:n}),u[5]=n,u[6]=r):r=u[6],u[7]!==h?(s=(0,i.jsx)(a.A.Body,{className:"mt-0",children:h}),u[7]=h,u[8]=s):s=u[8],u[9]!==t||u[10]!==r||u[11]!==s?(l=(0,i.jsxs)(a.A.Item,{className:t,children:[r,s]}),u[9]=t,u[10]=r,u[11]=s,u[12]=l):l=u[12],l}function h(e){let t,n,r,a,l=(0,o.c)(8);return l[0]!==e?({title:r,as:t,...n}=e,l[0]=e,l[1]=t,l[2]=n,l[3]=r):(t=l[1],n=l[2],r=l[3]),l[4]!==t||l[5]!==n||l[6]!==r?(a=(0,i.jsx)(s.A,{as:t,className:"text-normal f5 py-1",...n,children:r}),l[4]=t,l[5]=n,l[6]=r,l[7]=a):a=l[7],a}m.displayName="DefaultLeadingVisual",u.displayName="TimelineRowComponent",h.displayName="TimelineRowHeading";let f=Object.assign(u,{Heading:h})},50531(e,t,n){n.d(t,{w:()=>c});var i=n(74848),o=n(16522),r=n(45360),a=n(51581),s=n(11246),l=n(18292);function c(e){let t,n,c,d,m,u=(0,o.c)(17),{sha:h,direction:f,className:p}=e,x=void 0===f?"s":f,{sendAnalyticsEvent:g}=(0,a.s)(),{loggingPrefix:y,loggingPayload:C}=(0,s.xe)(),v=(0,s.eX)();u[0]!==C||u[1]!==y||u[2]!==g||u[3]!==v?(t=()=>{v&&g(`${y}click`,"COPY_SHA_CLICKED",C)},u[0]=C,u[1]=y,u[2]=g,u[3]=v,u[4]=t):t=u[4];let w=t;u[5]!==h?(n=(0,l.F)(h),u[5]=h,u[6]=n):n=u[6];let b=`Copy full SHA for ${n}`;return u[7]!==x?(c={direction:x},u[7]=x,u[8]=c):c=u[8],u[9]!==p||u[10]!==h||u[11]!==b||u[12]!==c?(d=(0,i.jsx)(r.T,{textToCopy:h,ariaLabel:b,tooltipProps:c,size:"small",className:p}),u[9]=p,u[10]=h,u[11]=b,u[12]=c,u[13]=d):d=u[13],u[14]!==w||u[15]!==d?(m=(0,i.jsx)("div",{onClick:w,children:d}),u[14]=w,u[15]=d,u[16]=m):m=u[16],m}c.displayName="CopySHA"},87(e,t,n){n.d(t,{C:()=>s});var i=n(74848),o=n(19512),r=n(16899),a=n(37929);function s({deferredData:e,oid:t,repo:n,helpUrl:l}){let c=void 0===e,d="";try{d=e?.statusCheckStatus?.short_text?.split("checks")[0]?.trim()||""}catch{}return(0,i.jsxs)(i.Fragment,{children:[c&&(0,i.jsx)(r.O,{className:"ml-2",variant:"rounded",width:"62px"}),e?.statusCheckStatus&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"d-flex ml-2 mr-1",children:"\xb7"}),(0,i.jsx)(a.d,{oid:t,status:e?.statusCheckStatus?.state,descriptionString:d,repo:n}),e?.signatureInformation&&e?.verifiedStatus!=="unsigned"&&(0,i.jsx)("span",{className:"d-flex ml-2",children:"\xb7"})]}),e?.signatureInformation&&(0,i.jsx)("div",{className:"ml-2",children:(0,i.jsx)(o.h,{commitOid:t,hasSignature:!0,verificationStatus:e.verifiedStatus,signature:{helpUrl:l,...e.signatureInformation}})})]})}s.displayName="DeferredCommitHeaderData"},91710(e,t,n){n.d(t,{Z:()=>a});var i=n(74848),o=n(16522),r=n(34164);function a(e){let t,n,a=(0,o.c)(5),{children:s,className:l}=e,c=void 0===l?"":l;return a[0]!==c?(t=(0,r.$)("color-bg-default position-relative border rounded-2 color-border-default mt-2 d-flex flex-column",c),a[0]=c,a[1]=t):t=a[1],a[2]!==s||a[3]!==t?(n=(0,i.jsx)("div",{className:t,children:s}),a[2]=s,a[3]=t,a[4]=n):n=a[4],n}a.displayName="Panel"},11246(e,t,n){n.d(t,{eX:()=>l,xe:()=>c,zq:()=>s});var i=n(74848),o=n(16522),r=n(96540);let a=(0,r.createContext)({loggingPayload:void 0,loggingPrefix:void 0});function s(e){let t,n=(0,o.c)(3),{children:r,loggingInfo:s}=e;return n[0]!==r||n[1]!==s?(t=(0,i.jsx)(a,{value:s,children:r}),n[0]=r,n[1]=s,n[2]=t):t=n[2],t}function l(){let e=(0,r.use)(a);return void 0!==e.loggingPayload&&void 0!==e.loggingPrefix}function c(){return(0,r.use)(a)}a.displayName="CommitsLoggingContext",s.displayName="CommitsLoggingInfoProvider"},80855(e,t,n){n.d(t,{M2:()=>c,NO:()=>d,UI:()=>a,Xx:()=>s,ej:()=>u,xs:()=>m});var i=n(74848),o=n(16522),r=n(96540);let a={deferredCommits:[],renameHistory:null,loading:!0},s={deferredCommits:[],renameHistory:null,loading:!1},l=(0,r.createContext)(a);function c(e){let t,n=(0,o.c)(3),{children:r,deferredData:a}=e;return n[0]!==r||n[1]!==a?(t=(0,i.jsx)(l,{value:a,children:r}),n[0]=r,n[1]=a,n[2]=t):t=n[2],t}function d(e){let t=(0,r.use)(l),n=t.error,i=t.deferredCommits?.find(t=>t?.oid===e);return n&&void 0===i&&(i={oid:e,statusCheckStatus:void 0}),i}function m(){return(0,r.use)(l).loading}function u(){return(0,r.use)(l).renameHistory}l.displayName="DeferredCommitDataContext",c.displayName="DeferredCommitDataProvider"},69895(e,t,n){n.d(t,{c:()=>c,y:()=>d});var i=n(74848),o=n(52111),r=n(23666),a=n(78597),s=n(96540);let l=(0,s.createContext)({comments:[],addComment:o.l,deleteComment:o.l,updateComment:o.l,loadMore:o.l,retry:o.l,canLoadMore:!1,count:0,subscribed:!1,providerState:"initial"});function c({children:e,comments:t=[],commentCount:n=0,canLoadMore:o=!1,subscribed:d=!1,providerState:m="initial",repo:u,commitOid:h}){let[f,p]=(0,s.useState)(t),[x,g]=(0,s.useState)(n),[y,C]=(0,s.useState)(o),[v,w]=(0,s.useState)(m),[b,j]=(0,s.useState)(d);(0,s.useEffect)(()=>{g(n),p(t),C(o),j(d),w(m)},[m]);let _=(0,s.useCallback)(async e=>{w("loading");let t=await (0,a.Sr)((0,r.Mo3)({owner:u.ownerLogin,repo:u.name,commitOid:h,beforeCommentId:e}));if(t.ok){let n=await t.json();e?p(e=>[...n.comments,...e]):p(n.comments),w("loaded"),g(n.count),j(n.subscribed),C(n.canLoadMore)}else w("error")},[u.ownerLogin,u.name,h]),S=(0,s.useCallback)(()=>{let e=f[0];e&&y&&_(e.id.toString())},[y,f,_]),N=(0,s.useCallback)(e=>{p([...f,e]),g((x??0)+1)},[f,x]),k=(0,s.useCallback)(e=>{p(f.filter(t=>t.id!==e)),g((x??0)-1)},[f,x]),I=(0,s.useCallback)(e=>{p(f.map(t=>t.id===e.id?e:t))},[f]),E=(0,s.useMemo)(()=>({addComment:N,canLoadMore:y,comments:f,count:x,deleteComment:k,loadMore:S,retry:_,subscribed:b,providerState:v,updateComment:I}),[N,y,f,x,k,_,S,v,b,I]);return(0,i.jsx)(l,{value:E,children:e})}function d(){let e=(0,s.use)(l);if(!e)throw Error("useDiscussionComments must be used within a DiscussionCommentsProvider");return e}l.displayName="DiscussionCommentsContext",c.displayName="DiscussionCommentsProvider"},99766(e,t,n){n.d(t,{B:()=>p,r:()=>d});var i=n(74848),o=n(16522),r=n(52111),a=n(96540);let s=(0,a.createContext)({comments:[],addComments:r.l,findInlineComment:()=>void 0,findInlineCommentWithRelay:()=>void 0,getCommentCountByPath:()=>0,getThreadDataByPathAndPosition:()=>void 0,updateInlineCommentMapWithNewComment:()=>void 0,getInlineCommentInfoByPathAndPosition:()=>void 0});function l(e){return e.reduce((e,t)=>(e.set(`${t.path}::${t.position}`,t),e),new Map)}function c(e){let t=new Map;for(let n in e)if(e.hasOwnProperty(n)){let i=new Map;for(let t in e[n])e[n].hasOwnProperty(t)&&i.set(Number(t),e[n][Number(t)]);t.set(n,i)}return t}function d(e){let t,n,r,d,p,x,g,y,C,v,w,b,j,_,S,N=(0,o.c)(41),{children:k,initialFiles:I,initialExpandedThreadId:E,initialInlineComments:T}=e;N[0]!==T?(t=()=>T?Object.values(T).flatMap(f):[],N[0]=T,N[1]=t):t=N[1];let[D,B]=(0,a.useState)(t);N[2]!==I?(n=I??[],N[2]=I,N[3]=n):n=N[3];let[A,L]=(0,a.useState)(n);N[4]!==I?(r=()=>I?l(I):new Map,N[4]=I,N[5]=r):r=N[5];let[M,O]=(0,a.useState)(r);N[6]!==T?(d=()=>T?c(T):new Map,N[6]=T,N[7]=d):d=N[7];let[P,R]=(0,a.useState)(d);N[8]!==P?(p=(e,t,n,i)=>{if(i){let i=P.get(e)?.get(t)??[];i=i.concat(n);let o=P.get(e)?.set(t,i);R(P.set(e,o??new Map)??P)}else{let i=P.get(e)?.set(t,n);R(P.set(e,i??new Map)??P)}},N[8]=P,N[9]=p):p=N[9];let $=p;N[10]!==I||N[11]!==T?(x=()=>{L(I??[]),O(I?l(I):new Map),R(T?c(T):new Map),B(T?Object.values(T).flatMap(h):[])},g=[I,T],N[10]=I,N[11]=T,N[12]=x,N[13]=g):(x=N[12],g=N[13]),(0,a.useEffect)(x,g),N[14]!==A||N[15]!==D||N[16]!==$?(y=(e,t,n)=>{let i=e.map(u),o=D.filter(e=>!i.includes(e.id)),r=A.filter(e=>e.path!==t||e.position!==parseInt(n)),a={path:t,position:parseInt(n),count:e.length,threads:[{id:`${t}::${n}`,diffSide:"RIGHT",commentsData:{totalCount:e.length,comments:e.map(m)}}]};B([...o,...e]),L([...r,a]),O(l([...r,a])),$(t,parseInt(n),e,!1)},N[14]=A,N[15]=D,N[16]=$,N[17]=y):y=N[17];let F=y;N[18]!==D?(C=e=>{if(e)return D.find(t=>t.id===e)},N[18]=D,N[19]=C):C=N[19];let V=C;N[20]!==D?(v=e=>D.find(t=>t.relayId===e),N[20]=D,N[21]=v):v=N[21];let U=v;N[22]!==A?(w=e=>{let t=0;for(let n of A)n.path===e&&(t+=n.count);return t},N[22]=A,N[23]=w):w=N[23];let H=w;N[24]!==M?(b=(e,t)=>M.get(`${e}::${t}`),N[24]=M,N[25]=b):b=N[25];let z=b;N[26]!==P?(j=(e,t)=>P.get(e)?.get(t),N[26]=P,N[27]=j):j=N[27];let W=j;N[28]!==F||N[29]!==D||N[30]!==V||N[31]!==U||N[32]!==H||N[33]!==W||N[34]!==z||N[35]!==E||N[36]!==$?(_={comments:D,addComments:F,findInlineComment:V,findInlineCommentWithRelay:U,getCommentCountByPath:H,getThreadDataByPathAndPosition:z,getInlineCommentInfoByPathAndPosition:W,updateInlineCommentMapWithNewComment:$,initialExpandedThreadId:E},N[28]=F,N[29]=D,N[30]=V,N[31]=U,N[32]=H,N[33]=W,N[34]=z,N[35]=E,N[36]=$,N[37]=_):_=N[37];let K=_;return N[38]!==k||N[39]!==K?(S=(0,i.jsx)(s,{value:K,children:k}),N[38]=k,N[39]=K,N[40]=S):S=N[40],S}function m(e){return{id:e.id,author:{avatarUrl:e?.author?.avatarUrl??"",login:e?.author?.login??"",url:""}}}function u(e){return e.id}function h(e){return Array.from(Object.values(e).flat())}function f(e){return Array.from(Object.values(e).flat())}function p(){let e=(0,a.use)(s);if(!e)throw Error("useInlineComments must be used within a InlineCommentsProvider");return e}s.displayName="InlineCommentsContext",d.displayName="InlineCommentsProvider"},70415(e,t,n){n.d(t,{X:()=>l});var i=n(16522),o=n(54242),r=n(95424),a=n(65594),s=n(78597);function l(){let e,t,n,l,c,d,m,u,h,f,p,x=(0,i.c)(30),g=(0,o.t)(),{commit:y}=(0,a.B)();x[0]!==g.ownerLogin?(e=(0,r.QU)(g.ownerLogin),x[0]=g.ownerLogin,x[1]=e):e=x[1],x[2]!==g.name?(t=(0,r.QU)(g.name),x[2]=g.name,x[3]=t):t=x[3];let C=`/${e}/${t}/commit_comment`,v=`${C}/create`;x[4]!==y.oid||x[5]!==v?(n=async(e,t,n)=>{let i=new FormData;i.append("commit_id",y.oid),i.append("comment[body]",e),t&&n&&(i.append("path",t),i.append("position",n.toString()));let o=await (0,s.DI)(v,{method:"POST",body:i});return o.ok?{error:null,comment:(await o.json()).comment}:{error:Error("Failed to add comment"),comment:null}},x[4]=y.oid,x[5]=v,x[6]=n):n=x[6];let w=n;x[7]!==C?(l=async(e,t)=>{let n=new FormData;n.append("_method","put"),n.append("commit_comment[id]",t.id.toString()),n.append("commit_comment[body]",e),n.append("commit_comment[bodyVersion]",t.bodyVersion);let i=await (0,s.DI)(C,{method:"POST",body:n});if(!i.ok)return{error:Error("Failed to edit comment"),updatedFields:null};{let e=await i.json();return{error:null,updatedFields:{body:e.source,bodyVersion:e.bodyVersion,htmlBody:e.body}}}},x[7]=C,x[8]=l):l=x[8];let b=l;x[9]!==C?(c=async e=>{let t=new FormData;return(t.append("_method","delete"),t.append("commit_comment[id]",e),(await (0,s.DI)(C,{method:"POST",body:t})).ok)?"success":"error"},x[9]=C,x[10]=c):c=x[10];let j=c;x[11]!==C?(d=async(e,t)=>{let n=new FormData;return(n.append("_method","put"),n.append("classifier",t),(await (0,s.DI)(`${C}/${e}/minimize`,{method:"POST",body:n,headers:{Accept:"application/json"}})).ok)?"success":"error"},x[11]=C,x[12]=d):d=x[12];let _=d;x[13]!==C?(m=async e=>{let t=new FormData;return(t.append("_method","put"),(await (0,s.DI)(`${C}/${e}/unminimize`,{method:"POST",body:t,headers:{Accept:"application/json"}})).ok)?"success":"error"},x[13]=C,x[14]=m):m=x[14];let S=m,N=`${g.ownerLogin}/${g.name}`;x[15]!==g.id||x[16]!==N?(u={databaseId:g.id,nwo:N,slashCommandsEnabled:!1},x[15]=g.id,x[16]=N,x[17]=u):u=x[17],x[18]!==y.oid?(h={id:y.oid},x[18]=y.oid,x[19]=h):h=x[19],x[20]!==u||x[21]!==h?(f={repository:u,type:"commit",id:h},x[20]=u,x[21]=h,x[22]=f):f=x[22];let k=f;return x[23]!==w||x[24]!==k||x[25]!==j||x[26]!==b||x[27]!==_||x[28]!==S?(p={addComment:w,commentBoxSubject:k,editComment:b,deleteComment:j,hideComment:_,unhideComment:S},x[23]=w,x[24]=k,x[25]=j,x[26]=b,x[27]=_,x[28]=S,x[29]=p):p=x[29],p}},34445(e,t,n){n.d(t,{D:()=>o});var i=n(50964);function o(){return(0,i.X)()}},96495(e,t,n){n.d(t,{I:()=>c,p:()=>m});var i=n(16522),o=n(23666),r=n(26316),a=n(78597),s=n(99766),l=n(18292);function c(e){let t,n=(0,i.c)(7),{repo:r,commit:l,viewerCanReply:c,repoOwnerGlobalRelayId:m,getInlineCommentInfoByPathAndPosition:u}=e,{addComments:h}=(0,s.B)();return n[0]!==h||n[1]!==l||n[2]!==u||n[3]!==r||n[4]!==m||n[5]!==c?(t=(e,t)=>new Promise(async(n,i)=>{let[s,f]=e.split("::");if(!s||!f)return void i(Error("Invalid threadId"));if(!t){let t=u(s,Number(f));n(t?d(t,l,r,c,e,m):void 0);return}let p=await (0,a.lS)(`${(0,o.MLt)({owner:r.ownerLogin,repo:r.name,commitOid:l.oid,path:s,position:f})}${t?"&isRefetch=true":""}`);if(p.ok){let t=await p.json();h(t.comments,s,f),n(t.comments?d(t.comments,l,r,c,e,m):void 0)}else i(Error("Failed to fetch thread"))}),n[0]=h,n[1]=l,n[2]=u,n[3]=r,n[4]=m,n[5]=c,n[6]=t):t=n[6],t}function d(e,t,n,i,o,r){return{commentsData:{comments:e.map(e=>m(e,t,n,r))},id:o,viewerCanReply:i}}function m(e,t,n,i){return{publishedAt:void 0,state:"",viewerRelationship:"",id:e.relayId,databaseId:e.id,body:e.body,bodyHTML:e.htmlBody,createdAt:e.createdAt,url:`${r.cg?.location.origin}${(0,o.$Qz)({owner:n.ownerLogin,repo:n.name,commitish:t.oid})}#${e.urlFragment}`,currentDiffResourcePath:`#${e.urlFragment}`,authorAssociation:e.authorAssociation?.toUpperCase(),author:{id:e.author.id,login:e.author.login,avatarUrl:e.author.avatarUrl,url:""},isHidden:e.isHidden,lastUserContentEdit:e.lastUserContentEdit,minimizedReason:e.minimizedReason,subjectType:"commit",viewerCanMinimize:e.viewerCanMinimize,viewerCanSeeMinimizeButton:e.viewerCanMinimize,viewerCanSeeUnminimizeButton:e.viewerCanMinimize,viewerCanDelete:e.viewerCanDelete,viewerCanUpdate:e.viewerCanUpdate,viewerCanReact:e.viewerCanReact,viewerCanReport:e.viewerCanReport,viewerCanReportToMaintainer:e.viewerCanReportToMaintainer,viewerCanBlockFromOrg:e.viewerCanBlockFromOrg,viewerCanUnblockFromOrg:e.viewerCanUnblockFromOrg,viewerCanUnminimize:e.viewerCanUnminimize??!1,viewerDidAuthor:e.viewerDidAuthor,reactionGroups:e.reactionGroups,reference:{number:void 0,text:(0,l.F)(t.oid),author:{login:t.authors.length>0?t.authors[0]?.login??"":""}},repository:{id:n.id.toString(),isPrivate:n.private,name:n.name,owner:{id:i,login:n.ownerLogin,url:""}}}}},83175(e,t,n){n.d(t,{f:()=>Z});var i=n(74848),o=n(16522),r=n(39423),a=n(26316),s=n(79040),l=n(11882),c=n(96540),d=n(64774),m=n(91710),u=n(49481),h=n(13940),f=n(79737),p=n(85136),x=n(45676),g=n(55598),y=n(70776),C=n(16497),v=n(19519),w=n(51581),b=n(11246),j=n(80855),_=n(73286),S=n(23666),N=n(77236),k=n(38621),I=n(21373),E=n(26108),T=n(4978),D=n(60625),B=n(18292),A=n(66588);let L=c.memo(M);function M(e){let t,n,r,a,s,l,c=(0,o.c)(18),{repo:d,oid:m}=e;c[0]!==m?(t=(0,B.F)(m),c[0]=m,c[1]=t):t=c[1];let u=`browse-repo-${t}`,{sendAnalyticsEvent:h}=(0,w.s)(),{loggingPrefix:f,loggingPayload:p}=(0,b.xe)(),x=(0,b.eX)();c[2]!==p||c[3]!==f||c[4]!==h||c[5]!==x?(n=()=>{x&&h(`${f}click`,"COMMITS_BROWSE_REPOSITORY_AT_THIS_POINT_CLICKED",p)},c[2]=p,c[3]=f,c[4]=h,c[5]=x,c[6]=n):n=c[6];let g=n;return c[7]!==m||c[8]!==d?(r=(0,S.IO9)({repo:d,action:"tree",commitish:m}),c[7]=m,c[8]=d,c[9]=r):r=c[9],c[10]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)(k.CodeIcon,{}),c[10]=a):a=c[10],c[11]!==u||c[12]!==g||c[13]!==r?(s=(0,i.jsx)("a",{"aria-labelledby":u,href:r,className:"Button Button--iconOnly Button--invisible Button--small","data-testid":"commit-row-browse-repo",onClick:g,children:a}),c[11]=u,c[12]=g,c[13]=r,c[14]=s):s=c[14],c[15]!==u||c[16]!==s?(l=(0,i.jsx)(T.A,{"aria-label":"Browse repository at this point",id:u,direction:"sw",children:s}),c[15]=u,c[16]=s,c[17]=l):l=c[17],l}L.displayName="BrowseRepositoryAtThisPoint",M.displayName="WrappedBrowseRepositoryAtThisPoint";let O=c.memo(P);function P(e){let t,n,r,a,s,l=(0,o.c)(14),{repo:c,oid:d,path:m}=e;if(!m)return null;l[0]!==d?(t=(0,B.F)(d),l[0]=d,l[1]=t):t=l[1];let u=`view-code-${t}`;return l[2]!==d||l[3]!==m||l[4]!==c.name||l[5]!==c.ownerLogin?(n=(0,S.nD_)({owner:c.ownerLogin,repo:c.name,commitish:d,filePath:m}),l[2]=d,l[3]=m,l[4]=c.name,l[5]=c.ownerLogin,l[6]=n):n=l[6],l[7]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)(k.FileCodeIcon,{}),l[7]=r):r=l[7],l[8]!==n||l[9]!==u?(a=(0,i.jsx)("a",{"aria-labelledby":u,href:n,className:"Button Button--iconOnly Button--invisible Button--small","data-testid":"commit-row-view-code",children:r}),l[8]=n,l[9]=u,l[10]=a):a=l[10],l[11]!==a||l[12]!==u?(s=(0,i.jsx)(T.A,{"aria-label":"View code at this point",id:u,direction:"sw",children:a}),l[11]=a,l[12]=u,l[13]=s):s=l[13],s}function R(e){let t,n,r=(0,o.c)(5),{commitUrl:a,oid:s,softNavToCommit:l}=e;r[0]===Symbol.for("react.memo_cache_sentinel")?(t={variant:"invisible",size:"small",sx:{fontFamily:"var(--fontStack-monospace)",color:"fg.muted"}},r[0]=t):t=r[0];let c=t;return r[1]!==a||r[2]!==s||r[3]!==l?(n=(0,i.jsx)(T.A,{"aria-label":"View commit details",direction:"s",children:l?(0,i.jsx)(I.Q,{as:N.N,to:a,...c,children:(0,B.F)(s)}):(0,i.jsx)("a",{className:"Button--invisible Button--small Button text-mono",href:a,...c,children:(0,i.jsx)("span",{className:"Button-content",children:(0,i.jsx)("span",{className:"Button-label color-fg-muted",children:(0,B.F)(s)})})})}),r[1]=a,r[2]=s,r[3]=l,r[4]=n):n=r[4],n}function $(e){let t,n,r,a,s=(0,o.c)(13),{showDescription:l,setShowDescription:c,oid:d}=e;s[0]!==d?(t=(0,B.F)(d),s[0]=d,s[1]=t):t=s[1];let m=t,u=`show-description-${m}`,h=`${!l?"Show":"Hide"} description for ${m}`;return s[2]!==c||s[3]!==l?(n=e=>{e.preventDefault(),c(!l)},s[2]=c,s[3]=l,s[4]=n):n=s[4],s[5]!==l||s[6]!==u||s[7]!==n?(r=(0,i.jsx)(E.K,{icon:k.EllipsisIcon,className:"Button Button--iconOnly Button--invisible Button--small ml-1","data-testid":"commit-row-show-description-button","aria-labelledby":u,"aria-pressed":l,"aria-expanded":l,onClick:n}),s[5]=l,s[6]=u,s[7]=n,s[8]=r):r=s[8],s[9]!==u||s[10]!==r||s[11]!==h?(a=(0,i.jsx)(D.m,{id:u,text:h,"aria-label":h,children:r}),s[9]=u,s[10]=r,s[11]=h,s[12]=a):a=s[12],a}function F(e){let t,n,r,a,s,l,c=(0,o.c)(17),{count:d,repo:m,oid:u}=e;if(!d)return null;c[0]!==u?(t=(0,B.F)(u),c[0]=u,c[1]=t):t=c[1];let h=`comment-count-${t}`,f=`View ${d} commit comment${d>1?"s":""}`;c[2]!==u||c[3]!==m.name||c[4]!==m.ownerLogin?(n=(0,S.$Qz)({owner:m.ownerLogin,repo:m.name,commitish:u}),c[2]=u,c[3]=m.name,c[4]=m.ownerLogin,c[5]=n):n=c[5];let p=`${n}#${A.N}`;return c[6]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)(k.CommentIcon,{}),c[6]=r):r=c[6],c[7]!==d?(a=(0,i.jsxs)("span",{className:"Button-content color-fg-muted",children:[r,(0,i.jsx)("span",{className:"Button-label",children:d})]}),c[7]=d,c[8]=a):a=c[8],c[9]!==h||c[10]!==p||c[11]!==a?(s=(0,i.jsx)("a",{"aria-labelledby":h,href:p,className:"Button Button--invisible Button--small","data-testid":"commit-row-comments",children:a}),c[9]=h,c[10]=p,c[11]=a,c[12]=s):s=c[12],c[13]!==h||c[14]!==f||c[15]!==s?(l=(0,i.jsx)(T.A,{"aria-label":f,id:h,direction:"sw",children:s}),c[13]=h,c[14]=f,c[15]=s,c[16]=l):l=c[16],l}O.displayName="ViewCodeAtThisPoint",P.displayName="WrappedViewCodeAtThisPoint",R.displayName="ViewCommitDetails",$.displayName="ToggleCommitDescription",F.displayName="CommitCommentCount";var V=n(19512),U=n(16899),H=n(34445),z=n(37929);function W(e){let t,n,r,a,s=(0,o.c)(13),{deferredData:l}=e,{helpUrl:c}=(0,H.D)(),d=(0,j.xs)();return s[0]!==d?(t=d&&(0,i.jsx)(U.O,{variant:"rounded",className:"d-none d-sm-flex",width:"62px"}),s[0]=d,s[1]=t):t=s[1],s[2]!==l||s[3]!==d?(n=!d&&void 0===l&&(0,i.jsx)(U.O,{variant:"rounded",className:"d-none d-sm-flex",width:"62px"}),s[2]=l,s[3]=d,s[4]=n):n=s[4],s[5]!==l||s[6]!==c||s[7]!==d?(r=!d&&l&&(0,i.jsx)(V.h,{commitOid:l.oid,hasSignature:!0,verificationStatus:l.verifiedStatus,signature:l.signatureInformation?{helpUrl:c,...l.signatureInformation}:void 0}),s[5]=l,s[6]=c,s[7]=d,s[8]=r):r=s[8],s[9]!==t||s[10]!==n||s[11]!==r?(a=(0,i.jsxs)(i.Fragment,{children:[t,n,r]}),s[9]=t,s[10]=n,s[11]=r,s[12]=a):a=s[12],a}function K({deferredData:e,oid:t,repository:n}){let o=(0,j.xs)(),r="";try{r=e?.statusCheckStatus?.short_text?.split("checks")[0]?.trim()||""}catch{}return(0,i.jsxs)(i.Fragment,{children:[o&&(0,i.jsx)(U.O,{variant:"rounded",className:"d-none d-sm-flex ml-2",width:"20px"}),!o&&void 0===e&&(0,i.jsx)(U.O,{variant:"rounded",className:"d-none d-sm-flex ml-2",width:"20px"}),!o&&e?.statusCheckStatus&&(0,i.jsx)("div",{className:"d-none d-sm-flex ml-1",children:"\xb7"}),(0,i.jsx)("div",{className:"d-none d-sm-flex",children:(0,i.jsx)(z.d,{oid:t,status:e?.statusCheckStatus?.state,descriptionString:r,repo:n})})]})}W.displayName="SignedCommitBadge",K.displayName="CommitChecksStatusBadge";var Q=n(50531);let X="CommitRow-module__ListItemTitle_0__cUhJS",G=(0,c.lazy)(()=>n.e("60704").then(n.bind(n,86979)).then(e=>({default:e.CommitActionBar})));function Y(e){let t,n,r,a,s,l,d,m,S,N,k,I,E,T,D,B,A,M,P,V,U,H,z=(0,o.c)(81),{commit:Y,repo:q,path:J,softNavToCommit:Z}=e,[ee,et]=(0,c.useState)(!1),en=(0,c.useRef)(null),[ei,eo]=(0,h.ym)(Y.oid,q),[er,ea]=(0,c.useState)(!1),es=(0,j.NO)(Y.oid),{isServer:el}=(0,v.V)(),{sendAnalyticsEvent:ec}=(0,w.s)(),{loggingPrefix:ed,loggingPayload:em}=(0,b.xe)(),eu=(0,b.eX)();z[0]!==em||z[1]!==ed||z[2]!==ec||z[3]!==eu?(t=()=>{eu&&ec(`${ed}click`,"COMMITS_TITLE_CLICKED",em)},z[0]=em,z[1]=ed,z[2]=ec,z[3]=eu,z[4]=t):t=z[4];let eh=t;z[5]!==ee?(n=()=>{ee&&en.current&&en.current.textContent&&(0,u.i)(en.current.textContent)},r=[en,ee],z[5]=ee,z[6]=n,z[7]=r):(n=z[6],r=z[7]),(0,c.useEffect)(n,r),z[8]!==Y.bodyMessageHtml||z[9]!==Y.oid||z[10]!==Y.shortMessage||z[11]!==Y.shortMessageMarkdownLink||z[12]!==Y.url||z[13]!==el||z[14]!==eh||z[15]!==ee?(a=Y.shortMessageMarkdownLink&&!el?(0,i.jsx)(y.kx,{html:Y.shortMessageMarkdownLink,onClick:eh,containerClassName:X,headingClassName:X,children:Y.bodyMessageHtml&&(0,i.jsx)($,{showDescription:ee,setShowDescription:et,oid:Y.oid})}):(0,i.jsx)(y.ao,{value:Y.shortMessage,href:Y.url,onClick:eh,containerClassName:X,headingClassName:X,children:Y.bodyMessageHtml&&(0,i.jsx)($,{showDescription:ee,setShowDescription:et,oid:Y.oid})}),z[8]=Y.bodyMessageHtml,z[9]=Y.oid,z[10]=Y.shortMessage,z[11]=Y.shortMessageMarkdownLink,z[12]=Y.url,z[13]=el,z[14]=eh,z[15]=ee,z[16]=a):a=z[16];let ef=es?.commentCount??0;return z[17]!==Y.oid||z[18]!==q||z[19]!==ef?(s=(0,i.jsx)(g.V,{children:(0,i.jsx)(F,{oid:Y.oid,repo:q,count:ef})}),z[17]=Y.oid,z[18]=q,z[19]=ef,z[20]=s):s=z[20],z[21]!==es?(l=(0,i.jsx)(g.V,{className:"CommitRow-module__ListItemMetadata_0__W4Kqf",children:(0,i.jsx)(W,{deferredData:es})}),z[21]=es,z[22]=l):l=z[22],z[23]!==Y.oid||z[24]!==Y.url||z[25]!==Z?(d=(0,i.jsx)(R,{oid:Y.oid,commitUrl:Y.url,softNavToCommit:Z}),z[23]=Y.oid,z[24]=Y.url,z[25]=Z,z[26]=d):d=z[26],z[27]!==Y.oid?(m=(0,i.jsx)(Q.w,{sha:Y.oid}),z[27]=Y.oid,z[28]=m):m=z[28],z[29]!==d||z[30]!==m?(S=(0,i.jsxs)("div",{className:"d-flex",children:[d,m]}),z[29]=d,z[30]=m,z[31]=S):S=z[31],z[32]!==Y.oid||z[33]!==J||z[34]!==q?(N=(0,i.jsx)(O,{repo:q,oid:Y.oid,path:J}),z[32]=Y.oid,z[33]=J,z[34]=q,z[35]=N):N=z[35],z[36]!==Y.oid||z[37]!==q?(k=(0,i.jsx)(L,{repo:q,oid:Y.oid}),z[36]=Y.oid,z[37]=q,z[38]=k):k=z[38],z[39]!==S||z[40]!==N||z[41]!==k?(I=(0,i.jsxs)(g.V,{className:"d-none d-sm-flex px-0 gap-2",variant:"primary",children:[S,N,k]}),z[39]=S,z[40]=N,z[41]=k,z[42]=I):I=z[42],z[43]!==I||z[44]!==s||z[45]!==l?(E=(0,i.jsxs)(i.Fragment,{children:[s,l,I]}),z[43]=I,z[44]=s,z[45]=l,z[46]=E):E=z[46],z[47]!==Y||z[48]!==es||z[49]!==eo||z[50]!==J||z[51]!==q?(T=(0,i.jsx)(c.Suspense,{children:(0,i.jsx)(G,{commit:Y,repo:q,path:J,setDialogOpen:ea,fetchCheckDetails:eo,deferredData:es})}),z[47]=Y,z[48]=es,z[49]=eo,z[50]=J,z[51]=q,z[52]=T):T=z[52],z[53]===Symbol.for("react.memo_cache_sentinel")?(D=(0,i.jsx)("div",{className:"px-1"}),z[53]=D):D=z[53],z[54]!==Y.bodyMessageHtml||z[55]!==ee?(B=ee&&Y.bodyMessageHtml&&(0,i.jsx)(p.U,{children:(0,i.jsx)(C.JR,{ref:en,html:Y.bodyMessageHtml,className:"ws-pre-wrap extended-commit-description-container pb-2 text-mono wb-break-word"})}),z[54]=Y.bodyMessageHtml,z[55]=ee,z[56]=B):B=z[56],z[57]!==Y.oid||z[58]!==es||z[59]!==q?(A=(0,i.jsx)(K,{repository:q,deferredData:es,oid:Y.oid}),z[57]=Y.oid,z[58]=es,z[59]=q,z[60]=A):A=z[60],z[61]!==Y||z[62]!==q||z[63]!==A?(M=(0,i.jsx)(p.U,{children:(0,i.jsx)(_.j,{commit:Y,repo:q,children:A})}),z[61]=Y,z[62]=q,z[63]=A,z[64]=M):M=z[64],z[65]!==B||z[66]!==M?(P=(0,i.jsxs)(x.Q,{children:[B,M]}),z[65]=B,z[66]=M,z[67]=P):P=z[67],z[68]!==Y.url||z[69]!==E||z[70]!==T||z[71]!==P||z[72]!==a?(V=(0,i.jsxs)(f.c,{"data-testid":"commit-row-item","data-commit-link":Y.url,title:a,metadata:E,secondaryActions:T,className:"CommitRow-module__ListItem_0__u0LMo",children:[D,P]}),z[68]=Y.url,z[69]=E,z[70]=T,z[71]=P,z[72]=a,z[73]=V):V=z[73],z[74]!==es?.statusCheckStatus||z[75]!==ei||z[76]!==er?(U=es?.statusCheckStatus&&er&&(0,i.jsx)(h.xC,{combinedStatus:ei,isOpen:er,onDismiss:()=>{ea(!1)}}),z[74]=es?.statusCheckStatus,z[75]=ei,z[76]=er,z[77]=U):U=z[77],z[78]!==V||z[79]!==U?(H=(0,i.jsxs)(i.Fragment,{children:[V,U]}),z[78]=V,z[79]=U,z[80]=H):H=z[80],H}G.displayName="CommitActionBar",Y.displayName="CommitRow";var q=n(27020);function J(e){let t,n,r,a,s=(0,o.c)(20),{commits:l,title:u,shouldClipTimeline:h,repo:f,currentBlobPath:p,softNavToCommit:x}=e,g=void 0===p?"":p,y=(0,c.useId)(),C=h?"top":"none",v=`Commits on ${u}`;if(s[0]!==y||s[1]!==v?(t=(0,i.jsx)(q.s.Heading,{as:"h3",id:y,title:v,"data-testid":"commit-group-title"}),s[0]=y,s[1]=v,s[2]=t):t=s[2],s[3]!==l||s[4]!==g||s[5]!==f||s[6]!==x){let e;s[8]!==g||s[9]!==f||s[10]!==x?(e=e=>(0,i.jsx)(Y,{commit:e,repo:f,path:g,softNavToCommit:x},e.oid),s[8]=g,s[9]=f,s[10]=x,s[11]=e):e=s[11],n=l.map(e),s[3]=l,s[4]=g,s[5]=f,s[6]=x,s[7]=n}else n=s[7];return s[12]!==y||s[13]!==n||s[14]!==u?(r=(0,i.jsx)(m.Z,{className:"CommitGroup-module__panel__Pfvdu",children:(0,i.jsx)(d.u,{title:u,titleHeaderTag:"h3",ariaLabelledBy:y,children:n},u)}),s[12]=y,s[13]=n,s[14]=u,s[15]=r):r=s[15],s[16]!==C||s[17]!==t||s[18]!==r?(a=(0,i.jsxs)(q.s,{clipTimeline:C,children:[t,r]}),s[16]=C,s[17]=t,s[18]=r,s[19]=a):a=s[19],a}function Z(e){let t,n,d,m,u,h,f,p,x,g=(0,o.c)(31),{leadingContent:y,commitGroups:C,trailingContent:v,deferredCommitData:w,repository:_,currentBlobPath:S,loggingPayload:N,loggingPrefix:k,shouldClipTimeline:I,softNavToCommit:E}=e,T=void 0===w?j.Xx:w,D=void 0===I||I,B=void 0!==E&&E;g[0]!==N||g[1]!==k?(t={loggingPayload:N,loggingPrefix:k},g[0]=N,g[1]=k,g[2]=t):t=g[2];let A=t,L=(0,c.useRef)(0),M=(0,c.useRef)(null),O=(0,c.useRef)(null),P=(0,c.useRef)(!1);g[3]===Symbol.for("react.memo_cache_sentinel")?(n=[],g[3]=n):n=g[3];let R=(0,c.useRef)(n),$=(0,s.Zp)();if(g[4]!==$){d=i=>{"Enter"===i.key?e(i):"Tab"===i.key?t(i):n(i)};let e=e=>{if("Enter"===e.key){let t=a.XC?.activeElement?.hasAttribute("data-commit-link")?a.XC?.activeElement?.getAttribute("data-commit-link"):void 0;t&&(e.ctrlKey||e.metaKey?a.cg?.open(t,"_blank"):$(t))}},t=e=>{"Tab"===e.key&&(e.shiftKey?(a.XC?.activeElement?.hasAttribute("data-commit-link")&&!P.current&&M.current&&(M.current.focus(),O.current=M.current),P.current=!0):(M.current=O.current,O.current=a.XC?.activeElement??null,P.current=!1))},n=e=>{if(!["j","k","ArrowDown","ArrowUp"].includes(e.key)||!(0,r.zw)()&&("j"===e.key||"k"===e.key))return;let t=1;for(let e=0;e{let e=setTimeout(()=>{R.current=Array.from(document.querySelectorAll('[id*="-list-view-node-"]'))},0);return()=>clearTimeout(e)},g[6]=m):m=g[6],g[7]!==C?(u=[C],g[7]=C,g[8]=u):u=g[8],(0,c.useEffect)(m,u),g[9]!==C||g[10]!==S||g[11]!==_||g[12]!==D||g[13]!==B){let e;g[15]!==S||g[16]!==_||g[17]!==D||g[18]!==B?(e=(e,t)=>(0,i.jsx)(J,{title:e.title,commits:e.commits,shouldClipTimeline:D&&0===t,currentBlobPath:S,repo:_,softNavToCommit:B},e.title),g[15]=S,g[16]=_,g[17]=D,g[18]=B,g[19]=e):e=g[19],h=C.map(e),g[9]=C,g[10]=S,g[11]=_,g[12]=D,g[13]=B,g[14]=h}else h=g[14];return g[20]!==d||g[21]!==y||g[22]!==h||g[23]!==v?(f=(0,i.jsxs)(l.A,{clipSidebar:!0,onKeyDown:d,children:[y,h,v]}),g[20]=d,g[21]=y,g[22]=h,g[23]=v,g[24]=f):f=g[24],g[25]!==A||g[26]!==f?(p=(0,i.jsx)(b.zq,{loggingInfo:A,children:f}),g[25]=A,g[26]=f,g[27]=p):p=g[27],g[28]!==T||g[29]!==p?(x=(0,i.jsx)(j.M2,{deferredData:T,children:p}),g[28]=T,g[29]=p,g[30]=x):x=g[30],x}J.displayName="CommitGroup",Z.displayName="Commits"},22428(e,t,n){n.d(t,{M:()=>f});var i=n(74848),o=n(16522),r=n(49481),a=n(15582),s=n(52111),l=n(38621),c=n(38750),d=n(70944),m=n(96540),u=n(91710);let h={timeout:{description:"Try reloading the page, or if the problem persists, view the history locally using this command:",heading:"Commit history cannot be loaded",icon:(0,i.jsx)(l.AlertIcon,{size:"medium",className:"mb-2 fgColor-muted"}),showTextInput:!0},unavailable:{description:"There isn't any commit history to show here.",heading:"No commits history",icon:(0,i.jsx)(l.GitCommitIcon,{size:"medium"}),showTextInput:!1}};function f(e){let t,n,f,p,x,g,y,C=(0,o.c)(19),{timeoutMessage:v,unavailableMessage:w}=e,b=h[""!==v?"timeout":"unavailable"],j=w??b.description;return C[0]!==b.heading||C[1]!==j||C[2]!==v?(t=()=>{(0,r.i)(`${b.heading}. ${j} ${v}`.trim())},n=[b.heading,j,v],C[0]=b.heading,C[1]=j,C[2]=v,C[3]=t,C[4]=n):(t=C[3],n=C[4]),(0,m.useEffect)(t,n),C[5]!==b.icon?(f=(0,i.jsx)(d.E.Visual,{children:b.icon}),C[5]=b.icon,C[6]=f):f=C[6],C[7]!==b.heading?(p=(0,i.jsx)(d.E.Heading,{children:b.heading}),C[7]=b.heading,C[8]=p):p=C[8],C[9]!==j?(x=(0,i.jsx)(d.E.Description,{children:j}),C[9]=j,C[10]=x):x=C[10],C[11]!==b.showTextInput||C[12]!==v?(g=b.showTextInput&&(0,i.jsx)(c.A,{"aria-label":"View commit history locally command",className:"d-flex flex-justify-center mt-2",monospace:!0,onChange:s.l,readOnly:!0,size:"large",trailingAction:(0,i.jsx)(c.A.Action,{onClick:()=>(0,a.D)(v),icon:l.CopyIcon,"aria-label":"Copy to clipboard",className:"fgColor-muted"}),value:v}),C[11]=b.showTextInput,C[12]=v,C[13]=g):g=C[13],C[14]!==f||C[15]!==p||C[16]!==x||C[17]!==g?(y=(0,i.jsx)(u.Z,{children:(0,i.jsx)("div",{"data-hpc":!0,children:(0,i.jsxs)(d.E,{border:!1,spacious:!0,children:[f,p,x,g]})})}),C[14]=f,C[15]=p,C[16]=x,C[17]=g,C[18]=y):y=C[18],y}f.displayName="CommitsBlankState"},26090(e,t,n){n.d(t,{I:()=>l,d_:()=>c,wu:()=>s});var i=n(16522),o=n(78597),r=n(96540),a=n(80855);function s(e,t){let n,s,l=(0,i.c)(5),[c,d]=(0,r.useState)(a.UI);return l[0]!==e?(n=()=>{if(!e)return;let t=!1;return(async()=>{d(a.UI);let n=await (0,o.Sr)(e);if(!t)try{if(n.ok){let e=await n.json();e.loading=!1,e&&d(e)}else d(a.Xx)}catch{d(a.Xx)}})(),function(){t=!0}},l[0]=e,l[1]=n):n=l[1],l[2]!==t||l[3]!==e?(s=[e,t],l[2]=t,l[3]=e,l[4]=s):s=l[4],(0,r.useEffect)(n,s),c}function l(e){let t,n,a=(0,i.c)(3),[s,l]=(0,r.useState)(void 0);return a[0]!==e?(t=()=>{e&&(async()=>{let t=await (0,o.Sr)(e);try{if(t.ok){let e=await t.json();e&&l(e.data)}}catch{}})()},n=[e],a[0]=e,a[1]=t,a[2]=n):(t=a[1],n=a[2]),(0,r.useEffect)(t,n),s}function c(e,t,n,i){let[s,l]=(0,r.useState)(a.UI),c=(0,r.useRef)([...Array(n)]),d=(0,r.useRef)(t);return(0,r.useEffect)(()=>{if(!e)return;let n=!1;async function i(t){let r=await (0,o.Sr)(`${e}?start_entry=${t}`);if(!n)try{if(r.ok){let e=await r.json();if(e){let t=0;for(let n=d.current;ni(e.nextIndex),0)):(d.current===e.nextIndex?e.error=!0:e.error=!1,l(e))}}else l(e=>({...e,loading:!1,error:!0,extraDiffEntries:c.current}))}catch{l(e=>({...e,loading:!1,deferredCommits:c.current}))}}return i(t),function(){n=!0}},[e,i,t]),(0,r.useEffect)(()=>{c.current=[],d.current=t},[e,i,t]),s}},43784(e,t,n){n.d(t,{B:()=>r,c:()=>a});var i=n(23666),o=n(78597);async function r(e,t){if(!t)return;let n=new FormData;n.set("file_tree_visible",e?"true":"false"),(0,o.DI)((0,i.h6D)(t),{method:"PUT",body:n,headers:{Accept:"application/json"}})}async function a(e,t){if(!t)return;let n=new FormData;n.set("file_tree_width",String(e)),(0,o.DI)((0,i.CDg)(t),{method:"POST",body:n,headers:{Accept:"application/json"}})}},18292(e,t,n){n.d(t,{F:()=>i});function i(e){return e.slice(0,7)}},89684(e,t,n){n.d(t,{N:()=>i});function i(e,t){return"d28fac7f18aeacb00d8ad3460a0a5a901617c2d4"===e&&0xf122a7===t}},94820(e,t,n){n.d(t,{$:()=>l});var i=n(74848),o=n(16522),r=n(38621),a=n(18990),s=n(50312);let l=e=>{let t,n,l,c,d=(0,o.c)(5);return d[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(a.l.Divider,{}),d[0]=t):t=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(n={prx:!0},l=(0,i.jsx)(r.CopilotIcon,{}),d[1]=n,d[2]=l):(n=d[1],l=d[2]),d[3]!==e.copilotChatReference?(c=(0,i.jsxs)(i.Fragment,{children:[t,(0,i.jsx)(s.t,{eventContext:n,leadingVisual:l,fileDiffReference:e.copilotChatReference})]}),d[3]=e.copilotChatReference,d[4]=c):c=d[4],c};l.displayName="CopilotDiffChatBlobActionsMenuItems"},5511(e,t,n){n.d(t,{Q:()=>M,G:()=>P});var i=n(74848),o=n(16522),r=n(38621),a=n(18990),s=n(20757),l=n(26108),c=n(21373),d=n(83369),m=n(96540),u=n(7909),h=n(23666),f=n(78597);function p(e,t){let n,i=(0,o.c)(5),r=(t??[]).filter(e=>!e.dismissed);if(i[0]!==r||i[1]!==e){let t;i[3]!==e?(t=t=>t.name===e,i[3]=e,i[4]=t):t=i[4],n=r.filter(t),i[0]=r,i[1]=e,i[2]=n}else n=i[2];return 0===n.length}var x=n(98529),g=n(34164);let y="compact_diff_lines";function C(e){let t,n,r,a,s,l,C,b,j,_,S,N,k,I,E,T=(0,o.c)(19),{userNotices:D}=e,B=p(y,D),{dismissNotice:A}=(k=(0,o.c)(5),I=p(y,D),k[0]!==I||k[1]!==y?(S=()=>{(0,u.M3)()&&!I&&(0,f.DI)((0,h.VB1)({noticeName:y}),{method:"POST"})},k[0]=I,k[1]=y,k[2]=S):S=k[2],E=S,k[3]!==E?(N={dismissNotice:E},k[3]=E,k[4]=N):N=k[4],N);T[0]===Symbol.for("react.memo_cache_sentinel")?(t={onSuccess:w,onError:v},T[0]=t):t=T[0];let{mutate:L}=(0,x.U)(t),[M,O]=(0,m.useState)(!0);T[1]!==A||T[2]!==L?(n=()=>{L({lineSpacing:"compact"}),O(!1),A()},T[1]=A,T[2]=L,T[3]=n):n=T[3];let P=n;T[4]!==A?(r=()=>{O(!1),A()},T[4]=A,T[5]=r):r=T[5];let R=r;return B?null:(T[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.$)("d-flex flex-column gap-2","DiffCompactLinesPopover-module__PopoverContent__HeYY0"),s=(0,i.jsx)("h2",{className:"DiffCompactLinesPopover-module__Heading__Q1FSI",children:"Customizable line height"}),l=(0,i.jsx)("p",{children:"The default line height has been increased for improved accessibility. You can choose to enable a more compact line height from the view settings menu."}),T[6]=a,T[7]=s,T[8]=l):(a=T[6],s=T[7],l=T[8]),T[9]!==P?(C=(0,i.jsx)(c.Q,{onClick:P,children:"Enable compact line height"}),T[9]=P,T[10]=C):C=T[10],T[11]!==R?(b=(0,i.jsx)(c.Q,{onClick:R,variant:"invisible",children:"Dismiss"}),T[11]=R,T[12]=b):b=T[12],T[13]!==C||T[14]!==b?(j=(0,i.jsxs)(d.A.Content,{className:a,children:[s,l,(0,i.jsxs)("div",{className:"d-flex gap-2 flex-row w-full flex-wrap",children:[C,b]})]}),T[13]=C,T[14]=b,T[15]=j):j=T[15],T[16]!==M||T[17]!==j?(_=(0,i.jsx)(d.A,{open:M,caret:"top-right",className:"DiffCompactLinesPopover-module__PopoverContainer__ID54y",children:j}),T[16]=M,T[17]=j,T[18]=_):_=T[18],_)}function v(){}function w(){}C.displayName="DiffCompactLinesPopover";var b=n(66546);function j(e){let t,n,r,s,l,c=(0,o.c)(16),{whitespacePreferenceAvailable:d,lineSpacingPreferenceAvailable:m,defaultHideWhitespace:u,onUpdateWhitespace:h,reloadOnChange:f}=e,p=void 0===d||d,g=void 0===m||m,{data:y}=(0,b.ID)(),C=(0,b.Qn)(void 0!==u&&u);c[0]===Symbol.for("react.memo_cache_sentinel")?(t={onSuccess:S,onError:_},c[0]=t):t=c[0];let{mutate:v}=(0,x.U)(t);c[1]!==C||c[2]!==h||c[3]!==f?(n=()=>{(0,b.bJ)("w",C?"0":"1"),h?.(!C),void 0!==f&&f()},c[1]=C,c[2]=h,c[3]=f,c[4]=n):n=c[4];let w=n;return y&&(p||g)?(c[5]!==C||c[6]!==w||c[7]!==p?(r=p&&(0,i.jsx)(a.l.Item,{selected:C,onSelect:w,children:"Hide whitespace"}),c[5]=C,c[6]=w,c[7]=p,c[8]=r):r=c[8],c[9]!==y||c[10]!==g||c[11]!==v?(s=g&&(0,i.jsx)(a.l.Item,{selected:"compact"===y.lineSpacing,onSelect:()=>v({lineSpacing:"compact"===y.lineSpacing?"relaxed":"compact"}),children:"Compact line height"}),c[9]=y,c[10]=g,c[11]=v,c[12]=s):s=c[12],c[13]!==r||c[14]!==s?(l=(0,i.jsxs)(a.l.Group,{"aria-label":"Format",selectionVariant:"multiple",variant:"subtle",children:[r,s]}),c[13]=r,c[14]=s,c[15]=l):l=c[15],l):null}function _(){}function S(){}function N(e){let t,n,r,s,l,c,d,m=(0,o.c)(17),{reloadOnChange:u}=e,h=void 0!==u&&u,{data:f}=(0,b.ID)(),p=f?.splitPreference;m[0]===Symbol.for("react.memo_cache_sentinel")?(t={onSuccess:I,onError:k},m[0]=t):t=m[0];let{mutate:g}=(0,x.U)(t);m[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(a.l.GroupHeading,{children:"Layout"}),m[1]=n):n=m[1];let y="unified"===p;m[2]!==h||m[3]!==g?(r=()=>{g({splitPreference:"unified"}),(0,b.bJ)("diff","unified"),h&&window.location.reload()},m[2]=h,m[3]=g,m[4]=r):r=m[4],m[5]!==y||m[6]!==r?(s=(0,i.jsx)(a.l.Item,{selected:y,onSelect:r,children:"Unified"}),m[5]=y,m[6]=r,m[7]=s):s=m[7];let C="split"===p;return m[8]!==h||m[9]!==g?(l=()=>{g({splitPreference:"split"}),(0,b.bJ)("diff","split"),h&&window.location.reload()},m[8]=h,m[9]=g,m[10]=l):l=m[10],m[11]!==C||m[12]!==l?(c=(0,i.jsx)(a.l.Item,{selected:C,onSelect:l,children:"Split"}),m[11]=C,m[12]=l,m[13]=c):c=m[13],m[14]!==s||m[15]!==c?(d=(0,i.jsxs)(a.l.Group,{selectionVariant:"single",children:[n,s,c]}),m[14]=s,m[15]=c,m[16]=d):d=m[16],d}function k(){}function I(){}j.displayName="DiffLinePresentationToggles",N.displayName="DiffViewPreferenceToggle";var E=n(99889);function T(){let e,t,n,r,s=(0,o.c)(8),{data:l}=(0,b.ID)();s[0]===Symbol.for("react.memo_cache_sentinel")?(e={onSuccess:B,onError:D},s[0]=e):e=s[0];let{mutate:c}=(0,x.U)(e);if(!l)return null;let d=l.commentsPreference===E.sI.Collapsed;return s[1]!==d||s[2]!==c?(t=()=>c({commentsPreference:d?E.sI.Visible:E.sI.Collapsed}),s[1]=d,s[2]=c,s[3]=t):t=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(a.l.TrailingVisual,{children:(0,i.jsx)("kbd",{className:"color-fg-muted",children:"i"})}),s[4]=n):n=s[4],s[5]!==d||s[6]!==t?(r=(0,i.jsx)(a.l.Group,{"aria-label":"Comments",selectionVariant:"single",children:(0,i.jsxs)(a.l.Item,{role:"menuitemcheckbox",selected:d,onSelect:t,children:["Minimize comments",n]})}),s[5]=d,s[6]=t,s[7]=r):r=s[7],r}function D(){}function B(){}T.displayName="DiffCommentsPreferenceToggle";var A=n(51581);let L=["layout","comments","whitespace","line-spacing"];function M(e){let t,n,r,s,l,c,d,m,u,h=(0,o.c)(29),{additionalPreferences:f,defaultHideWhitespace:p,enabledDiffViewSettings:x,onUpdateWhitespace:g,reloadOnSplitPreferenceChange:y,reloadOnWhitespaceChange:C}=e,v=void 0===x?L:x,w=void 0!==y&&y,b=void 0!==C&&C;h[0]!==v?(t=v.includes("layout")&&v.includes("comments"),h[0]=v,h[1]=t):t=h[1];let _=t;h[2]!==v?(n=v.includes("line-spacing")||v.includes("whitespace"),h[2]=v,h[3]=n):n=h[3];let S=n;h[4]!==v||h[5]!==S?(r=S&&(v.includes("comments")||v.includes("layout")),h[4]=v,h[5]=S,h[6]=r):r=h[6];let k=r;return h[7]!==v||h[8]!==w?(s=v.includes("layout")&&(0,i.jsx)(N,{reloadOnChange:w}),h[7]=v,h[8]=w,h[9]=s):s=h[9],h[10]!==_?(l=_&&(0,i.jsx)(a.l.Divider,{}),h[10]=_,h[11]=l):l=h[11],h[12]!==v?(c=v.includes("comments")&&(0,i.jsx)(T,{}),h[12]=v,h[13]=c):c=h[13],h[14]!==k?(d=k&&(0,i.jsx)(a.l.Divider,{}),h[14]=k,h[15]=d):d=h[15],h[16]!==p||h[17]!==v||h[18]!==g||h[19]!==b||h[20]!==S?(m=S?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(j,{defaultHideWhitespace:p,lineSpacingPreferenceAvailable:v.includes("line-spacing"),whitespacePreferenceAvailable:v.includes("whitespace"),onUpdateWhitespace:g,reloadOnChange:b?O:void 0})}):null,h[16]=p,h[17]=v,h[18]=g,h[19]=b,h[20]=S,h[21]=m):m=h[21],h[22]!==f||h[23]!==d||h[24]!==m||h[25]!==s||h[26]!==l||h[27]!==c?(u=(0,i.jsxs)(i.Fragment,{children:[s,l,c,d,m,f]}),h[22]=f,h[23]=d,h[24]=m,h[25]=s,h[26]=l,h[27]=c,h[28]=u):u=h[28],u}function O(){return window.location.reload()}function P(e){let t,n,c,d,m,u,h=(0,o.c)(21),{additionalPreferences:f,invisible:p,defaultHideWhitespace:x,enabledDiffViewSettings:g,onUpdateWhitespace:y,reloadOnSplitPreferenceChange:v,reloadOnWhitespaceChange:w,small:b,userNotices:j}=e,_=void 0===g?L:g,S=void 0!==v&&v,N=void 0!==w&&w,{sendAnalyticsEvent:k}=(0,A.s)();h[0]!==k?(t=()=>{k("diff_view.settings.open","DIFF_VIEW_SETTINGS_BUTTON")},h[0]=k,h[1]=t):t=h[1];let I=t,E=b?"small":"medium",T=void 0===p||p?"invisible":"default";return h[2]!==I||h[3]!==E||h[4]!==T?(n=(0,i.jsx)(s.W.Anchor,{children:(0,i.jsx)(l.K,{"aria-label":"Open diff view settings",icon:r.GearIcon,size:E,variant:T,onClick:I})}),h[2]=I,h[3]=E,h[4]=T,h[5]=n):n=h[5],h[6]!==f||h[7]!==x||h[8]!==_||h[9]!==y||h[10]!==S||h[11]!==N?(c=(0,i.jsx)(s.W.Overlay,{children:(0,i.jsx)(a.l,{children:(0,i.jsx)(M,{additionalPreferences:f,defaultHideWhitespace:x,enabledDiffViewSettings:_,onUpdateWhitespace:y,reloadOnSplitPreferenceChange:S,reloadOnWhitespaceChange:N})})}),h[6]=f,h[7]=x,h[8]=_,h[9]=y,h[10]=S,h[11]=N,h[12]=c):c=h[12],h[13]!==n||h[14]!==c?(d=(0,i.jsxs)(s.W,{children:[n,c]}),h[13]=n,h[14]=c,h[15]=d):d=h[15],h[16]!==j?(m=(0,i.jsx)(C,{userNotices:j}),h[16]=j,h[17]=m):m=h[17],h[18]!==d||h[19]!==m?(u=(0,i.jsxs)(i.Fragment,{children:[d,m]}),h[18]=d,h[19]=m,h[20]=u):u=h[20],u}M.displayName="DiffViewSettingsMenuContent",P.displayName="DiffViewSettings"},98529(e,t,n){n.d(t,{U:()=>c});var i=n(16522),o=n(78597),r=n(97665),a=n(94747),s=n(66546),l=n(7909);function c(e){let t,n,o,l,c=(0,i.c)(10),{onSuccess:m,onError:u}=e,h=(0,r.jE)();return c[0]!==h?(t=async e=>{h.setQueryData((0,s.w$)(),t=>({...t,...e}))},c[0]=h,c[1]=t):t=c[1],c[2]!==m?(n=()=>{m()},c[2]=m,c[3]=n):n=c[3],c[4]!==u?(o=e=>{u(e)},c[4]=u,c[5]=o):o=c[5],c[6]!==t||c[7]!==n||c[8]!==o?(l={mutationFn:d,onMutate:t,onSuccess:n,onError:o},c[6]=t,c[7]=n,c[8]=o,c[9]=l):l=c[9],(0,a.n)(l)}async function d(e){let{commentsPreference:t,lineSpacing:n,splitPreference:i}=e;if(!(0,l.M3)())return;let r={};t&&(r={...r,commentsPreference:t}),n&&(r={...r,lineSpacing:n}),i&&(r={...r,diff:i});let a=await (0,o.Sr)("/users/diffview",{method:"POST",headers:{Accept:"application/json"},body:r}),s=await a.json();if(a.ok)return s;throw Error(s.error||"Unknown error occurred",{cause:a.status})}},61441(e,t,n){n.d(t,{KG:()=>c,O_:()=>r,QK:()=>l,iy:()=>s,sT:()=>a,wY:()=>o});let i={maxBodyLength:65536,maxIssueTitleLength:256,maxViewTitleLength:1024},o={...i,titleCanNotBeEmpty:"Title can not be empty",fieldCanNotBeEmpty:"Field can not be empty",fieldRequired:"This field is required",issueTitleExceedsMaxLength:`Title can not be longer than ${i.maxIssueTitleLength} characters`,viewTitleExceedsMaxLength:`Title can not be longer than ${i.maxViewTitleLength} characters`,issueBodyExceedsMaxLength:`Body can not be longer than ${i.maxBodyLength} characters`,fieldExceedsMaxLength:`Field can not be longer than ${i.maxBodyLength} characters`,commentBodyEmpty:"Comment can not be empty",checkboxInAGroupMustBeSelected:"A required checkbox is missing",missingDropdownSelection:"An option must be selected",noChangesToSave:"No changes to save"};function r(e){return 0===e.trim().length?{isValid:!1,errorMessage:o.titleCanNotBeEmpty}:e.length>o.maxIssueTitleLength?{isValid:!1,errorMessage:o.issueTitleExceedsMaxLength}:{isValid:!0}}function a(e,t){return 0===e.trim().length&&t?{isValid:!1,errorMessage:o.fieldCanNotBeEmpty}:e.length>o.maxBodyLength?{isValid:!1,errorMessage:o.fieldExceedsMaxLength}:{isValid:!0}}function s(e){return 0===e.trim().length?{isValid:!1,errorMessage:o.titleCanNotBeEmpty}:e.length>o.maxViewTitleLength?{isValid:!1,errorMessage:o.viewTitleExceedsMaxLength}:{isValid:!0}}function l(e){return e.length>o.maxBodyLength?{isValid:!1,errorMessage:o.issueBodyExceedsMaxLength}:{isValid:!0}}function c(e){return 0===e.length?{isValid:!1,errorMessage:o.commentBodyEmpty}:{isValid:!0}}},75323(e,t,n){n.d(t,{h:()=>d});var i=n(74848),o=n(16522),r=n(38621),a=n(56133),s=n(10095);let l="ErrorWithRetry-module__retryActionLink__jCiCh";var c=n(34164);function d(e){let t,n,d,m,u,h,f=(0,o.c)(12),{message:p,retry:x,className:g}=e;return f[0]!==g?(t=(0,c.$)("ErrorWithRetry-module__ErrorWithRetryContainer__FBsnq",g),f[0]=g,f[1]=t):t=f[1],f[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(s.A,{icon:r.AlertFillIcon,className:(0,c.$)("mr-1","ErrorWithRetry-module__errorAlertIcon__YpY9D")}),f[2]=n):n=f[2],f[3]!==p?(d=(0,i.jsxs)("div",{children:[n,(0,i.jsx)("span",{className:"ErrorWithRetry-module__errorMessage__By6Jc",children:p})]}),f[3]=p,f[4]=d):d=f[4],f[5]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsx)("span",{className:l,children:"Try again"}),f[5]=m):m=f[5],f[6]!==x?(u=(0,i.jsx)(a.A,{as:"button",inline:!0,onClick:x,className:l,children:m}),f[6]=x,f[7]=u):u=f[7],f[8]!==t||f[9]!==d||f[10]!==u?(h=(0,i.jsxs)("div",{className:t,children:[d,u]}),f[8]=t,f[9]=d,f[10]=u,f[11]=h):h=f[11],h}d.displayName="ErrorWithRetry"},84403(e,t,n){n.d(t,{D:()=>s,t:()=>c});var i=n(74848),o=n(16522),r=n(96540);let a=(0,r.createContext)({updateOpenState:()=>void 0,anyItemPickerOpen:()=>!1});function s(e){let t,n,s,c,d,m=(0,o.c)(6),{children:u}=e;m[0]===Symbol.for("react.memo_cache_sentinel")?(t={},m[0]=t):t=m[0];let h=(0,r.useRef)(t);m[1]===Symbol.for("react.memo_cache_sentinel")?(n=(e,t)=>{let n=h.current;return n[e]===t||(h.current={...n,[e]:t}),h.current},m[1]=n):n=m[1];let f=n;m[2]===Symbol.for("react.memo_cache_sentinel")?(s=()=>Object.values(h.current).some(l),m[2]=s):s=m[2];let p=s;m[3]===Symbol.for("react.memo_cache_sentinel")?(c={updateOpenState:f,anyItemPickerOpen:p},m[3]=c):c=m[3];let x=c;return m[4]!==u?(d=(0,i.jsx)(a,{value:x,children:u}),m[4]=u,m[5]=d):d=m[5],d}function l(e){return e}function c(){let e=(0,r.use)(a);if(!e)throw Error("useItemPickersContext must be used within a ItemPickersContextProvider.");return e}a.displayName="ItemPickersContext",s.displayName="ItemPickersContextProvider"},5823(e,t,n){n.d(t,{e:()=>a});var i=n(74848),o=n(16522),r=n(16899);function a(){let e,t=(0,o.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"d-flex flex-wrap gap-1",children:(0,i.jsx)(r.O,{variant:"elliptical",height:"28px",width:"28px"})}),t[0]=e):e=t[0],e}a.displayName="ReactionViewerLoading"},29207(e,t,n){n.d(t,{H:()=>o});var i=n(65594);function o(e,t){let{csrf_tokens:n}=(0,i.B)();return n?.[e]?.[t]}},67461(e,t,n){n.d(t,{A:()=>a,_:()=>s});var i=n(16522),o=n(96540),r=n(39423);let a={ctrlKey:"ctrlKey",altKey:"altKey",shiftKey:"shiftKey",metaKey:"metaKey"},s=(e,t,n)=>{let s,l,c,d=(0,i.c)(9);d[0]!==t||d[1]!==e||d[2]!==n?(s=i=>{!e.some(e=>/^\d$/.test(e)?i.code===`Digit${e}`:"/"===e?"Slash"===i.code:i.key===e)||!function(e,t){for(let n of Object.values(a))if(t&&t[n]&&!e[n]||e[n]&&(!t||!t[n]))return!1;return!0}(i,n)&&!n?.ignoreModifierKeys||!n?.triggerWhenInputElementHasFocus&&(0,r.fg)(i.target)||!n?.triggerWhenPortalIsActive&&[...document.querySelectorAll('#__primerPortalRoot__, [id$="-portal-root"]')].some(function e(t){if(t.clientHeight>0)return!0;for(let n of t.children)if(e(n))return!0;return!1})||t(i)},d[0]=t,d[1]=e,d[2]=n,d[3]=s):s=d[3];let m=(0,o.useEffectEvent)(s),u=n?.scopeRef;d[4]!==m||d[5]!==u?.current?(l=()=>{let e=u?.current||document;return e.addEventListener("keydown",m),()=>e.removeEventListener("keydown",m)},d[4]=m,d[5]=u?.current,d[6]=l):l=d[6],d[7]!==u?(c=[u],d[7]=u,d[8]=c):c=d[8],(0,o.useEffect)(l,c)}}}]); //# sourceMappingURL=17115-7200aa4a9123d8d0-a863fedad8b87ed7.js.map