performance.mark("js-parse-end:28107-982c24913e681466.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["28107"],{42254(e,t,n){n.d(t,{A:()=>i});let i={stickyHeader:"use-sticky-header-module__stickyHeader__sf0hv"}},99893(e,t,n){n.d(t,{V:()=>u,o:()=>h});var i=n(74848),l=n(16522),a=n(39775),s=n(83223),r=n(34164);let o=[{unit:"month",ms:2592e6},{unit:"day",ms:864e5},{unit:"hour",ms:36e5},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}],d=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:void 0,timeZoneName:"short"}),c=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric"}),m=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function u(e,t=!0){let n="",i=new Date,l=i.getTime()-e.getTime(),a=o.find(e=>e.ms1?"s":""} ago`}else{let l=e.getFullYear()===i.getFullYear()?m:c;n=`${t?"on ":""}${l.format(e)}`}return n}function h(e){let t,n,o,c,m,h,f=(0,l.c)(24),{timestamp:p,usePreposition:g,linkUrl:x,className:v}=e,_=void 0===g||g;f[0]!==p||f[1]!==_?(t=u(p,_),f[0]=p,f[1]=_,f[2]=t):t=f[2];let b=t;f[3]!==p?(n=d.format(p),f[3]=p,f[4]=n):n=f[4];let y=n;if(!x){let e,t;return f[5]!==v||f[6]!==y||f[7]!==b?(e=(0,i.jsx)("span",{title:y,className:v,children:b}),f[5]=v,f[6]=y,f[7]=b,f[8]=e):e=f[8],f[9]!==y||f[10]!==e?(t=(0,i.jsx)(a.A,{inline:!0,title:y,children:e}),f[9]=y,f[10]=e,f[11]=t):t=f[11],t}return f[12]!==v?(o=(0,r.$)("Ago-module__AgoTimestampLink__Wrukn",v),f[12]=v,f[13]=o):o=f[13],f[14]!==y||f[15]!==b?(c=(0,i.jsx)("span",{title:y,className:"Ago-module__timestampText__OTeZJ",children:b}),f[14]=y,f[15]=b,f[16]=c):c=f[16],f[17]!==y||f[18]!==c?(m=(0,i.jsx)(a.A,{inline:!0,title:y,children:c}),f[17]=y,f[18]=c,f[19]=m):m=f[19],f[20]!==x||f[21]!==o||f[22]!==m?(h=(0,i.jsx)(s.A,{href:x,target:"_blank",className:o,children:m}),f[20]=x,f[21]=o,f[22]=m,f[23]=h):h=f[23],h}h.displayName="Ago"},89571(e,t,n){n.d(t,{$4:()=>c.$4,$D:()=>a.$D,$_:()=>i.$_,B8:()=>c.B8,BP:()=>a.BP,CH:()=>d.CH,DH:()=>s.D,DS:()=>c.DS,Dy:()=>c.Dy,E4:()=>a.E4,Ed:()=>c.Ed,FT:()=>d.FT,Fy:()=>i.Fy,I8:()=>c.I8,J:()=>c.J,M5:()=>c.M5,Ms:()=>c.Ms,Nn:()=>c.Nn,Ny:()=>r.N,Rx:()=>a.Rx,SH:()=>c.SH,W5:()=>c.W5,W9:()=>c.W9,ZH:()=>c.ZH,_B:()=>d._B,_W:()=>a._W,_i:()=>a._i,a6:()=>a.a6,a7:()=>i.a7,aK:()=>c.aK,ak:()=>d.ak,b:()=>d.b,b9:()=>d.b9,bO:()=>a.bO,dQ:()=>i.dQ,he:()=>c.he,iD:()=>o.i,jL:()=>c.jL,jQ:()=>c.jQ,jh:()=>c.jh,m1:()=>c.m1,n$:()=>c.n$,nV:()=>c.nV,pc:()=>l.p,q5:()=>c.q5,sF:()=>c.sF,t4:()=>c.t4,tl:()=>d.tl,uT:()=>c.uT,uW:()=>d.uW,v7:()=>c.v7,vU:()=>c.vU,wO:()=>a.wO,yV:()=>a.yV});var i=n(12907),l=n(96294),a=n(17243),s=n(47903),r=n(45540),o=n(97707),d=n(16518),c=n(14705)},19315(e,t,n){n.d(t,{i:()=>f});var i=n(74848),l=n(16522),a=n(78597),s=n(21373),r=n(7478),o=n(55717),d=n(96540),c=n(51581),m=n(95136),u=n(19129);let h={stale:!1,latest_unsynced_push_to_head_ref_at:null};function f({processingIndicatorUrl:e,repositoryId:t,pullRequestId:n}){let[l,s]=(0,d.useState)(h),r=(0,u.A)(),o=(0,d.useCallback)(async()=>{try{let t=await (0,a.lS)(e);if(t.ok){let e=await t.json();r()&&s(e)}}catch{r()&&s(h)}},[r,e]);(0,d.useEffect)(()=>{o()},[]);let{stale:c,latest_unsynced_push_to_head_ref_at:g}=l;return(0,i.jsx)("div",{className:"border-left pl-1",children:(0,i.jsx)(m.y,{appName:"pull-requests-processing-indicator",category:"render",metadata:{},children:(0,i.jsx)(p,{pullRequestId:n,repositoryId:t,stale:c,latest_unsynced_push_to_head_ref_at:g})})})}function p(e){let t,n,a=(0,l.c)(6),{pullRequestId:d,repositoryId:m,stale:u,latest_unsynced_push_to_head_ref_at:h}=e,{sendAnalyticsEvent:f}=(0,c.s)();if(!u||!h)return null;if(a[0]!==h||a[1]!==d||a[2]!==m||a[3]!==f){t=Symbol.for("react.early_return_sentinel");e:{let e=new Date,n=new Date(h),i=Math.round(e.getTime()-n.getTime())/1e3;if(i<20||i>=86400){t=null;break e}f("pull_requests.processing_indicator","",{repositoryId:m,pullRequestId:d,secondsSinceLastPush:i})}a[0]=h,a[1]=d,a[2]=m,a[3]=f,a[4]=t}else t=a[4];return t!==Symbol.for("react.early_return_sentinel")?t:(a[5]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(o.m,{text:"Recent push is being processed and will appear soon",direction:"s",children:(0,i.jsx)(s.Q,{as:"a",href:"https://gh.io/pr-sync-in-progress",variant:"invisible",className:"PullRequestsProcessingIndicator-module__button__z0hTK",children:(0,i.jsxs)("div",{className:"PullRequestsProcessingIndicator-module__indicator__eW1bm",children:[(0,i.jsx)(r.A,{size:"small"}),(0,i.jsx)("span",{className:"PullRequestsProcessingIndicator-module__text__UZJrd",children:"Processing updates"})]})})}),a[5]=n):n=a[5],n)}f.displayName="PullRequestsProcessingIndicatorWithDataFetching",p.displayName="PullRequestsProcessingIndicator"},49399(e,t,n){n.d(t,{b:()=>l2});var i=n(74848),l=n(16522),a=n(98529),s=n(66546),r=n(99889),o=n(73537),d=n(6877),c=n(70056),m=n(93973),u=n(61398),h=n(87555),f=n(7909),p=n(43784),g=n(34164),x=n(96540),v=n(70170),_=n(72140),b=n(18990),y=n(7771),w=n(88015),j=n(56341),S=n(2793),C=n(70503),N=n(18176);function R(e){let t,n,a,s,r,o,d,c,m,u,h,f,p,g,R,E,L=(0,l.c)(62),{ref:I,basePath:D,fileFilterMenuOptions:P,fileFilterState:A,filterSize:O,viewerLogin:F,setFileFilterState:k}=e,[$]=(0,w.ok)();L[0]!==D?(t={basePath:D},L[0]=D,L[1]=t):t=L[1];let{data:B}=(0,S.dG)(t),q=(0,x.useRef)(null);L[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>({focus:()=>{q.current?.focus()}}),L[2]=n):n=L[2],(0,x.useImperativeHandle)(I,n),L[3]!==A?(a={...A},L[3]=A,L[4]=a):a=L[4];let{filterText:M,fileExtensions:V,unselectedFileExtensions:G,showOnlyOwnedFiles:U,showDeletedFiles:z,showOnlyManifestFiles:H,showVendoredFiles:W,showViewedFiles:Q}=a,{canSeeDeletedFilesFilter:K,canSeeOnlyManifestFilesFilter:Z,canSeeVendorFilesFilter:Y}=P,J=(0,C.q6)(),{clearAllFilters:X}=(0,C.or)(),{canSeeCodeownersFilter:ee}=P,et=0;if(B){let e;ee=B.isViewerOneOfMultipleCodeowners,L[5]!==B.ownershipByPath?(e=Object.values(B.ownershipByPath).filter(T),L[5]=B.ownershipByPath,L[6]=e):e=L[6],et=e.length}let en=(0,x.useRef)((0,v.s)(e=>el({filterText:e}),250)),ei=(e,t)=>{let n=G;"selectFileExtension"===e?n=new Set([...G].filter(e=>e!==t.extension)):"unselectFileExtension"===e&&(n=new Set([...G,t.extension]));let i=Object.keys(V).filter(e=>!n.has(e)),l=new URLSearchParams($);l.delete("file-filters[]"),i.map(e=>{l.append("file-filters[]",e)}),el({unselectedFileExtensions:n},l)};L[7]!==k?(s=(e,t)=>{t&&(0,j.MM)(t),k({...e})},L[7]=k,L[8]=s):s=L[8];let el=s;L[9]!==X||L[10]!==$?(r=()=>{(0,j.MM)((0,N.$b)(new URLSearchParams($))),X()},L[9]=X,L[10]=$,L[11]=r):r=L[11];let ea=r;return L[12]!==en?(o=e=>en.current(e),L[12]=en,L[13]=o):o=L[13],L[14]!==ee||L[15]!==et||L[16]!==el||L[17]!==$||L[18]!==U||L[19]!==F?(d=ee&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b.l.Divider,{}),(0,i.jsx)(b.l.Group,{selectionVariant:"single",children:(0,i.jsx)(b.l.Item,{selected:U,onSelect:()=>{if(!F)return;let e=new URLSearchParams($);U?e.delete("owned-by[]",F):e.set("owned-by[]",F),el({showOnlyOwnedFiles:!U},e)},children:(0,i.jsxs)(i.Fragment,{children:["Only files owned by you ",(0,i.jsx)(y.A,{children:et})]})})})]}),L[14]=ee,L[15]=et,L[16]=el,L[17]=$,L[18]=U,L[19]=F,L[20]=d):d=L[20],L[21]===Symbol.for("react.memo_cache_sentinel")?(c=(0,i.jsx)(b.l.Divider,{}),L[21]=c):c=L[21],L[22]!==Z||L[23]!==el||L[24]!==$||L[25]!==H?(m=Z&&(0,i.jsx)(b.l.Item,{selected:H,onSelect:()=>{let e=new URLSearchParams($);e.set("manifests",`${!H}`),el({showOnlyManifestFiles:!H},e)},children:"Only manifest files"}),L[22]=Z,L[23]=el,L[24]=$,L[25]=H,L[26]=m):m=L[26],L[27]!==K||L[28]!==el||L[29]!==$||L[30]!==z?(u=K&&(0,i.jsx)(b.l.Item,{selected:z,onSelect:()=>{let e=new URLSearchParams($);e.set("show-deleted-files",`${!z}`),el({showDeletedFiles:!z},e)},children:"Deleted files"}),L[27]=K,L[28]=el,L[29]=$,L[30]=z,L[31]=u):u=L[31],L[32]!==Y||L[33]!==el||L[34]!==$||L[35]!==W?(h=Y&&(0,i.jsx)(b.l.Item,{selected:W,onSelect:()=>{let e=new URLSearchParams($);e.set("show-vendored-files",`${!W}`),el({showVendoredFiles:!W},e)},children:"Vendored files"}),L[32]=Y,L[33]=el,L[34]=$,L[35]=W,L[36]=h):h=L[36],L[37]!==el||L[38]!==$||L[39]!==Q?(f=()=>{let e=new URLSearchParams($);e.set("show-viewed-files",`${!Q}`),el({showViewedFiles:!Q},e)},L[37]=el,L[38]=$,L[39]=Q,L[40]=f):f=L[40],L[41]!==Q||L[42]!==f?(p=(0,i.jsx)(b.l.Item,{selected:Q,onSelect:f,children:"Viewed files"}),L[41]=Q,L[42]=f,L[43]=p):p=L[43],L[44]!==u||L[45]!==h||L[46]!==p||L[47]!==m?(g=(0,i.jsxs)(b.l.Group,{"aria-label":"More",selectionVariant:"multiple",children:[m,u,h,p]}),L[44]=u,L[45]=h,L[46]=p,L[47]=m,L[48]=g):g=L[48],L[49]!==g||L[50]!==d?(R=(0,i.jsxs)(i.Fragment,{children:[d,c,g]}),L[49]=g,L[50]=d,L[51]=R):R=L[51],L[52]!==V||L[53]!==O||L[54]!==M||L[55]!==J||L[56]!==ea||L[57]!==ei||L[58]!==R||L[59]!==o||L[60]!==G?(E=(0,i.jsx)(_.kF,{filterSize:O,filterText:M,fileExtensions:V,unselectedFileExtensions:G,onFilterTextChange:o,onFilterChange:ei,onClearAllFilters:ea,isFilteringActive:J,additionalFilterGroups:R,ref:q}),L[52]=V,L[53]=O,L[54]=M,L[55]=J,L[56]=ea,L[57]=ei,L[58]=R,L[59]=o,L[60]=G,L[61]=E):E=L[61],E}function T(e){return e.isOwnedByViewer}R.displayName="FileFilter";var E=n(4625),L=n(76331),I=n(21633),D=n(60057),P=n(38621),A=n(55717),O=n(83223),F=n(16025),k=n(26316),$=n(60720);function B(e){if(!e||!k.cg)return;let t=k.cg.scrollY??0,n=e.getBoundingClientRect().top+t-10-60;k.cg.scrollTo({top:n,left:0}),e.focus()}var q=n(13183),M=n(51189),V=n(51581),G=n(22187);let U=(0,x.memo)(function(e){let t,n=(0,l.c)(3),{changeType:a,isSymlink:s}=e;return n[0]!==a||n[1]!==s?(t=(0,i.jsx)(F.E,{status:a,isSymlink:s}),n[0]=a,n[1]=s,n[2]=t):t=n[2],t});U.displayName="FileStatusIconItem";let z=(0,x.memo)(function(e){let t,n,a,s,r,o,d,c,m,u,h=(0,l.c)(43),{file:f,depth:p,onSelect:g}=e,v=(0,x.useRef)(null),_=(0,x.useRef)(null),b=`#diff-${f.diff.pathDigest}`;h[0]===Symbol.for("react.memo_cache_sentinel")?(t={focusRowRef:v,mouseRowRef:v},h[0]=t):t=h[0];let y=(0,D.Z)(t),w=f.diff.totalCommentsCount??0,S=f.diff.highestAnnotationLevel,N=(0,C.gW)(),R=(0,C.Py)(f.diff.pathDigest),{sendAnalyticsEvent:T}=(0,V.s)(),L=(0,G.J)(),I=f.fileName??"This file",F=null;switch(w>0&&(I+=` has ${w<10?w:"9+"} ${w>1?"comments":"comment"}`),S){case"WARNING":{let e;I+=`${w>0?" and":""} has warning annotations`,h[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"pl-1 fgColor-attention",children:(0,i.jsx)(P.AlertIcon,{})}),h[1]=e):e=h[1],F=e;break}case"NOTICE":{let e;I+=`${w>0?" and":""} has notice annotations`,h[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"pl-1 fgColor-default",children:(0,i.jsx)(P.InfoIcon,{})}),h[2]=e):e=h[2],F=e;break}case"FAILURE":{let e;I+=`${w>0?" and":""} has failure annotations`,h[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"pl-1 fgColor-danger",children:(0,i.jsx)(P.XCircleFillIcon,{})}),h[3]=e):e=h[3],F=e}}h[4]!==F||h[5]!==I?(n={screenReaderText:I,annotationElement:F},h[4]=F,h[5]=I,h[6]=n):n=h[6];let{screenReaderText:z,annotationElement:W}=n;h[7]!==R?(a=()=>{if(v.current&&R){let e=window.setTimeout(()=>{let e=k.XC?.getElementById("diff_file_tree")?.parentElement,t=v.current.offsetTop,n=k.cg?.innerHeight??0;e&&(e.scrollTop=t-n/2)},0);return()=>{window.clearTimeout(e)}}},h[7]=R,h[8]=a):a=h[8],h[9]!==f.diff.pathDigest||h[10]!==R?(s=[f.diff.pathDigest,R],h[9]=f.diff.pathDigest,h[10]=R,h[11]=s):s=h[11],(0,x.useEffect)(a,s),h[12]!==b||h[13]!==f.diff.pathDigest||h[14]!==L||h[15]!==g||h[16]!==T||h[17]!==N?(r=e=>{let t=L();if(e.nativeEvent instanceof KeyboardEvent){if(v?.current!==document.activeElement)return void e.preventDefault();if("Enter"===e.key||" "===e.key){e.preventDefault(),(0,q.X)()?.registerCallback({event:e.nativeEvent,cb:e=>{T("diff-lines.inp_interaction","PULL_REQUESTS_FILE_TREE_DIFF_FILE_KEYBOARD_SELECTION",{latency:e.latency}),(0,M.au)({name:"PULL_REQUESTS_FILE_TREE_DIFF_FILE_KEYBOARD_SELECTION",tags:t,value:e.latency})}}),N(f.diff.pathDigest),(0,j.Zu)(`diff-${f.diff.pathDigest}`),(0,j.kd)(window.location.href),g?.(),k.cg?.requestAnimationFrame(()=>{B(document.getElementById(`diff-${f.diff.pathDigest}`))});return}}if(e.nativeEvent instanceof MouseEvent){if(e.metaKey||e.ctrlKey||1===e.button){e.preventDefault(),window.open(b,"_blank");return}(0,q.X)()?.registerCallback({event:e.nativeEvent,cb:e=>{T("diff-lines.inp_interaction","PULL_REQUESTS_FILE_TREE_DIFF_FILE_CLICK",{latency:e.latency}),(0,M.au)({name:"PULL_REQUESTS_FILE_TREE_DIFF_FILE_CLICK",tags:t,value:e.latency})}}),N(f.diff.pathDigest),(0,j.Zu)(`diff-${f.diff.pathDigest}`),(0,j.kd)(window.location.href),g?.(),k.cg?.requestAnimationFrame(()=>{B(document.getElementById(`diff-${f.diff.pathDigest}`))})}},h[12]=b,h[13]=f.diff.pathDigest,h[14]=L,h[15]=g,h[16]=T,h[17]=N,h[18]=r):r=h[18];let Q=r,K=f.fileName??"";h[19]!==b||h[20]!==K?(o=(0,i.jsx)(O.A,{href:b,muted:!0,ref:_,role:"presentation",className:"fgColor-default",tabIndex:-1,onClick:H,children:K}),h[19]=b,h[20]=K,h[21]=o):o=h[21];let Z=o;return h[22]!==f.diff.changeType||h[23]!==f.diff.isSymlink?(d=(0,i.jsx)(E.G.LeadingVisual,{children:(0,i.jsx)(U,{changeType:f.diff.changeType,isSymlink:f.diff.isSymlink})}),h[22]=f.diff.changeType,h[23]=f.diff.isSymlink,h[24]=d):d=h[24],h[25]!==Z||h[26]!==K||h[27]!==y?(c=y?(0,i.jsx)(A.m,{text:K,direction:"ne",children:Z}):Z,h[25]=Z,h[26]=K,h[27]=y,h[28]=c):c=h[28],h[29]!==W||h[30]!==S||h[31]!==w?(m=(!!w||S)&&(0,i.jsx)(E.G.TrailingVisual,{children:(0,i.jsxs)("div",{className:"d-flex flex-items-center flex-row",children:[!!w&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(P.CommentIcon,{}),(0,i.jsx)("div",{className:"ml-1 text-bold fgColor-default f6",children:w<10?w:"9+"})]}),W]})}),h[29]=W,h[30]=S,h[31]=w,h[32]=m):m=h[32],h[33]!==p||h[34]!==f.diff.path||h[35]!==f.diff.pathDigest||h[36]!==R||h[37]!==Q||h[38]!==z||h[39]!==d||h[40]!==c||h[41]!==m?(u=(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(E.G.Item,{defaultExpanded:!0,"aria-label":z,"aria-level":p,current:R,id:f.diff.path,onSelect:Q,ref:v,className:$.A["file-tree-row"],children:[d,c,m]},f.diff.pathDigest)}),h[33]=p,h[34]=f.diff.path,h[35]=f.diff.pathDigest,h[36]=R,h[37]=Q,h[38]=z,h[39]=d,h[40]=c,h[41]=m,h[42]=u):u=h[42],u});function H(e){return e.preventDefault()}z.displayName="File";let W=(0,x.memo)(function e({directory:t,depth:n=0,leadingPath:l="",sortByDiffOrder:a,onSelect:s,fileNodeRenderer:r}){let o=l?`${l}/`:"",d=(0,x.useRef)(null),c=(0,x.useRef)(null),m=(0,D.Z)({focusRowRef:c,mouseRowRef:d});if(!t.files.length&&1===t.directories.length)return(0,i.jsx)(i.Fragment,{children:t.directories.map(l=>(0,i.jsx)(e,{depth:0===n?1:n,directory:l,leadingPath:`${o}${t.name}`,sortByDiffOrder:a,onSelect:s,fileNodeRenderer:r},l.path))});function u(){return(0,i.jsx)(Q,{directory:t,depth:n,sortByDiffOrder:a,onSelect:s,fileNodeRenderer:r})}return 0===n?u():(0,i.jsxs)(E.G.Item,{ref:c,defaultExpanded:!0,id:t.path,children:[(0,i.jsx)(E.G.LeadingVisual,{children:(0,i.jsx)(E.G.DirectoryIcon,{})}),(0,i.jsx)("span",{ref:d,children:`${o}${t.name}`}),m&&(0,i.jsx)(L.m,{"data-testid":`${t.name}-directory-item-tooltip`,id:`${t.name}-directory-item-tooltip`,contentRef:c,"aria-label":`${o}${t.name}`,open:!0,direction:"ne"}),(0,i.jsx)(E.G.SubTree,{children:u()})]},t.path)});W.displayName="Directory";let Q=(0,x.memo)(function(e){let t,n,a,s=(0,l.c)(17),{directory:r,fileNodeRenderer:o,sortByDiffOrder:d,depth:c,onSelect:m}=e,u=void 0===c?0:c;s[0]!==r.directories||s[1]!==r.files||s[2]!==d?(t=r.files.map(Z).concat(r.directories.map(Y)),d?t.sort(J):t.sort(X),s[0]=r.directories,s[1]=r.files,s[2]=d,s[3]=t):t=s[3];let h=t;if(s[4]!==u||s[5]!==o||s[6]!==h||s[7]!==m||s[8]!==d){let e;s[10]!==u||s[11]!==o||s[12]!==m||s[13]!==d?(e=e=>"file"!==e.pathType?(0,i.jsx)(W,{depth:u+1,directory:e.node,fileNodeRenderer:o,sortByDiffOrder:d,onSelect:m},e.path):o?o({onSelect:m,file:e.node,depth:u+1}):(0,i.jsx)(z,{depth:u+1,file:e.node,onSelect:m},e.path),s[10]=u,s[11]=o,s[12]=m,s[13]=d,s[14]=e):e=s[14],n=h.map(e),s[4]=u,s[5]=o,s[6]=h,s[7]=m,s[8]=d,s[9]=n}else n=s[9];return s[15]!==n?(a=(0,i.jsx)(i.Fragment,{children:n}),s[15]=n,s[16]=a):a=s[16],a});Q.displayName="DirectoryRendering";let K=(0,x.memo)(function(e){let t,n,a,s=(0,l.c)(10),{diffs:r,fileNodeRenderer:o,sortByDiffOrder:d,className:c,onSelect:m}=e;s[0]!==r?(t=(0,I.xY)(r),s[0]=r,s[1]=t):t=s[1];let u=t;return s[2]!==o||s[3]!==u||s[4]!==m||s[5]!==d?(n=(0,i.jsx)(W,{directory:u,fileNodeRenderer:o,sortByDiffOrder:d,onSelect:m}),s[2]=o,s[3]=u,s[4]=m,s[5]=d,s[6]=n):n=s[6],s[7]!==c||s[8]!==n?(a=(0,i.jsx)(E.G,{"aria-label":"File Tree",className:c,children:n}),s[7]=c,s[8]=n,s[9]=a):a=s[9],a});function Z(e){return{path:e.filePath,pathType:"file",node:e,sortOrder:e.sortOrder}}function Y(e){return{path:e.path,pathType:"directory",node:e,sortOrder:e.sortOrder}}function J(e,t){return e.sortOrder-t.sortOrder}function X(e,t){return(0,I.wH)(e.path,t.path)}K.displayName="PullRequestDiffFileTree";var ee=n(36010),et=n(46249),en=n(7478),ei=n(42368);function el(){let e,t,n=(0,l.c)(5),{sendPullRequestAnalyticsEvent:i}=(0,ei.q)(),a=(0,C.JA)();n[0]!==a||n[1]!==i?(e=e=>{let{isErrorState:t,unavailableReason:n,userPreferenceDisabled:l,hasGroups:s}=e,r=void 0!==t&&t,o=void 0!==l&&l,d=void 0!==s&&s;i("change_groups.presented","CHANGE_GROUPS_PRESENTED",{presented_and_visible:d&&!r&&!o,presented_and_not_visible:d&&!r&&o,has_groups:d,is_error_state:r,selected_group_id:a?.id,browser_width:"u">typeof window?window.innerWidth:0,...n&&{unavailable_reason:n},...a&&{selected_group_name:a.name}})},n[0]=a,n[1]=i,n[2]=e):e=n[2];let s=e;return n[3]!==s?(t={sendChangeGroupsPresentedEvent:s},n[3]=s,n[4]=t):t=n[4],t}var ea=n(26108),es=n(64451),er=n(7624),eo=n(85965),ed=n(65820),ec=n(21373);function em(e){let t,n,a,s,r=(0,l.c)(16),{onClose:o,onSubmit:d,returnFocusRef:c,feedbackOptions:m,precheckOther:h}=e,f=void 0!==h&&h,[p,g]=(0,x.useState)(!1);r[0]!==f?(t=f?["OTHER"]:[],r[0]=f,r[1]=t):t=r[1];let[v,_]=(0,x.useState)(t),[b,y]=(0,x.useState)("");r[2]!==v||r[3]!==d||r[4]!==b?(n=e=>{e.preventDefault(),g(!0),v.length&&d({type:"NEGATIVE",feedbackChoice:v,textResponse:b})},r[2]=v,r[3]=d,r[4]=b,r[5]=n):n=r[5];let w=n;return r[6]!==p||r[7]!==v||r[8]!==m||r[9]!==w||r[10]!==b?(a=()=>(0,i.jsxs)("form",{onSubmit:w,children:[(0,i.jsxs)(u.l.Body,{children:[(0,i.jsx)("div",{className:"tmp-mb-3",children:(0,i.jsxs)(es.A,{onChange:_,required:!0,children:[(0,i.jsx)(es.A.Label,{children:"Category"}),m.map(e=>(0,i.jsxs)(er.A,{id:`feedback_choice_${e.value}`,children:[(0,i.jsx)(eo.A,{value:e.value,checked:v.includes(e.value)}),(0,i.jsx)(er.A.Label,{children:e.label})]},e.value)),p&&!v.length&&(0,i.jsx)(es.A.Validation,{variant:"error",children:"Please select a feedback category"})]})}),(0,i.jsxs)(er.A,{id:"text_response",children:[(0,i.jsx)(er.A.Label,{children:"How should we improve this response?"}),(0,i.jsx)(ed.Ay,{block:!0,rows:2,wrap:"wrap",name:"text_response",value:b,resize:"vertical",onChange:e=>y(e.currentTarget.value)})]})]}),(0,i.jsx)(u.l.Footer,{children:(0,i.jsx)(ec.Q,{type:"submit",disabled:p&&(!b||!v),children:"Submit"})})]}),r[6]=p,r[7]=v,r[8]=m,r[9]=w,r[10]=b,r[11]=a):a=r[11],r[12]!==o||r[13]!==c||r[14]!==a?(s=(0,i.jsx)(u.l,{onClose:o,title:"Provide additional feedback",subtitle:"Please help us improve Groups by Copilot by sharing more details about these generated groups.",returnFocusRef:c,renderBody:a}),r[12]=o,r[13]=c,r[14]=a,r[15]=s):s=r[15],s}function eu(e){let t,n,a=(0,l.c)(5),{disabled:s,onSubmit:r}=e;return a[0]!==r?(t=()=>r({type:"POSITIVE"}),a[0]=r,a[1]=t):t=a[1],a[2]!==s||a[3]!==t?(n=(0,i.jsx)(ea.K,{size:"small",variant:"invisible",disabled:s,icon:P.ThumbsupIcon,"aria-label":"Positive feedback",onClick:t}),a[2]=s,a[3]=t,a[4]=n):n=a[4],n}function eh(e){let t,n,a,s,r,o=(0,l.c)(12),{disabled:d,onSubmit:c,feedbackOptions:m}=e,[u,h]=(0,x.useState)(!1),f=(0,x.useRef)(null);o[0]!==c?(t=e=>{c(e),h(!1)},o[0]=c,o[1]=t):t=o[1];let p=t;return o[2]!==u||o[3]!==m||o[4]!==p?(n=u&&(0,i.jsx)(em,{onClose:()=>h(!1),onSubmit:p,returnFocusRef:f,feedbackOptions:m}),o[2]=u,o[3]=m,o[4]=p,o[5]=n):n=o[5],o[6]===Symbol.for("react.memo_cache_sentinel")?(a=()=>h(!0),o[6]=a):a=o[6],o[7]!==d?(s=(0,i.jsx)(ea.K,{ref:f,size:"small",variant:"invisible",disabled:d,icon:P.ThumbsdownIcon,"aria-label":"Negative feedback",onClick:a}),o[7]=d,o[8]=s):s=o[8],o[9]!==n||o[10]!==s?(r=(0,i.jsxs)(i.Fragment,{children:[n,s]}),o[9]=n,o[10]=s,o[11]=r):r=o[11],r}em.displayName="NegativeFeedbackForm",eu.displayName="PositiveFeedbackButton",eh.displayName="NegativeFeedbackButton";var ef=n(62764),ep=n(49671),eg=n(94747),ex=n(78431);function ev(){let e,t=(0,l.c)(2),n=(0,ep.e)(ef.uT.submitCopilotGroupsFeedback);return t[0]!==n?(e={mutationFn:async e=>{let{type:t,feedbackChoice:i,textResponse:l}=e,a={feedback:t};l&&(a.text_response=l),i&&i.length>0&&(a.feedback_choice=i);let s=await (0,ex.q$)(n,{method:"POST",headers:{Accept:"application/json"},body:a}),r=await (0,ex.hp)(s);return(0,ex.R)(s,r),r}},t[0]=n,t[1]=e):e=t[1],(0,eg.n)(e)}let e_=e=>{let t,n,a,s,r,o=(0,l.c)(15),{onNegativeFeedbackSubmit:d}=e,[c,m]=(0,x.useState)(),{mutate:u}=ev(),h=(0,C.xW)().changeGroupFeedbackOptions;o[0]!==u?(t=e=>{m(e.type),u(e)},o[0]=u,o[1]=t):t=o[1];let f=t;o[2]!==f||o[3]!==d?(n=e=>{d(),f(e)},o[2]=f,o[3]=d,o[4]=n):n=o[4];let p=n;return o[5]!==f||o[6]!==c?(a="NEGATIVE"!==c&&(0,i.jsx)(eu,{disabled:!!c,onSubmit:f}),o[5]=f,o[6]=c,o[7]=a):a=o[7],o[8]!==h||o[9]!==p||o[10]!==c?(s="POSITIVE"!==c&&(0,i.jsx)(eh,{disabled:!!c,onSubmit:p,feedbackOptions:h}),o[8]=h,o[9]=p,o[10]=c,o[11]=s):s=o[11],o[12]!==a||o[13]!==s?(r=(0,i.jsxs)("div",{className:"d-flex",children:[a,s]}),o[12]=a,o[13]=s,o[14]=r):r=o[14],r};e_.displayName="Feedback";let eb=e=>{let t,n,a=(0,l.c)(5),{className:s,onNegativeFeedbackSubmit:r}=e;return a[0]!==r?(t=(0,i.jsx)(ee.t,{boundaryName:"GroupsFeedback",fallback:null,children:(0,i.jsx)(e_,{onNegativeFeedbackSubmit:r})}),a[0]=r,a[1]=t):t=a[1],a[2]!==s||a[3]!==t?(n=(0,i.jsx)("div",{className:s,children:t}),a[2]=s,a[3]=t,a[4]=n):n=a[4],n};eb.displayName="GroupsFeedback";var ey=n(19129),ew=n(59592),ej=n(97286),eS=n(78597);function eC(e){switch(e){case"CREATED":case"RUNNING":case"STARTED":case"WAITING":return!1;default:return!0}}function eN(e,t){let n,i,a,s,r,o=(0,l.c)(15),d=(0,ep.e)(ef.uT.changeGroups);o[0]!==t||o[1]!==d||o[2]!==e?(n=function({baseSha:e,headSha:t,changeGroupsURL:n}){return[ef.uT.changeGroups,n,`baseSha:${e}`,`headSha:${t}`]}({headSha:e,baseSha:t,changeGroupsURL:d}),o[0]=t,o[1]=d,o[2]=e,o[3]=n):n=o[3];let c=n,{updateChangeGroupGeneration:m}=(0,C.wL)(),u=(0,C.xW)();o[4]!==u?(i=()=>{let e=u.latestChangeGroupOrchestration?.state;if(e&&eC(e))return u},o[4]=u,o[5]=i):i=o[5];let h=i;return o[6]!==d||o[7]!==m?(a=async()=>{let e=await (0,eS.QJ)(d);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();return m(t),t},o[6]=d,o[7]=m,o[8]=a):a=o[8],o[9]!==h?(s=h(),o[9]=h,o[10]=s):s=o[10],o[11]!==c||o[12]!==a||o[13]!==s?(r={queryKey:c,queryFn:a,initialData:s,staleTime:1/0},o[11]=c,o[12]=a,o[13]=s,o[14]=r):r=o[14],(0,ej.I)(r)}var eR=n(35205);function eT(e){let t,n,a,s,r,o,d,c,m,u,h,f=(0,l.c)(46),{groups:p,activeGroupId:_,onSelectGroup:w,onClearActiveGroup:j,isLoadingState:S}=e,{sendPullRequestAnalyticsEvent:N}=(0,ei.q)(),{sendChangeGroupsPresentedEvent:R}=el(),{fullDiff:T}=(0,C.L3)(),E=(0,C.a_)(),L=(0,C.TV)(),I=(0,C.r$)(),D=(0,x.useRef)(null),{error:A}=eN(T.headOid,T.baseOid),O=!!A&&!S;!function(e,t,n){let i,a,s=(0,l.c)(7),r=(0,ey.A)(),{refetch:o}=eN(n,t);s[0]!==r||s[1]!==o?(i=(0,v.n)(()=>{r()&&o()},2e3),s[0]=r,s[1]=o,s[2]=i):i=s[2];let d=i;s[3]!==t||s[4]!==n||s[5]!==d?(a=e=>{e?.base_commit_oid===t&&e?.head_commit_oid===n&&window.setTimeout(()=>d(),e.wait||0)},s[3]=t,s[4]=n,s[5]=d,s[6]=a):a=s[6];let c=a;(0,ew.x)(e,c)}(E,T.baseOid,T.headOid),f[0]!==p.length||f[1]!==S||f[2]!==R||f[3]!==O||f[4]!==L?(t=()=>{S||(O||L?R({isErrorState:!0,unavailableReason:L||void 0}):p.length>0?R({isErrorState:!1,hasGroups:!0}):R({isErrorState:!1,hasGroups:!1}))},f[0]=p.length,f[1]=S,f[2]=R,f[3]=O,f[4]=L,f[5]=t):t=f[5],f[6]!==p||f[7]!==S||f[8]!==R||f[9]!==O||f[10]!==L?(n=[p,S,O,L,R],f[6]=p,f[7]=S,f[8]=R,f[9]=O,f[10]=L,f[11]=n):n=f[11],(0,x.useEffect)(t,n),f[12]!==j||f[13]!==N?(a=()=>{N("groups_list.clear_group","GROUPS_LIST_ITEM"),j()},f[12]=j,f[13]=N,f[14]=a):a=f[14];let F=a;f[15]!==F?(s=()=>{F(),requestAnimationFrame(()=>{D.current?.focus()})},f[15]=F,f[16]=s):s=f[16];let $=s,B=p.length>0,{isCollapsed:q,handleToggleCollapsed:M}=function(e){let t,n,i,a,s,r,o=(0,l.c)(13);o[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,eR.A)("localStorage"),o[0]=t):t=o[0];let d=t,[c,m]=(0,x.useState)(!1),{sendPullRequestAnalyticsEvent:u}=(0,ei.q)();o[1]!==e?(n=()=>{let t=d.getItem(eD(e));null!==t&&m(JSON.parse(t))},o[1]=e,o[2]=n):n=o[2];let h=(0,x.useEffectEvent)(n);o[3]!==h?(i=()=>{h()},o[3]=h,o[4]=i):i=o[4],o[5]===Symbol.for("react.memo_cache_sentinel")?(a=[],o[5]=a):a=o[5],(0,x.useEffect)(i,a),o[6]!==c||o[7]!==e||o[8]!==u?(s=()=>{let t=!c;k.cg?.requestAnimationFrame(()=>{d.setItem(eD(e),JSON.stringify(t))}),m(()=>t),u("groups_list.toggle_collapse","GROUPS_LIST_TOGGLE",{is_collapsed:t})},o[6]=c,o[7]=e,o[8]=u,o[9]=s):s=o[9];let f=s;return o[10]!==f||o[11]!==c?(r={isCollapsed:c,handleToggleCollapsed:f},o[10]=f,o[11]=c,o[12]=r):r=o[12],r}(I);f[17]!==M?(r=()=>{M(),requestAnimationFrame(()=>{D.current?.focus()})},f[17]=M,f[18]=r):r=f[18];let V=r;f[19]===Symbol.for("react.memo_cache_sentinel")?(o=(0,i.jsx)(et.A,{as:"h2",className:"h6",children:"Groups by Copilot"}),f[19]=o):o=f[19];let G=o;return f[20]===Symbol.for("react.memo_cache_sentinel")?(d=(0,g.$)("GroupsList-module__GroupsListContainer__UhdhU"),f[20]=d):d=f[20],f[21]!==p.length||f[22]!==M||f[23]!==B||f[24]!==q||f[25]!==S?(c=S?(0,i.jsxs)("div",{className:"d-flex flex-row flex-items-center fgColor-muted pt-2 px-2 pb-1",children:[G,(0,i.jsx)("span",{className:"ml-auto d-flex flex-items-center",children:(0,i.jsx)(en.A,{size:"small","aria-label":"Loading change groups"})})]}):(0,i.jsxs)("button",{className:(0,g.$)("d-flex flex-row flex-items-center fgColor-muted","GroupsList-module__GroupsListToggle__PbjE0"),onClick:M,"aria-expanded":!q,ref:D,children:[G,q&&B&&(0,i.jsx)(y.A,{scheme:"secondary",className:"mx-2",children:p.length}),q?(0,i.jsx)(P.ChevronDownIcon,{className:"ml-auto"}):(0,i.jsx)(P.ChevronUpIcon,{className:"ml-auto"})]}),f[21]=p.length,f[22]=M,f[23]=B,f[24]=q,f[25]=S,f[26]=c):c=f[26],f[27]!==_||f[28]!==p||f[29]!==F||f[30]!==$||f[31]!==B||f[32]!==q||f[33]!==w||f[34]!==V?(m=B&&(0,i.jsxs)("div",{className:(0,g.$)("mt-n2","GroupsList-module__GroupsListItemsShiftLeft__xaCXu"),children:[q&&!_?(0,i.jsx)("div",{className:"pb-2"}):(0,i.jsxs)(b.l,{children:[!q&&(0,i.jsx)(b.l.Item,{active:void 0===_,onSelect:F,children:"All files"},"All files"),p.toSorted(eE).map(e=>(0,i.jsx)(eI,{group:e,activeGroupId:_,onSelectGroup:w,isListCollapsed:q,onClickGroupWhenCollapsed:$},e.id)).filter(Boolean)]}),!q&&(0,i.jsx)(eb,{className:"ml-2",onNegativeFeedbackSubmit:V})]}),f[27]=_,f[28]=p,f[29]=F,f[30]=$,f[31]=B,f[32]=q,f[33]=w,f[34]=V,f[35]=m):m=f[35],f[36]!==B||f[37]!==q||f[38]!==S||f[39]!==O||f[40]!==L?(u=!q&&!B&&!S&&(0,i.jsx)("div",{className:"px-2 pb-2 pt-0 f6 fgColor-muted",children:L?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"mb-0 d-inline",children:function(e){switch(e){case"DIFF_TOO_LARGE":case"TOO_MANY_GROUPS":return"Groups are unavailable because the PR exceeds the size limit.";case"DIFF_TOO_SMALL":case"TOO_FEW_GROUPS":return"Grouping was skipped because all changes are closely related.";default:return"Copilot was unable to generate groups for this pull request."}}(L)})," ",(0,i.jsx)(eL,{})]}):O&&(0,i.jsx)("p",{className:"mb-0",children:"No groups created"})}),f[36]=B,f[37]=q,f[38]=S,f[39]=O,f[40]=L,f[41]=u):u=f[41],f[42]!==u||f[43]!==c||f[44]!==m?(h=(0,i.jsxs)("div",{className:d,children:[c,m,u]}),f[42]=u,f[43]=c,f[44]=m,f[45]=h):h=f[45],h}function eE(e,t){return t.priority-e.priority}function eL(){let e,t,n,a,s=(0,l.c)(9),r=(0,x.useRef)(null),{mutate:o}=ev(),[d,c]=(0,x.useState)(!1),m=(0,C.xW)().changeGroupFeedbackOptions;s[0]!==o?(e=e=>{o(e),c(!1)},s[0]=o,s[1]=e):e=s[1];let u=e;return s[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(O.A,{className:"d-inline",as:"button",ref:r,inline:!0,muted:!0,onClick:()=>c(!0),children:"Give feedback"}),s[2]=t):t=s[2],s[3]!==d||s[4]!==m||s[5]!==u?(n=d&&(0,i.jsx)(em,{feedbackOptions:m,onSubmit:u,onClose:()=>c(!1),returnFocusRef:r,precheckOther:!0}),s[3]=d,s[4]=m,s[5]=u,s[6]=n):n=s[6],s[7]!==n?(a=(0,i.jsxs)(i.Fragment,{children:[t,n]}),s[7]=n,s[8]=a):a=s[8],a}function eI(e){let t,n,a,s,r,o,d=(0,l.c)(20),{group:c,activeGroupId:m,isListCollapsed:u,onSelectGroup:h,onClickGroupWhenCollapsed:f}=e,{sendPullRequestAnalyticsEvent:p}=(0,ei.q)(),v=(0,x.useRef)(null);d[0]===Symbol.for("react.memo_cache_sentinel")?(t={focusRowRef:v,mouseRowRef:v},d[0]=t):t=d[0];let _=(0,D.Z)(t);d[1]!==c.id||d[2]!==h||d[3]!==p?(n=()=>{p("groups_list.select_group","GROUPS_LIST_ITEM"),h(c.id)},d[1]=c.id,d[2]=h,d[3]=p,d[4]=n):n=d[4];let y=n,w=m===c.id;if(u&&!w)return null;let j=`${c.name}-${u?"collapsed":"expanded"}`,S=u?void 0:y;d[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.$)("GroupsList-module__GroupItem__Oxspy","PRIVATE_TreeView-item-content-text"),d[5]=a):a=d[5],d[6]!==c.name?(s=(0,i.jsx)("div",{className:a,children:c.name}),d[6]=c.name,d[7]=s):s=d[7],d[8]!==u||d[9]!==f?(r=u?(0,i.jsx)(b.l.TrailingAction,{as:"button",label:"Clear active group",icon:P.XIcon,onClick:e=>{e.preventDefault(),e.stopPropagation(),f()}}):null,d[8]=u,d[9]=f,d[10]=r):r=d[10],d[11]!==w||d[12]!==j||d[13]!==S||d[14]!==s||d[15]!==r?(o=(0,i.jsxs)(b.l.Item,{active:w,onSelect:S,ref:v,children:[s,r]},j),d[11]=w,d[12]=j,d[13]=S,d[14]=s,d[15]=r,d[16]=o):o=d[16];let C=o;if(_){let e;return d[17]!==c.name||d[18]!==C?(e=(0,i.jsx)(A.m,{text:c.name,direction:"ne",children:C}),d[17]=c.name,d[18]=C,d[19]=e):e=d[19],e}return C}function eD(e){return`GroupsListIsCollapsed_${e}`}eT.displayName="GroupsList",eL.displayName="FeedbackButton",eI.displayName="GroupItem";let eP="pr-file-tree";function eA(e){let t,n,a,s,r,d,c,m,u,h,f,p,v=(0,l.c)(35),{className:_,fileFilter:b,filteredDiffs:y,onFileSelected:w,onSetFilterState:j,allowPullRequestGroups:S}=e,N=void 0!==S&&S,R=(0,C.iY)(),T=(0,C.YL)(),E=(0,C.ww)(),L=(0,C.Fl)(),I=(0,C.WA)(),{sendChangeGroupsPresentedEvent:D}=el();v[0]!==L?(t=L&&!eC(L.state),v[0]=L,v[1]=t):t=v[1];let P=t,A=(0,C.TV)();v[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.G7)("hide_groups_list_for_few_groups"),v[2]=n):n=v[2];let O=n&&("TOO_FEW_GROUPS"===A||"DIFF_TOO_SMALL"===A||"NOT_GENERATED_YET"===A);return v[3]!==N||v[4]!==R.length||v[5]!==E||v[6]!==D||v[7]!==I?(a=()=>{N&&R.length>0&&!E&&!I&&D({isErrorState:!1,userPreferenceDisabled:!0,hasGroups:!0})},s=[N,E,I,D,R.length],v[3]=N,v[4]=R.length,v[5]=E,v[6]=D,v[7]=I,v[8]=a,v[9]=s):(a=v[8],s=v[9]),(0,x.useEffect)(a,s),v[10]!==T||v[11]!==N||v[12]!==R||v[13]!==E||v[14]!==P||v[15]!==j||v[16]!==O||v[17]!==I?(r=N&&!E&&I&&!O&&(0,i.jsx)(eT,{activeGroupId:T,groups:R,onClearActiveGroup:()=>{j({activeChangeGroupId:void 0})},onSelectGroup:e=>{j({activeChangeGroupId:e})},isLoadingState:P||!1}),v[10]=T,v[11]=N,v[12]=R,v[13]=E,v[14]=P,v[15]=j,v[16]=O,v[17]=I,v[18]=r):r=v[18],v[19]===Symbol.for("react.memo_cache_sentinel")?(d=(0,i.jsx)("span",{children:"File tree failed to load."}),v[19]=d):d=v[19],v[20]!==_?(c=(0,g.$)("d-flex flex-column min-height-0",_),v[20]=_,v[21]=c):c=v[21],v[22]!==b?(m=(0,i.jsx)("div",{className:"tmp-pb-3 tmp-pr-lg-3",children:b}),v[22]=b,v[23]=m):m=v[23],v[24]===Symbol.for("react.memo_cache_sentinel")?(u=(0,i.jsx)("h2",{className:"sr-only",children:"File tree"}),v[24]=u):u=v[24],v[25]!==y||v[26]!==w?(h=(0,i.jsxs)("div",{className:"PullRequestFileTree-module__FileTreeScrollable__OW_Y2",children:[u,(0,i.jsx)(K,{diffs:y,fileNodeRenderer:eO,sortByDiffOrder:!0,onSelect:w,className:"tmp-pr-lg-3"})]}),v[25]=y,v[26]=w,v[27]=h):h=v[27],v[28]!==h||v[29]!==c||v[30]!==m?(f=(0,i.jsx)(ee.t,{boundaryName:"PullRequestDiffFileTree",fallback:d,children:(0,i.jsxs)("div",{className:c,id:eP,children:[m,h]})}),v[28]=h,v[29]=c,v[30]=m,v[31]=f):f=v[31],v[32]!==f||v[33]!==r?(p=(0,i.jsxs)("div",{className:"d-flex flex-column height-fit",children:[r,f]}),v[32]=f,v[33]=r,v[34]=p):p=v[34],p}function eO(e){return(0,i.jsx)(eF,{...e},e.file.filePath)}eA.displayName="PullRequestFileTree";let eF=(0,x.memo)(function(e){let t,n,a,s,r,o,d=(0,l.c)(14);d[0]!==e?({file:t,...n}=e,d[0]=e,d[1]=t,d[2]=n):(t=d[1],n=d[2]),d[3]!==t.diff?(a=Object.values(t.diff?.markersMap??{}).flatMap(e$),d[3]=t.diff,d[4]=a):a=d[4];let c=a,m=(0,C.XS)(c);d[5]!==m||d[6]!==t.diff?(s={...t.diff,totalCommentsCount:m},d[5]=m,d[6]=t.diff,d[7]=s):s=d[7],d[8]!==t||d[9]!==s?(r={...t,diff:s},d[8]=t,d[9]=s,d[10]=r):r=d[10];let u=r;return d[11]!==u||d[12]!==n?(o=(0,i.jsx)(z,{file:u,...n}),d[11]=u,d[12]=n,d[13]=o):o=d[13],o});function ek(e){return e.id}function e$(e){return e.threads.map(ek)}eF.displayName="PullRequestFile";var eB=n(41431);function eq(e){let t,n,a,s,r=(0,l.c)(14),{pageLimits:d}=e;r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.G7)("load_paginated_threads_on_diff"),r[0]=t):t=r[0];let c=t,m=d.filesLimitExceeded||!c&&d.reviewThreadsLimitExceeded||c&&d.reviewThreadsPaginatedLimitExceeded||d.annotationsLimitExceeded;r[1]!==d.annotationsLimit||r[2]!==d.annotationsLimitExceeded||r[3]!==d.filesLimit||r[4]!==d.filesLimitExceeded||r[5]!==d.reviewThreadsLimit||r[6]!==d.reviewThreadsLimitExceeded||r[7]!==d.reviewThreadsPaginatedLimit||r[8]!==d.reviewThreadsPaginatedLimitExceeded?(n=()=>{let e=[];d.filesLimitExceeded&&e.push(`first ${d.filesLimit} files`),c?d.reviewThreadsPaginatedLimitExceeded&&e.push(`latest ${d.reviewThreadsPaginatedLimit} comments`):d.reviewThreadsLimitExceeded&&e.push(`latest ${d.reviewThreadsLimit} comments`),d.annotationsLimitExceeded&&e.push(`first ${d.annotationsLimit} alerts`);let t="";1===e.length?t=`${e[0]}`:2===e.length?t=`${e[0]} and ${e[1]}`:3===e.length&&(t=`${e[0]}, ${e[1]}, and ${e[2]}`);let n="Only the "+t+" are currently being shown.";return d.reviewThreadsLimitExceeded&&!c&&(d.reviewThreadsPaginatedLimitExceeded?n+=` To view up to ${d.reviewThreadsPaginatedLimit} comments, open the comments side panel.`:n+=" To view the remaining comments, open the comments side panel"),n},r[1]=d.annotationsLimit,r[2]=d.annotationsLimitExceeded,r[3]=d.filesLimit,r[4]=d.filesLimitExceeded,r[5]=d.reviewThreadsLimit,r[6]=d.reviewThreadsLimitExceeded,r[7]=d.reviewThreadsPaginatedLimit,r[8]=d.reviewThreadsPaginatedLimitExceeded,r[9]=n):n=r[9];let u=n();r[10]!==u?(a=(0,i.jsx)("span",{children:u}),r[10]=u,r[11]=a):a=r[11];let h=a;return m?(r[12]!==h?(s=(0,i.jsx)(eB.l,{"aria-label":"Warning",title:"Warning",variant:"warning",hideTitle:!0,description:h,className:"tmp-mb-3"}),r[12]=h,r[13]=s):s=r[13],s):null}eq.displayName="PageLimitsBanner";let eM="ViewedFileProgress-module__FilesCountText__NwSKr",eV=e=>{let t,n,a,s,r=(0,l.c)(5),{progress:o}=e;r[0]===Symbol.for("react.memo_cache_sentinel")?(t={transform:"rotate(-90deg)"},r[0]=t):t=r[0],r[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)("circle",{cx:"50%",cy:"50%",fill:"transparent",r:"6",stroke:"var(--borderColor-default, var(--color-border-default))",strokeWidth:"2"}),r[1]=n):n=r[1];let d=38-38*o;return r[2]===Symbol.for("react.memo_cache_sentinel")?(a={transition:"stroke-dashoffset 0.35s"},r[2]=a):a=r[2],r[3]!==d?(s=(0,i.jsxs)("svg",{"data-circumference":"38",height:"16",role:"presentation",style:t,width:"16",children:[n,(0,i.jsx)("circle",{cx:"50%",cy:"50%",fill:"transparent",r:"6",stroke:"var(--fgColor-done, var(--color-done-fg))",strokeDasharray:38,strokeDashoffset:d,strokeLinecap:"round",strokeWidth:"2",style:a})]}),r[3]=d,r[4]=s):s=r[4],s};function eG(e){let t,n,a,s,r,o,d,c,m=(0,l.c)(17),{totalFilesCount:u,className:h}=e,f=(0,C.gi)();if(0===u)return null;m[0]!==h?(t=(0,g.$)("d-flex flex-row flex-items-center",h),m[0]=h,m[1]=t):t=m[1];let p=(f??0)/u||0;return m[2]!==p?(n=(0,i.jsx)(eV,{progress:p}),m[2]=p,m[3]=n):n=m[3],m[4]===Symbol.for("react.memo_cache_sentinel")?(a=(0,g.$)("ml-1","ViewedFileProgress-module__ProgressContainer___3P2j"),m[4]=a):a=m[4],m[5]!==f?(s=(0,i.jsx)("span",{className:eM,children:f}),m[5]=f,m[6]=s):s=m[6],m[7]!==u?(r=(0,i.jsx)("span",{className:eM,children:u}),m[7]=u,m[8]=r):r=m[8],m[9]===Symbol.for("react.memo_cache_sentinel")?(o=(0,i.jsx)("span",{className:"ViewedFileProgress-module__ViewedText__s4QAn",children:"viewed"}),m[9]=o):o=m[9],m[10]!==s||m[11]!==r?(d=(0,i.jsxs)("span",{className:a,children:[s," /"," ",r," ",o]}),m[10]=s,m[11]=r,m[12]=d):d=m[12],m[13]!==t||m[14]!==n||m[15]!==d?(c=(0,i.jsxs)("div",{className:t,children:[n,d]}),m[13]=t,m[14]=n,m[15]=d,m[16]=c):c=m[16],c}function eU(e){let t=document.querySelector('#__primerPortalRoot__ div[role="dialog"]'),n=document.querySelector(`#${e} div[role="dialog"]`);(t||n)&&document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",code:"Escape",ctrlKey:!0}))}eV.displayName="ProgressIcon",eG.displayName="ViewedFileProgress";var ez=n(89823),eH=n(38750),eW=n(67323),eQ=n(206),eK=n(35800);function eZ(e,t){let{filterText:n,showResolvedThreads:i,showOutdatedThreads:l}=t;if(!i&&e.isResolved||!l&&e.isOutdated)return!1;if(n){let t=n.toLowerCase();if(!e.authorLogin.toLowerCase().includes(t)&&!e.body.toLowerCase().includes(t)&&!e.path.toLowerCase().includes(t))return!1}return!t.selectedAuthor||e.authorLogin===t.selectedAuthor}function eY(e){return e.id}let eJ={filterText:"",showResolvedThreads:!0,showOutdatedThreads:!0};function eX(e){let t,n,a,s,r,o,d,c,m,u=(0,l.c)(33),{authorList:h,className:f,filterState:p,onFilterStateChange:x,hideReviewThreadFilters:v,iconOnlyReviewCommentsFilter:_}=e,y=void 0!==_&&_;u[0]!==p||u[1]!==x?(t=e=>{x({...p,filterText:e})},u[0]=p,u[1]=x,u[2]=t):t=u[2];let w=t;u[3]!==p||u[4]!==x?(n=()=>{x({...p,showResolvedThreads:!p.showResolvedThreads})},u[3]=p,u[4]=x,u[5]=n):n=u[5];let j=n;u[6]!==p||u[7]!==x?(a=()=>{x({...p,showOutdatedThreads:!p.showOutdatedThreads})},u[6]=p,u[7]=x,u[8]=a):a=u[8];let S=a;u[9]!==p||u[10]!==x?(s=e=>{if(p.selectedAuthor===e)return x({...p,selectedAuthor:void 0});x({...p,selectedAuthor:e})},u[9]=p,u[10]=x,u[11]=s):s=u[11];let C=s;return u[12]!==f?(r=(0,g.$)("d-flex flex-row gap-2 flex-nowrap",f),u[12]=f,u[13]=r):r=u[13],u[14]!==w?(o=e=>w(e.target.value),u[14]=w,u[15]=o):o=u[15],u[16]!==p.filterText||u[17]!==o?(d=(0,i.jsx)(eH.A,{block:!0,"aria-label":"Filter comments",leadingVisual:P.SearchIcon,placeholder:"Filter comments",value:p.filterText,onChange:o}),u[16]=p.filterText,u[17]=o,u[18]=d):d=u[18],u[19]!==h||u[20]!==p.selectedAuthor||u[21]!==p.showOutdatedThreads||u[22]!==p.showResolvedThreads||u[23]!==v||u[24]!==y||u[25]!==C||u[26]!==S||u[27]!==j?(c=!v||h.length>1?(0,i.jsxs)(eW.W,{children:[(0,i.jsx)(eW.W.Anchor,{children:y?(0,i.jsx)(ea.K,{icon:P.FilterIcon,"aria-label":"Additional comment filters"}):(0,i.jsx)(ec.Q,{"aria-label":"Additional comment filters",className:"flex-shrink-0",leadingVisual:P.FilterIcon,trailingAction:P.TriangleDownIcon,children:"Filter"})}),(0,i.jsx)(eW.W.Overlay,{width:"small",children:(0,i.jsxs)(b.l,{selectionVariant:"single",children:[!v&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b.l.Item,{selected:p.showResolvedThreads,onSelect:()=>j(),children:"Show resolved comments"}),(0,i.jsx)(b.l.Item,{selected:p.showOutdatedThreads,onSelect:()=>S(),children:"Show outdated comments"})]}),h.length>1&&(0,i.jsxs)(i.Fragment,{children:[!v&&(0,i.jsx)(b.l.Divider,{}),(0,i.jsxs)(b.l.Group,{children:[(0,i.jsx)(b.l.GroupHeading,{children:"Filter by"}),h.map(e=>(0,i.jsxs)(b.l.Item,{selected:p.selectedAuthor===e.login,onSelect:()=>C(e.login),children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(eQ.r,{src:e.avatarUrl})}),e.login]},e.login))]})]})]})})]}):null,u[19]=h,u[20]=p.selectedAuthor,u[21]=p.showOutdatedThreads,u[22]=p.showResolvedThreads,u[23]=v,u[24]=y,u[25]=C,u[26]=S,u[27]=j,u[28]=c):c=u[28],u[29]!==r||u[30]!==d||u[31]!==c?(m=(0,i.jsxs)("div",{className:r,children:[d,c]}),u[29]=r,u[30]=d,u[31]=c,u[32]=m):m=u[32],m}eX.displayName="CommentsFilter";var e0=n(33874),e1=n(27486),e2=n(30681),e3=n(59134),e4=n(4925);function e5(e){let t,n,a,s,r,o,d,c,m,u,h,f,p,v,_,b=(0,l.c)(48),{firstCommentId:y,isCollapsed:w,isOutdated:j,isResolved:S,startLine:C,line:N,onToggleCollapsed:R,onNavigateToDiffComment:T,path:E,rightSideContent:L,threadId:I,headingLevel:D}=e,F=void 0===D?"h3":D;b[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,eR.A)("localStorage"),b[0]=t):t=b[0];let k=t,[$,B]=(0,x.useState)(w);b[1]!==I?(n=()=>{let e=localStorage.getItem(`reviewThreadIsCollapsed_${I}`);null!==e&&B(JSON.parse(e))},b[1]=I,b[2]=n):n=b[2],b[3]!==$||b[4]!==I?(a=[$,I],b[3]=$,b[4]=I,b[5]=a):a=b[5],(0,x.useEffect)(n,a);let q=C?`Lines ${C} - ${N}`:`Line ${N}`;b[6]!==$||b[7]!==R||b[8]!==I?(s=()=>{k.setItem(`reviewThreadIsCollapsed_${I}`,JSON.stringify(!$)),B(e6),R()},b[6]=$,b[7]=R,b[8]=I,b[9]=s):s=b[9];let M=s,V=$&&"rounded-2",G=$&&"border-bottom-0";b[10]!==V||b[11]!==G?(r=(0,g.$)("d-flex flex-row flex-items-center px-2 py-1 bgColor-muted rounded-top-2 border-bottom",V,G),b[10]=V,b[11]=G,b[12]=r):r=b[12];let U=$?"Open review comment":"Close review comment",z=$?P.ChevronRightIcon:P.ChevronDownIcon;b[13]!==M||b[14]!==z||b[15]!==U?(o=(0,i.jsx)(ea.K,{"aria-label":U,icon:z,size:"small",variant:"invisible",onClick:M}),b[13]=M,b[14]=z,b[15]=U,b[16]=o):o=b[16],b[17]===Symbol.for("react.memo_cache_sentinel")?(d=(0,g.$)("ConversationHeader-module__file-name-overflow__PjZXd","d-inline text-mono no-wrap overflow-hidden direction-rtl fgColor-default"),b[17]=d):d=b[17];let H=`#r${y}`;b[18]!==T||b[19]!==E||b[20]!==H?(c=(0,i.jsxs)(O.A,{className:d,onClick:T,href:H,muted:!0,children:["\u200E",E,"\u200E"]}),b[18]=T,b[19]=E,b[20]=H,b[21]=c):c=b[21],b[22]!==E||b[23]!==c?(m=(0,i.jsx)(A.m,{direction:"n",text:E,type:"label",children:c}),b[22]=E,b[23]=c,b[24]=m):m=b[24],b[25]!==N||b[26]!==q?(u=!!N&&(0,i.jsx)("span",{className:"f6 fgColor-muted text-normal no-wrap ml-2",children:q}),b[25]=N,b[26]=q,b[27]=u):u=b[27],b[28]!==F||b[29]!==m||b[30]!==u?(h=(0,i.jsxs)(et.A,{as:F,className:"d-flex flex-items-center flex-1 min-width-0 mr-2 ml-1 f6 text-semibold",children:[m,u]}),b[28]=F,b[29]=m,b[30]=u,b[31]=h):h=b[31],b[32]!==S?(f=S&&(0,i.jsx)(e4.A,{size:"large",className:"mx-1",variant:"secondary",children:"Resolved"}),b[32]=S,b[33]=f):f=b[33],b[34]!==j||b[35]!==S?(p=j&&!S&&(0,i.jsx)(e4.A,{size:"large",className:"mx-1",variant:"attention",children:"Outdated"}),b[34]=j,b[35]=S,b[36]=p):p=b[36];let W=`#r${y}`;return b[37]!==T||b[38]!==W?(v=(0,i.jsx)(ea.K,{as:"a","aria-label":"Jump to the comment in the diff",tooltipDirection:"se",icon:P.FileSymlinkFileIcon,variant:"invisible",href:W,onClick:T}),b[37]=T,b[38]=W,b[39]=v):v=b[39],b[40]!==L||b[41]!==o||b[42]!==h||b[43]!==f||b[44]!==p||b[45]!==v||b[46]!==r?(_=(0,i.jsxs)("div",{className:r,children:[o,h,f,p,v,L]}),b[40]=L,b[41]=o,b[42]=h,b[43]=f,b[44]=p,b[45]=v,b[46]=r,b[47]=_):_=b[47],_}function e6(e){return!e}e5.displayName="ConversationHeader";var e7=n(43029),e8=n(53572),e9=n(3079);function te(e){let t,n,a,s,r,o,d,c,m=(0,l.c)(38),{firstCommentId:u,isCollapsed:h,onToggleCollapsed:p,onNavigateToDiffComment:g,thread:v,headingLevel:_,isResolved:b,isOutdated:y,lineKey:w}=e,{sendPullRequestAnalyticsEvent:j}=(0,ei.q)(),[S,C]=(0,x.useState)(void 0);m[0]!==v?(t=(0,e9.jM)(v),m[0]=v,m[1]=t):t=m[1];let{filePath:N}=t,R=v.path??v.positioning?.path??"",T=v.line??v.positioning?.endLine,E=v.positioning?.startLine&&v.positioning?.startLine!==v.positioning?.endLine?v.positioning?.startLine:null;m[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,f.M3)(),m[2]=n):n=m[2];let L=n,{mutate:I}=(0,e7.H)(N,w);m[3]!==h||m[4]!==b||m[5]!==p||m[6]!==I||m[7]!==v.id?(a=()=>{b||I({threadId:v.id},{onError:()=>C("Failed to resolve thread"),onSuccess:()=>{h||p()}})},m[3]=h,m[4]=b,m[5]=p,m[6]=I,m[7]=v.id,m[8]=a):a=m[8];let D=a,{mutate:A}=(0,e8.i)(N,w);m[9]!==h||m[10]!==b||m[11]!==p||m[12]!==j||m[13]!==v||m[14]!==A?(s=async()=>{!v||b&&(A({threadId:v.id},{onError:()=>C("Failed to unresolve thread"),onSuccess:()=>{h&&p()}}),j("comments.unresolve_thread","RESOLVE_CONVERSATION_BUTTON"))},m[9]=h,m[10]=b,m[11]=p,m[12]=j,m[13]=v,m[14]=A,m[15]=s):s=m[15];let O=s;return m[16]!==D||m[17]!==O||m[18]!==b?(r=L?(0,i.jsx)(ea.K,{"aria-label":b?"Unresolve conversation":"Resolve conversation",tooltipDirection:"sw",icon:b?P.CheckCircleFillIcon:P.CheckCircleIcon,"data-thread-resolved":b,className:"ThreadHeader-module__ThreadHeaderIconButton__jXAlb",variant:"invisible",onClick:b?O:D}):null,m[16]=D,m[17]=O,m[18]=b,m[19]=r):r=m[19],m[20]!==R||m[21]!==u||m[22]!==_||m[23]!==h||m[24]!==y||m[25]!==b||m[26]!==T||m[27]!==g||m[28]!==p||m[29]!==E||m[30]!==r||m[31]!==v.id?(o=(0,i.jsx)(e5,{firstCommentId:u,isCollapsed:h,isOutdated:y,isResolved:b,startLine:E,line:T,path:R,rightSideContent:r,onNavigateToDiffComment:g,onToggleCollapsed:p,threadId:v.id,headingLevel:_}),m[20]=R,m[21]=u,m[22]=_,m[23]=h,m[24]=y,m[25]=b,m[26]=T,m[27]=g,m[28]=p,m[29]=E,m[30]=r,m[31]=v.id,m[32]=o):o=m[32],m[33]!==S?(d=S&&(0,i.jsxs)(e3.A,{variant:"danger",className:"m-2",children:[(0,i.jsx)(P.StopIcon,{className:"mr-2"}),S]}),m[33]=S,m[34]=d):d=m[34],m[35]!==o||m[36]!==d?(c=(0,i.jsxs)(i.Fragment,{children:[o,d]}),m[35]=o,m[36]=d,m[37]=c):c=m[37],c}te.displayName="ThreadHeader";var tt=n(51705);function tn(e){let t,n,a=(0,l.c)(4),{commentAuthors:s}=e;return s.length<1?null:(a[0]!==s?(t=s.map(ti),a[0]=s,a[1]=t):t=a[1],a[2]!==t?(n=(0,i.jsx)(tt.A,{children:t}),a[2]=t,a[3]=n):n=a[3],n)}function ti(e){let{login:t,avatarUrl:n}=e;return(0,i.jsx)(eQ.r,{alt:t,size:18,src:n},t)}tn.displayName="PreviewAuthors";var tl=n(16497);let ta=(0,x.memo)(function(e){var t;let n,a,s,r,o,d,c,m=(0,l.c)(31),{onNavigateToDiffComment:u,pendingComment:h,tabSize:f}=e,[p,v]=(0,x.useState)(!1),{commentID:_,thread:b}=h,{navigateToSelectedComment:y}=(0,C.Lh)();if(m[0]!==_||m[1]!==b.commentsData){let e;m[3]!==b.commentsData?(e=b.commentsData??{comments:[]},m[3]=b.commentsData,m[4]=e):e=m[4],a=ts(_.toString(),e),m[0]=_,m[1]=b.commentsData,m[2]=a}else a=m[2];let w=a,S=b.commentsData?.comments?.length?b.commentsData.comments.length-1:0,N=`${S} previous ${1===S?"comment":"comments"}`;m[5]!==_||m[6]!==y||m[7]!==u?(s=()=>{y(_);let e=window.location.pathname+window.location.search;(0,j.kd)(`${e}#r${_}`),u(_.toString())},m[5]=_,m[6]=y,m[7]=u,m[8]=s):s=m[8];let R=s,T=b.isOutdated||!1,E=b.isResolved||!1,L=b.subject?.endLine,I=b.path??"";return m[9]===Symbol.for("react.memo_cache_sentinel")?(r=()=>v(tr),m[9]=r):r=m[9],m[10]!==_||m[11]!==p||m[12]!==R||m[13]!==T||m[14]!==E||m[15]!==L||m[16]!==I||m[17]!==b.id?(o=(0,i.jsx)(e5,{isCollapsed:p,isOutdated:T,isResolved:E,line:L,path:I,onNavigateToDiffComment:R,onToggleCollapsed:r,threadId:b.id,firstCommentId:_}),m[10]=_,m[11]=p,m[12]=R,m[13]=T,m[14]=E,m[15]=L,m[16]=I,m[17]=b.id,m[18]=o):o=m[18],m[19]!==w||m[20]!==p||m[21]!==R||m[22]!==h||m[23]!==S||m[24]!==N||m[25]!==f||m[26]!==b.subject?.diffLines?(d=!p&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"border-bottom borderColor-muted overflow-x-auto",children:(0,i.jsx)(e1.i,{diffTableClassName:"border-0",diffLines:b.subject?.diffLines,className:"m-0 border-0",tabSize:f||4})}),S>0&&(0,i.jsx)("div",{className:"my-2 px-2",children:(0,i.jsx)(ec.Q,{"aria-label":"View comment in diff",size:"small",trailingVisual:P.ChevronRightIcon,variant:"invisible",onClick:R,children:(0,i.jsxs)("div",{className:"d-flex flex-row flex-justify-start flex-items-center gap-2",children:[(0,i.jsx)("span",{children:N}),(0,i.jsx)(tn,{commentAuthors:w})]})})}),(0,i.jsx)(tl.$6,{className:(0,g.$)("markdown-body","PendingCommentPreview-module__commentBody__ULYiF"),html:(t=h,n=(t.thread.commentsData?.comments??[]).find(e=>e&&e.databaseId===t.commentID),n?.bodyHTML??"")})]}),m[19]=w,m[20]=p,m[21]=R,m[22]=h,m[23]=S,m[24]=N,m[25]=f,m[26]=b.subject?.diffLines,m[27]=d):d=m[27],m[28]!==o||m[29]!==d?(c=(0,i.jsxs)("div",{className:"border rounded-2 d-flex flex-column",children:[o,d]}),m[28]=o,m[29]=d,m[30]=c):c=m[30],c});function ts(e,t){let n=new Set;return(t?.comments??[]).reduce((t,i)=>{if(!i||i.id===e)return t;let l=i.author?.login??"",a=i.author?.avatarUrl??"",s=i.author?.id??"",r=i.author?.url??"";return n.has(l)||(t.push({avatarUrl:a,login:l,id:s,url:r}),n.add(l)),t},[])}function tr(e){return!e}ta.displayName="PendingCommentPreview";let to=(0,x.memo)(function(e){let t,n,a,s,r,o,d,c,m,u,h,f,p,g=(0,l.c)(55),{onNavigateToDiffComment:x,tabSize:v,thread:_,headingLevel:b}=e;g[0]!==_?(t=(0,eK.IV)(_),g[0]=_,g[1]=t):t=g[1];let y=t,w=y?.id,{navigateToSelectedComment:S}=(0,C.Lh)(),N=(0,C.SM)();g[2]!==N||g[3]!==_?({filePath:n,lineKey:a}=(0,e9.jM)(_),s=N(Number(_.id),n,a),g[2]=N,g[3]=_,g[4]=n,g[5]=a,g[6]=s):(n=g[4],a=g[5],s=g[6]);let R=s,T=R?.isResolved||_.isResolved||!1,E=_.isOutdated||_.positioning?.isOutdated||!1;g[7]!==y?.databaseId||g[8]!==E||g[9]!==S||g[10]!==x||g[11]!==_.originalDiffPathUri?(r=()=>{let e=y?.databaseId;if(e){if(E&&_.originalDiffPathUri){let e=new URL(_.originalDiffPathUri);e.searchParams.set("new_files_changed","true"),window.location.href=e.toString()}else{S(e);let t=window.location.pathname+window.location.search;(0,j.kd)(`${t}#r${e}`)}window.requestAnimationFrame(()=>{x()})}},g[7]=y?.databaseId,g[8]=E,g[9]=S,g[10]=x,g[11]=_.originalDiffPathUri,g[12]=r):r=g[12];let L=r;if(g[13]!==_.id){var I;I=_.id,o=`panel-thread-collapsed-state-${I}`,g[13]=_.id,g[14]=o}else o=g[14];let[D,A]=(0,e2.Mj)(o,!1),O=_.subject?.diffLines;if(!_.subject?.startLine||_.subject?.startLine===_.subject?.endLine){let e;g[15]!==_.subject?.diffLines?(e=_.subject?.diffLines?.slice(-1),g[15]=_.subject?.diffLines,g[16]=e):e=g[16],O=e}g[17]!==R?.commentsData||g[18]!==_.commentsData?(d=R?.commentsData??_.commentsData??{comments:[]},g[17]=R?.commentsData,g[18]=_.commentsData,g[19]=d):d=g[19];let F=d,k=F?F.comments.length-1:0,$=0===k?"No replies":`${k} ${1===k?"reply":"replies"}`;g[20]===Symbol.for("react.memo_cache_sentinel")?(c={comments:[]},g[20]=c):c=g[20];let B={...R,id:R?.id??_.id,commentsData:c};if(!y||!B)return null;g[21]!==y.id||g[22]!==F?(m=ts(y.id,F),g[21]=y.id,g[22]=F,g[23]=m):m=g[23];let q=m,M=y?.databaseId;return g[24]!==D||g[25]!==A?(u=()=>A(!D),g[24]=D,g[25]=A,g[26]=u):u=g[26],g[27]!==b||g[28]!==D||g[29]!==E||g[30]!==T||g[31]!==a||g[32]!==L||g[33]!==M||g[34]!==u||g[35]!==_?(h=(0,i.jsx)(te,{firstCommentId:M,isCollapsed:D,thread:_,onNavigateToDiffComment:L,onToggleCollapsed:u,headingLevel:b,isResolved:T,isOutdated:E,lineKey:a}),g[27]=b,g[28]=D,g[29]=E,g[30]=T,g[31]=a,g[32]=L,g[33]=M,g[34]=u,g[35]=_,g[36]=h):h=g[36],g[37]!==q||g[38]!==w||g[39]!==O||g[40]!==n||g[41]!==y||g[42]!==D||g[43]!==E||g[44]!==T||g[45]!==a||g[46]!==L||g[47]!==$||g[48]!==v||g[49]!==_.id||g[50]!==_.originalDiffPathUri?(f=!D&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"border-bottom borderColor-muted overflow-x-auto",children:(0,i.jsx)(e1.i,{diffTableClassName:"border-0",diffLines:O,className:"m-0 border-0",tabSize:v||4})}),(0,i.jsx)("div",{children:(0,i.jsx)(e0.U,{lineMarkersKey:a,hideActions:!0,isInlineComment:!1,comment:y,filePath:n,index:0,isAnchorable:!1,isOutdated:E,isThreadResolved:T,threadId:_.id,originalDiffPathUri:_.originalDiffPathUri,headingLevel:"h3",tooltipDirection:"sw"},w)}),(0,i.jsx)("div",{className:"mb-2 px-2",children:(0,i.jsx)(ec.Q,{as:"a",href:E&&_.originalDiffPathUri?_.originalDiffPathUri:`#r${y?.databaseId}`,"aria-label":`View ${$}`,size:"small",trailingVisual:P.ChevronRightIcon,variant:"invisible",onClick:L,children:(0,i.jsxs)("div",{className:"d-flex flex-row flex-justify-start flex-items-center gap-2",children:[(0,i.jsx)("span",{children:$}),(0,i.jsx)(tn,{commentAuthors:q})]})})})]}),g[37]=q,g[38]=w,g[39]=O,g[40]=n,g[41]=y,g[42]=D,g[43]=E,g[44]=T,g[45]=a,g[46]=L,g[47]=$,g[48]=v,g[49]=_.id,g[50]=_.originalDiffPathUri,g[51]=f):f=g[51],g[52]!==h||g[53]!==f?(p=(0,i.jsxs)("div",{className:"border rounded-2 d-flex flex-column",children:[h,f]}),g[52]=h,g[53]=f,g[54]=p):p=g[54],p});to.displayName="ThreadPreview";var td=n(86276),tc=n(5024),tm=n(30572);let tu="ThreadPreviewSkeleton-module__diffLine__Tpn4W",th="ThreadPreviewSkeleton-module__lineNumberCol__qrCwa",tf="ThreadPreviewSkeleton-module__diffContent__a7IGQ";function tp(){let e,t,n,a,s=(0,l.c)(4);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"ThreadPreviewSkeleton-module__header__UJ25Z",children:(0,i.jsx)(td.r,{size:"bodyMedium",className:"ThreadPreviewSkeleton-module__filePath__TlVbt"})}),s[0]=e):e=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsxs)("div",{className:tu,children:[(0,i.jsx)(tc.f,{className:th}),(0,i.jsx)(tc.f,{className:tf})]}),s[1]=t):t=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsxs)("div",{className:tu,children:[(0,i.jsx)(tc.f,{className:th}),(0,i.jsx)(tc.f,{className:tf})]}),s[2]=n):n=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsxs)("div",{className:"ThreadPreviewSkeleton-module__container__a5gOf","data-testid":"thread-preview-skeleton-item",children:[e,(0,i.jsxs)("div",{className:"ThreadPreviewSkeleton-module__diffPreview__Yqbd7",children:[t,n,(0,i.jsxs)("div",{className:tu,children:[(0,i.jsx)(tc.f,{className:th}),(0,i.jsx)(tc.f,{className:tf})]})]}),(0,i.jsx)(tm.G,{})]}),s[3]=a):a=s[3],a}function tg(e){let t,n=(0,l.c)(2),{count:a}=e,s=void 0===a?1:a;return n[0]!==s?(t=(0,i.jsx)("div",{className:"d-flex flex-column position-relative width-full gap-3","data-testid":"thread-preview-skeleton",children:Array.from({length:s},tx)}),n[0]=s,n[1]=t):t=n[1],t}function tx(e,t){return(0,i.jsx)(tp,{},t)}tp.displayName="ThreadPreviewSkeletonItem",tg.displayName="ThreadPreviewSkeleton";var tv=n(49481),t_=n(70944);function tb(e){let t,n,a,s,r=(0,l.c)(11),{heading:o,description:d,icon:c,headingLevel:m}=e,u=void 0===m?"h1":m;return r[0]!==c?(t=(0,i.jsx)(t_.E.Visual,{children:(0,i.jsx)(c,{size:"medium"})}),r[0]=c,r[1]=t):t=r[1],r[2]!==o||r[3]!==u?(n=(0,i.jsx)(t_.E.Heading,{as:u,children:o}),r[2]=o,r[3]=u,r[4]=n):n=r[4],r[5]!==d?(a=d&&(0,i.jsx)(t_.E.Description,{children:d}),r[5]=d,r[6]=a):a=r[6],r[7]!==t||r[8]!==n||r[9]!==a?(s=(0,i.jsxs)(t_.E,{children:[t,n,a]}),r[7]=t,r[8]=n,r[9]=a,r[10]=s):s=r[10],s}tb.displayName="ZeroState";var ty=n(73485),tw=n(22182),tj=n(53178),tS=n(35665);function tC(e){let t,n,a,s,r,o,d,c,m,u,h=(0,l.c)(38),{comment:f,pullRequestAuthorLogin:p,canReact:g,onQuoteReply:v}=e,{mutate:_}=function(){var e,t;let n,i,a,s,r=(0,l.c)(2),o=(0,C.Kp)(),{updateIssueComment:d}=(0,C._o)();return r[0]!==d?(s=(e,t)=>{d({match:e=>e.id===t.commentId,transform:t=>{if(t)return{...t,reactionGroups:e.reactionGroups}}})},r[0]=d,r[1]=s):s=r[1],e=o,t=s,(a=(0,l.c)(5))[0]!==e?(n=async t=>{let{commentId:n,reaction:i,viewerHasReacted:l}=t,a=`${e}/page_data/${l?ef.uT.removeCommentReaction:ef.uT.addCommentReaction}`,s=await (0,ex.q$)(a,{method:"POST",body:{reaction:i,issueCommentId:n}}),r=await (0,ex.hp)(s);return(0,ex.R)(s,r),r},a[0]=e,a[1]=n):n=a[1],a[2]!==t||a[3]!==n?(i={mutationFn:n,onSuccess:t},a[2]=t,a[3]=n,a[4]=i):i=a[4],(0,eg.n)(i)}(),b=(0,C.RB)(),y=(0,x.useRef)(null);if(!f.repository)return null;h[0]!==f.id||h[1]!==_?(t=(e,t)=>{_({commentId:f.id,reaction:e,viewerHasReacted:t})},h[0]=f.id,h[1]=_,h[2]=t):t=h[2];let w=t;h[3]!==f.body||h[4]!==v?(n=()=>{let e=k.cg?.getSelection(),t=null;e&&e.anchorNode&&e.rangeCount>0&&(t={anchorNode:e.anchorNode,range:e.getRangeAt(0)}),v((0,tS.E)(y.current,t,f.body)??f.body)},h[3]=f.body,h[4]=v,h[5]=n):n=h[5];let j=n,S=`issue-comment-${f.id}`,N=f.authorAvatarUrl||"";return h[6]!==f.authorAssociation||h[7]!==f.createdAt||h[8]!==f.id||h[9]!==f.isHidden||h[10]!==f.minimizedReason||h[11]!==f.repository||h[12]!==f.url?(a={id:f.id,authorAssociation:f.authorAssociation,createdAt:f.createdAt,isHidden:f.isHidden,minimizedReason:f.minimizedReason,repository:f.repository,url:f.url},h[6]=f.authorAssociation,h[7]=f.createdAt,h[8]=f.id,h[9]=f.isHidden,h[10]=f.minimizedReason,h[11]=f.repository,h[12]=f.url,h[13]=a):a=h[13],h[14]===Symbol.for("react.memo_cache_sentinel")?(s={},h[14]=s):s=h[14],h[15]!==f.authorLogin||h[16]!==p||h[17]!==N||h[18]!==a?(r=(0,i.jsx)("div",{className:"pt-2 tmp-px-3",children:(0,i.jsx)(tw.v,{avatarUrl:N,comment:a,commentAuthorLogin:f.authorLogin,commentSubjectType:"pull request",commentSubjectAuthorLogin:p,forceInlineAvatar:!0,isMinimized:!1,containerStyle:s,tooltipDirection:"sw"})}),h[15]=f.authorLogin,h[16]=p,h[17]=N,h[18]=a,h[19]=r):r=h[19],h[20]!==f.bodyHtml?(o=(0,i.jsx)(tl.$6,{className:"markdown-body mt-1 f5",html:f.bodyHtml}),h[20]=f.bodyHtml,h[21]=o):o=h[21],h[22]!==g||h[23]!==f.reactionGroups||h[24]!==f.viewerCanReact||h[25]!==w?(d=f.reactionGroups.length>0&&(0,i.jsx)("div",{className:"mt-2",children:(0,i.jsx)(tj.P,{reactionGroups:f.reactionGroups,canReact:g&&f.viewerCanReact,onReact:w})}),h[22]=g,h[23]=f.reactionGroups,h[24]=f.viewerCanReact,h[25]=w,h[26]=d):d=h[26],h[27]!==b.canComment||h[28]!==j?(c=b.canComment&&(0,i.jsx)(ec.Q,{className:"mt-2 ml-n2",onClick:j,size:"small",trailingVisual:P.ChevronRightIcon,variant:"invisible",children:"Quote reply"}),h[27]=b.canComment,h[28]=j,h[29]=c):c=h[29],h[30]!==c||h[31]!==o||h[32]!==d?(m=(0,i.jsxs)("div",{className:"tmp-px-3 py-2",children:[o,d,c]}),h[30]=c,h[31]=o,h[32]=d,h[33]=m):m=h[33],h[34]!==m||h[35]!==S||h[36]!==r?(u=(0,i.jsxs)("div",{id:S,ref:y,className:"border rounded-2",children:[r,m]}),h[34]=m,h[35]=S,h[36]=r,h[37]=u):u=h[37],u}tC.displayName="IssueCommentItem";var tN=n(6021),tR=n(11730),tT=n(22766),tE=n(96613),tL=n(40961);let tI=/^issue comment #(\d+) updated$/;var tD=n(71677),tP=n(11452),tA=n(52111);function tO(e){let t,n,i,a,s=(0,l.c)(10),r=(0,ep.e)(ef.uT.threadPreviewPositioning);s[0]!==e?(t=e.join(","),s[0]=e,s[1]=t):t=s[1];let o=`${r}?thread_ids=${t}`;return s[2]!==o?(n=[ef.uT.threadPreviewPositioning,o],s[2]=o,s[3]=n):n=s[3],s[4]!==e.length||s[5]!==o?(i=async()=>{if(!e.length)return{};let t=await (0,eS.QJ)(o);if(!t.ok)throw Error(`HTTP ${t.status}`);return await t.json()},s[4]=e.length,s[5]=o,s[6]=i):i=s[6],s[7]!==n||s[8]!==i?(a={queryKey:n,queryFn:i,staleTime:1/0},s[7]=n,s[8]=i,s[9]=a):a=s[9],(0,ej.I)(a)}function tF(e){let t,n,i,a,s,r=(0,l.c)(11),o=(0,C.HZ)(),{updateThreads:d}=(0,C.an)();if(r[0]!==o||r[1]!==e){let n=[],i=new Map;for(let t of e){if(!t.subject){n.push(Number(t.id));continue}if(t.subject.diffLines||!t.positioning||"FILE"===t.subjectType||null===t.positioning.endLine||void 0===t.positioning.endLine)continue;let{diffSubject:e,hasContext:l}=(0,N.U3)(t,o);l&&e?i.set(t.id,e):n.push(Number(t.id))}t={threadsNeedingPositioning:n.slice(0,40),locallyBuiltSubjects:i},r[0]=o,r[1]=e,r[2]=t}else t=r[2];let{threadsNeedingPositioning:c,locallyBuiltSubjects:m}=t,{data:u}=tO(c);r[3]!==m||r[4]!==d?(n=()=>{0!==m.size&&d(e=>e.map(e=>{let t=m.get(e.id);return t?{...e,subject:t}:e}))},i=[m,d],r[3]=m,r[4]=d,r[5]=n,r[6]=i):(n=r[5],i=r[6]),(0,x.useEffect)(n,i),r[7]!==u||r[8]!==d?(a=()=>{u&&0!==Object.keys(u).length&&d(e=>e.map(e=>{let t=u[Number(e.id)];if(!t)return e;let n=e.subject?{...e.subject,diffLines:t.diffLines}:t;return{...e,path:t.path,subject:n}}))},s=[u,d],r[7]=u,r[8]=d,r[9]=a,r[10]=s):(a=r[9],s=r[10]),(0,x.useEffect)(a,s)}function tk(e){let t,n,a,s,r,d=(0,l.c)(19),{viewMode:c,setViewMode:m,threadPreviewsAuthorList:u,issueCommentsAuthorList:h,threadPreviewFilterState:f,setThreadPreviewFilterState:p,issueCommentsFilterState:g,setIssueCommentsFilterState:x,iconOnlyReviewCommentsFilter:v}=e;d[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.G7)("comments_panel_issue_comments"),d[0]=t):t=d[0];let _=t;return d[1]!==m||d[2]!==c?(n=_&&(0,i.jsxs)(ez.I,{"aria-label":"Comment view mode",onChange:e=>{m(0===e?"thread-previews":"issue-comments")},children:[(0,i.jsx)(ez.I.Button,{selected:"thread-previews"===c,children:"Review"}),(0,i.jsx)(ez.I.Button,{selected:"issue-comments"===c,children:"Conversation"})]}),d[1]=m,d[2]=c,d[3]=n):n=d[3],d[4]!==v||d[5]!==p||d[6]!==f||d[7]!==u||d[8]!==c?(a="thread-previews"===c&&(0,i.jsx)(eX,{authorList:u,className:"width-full",filterState:f,onFilterStateChange:p,hideReviewThreadFilters:!1,iconOnlyReviewCommentsFilter:v}),d[4]=v,d[5]=p,d[6]=f,d[7]=u,d[8]=c,d[9]=a):a=d[9],d[10]!==h||d[11]!==g||d[12]!==x||d[13]!==c?(s="issue-comments"===c&&(0,i.jsx)(eX,{authorList:h,className:"width-full",filterState:g,onFilterStateChange:x,hideReviewThreadFilters:!0}),d[10]=h,d[11]=g,d[12]=x,d[13]=c,d[14]=s):s=d[14],d[15]!==n||d[16]!==a||d[17]!==s?(r=(0,i.jsxs)("div",{className:"d-flex flex-row flex-items-center gap-2",children:[n,a,s]}),d[15]=n,d[16]=a,d[17]=s,d[18]=r):r=d[18],r}function t$(e){let t,n,a,s,r,o=(0,l.c)(25),{filteredIssueCommentIds:d,filteredThreadIds:c,handleQuoteReply:m,isOpen:u,issueComments:h,limitCount:f,limitExceeded:p,onClose:g,pathName:v,pullRequestAuthorLogin:_,tabSize:b,threadPreviews:y,totalDiffCommentCount:w,viewMode:j}=e;return o[0]!==c||o[1]!==w||o[2]!==j?(t="thread-previews"===j&&(0,i.jsxs)("span",{style:{marginTop:"-4px"},className:"mb-2 fgColor-muted text-small text-center d-block",children:["Showing ",c.size," of ",w," comments"]}),o[0]=c,o[1]=w,o[2]=j,o[3]=t):t=o[3],o[4]!==f||o[5]!==p||o[6]!==j?(n="thread-previews"===j&&p&&(0,i.jsx)(eB.l,{"aria-label":"Warning",title:"Warning",variant:"warning",hideTitle:!0,description:`Only the ${f} latest comments are being shown.`,className:"tmp-mb-3"}),o[4]=f,o[5]=p,o[6]=j,o[7]=n):n=o[7],o[8]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)(tg,{}),o[8]=a):a=o[8],o[9]!==d||o[10]!==c||o[11]!==m||o[12]!==u||o[13]!==h||o[14]!==g||o[15]!==v||o[16]!==_||o[17]!==b||o[18]!==y||o[19]!==j?(s=(0,i.jsx)(x.Suspense,{fallback:a,children:"thread-previews"===j?(0,i.jsx)(tG,{filteredThreadIds:c,isOpen:u,pathName:v,tabSize:b,onClose:g,threadPreviews:y}):(0,i.jsx)(tU,{filteredThreadIds:d,isOpen:u,issueComments:h,pathName:v,pullRequestAuthorLogin:_,onQuoteReply:m})}),o[9]=d,o[10]=c,o[11]=m,o[12]=u,o[13]=h,o[14]=g,o[15]=v,o[16]=_,o[17]=b,o[18]=y,o[19]=j,o[20]=s):s=o[20],o[21]!==t||o[22]!==n||o[23]!==s?(r=(0,i.jsxs)(i.Fragment,{children:[t,n,s]}),o[21]=t,o[22]=n,o[23]=s,o[24]=r):r=o[24],r}tk.displayName="CommentPanelHeaderContent",t$.displayName="CommentsPanelBody";let tB="pullRequestCommentsPanelFooterCollapseState";function tq(e){let t,n,a,s,r,o,d,c,m,u=(0,l.c)(23),{commentText:h,onCommentTextChange:f,onSubmitComment:p,isPending:g,ref:v}=e;u[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,tR.Gq)(tB),u[0]=t):t=u[0];let _=t,[b,y]=(0,x.useState)("true"===_);u[1]!==b?(n=()=>({expand:()=>(y(!1),(0,tR.SO)(tB,"false"),b)}),a=[b],u[1]=b,u[2]=n,u[3]=a):(n=u[2],a=u[3]),(0,x.useImperativeHandle)(v,n,a);let w=b?"Open PR comment panel":"Close PR comment panel",j=b?P.ChevronRightIcon:P.ChevronDownIcon,S=!b;return u[4]!==b?(s=()=>{let e=!b;y(e),(0,tR.SO)(tB,String(e))},u[4]=b,u[5]=s):s=u[5],u[6]!==w||u[7]!==j||u[8]!==S||u[9]!==s?(r=(0,i.jsx)(ea.K,{"aria-label":w,icon:j,size:"small","aria-expanded":S,tooltipDirection:"n",variant:"invisible",className:"mr-2",onClick:s}),u[6]=w,u[7]=j,u[8]=S,u[9]=s,u[10]=r):r=u[10],u[11]===Symbol.for("react.memo_cache_sentinel")?(o=(0,i.jsx)("span",{className:"pb-2",children:"Add a comment"}),u[11]=o):o=u[11],u[12]!==r?(d=(0,i.jsxs)("h4",{className:"d-flex",children:[r,o]}),u[12]=r,u[13]=d):d=u[13],u[14]!==h||u[15]!==b||u[16]!==g||u[17]!==f||u[18]!==p?(c=!b&&(0,i.jsx)(tN.S,{label:"Add a comment",value:h,onChange:f,onPrimaryAction:p,disabled:g,maxHeightLines:15,children:(0,i.jsx)(ec.Q,{variant:"primary",onClick:p,inactive:g||0===h.trim().length,children:"Comment"})}),u[14]=h,u[15]=b,u[16]=g,u[17]=f,u[18]=p,u[19]=c):c=u[19],u[20]!==d||u[21]!==c?(m=(0,i.jsxs)("div",{className:"d-flex flex-column gap-2 width-full",id:tT.Bq.issueCommentComposer,children:[d,c]}),u[20]=d,u[21]=c,u[22]=m):m=u[22],m}function tM(e){let t,n,a,s,r,o,d,c,m,u,h,f=(0,l.c)(34),{filteredThreadIds:p,onClose:g,pathName:_,isOpen:b,tabSize:y,threadPreviews:w}=e;f[0]!==_?(t={pathName:_},f[0]=_,f[1]=t):t=f[1];let{hasNextPage:j,isFetchingNextPage:S,fetchNextPage:C}=(0,e9.CB)(t),N=(0,x.useRef)(!1);f[2]!==C||f[3]!==j||f[4]!==S?(n=()=>{(async()=>{!j||S||N.current||(N.current=!0,await C(),N.current=!1)})()},a=[j,S,C],f[2]=C,f[3]=j,f[4]=S,f[5]=n,f[6]=a):(n=f[5],a=f[6]),(0,x.useEffect)(n,a);let R=(0,x.useRef)(null);f[7]===Symbol.for("react.memo_cache_sentinel")?(s=(0,v.s)(tv.i,300),f[7]=s):s=f[7];let T=s,E=w.length>0;f[8]!==g?(r=()=>{g()},f[8]=g,f[9]=r):r=f[9];let L=r;if(f[10]!==p||f[11]!==L||f[12]!==y||f[13]!==w){let e;f[15]!==p||f[16]!==L||f[17]!==y?(e=e=>e&&p.has(e.id)?(0,i.jsx)(to,{tabSize:y,thread:e,onNavigateToDiffComment:L,headingLevel:"h2"},e.id):null,f[15]=p,f[16]=L,f[17]=y,f[18]=e):e=f[18],o=w.map(e).filter(Boolean),f[10]=p,f[11]=L,f[12]=y,f[13]=w,f[14]=o}else o=f[14];let I=o,D=S||j;return f[19]!==D||f[20]!==b||f[21]!==I.length?(d=()=>{!b||D||T(I.length>0?`${I.length} ${1===I.length?"comment":"comments"}`:"No comments found",{element:R.current})},f[19]=D,f[20]=b,f[21]=I.length,f[22]=d):d=f[22],f[23]!==D||f[24]!==b||f[25]!==I?(c=[b,D,T,I],f[23]=D,f[24]=b,f[25]=I,f[26]=c):c=f[26],(0,x.useEffect)(d,c),f[27]!==E||f[28]!==D||f[29]!==I?(m=I.length>0?(0,i.jsx)(x.Suspense,{fallback:(0,i.jsx)(tg,{}),children:(0,i.jsxs)("div",{className:"d-flex flex-column position-relative width-full gap-3",children:[I,D&&(0,i.jsx)(tg,{count:1})]})}):D?(0,i.jsx)(tg,{}):(0,i.jsx)("div",{className:"d-flex flex-column position-relative width-full height-full flex-justify-center",children:(0,i.jsx)(tb,{description:"Comments will show up here as soon as there are some.",heading:E?"No comments match the current filter":"No comments on changes yet",icon:P.CommentIcon,headingLevel:"h2"})}),f[27]=E,f[28]=D,f[29]=I,f[30]=m):m=f[30],f[31]===Symbol.for("react.memo_cache_sentinel")?(u=(0,i.jsx)("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",ref:R}),f[31]=u):u=f[31],f[32]!==m?(h=(0,i.jsxs)(i.Fragment,{children:[m,u]}),f[32]=m,f[33]=h):h=f[33],h}function tV(e){let t,n,a,s,r,o,d,c,m=(0,l.c)(24),{filteredThreadIds:u,onClose:h,isOpen:f,tabSize:p,threadPreviews:g}=e,_=(0,x.useRef)(null);m[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,v.s)(tv.i,300),m[0]=t):t=m[0];let b=t,y=g.length>0;m[1]!==h?(n=()=>{h()},m[1]=h,m[2]=n):n=m[2];let w=n;if(tF(g),m[3]!==u||m[4]!==w||m[5]!==p||m[6]!==g){let e;m[8]!==u||m[9]!==w||m[10]!==p?(e=e=>e&&u.has(e.id)?(0,i.jsx)(to,{tabSize:p,thread:e,onNavigateToDiffComment:w,headingLevel:"h2"},e.id):null,m[8]=u,m[9]=w,m[10]=p,m[11]=e):e=m[11],a=g.map(e).filter(Boolean),m[3]=u,m[4]=w,m[5]=p,m[6]=g,m[7]=a}else a=m[7];let j=a;return m[12]!==f||m[13]!==j.length?(s=()=>{f&&b(j.length>0?`${j.length} ${1===j.length?"comment":"comments"}`:"No comments found",{element:_.current})},m[12]=f,m[13]=j.length,m[14]=s):s=m[14],m[15]!==f||m[16]!==j?(r=[f,b,j],m[15]=f,m[16]=j,m[17]=r):r=m[17],(0,x.useEffect)(s,r),m[18]!==y||m[19]!==j?(o=j.length>0?(0,i.jsx)(x.Suspense,{fallback:(0,i.jsx)(tg,{}),children:(0,i.jsx)("div",{className:"d-flex flex-column position-relative width-full gap-3",children:j})}):(0,i.jsx)("div",{className:"d-flex flex-column position-relative width-full height-full flex-justify-center",children:(0,i.jsx)(tb,{description:"Comments will show up here as soon as there are some.",heading:y?"No comments match the current filter":"No comments on changes yet",icon:P.CommentIcon,headingLevel:"h2"})}),m[18]=y,m[19]=j,m[20]=o):o=m[20],m[21]===Symbol.for("react.memo_cache_sentinel")?(d=(0,i.jsx)("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",ref:_}),m[21]=d):d=m[21],m[22]!==o?(c=(0,i.jsxs)(i.Fragment,{children:[o,d]}),m[22]=o,m[23]=c):c=m[23],c}function tG(e){let t,n=(0,l.c)(4);if((0,o.G7)("load_paginated_threads_on_diff")){let t;return n[0]!==e?(t=(0,i.jsx)(tV,{...e}),n[0]=e,n[1]=t):t=n[1],t}return n[2]!==e?(t=(0,i.jsx)(tM,{...e}),n[2]=e,n[3]=t):t=n[3],t}function tU(e){let t,n,a,s,r,o,d,c,m,u,h,p=(0,l.c)(32),{filteredThreadIds:g,pathName:_,isOpen:b,pullRequestAuthorLogin:y,issueComments:w,onQuoteReply:j}=e;p[0]!==_?(t={pathName:_},p[0]=_,p[1]=t):t=p[1];let{hasNextPage:S,isFetchingNextPage:C,fetchNextPage:N}=(0,ty.mN)(t),R=w.length>0,T=(0,x.useRef)(!1);if(p[2]!==N||p[3]!==S||p[4]!==C?(n=()=>{(async()=>{!S||C||T.current||(T.current=!0,await N(),T.current=!1)})()},a=[S,C,N],p[2]=N,p[3]=S,p[4]=C,p[5]=n,p[6]=a):(n=p[5],a=p[6]),(0,x.useEffect)(n,a),p[7]!==g||p[8]!==w){let e;p[10]!==g?(e=e=>g.has(e.id),p[10]=g,p[11]=e):e=p[11],s=w.filter(e),p[7]=g,p[8]=w,p[9]=s}else s=p[9];let E=s,L=C||S,I=(0,x.useRef)(null);p[12]===Symbol.for("react.memo_cache_sentinel")?(r=(0,v.s)(tv.i,300),p[12]=r):r=p[12];let D=r;p[13]!==L||p[14]!==b||p[15]!==E.length?(o=()=>{!b||L||D(E.length>0?`${E.length} ${1===E.length?"comment":"comments"}`:"No comments found",{element:I.current})},p[13]=L,p[14]=b,p[15]=E.length,p[16]=o):o=p[16],p[17]!==R||p[18]!==L||p[19]!==b||p[20]!==E?(d=[b,L,D,E,R],p[17]=R,p[18]=L,p[19]=b,p[20]=E,p[21]=d):d=p[21],(0,x.useEffect)(o,d),p[22]===Symbol.for("react.memo_cache_sentinel")?(c=(0,f.M3)(),p[22]=c):c=p[22];let A=c;return p[23]!==R||p[24]!==L||p[25]!==j||p[26]!==y||p[27]!==E?(m=E.length>0?(0,i.jsx)(x.Suspense,{fallback:(0,i.jsx)(tg,{}),children:(0,i.jsxs)("div",{className:"d-flex flex-column position-relative width-full gap-3",children:[E.map(e=>(0,i.jsx)(tC,{comment:e,pullRequestAuthorLogin:y,canReact:A,onQuoteReply:j},e.id)),L&&(0,i.jsx)(tg,{count:1})]})}):L?(0,i.jsx)(tg,{}):(0,i.jsx)("div",{className:"d-flex flex-column position-relative width-full height-full flex-justify-center",children:(0,i.jsx)(tb,{description:"Comments will show up here as soon as there are some.",heading:R?"No comments match the current filter":"No comments yet",icon:P.CommentIcon,headingLevel:"h2"})}),p[23]=R,p[24]=L,p[25]=j,p[26]=y,p[27]=E,p[28]=m):m=p[28],p[29]===Symbol.for("react.memo_cache_sentinel")?(u=(0,i.jsx)("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",ref:I}),p[29]=u):u=p[29],p[30]!==m?(h=(0,i.jsxs)(i.Fragment,{children:[m,u]}),p[30]=m,p[31]=h):h=p[31],h}tq.displayName="CommentsSidePanelFooter",tM.displayName="ThreadPreviewsContentWithDataLoading",tV.displayName="ThreadPreviewsContentUsingStore",tG.displayName="ThreadPreviewsContent",tU.displayName="IssueCommentsContent";let tz=(0,x.memo)(function(e){let t,n,a,s,r,d,c,m,h,f,p,g,v=(0,l.c)(86),{pathName:_,toggleSidesheetRef:b,pageLimits:y,pullRequestAuthorLogin:w,aliveChannels:j,isOpen:S,onClose:N,tabSize:R}=e,T=(0,o.G7)("prs_docked_side_panel"),E=(0,tE.Yf)(tE.r0.Comments)?k.XC?.getElementById(tD.I):null,[L,I]=(0,x.useState)("thread-previews"),D=(0,C.BI)(),A=D.length,O=(0,C.i9)();e:{let e;if(0===O.size){t=D;break e}if(v[0]!==O||v[1]!==D){let t;v[3]!==O?(t=(e,t)=>{let n=e.path??e.positioning?.path,i=t.path??t.positioning?.path,l=void 0!==n?O.get(n):void 0,a=void 0!==i?O.get(i):void 0;return void 0===l&&void 0===a?0:void 0===l?1:void 0===a?-1:l!==a?l-a:(("FILE"===e.subjectType?0:e.positioning?.endLine??e.line??e.subject?.endLine)??1/0)-(("FILE"===t.subjectType?0:t.positioning?.endLine??t.line??t.subject?.endLine)??1/0)},v[3]=O,v[4]=t):t=v[4],e=[...D].sort(t),v[0]=O,v[1]=D,v[2]=e}else e=v[2];t=e}let F=t,$=(0,C.$j)(),B=(0,C.RB)(),[q,M]=(0,x.useState)(tH),V=function(e,t){let n,i=(0,l.c)(4),a=(0,C.SM)();if(i[0]!==t||i[1]!==a||i[2]!==e)n=new Set([...e.filter(e=>{let n=(0,eK.IV)(e),i=e.path??"",l=e.subject?.endDiffSide==="RIGHT"?"R":"L",s=e.subject?.originalEndLine?`${l}${e.subject.originalEndLine}`:"FILE",r=a(Number(e.id),i,s);return eZ({authorLogin:n?.author?.login??"",body:n?.body??"",id:e.id,isResolved:r?.isResolved??e.isResolved??!1,isOutdated:(e.isOutdated||e.positioning?.isOutdated)??!1,path:i},t)}).map(e=>e.id??"")]),i[0]=t,i[1]=a,i[2]=e,i[3]=n;else n=i[3];return n}(F,q),[G,U]=(0,x.useState)(tW),z=function(e,t){let n,i,a=(0,l.c)(7);if(a[0]!==t||a[1]!==e){let i;a[3]!==t?(i=e=>eZ({authorLogin:e.authorLogin,body:e.body,id:e.id,isResolved:!1,isOutdated:!1,path:""},t),a[3]=t,a[4]=i):i=a[4],n=e.filter(i),a[0]=t,a[1]=e,a[2]=n}else n=a[2];let s=n;return a[5]!==s?(i=new Set([...s.map(eY)]),a[5]=s,a[6]=i):i=a[6],i}($,G),H=(0,x.useRef)(null),W=(0,x.useRef)(null),[Q,K]=(0,x.useState)(""),{mutate:Z,isPending:Y}=function(){let e,t,n,i=(0,l.c)(7),a=(0,C.Kp)(),s=`${a}/page_data/${ef.uT.submitPullRequestTimelineComment}`,{addIssueComment:r}=(0,C._o)();return i[0]!==s?(e=async e=>{let t=await (0,eS.Sr)(`${s}`,{method:"POST",headers:{Accept:"application/json"},body:e}),n=await (0,ex.hp)(t);return(0,ex.R)(t,n),n},i[0]=s,i[1]=e):e=i[1],i[2]!==r?(t=(e,t)=>{r(e.issueComment)},i[2]=r,i[3]=t):t=i[3],i[4]!==e||i[5]!==t?(n={mutationFn:e,onSuccess:t},i[4]=e,i[5]=t,i[6]=n):n=i[6],(0,eg.n)(n)}();v[5]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{K(e)},v[5]=n):n=v[5];let J=n;v[6]!==Q||v[7]!==Z||v[8]!==Y?(a=()=>{0===Q.trim().length||Y||Z({text:Q},{onSuccess:e=>{K(""),requestAnimationFrame(()=>{k.XC?.getElementById(`issue-comment-${e.issueComment.id}`)?.scrollIntoView({behavior:"smooth"})})}})},v[6]=Q,v[7]=Z,v[8]=Y,v[9]=a):a=v[9];let X=a;v[10]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{W.current?.expand()?K(t=>t.trim().length>0?`${t} ${e}`:e):K(e)},v[10]=s):s=v[10];let ee=s;if(v[11]!==F){for(let e of(r=[],F)){let t=(0,eK.IV)(e);t?.author&&!r.some(e=>e.login===t.author?.login)&&("Copilot"===t.author.login?r.unshift(t.author):r.push(t.author))}v[11]=F,v[12]=r}else r=v[12];let et=r;if(v[13]!==$){for(let e of(d=[],$))e.authorLogin&&!d.some(t=>t.login===e.authorLogin)&&("Copilot"===e.authorLogin?d.unshift({login:e.authorLogin,avatarUrl:e.authorAvatarUrl??""}):d.push({login:e.authorLogin,avatarUrl:e.authorAvatarUrl??""}));v[13]=$,v[14]=d}else d=v[14];let en=d,ei="issue-comments"===L&&B.canComment;v[15]!==Q||v[16]!==X||v[17]!==ei||v[18]!==Y?(c=ei?(0,i.jsx)(u.l.Footer,{children:(0,i.jsx)(tq,{ref:W,commentText:Q,onCommentTextChange:J,onSubmitComment:X,isPending:Y})}):null,v[15]=Q,v[16]=X,v[17]=ei,v[18]=Y,v[19]=c):c=v[19];let el=c,es=y.reviewThreadsPaginatedLimitExceeded,er=y.reviewThreadsPaginatedLimit;!function(e){let t,n=(0,l.c)(3),i=(0,C.Kp)(),{updateIssueComment:a}=(0,C._o)(),s=(0,C.$j)(),r=(0,o.G7)("prs_live_updates_issue_comments")&&s.length>0?e?.pullRequestTimeline:void 0;n[0]!==i||n[1]!==a?(t=e=>{let t=tI.exec(e.reason);if(!t?.[1])return;let n=t[1],l=async()=>{try{let e=`${i}/page_data/${ef.uT.issueComments}/${encodeURIComponent(n)}`,t=await (0,eS.QJ)(e);if(!t.ok)return;let l=await t.json();a({match:e=>e.id===n,transform:()=>l})}catch{}};e.wait?window.setTimeout(()=>void l(),e.wait):l()},n[0]=i,n[1]=a,n[2]=t):t=n[2];let d=t;(0,ew.x)(r,d)}(j);let eo=(0,tE.JE)();if(!S)return null;if(T&&E&&!eo){let e,t,n,l;return v[20]!==en||v[21]!==G||v[22]!==U||v[23]!==M||v[24]!==I||v[25]!==q||v[26]!==et||v[27]!==L?(e=(0,i.jsx)(tP.Z.Header,{children:(0,i.jsx)(tk,{viewMode:L,setViewMode:I,threadPreviewsAuthorList:et,issueCommentsAuthorList:en,threadPreviewFilterState:q,setThreadPreviewFilterState:M,issueCommentsFilterState:G,setIssueCommentsFilterState:U,iconOnlyReviewCommentsFilter:!0})}),v[20]=en,v[21]=G,v[22]=U,v[23]=M,v[24]=I,v[25]=q,v[26]=et,v[27]=L,v[28]=e):e=v[28],v[29]!==z||v[30]!==V||v[31]!==ee||v[32]!==S||v[33]!==$||v[34]!==er||v[35]!==es||v[36]!==_||v[37]!==w||v[38]!==R||v[39]!==F||v[40]!==A||v[41]!==L?(t=(0,i.jsx)(tP.Z.Body,{children:(0,i.jsx)(t$,{viewMode:L,filteredThreadIds:V,filteredIssueCommentIds:z,issueComments:$,handleQuoteReply:ee,pathName:_,pullRequestAuthorLogin:w,limitExceeded:es,threadPreviews:F,totalDiffCommentCount:A,limitCount:er,isOpen:S,onClose:tA.l,tabSize:R})}),v[29]=z,v[30]=V,v[31]=ee,v[32]=S,v[33]=$,v[34]=er,v[35]=es,v[36]=_,v[37]=w,v[38]=R,v[39]=F,v[40]=A,v[41]=L,v[42]=t):t=v[42],v[43]!==Q||v[44]!==X||v[45]!==ei||v[46]!==Y?(n=ei&&(0,i.jsx)(tP.Z.Footer,{children:(0,i.jsx)(tq,{ref:W,commentText:Q,onCommentTextChange:J,onSubmitComment:X,isPending:Y})}),v[43]=Q,v[44]=X,v[45]=ei,v[46]=Y,v[47]=n):n=v[47],v[48]!==e||v[49]!==t||v[50]!==n?(l=(0,i.jsxs)(tP.Z,{panelName:tE.r0.Comments,children:[e,t,n]}),v[48]=e,v[49]=t,v[50]=n,v[51]=l):l=v[51],(0,tL.createPortal)(l,E)}return v[52]===Symbol.for("react.memo_cache_sentinel")?(m={narrow:"fullscreen",regular:"right",wide:"right"},v[52]=m):m=v[52],v[53]!==el?(h=()=>el,v[53]=el,v[54]=h):h=v[54],v[55]!==en||v[56]!==G||v[57]!==N||v[58]!==U||v[59]!==M||v[60]!==I||v[61]!==q||v[62]!==et||v[63]!==L?(f=e=>{let{dialogLabelId:t}=e;return(0,i.jsxs)(u.l.Header,{children:[(0,i.jsxs)("div",{className:"d-flex flex-row flex-justify-between flex-items-center width-full pl-2",children:[(0,i.jsx)(u.l.Title,{id:t,children:"Comments"}),(0,i.jsx)(ea.K,{ref:H,"aria-label":"Close comments panel",icon:P.XIcon,variant:"invisible",onClick:N})]}),(0,i.jsx)(tk,{viewMode:L,setViewMode:I,threadPreviewsAuthorList:et,issueCommentsAuthorList:en,threadPreviewFilterState:q,setThreadPreviewFilterState:M,issueCommentsFilterState:G,setIssueCommentsFilterState:U})]})},v[55]=en,v[56]=G,v[57]=N,v[58]=U,v[59]=M,v[60]=I,v[61]=q,v[62]=et,v[63]=L,v[64]=f):f=v[64],v[65]!==z||v[66]!==V||v[67]!==ee||v[68]!==S||v[69]!==$||v[70]!==er||v[71]!==es||v[72]!==N||v[73]!==_||v[74]!==w||v[75]!==R||v[76]!==F||v[77]!==A||v[78]!==L?(p=(0,i.jsx)(t$,{viewMode:L,limitExceeded:es,limitCount:er,isOpen:S,issueComments:$,onClose:N,tabSize:R,filteredThreadIds:V,filteredIssueCommentIds:z,handleQuoteReply:ee,pathName:_,threadPreviews:F,totalDiffCommentCount:A,pullRequestAuthorLogin:w}),v[65]=z,v[66]=V,v[67]=ee,v[68]=S,v[69]=$,v[70]=er,v[71]=es,v[72]=N,v[73]=_,v[74]=w,v[75]=R,v[76]=F,v[77]=A,v[78]=L,v[79]=p):p=v[79],v[80]!==N||v[81]!==h||v[82]!==f||v[83]!==p||v[84]!==b?(g=(0,i.jsx)(u.l,{initialFocusRef:H,position:m,returnFocusRef:b,onClose:N,renderFooter:h,renderHeader:f,children:p}),v[80]=N,v[81]=h,v[82]=f,v[83]=p,v[84]=b,v[85]=g):g=v[85],g});function tH(){return{...eJ}}function tW(){return{...eJ}}function tQ(e){let t,n,a,s,r,d,c,m,u=(0,l.c)(25),{pageLimits:h,pullRequest:f,aliveChannels:p,tabSize:g}=e;u[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.G7)("prs_docked_side_panel"),u[0]=t):t=u[0];let v=t,_=(0,tE.Yf)(tE.r0.Comments),[b,y]=(0,x.useState)(!1),w=(0,x.useRef)(null),j=(0,tE.LI)(),S=b||_,N=v&&_?"Close comments panel":"Open comments panel",R=(0,C.SH)(),{sendPullRequestAnalyticsEvent:T}=(0,ei.q)();u[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(ec.Q,{"aria-label":"The comments panel cannot currently be opened.",leadingVisual:P.CommentDiscussionIcon,size:"small",variant:"invisible"}),u[1]=n):n=u[1],u[2]!==j||u[3]!==T?(a=()=>{T("comments_side_panel.open","COMMENTS_SIDE_PANEL_BUTTON"),v?j.togglePanel("comments",w.current):(eU(),y(!0))},u[2]=j,u[3]=T,u[4]=a):a=u[4],u[5]!==R||u[6]!==S||u[7]!==a?(s=(0,i.jsx)(ec.Q,{"aria-expanded":S,count:R,leadingVisual:P.CommentDiscussionIcon,size:"small",variant:"invisible",onClick:a}),u[5]=R,u[6]=S,u[7]=a,u[8]=s):s=u[8],u[9]!==N||u[10]!==s?(r=(0,i.jsx)(A.m,{ref:w,text:N,direction:"sw",type:"label",children:s}),u[9]=N,u[10]=s,u[11]=r):r=u[11];let E=b||_;return u[12]!==j?(d=()=>{v?j.closePanel():y(!1)},u[12]=j,u[13]=d):d=u[13],u[14]!==p||u[15]!==h||u[16]!==f.author.login||u[17]!==f.pathName||u[18]!==E||u[19]!==d||u[20]!==g?(c=(0,i.jsx)(tz,{isOpen:E,pageLimits:h,pathName:f.pathName,pullRequestAuthorLogin:f.author.login,aliveChannels:p,tabSize:g,toggleSidesheetRef:w,onClose:d}),u[14]=p,u[15]=h,u[16]=f.author.login,u[17]=f.pathName,u[18]=E,u[19]=d,u[20]=g,u[21]=c):c=u[21],u[22]!==r||u[23]!==c?(m=(0,i.jsx)("div",{className:"d-flex flex-items-center",children:(0,i.jsxs)(ee.t,{boundaryName:"OpenCommentsPanelButton",fallback:n,children:[r,c]})}),u[22]=r,u[23]=c,u[24]=m):m=u[24],m}tz.displayName="CommentsSidePanel",tQ.displayName="OpenCommentsPanelButton";var tK=n(2827);function tZ(e){let t,n,a,s=(0,l.c)(8),{className:r,filteredText:o,onFilteredTextChange:d}=e;return s[0]!==d?(t=e=>d(e.target.value),s[0]=d,s[1]=t):t=s[1],s[2]!==o||s[3]!==t?(n=(0,i.jsx)(eH.A,{block:!0,"aria-label":"Filter alerts\u2026",leadingVisual:P.SearchIcon,placeholder:"Filter alerts\u2026",value:o,onChange:t}),s[2]=o,s[3]=t,s[4]=n):n=s[4],s[5]!==r||s[6]!==n?(a=(0,i.jsx)("div",{className:r,children:n}),s[5]=r,s[6]=n,s[7]=a):a=s[7],a}tZ.displayName="AlertsFilter";function tY(e){let t,n,a,s,r,o,d,c,m=(0,l.c)(25),{databaseId:u,lineNumber:h,path:f,toggleCollapsed:p,isCollapsed:x,onNavigateToAnnotation:v,annotationLevel:_}=e,b=x?"Expand annotation":"Collapse annotation",y=x?P.ChevronRightIcon:P.ChevronDownIcon;m[0]!==b||m[1]!==y||m[2]!==p?(t=(0,i.jsx)(ea.K,{"aria-label":b,icon:y,size:"small",variant:"invisible",className:"mr-1",onClick:p}),m[0]=b,m[1]=y,m[2]=p,m[3]=t):t=m[3];let w=tK.Gt[_];m[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.$)("overflow-hidden text-mono text-semibold f6 no-wrap","AlertsSidePanel-module__annotationsHeaderFileName__qHUmW"),m[4]=n):n=m[4];let j=`#annotation_${u}`;m[5]!==v||m[6]!==f||m[7]!==j?(a=(0,i.jsxs)(O.A,{className:n,href:j,onClick:v,muted:!0,children:["\u200E",f]}),m[5]=v,m[6]=f,m[7]=j,m[8]=a):a=m[8],m[9]!==f||m[10]!==a?(s=(0,i.jsx)(A.m,{direction:"n",text:f,type:"label",children:a}),m[9]=f,m[10]=a,m[11]=s):s=m[11],m[12]!==h?(r=(0,i.jsxs)("span",{className:"f6 fgColor-muted text-normal ml-2 no-wrap",children:["Line ",h]}),m[12]=h,m[13]=r):r=m[13],m[14]!==t||m[15]!==w||m[16]!==s||m[17]!==r?(o=(0,i.jsxs)("h2",{className:"d-flex flex-items-center flex-1 min-width-0 ml-1 mr-2",children:[t,w,s,r]}),m[14]=t,m[15]=w,m[16]=s,m[17]=r,m[18]=o):o=m[18];let S=`#annotation_${u}`;return m[19]!==v||m[20]!==S?(d=(0,i.jsx)(ea.K,{as:"a","aria-label":"Jump to the alert in the diff",tooltipDirection:"se",icon:P.FileSymlinkFileIcon,variant:"invisible",href:S,onClick:v}),m[19]=v,m[20]=S,m[21]=d):d=m[21],m[22]!==o||m[23]!==d?(c=(0,i.jsxs)("div",{className:"d-flex flex-row flex-items-center py-1 px-2 bgColor-inset rounded-top-2 border-bottom",children:[o,d]}),m[22]=o,m[23]=d,m[24]=c):c=m[24],c}function tJ(e){let t,n=(0,l.c)(3),{filteredText:a,onFilteredTextChange:s}=e;return n[0]!==a||n[1]!==s?(t=(0,i.jsx)(tZ,{className:"mt-2 width-full",filteredText:a,onFilteredTextChange:s}),n[0]=a,n[1]=s,n[2]=t):t=n[2],t}function tX(e){let t,n,a,s,r=(0,l.c)(12),{annotationSummaries:o,hasAlerts:d,pageLimits:c,announceRef:m}=e;return r[0]!==c.annotationsLimit||r[1]!==c.annotationsLimitExceeded?(t=c.annotationsLimitExceeded&&(0,i.jsx)(eB.l,{"aria-label":"Warning",title:"Warning",variant:"warning",hideTitle:!0,description:`Only the first ${c.annotationsLimit} alerts are currently being shown.`,className:"tmp-mb-3"}),r[0]=c.annotationsLimit,r[1]=c.annotationsLimitExceeded,r[2]=t):t=r[2],r[3]!==o||r[4]!==d?(n=o.length>0?(0,i.jsx)("div",{className:"d-flex flex-column position-relative width-full gap-3",children:o}):(0,i.jsx)("div",{className:"d-flex flex-column position-relative width-full height-full flex-justify-center",children:(0,i.jsx)(tb,{heading:d?"No alerts match the current filter":"No alerts on changes yet",icon:P.AlertIcon})}),r[3]=o,r[4]=d,r[5]=n):n=r[5],r[6]!==m?(a=(0,i.jsx)("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",ref:m}),r[6]=m,r[7]=a):a=r[7],r[8]!==t||r[9]!==n||r[10]!==a?(s=(0,i.jsxs)(i.Fragment,{children:[t,n,a]}),r[8]=t,r[9]=n,r[10]=a,r[11]=s):s=r[11],s}tY.displayName="AnnotationHeader",tJ.displayName="AlertsPanelHeaderContent",tX.displayName="AlertsPanelBody";let t0=(0,x.memo)(function(e){let t,n,a,s,r,d,c,m,h=(0,l.c)(33),{annotations:f,onClose:p,isOpen:g,pageLimits:_,returnFocusRef:b}=e,y=(0,o.G7)("prs_docked_side_panel"),w=(0,tE.Yf)(tE.r0.Alerts),j=w?k.XC?.getElementById(tD.I):null,[S,N]=(0,x.useState)(""),R=new Set(f.filter(e=>(function(e,t){if(t){let n=t.toLowerCase();if(!e.annotationLevel.toLowerCase().includes(n)&&!e.message.toLowerCase().includes(n)&&!e.path.toLowerCase().includes(n)&&!e.title?.toLowerCase().includes(n)&&!e.checkRun.name?.toLowerCase().includes(n)&&!e.appAvatarAltText.toLowerCase().includes(n)&&!e.checkSuiteName?.toLowerCase().includes(n))return!1}return!0})(e,S)).map(e=>e.id)),T=(0,x.useRef)(null),E=f.length>0,L=(0,C.j5)(),{navigateToSelectedAnnotation:I}=(0,C.Lh)(),D=y&&w?tA.l:p;h[0]!==D||h[1]!==L||h[2]!==I?(t=e=>{L&&I(e),D()},h[0]=D,h[1]=L,h[2]=I,h[3]=t):t=h[3];let A=t,O=f.map(e=>e&&R.has(e.id)?(0,i.jsx)(t1,{annotation:e,handleNavigateToAnnotation:A},e.id):null).filter(Boolean),F=(0,x.useRef)(null);h[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,v.s)(tv.i,300),h[4]=n):n=h[4];let $=n;h[5]!==O||h[6]!==g?(a=()=>{g&&$(O.length>0?`${O.length} ${1===O.length?"alert":"alerts"}`:"No alerts found",{element:F.current})},s=[g,$,O],h[5]=O,h[6]=g,h[7]=a,h[8]=s):(a=h[7],s=h[8]),(0,x.useEffect)(a,s);let B=(0,tE.JE)();if(!g)return null;if(y&&j&&!B){let e,t,n;return h[9]!==S||h[10]!==N?(e=(0,i.jsx)(tP.Z.Header,{children:(0,i.jsx)(tJ,{filteredText:S,onFilteredTextChange:N})}),h[9]=S,h[10]=N,h[11]=e):e=h[11],h[12]!==O||h[13]!==E||h[14]!==_?(t=(0,i.jsx)(tP.Z.Body,{children:(0,i.jsx)(tX,{annotationSummaries:O,hasAlerts:E,pageLimits:_,announceRef:F})}),h[12]=O,h[13]=E,h[14]=_,h[15]=t):t=h[15],h[16]!==e||h[17]!==t?(n=(0,i.jsxs)(tP.Z,{panelName:tE.r0.Alerts,children:[e,t]}),h[16]=e,h[17]=t,h[18]=n):n=h[18],(0,tL.createPortal)(n,j)}return h[19]===Symbol.for("react.memo_cache_sentinel")?(r={narrow:"fullscreen",regular:"right",wide:"right"},h[19]=r):r=h[19],h[20]!==S||h[21]!==p||h[22]!==N?(d=e=>{let{dialogLabelId:t}=e;return(0,i.jsxs)(u.l.Header,{children:[(0,i.jsxs)("div",{className:"d-flex flex-row flex-items-center flex-justify-between width-full pl-2",children:[(0,i.jsx)(et.A,{as:"h1",className:"f4 text-bold",id:t,children:"Alerts"}),(0,i.jsx)(ea.K,{ref:T,"aria-label":"Close alerts panel",icon:P.XIcon,variant:"invisible",onClick:p})]}),(0,i.jsx)(tJ,{filteredText:S,onFilteredTextChange:N})]})},h[20]=S,h[21]=p,h[22]=N,h[23]=d):d=h[23],h[24]!==O||h[25]!==E||h[26]!==_?(c=(0,i.jsx)(tX,{annotationSummaries:O,hasAlerts:E,pageLimits:_,announceRef:F}),h[24]=O,h[25]=E,h[26]=_,h[27]=c):c=h[27],h[28]!==p||h[29]!==b||h[30]!==d||h[31]!==c?(m=(0,i.jsx)(u.l,{initialFocusRef:T,onClose:p,position:r,returnFocusRef:b,renderHeader:d,children:c}),h[28]=p,h[29]=b,h[30]=d,h[31]=c,h[32]=m):m=h[32],m});function t1(e){let t,n,a,s,r=(0,l.c)(18),{annotation:o,handleNavigateToAnnotation:d}=e,{isCollapsed:c,handleToggleCollapsed:m}=(0,tK.Vv)(o);return r[0]!==o.databaseId||r[1]!==d?(t=()=>d(o.databaseId),r[0]=o.databaseId,r[1]=d,r[2]=t):t=r[2],r[3]!==o.annotationLevel||r[4]!==o.databaseId||r[5]!==o.endLine||r[6]!==o.path||r[7]!==m||r[8]!==c||r[9]!==t?(n=(0,i.jsx)(tY,{databaseId:o.databaseId,lineNumber:o.endLine,annotationLevel:o.annotationLevel,path:o.path,toggleCollapsed:m,isCollapsed:c,onNavigateToAnnotation:t}),r[3]=o.annotationLevel,r[4]=o.databaseId,r[5]=o.endLine,r[6]=o.path,r[7]=m,r[8]=c,r[9]=t,r[10]=n):n=r[10],r[11]!==o||r[12]!==c?(a=!c&&(0,i.jsx)(tK.YH,{annotation:o,inSidePanel:!0}),r[11]=o,r[12]=c,r[13]=a):a=r[13],r[14]!==o.id||r[15]!==n||r[16]!==a?(s=(0,i.jsxs)("div",{className:"border rounded-2 bgColor-default overflow-hidden",children:[n,a]},o.id),r[14]=o.id,r[15]=n,r[16]=a,r[17]=s):s=r[17],s}function t2(e){let t,n,a=(0,l.c)(12),{pageLimits:s,className:r}=e;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.G7)("prs_docked_side_panel"),a[0]=t):t=a[0];let d=t,c=(0,tE.Yf)(tE.r0.Alerts),[m,u]=(0,x.useState)(!1),h=(0,x.useRef)(null),f=(0,tE.LI)(),p=(0,C.wI)(),{sendPullRequestAnalyticsEvent:g}=(0,ei.q)();if(!p)return null;let v=p.length,_=m||c,b=d&&c?"Close alerts panel":"Open alerts panel";return a[1]!==f||a[2]!==p||a[3]!==b||a[4]!==m||a[5]!==r||a[6]!==c||a[7]!==_||a[8]!==s||a[9]!==g||a[10]!==v?(n=v>0?(0,i.jsx)("div",{className:"d-flex flex-items-center",children:(0,i.jsxs)(ee.t,{boundaryName:"OpenAlertsPanelButton",fallback:(0,i.jsx)(ea.K,{inactive:!0,"aria-label":"The alerts panel cannot currently be opened.",icon:P.AlertIcon,size:"small",variant:"invisible"}),children:[(0,i.jsx)(A.m,{ref:h,text:b,direction:"sw",type:"label",children:(0,i.jsx)(ec.Q,{className:r,"aria-expanded":_,count:v,leadingVisual:P.AlertIcon,size:"small",variant:"invisible",onClick:()=>{g("alerts_side_panel.open","ALERTS_SIDE_PANEL_BUTTON"),d?f.togglePanel("alerts",h.current):(eU(),u(!0))}})}),(0,i.jsx)(t0,{annotations:p,isOpen:m||c,pageLimits:s,returnFocusRef:h,onClose:()=>{d?f.closePanel():u(!1)}})]})}):null,a[1]=f,a[2]=p,a[3]=b,a[4]=m,a[5]=r,a[6]=c,a[7]=_,a[8]=s,a[9]=g,a[10]=v,a[11]=n):n=a[11],n}t0.displayName="AlertsSidePanel",t1.displayName="SidePanelAlert",t2.displayName="OpenAlertsPanelButton";var t3=n(46251),t4=n(66818),t5=n(68108);let t6={approve:"approve",comment:"comment",requestChanges:"request changes"};var t7=n(63397);let{getItem:t8,removeItem:t9,setItem:ne}=(0,eR.D)("localStorage"),nt="ReviewMenuButton-module__CommentBoxContainer__Xu0xN";var nn=n(80655);function ni(e){let t=[];for(let n of e)for(let e of(n.commentsData?.comments??[]).filter(e=>e.state===nn.W4.Pending))e.databaseId&&t.push({commentID:e.databaseId,thread:n});return t}var nl=n(79076),na=n(89571),ns=n(15837),nr=n(45438),no=n(4978);function nd(e){let t,n,a,s=(0,l.c)(13),{isPROpen:r,reviewEvent:o,viewerAllowedNonCommentReviewTypes:d,viewerCanWriteToRepo:m,viewerHasViolatedPushPolicy:u,viewerIsAuthor:h,viewerIsCopilotAttributed:f,handleReviewEventChange:p,handleReviewSubmit:g}=e;return r?(s[0]!==g?(t={"pull-request-files-changed:submit-review":g},s[0]=g,s[1]=t):t=s[1],s[2]!==p||s[3]!==o||s[4]!==d||s[5]!==m||s[6]!==u||s[7]!==h||s[8]!==f?(n=(0,i.jsx)(nc,{reviewEvent:o,viewerAllowedNonCommentReviewTypes:d,viewerCanWriteToRepo:m,viewerHasViolatedPushPolicy:u,viewerIsAuthor:h,viewerIsCopilotAttributed:f,onReviewEventChange:p}),s[2]=p,s[3]=o,s[4]=d,s[5]=m,s[6]=u,s[7]=h,s[8]=f,s[9]=n):n=s[9],s[10]!==t||s[11]!==n?(a=(0,i.jsx)(c.tL,{commands:t,children:n}),s[10]=t,s[11]=n,s[12]=a):a=s[12],a):null}nd.displayName="ReviewTypeSelector";let nc=(0,x.memo)(function(e){var t,n,a,s,r;let o,d,c,m,u,h,f,p,g,x,v,_,b,y=(0,l.c)(34),{onReviewEventChange:w,reviewEvent:j,viewerAllowedNonCommentReviewTypes:S,viewerCanWriteToRepo:C,viewerHasViolatedPushPolicy:N,viewerIsAuthor:R,viewerIsCopilotAttributed:T}=e;y[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,i.jsx)(ns.A.Label,{visuallyHidden:!0,children:"Review Event"}),y[0]=o):o=y[0];let E=j===t6.comment;y[1]===Symbol.for("react.memo_cache_sentinel")?(d=(0,na.ZH)(t6.comment),y[1]=d):d=y[1],y[2]!==E?(c=(0,i.jsx)(nm,{checked:E,label:d,subLabel:"Submit general feedback without explicit approval.",value:t6.comment}),y[2]=E,y[3]=c):c=y[3];let L=j===t6.approve;y[4]!==S?(m=S.includes("APPROVE"),y[4]=S,y[5]=m):m=y[5];let I=!m;y[6]===Symbol.for("react.memo_cache_sentinel")?(u=(0,na.ZH)(t6.approve),y[6]=u):u=y[6],y[7]!==T?(h=T?"Only users who did not collaborate with the coding agent will satisfy review requirements.":"Submit feedback and approve merging these changes.",y[7]=T,y[8]=h):h=y[8];let D=!!N;y[9]!==D||y[10]!==S||y[11]!==R?(t=R,n=D,a=S,f=t?"Pull request authors can't approve their own pull requests.":n?"Users that pushed changes to this pull request after it was opened can't approve":a.includes("APPROVE")?"":"Only users with explicit access to this repository may approve pull requests",y[9]=D,y[10]=S,y[11]=R,y[12]=f):f=y[12],y[13]!==f||y[14]!==L||y[15]!==I||y[16]!==h?(p=(0,i.jsx)(nm,{checked:L,disabled:I,label:u,subLabel:h,value:t6.approve,disabledTooltip:f}),y[13]=f,y[14]=L,y[15]=I,y[16]=h,y[17]=p):p=y[17];let P=j===t6.requestChanges;y[18]!==S?(g=S.includes("REQUEST_CHANGES"),y[18]=S,y[19]=g):g=y[19];let A=!g;y[20]!==S||y[21]!==R?(s=R,r=S,x=s?"Pull request authors can't request changes on their own pull requests.":r.includes("REQUEST_CHANGES")?"":"Only users with explicit access to this repository may request changes on pull requests",y[20]=S,y[21]=R,y[22]=x):x=y[22],y[23]===Symbol.for("react.memo_cache_sentinel")?(v=(0,na.ZH)(t6.requestChanges),y[23]=v):v=y[23];let O=C?"Submit feedback that must be addressed before merging.":"Submit feedback suggesting changes.";return y[24]!==P||y[25]!==A||y[26]!==x||y[27]!==O?(_=(0,i.jsx)(nm,{checked:P,disabled:A,disabledTooltip:x,label:v,value:t6.requestChanges,subLabel:O}),y[24]=P,y[25]=A,y[26]=x,y[27]=O,y[28]=_):_=y[28],y[29]!==w||y[30]!==p||y[31]!==_||y[32]!==c?(b=(0,i.jsxs)(ns.A,{name:"reviewEvent",onChange:w,className:"ReviewMenu-module__RadioGroup__jnj83",children:[o,c,p,_]}),y[29]=w,y[30]=p,y[31]=_,y[32]=c,y[33]=b):b=y[33],b});function nm(e){let t,n,a,s,r,o,d=(0,l.c)(18),{checked:c,disabled:m,disabledTooltip:u,label:h,subLabel:f,value:p}=e;d[0]!==c||d[1]!==p?(t=(0,i.jsx)(nr.A,{checked:c,value:p,className:"ReviewMenu-module__Radio__gGWqZ"}),d[0]=c,d[1]=p,d[2]=t):t=d[2],d[3]!==h?(n=(0,i.jsx)("span",{className:"text-bold",children:h}),d[3]=h,d[4]=n):n=d[4],d[5]!==f?(a=(0,i.jsx)("span",{className:"ReviewMenu-module__RadioText__qkLyB",children:f}),d[5]=f,d[6]=a):a=d[6],d[7]!==n||d[8]!==a?(s=(0,i.jsxs)(er.A.Label,{className:"d-flex flex-column",children:[n,a]}),d[7]=n,d[8]=a,d[9]=s):s=d[9],d[10]!==m||d[11]!==t||d[12]!==s?(r=(0,i.jsxs)(er.A,{disabled:m,children:[t,s]}),d[10]=m,d[11]=t,d[12]=s,d[13]=r):r=d[13];let g=r;return d[14]!==m||d[15]!==u||d[16]!==g?(o=m&&u?(0,i.jsx)(no.A,{text:u,children:g}):g,d[14]=m,d[15]=u,d[16]=g,d[17]=o):o=d[17],o}nc.displayName="ReviewRadioButtons",nm.displayName="RadioButton";var nu=n(4908),nh=n(58874);function nf(e){let t,n,a,s,r,o,d,c,m,u,h=(0,l.c)(23),{totalPendingComments:f,commentsList:p,handleNavigateToDiffComment:g}=e;h[0]===Symbol.for("react.memo_cache_sentinel")?(t={defaultOpen:!0,closeOnOutsideClick:!1},h[0]=t):t=h[0];let{getDetailsProps:v,open:_}=(0,nu.A)(t);return f?(h[1]!==v?(n=v(),h[1]=v,h[2]=n):n=h[2],h[3]!==_?(a=_&&(0,i.jsx)(P.ChevronDownIcon,{className:"fgColor-muted"}),h[3]=_,h[4]=a):a=h[4],h[5]!==_?(s=!_&&(0,i.jsx)(P.ChevronRightIcon,{className:"fgColor-muted"}),h[5]=_,h[6]=s):s=h[6],h[7]!==f?(r=(0,i.jsxs)(et.A,{as:"h2",className:"f5",children:["Pending comments ",(0,i.jsx)(y.A,{children:f})]}),h[7]=f,h[8]=r):r=h[8],h[9]!==a||h[10]!==s||h[11]!==r?(o=(0,i.jsx)(nh.A.Summary,{children:(0,i.jsxs)("div",{className:"d-flex flex-row flex-items-center gap-2 tmp-mt-4 mb-2",children:[a,s,r]})}),h[9]=a,h[10]=s,h[11]=r,h[12]=o):o=h[12],h[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,i.jsx)(en.A,{}),h[13]=d):d=h[13],h[14]!==p||h[15]!==g?(c=p?.map(e=>(0,i.jsx)(ta,{pendingComment:e,onNavigateToDiffComment:g},e.commentID)),h[14]=p,h[15]=g,h[16]=c):c=h[16],h[17]!==c?(m=(0,i.jsx)(x.Suspense,{fallback:d,children:(0,i.jsx)("div",{className:"d-flex flex-column gap-3",children:c})}),h[17]=c,h[18]=m):m=h[18],h[19]!==n||h[20]!==o||h[21]!==m?(u=(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(nh.A,{...n,children:[o,m]})}),h[19]=n,h[20]=o,h[21]=m,h[22]=u):u=h[22],u):null}nf.displayName="ReviewCommentsSection";var np=n(56149);let ng=e=>{let t,n,a,s=(0,l.c)(4),{portalName:r}=e,o=(0,x.useRef)(null);return s[0]!==r?(t=()=>{o.current&&(0,np.cw)(o.current,r)},n=[r],s[0]=r,s[1]=t,s[2]=n):(t=s[1],n=s[2]),(0,x.useEffect)(t,n),s[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)("div",{ref:o,className:"position-absolute"}),s[3]=a):a=s[3],a};ng.displayName="OverlayPortalContainer";let nx="review-menu-portal-root";function nv(e){let t,n,a,s,r,o,c,m,h,f,p,g,v,_,b,y,w,j,S,N,R,T,E,L,I,D,A,O,F,k,$,B,q,M,V,G=(0,l.c)(104),{currentUserLogin:U,pullRequest:z,repository:H,redirectOnMutation:W}=e,Q=void 0===W||W,K=(0,d.u)("prx_robust_small_screen_support"),{author:Z,pathName:Y,state:J,viewerAllowedNonCommentReviewTypes:X,viewerHasViolatedPushPolicy:ee,viewerIsCopilotAttributed:en,comparison:el}=z,es=(0,C.ys)(),{persistedReview:er,persistReviewToStorage:eo,removePersistedReviewFromStorage:ed}=function(e){let t,n,i,a,s=(0,l.c)(11),[r,o]=(0,x.useState)(!1),d=`Review:${e}`;s[0]!==d?(t=()=>t8(d),s[0]=d,s[1]=t):t=s[1];let[c,m]=(0,x.useState)(t);s[2]!==d?(n=()=>{t9(d),m(null)},s[2]=d,s[3]=n):n=s[3];let u=n;s[4]!==r||s[5]!==d?(i=(e,t)=>{if(!r)try{let n={event:e,text:t};ne(d,n),m(n)}catch{o(!0)}},s[4]=r,s[5]=d,s[6]=i):i=s[6];let h=(0,t7.d)(i,1e3);return s[7]!==h||s[8]!==c||s[9]!==u?(a={persistedReview:c,persistReviewToStorage:h,removePersistedReviewFromStorage:u},s[7]=h,s[8]=c,s[9]=u,s[10]=a):a=s[10],a}(Y),em=es.pendingReviewIDs?.length??0,eu=Z?.login===U,eh=J!==t5.Q.Closed&&J!==t5.Q.Merged,ex="WRITE"===H.viewerPermission||"ADMIN"===H.viewerPermission,ev=el.headOid,[e_,eb]=(0,x.useState)("none"),[ey,ew]=(0,x.useState)("idle"),[ej,eC]=(0,x.useState)(),[eN,eR]=(0,x.useState)(er?.event??t6.comment);G[0]!==es.pendingReviewIDs?(t=es?.pendingReviewIDs??[],G[0]=es.pendingReviewIDs,G[1]=t):t=G[1];let eT=t.length>0,eE=(0,x.useRef)(null),eL=er?.text??"",eI=(0,x.useRef)(eL),[eD,eP]=(0,x.useState)(!!er?.text),eA="submitting"===ey||!eD&&eN===t6.comment&&!em,{sendPullRequestAnalyticsEvent:eO}=(0,ei.q)();G[2]!==eo||G[3]!==eN?(n=e=>{eI.current=e,eP(!!e.trim()),eo(eN,e)},G[2]=eo,G[3]=eN,G[4]=n):n=G[4];let eF=n;G[5]!==eo?(a=e=>{Object.values(t6).includes(e)&&(eR(e),eo(e,eI.current))},G[5]=eo,G[6]=a):a=G[6];let ek=a;G[7]!==Q||G[8]!==ed?(s=e=>{let{redirectUrl:t}=e;ed(),Q&&(window.location.href=t)},G[7]=Q,G[8]=ed,G[9]=s):s=G[9],G[10]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{ew("idle"),eC(e.message)},G[10]=r):r=G[10],G[11]!==s?(o={onSuccess:s,onError:r},G[11]=s,G[12]=o):o=G[12];let{mutate:e$}=function(e){let t,n,i,a,s=(0,l.c)(10),{onSuccess:r,onError:o}=e,d=(0,ep.e)(ef.uT.submitReview);return s[0]!==d?(t=async e=>{let{body:t,event:n,headSha:i}=e;return(0,eS.Sr)(`${d}`,{method:"PUT",headers:{Accept:"application/json"},body:{body:t,event:n,headSha:i}})},s[0]=d,s[1]=t):t=s[1],s[2]!==r?(n=async e=>{let t=await e.json(),n=t.error||"Unknown error occurred";if(!e.ok)throw Error(n);r(t)},s[2]=r,s[3]=n):n=s[3],s[4]!==o?(i=e=>{o(e)},s[4]=o,s[5]=i):i=s[5],s[6]!==t||s[7]!==n||s[8]!==i?(a={mutationFn:t,onSuccess:n,onError:i},s[6]=t,s[7]=n,s[8]=i,s[9]=a):a=s[9],(0,eg.n)(a)}(o);G[13]!==Q||G[14]!==ed?(c=e=>{let{redirectUrl:t}=e;ed(),Q&&(window.location.href=t)},G[13]=Q,G[14]=ed,G[15]=c):c=G[15],G[16]===Symbol.for("react.memo_cache_sentinel")?(m=e=>{ew("idle"),eC(e.message)},G[16]=m):m=G[16],G[17]!==c?(h={onSuccess:c,onError:m},G[17]=c,G[18]=h):h=G[18];let{mutate:eB}=function(e){let t,n,i,a,s=(0,l.c)(10),{onSuccess:r,onError:o}=e,d=(0,ep.e)(ef.uT.abandonReview);return s[0]!==d?(t=async()=>(0,eS.Sr)(`${d}`,{method:"DELETE",headers:{Accept:"application/json"}}),s[0]=d,s[1]=t):t=s[1],s[2]!==r?(n=async e=>{let t=await e.json(),n=t.error||"Unknown error occurred";if(!e.ok)throw Error(n);r(t)},s[2]=r,s[3]=n):n=s[3],s[4]!==o?(i=e=>{o(e)},s[4]=o,s[5]=i):i=s[5],s[6]!==t||s[7]!==n||s[8]!==i?(a={mutationFn:t,onSuccess:n,onError:i},s[6]=t,s[7]=n,s[8]=i,s[9]=a):a=s[9],(0,eg.n)(a)}(h);G[19]!==ej||G[20]!==ev||G[21]!==eN||G[22]!==eO||G[23]!==eA||G[24]!==e$?(f=()=>{eA||(ej&&eC(void 0),ew("submitting"),eO("submit_review_dialog.submit","SUBMIT_REVIEW_BUTTON"),e$({body:eI.current,event:eN,headSha:ev}))},G[19]=ej,G[20]=ev,G[21]=eN,G[22]=eO,G[23]=eA,G[24]=e$,G[25]=f):f=G[25];let eq=f;G[26]!==eB||G[27]!==ej||G[28]!==es.pendingReviewIDs||G[29]!==eO?(p=()=>{!es?.pendingReviewIDs||es?.pendingReviewIDs.length===0||confirm("Are you sure you want to cancel? You will lose all your pending comments.")&&(ej&&eC(void 0),ew("canceling"),eO("submit_review_dialog.cancel","CANCEL_REVIEW_BUTTON"),eB())},G[26]=eB,G[27]=ej,G[28]=es.pendingReviewIDs,G[29]=eO,G[30]=p):p=G[30];let eM=p;G[31]!==eh||G[32]!==X||G[33]!==eu?(g=function({viewerIsAuthor:e,viewerAllowedNonCommentReviewTypes:t,isPROpen:n}){let i=t.includes("APPROVE"),l=t.includes("REQUEST_CHANGES");switch(!0){case!n:return{isHidden:!1,text:"Comments"};case e:case i:case l:return{isHidden:!1,text:"Review"};default:return{isHidden:!1,text:"Comments"}}}({isPROpen:eh,viewerAllowedNonCommentReviewTypes:X,viewerIsAuthor:eu}),G[31]=eh,G[32]=X,G[33]=eu,G[34]=g):g=G[34];let eV=g;G[35]!==eO?(v=()=>{window.innerWidth<768?eb("dialog"):eb("anchored"),eO("submit_review_dialog.open","REVIEW_CHANGES_BUTTON")},G[35]=eO,G[36]=v):v=G[36];let eG=v;G[37]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{eb("none")},G[37]=_):_=G[37];let eU=_;G[38]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{eb("none")},G[38]=b):b=G[38];let ez=b;G[39]!==eG||G[40]!==e_?(y=()=>{"none"===e_?eG():eU()},G[39]=eG,G[40]=e_,G[41]=y):y=G[41];let eH=y;G[42]!==ek||G[43]!==eq||G[44]!==eL||G[45]!==eh||G[46]!==eF||G[47]!==es.pendingReviewIDs||G[48]!==eN||G[49]!==X||G[50]!==ex||G[51]!==ee||G[52]!==eu||G[53]!==en?(w=(0,i.jsx)(ny,{pendingReviewIds:es.pendingReviewIDs,initialReviewBody:eL,isPROpen:eh,onReviewBodyChange:eF,reviewEvent:eN,viewerAllowedNonCommentReviewTypes:X,viewerCanWriteToRepo:ex,viewerHasViolatedPushPolicy:ee,viewerIsAuthor:eu,viewerIsCopilotAttributed:en,handleNavigateToDiffComment:ez,handleReviewSubmit:eq,handleReviewEventChange:ek}),G[42]=ek,G[43]=eq,G[44]=eL,G[45]=eh,G[46]=eF,G[47]=es.pendingReviewIDs,G[48]=eN,G[49]=X,G[50]=ex,G[51]=ee,G[52]=eu,G[53]=en,G[54]=w):w=G[54];let eW=w;if(eV.isHidden)return null;G[55]!==ej||G[56]!==eM||G[57]!==eq||G[58]!==eT||G[59]!==eV||G[60]!==ey||G[61]!==eA?(j=(0,i.jsx)(nb,{errorMessage:ej,hasPendingReviews:eT,reviewSubmissionState:ey,handleReviewCancel:eM,handleCloseReviewDialog:eU,handleReviewSubmit:eq,submitDisabled:eA,reviewMenuButtonDisplayState:eV}),G[55]=ej,G[56]=eM,G[57]=eq,G[58]=eT,G[59]=eV,G[60]=ey,G[61]=eA,G[62]=j):j=G[62];let eQ=j,eK=em||void 0;G[63]!==eV.text||G[64]!==K?(S=K?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"ReviewMenuButton-module__submitTextFull__wN_rM",children:["Submit ",eV.text?.toLowerCase()]}),(0,i.jsx)("span",{className:"ReviewMenuButton-module__submitTextShort__zl992",children:eV.text})]}):(0,i.jsxs)(i.Fragment,{children:["Submit ",eV.text?.toLowerCase()]}),G[63]=eV.text,G[64]=K,G[65]=S):S=G[65],G[66]!==eH||G[67]!==eK||G[68]!==S?(N=(0,i.jsx)(ec.Q,{count:eK,className:"ReviewMenuButton-module__ReviewMenuButton__eXO8O",trailingAction:P.TriangleDownIcon,variant:"primary",onClick:eH,size:"small",ref:eE,children:S}),G[66]=eH,G[67]=eK,G[68]=S,G[69]=N):N=G[69],G[70]===Symbol.for("react.memo_cache_sentinel")?(R=(0,i.jsx)(ng,{portalName:nx}),G[70]=R):R=G[70];let eZ="anchored"===e_;return G[71]===Symbol.for("react.memo_cache_sentinel")?(T={regular:"anchored",narrow:"fullscreen"},G[71]=T):T=G[71],G[72]===Symbol.for("react.memo_cache_sentinel")?(E={disabled:!0},L={role:"dialog","aria-labelledby":"anchored-review-title","aria-modal":"true",portalContainerName:nx},G[72]=E,G[73]=L):(E=G[72],L=G[73]),G[74]!==eV.text?(I=eV.text?.toLowerCase(),G[74]=eV.text,G[75]=I):I=G[75],G[76]!==I?(D=(0,i.jsxs)(et.A,{as:"h1",className:"flex-1 f5",variant:"small",id:"anchored-review-title",children:["Finish your ",I]}),G[76]=I,G[77]=D):D=G[77],G[78]!==eT?(A=eT&&(0,i.jsx)(ea.K,{icon:P.MaximizeIcon,className:"ReviewMenuButton-module__ExpandSection__ifA_P",variant:"invisible","aria-label":"Expand this section",onClick:()=>eb("dialog")}),G[78]=eT,G[79]=A):A=G[79],G[80]===Symbol.for("react.memo_cache_sentinel")?(O=(0,i.jsx)(ea.K,{icon:P.XIcon,variant:"invisible","aria-label":"Close",onClick:eU}),G[80]=O):O=G[80],G[81]!==A?(F=(0,i.jsxs)(t3.B,{direction:"horizontal",align:"center",gap:"none",children:[A,O]}),G[81]=A,G[82]=F):F=G[82],G[83]!==D||G[84]!==F?(k=(0,i.jsxs)(t3.B,{direction:"horizontal",align:"center",justify:"space-between",className:"py-2 border-bottom tmp-pl-3 pr-2",children:[D,F]}),G[83]=D,G[84]=F,G[85]=k):k=G[85],G[86]!==eW?($=(0,i.jsx)("div",{className:"ReviewMenuButton-module__AnchoredReviewBody__kOq9n",children:eW}),G[86]=eW,G[87]=$):$=G[87],G[88]!==eQ?(B=(0,i.jsx)("div",{className:"tmp-p-3 border-top",children:eQ}),G[88]=eQ,G[89]=B):B=G[89],G[90]!==eZ||G[91]!==k||G[92]!==$||G[93]!==B?(q=(0,i.jsxs)(t4.T,{open:eZ,anchorRef:eE,width:"xlarge",onClose:eU,displayCloseButton:!1,variant:T,renderAnchor:null,focusZoneSettings:E,overlayProps:L,children:[k,$,B]}),G[90]=eZ,G[91]=k,G[92]=$,G[93]=B,G[94]=q):q=G[94],G[95]!==eW||G[96]!==e_||G[97]!==eV.text||G[98]!==eQ?(M="dialog"===e_&&(0,i.jsx)(u.l,{onClose:eU,returnFocusRef:eE,"aria-label":"Review changes",position:{narrow:"fullscreen",regular:"right",wide:"right"},title:`Finish your ${eV.text?.toLowerCase()}`,renderFooter:()=>(0,i.jsx)(u.l.Footer,{children:eQ}),children:eW}),G[95]=eW,G[96]=e_,G[97]=eV.text,G[98]=eQ,G[99]=M):M=G[99],G[100]!==N||G[101]!==q||G[102]!==M?(V=(0,i.jsxs)(i.Fragment,{children:[N,R,q,M]}),G[100]=N,G[101]=q,G[102]=M,G[103]=V):V=G[103],V}nv.displayName="ReviewMenuButton";let n_=e=>{let t,n,a,s,r,o,d=(0,l.c)(12);d[0]!==e?({ref:s,initialValue:t,onChange:n,...a}=e,d[0]=e,d[1]=t,d[2]=n,d[3]=a,d[4]=s):(t=d[1],n=d[2],a=d[3],s=d[4]);let[c,m]=(0,x.useState)(t);d[5]!==n?(r=e=>{m(e),n(e)},d[5]=n,d[6]=r):r=d[6];let u=r;return d[7]!==u||d[8]!==a||d[9]!==s||d[10]!==c?(o=(0,i.jsx)(tN.S,{...a,value:c,onChange:u,ref:s}),d[7]=u,d[8]=a,d[9]=s,d[10]=c,d[11]=o):o=d[11],o};function nb(e){let t,n,a,s,r,o,d,c,m,u,h=(0,l.c)(30),{errorMessage:f,handleReviewCancel:p,handleCloseReviewDialog:g,handleReviewSubmit:x,hasPendingReviews:v,submitDisabled:_,reviewMenuButtonDisplayState:b,reviewSubmissionState:y}=e,w="canceling"===y,j="submitting"===y;h[0]!==f?(t=f&&(0,i.jsxs)(e3.A,{className:"ReviewMenuButton-module__ErrorMessage__f9tE8",variant:"danger",children:[(0,i.jsx)(P.StopIcon,{className:"mr-2"}),f]}),h[0]=f,h[1]=t):t=h[1],h[2]!==p||h[3]!==v||h[4]!==w||h[5]!==j||h[6]!==b.text?(n=v?(0,i.jsx)(ec.Q,{disabled:w||j,loading:w,onClick:p,tabIndex:0,variant:"danger",children:(0,i.jsxs)(t3.B,{direction:"horizontal",align:"center",children:["Discard ",b.text?.toLowerCase()]})}):(0,i.jsx)("div",{}),h[2]=p,h[3]=v,h[4]=w,h[5]=j,h[6]=b.text,h[7]=n):n=h[7];let S=w||j;h[8]!==g||h[9]!==S?(a=(0,i.jsx)(ec.Q,{onClick:g,disabled:S,children:"Cancel"}),h[8]=g,h[9]=S,h[10]=a):a=h[10];let C=_||j;return h[11]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsx)(nl.U,{keys:"Mod+enter"}),h[11]=s):s=h[11],h[12]!==b.text?(r=b.text?.toLowerCase(),h[12]=b.text,h[13]=r):r=h[13],h[14]!==r?(o=(0,i.jsxs)("div",{className:"d-flex flex-row flex-justify-center",children:["Submit ",r]}),h[14]=r,h[15]=o):o=h[15],h[16]!==x||h[17]!==j||h[18]!==C||h[19]!==o?(d=(0,i.jsx)(ec.Q,{disabled:C,variant:"primary",onClick:x,loading:j,className:"ReviewMenuButton-module__SubmitReviewButton__GHLIc",trailingVisual:s,children:o}),h[16]=x,h[17]=j,h[18]=C,h[19]=o,h[20]=d):d=h[20],h[21]!==a||h[22]!==d?(c=(0,i.jsxs)("div",{className:"d-flex flex-row gap-2",children:[a,d]}),h[21]=a,h[22]=d,h[23]=c):c=h[23],h[24]!==c||h[25]!==n?(m=(0,i.jsxs)("div",{className:"d-flex flex-row flex-1 flex-items-center flex-justify-between gap-2",children:[n,c]}),h[24]=c,h[25]=n,h[26]=m):m=h[26],h[27]!==t||h[28]!==m?(u=(0,i.jsxs)(i.Fragment,{children:[t,m]}),h[27]=t,h[28]=m,h[29]=u):u=h[29],u}function ny(e){let t,n=(0,l.c)(28),{initialReviewBody:a,isPROpen:s,onReviewBodyChange:r,reviewEvent:d,pendingReviewIds:c,viewerAllowedNonCommentReviewTypes:m,viewerCanWriteToRepo:u,viewerHasViolatedPushPolicy:h,viewerIsAuthor:f,viewerIsCopilotAttributed:p,handleNavigateToDiffComment:g,handleReviewSubmit:x,handleReviewEventChange:v}=e;if((0,o.G7)("load_paginated_threads_on_diff")){let e;return n[0]!==g||n[1]!==v||n[2]!==x||n[3]!==a||n[4]!==s||n[5]!==r||n[6]!==c||n[7]!==d||n[8]!==m||n[9]!==u||n[10]!==h||n[11]!==f||n[12]!==p?(e=(0,i.jsx)(nw,{initialReviewBody:a,isPROpen:s,onReviewBodyChange:r,reviewEvent:d,pendingReviewIds:c,viewerAllowedNonCommentReviewTypes:m,viewerCanWriteToRepo:u,viewerHasViolatedPushPolicy:h,viewerIsAuthor:f,viewerIsCopilotAttributed:p,handleNavigateToDiffComment:g,handleReviewSubmit:x,handleReviewEventChange:v}),n[0]=g,n[1]=v,n[2]=x,n[3]=a,n[4]=s,n[5]=r,n[6]=c,n[7]=d,n[8]=m,n[9]=u,n[10]=h,n[11]=f,n[12]=p,n[13]=e):e=n[13],e}return n[14]!==g||n[15]!==v||n[16]!==x||n[17]!==a||n[18]!==s||n[19]!==r||n[20]!==c||n[21]!==d||n[22]!==m||n[23]!==u||n[24]!==h||n[25]!==f||n[26]!==p?(t=(0,i.jsx)(nj,{initialReviewBody:a,isPROpen:s,onReviewBodyChange:r,reviewEvent:d,pendingReviewIds:c,viewerAllowedNonCommentReviewTypes:m,viewerCanWriteToRepo:u,viewerHasViolatedPushPolicy:h,viewerIsAuthor:f,viewerIsCopilotAttributed:p,handleNavigateToDiffComment:g,handleReviewSubmit:x,handleReviewEventChange:v}),n[14]=g,n[15]=v,n[16]=x,n[17]=a,n[18]=s,n[19]=r,n[20]=c,n[21]=d,n[22]=m,n[23]=u,n[24]=h,n[25]=f,n[26]=p,n[27]=t):t=n[27],t}function nw(e){let t,n,a,s,r,o,d=(0,l.c)(23),{initialReviewBody:c,isPROpen:m,onReviewBodyChange:u,reviewEvent:h,pendingReviewIds:f,viewerAllowedNonCommentReviewTypes:p,viewerCanWriteToRepo:g,viewerHasViolatedPushPolicy:v,viewerIsAuthor:_,viewerIsCopilotAttributed:b,handleNavigateToDiffComment:y,handleReviewSubmit:w,handleReviewEventChange:j}=e,S=(0,x.useRef)(null),N=function(e){let t,n=(0,l.c)(3),i=(0,C.BI)(e);tF(i);e:{let l;if(!e||0===e.length||!i){let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],n[0]=e):e=n[0],t=e;break e}n[1]!==i?(l=ni(i),n[1]=i,n[2]=l):l=n[2],t=l}return t}(f);return d[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{let e=window.setTimeout(()=>S.current?.focus());return()=>{window.clearTimeout(e)}},n=[],d[0]=t,d[1]=n):(t=d[0],n=d[1]),(0,x.useEffect)(t,n),d[2]!==w||d[3]!==c||d[4]!==u?(a=(0,i.jsx)(n_,{ref:S,label:"Add review comment",placeholder:"Leave a comment",className:nt,initialValue:c,onChange:u,onPrimaryAction:w}),d[2]=w,d[3]=c,d[4]=u,d[5]=a):a=d[5],d[6]!==j||d[7]!==w||d[8]!==m||d[9]!==h||d[10]!==p||d[11]!==g||d[12]!==v||d[13]!==_||d[14]!==b?(s=(0,i.jsx)(nd,{isPROpen:m,reviewEvent:h,viewerAllowedNonCommentReviewTypes:p,viewerCanWriteToRepo:g,viewerHasViolatedPushPolicy:v,viewerIsAuthor:_,viewerIsCopilotAttributed:b,handleReviewEventChange:j,handleReviewSubmit:w}),d[6]=j,d[7]=w,d[8]=m,d[9]=h,d[10]=p,d[11]=g,d[12]=v,d[13]=_,d[14]=b,d[15]=s):s=d[15],d[16]!==N||d[17]!==y?(r=(0,i.jsx)(nf,{totalPendingComments:N.length,commentsList:N,handleNavigateToDiffComment:y}),d[16]=N,d[17]=y,d[18]=r):r=d[18],d[19]!==a||d[20]!==s||d[21]!==r?(o=(0,i.jsxs)(i.Fragment,{children:[a,s,r]}),d[19]=a,d[20]=s,d[21]=r,d[22]=o):o=d[22],o}function nj(e){let t,n,a,s,r,o,d=(0,l.c)(23),{initialReviewBody:c,isPROpen:m,onReviewBodyChange:u,reviewEvent:h,pendingReviewIds:f,viewerAllowedNonCommentReviewTypes:p,viewerCanWriteToRepo:g,viewerHasViolatedPushPolicy:v,viewerIsAuthor:_,viewerIsCopilotAttributed:b,handleNavigateToDiffComment:y,handleReviewSubmit:w,handleReviewEventChange:j}=e,S=(0,x.useRef)(null),R=function(e){let t,n,i=(0,l.c)(13),a=(0,C.BI)(e),s=(0,C.HZ)();e:{let n,l,r;if(!e||0===e.length||!a){let e;i[0]===Symbol.for("react.memo_cache_sentinel")?(e={pendingComments:[],threadsWithoutContext:[]},i[0]=e):e=i[0],t=e;break e}if(i[1]!==s||i[2]!==a){l=[];let e=[];for(let t of a){let{diffSubject:n,hasContext:i}=(0,N.U3)(t,s);i||l.push(Number(t.id));let a={...t,path:t.positioning?.path||"",subject:n||t.subject};e.push(a)}n=ni(e),i[1]=s,i[2]=a,i[3]=n,i[4]=l}else n=i[3],l=i[4];let o=n;i[5]!==o||i[6]!==l?(r={pendingComments:o,threadsWithoutContext:l},i[5]=o,i[6]=l,i[7]=r):r=i[7],t=r}let{pendingComments:r,threadsWithoutContext:o}=t,d=tO(o).data;t:{let e;if(0===o.length||!d){n=r;break t}if(i[8]!==r||i[9]!==d){let t;i[11]!==d?(t=e=>{let t=d[Number(e.thread.id)];return t?{...e,thread:{...e.thread,path:t.path,subject:t}}:e},i[11]=d,i[12]=t):t=i[12],e=r.map(t),i[8]=r,i[9]=d,i[10]=e}else e=i[10];n=e}return n}(f);return d[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{let e=window.setTimeout(()=>S.current?.focus());return()=>{window.clearTimeout(e)}},n=[],d[0]=t,d[1]=n):(t=d[0],n=d[1]),(0,x.useEffect)(t,n),d[2]!==w||d[3]!==c||d[4]!==u?(a=(0,i.jsx)(n_,{ref:S,label:"Add review comment",placeholder:"Leave a comment",className:nt,initialValue:c,onChange:u,onPrimaryAction:w}),d[2]=w,d[3]=c,d[4]=u,d[5]=a):a=d[5],d[6]!==j||d[7]!==w||d[8]!==m||d[9]!==h||d[10]!==p||d[11]!==g||d[12]!==v||d[13]!==_||d[14]!==b?(s=(0,i.jsx)(nd,{isPROpen:m,reviewEvent:h,viewerAllowedNonCommentReviewTypes:p,viewerCanWriteToRepo:g,viewerHasViolatedPushPolicy:v,viewerIsAuthor:_,viewerIsCopilotAttributed:b,handleReviewEventChange:j,handleReviewSubmit:w}),d[6]=j,d[7]=w,d[8]=m,d[9]=h,d[10]=p,d[11]=g,d[12]=v,d[13]=_,d[14]=b,d[15]=s):s=d[15],d[16]!==R||d[17]!==y?(r=(0,i.jsx)(nf,{totalPendingComments:R.length,commentsList:R,handleNavigateToDiffComment:y}),d[16]=R,d[17]=y,d[18]=r):r=d[18],d[19]!==a||d[20]!==s||d[21]!==r?(o=(0,i.jsxs)(i.Fragment,{children:[a,s,r]}),d[19]=a,d[20]=s,d[21]=r,d[22]=o):o=d[22],o}n_.displayName="ControlledCommentBox",nb.displayName="ReviewMenuFooterComponent",ny.displayName="ReviewMenuContent",nw.displayName="ReviewMenuContentUsingStore",nj.displayName="ReviewMenuContentWithDataLoading";var nS=n(5511),nC=n(27259);function nN(e){let t,n,a,s=(0,l.c)(4),{aliveChannel:r}=e,[o,d]=(0,x.useState)(!1),{markComparisonOutdated:c}=(0,C.yo)();s[0]!==c?(t=()=>{c(),d(!0)},s[0]=c,s[1]=t):t=s[1];let m=t;return(s[2]===Symbol.for("react.memo_cache_sentinel")?(n={git_updated:!0},s[2]=n):n=s[2],(0,nC.G)(r,m,n),o)?(s[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)(nR,{}),s[3]=a):a=s[3],a):null}function nR(){let e,t,n,a=(0,l.c)(7),s=(0,w.zy)(),[r,o]=(0,x.useState)(!1),c=(0,d.u)("prx_robust_small_screen_support");a[0]===Symbol.for("react.memo_cache_sentinel")?(e=async()=>{o(!0)},a[0]=e):e=a[0];let m=e;return a[1]!==c?(t=c&&{"data-refresh-button-visible":!0},a[1]=c,a[2]=t):t=a[2],a[3]!==r||a[4]!==s.pathname||a[5]!==t?(n=(0,i.jsx)(ec.Q,{as:w.N_,to:s.pathname,variant:"invisible",className:"RefreshButton-module__refresh__6fkOw",leadingVisual:P.SyncIcon,size:"small",onClick:m,loading:r,preventScrollReset:!0,...t,children:"Refresh"}),a[3]=r,a[4]=s.pathname,a[5]=t,a[6]=n):n=a[6],n}nN.displayName="RefreshButton",nR.displayName="DataRouterRefreshButton";var nT=n(19939),nE=n(23666),nL=n(99893),nI=n(26700);function nD(e){let t,n,a,s,r,o,d,c,m,u,h,f,p,g,v,_,y,w,j,S,C,N,R,T,E,L=(0,l.c)(86),{ref:I,items:D,onMultiSelect:P,onSingleSelect:A,onApply:O,onCancel:F,buttonProps:k,anchorLabel:$,variant:B,title:q,dialogProps:M,open:V,onOpenChange:G}=e,U=void 0===B?"overlay":B,z=(0,x.useRef)(null),[H,W]=(0,x.useState)(!1),[Q,K]=(0,x.useState)(),Z=void 0!==V,Y=Z?V:H;L[0]!==Z||L[1]!==G?(t=e=>{Z||W(e),G?.(e)},L[0]=Z,L[1]=G,L[2]=t):t=L[2];let J=t;L[3]!==J?(n=()=>({open:()=>J(!0)}),L[3]=J,L[4]=n):n=L[4],(0,x.useImperativeHandle)(I,n),L[5]!==D?(a=D.reduce(n$,{single:[],multiple:[]}),L[5]=D,L[6]=a):a=L[6];let X=a;L[7]!==X?(s=()=>X,L[7]=X,L[8]=s):s=L[8];let[ee,et]=(0,x.useState)(s);L[9]!==ee?.multiple||L[10]!==ee?.single?(r=e=>{et({single:ee?.single.map(t=>t.id===e.id?{...t,selected:!t.selected}:t.selected?{...t,selected:!1}:t)||[],multiple:ee?.multiple||[]})},L[9]=ee?.multiple,L[10]=ee?.single,L[11]=r):r=L[11];let en=r;L[12]!==ee?.multiple||L[13]!==ee?.single?(o=e=>{let t=ee?.multiple.map(t=>t.id===e.id?{...t,selected:!t.selected}:t)||[];et({single:ee?.single||[],multiple:t})},L[12]=ee?.multiple,L[13]=ee?.single,L[14]=o):o=L[14];let ei=o;L[15]!==ee?.multiple||L[16]!==P||L[17]!==X?.multiple?(d=P?X?.multiple.filter(nF).length:ee?.multiple.filter(nk).length||0,L[15]=ee?.multiple,L[16]=P,L[17]=X?.multiple,L[18]=d):d=L[18];let el=d;L[19]!==Q?.multiple?(c=Q?.multiple.filter(nO).length||0,L[19]=Q?.multiple,L[20]=c):c=L[20];let ea=c,es=el&&0!==ea?`${ea} commit${ea>1?"s":""} selected`:"Select commits";L[21]!==ee||L[22]!==O||L[23]!==J?(m=()=>{K(ee),J(!1),O&&O(ee?.multiple.filter(nA)||[])},L[21]=ee,L[22]=O,L[23]=J,L[24]=m):m=L[24];let er=m;L[25]!==F||L[26]!==X?(u=()=>{et(X),K(X),F?.()},L[25]=F,L[26]=X,L[27]=u):u=L[27];let eo=u;L[28]!==Y||L[29]!==J?(h=()=>J(!Y),L[28]=Y,L[29]=J,L[30]=h):h=L[30];let ed=$||es;L[31]!==k||L[32]!==h||L[33]!==ed?(f=(0,i.jsx)(ec.Q,{ref:z,onClick:h,...k,children:ed}),L[31]=k,L[32]=h,L[33]=ed,L[34]=f):f=L[34],L[35]!==ee?.single||L[36]!==Q?.multiple||L[37]!==X||L[38]!==J?(p=()=>{et({single:ee?.single||[],multiple:Q?.multiple||X.multiple}),J(!1)},L[35]=ee?.single,L[36]=Q?.multiple,L[37]=X,L[38]=J,L[39]=p):p=L[39],L[40]===Symbol.for("react.memo_cache_sentinel")?(g={focusOutBehavior:"wrap",focusableElementFilter:nP},L[40]=g):g=L[40],L[41]!==eo||L[42]!==J?(v=()=>{eo(),J(!1)},L[41]=eo,L[42]=J,L[43]=v):v=L[43],L[44]!==ee?.single||L[45]!==A||L[46]!==X?(_=A?X.single:ee?.single||[],L[44]=ee?.single,L[45]=A,L[46]=X,L[47]=_):_=L[47],L[48]!==en||L[49]!==A||L[50]!==J||L[51]!==U?(y=e=>{A?A(e):en(e),"modal"!==U&&J(!1)},L[48]=en,L[49]=A,L[50]=J,L[51]=U,L[52]=y):y=L[52],L[53]!==_||L[54]!==y?(w=(0,i.jsx)(nB,{selectionVariant:"single",items:_,onSelect:y,showGroupHeading:!1}),L[53]=_,L[54]=y,L[55]=w):w=L[55],L[56]!==ee?.multiple||L[57]!==P||L[58]!==X?(j=P?X.multiple:ee?.multiple||[],L[56]=ee?.multiple,L[57]=P,L[58]=X,L[59]=j):j=L[59];let em=P??ei;return L[60]!==j||L[61]!==em?(S=(0,i.jsx)(nB,{selectionVariant:"multiple",items:j,onSelect:em}),L[60]=j,L[61]=em,L[62]=S):S=L[62],L[63]!==w||L[64]!==S?(C=(0,i.jsx)("div",{className:"CommitSelector-module__CommitSelectorContainer__wyDem",children:(0,i.jsxs)(b.l,{role:"listbox",selectionVariant:"single","aria-label":"Selection",children:[w,S]})}),L[63]=w,L[64]=S,L[65]=C):C=L[65],L[66]!==eo||L[67]!==el||L[68]!==er||L[69]!==U?(N=el&&"modal"!==U?(0,i.jsx)(nI.G9,{footerButtons:[{content:"Apply",onClick:er,action:"save"},{content:"Clear",onClick:eo,action:"cancel"}]}):null,L[66]=eo,L[67]=el,L[68]=er,L[69]=U,L[70]=N):N=L[70],L[71]!==C||L[72]!==N?(R=(0,i.jsxs)("div",{className:"CommitSelector-module__CommitSelectorWrapper__Eddz8",children:[C,N]}),L[71]=C,L[72]=N,L[73]=R):R=L[73],L[74]!==M||L[75]!==Y||L[76]!==er||L[77]!==p||L[78]!==v||L[79]!==R||L[80]!==q||L[81]!==U?(T=(0,i.jsx)(nI.KA,{open:Y,anchorRef:z,headingId:"select-label",onClose:p,variant:U,focusZoneSettings:g,title:q,dialogProps:M,selectSave:er,selectCancel:v,children:R}),L[74]=M,L[75]=Y,L[76]=er,L[77]=p,L[78]=v,L[79]=R,L[80]=q,L[81]=U,L[82]=T):T=L[82],L[83]!==f||L[84]!==T?(E=(0,i.jsxs)(i.Fragment,{children:[f,T]}),L[83]=f,L[84]=T,L[85]=E):E=L[85],E}function nP(e){return"BUTTON"!==e.tagName}function nA(e){return e.selected}function nO(e){return e.selected}function nF(e){return e.selected}function nk(e){return e.selected}function n$(e,t){return"single"===t.selectionVariant?{...e,single:[...e.single,t]}:"multiple"===t.selectionVariant?{...e,multiple:[...e.multiple,t]}:e}function nB(e){let t,n=(0,l.c)(5),{items:a,onSelect:s,selectionVariant:r,showGroupHeading:o}=e,d=void 0===o||o;return n[0]!==a||n[1]!==s||n[2]!==r||n[3]!==d?(t=(0,i.jsx)(nI.LR,{selectionVariant:r,items:a,showGroupHeading:d,onSelect:s}),n[0]=a,n[1]=s,n[2]=r,n[3]=d,n[4]=t):t=n[4],t}function nq(e){let t,n,i=(0,l.c)(4),{baseOid:a,headOid:s}=(0,C.E4)(),{fullDiff:r}=(0,C.L3)(),{baseOid:o}=r;e:{if(!a){t=void 0;break e}if(a===o){t=e[0];break e}let n=e.findIndex(e=>e===a);if(n<0){t=void 0;break e}t=e[n+1]}let d=t;return i[0]!==s||i[1]!==d||i[2]!==a?(n=function({endOid:e,startOid:t,firstCommitInRange:n}){return n&&e&&n===e?`Commit ${e.slice(0,7)}`:t&&e?`${t.slice(0,7)}..${e.slice(0,7)}`:"All commits"}({endOid:s,startOid:a,firstCommitInRange:d}),i[0]=s,i[1]=d,i[2]=a,i[3]=n):n=i[3],n}nD.displayName="CommitSelector",nB.displayName="CommitSelectorBody";var nM=n(18292);function nV(e){let t,n,a,s,r,d,m,u,h,f,p,g,v,_,b,y,w,j=(0,l.c)(75),{ownerLogin:S,repositoryName:N,pullRequestNumber:R,commits:T,lastReviewOid:E,variant:L,open:I,onOpenChange:D}=e,A=void 0===L?"default":L,{baseOid:O,headOid:F}=(0,C.E4)(),k=(0,C.ww)(),{fullDiff:$}=(0,C.L3)(),{baseOid:B}=$;j[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.G7)("verbose_commit_selector_announcements"),j[0]=t):t=j[0];let q=t,M=(0,x.useRef)(null),[V,G]=(0,x.useState)(!1),U=void 0!==I,z=U?I:V;j[1]!==U||j[2]!==D?(n=e=>{U||G(e),D?.(e)},j[1]=U,j[2]=D,j[3]=n):n=j[3];let H=n;j[4]!==T?(a=T.map(nG),j[4]=T,j[5]=a):a=j[5];let W=a,Q=nq(W);e:{let e,t;if(!O||!F){s=void 0;break e}let n=O?W.indexOf(O)+1:-1;j[6]!==W||j[7]!==F?(e=F?W.indexOf(F):-1,j[6]=W,j[7]=F,j[8]=e):e=j[8];let i=e;if(n<0||i<0){s=void 0;break e}j[9]!==i||j[10]!==n?(t={start:n,end:i},j[9]=i,j[10]=n,j[11]=t):t=j[11],s=t}let K=s;j[12]!==K?(r=()=>K,j[12]=K,j[13]=r):r=j[13];let[Z,Y]=(0,x.useState)(r);t:{let e;if(!Z){let e;j[14]===Symbol.for("react.memo_cache_sentinel")?(e=new Set,j[14]=e):e=j[14],d=e;break t}j[15]!==W||j[16]!==Z.end||j[17]!==Z.start?(e=new Set(W.slice(Z.start,Z.end+1)),j[15]=W,j[16]=Z.end,j[17]=Z.start,j[18]=e):e=j[18],d=e}let J=d;if(j[19]!==W||j[20]!==T||j[21]!==F||j[22]!==k||j[23]!==E||j[24]!==J||j[25]!==O){let e,t,n;m=[];let i=`${T.length} commit${1!==T.length?"s":""}`,l=!k;j[27]!==l||j[28]!==i?(e={id:"all-commits",label:"All commits",description:i,descriptionVariant:"block",selectionVariant:"single",selected:l},j[27]=l,j[28]=i,j[29]=e):e=j[29],m.push(e);let a=T[T.length-1]?.oid,s=!1,r=!1;if(E)if(a)if(E===a)t="No new commits since last review",s=!0;else{let e=W.indexOf(E),n=e>=0?W.length-e-1:T.length;t=`${n} commit${1!==n?"s":""}`,r=O===E&&F===a}else t="No commits available",s=!0;else t="No previous review found",s=!0;for(let[e,i]of(j[30]!==r||j[31]!==t||j[32]!==s?(n={id:"changes-since-review",label:"Changes since your last review",description:t,descriptionVariant:"block",selectionVariant:"single",selected:r,disabled:s},j[30]=r,j[31]=t,j[32]=s,j[33]=n):n=j[33],m.push(n),T.entries()))m.push({id:i.oid,label:i.messageHeadline,description:`${i.actorLogin} committed ${(0,nL.V)(new Date(i.createdAt))}`,descriptionVariant:"block",selectionVariant:"multiple",selected:J.has(i.oid),groupId:1,groupTitle:0===e?"Select a range of commits":void 0,trailingVisual:i.shortOid});j[19]=W,j[20]=T,j[21]=F,j[22]=k,j[23]=E,j[24]=J,j[25]=O,j[26]=m}else m=j[26];let X=m;j[34]!==S||j[35]!==R||j[36]!==N?(u=e=>{let t;if("unfiltered"===e.type)t=(0,nE.tvs)({owner:S,repo:N,number:R});else if("range"===e.type){let n=e.fromPRBase?"BASE":e.baseOid;t=(0,nE.zLJ)({owner:S,repo:N,number:R,base:n,head:e.endOid})}else t=(0,nE.zLJ)({owner:S,repo:N,number:R,head:e.oid});window.location.href=t},j[34]=S,j[35]=R,j[36]=N,j[37]=u):u=j[37];let ee=u;j[38]!==B||j[39]!==T||j[40]!==E||j[41]!==ee?(h=e=>{if("all-commits"===e.id)ee({type:"unfiltered"});else if("changes-since-review"===e.id&&E){let e=T[T.length-1]?.oid;e&&ee({type:"range",fromPRBase:E===B,baseOid:E,endOid:e})}},j[38]=B,j[39]=T,j[40]=E,j[41]=ee,j[42]=h):h=j[42];let et=h;j[43]!==W||j[44]!==J||j[45]!==Z?(f=e=>{let t,n=W.indexOf(e.id),i=J.has(e.id)?"removed":"added";if(Z){if(Z.start!==Z.end||"removed"!==i){let{newStartIndex:e,newEndIndex:l}=function(e,t,n,i){let l,a;return"added"===i?(l=Math.min(e,t),a=Math.max(e,n)):e===t?(l=t+1,a=n):(l=t,a=e-1),{newStartIndex:l,newEndIndex:a}}(n,Z.start,Z.end,i);t={start:e,end:l}}}else t="added"===i?{start:n,end:n}:void 0;if(t){if(void 0!==t.start&&t.start===t.end){let e=t.start+1,n=W[t.start];if(n){let t=(0,nM.F)(n),i=q?`Commit ${t} selected`:`Commit ${e} selected`;(0,tv.i)(i)}}else if(void 0!==t.start&&void 0!==t.end){let e=t.start+1,n=t.end+1,i=W[t.start],l=W[t.end];if(i&&l){let t=(0,nM.F)(i),a=(0,nM.F)(l),s=q?`Commits ${t} to ${a} selected`:`Commits ${e} to ${n} selected`;(0,tv.i)(s)}}}else(0,tv.i)("No commits selected");Y(t)},j[43]=W,j[44]=J,j[45]=Z,j[46]=f):f=j[46];let en=f;j[47]!==B||j[48]!==W||j[49]!==K?.end||j[50]!==K?.start||j[51]!==ee||j[52]!==Z?(p=()=>{let e,t;Z&&(Z.start!==K?.start||Z.end!==K?.end)&&((Z.start>0||Z.end0?W[Z.start-1]:B,t=W[Z.end]),e&&t?Z.start===Z.end?ee({type:"single",oid:t}):ee({type:"range",fromPRBase:e===B,baseOid:e,endOid:t}):ee({type:"unfiltered"}))},j[47]=B,j[48]=W,j[49]=K?.end,j[50]=K?.start,j[51]=ee,j[52]=Z,j[53]=p):p=j[53],K?.start,K?.end;let ei=p;j[54]!==K?(g=()=>{Y(K)},j[54]=K,j[55]=g):g=j[55];let el=g;j[56]!==H?(v=(0,i.jsx)(c.ak,{commands:{"pull-request-files-changed:open-commits-list":()=>{H(!0)}}}),j[56]=H,j[57]=v):v=j[57];let ea="condensed"===A?void 0:P.VersionsIcon,es="condensed"===A?"invisible":"default";return j[58]!==ea||j[59]!==es?(_={id:"changes-selector-button",size:"small",leadingVisual:ea,variant:es,trailingAction:P.TriangleDownIcon},j[58]=ea,j[59]=es,j[60]=_):_=j[60],j[61]===Symbol.for("react.memo_cache_sentinel")?(b={height:"large"},j[61]=b):b=j[61],j[62]!==Q||j[63]!==X||j[64]!==z||j[65]!==ei||j[66]!==el||j[67]!==en||j[68]!==et||j[69]!==H||j[70]!==_?(y=(0,i.jsx)(nD,{buttonProps:_,anchorLabel:Q,ref:M,dialogProps:b,items:X,onSingleSelect:et,onMultiSelect:en,onApply:ei,onCancel:el,variant:"modal",title:"Select commits to view",open:z,onOpenChange:H}),j[62]=Q,j[63]=X,j[64]=z,j[65]=ei,j[66]=el,j[67]=en,j[68]=et,j[69]=H,j[70]=_,j[71]=y):y=j[71],j[72]!==v||j[73]!==y?(w=(0,i.jsxs)(i.Fragment,{children:[v,y]}),j[72]=v,j[73]=y,j[74]=w):w=j[74],w}function nG(e){return e.oid}nV.displayName="ChangesSelector";var nU=n(42254),nz=n(62528),nH=n(28569);let nW="PullRequestFilesToolbar-module__is-stuck__jSrl_",nQ="PullRequestFilesToolbar-module__show-when-stuck__UjE3N",nK="PullRequestFilesToolbar-module__pr-title-details__a8FVw",nZ="PullRequestFilesToolbar-module__hide-commit-selector-on-small__yRsK0",nY="PullRequestFilesToolbar-module__hide-commit-selector-on-medium__hEZGv",nJ="PullRequestFilesToolbar-module__container-show-on-sm__SErSP",nX="PullRequestFilesToolbar-module__file-controls__Tgb8F",n0="PullRequestFilesToolbar-module__file-controls-navigation__oXmoY",n1="PullRequestFilesToolbar-module__file-controls-divider__zkpAr",n2="PullRequestFilesToolbar-module__stickyHeaderActivationThreshold__nWqbQ";var n3=n(80645),n4=n(23707),n5=n(41893),n6=n(78725),n7=n(47819),n8=n(27426);function n9(){let e,t,n,i=(0,l.c)(9),a=(0,C.yg)(),s=(0,C.qX)(),r=ie;i[0]!==a||i[1]!==s?(e=()=>{if(a.length>0){let e,t=s(),n=t?a.indexOf(t):-1;e=n<=0?a.length-1:n-1;let i=a[e];i&&r(i)}},i[0]=a,i[1]=s,i[2]=e):e=i[2];let o=e;i[3]!==a||i[4]!==s?(t=()=>{if(a.length>0){let e,t=s(),n=t?a.indexOf(t):-1;e=n>=a.length-1||n<0?0:n+1;let i=a[e];i&&r(i)}},i[3]=a,i[4]=s,i[5]=t):t=i[5];let d=t;return i[6]!==d||i[7]!==o?(n={navigateToPrevious:o,navigateToNext:d},i[6]=d,i[7]=o,i[8]=n):n=i[8],n}function ie(e){(0,n8.pk)(`diff-${e}`),(0,j.kd)(window.location.href)}var it=n(83369),ii=n(35981);let il=n(28553).q.SingleFileMode;function ia(e){let t,n,a,s,r,o,d,c,m=(0,l.c)(12),{userNotices:u}=e,h=(0,ii.Bk)(il,u),f=(0,C.j5)(),[p,v]=(0,x.useState)(!0),{dismissNotice:_}=(0,ii.Wo)(il,u);m[0]!==_?(t=()=>{_(),v(!1)},m[0]=_,m[1]=t):t=m[1];let b=t;return!f||h?null:(m[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.$)("d-flex flex-column gap-2","SingleFileModeOnboardingPopover-module__PopoverContent__v5Jvf"),a=(0,i.jsx)(et.A,{as:"h3",variant:"small",className:"SingleFileModeOnboardingPopover-module__Heading__hX_8K",children:"You're in single-file mode"}),s=(0,i.jsx)("p",{children:"Due to the large number of changes in this pull request, only one file is being shown at a time."}),m[2]=n,m[3]=a,m[4]=s):(n=m[2],a=m[3],s=m[4]),m[5]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)("strong",{children:"Previous"}),m[5]=r):r=m[5],m[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,i.jsxs)("p",{children:["Use the ",r," and ",(0,i.jsx)("strong",{children:"Next"})," buttons to move between files."]}),m[6]=o):o=m[6],m[7]!==b?(d=(0,i.jsxs)(it.A.Content,{className:n,children:[a,s,o,(0,i.jsx)("div",{className:"d-flex flex-items-center",children:(0,i.jsx)(ec.Q,{onClick:b,children:"OK, got it"})})]}),m[7]=b,m[8]=d):d=m[8],m[9]!==p||m[10]!==d?(c=(0,i.jsx)(it.A,{className:"SingleFileModeOnboardingPopover-module__PopoverContainer__ojLxg",open:p,children:d}),m[9]=p,m[10]=d,m[11]=c):c=m[11],c)}ia.displayName="SingleFileModeOnboardingPopover";var is=n(39423);function ir(e){let t,n,a,s,r,o=(0,l.c)(12),{userNotices:d}=e,c=(0,is.zw)(),{navigateToPrevious:m,navigateToNext:u}=n9();return o[0]!==m?(t=(0,i.jsx)(ea.K,{icon:P.ChevronUpIcon,"aria-label":c?"Previous file (K)":"Previous file",size:"small",onClick:m,"data-hotkey":"k"}),o[0]=m,o[1]=t):t=o[1],o[2]!==u?(n=(0,i.jsx)(ea.K,{icon:P.ChevronDownIcon,"aria-label":c?"Next file (J)":"Next file",size:"small",onClick:u,"data-hotkey":"j"}),o[2]=u,o[3]=n):n=o[3],o[4]!==t||o[5]!==n?(a=(0,i.jsxs)(n7.A,{children:[t,n]}),o[4]=t,o[5]=n,o[6]=a):a=o[6],o[7]!==d?(s=(0,i.jsx)(ia,{userNotices:d}),o[7]=d,o[8]=s):s=o[8],o[9]!==a||o[10]!==s?(r=(0,i.jsxs)("div",{className:"position-relative",children:[a,s]}),o[9]=a,o[10]=s,o[11]=r):r=o[11],r}ir.displayName="ReviewNavigationButtonGroup";let io=(0,x.lazy)(async()=>({default:(await Promise.all([n.e("59299"),n.e("83465"),n.e("72608"),n.e("75271"),n.e("30718"),n.e("41710"),n.e("50304"),n.e("17363"),n.e("9292"),n.e("74703"),n.e("5401"),n.e("97290"),n.e("88164"),n.e("2914"),n.e("87953"),n.e("74119"),n.e("96305"),n.e("46009"),n.e("35658"),n.e("47051")]).then(n.bind(n,55998))).PullRequestsSidePanel}));function id(e){let t,n,a=(0,l.c)(4),{repository:s,pullRequestNumber:r}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)("div",{className:"d-flex flex-justify-center flex-items-center tmp-p-4",children:(0,i.jsx)(en.A,{size:"medium"})}),a[0]=t):t=a[0],a[1]!==r||a[2]!==s?(n=(0,i.jsx)(x.Suspense,{fallback:t,children:(0,i.jsx)(io,{repository:s,pullRequestNumber:r})}),a[1]=r,a[2]=s,a[3]=n):n=a[3],n}io.displayName="PullRequestsSidePanel",id.displayName="AgentSessionsPanelBody";let ic=(0,x.memo)(function(e){let t,n,a,s,r,d,c,m=(0,l.c)(24),{isOpen:h,repository:f,pullRequestNumber:p,onClose:g}=e;m[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.G7)("prs_docked_side_panel"),m[0]=t):t=m[0];let v=t,_=(0,tE.Yf)(tE.r0.AgentSessions),b=(0,tE.JE)(),{closePanel:y}=(0,tE.LI)(),{returnFocusRef:w}=(0,tE.cM)(),j=(0,x.useRef)(null);m[1]!==y||m[2]!==g?(n=()=>{y(),g?.()},m[1]=y,m[2]=g,m[3]=n):n=m[3];let S=n;if(m[4]!==b||m[5]!==_||m[6]!==h||m[7]!==p||m[8]!==f){a=Symbol.for("react.early_return_sentinel");e:{let e=_?k.XC?.getElementById(tD.I):null;if(!h){a=null;break e}if(v&&e&&!b){let t;m[10]!==p||m[11]!==f?(t=(0,i.jsx)(tP.Z,{panelName:tE.r0.AgentSessions,children:(0,i.jsx)(tP.Z.Body,{className:"p-0",children:(0,i.jsx)(tP.Z.ViewportFill,{children:(0,i.jsx)(id,{repository:f,pullRequestNumber:p})})})}),m[10]=p,m[11]=f,m[12]=t):t=m[12],a=(0,tL.createPortal)(t,e);break e}}m[4]=b,m[5]=_,m[6]=h,m[7]=p,m[8]=f,m[9]=a}else a=m[9];return a!==Symbol.for("react.early_return_sentinel")?a:(m[13]===Symbol.for("react.memo_cache_sentinel")?(s={narrow:"fullscreen",regular:"right",wide:"right"},m[13]=s):s=m[13],m[14]!==S?(r=e=>{let{dialogLabelId:t}=e;return(0,i.jsx)(u.l.Header,{children:(0,i.jsxs)("div",{className:"d-flex flex-row flex-justify-between flex-items-center width-full pl-2",children:[(0,i.jsx)(u.l.Title,{id:t,children:tP.s[tE.r0.AgentSessions]}),(0,i.jsx)(ea.K,{ref:j,"aria-label":"Close agent sessions panel",icon:P.XIcon,variant:"invisible",onClick:S})]})})},m[14]=S,m[15]=r):r=m[15],m[16]!==p||m[17]!==f?(d=(0,i.jsx)(tP.Z.DialogFill,{children:(0,i.jsx)(id,{repository:f,pullRequestNumber:p})}),m[16]=p,m[17]=f,m[18]=d):d=m[18],m[19]!==S||m[20]!==w||m[21]!==r||m[22]!==d?(c=(0,i.jsx)(u.l,{initialFocusRef:j,position:s,returnFocusRef:w,onClose:S,height:"large",renderBody:im,renderHeader:r,children:d}),m[19]=S,m[20]=w,m[21]=r,m[22]=d,m[23]=c):c=m[23],c)});function im(e){let{children:t}=e;return(0,i.jsx)(u.l.Body,{className:"p-0",children:t})}ic.displayName="AgentSessionsSidePanel";let iu={"show-commit-selector-on-small":"ToolbarMoreMenu-module__show-commit-selector-on-small__m_TbM","show-commit-selector-on-medium":"ToolbarMoreMenu-module__show-commit-selector-on-medium__U6fKz"};function ih(e){let t,n,a,s,r,c,m,u,h,f,p,g,v,_,y,w,j,S,N,R,T,E,L,I,D,A,O=(0,l.c)(70),{pageLimits:F,pullRequest:k,aliveChannels:$,hideWhitespace:B,onUpdateWhitespace:q,additionalPreferences:M,showCommitSelector:V,commits:G,isFileTreeExpanded:U,repository:z,pullRequestNumber:H}=e,W=void 0===U||U,Q=(0,d.u)("prx_robust_small_screen_support");O[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.G7)("coding_agent_logs_in_pr"),O[0]=t):t=O[0];let K=t;O[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.G7)("prs_docked_side_panel"),O[1]=n):n=O[1];let Z=n,{togglePanel:Y}=(0,tE.LI)();O[2]!==G?(a=G.map(ip),O[2]=G,O[3]=a):a=O[3];let J=nq(a),[X,ee]=(0,x.useState)(!1),[et,en]=(0,x.useState)(!1),[el,es]=(0,x.useState)(!1),[er,eo]=(0,x.useState)(!1),[ed,ec]=(0,x.useState)(!1),em=(0,x.useRef)(null),eu=(0,C.wI)(),eh=(0,C.SH)(),{sendPullRequestAnalyticsEvent:ef}=(0,ei.q)(),ep=eu.length;O[4]!==ef?(s=()=>{ef("comments_side_panel.open","COMMENTS_SIDE_PANEL_BUTTON"),eU(),ee(!0),eo(!1)},O[4]=ef,O[5]=s):s=O[5];let eg=s;O[6]!==ef||O[7]!==Y?(r=()=>{ef("agent_sessions_side_panel.open","AGENT_SESSIONS_MENU_ITEM"),eU(),Z?Y("agentSessions",em.current):es(!0),eo(!1)},O[6]=ef,O[7]=Y,O[8]=r):r=O[8];let ex=r;O[9]!==ef?(c=()=>{ef("alerts_side_panel.open","ALERTS_SIDE_PANEL_BUTTON"),eU(),en(!0),eo(!1)},O[9]=ef,O[10]=c):c=O[10];let ev=c;return O[11]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsx)(eW.W.Anchor,{children:(0,i.jsx)(ea.K,{ref:em,icon:P.KebabHorizontalIcon,variant:"default",size:"small","aria-label":"More options"})}),O[11]=m):m=O[11],O[12]!==ex?(u=K&&(0,i.jsxs)(b.l.Item,{onSelect:ex,children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.AgentIcon,{})}),"Agent sessions"]}),O[12]=ex,O[13]=u):u=O[13],O[14]===Symbol.for("react.memo_cache_sentinel")?(h=(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.CommentDiscussionIcon,{})}),O[14]=h):h=O[14],O[15]!==eh?(f=eh>0&&(0,i.jsx)(b.l.TrailingVisual,{children:eh}),O[15]=eh,O[16]=f):f=O[16],O[17]!==eg||O[18]!==f?(p=(0,i.jsxs)(b.l.Item,{onSelect:eg,children:[h,"Comments",f]}),O[17]=eg,O[18]=f,O[19]=p):p=O[19],O[20]!==ev||O[21]!==ep?(g=ep>0&&(0,i.jsxs)(b.l.Item,{onSelect:ev,children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.AlertIcon,{})}),"Alerts",(0,i.jsx)(b.l.TrailingVisual,{children:ep})]}),O[20]=ev,O[21]=ep,O[22]=g):g=O[22],O[23]!==J||O[24]!==W||O[25]!==Q||O[26]!==V?(v=Q?(0,i.jsxs)(b.l.Item,{onSelect:()=>V(),className:iu[`show-commit-selector-on-${W?"small":"medium"}`],children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.VersionsIcon,{})}),J]}):null,O[23]=J,O[24]=W,O[25]=Q,O[26]=V,O[27]=v):v=O[27],O[28]!==p||O[29]!==g||O[30]!==v||O[31]!==u?(_=(0,i.jsxs)(b.l.Group,{children:[u,p,g,v]}),O[28]=p,O[29]=g,O[30]=v,O[31]=u,O[32]=_):_=O[32],O[33]===Symbol.for("react.memo_cache_sentinel")?(y=(0,i.jsx)(b.l.Divider,{}),O[33]=y):y=O[33],O[34]===Symbol.for("react.memo_cache_sentinel")?(w=(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.GearIcon,{})}),O[34]=w):w=O[34],O[35]===Symbol.for("react.memo_cache_sentinel")?(j=(0,i.jsx)(eW.W.Anchor,{children:(0,i.jsxs)(b.l.Item,{children:[w,"Settings",(0,i.jsx)(b.l.TrailingVisual,{children:(0,i.jsx)(P.ChevronRightIcon,{})})]})}),O[35]=j):j=O[35],O[36]!==M||O[37]!==B||O[38]!==q?(S=(0,i.jsx)(eW.W.Overlay,{side:"outside-bottom",align:"end",children:(0,i.jsx)(b.l,{children:(0,i.jsx)(nS.Q,{reloadOnWhitespaceChange:!0,onUpdateWhitespace:q,defaultHideWhitespace:B,additionalPreferences:M})})}),O[36]=M,O[37]=B,O[38]=q,O[39]=S):S=O[39],O[40]!==ed||O[41]!==S?(N=(0,i.jsx)(b.l.Group,{children:(0,i.jsxs)(eW.W,{open:ed,onOpenChange:ec,children:[j,S]})}),O[40]=ed,O[41]=S,O[42]=N):N=O[42],O[43]!==_||O[44]!==N?(R=(0,i.jsx)(eW.W.Overlay,{align:"end",children:(0,i.jsxs)(b.l,{children:[_,y,N]})}),O[43]=_,O[44]=N,O[45]=R):R=O[45],O[46]!==er||O[47]!==R?(T=(0,i.jsxs)(eW.W,{open:er,onOpenChange:eo,children:[m,R]}),O[46]=er,O[47]=R,O[48]=T):T=O[48],O[49]===Symbol.for("react.memo_cache_sentinel")?(E=()=>ee(!1),O[49]=E):E=O[49],O[50]!==$||O[51]!==X||O[52]!==F||O[53]!==k.author.login||O[54]!==k.pathName?(L=(0,i.jsx)(tz,{isOpen:X,pageLimits:F,pathName:k.pathName,pullRequestAuthorLogin:k.author.login,aliveChannels:$,toggleSidesheetRef:em,onClose:E}),O[50]=$,O[51]=X,O[52]=F,O[53]=k.author.login,O[54]=k.pathName,O[55]=L):L=O[55],O[56]!==et||O[57]!==eu||O[58]!==F||O[59]!==ep?(I=ep>0&&(0,i.jsx)(t0,{annotations:eu,isOpen:et,pageLimits:F,returnFocusRef:em,onClose:()=>en(!1)}),O[56]=et,O[57]=eu,O[58]=F,O[59]=ep,O[60]=I):I=O[60],O[61]!==el||O[62]!==H||O[63]!==z?(D=K&&!Z&&(0,i.jsx)(ic,{isOpen:el,repository:z,pullRequestNumber:H,onClose:()=>es(!1)}),O[61]=el,O[62]=H,O[63]=z,O[64]=D):D=O[64],O[65]!==T||O[66]!==L||O[67]!==I||O[68]!==D?(A=(0,i.jsxs)(i.Fragment,{children:[T,L,I,D]}),O[65]=T,O[66]=L,O[67]=I,O[68]=D,O[69]=A):A=O[69],A}function ip(e){return e.oid}function ig(e){let t,n,a,s,r=(0,l.c)(9),{changeGroupsPreferenceAvailable:o,showChangeGroups:d,onShowChangeGroupsChange:c}=e,{sendPullRequestAnalyticsEvent:m}=(0,ei.q)();if(!o)return;r[0]!==c||r[1]!==m||r[2]!==d?(t=()=>{let e=!d;m(e?"change_group_preference.show":"change_group_preference.hide","CHANGE_GROUP_PREFERENCE_TOGGLE"),c(e)},r[0]=c,r[1]=m,r[2]=d,r[3]=t):t=r[3];let u=t;return r[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(b.l.Divider,{}),r[4]=n):n=r[4],r[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)(b.l.Description,{variant:"block",children:"Organize changes into groups with Copilot"}),r[5]=a):a=r[5],r[6]!==u||r[7]!==d?(s=(0,i.jsxs)(i.Fragment,{children:[n,(0,i.jsx)(b.l.Group,{"aria-label":"Change Groups",selectionVariant:"single",children:(0,i.jsxs)(b.l.Item,{selected:d,onSelect:u,children:["Show changes by group",a]})})]}),r[6]=u,r[7]=d,r[8]=s):s=r[8],s}ih.displayName="ToolbarMoreMenu",ig.displayName="ChangeGroupsPreferences";var ix=n(70985),iv=n(54783),i_=n(99131),ib=n(26815),iy=n(65222);function iw(e){let t,n,a,s,r,d=(0,l.c)(14),{repository:c,pullRequestNumber:m}=e,u=(0,o.G7)("coding_agent_logs_in_pr"),h=(0,o.G7)("prs_docked_side_panel"),f=(0,tE.Yf)(tE.r0.AgentSessions),p=(0,x.useRef)(null),g=(0,tE.LI)(),{sendPullRequestAnalyticsEvent:v}=(0,ei.q)();if(!u||!h)return null;let _=f?"Close agent sessions":"Open agent sessions";return d[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(ea.K,{inactive:!0,"aria-label":"The agent sessions panel cannot currently be opened.",icon:P.AgentIcon,size:"small",variant:"invisible"}),d[0]=t):t=d[0],d[1]!==g||d[2]!==v?(n=()=>{v("agent_sessions_side_panel.open","AGENT_SESSIONS_SIDE_PANEL_BUTTON"),g.togglePanel("agentSessions",p.current)},d[1]=g,d[2]=v,d[3]=n):n=d[3],d[4]!==_||d[5]!==n?(a=(0,i.jsx)(ea.K,{ref:p,"aria-label":_,icon:P.AgentIcon,size:"small",variant:"invisible",onClick:n}),d[4]=_,d[5]=n,d[6]=a):a=d[6],d[7]!==f||d[8]!==m||d[9]!==c?(s=(0,i.jsx)(ic,{isOpen:f,repository:c,pullRequestNumber:m}),d[7]=f,d[8]=m,d[9]=c,d[10]=s):s=d[10],d[11]!==a||d[12]!==s?(r=(0,i.jsx)("div",{className:"d-flex flex-items-center",children:(0,i.jsxs)(ee.t,{boundaryName:"OpenAgentsSidePanelButton",fallback:t,children:[a,s]})}),d[11]=a,d[12]=s,d[13]=r):r=d[13],r}iw.displayName="OpenAgentsPanelButton";var ij=n(72489);function iS(e){let t,n,a=(0,l.c)(6),{bodyHtml:s,isLoading:r}=e;a[0]!==s?(t=s.includes("No description provided."),a[0]=s,a[1]=t):t=a[1];let o=t;return a[2]!==s||a[3]!==o||a[4]!==r?(n=r?(0,i.jsx)("div",{className:"d-flex flex-justify-center",children:(0,i.jsx)(en.A,{})}):(0,i.jsx)(ij.A,{verifiedHTML:s,className:o?"fgColor-muted":void 0}),a[2]=s,a[3]=o,a[4]=r,a[5]=n):n=a[5],n}function iC(e){let t,n,a,s,r=(0,l.c)(14),{bodyHtml:d,isLoading:c,isOpen:m,onClose:h,toggleSidesheetRef:f}=e,p=(0,o.G7)("prs_docked_side_panel"),g=(0,tE.Yf)(tE.r0.Overview)?k.XC?.getElementById(tD.I):null,v=(0,x.useRef)(null),_=(0,tE.JE)();if(!m)return null;if(p&&g&&!_){let e;return r[0]!==d||r[1]!==c?(e=(0,i.jsx)(tP.Z,{panelName:tE.r0.Overview,children:(0,i.jsx)(tP.Z.Body,{children:(0,i.jsx)(iS,{bodyHtml:d,isLoading:c})})}),r[0]=d,r[1]=c,r[2]=e):e=r[2],(0,tL.createPortal)(e,g)}return r[3]===Symbol.for("react.memo_cache_sentinel")?(t={narrow:"fullscreen",regular:"right",wide:"right"},r[3]=t):t=r[3],r[4]!==h?(n=e=>{let{dialogLabelId:t}=e;return(0,i.jsx)(u.l.Header,{children:(0,i.jsxs)("div",{className:"d-flex flex-row flex-justify-between flex-items-center width-full pl-2",children:[(0,i.jsx)(u.l.Title,{id:t,children:"Overview"}),(0,i.jsx)(ea.K,{ref:v,"aria-label":"Close overview panel",icon:P.XIcon,variant:"invisible",onClick:h})]})})},r[4]=h,r[5]=n):n=r[5],r[6]!==d||r[7]!==c?(a=(0,i.jsx)(iS,{bodyHtml:d,isLoading:c}),r[6]=d,r[7]=c,r[8]=a):a=r[8],r[9]!==h||r[10]!==n||r[11]!==a||r[12]!==f?(s=(0,i.jsx)(u.l,{initialFocusRef:v,position:t,returnFocusRef:f,onClose:h,renderHeader:n,children:a}),r[9]=h,r[10]=n,r[11]=a,r[12]=f,r[13]=s):s=r[13],s}function iN(){let e,t=(0,l.c)(2),n=(0,ep.e)(ef.uT.description);return t[0]!==n?(e={queryKey:[ef.uT.description,n],queryFn:async()=>{let e=await (0,eS.QJ)(n);if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()},staleTime:1/0},t[0]=n,t[1]=e):e=t[1],(0,ej.I)(e)}function iR(e){let t,n,a,s,r,d,c,m=(0,l.c)(19),{aliveChannel:u}=e;m[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.G7)("prs_docked_side_panel"),m[0]=t):t=m[0];let h=t,f=(0,tE.Yf)(tE.r0.Overview),p=(0,tE.LI)(),[g,v]=(0,x.useState)(!1),_=(0,x.useRef)(null),{sendPullRequestAnalyticsEvent:b}=(0,ei.q)(),y=h&&f?"Close overview panel":"Open overview panel",{data:w,isLoading:j}=iN();!function(e){let t,n=(0,l.c)(1),{refetch:i}=iN();n[0]===Symbol.for("react.memo_cache_sentinel")?(t={body_updated:!0},n[0]=t):t=n[0],(0,nC.og)(e,i,t)}(u);let S=w?.bodyHtml||'

No description provided.

';m[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(ea.K,{inactive:!0,"aria-label":"The overview panel cannot currently be opened.",icon:P.InfoIcon,size:"small",variant:"invisible"}),m[1]=n):n=m[1];let C=g||f;m[2]!==p||m[3]!==b?(a=()=>{b("overview_side_panel.open","OVERVIEW_SIDE_PANEL_BUTTON"),h?p.togglePanel("overview",_.current):(eU(),v(!0))},m[2]=p,m[3]=b,m[4]=a):a=m[4],m[5]!==y||m[6]!==C||m[7]!==a?(s=(0,i.jsx)(ea.K,{ref:_,"aria-label":y,"aria-expanded":C,icon:P.InfoIcon,size:"small",variant:"invisible",onClick:a}),m[5]=y,m[6]=C,m[7]=a,m[8]=s):s=m[8];let N=g||f;return m[9]!==p?(r=()=>{h?p.closePanel():v(!1)},m[9]=p,m[10]=r):r=m[10],m[11]!==S||m[12]!==j||m[13]!==N||m[14]!==r?(d=(0,i.jsx)(iC,{bodyHtml:S,isLoading:j,isOpen:N,toggleSidesheetRef:_,onClose:r}),m[11]=S,m[12]=j,m[13]=N,m[14]=r,m[15]=d):d=m[15],m[16]!==s||m[17]!==d?(c=(0,i.jsx)("div",{className:"d-flex flex-items-center",children:(0,i.jsxs)(ee.t,{boundaryName:"OpenOverviewPanelButton",fallback:n,children:[s,d]})}),m[16]=s,m[17]=d,m[18]=c):c=m[18],c}iS.displayName="OverviewPanelBody",iC.displayName="OverviewSidePanel",iR.displayName="OpenOverviewPanelButton";var iT=n(31409);function iE(e){let t,n,a,s,r,o,d=(0,l.c)(15);d[0]!==e?({repository:a,pullRequest:t,userNotices:s,...n}=e,d[0]=e,d[1]=t,d[2]=n,d[3]=a,d[4]=s):(t=d[1],n=d[2],a=d[3],s=d[4]);let{data:c}=(0,n4.W)(),{pullRequest:m,aliveChannels:u,mergeStatusButtonData:h}=c;(0,n5.F)(u),d[5]!==t||d[6]!==m?(r={...t,...m},d[5]=t,d[6]=m,d[7]=r):r=d[7];let f=r;return d[8]!==u||d[9]!==h||d[10]!==n||d[11]!==a||d[12]!==f||d[13]!==s?(o=(0,i.jsx)(iL,{repository:a,pullRequest:f,aliveChannels:u,mergeStatusButtonData:h,userNotices:s,...n}),d[8]=u,d[9]=h,d[10]=n,d[11]=a,d[12]=f,d[13]=s,d[14]=o):o=d[14],o}function iL(e){let t,n,a,s,r,c,m,u,h,f,p,v,_,b,w,j,S,N,R,T,E,L,I,D,P,O,F,k,$,B,q,M,V,G,U,z,H,W,Q,K,Z,Y,J,X,ee,et,en,ei,el,ea,es,er,eo,ed,em,eu,eh,ep,ev,e_=(0,l.c)(204),{changeGroupsPreferenceAvailable:eb,commits:ey,currentUserLogin:ew,isFileTreeExpanded:ej,lastReviewOid:eS,mergeStatusButtonData:eC,pageLimits:eN,pullRequest:eR,aliveChannels:eT,repository:eE,shouldShowViewedFilesCount:eL,totalFilesCount:eI,treeToggleElement:eD,userNotices:eP}=e,eA=(0,d.u)("batch_suggested_changes"),eO=(0,d.u)("prx_robust_small_screen_support"),{mutate:eF}=function(){let e,t,n,i=(0,l.c)(7),a=(0,C.Kp)(),{updateWhitespace:s}=(0,C.yo)();return i[0]!==a?(e=async e=>{let{hideWhitespace:t}=e,n=`${a}/page_data/${ef.uT.updateWhitespacePreference}`,i=await (0,ex.q$)(n,{method:"POST",body:{w:+!!t}}),l=await (0,ex.hp)(i);return(0,ex.R)(i,l),l},i[0]=a,i[1]=e):e=i[1],i[2]!==s?(t=e=>{s(e.ignoreWhitespace)},i[2]=s,i[3]=t):t=i[3],i[4]!==e||i[5]!==t?(n={mutationFn:e,onSuccess:t},i[4]=e,i[5]=t,i[6]=n):n=i[6],(0,eg.n)(n)}(),{clearSuggestionBatch:ek,removeSuggestionFromBatch:e$}=(0,C.xJ)(),{mutate:eB}=(0,iv.r)(eR.pathName,eR.comparison.headOid),{mutate:eq}=(0,i_.V)(eR.pathName,eR.comparison.headOid),{mutate:eM}=function(){let e,t,n,i=(0,l.c)(8),a=(0,C.Kp)(),{updateChangeGroupPreference:s}=(0,C.wL)(),{updateDiffFilter:r}=(0,C.or)();return i[0]!==a?(e=async e=>{let{showChangeGroups:t}=e,n=`${a}/page_data/${ef.uT.updateShowChangeGroupsPreference}`,i=await (0,ex.q$)(n,{method:"POST",headers:{"Content-Type":"application/json"},body:{show_change_groups:t?"true":"false"}}),l=await (0,ex.hp)(i);return(0,ex.R)(i,l),l},i[0]=a,i[1]=e):e=i[1],i[2]!==s||i[3]!==r?(t=e=>{let{showChangeGroups:t}=e;s(t),t||r({activeChangeGroupId:void 0})},i[2]=s,i[3]=r,i[4]=t):t=i[4],i[5]!==e||i[6]!==t?(n={mutationFn:e,onMutate:t},i[5]=e,i[6]=t,i[7]=n):n=i[7],(0,eg.n)(n)}(),eV=(0,C.WA)(),{hideWhitespace:eU,fullDiff:ez}=(0,C.L3)(),[eH,eW]=(0,x.useState)(!1),eQ=eL||!ej,[eK,eZ]=(0,x.useState)(!1),eY=(0,C.j5)(),eJ=(0,C.RH)(),eX=(0,C.WK)(),e0=(0,C.qL)(),[e1,e2]=(0,x.useState)(!1),e3=(0,C.Kp)(),e4=(0,C.L3)(),[e5,e6]=(0,x.useState)(!1),e7=(0,ib.F)(e0,eX.activeBatch),e8=e7.length;e_[0]!==eF?(t=e=>{eF({hideWhitespace:e})},e_[0]=eF,e_[1]=t):t=e_[1];let e9=t;e_[2]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{e[0]&&eW(!e[0].isIntersecting)},e_[2]=n):n=e_[2];let te=(0,nz.B)(n);e_[3]!==e4.fullDiff.headOid||e_[4]!==e3||e_[5]!==e$||e_[6]!==eX.activeBatch?(a=e=>{e$(e),(0,iy.CE)(e3,e4.fullDiff.headOid,eX.activeBatch.filter(t=>t.commentDatabaseId!==e.commentDatabaseId||t.suggestionIndex!==e.suggestionIndex))},e_[3]=e4.fullDiff.headOid,e_[4]=e3,e_[5]=e$,e_[6]=eX.activeBatch,e_[7]=a):a=e_[7];let tt=a;e_[8]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{e2(!0)},e_[8]=s):s=e_[8];let tn=s;e_[9]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{e2(!1)},e_[9]=r):r=e_[9];let ti=r;e_[10]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{eZ(!0)},e_[10]=c):c=e_[10];let tl=c;e_[11]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{eZ(!1)},e_[11]=m):m=e_[11];let ta=m;e_[12]!==ek||e_[13]!==e4.fullDiff.headOid||e_[14]!==ti||e_[15]!==e3?(u=()=>{ek(),(0,iy.hW)(e3,e4.fullDiff.headOid),ti(),eZ(!1)},e_[12]=ek,e_[13]=e4.fullDiff.headOid,e_[14]=ti,e_[15]=e3,e_[16]=u):u=e_[16];let ts=u;e_[17]!==eB||e_[18]!==eq||e_[19]!==ez||e_[20]!==ti?(h=(e,t,n)=>{let i=(0,o.G7)("copilot_code_review_batch_apply_suggestions"),l={onSuccess:()=>{ti(),n()},onError:e=>{t(e)}};i?eq({message:e},l):eB({message:e,currentOid:ez.headOid},l)},e_[17]=eB,e_[18]=eq,e_[19]=ez,e_[20]=ti,e_[21]=h):h=e_[21];let tr=h;e_[22]!==eM?(f=e=>{eM({showChangeGroups:e})},e_[22]=eM,e_[23]=f):f=e_[23];let to=f,td=e7.map(iI),tc=(0,tE.Yf)();e_[24]===Symbol.for("react.memo_cache_sentinel")?(p=(0,o.G7)("prs_docked_side_panel"),e_[24]=p):p=e_[24];let tm=p,tu=(0,iT.q)(eR.state,eC),th=(0,tE.LI)(),tf=(0,x.useRef)(null);e_[25]!==th?(v=()=>{th.togglePanel("mergeStatus",tf.current)},e_[25]=th,e_[26]=v):v=e_[26];let tp=v;e_[27]===Symbol.for("react.memo_cache_sentinel")?(_=(0,o.G7)("coding_agent_logs_in_pr"),e_[27]=_):_=e_[27];let tg=_&&tm;e_[28]!==te?(b=(0,i.jsx)("div",{ref:te,className:n2}),e_[28]=te,e_[29]=b):b=e_[29];let tx=eH&&nW;e_[30]!==tx?(w=(0,g.$)(nU.A.stickyHeader,"PullRequestFilesToolbar-module__toolbar__ztHN6",tx),e_[30]=tx,e_[31]=w):w=e_[31],e_[32]===Symbol.for("react.memo_cache_sentinel")?(j=(0,i.jsx)("h2",{className:"sr-only",children:"Pull Request Toolbar"}),e_[32]=j):j=e_[32],e_[33]!==eD?(S=(0,i.jsx)("div",{children:eD}),e_[33]=eD,e_[34]=S):S=e_[34],e_[35]!==eR.state?(N=(0,i.jsx)("div",{className:nQ,children:(0,i.jsx)(nH.u,{state:eR.state})}),e_[35]=eR.state,e_[36]=N):N=e_[36];let tv=eO&&(ej?nZ:nY);e_[37]!==tv?(R=(0,g.$)("PullRequestFilesToolbar-module__hide-when-stuck-large__Zcykn",tv),e_[37]=tv,e_[38]=R):R=e_[38],e_[39]!==ey||e_[40]!==eS||e_[41]!==eR.number||e_[42]!==eE.name||e_[43]!==eE.ownerLogin?(T=(0,i.jsx)(nV,{commits:ey,lastReviewOid:eS,ownerLogin:eE.ownerLogin,pullRequestNumber:eR.number,repositoryName:eE.name}),e_[39]=ey,e_[40]=eS,e_[41]=eR.number,e_[42]=eE.name,e_[43]=eE.ownerLogin,e_[44]=T):T=e_[44],e_[45]!==R||e_[46]!==T?(E=(0,i.jsx)("div",{className:R,children:T}),e_[45]=R,e_[46]=T,e_[47]=E):E=e_[47],e_[48]===Symbol.for("react.memo_cache_sentinel")?(L=(0,g.$)(nQ,"min-width-0"),I=(0,g.$)("d-flex mb-n1",nK),e_[48]=L,e_[49]=I):(L=e_[48],I=e_[49]);let t_=eR.title;e_[50]===Symbol.for("react.memo_cache_sentinel")?(D=(0,g.$)("f5 text-bold overflow-hidden no-wrap","PullRequestFilesToolbar-module__pr-sticky-title__GIttB"),e_[50]=D):D=e_[50],e_[51]!==eR.title?(P=(0,i.jsx)("a",{href:"#top",className:"d-flex overflow-hidden fgColor-default",children:(0,i.jsx)("bdi",{className:D,children:eR.title})}),e_[51]=eR.title,e_[52]=P):P=e_[52],e_[53]!==eR.title||e_[54]!==P?(O=(0,i.jsx)(A.m,{type:"label",direction:"s",text:t_,children:P}),e_[53]=eR.title,e_[54]=P,e_[55]=O):O=e_[55],e_[56]!==eR.number?(F=(0,i.jsxs)("span",{className:"f5 text-normal pl-2 fgColor-muted d-inline",children:["#",eR.number]}),e_[56]=eR.number,e_[57]=F):F=e_[57],e_[58]!==O||e_[59]!==F?(k=(0,i.jsxs)("div",{className:I,children:[O,F]}),e_[58]=O,e_[59]=F,e_[60]=k):k=e_[60];let tb=eO&&(ej?nZ:nY);e_[61]!==tb?($=(0,g.$)("f6 text-normal d-flex flex-items-center ml-n2",tb),e_[61]=tb,e_[62]=$):$=e_[62],e_[63]!==e5||e_[64]!==ey||e_[65]!==eS||e_[66]!==eR.number||e_[67]!==eE.name||e_[68]!==eE.ownerLogin?(B=(0,i.jsx)(nV,{commits:ey,lastReviewOid:eS,ownerLogin:eE.ownerLogin,pullRequestNumber:eR.number,repositoryName:eE.name,variant:"condensed",open:e5,onOpenChange:e6}),e_[63]=e5,e_[64]=ey,e_[65]=eS,e_[66]=eR.number,e_[67]=eE.name,e_[68]=eE.ownerLogin,e_[69]=B):B=e_[69],e_[70]===Symbol.for("react.memo_cache_sentinel")?(q=(0,g.$)("d-none d-lg-flex flex-items-center min-width-0",nK),e_[70]=q):q=e_[70],e_[71]===Symbol.for("react.memo_cache_sentinel")?(M=(0,i.jsx)("div",{className:"border-left mx-1 pr-1 d-block",style:{width:"1px",height:"16px"}}),e_[71]=M):M=e_[71],e_[72]!==eR.author||e_[73]!==eR.baseBranch||e_[74]!==eR.commitsCount||e_[75]!==eR.headBranch||e_[76]!==eR.headRepositoryName||e_[77]!==eR.headRepositoryOwnerLogin||e_[78]!==eR.id||e_[79]!==eR.isInAdvisoryRepo||e_[80]!==eR.mergedBy||e_[81]!==eR.mergedByName||e_[82]!==eR.number||e_[83]!==eR.state||e_[84]!==eE.id||e_[85]!==eE.name||e_[86]!==eE.ownerLogin?(V=(0,i.jsxs)("div",{className:q,children:[M,(0,i.jsx)(n3.O,{author:eR.author,baseBranch:eR.baseBranch,baseRepositoryOwnerLogin:eE.ownerLogin,baseRepositoryName:eE.name,commitsCount:eR.commitsCount,headBranch:eR.headBranch,headRepositoryOwnerLogin:eR.headRepositoryOwnerLogin,headRepositoryName:eR.headRepositoryName,isInAdvisoryRepo:eR.isInAdvisoryRepo,mergedBy:eR.mergedBy,mergedByName:eR.mergedByName,state:eR.state,pullRequestId:eR.id,pullRequestNumber:eR.number,repositoryId:eE.id})]}),e_[72]=eR.author,e_[73]=eR.baseBranch,e_[74]=eR.commitsCount,e_[75]=eR.headBranch,e_[76]=eR.headRepositoryName,e_[77]=eR.headRepositoryOwnerLogin,e_[78]=eR.id,e_[79]=eR.isInAdvisoryRepo,e_[80]=eR.mergedBy,e_[81]=eR.mergedByName,e_[82]=eR.number,e_[83]=eR.state,e_[84]=eE.id,e_[85]=eE.name,e_[86]=eE.ownerLogin,e_[87]=V):V=e_[87],e_[88]!==$||e_[89]!==B||e_[90]!==V?(G=(0,i.jsxs)("div",{className:$,children:[B,V]}),e_[88]=$,e_[89]=B,e_[90]=V,e_[91]=G):G=e_[91],e_[92]!==k||e_[93]!==G?(U=(0,i.jsxs)(t3.B,{direction:"vertical",gap:"none",className:L,children:[k,G]}),e_[92]=k,e_[93]=G,e_[94]=U):U=e_[94],e_[95]!==S||e_[96]!==N||e_[97]!==E||e_[98]!==U?(z=(0,i.jsxs)(t3.B,{direction:"horizontal",gap:"condensed",align:"center",className:"min-width-0",children:[S,N,E,U]}),e_[95]=S,e_[96]=N,e_[97]=E,e_[98]=U,e_[99]=z):z=e_[99],e_[100]!==eR.aliveChannel?(H=(0,i.jsx)(nN,{aliveChannel:eR.aliveChannel}),e_[100]=eR.aliveChannel,e_[101]=H):H=e_[101],e_[102]===Symbol.for("react.memo_cache_sentinel")?(W=(0,g.$)("d-flex",nX),e_[102]=W):W=e_[102],e_[103]!==eL||e_[104]!==eI?(Q=eL&&(0,i.jsx)(eG,{totalFilesCount:eI,className:"PullRequestFilesToolbar-module__hide-viewed-progress-on-small__DLtKy"}),e_[103]=eL,e_[104]=eI,e_[105]=Q):Q=e_[105],e_[106]!==eY||e_[107]!==eI||e_[108]!==eP?(K=eY&&eI>1&&(0,i.jsx)("div",{className:n0,children:(0,i.jsx)(ir,{userNotices:eP})}),e_[106]=eY,e_[107]=eI,e_[108]=eP,e_[109]=K):K=e_[109],e_[110]!==Q||e_[111]!==K?(Z=(0,i.jsxs)("div",{className:W,children:[Q,K]}),e_[110]=Q,e_[111]=K,e_[112]=Z):Z=e_[112],e_[113]!==eQ?(Y=eQ&&(0,i.jsx)("div",{className:n1,"data-testid":"file-controls-divider"}),e_[113]=eQ,e_[114]=Y):Y=e_[114],e_[115]!==eA||e_[116]!==eb||e_[117]!==ew||e_[118]!==tn||e_[119]!==tl||e_[120]!==tp||e_[121]!==eU||e_[122]!==eH||e_[123]!==eJ||e_[124]!==to||e_[125]!==e9||e_[126]!==eR||e_[127]!==eE||e_[128]!==eO||e_[129]!==eV||e_[130]!==tc||e_[131]!==e8||e_[132]!==eP||e_[133]!==tu?(J=eJ&&eA?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ec.Q,{"aria-label":"Discard batch",variant:"danger",size:"small",onClick:tl,children:["Discard",(0,i.jsx)("span",{className:`d-none ${tc?" d-xl-inline":" d-lg-inline"}`,children:" batch"})]}),(0,i.jsxs)(ec.Q,{"aria-label":"Commit suggestions",variant:"primary",size:"small",onClick:tn,children:["Commit",(0,i.jsx)("span",{className:`d-none ${tc?" d-xl-inline":" d-lg-inline"}`,children:" suggestions"})," ",(0,i.jsx)(y.A,{className:"ml-1 color-fg-inherit",children:e8})]})]}):(0,i.jsxs)(i.Fragment,{children:[tu&&eH&&!tc&&(0,i.jsx)("div",{className:"PullRequestFilesToolbar-module__show-on-xlarge__VoFX5",children:(0,i.jsx)(n6.OC,{defaultMergeMethod:tu.defaultMergeMethod,children:(0,i.jsx)(n6.O_,{channels:tu.channels,headSha:tu.headSha,helpUrl:tu.helpUrl,viewerLogin:tu.viewerLogin,isDockedMode:tm,onToggleDockedPanel:tp,mergeStatusButtonRef:tf,size:"small"})})}),ew&&(0,i.jsx)(nv,{currentUserLogin:ew,pullRequest:eR,repository:eE}),(0,i.jsx)("div",{className:eO?nJ:"d-none d-sm-flex",children:(0,i.jsx)(nS.G,{invisible:!1,reloadOnWhitespaceChange:!0,onUpdateWhitespace:e9,defaultHideWhitespace:eU,small:!0,userNotices:eP,additionalPreferences:(0,i.jsx)(ig,{changeGroupsPreferenceAvailable:eb,showChangeGroups:eV,onShowChangeGroupsChange:to})})})]}),e_[115]=eA,e_[116]=eb,e_[117]=ew,e_[118]=tn,e_[119]=tl,e_[120]=tp,e_[121]=eU,e_[122]=eH,e_[123]=eJ,e_[124]=to,e_[125]=e9,e_[126]=eR,e_[127]=eE,e_[128]=eO,e_[129]=eV,e_[130]=tc,e_[131]=e8,e_[132]=eP,e_[133]=tu,e_[134]=J):J=e_[134],e_[135]===Symbol.for("react.memo_cache_sentinel")?(X=(0,i.jsx)("div",{className:n1}),e_[135]=X):X=e_[135],e_[136]!==eR.aliveChannel?(ee=(0,i.jsx)(iR,{aliveChannel:eR.aliveChannel}),e_[136]=eR.aliveChannel,e_[137]=ee):ee=e_[137],e_[138]!==eR.number||e_[139]!==eE||e_[140]!==eO?(et=tg&&(0,i.jsx)("div",{className:eO?nJ:"d-none d-sm-flex",children:(0,i.jsx)(iw,{repository:eE,pullRequestNumber:eR.number})}),e_[138]=eR.number,e_[139]=eE,e_[140]=eO,e_[141]=et):et=e_[141];let ty=eO?nJ:"d-none d-sm-flex";e_[142]!==eT||e_[143]!==eN||e_[144]!==eR?(en=(0,i.jsx)(tQ,{pageLimits:eN,pullRequest:eR,aliveChannels:eT}),e_[142]=eT,e_[143]=eN,e_[144]=eR,e_[145]=en):en=e_[145],e_[146]!==ty||e_[147]!==en?(ei=(0,i.jsx)("div",{className:ty,children:en}),e_[146]=ty,e_[147]=en,e_[148]=ei):ei=e_[148],e_[149]!==eN?(el=(0,i.jsx)(t2,{className:"d-none d-sm-flex",pageLimits:eN}),e_[149]=eN,e_[150]=el):el=e_[150],e_[151]!==ee||e_[152]!==et||e_[153]!==ei||e_[154]!==el?(ea=(0,i.jsxs)("div",{className:"d-flex gap-1",children:[ee,et,ei,el]}),e_[151]=ee,e_[152]=et,e_[153]=ei,e_[154]=el,e_[155]=ea):ea=e_[155];let tw=eO?ej?"PullRequestFilesToolbar-module__show-more-menu-on-small__SpB86":"PullRequestFilesToolbar-module__show-more-menu-on-medium__qL0b9":"d-flex d-sm-none";return e_[156]===Symbol.for("react.memo_cache_sentinel")?(es=()=>e6(!0),e_[156]=es):es=e_[156],e_[157]!==eb||e_[158]!==to||e_[159]!==eV?(er=(0,i.jsx)(ig,{changeGroupsPreferenceAvailable:eb,showChangeGroups:eV,onShowChangeGroupsChange:to}),e_[157]=eb,e_[158]=to,e_[159]=eV,e_[160]=er):er=e_[160],e_[161]!==eT||e_[162]!==ey||e_[163]!==eU||e_[164]!==ej||e_[165]!==e9||e_[166]!==eN||e_[167]!==eR||e_[168]!==eE||e_[169]!==er?(eo=(0,i.jsx)(ih,{pageLimits:eN,pullRequest:eR,aliveChannels:eT,hideWhitespace:eU,onUpdateWhitespace:e9,showCommitSelector:es,commits:ey,isFileTreeExpanded:ej,repository:eE,pullRequestNumber:eR.number,additionalPreferences:er}),e_[161]=eT,e_[162]=ey,e_[163]=eU,e_[164]=ej,e_[165]=e9,e_[166]=eN,e_[167]=eR,e_[168]=eE,e_[169]=er,e_[170]=eo):eo=e_[170],e_[171]!==tw||e_[172]!==eo?(ed=(0,i.jsx)("div",{className:tw,children:eo}),e_[171]=tw,e_[172]=eo,e_[173]=ed):ed=e_[173],e_[174]!==H||e_[175]!==Z||e_[176]!==Y||e_[177]!==J||e_[178]!==ea||e_[179]!==ed?(em=(0,i.jsxs)(t3.B,{direction:"horizontal",align:"center",children:[H,Z,Y,J,X,ea,ed]}),e_[174]=H,e_[175]=Z,e_[176]=Y,e_[177]=J,e_[178]=ea,e_[179]=ed,e_[180]=em):em=e_[180],e_[181]!==tc||e_[182]!==w||e_[183]!==z||e_[184]!==em?(eu=(0,i.jsxs)(t3.B,{as:"section",direction:"horizontal",justify:"space-between",gap:"condensed",align:"center",className:w,"data-side-panel-open":tc,children:[j,z,em]}),e_[181]=tc,e_[182]=w,e_[183]=z,e_[184]=em,e_[185]=eu):eu=e_[185],e_[186]!==tr||e_[187]!==ti||e_[188]!==ts||e_[189]!==tt||e_[190]!==e1||e_[191]!==eX.activeBatch.length||e_[192]!==td?(eh=e1&&td.length>0&&(0,i.jsx)(ix.$,{authorLogins:[],batchSize:eX.activeBatch.length,onClose:ti,onCommit:tr,defaultCommitMessage:"Apply suggestions from code review",suggestions:td,onRemoveSuggestion:tt,onDiscardBatch:ts}),e_[186]=tr,e_[187]=ti,e_[188]=ts,e_[189]=tt,e_[190]=e1,e_[191]=eX.activeBatch.length,e_[192]=td,e_[193]=eh):eh=e_[193],e_[194]!==ts||e_[195]!==ta||e_[196]!==eK||e_[197]!==e8?(ep=(0,i.jsx)(nT.G,{isOpen:eK,onConfirm:ts,onCancel:ta,suggestionsCount:e8}),e_[194]=ts,e_[195]=ta,e_[196]=eK,e_[197]=e8,e_[198]=ep):ep=e_[198],e_[199]!==b||e_[200]!==eu||e_[201]!==eh||e_[202]!==ep?(ev=(0,i.jsxs)(i.Fragment,{children:[b,eu,eh,ep]}),e_[199]=b,e_[200]=eu,e_[201]=eh,e_[202]=ep,e_[203]=ev):ev=e_[203],ev}function iI(e){return{commentDatabaseId:e.commentDatabaseId,suggestionIndex:e.suggestionIndex,path:e.path,bodyHTML:e.bodyHTML,diffEntries:e.diffEntries}}iE.displayName="LivePullRequestFilesToolbar",iL.displayName="PullRequestFilesToolbar";var iD=n(15610),iP=n(60815);function iA(e){return`${e}/page_data/${ef.uT.threads}`}function iO(e){return e.nextUrl??void 0}let iF="DiffComparisonViewer-module__WideExpanded__Oilcd";var ik=n(10718),i$=n(69161);function iB(e){let t,n,a,s,r,o,d,c,m,u,h,f,p,v,_=(0,l.c)(35),{fileFilter:b,isFileTreeExpanded:y,shouldShowViewedFilesCount:w,totalFilesCount:j,treeToggleElement:S,userNotices:N}=e;_[0]===Symbol.for("react.memo_cache_sentinel")?(t=["line-spacing"],_[0]=t):t=_[0];let R=t,[T,E]=(0,x.useState)(!1),L=(0,C.j5)(),I=w||!y;_[1]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{e[0]&&E(!e[0].isIntersecting)},_[1]=n):n=_[1];let D=(0,nz.B)(n);_[2]!==D?(a=(0,i.jsx)("div",{ref:D,className:n2}),_[2]=D,_[3]=a):a=_[3];let P=T&&nW;_[4]!==P?(s=(0,g.$)(nU.A.stickyHeader,"PullRequestFilesToolbar-module__simple-toolbar__3d9E8",P),_[4]=P,_[5]=s):s=_[5],_[6]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)("h2",{className:"sr-only",children:"Diff Comparison Toolbar"}),_[6]=r):r=_[6],_[7]!==S?(o=(0,i.jsx)(t3.B,{direction:"horizontal",gap:"condensed",align:"center",className:"min-width-0",children:(0,i.jsx)("div",{children:S})}),_[7]=S,_[8]=o):o=_[8],_[9]!==w||_[10]!==j?(d=w&&(0,i.jsx)(eG,{totalFilesCount:j}),_[9]=w,_[10]=j,_[11]=d):d=_[11];let A=!y&&b;return _[12]!==L||_[13]!==j||_[14]!==N?(c=L&&j>1&&(0,i.jsx)("div",{className:n0,children:(0,i.jsx)(ir,{userNotices:N})}),_[12]=L,_[13]=j,_[14]=N,_[15]=c):c=_[15],_[16]!==c||_[17]!==d||_[18]!==A?(m=(0,i.jsxs)("div",{className:nX,children:[d,A,c]}),_[16]=c,_[17]=d,_[18]=A,_[19]=m):m=_[19],_[20]!==I?(u=I&&(0,i.jsx)("div",{className:n1,"data-testid":"file-controls-divider"}),_[20]=I,_[21]=u):u=_[21],_[22]!==N?(h=(0,i.jsx)(nS.G,{invisible:!1,small:!0,enabledDiffViewSettings:R,userNotices:N}),_[22]=N,_[23]=h):h=_[23],_[24]!==m||_[25]!==u||_[26]!==h?(f=(0,i.jsxs)(t3.B,{direction:"horizontal",align:"center",children:[m,u,h]}),_[24]=m,_[25]=u,_[26]=h,_[27]=f):f=_[27],_[28]!==f||_[29]!==s||_[30]!==o?(p=(0,i.jsxs)(t3.B,{as:"section",direction:"horizontal",justify:"space-between",gap:"condensed",align:"center",className:s,children:[r,o,f]}),_[28]=f,_[29]=s,_[30]=o,_[31]=p):p=_[31],_[32]!==p||_[33]!==a?(v=(0,i.jsxs)(i.Fragment,{children:[a,p]}),_[32]=p,_[33]=a,_[34]=v):v=_[34],v}iB.displayName="BasicDiffComparisonViewToolbar";var iq=n(26440),iM=n(31854),iV=n(19519),iG=n(79538);function iU(e){return{...e,compactMode:"none"}}function iz(e){return{...e,wideMode:"expanded"}}var iH=n(16899);function iW(e){let t,n,a,s=(0,l.c)(4),{lines:r}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t={padding:"var(--base-size-6) var(--base-size-8)",borderColor:"var(--borderColor-muted)"},s[0]=t):t=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)("div",{className:"border-bottom bgColor-muted rounded-top-2",style:t,children:(0,i.jsx)("div",{className:"d-flex flex-items-center",style:{height:"var(--control-small-size)"},children:(0,i.jsx)(iH.O,{height:"sm",variant:"rounded",width:"random"})})}),s[1]=n):n=s[1],s[2]!==r?(a=(0,i.jsxs)("div",{className:"border borderColor-muted rounded",children:[n,(0,i.jsx)("div",{className:"d-flex flex-column gap-2 tmp-p-3",children:Array.from({length:r||5}).map(iQ)})]}),s[2]=r,s[3]=a):a=s[3],a}function iQ(e,t){return(0,i.jsx)(iH.O,{height:"sm",variant:"rounded",width:"random"},`loading-skeleton-${t}`)}iW.displayName="EntireDiffLoadingSkeleton";var iK=n(24016);function iZ(){let e,t=(0,l.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"color-bg-default position-relative border rounded-2 color-border-default mt-2 d-flex flex-column",children:(0,i.jsx)(t_.E,{border:!1,spacious:!0,children:(0,i.jsx)(t_.E.Heading,{children:"No files matched your search"})})}),t[0]=e):e=t[0],e}iZ.displayName="FilesChangedFilterBlankSlate";var iY=n(82845),iJ=n(57973),iX=n(14864);function i0(e){let t,n,a,s,r=(0,l.c)(17),{pullRequestBasePath:o,className:d,diffPath:c,viewerLogin:m}=e,u=(0,x.useId)();r[0]!==o||r[1]!==c?(t={basePath:o,diffPath:c},r[0]=o,r[1]=c,r[2]=t):t=r[2];let{data:h}=(0,S.o5)(t);if(!h)return null;let{isOwnedByViewer:f,owners:p,ruleLineNumber:g,ruleUrl:v}=h;if(!(f||p.length>0))return null;r[3]!==f||r[4]!==p||r[5]!==g||r[6]!==m?(n=i1(f,p,g,m),r[3]=f,r[4]=p,r[5]=g,r[6]=m,r[7]=n):n=r[7];let _=n;return r[8]!==d||r[9]!==f||r[10]!==v||r[11]!==u?(a=v?(0,i.jsx)(O.A,{"aria-labelledby":u,href:v,className:d,muted:!f,children:(0,i.jsx)(P.ShieldLockIcon,{})}):(0,i.jsx)(P.ShieldLockIcon,{className:d}),r[8]=d,r[9]=f,r[10]=v,r[11]=u,r[12]=a):a=r[12],r[13]!==a||r[14]!==_||r[15]!==u?(s=(0,i.jsx)(A.m,{id:u,"aria-label":_,text:_,children:a}),r[13]=a,r[14]=_,r[15]=u,r[16]=s):s=r[16],s}function i1(e,t,n,i){let l="Owned by ",a=t;return e&&(l+="you",i&&(a=t.filter(e=>e!==`@${i}`)),a.length>0&&(l+=" along with ")),l+=a.join(", "),n&&(l+=` (from CODEOWNERS line ${n})`),l}i0.displayName="CodeownersBadge";var i2=n(94820);let i3="responsive-module__hide-on-mobile__v3LUR",i4="responsive-module__hide-on-desktop__OjTXu",i5="responsive-module__hide-on-medium-up__oyQXU",i6="BlobActionsMenu-module__hiddenIcon__F71AB";function i7(e){let t,n,a,s,r,o,d,c,m,u,h,f,p,g=(0,l.c)(46),{oid:x,path:v,repo:_,branchName:y,isViewable:w,isDeleteable:j,isEditable:S,shouldShowEditOptions:C,copilotDiffChatProps:N,returnToPullRequestPath:R,onCommentOnFile:T,onCopyPath:E,onExpandLines:L,areLinesExpanded:I,richDiffToggle:D,codeownersText:A,codeownersUrl:O}=e,F=void 0===j||j,k=void 0===S||S,$=void 0===C||C;g[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(eW.W.Anchor,{children:(0,i.jsx)(ea.K,{icon:P.KebabHorizontalIcon,"aria-label":"More options",variant:"invisible",size:"small"})}),g[0]=t):t=g[0],g[1]!==D?(n=D?.richDiff?.canToggleRichDiff&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(b.l.Item,{className:i5,onSelect:D.onToggle,children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)("span",{className:D.isRichDiff?i6:void 0,children:(0,i.jsx)(P.CheckIcon,{})})}),"Source diff"]}),(0,i.jsxs)(b.l.Item,{className:i5,onSelect:D.onToggle,children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)("span",{className:D.isRichDiff?void 0:i6,children:(0,i.jsx)(P.CheckIcon,{})})}),"Rich diff"]}),(0,i.jsx)(b.l.Divider,{className:i5})]}),g[1]=D,g[2]=n):n=g[2],g[3]!==N?(a=N&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(i2.$,{...N}),(0,i.jsx)(b.l.Divider,{})]}),g[3]=N,g[4]=a):a=g[4],g[5]!==T?(s=T&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(b.l.Item,{className:i4,onSelect:T,children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.CommentIcon,{})}),"Comment on this file"]}),(0,i.jsx)(b.l.Divider,{className:i4})]}),g[5]=T,g[6]=s):s=g[6],g[7]!==E?(r=E&&(0,i.jsxs)(b.l.Item,{className:i4,onSelect:E,children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.CopyIcon,{})}),"Copy file name"]}),g[7]=E,g[8]=r):r=g[8],g[9]!==I||g[10]!==L?(o=L&&(0,i.jsxs)(b.l.Item,{className:i4,onSelect:L,children:[(0,i.jsx)(b.l.LeadingVisual,{children:I?(0,i.jsx)(P.FoldIcon,{}):(0,i.jsx)(P.UnfoldIcon,{})}),(0,i.jsx)("span",{children:I?"Collapse non-diff lines":"Expand all lines"})]}),g[9]=I,g[10]=L,g[11]=o):o=g[11],g[12]!==E||g[13]!==L?(d=(E||L)&&(0,i.jsx)(b.l.Divider,{className:i4}),g[12]=E,g[13]=L,g[14]=d):d=g[14],g[15]!==x||g[16]!==v||g[17]!==_.name||g[18]!==_.ownerLogin?(c=(0,nE.nD_)({repo:_.name,owner:_.ownerLogin,filePath:v,commitish:x}),g[15]=x,g[16]=v,g[17]=_.name,g[18]=_.ownerLogin,g[19]=c):c=g[19];let B=void 0===w||w?void 0:"Action unavailable";return g[20]===Symbol.for("react.memo_cache_sentinel")?(m=(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.EyeIcon,{})}),g[20]=m):m=g[20],g[21]!==c||g[22]!==B?(u=(0,i.jsxs)(b.l.LinkItem,{href:c,inactiveText:B,children:[m,"View file"]}),g[21]=c,g[22]=B,g[23]=u):u=g[23],g[24]!==y||g[25]!==F||g[26]!==k||g[27]!==v||g[28]!==_.name||g[29]!==_.ownerLogin||g[30]!==R||g[31]!==$?(h=y&&$&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(b.l.LinkItem,{href:(0,nE.Nyd)({repo:_.name,owner:_.ownerLogin,filePath:v,commitish:y,returnToPrPath:R}),inactiveText:k?void 0:"Action unavailable",children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.PencilIcon,{})}),"Edit file"]}),(0,i.jsxs)(b.l.LinkItem,{variant:"danger",href:(0,nE.Y65)({repo:_.name,owner:_.ownerLogin,filePath:v,commitish:y}),inactiveText:F?void 0:"Action unavailable",children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.TrashIcon,{})}),"Delete file"]})]}),g[24]=y,g[25]=F,g[26]=k,g[27]=v,g[28]=_.name,g[29]=_.ownerLogin,g[30]=R,g[31]=$,g[32]=h):h=g[32],g[33]!==A||g[34]!==O?(f=A&&O&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b.l.Divider,{className:i4}),(0,i.jsxs)(b.l.LinkItem,{className:i4,href:O,children:[(0,i.jsx)(b.l.LeadingVisual,{children:(0,i.jsx)(P.ShieldLockIcon,{})}),A]})]}),g[33]=A,g[34]=O,g[35]=f):f=g[35],g[36]!==o||g[37]!==d||g[38]!==u||g[39]!==h||g[40]!==f||g[41]!==n||g[42]!==a||g[43]!==s||g[44]!==r?(p=(0,i.jsxs)(eW.W,{children:[t,(0,i.jsx)(eW.W.Overlay,{children:(0,i.jsxs)(b.l,{children:[n,a,s,r,o,d,u,h,f]})})]}),g[36]=o,g[37]=d,g[38]=u,g[39]=h,g[40]=f,g[41]=n,g[42]=a,g[43]=s,g[44]=r,g[45]=p):p=g[45],p}i7.displayName="BlobActionsMenu";function i8(e){let t,n,a,s,r,o,d,c=(0,l.c)(27),{basePath:m,inactive:u,inactiveTooltip:h,path:f,setIsCollapsed:p}=e,x=void 0!==u&&u,v=(0,C.Mv)(f);c[0]===Symbol.for("react.memo_cache_sentinel")?(t={onSuccess:le,onError:i9},c[0]=t):t=c[0];let{mutate:_}=function(e,t){let n,i,a,s,r=(0,l.c)(10),{onSuccess:o,onError:d}=t,c=`${e}/file_review`;return r[0]!==c?(n=async e=>{let{viewedStatus:t,path:n}=e,i=await (0,eS.Sr)(`${c}`,{method:t?"POST":"DELETE",headers:{Accept:"application/json"},body:{path:n,viewed:t?"viewed":void 0,_method:t?void 0:"delete"}}),l=await i.json();if(i.ok)return l;throw Error(l.error||"Unknown error occurred",{cause:i.status})},r[0]=c,r[1]=n):n=r[1],r[2]!==o?(i=()=>{o()},r[2]=o,r[3]=i):i=r[3],r[4]!==d?(a=e=>{d(e)},r[4]=d,r[5]=a):a=r[5],r[6]!==n||r[7]!==i||r[8]!==a?(s={mutationFn:n,onSuccess:i,onError:a},r[6]=n,r[7]=i,r[8]=a,r[9]=s):s=r[9],(0,eg.n)(s)}(m,t),{setDiffViewed:b}=(0,C.Ud)(),y=(0,C.j5)(),{navigateToNext:w}=n9();c[1]!==x||c[2]!==y||c[3]!==v||c[4]!==w||c[5]!==f||c[6]!==b||c[7]!==p||c[8]!==_?(n=()=>{x||(_({viewedStatus:!v,path:f}),b(f,!v),y?w():p(!v))},c[1]=x,c[2]=y,c[3]=v,c[4]=w,c[5]=f,c[6]=b,c[7]=p,c[8]=_,c[9]=n):n=c[9];let j=n;c[10]!==v?(a=v?(0,i.jsx)(P.CheckboxFillIcon,{className:"color-fg-accent"}):(0,i.jsx)("svg",{"aria-hidden":"true",fill:"none",height:"16",role:"img",viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{clipRule:"evenodd",d:"M2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H13.25C13.3881 2.5 13.5 2.61193 13.5 2.75V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25V2.75ZM2.75 1C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V2.75C15 1.7835 14.2165 1 13.25 1H2.75Z",fill:"currentColor",fillRule:"evenodd"})}),c[10]=v,c[11]=a):a=c[11];let S=a,N=v?"Viewed":"Not Viewed";c[12]!==S?(s=()=>S,c[12]=S,c[13]=s):s=c[13];let R=v&&"MarkAsViewedButton-module__viewed__k8dzo";c[14]!==R?(r=(0,g.$)(R,"MarkAsViewedButton-module__iconOnly__kEP4e"),c[14]=R,c[15]=r):r=c[15],c[16]===Symbol.for("react.memo_cache_sentinel")?(o=(0,i.jsx)("span",{className:i3,children:"Viewed"}),c[16]=o):o=c[16],c[17]!==j||c[18]!==x||c[19]!==v||c[20]!==N||c[21]!==s||c[22]!==r?(d=(0,i.jsx)(ec.Q,{"aria-pressed":v,"aria-label":N,inactive:x,size:"small",variant:"default",leadingVisual:s,className:r,onClick:j,children:o}),c[17]=j,c[18]=x,c[19]=v,c[20]=N,c[21]=s,c[22]=r,c[23]=d):d=c[23];let T=d;if(!x||!h)return T;{let e;return c[24]!==T||c[25]!==h?(e=(0,i.jsx)(A.m,{text:h,children:T}),c[24]=T,c[25]=h,c[26]=e):e=c[26],e}}function i9(){}function le(){}i8.displayName="MarkAsViewedButton";var lt=n(50964);async function ln({basePath:e,fullDiff:t,effectiveRange:n,path:i,signal:l}){let a=new URLSearchParams;a.append("path",i),n.baseOid===t.baseOid?a.append("range",n.headOid):a.append("range",`${n.baseOid}..${n.headOid}`);let s=`${e}/page_data/${ef.uT.richDiff}?${a.toString()}`;try{let e=await (0,eS.Sr)(s,{signal:l});if(l?.aborted)return;let t=await (0,ex.hp)(e);return(0,ex.R)(e,t),t??void 0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}}var li=n(59635);function ll(e,t){if(e.type!==t.type)return!1;let n="CONTEXT"===e.type||"ADDITION"===e.type,i="DELETION"===e.type;return n&&e.right===t.line||i&&e.left===t.line}function la({diffSummary:e,commentPreference:t,lineSpacingPreference:n,isCollapsed:i,threadSizeInfoMap:l,isSplitView:a=!1}){let s=n===r.Ud.Compact?20:25;if(i)return 42;if(e?.linesChanged&&e.linesChanged>400)return 175;if(e?.changeType==="DELETED"||e?.changeType==="REMOVED")return 177;let o=e?Math.max(1,Math.ceil(e.linesChanged/5)):1,d=e?.changeType==="MODIFIED"?6*o*s:0,c=0,m=0;if(t===r.sI.Visible){let t=0;for(let n of Object.values(e?.markersMap||{})){for(let e of n.threads){if(!l){c+=500;continue}let t=l.get(e.id);if(t?.isCollapsed){c+=34;continue}let n=t?.replyCount??0,i=1+n;t?.estimatedLines?c+=32+32*i+48+48+24*t.estimatedLines+6*Math.max(0,i-1)+(32*i+16):(c+=272,n>0&&(c+=128*n,c+=6*n))}t+=n.annotations.length}m=t*(l?144:300)}let u=e?.linesChanged??1;e?.changeType==="ADDED"&&(u+=1);let h=s*u;return a&&(h=Math.ceil(.6*h)),42+h+c+m+d}function ls(e){let t,n,a,s,r,o,d,c,m,u,h,f,p,v,_,b,y,w,N,R,T,E,L,I,D,A,O,F,$,B,q,M,V,G,U,z,H,W,Q,K,Z,Y,J,X,ee,et,en,ei,el,es,er=(0,l.c)(171);if(er[0]!==e){let{diffManuallyExpanded:i,headBranchName:l,headRepoName:m,headRepoOwner:u,diffLines:h,path:f,isSelected:p,reviewed:g,...x}=e;a=i,s=l,r=m,o=u,n=h,d=f,c=p,t=x,er[0]=e,er[1]=t,er[2]=n,er[3]=a,er[4]=s,er[5]=r,er[6]=o,er[7]=d,er[8]=c}else t=er[1],n=er[2],a=er[3],s=er[4],r=er[5],o=er[6],d=er[7],c=er[8];let eo=void 0!==c&&c,ed=(0,C.Kp)(),ec=(0,C.JA)(),{fetchContextLines:em}=(0,C.QV)(),eu=(0,C.L3)(),eh=eu.hideWhitespace?"1":"0",ep=(0,C.RB)(),eg=(0,C.lF)(),ex=(0,C.ce)();er[9]!==ed||er[10]!==d?(m={basePath:ed,path:d},er[9]=ed,er[10]=d,er[11]=m):m=er[11];let ev=function(e){let t,n,i,a=(0,l.c)(11),{basePath:s,path:r}=e,o=(0,C.L3)();a[0]!==s||a[1]!==o||a[2]!==r?(t=function({basePath:e,effectiveRange:t,path:n}){return[ef.uT.richDiff,e,`baseOid:${t.baseOid}`,`headOid:${t.headOid}`,`path:${n}`]}({basePath:s,path:r,...o}),a[0]=s,a[1]=o,a[2]=r,a[3]=t):t=a[3];let d=t;a[4]!==s||a[5]!==o||a[6]!==r?(n={path:r,basePath:s,...o,signal:void 0},a[4]=s,a[5]=o,a[6]=r,a[7]=n):n=a[7];let c=n;return a[8]!==c||a[9]!==d?(i={fetcher:ln,key:d,args:c},a[8]=c,a[9]=d,a[10]=i):i=a[10],i}(m),e_=(0,x.useRef)(null),eb=(0,x.useRef)(null),{helpUrl:ey}=(0,lt.X)(),ew=(0,C.kN)(d),{updateAllFilesCollapsedStatus:ej,updateFileCollapsedStatus:eS}=(0,C.JR)(),eC=(0,C.GR)(),[eN,eR]=(0,x.useState)(!1),[eT,eE]=(0,x.useState)(t.richDiff?.defaultToRichDiff??!1),eL=(0,C.Fm)(d);er[12]!==eg||er[13]!==eL||er[14]!==ew||er[15]!==ex?(u=la({diffSummary:eL,commentPreference:eg,lineSpacingPreference:ex,isCollapsed:ew}),er[12]=eg,er[13]=eL,er[14]=ew,er[15]=ex,er[16]=u):u=er[16];let eI=u,eD=(0,C.ne)(d);er[17]!==ed?(h={basePath:ed},er[17]=ed,er[18]=h):h=er[18];let eP=(0,S.dG)(h),eA=eP?.data;er[19]!==d||er[20]!==eA?(f=(0,S.hG)({diffPath:d,codeownersData:eA}),er[19]=d,er[20]=eA,er[21]=f):f=er[21];let eO=f;e:{let e;if(!eD){let e;er[22]===Symbol.for("react.memo_cache_sentinel")?(e=[],er[22]=e):e=er[22],p=e;break e}er[23]!==eD?(e=eD.FILE?.threads??[],er[23]=eD,er[24]=e):e=er[24],p=e}let eF=p;t:{let e;if(!ec){v=n;break t}er[25]!==ec||er[26]!==n||er[27]!==d?(e=function(e,t,n){let i=[],l=t.hunkPositions[n];if(!l)return i;let a=0,s=l[0];if(!s)return i;let r=!1;for(let t of e)if(r){if(i.push(t),ll(t,s.endLine)&&(r=!1,!(s=l[++a])))break}else ll(t,s.startLine)&&(r=!0,i.push(s.headerLine),i.push(t));return i}(n,ec,d),er[25]=ec,er[26]=n,er[27]=d,er[28]=e):e=er[28],v=e}let ek=v;er[29]!==d||er[30]!==eS?(_=()=>{eS(d,!1)},er[29]=d,er[30]=eS,er[31]=_):_=er[31];let e$=_,eB=(0,x.useRef)(!0);er[32]!==e$||er[33]!==eC||er[34]!==ew||er[35]!==eD?(b=()=>{let e=eC();e&&ew&&eD&&Object.values(eD).some(t=>t.threads.some(t=>String(t.id)===String(e))||t.annotations.some(t=>String(t.id)===String(e)))&&e$()},er[32]=e$,er[33]=eC,er[34]=ew,er[35]=eD,er[36]=b):b=er[36];let eq=b;er[37]!==eq?(y=()=>{(0,j.K3)(),eq()},er[37]=eq,er[38]=y):y=er[38];let eM=y;er[39]!==t.pathDigest||er[40]!==e$||er[41]!==ew?(w=()=>{(0,n8.o9)()===t.pathDigest&&ew&&e$()},er[39]=t.pathDigest,er[40]=e$,er[41]=ew,er[42]=w):w=er[42];let eV=w;er[43]!==eV||er[44]!==eq?(N=()=>{eq(),eV(),eB.current=!1},er[43]=eV,er[44]=eq,er[45]=N):N=er[45];let eG=(0,x.useEffectEvent)(N);er[46]!==eG?(R=()=>{let e=()=>eG();return e(),k.cg?.addEventListener("hashchange",e),()=>{k.cg?.removeEventListener("hashchange",e)}},er[46]=eG,er[47]=R):R=er[47],er[48]===Symbol.for("react.memo_cache_sentinel")?(T=[],er[48]=T):T=er[48],(0,x.useEffect)(R,T),er[49]!==eV||er[50]!==eo?(E=()=>{if(!eo){eB.current=!0;return}eB.current&&(eV(),eB.current=!1)},L=[eV,eo],er[49]=eV,er[50]=eo,er[51]=E,er[52]=L):(E=er[51],L=er[52]),(0,x.useEffect)(E,L),er[53]!==ej||er[54]!==eS?(I=(e,t,n)=>{if(n&&n.altKey)ej(e);else{if(eS(t,e),!e)return;k.cg?.requestAnimationFrame(()=>{let e=e_.current?.getBoundingClientRect();!e||e.top<60&&k.cg?.scrollTo({top:e.top+k.cg.scrollY-60})})}},er[53]=ej,er[54]=eS,er[55]=I):I=er[55];let eU=I;er[56]!==eL?(D=(0,li.B)({diffSummary:eL}),er[56]=eL,er[57]=D):D=er[57];let ez=(0,x.useRef)(D),[eH,eW]=(0,x.useState)(!1);er[58]!==eM||er[59]!==em||er[60]!==d||er[61]!==eh?(A=async e=>{eM(),ez.current.push(e),em({contextLineRanges:ez.current,path:d,w:eh})},er[58]=eM,er[59]=em,er[60]=d,er[61]=eh,er[62]=A):A=er[62];let eQ=A;er[63]!==em||er[64]!==d?(O=async()=>{await em({contextLineRanges:[],path:d})},er[63]=em,er[64]=d,er[65]=O):O=er[65];let eK=O;n:{if(t.isBinary||t.isSubmodule||t.isTooBig||(0,iY.dK)({linesChanged:t.linesChanged,newTreeEntry:t.newTreeEntry,oldTreeEntry:t.oldTreeEntry,status:t.status,truncatedReason:t.truncatedReason})){F=!1;break n}if(eH){F=!0;break n}if(0===ek.length){F=!1;break n}if((ek[1]?.blobLineNumber||0)>1){F=!0;break n}let e=ek.length,n=ek[e-1]?.blobLineNumber||0,i=t.newTreeEntry?.lineCount||0;if(n{let e,n;ez.current=[],eH||ez.current.push({start:1,end:Math.max(t.oldTreeEntry?.lineCount??0,t.newTreeEntry?.lineCount??0)});let i=document.activeElement;await em({contextLineRanges:ez.current,path:d,w:eh}),eW(!eH),i&&(e=null,n=null,i&&(i.hasAttribute("data-grid-cell-id")&&(e=i.getAttribute("data-grid-cell-id")),i.hasAttribute("data-file-path")&&(n=i.getAttribute("data-file-path"))),setTimeout(()=>{if(e){let t=document.querySelector(`[data-grid-cell-id="${CSS.escape(e)}"]`);if(t)return void t.focus()}if(n){let e=document.querySelector(`button[data-file-path="${CSS.escape(n)}"]`);e&&e.focus()}},0))},er[66]=t.newTreeEntry?.lineCount,er[67]=t.oldTreeEntry?.lineCount,er[68]=em,er[69]=eH,er[70]=d,er[71]=eh,er[72]=$):$=er[72],t.oldTreeEntry?.lineCount,t.newTreeEntry?.lineCount;let eY=$;er[73]===Symbol.for("react.memo_cache_sentinel")?(B=()=>eE(lr),er[73]=B):B=er[73];let eJ=B;er[74]!==t.richDiff||er[75]!==eT?(q=t.richDiff?.canToggleRichDiff?{richDiff:t.richDiff,isRichDiff:eT,onToggle:eJ}:void 0,er[74]=t.richDiff,er[75]=eT,er[76]=q):q=er[76];let eX=q;er[77]!==eO||er[78]!==ep.login?(M=eO&&(eO.isOwnedByViewer||eO.owners.length>0)?i1(eO.isOwnedByViewer,eO.owners,void 0,ep.login):void 0,er[77]=eO,er[78]=ep.login,er[79]=M):M=er[79];let e0=M,e1=eO?.ruleUrl;er[80]!==ep.canComment?(V=ep.canComment?()=>eR(!0):void 0,er[80]=ep.canComment,er[81]=V):V=er[81];let e2=V;er[82]!==d?(G=()=>navigator.clipboard?.writeText(d),er[82]=d,er[83]=G):G=er[83];let e3=G,e4=eZ?eY:void 0;er[84]!==t.richDiff||er[85]!==ev||er[86]!==eT?(U={richDiff:t.richDiff,showRichDiff:eT,onToggleRichDiff:eE,queryConfig:ev},er[84]=t.richDiff,er[85]=ev,er[86]=eT,er[87]=U):U=er[87];let e5=U;er[88]===Symbol.for("react.memo_cache_sentinel")?(z=[],er[88]=z):z=er[88],er[89]!==ec||er[90]!==eu.effectiveRange.headOid||er[91]!==eu.fullDiff.headOid?(H=new Set(z),ec&&H.add(iX.YR.diffStats).add(iX.YR.expandLines),eu.fullDiff.headOid!==eu.effectiveRange.headOid&&H.add(iX.YR.markAsViewed),er[89]=ec,er[90]=eu.effectiveRange.headOid,er[91]=eu.fullDiff.headOid,er[92]=H):H=er[92];let e6=H;er[93]===Symbol.for("react.memo_cache_sentinel")?(W=[],er[93]=W):W=er[93],er[94]!==ec?(Q=new Set(W),K=new Map,ec&&(Q.add(iX.YR.markAsViewed),K.set(iX.YR.markAsViewed,"This file can only be marked as viewed on the \u201CAll files\u201D page")),er[94]=ec,er[95]=Q,er[96]=K):(Q=er[95],K=er[96]),er[97]!==Q||er[98]!==K?(Z={disabledFeatures:Q,disabledReasons:K},er[97]=Q,er[98]=K,er[99]=Z):Z=er[99];let{disabledFeatures:e7,disabledReasons:e8}=Z;er[100]===Symbol.for("react.memo_cache_sentinel")?(Y=(0,g.$)("px-1 flex-items-center flex-order-2 flex-sm-order-1",i3),er[100]=Y):Y=er[100],er[101]!==ed||er[102]!==ep.login||er[103]!==d?(J=(0,i.jsx)(i0,{className:Y,diffPath:d,pullRequestBasePath:ed,viewerLogin:ep.login}),er[101]=ed,er[102]=ep.login,er[103]=d,er[104]=J):J=er[104],er[105]!==ec||er[106]!==ed||er[107]!==e7||er[108]!==e8||er[109]!==e6||er[110]!==eU||er[111]!==d?(X=!e6.has(iX.YR.markAsViewed)&&(0,i.jsx)(i8,{path:d,basePath:ed,inactive:e7.has(iX.YR.markAsViewed)||!!ec,inactiveTooltip:e8.get(iX.YR.markAsViewed),setIsCollapsed:e=>eU(e,d)}),er[105]=ec,er[106]=ed,er[107]=e7,er[108]=e8,er[109]=e6,er[110]=eU,er[111]=d,er[112]=X):X=er[112],er[113]!==ep.canComment||er[114]!==eN||er[115]!==ew||er[116]!==eU||er[117]!==d?(ee=ep.canComment&&(0,i.jsx)(ea.K,{ref:eb,icon:P.CommentIcon,"aria-label":"Comment on this file","aria-expanded":eN,variant:"invisible",size:"small",onClick:e=>{ew&&eU(!1,d),eR(!0),e.stopPropagation()},className:i3}),er[113]=ep.canComment,er[114]=eN,er[115]=ew,er[116]=eU,er[117]=d,er[118]=ee):ee=er[118];let e9="REMOVED"===t.status&&t.oldCommitOid?t.oldCommitOid:t.newCommitOid||"",te=r||t.repository.name,tt=o||t.repository.ownerLogin;er[119]!==te||er[120]!==tt?(et={name:te,ownerLogin:tt},er[119]=te,er[120]=tt,er[121]=et):et=er[121];let tn=!t.isSubmodule,ti=!t.isSubmodule,tl=!t.isSubmodule;er[122]!==ed||er[123]!==e0||er[124]!==e1||er[125]!==ep.shouldDisplayEditOptions||er[126]!==eH||er[127]!==s||er[128]!==e2||er[129]!==e3||er[130]!==e4||er[131]!==d||er[132]!==eX||er[133]!==e9||er[134]!==et||er[135]!==tn||er[136]!==ti||er[137]!==tl?(en=(0,i.jsx)(i7,{oid:e9,path:d,repo:et,isViewable:tn,isDeleteable:ti,isEditable:tl,shouldShowEditOptions:ep.shouldDisplayEditOptions,branchName:s,returnToPullRequestPath:ed,onCommentOnFile:e2,onCopyPath:e3,onExpandLines:e4,areLinesExpanded:eH,richDiffToggle:eX,codeownersText:e0,codeownersUrl:e1}),er[122]=ed,er[123]=e0,er[124]=e1,er[125]=ep.shouldDisplayEditOptions,er[126]=eH,er[127]=s,er[128]=e2,er[129]=e3,er[130]=e4,er[131]=d,er[132]=eX,er[133]=e9,er[134]=et,er[135]=tn,er[136]=ti,er[137]=tl,er[138]=en):en=er[138],er[139]!==X||er[140]!==ee||er[141]!==en?(ei=(0,i.jsxs)("div",{className:"d-flex flex-items-center gap-2",children:[X,ee,en]}),er[139]=X,er[140]=ee,er[141]=en,er[142]=ei):ei=er[142],er[143]!==eU||er[144]!==d?(el=(e,t)=>eU(t,d,e),er[143]=eU,er[144]=d,er[145]=el):el=er[145];let ta=eL?.linesAdded||t.linesAdded||0,ts=eL?.linesChanged||t.linesChanged||0,tr=eL?.linesDeleted||t.linesDeleted||0;return er[146]!==eQ||er[147]!==eZ||er[148]!==ep||er[149]!==t||er[150]!==a||er[151]!==eI||er[152]!==eY||er[153]!==eF||er[154]!==eH||er[155]!==ey||er[156]!==e6||er[157]!==eN||er[158]!==ew||er[159]!==eo||er[160]!==eK||er[161]!==d||er[162]!==e5||er[163]!==ek||er[164]!==J||er[165]!==ei||er[166]!==el||er[167]!==ta||er[168]!==ts||er[169]!==tr?(es=(0,i.jsx)(iJ.oO,{loadDiff:eK,...t,currentUser:ep,addFileCommentButtonRef:eb,diffManuallyExpanded:a,estimatedDiffHeight:eI,fileComments:eF,hiddenFeatures:e6,isAddingFileComment:eN,isSelected:eo,leftSideContent:J,rightSideContent:ei,canExpandOrCollapseLines:eZ,expandAllContextLines:eY,hasExpandedAllRanges:eH,addInjectedContextLines:eQ,onToggleCollapse:el,path:d,ref:e_,setIsAddingFileComment:eR,collapsed:ew,helpUrl:ey,linesAdded:ta,linesChanged:ts,linesDeleted:tr,diffLines:ek,richDiffState:e5}),er[146]=eQ,er[147]=eZ,er[148]=ep,er[149]=t,er[150]=a,er[151]=eI,er[152]=eY,er[153]=eF,er[154]=eH,er[155]=ey,er[156]=e6,er[157]=eN,er[158]=ew,er[159]=eo,er[160]=eK,er[161]=d,er[162]=e5,er[163]=ek,er[164]=J,er[165]=ei,er[166]=el,er[167]=ta,er[168]=ts,er[169]=tr,er[170]=es):es=er[170],es}function lr(e){return!e}ls.displayName="PullRequestDiffUnmemoized";let lo=(0,x.memo)(ls);lo.displayName="PullRequestDiff";var ld=n(33542),lc=n(72105);let lm=(0,x.memo)(function(e){let t,n,a,r,o,d,c,m,u=(0,l.c)(15),{ariaLabel:h,testId:f,id:p,approximateLineCount:g,approximateDiffHeight:x,maximumSkeletonHeight:v}=e,{data:_}=(0,s.ID)(),b=_?.lineSpacing==="compact"?20:25,y=x??b*(void 0===g?5:g),w=v?Math.min(y,v):y;return u[0]!==f?(t=(0,ld.G)(f),u[0]=f,u[1]=t):t=u[1],u[2]!==w?(n={minHeight:w},u[2]=w,u[3]=n):n=u[3],u[4]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)(iH.O,{height:"sm",variant:"rounded",width:"random"}),r=(0,i.jsx)(iH.O,{height:"sm",variant:"rounded",width:"random"}),o=(0,i.jsx)(iH.O,{height:"sm",variant:"rounded",width:"random"}),d=(0,i.jsx)(iH.O,{height:"sm",variant:"rounded",width:"random"}),u[4]=a,u[5]=r,u[6]=o,u[7]=d):(a=u[4],r=u[5],o=u[6],d=u[7]),u[8]!==n?(c=(0,i.jsx)("div",{className:"border borderColor-muted",children:(0,i.jsxs)("div",{className:"d-flex flex-column gap-2 tmp-p-3",style:n,children:[a,r,o,d]})}),u[8]=n,u[9]=c):c=u[9],u[10]!==h||u[11]!==p||u[12]!==t||u[13]!==c?(m=(0,i.jsx)("div",{className:lc.A.diffTargetable,role:"region","aria-label":h,...t,id:p,children:c}),u[10]=h,u[11]=p,u[12]=t,u[13]=c,u[14]=m):m=u[14],m});lm.displayName="DiffEntryLoadingSkeleton";let lu=(0,x.memo)(function(e){let t,n,a,s,r=(0,l.c)(12),{progressiveDiffEntry:o,approximateLineCount:d}=e,c=void 0===d?5:d,{loadPriority:m}=(0,C.pV)();r[0]!==m||r[1]!==o.pathDigest?(t=e=>{e[0]?.isIntersecting&&m(o.pathDigest)},r[0]=m,r[1]=o.pathDigest,r[2]=t):t=r[2],r[3]===Symbol.for("react.memo_cache_sentinel")?(n={rootMargin:"-150px"},r[3]=n):n=r[3];let u=(0,nz.B)(t,n),h=`Loading ${o.path}`,f=`lazy-load-${o.path}`,p=`diff-${o.pathDigest}`;return r[4]!==c||r[5]!==h||r[6]!==f||r[7]!==p?(a=(0,i.jsx)(lm,{ariaLabel:h,testId:f,id:p,approximateLineCount:c}),r[4]=c,r[5]=h,r[6]=f,r[7]=p,r[8]=a):a=r[8],r[9]!==u||r[10]!==a?(s=(0,i.jsx)("div",{ref:u,children:a}),r[9]=u,r[10]=a,r[11]=s):s=r[11],s});lu.displayName="LazyDiffEntryLoadingSkeleton";let lh=(0,x.memo)(function(e){let t,n=(0,l.c)(9),{linesAdded:a,linesChanged:s,linesDeleted:r,newTreeEntry:o,oldTreeEntry:d,path:c,pathDigest:m,status:u}=e;return n[0]!==a||n[1]!==s||n[2]!==r||n[3]!==o||n[4]!==d||n[5]!==c||n[6]!==m||n[7]!==u?(t=(0,i.jsx)(iJ.Ao,{linesAdded:a,linesChanged:s,linesDeleted:r,newTreeEntry:o,oldTreeEntry:d,path:c,pathDigest:m,status:u}),n[0]=a,n[1]=s,n[2]=r,n[3]=o,n[4]=d,n[5]=c,n[6]=m,n[7]=u,n[8]=t):t=n[8],t});lh.displayName="PullRequestDiffEntryErrorFallback";var lf=n(18813);let lp=(0,x.memo)(lg);function lg(e){let t,n,a,s,r,o=(0,l.c)(59),{diffManuallyExpanded:d,headBranchName:c,headRepoName:m,headRepoOwner:u,onScrollToAndFocusEntry:h,pathDigest:f,pullRequestGlobalRelayId:p,repository:v,testRenderFn:_}=e,b=(0,C.Py)(f),y=(0,C.if)(f),w=(0,C.jT)(y?.path),j=(0,C.Fm)(y?.path),S=(0,C.j5)();_&&_();let N=(0,x.useRef)(!1);if(o[0]!==b||o[1]!==h||o[2]!==y?(t=()=>{if(N.current||!y)return;let e=k.fV.hash??"",t=(0,n8.pd)(e)??"";if((t=t.replace("diff-","").replace("#",""))!==y.pathDigest&&(N.current=!0),!b||y.isLoaded){if(b){let e=k.cg?.location.hash.substring(1)??"";if(!(0,n8.yI)(e)||y.isLoaded){let e=k.cg?.document.activeElement;if(e?.closest("#diff-file-tree-filter"))return;h(y.pathDigest)}}N.current=!0}},n=[b,h,y],o[0]=b,o[1]=h,o[2]=y,o[3]=t,o[4]=n):(t=o[3],n=o[4]),(0,x.useEffect)(t,n),!y)return null;if(!y.isLoaded){let e,t,n,l,a=j?.linesChanged??5;(j?.changeType==="REMOVED"||j?.changeType==="DELETED")&&(a=5);let s=`diff-${y.pathDigest}`;o[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.$)(lc.A.diffTargetable,lc.A.diff),o[5]=e):e=o[5];let r=`${y.pathDigest}_${y.path}`,d=`#diff-${y.pathDigest}`,c=j?.linesAdded??0,m=j?.linesChanged??0,u=j?.linesDeleted??0;return o[6]!==S||o[7]!==y.path||o[8]!==d||o[9]!==c||o[10]!==m||o[11]!==u?(t=(0,i.jsx)("div",{className:lc.A.diffHeaderWrapper,children:(0,i.jsx)(lf.B,{areLinesExpanded:!1,canExpandOrCollapseLines:!1,fileLinkHref:d,canToggleRichDiff:!1,linesAdded:c,linesChanged:m,linesDeleted:u,newPath:y.path,patchStatus:"",path:y.path,onToggleExpandAllLines:tA.l,onToggleFileCollapsed:tA.l,onToggleDiffDisplay:tA.l,isInSingleFileMode:S})}),o[6]=S,o[7]=y.path,o[8]=d,o[9]=c,o[10]=m,o[11]=u,o[12]=t):t=o[12],o[13]!==a||o[14]!==y?(n=(0,i.jsx)(lu,{progressiveDiffEntry:y,approximateLineCount:a}),o[13]=a,o[14]=y,o[15]=n):n=o[15],o[16]!==b||o[17]!==t||o[18]!==n||o[19]!==s||o[20]!==r?(l=(0,i.jsxs)("div",{role:"region",id:s,className:e,"data-targeted":b,children:[t,n]},r),o[16]=b,o[17]=t,o[18]=n,o[19]=s,o[20]=r,o[21]=l):l=o[21],l}if(!w){let e;return o[22]!==y.path||o[23]!==y.pathDigest?(e=(0,i.jsx)(lh,{linesAdded:0,linesChanged:0,linesDeleted:0,path:y.path,pathDigest:y.pathDigest,newTreeEntry:void 0,oldTreeEntry:void 0,status:"MODIFIED"}),o[22]=y.path,o[23]=y.pathDigest,o[24]=e):e=o[24],e}o[25]!==w?(a=(0,i.jsx)(lh,{...w}),o[25]=w,o[26]=a):a=o[26];let R=w.reviewed??!1;return o[27]!==w.diffLines||o[28]!==w.diffSize||o[29]!==w.helpUrl||o[30]!==w.isBinary||o[31]!==w.isSubmodule||o[32]!==w.isTooBig||o[33]!==w.linesAdded||o[34]!==w.linesChanged||o[35]!==w.linesDeleted||o[36]!==w.newCommitOid||o[37]!==w.newTreeEntry||o[38]!==w.objectId||o[39]!==w.oldCommitOid||o[40]!==w.oldTreeEntry||o[41]!==w.path||o[42]!==w.pathDigest||o[43]!==w.richDiff||o[44]!==w.status||o[45]!==w.submodule||o[46]!==w.truncatedReason||o[47]!==d||o[48]!==c||o[49]!==m||o[50]!==u||o[51]!==b||o[52]!==p||o[53]!==v||o[54]!==R?(s=(0,i.jsx)(lo,{changeType:w.status,diffLines:w.diffLines,diffManuallyExpanded:d,diffSize:w.diffSize,headBranchName:c,headRepoName:m,headRepoOwner:u,helpUrl:w.helpUrl,isBinary:w.isBinary,isSelected:b,isSubmodule:w.isSubmodule,isTooBig:w.isTooBig,linesAdded:w.linesAdded,linesChanged:w.linesChanged,linesDeleted:w.linesDeleted,newCommitOid:w.newCommitOid,newTreeEntry:w.newTreeEntry,objectId:w.objectId,oldCommitOid:w.oldCommitOid,oldTreeEntry:w.oldTreeEntry,path:w.path,pathDigest:w.pathDigest,pullRequestGlobalRelayId:p,repository:v,reviewed:R,richDiff:w.richDiff,status:w.status,submodule:w.submodule,truncatedReason:w.truncatedReason}),o[27]=w.diffLines,o[28]=w.diffSize,o[29]=w.helpUrl,o[30]=w.isBinary,o[31]=w.isSubmodule,o[32]=w.isTooBig,o[33]=w.linesAdded,o[34]=w.linesChanged,o[35]=w.linesDeleted,o[36]=w.newCommitOid,o[37]=w.newTreeEntry,o[38]=w.objectId,o[39]=w.oldCommitOid,o[40]=w.oldTreeEntry,o[41]=w.path,o[42]=w.pathDigest,o[43]=w.richDiff,o[44]=w.status,o[45]=w.submodule,o[46]=w.truncatedReason,o[47]=d,o[48]=c,o[49]=m,o[50]=u,o[51]=b,o[52]=p,o[53]=v,o[54]=R,o[55]=s):s=o[55],o[56]!==a||o[57]!==s?(r=(0,i.jsx)(ee.t,{boundaryName:"ProgressivePullRequestDiffEntry",fallback:a,children:s}),o[56]=a,o[57]=s,o[58]=r):r=o[58],r}function lx(){let e,t=(0,l.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"color-bg-default position-relative border rounded-2 color-border-default mt-2 d-flex flex-column",children:(0,i.jsxs)(t_.E,{border:!1,spacious:!0,children:[(0,i.jsx)(t_.E.Heading,{children:"No changes to show"}),(0,i.jsx)(t_.E.Description,{children:"This commit does not include any file changes"})]})}),t[0]=e):e=t[0],e}lp.displayName="ProgressivePullRequestDiffEntry",lg.displayName="ProgressivePullRequestDiffEntryUnmemoized",lx.displayName="EmptyPullRequestBlankSlate";let lv="PullRequestDiffsAnimation-module__image__QGO_1";var l_=n(50433);let lb=n.p+"mona-hifive-first-frame-58169f519261f77f.png",ly=n.p+"mona-hifive-reduced-motion-9b520254f7177e5d.png",lw=n.p+"mona-hifive-loop-once-454eda737f401d20.gif",lj=()=>{let e,t,n,a,s,r,o,d,c=(0,l.c)(12),m=(0,l_.j)(),u=(0,x.useRef)(null),h=(0,x.useRef)(null);c[0]!==m?(e=e=>{e?(e=>{let t;if(m)return;let n=new IntersectionObserver((e,n)=>{for(let i of e)i.isIntersecting&&(t=setTimeout(()=>{i.target.style.display="none",u.current&&(u.current.style.opacity="1"),n.unobserve(i.target)},1e3))},{threshold:1});return h.current=n,n.observe(e),()=>{n.disconnect(),t&&clearTimeout(t)}})(e):h.current&&(h.current.disconnect(),h.current=null)},c[0]=m,c[1]=e):e=c[1];let f=e;return c[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)("img",{src:lw,alt:"GIF of two octocats high fiving each other",className:(0,g.$)(lv,"PullRequestDiffsAnimation-module__animatedImage__WVc05"),ref:u}),c[2]=t):t=c[2],c[3]===Symbol.for("react.memo_cache_sentinel")?(n=(0,g.$)(lv,"PullRequestDiffsAnimation-module__firstFrameImage___zKPt"),c[3]=n):n=c[3],c[4]!==f?(a=(0,i.jsx)("img",{src:lb,alt:"Two octocats",className:n,ref:f}),c[4]=f,c[5]=a):a=c[5],c[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsx)("img",{src:ly,alt:"Two octocats high fiving each other",className:(0,g.$)(lv,"PullRequestDiffsAnimation-module__reducedMotionImage__yLrW_")}),c[6]=s):s=c[6],c[7]!==a?(r=(0,i.jsxs)("div",{className:"PullRequestDiffsAnimation-module__imageContainer__JAgFR",children:[t,a,s]}),c[7]=a,c[8]=r):r=c[8],c[9]===Symbol.for("react.memo_cache_sentinel")?(o=(0,i.jsx)("span",{className:"fgColor-muted",children:"You made it to the end!"}),c[9]=o):o=c[9],c[10]!==r?(d=(0,i.jsxs)("div",{className:"PullRequestDiffsAnimation-module__wrapper__RIPWW",children:[r,o]}),c[10]=r,c[11]=d):d=c[11],d};lj.displayName="PullRequestDiffsAnimationComponent";let lS=(0,x.memo)(lj);lS.displayName="PullRequestDiffsAnimation";let lC="diff-";function lN(){let e,t,n,i,a,s,r=(0,l.c)(6),o=(0,x.useRef)(!0);r[0]===Symbol.for("react.memo_cache_sentinel")?(e=new Map,r[0]=e):e=r[0];let d=(0,x.useRef)(e);r[1]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{let e=d.current;return()=>{e.clear()}},n=[],r[1]=t,r[2]=n):(t=r[1],n=r[2]),(0,x.useEffect)(t,n),r[3]===Symbol.for("react.memo_cache_sentinel")?(i=()=>d.current,r[3]=i):i=r[3];let c=i;r[4]===Symbol.for("react.memo_cache_sentinel")?(a=(e,t)=>{var n,i;let{focusPathName:l}=void 0===t?{}:t,a=c().get(e);if(!a)return;let s=a,r=a.querySelector("button");l&&(r=a.querySelector("a"));let d="string"==typeof(i=n=k.cg?.location.hash.substring(1)??"")&&i.startsWith(lC)?n.slice(lC.length):"";if((0,n8.yI)(d)){let e=d.split("-")[0],t=a.querySelector(`[data-line-anchor=diff-${e}]`);t&&(r=s=t)}else o.current||(s=null);if(s){let e=k.cg?.scrollY??0,t=s.getBoundingClientRect().top+e-57-60;k.cg?.scrollTo({top:t,left:0})}r&&r.focus(),o.current=!1},r[4]=a):a=r[4];let m=a;return r[5]===Symbol.for("react.memo_cache_sentinel")?(s={onScrollToAndFocusEntry:m,getTargetableEntriesMap:c},r[5]=s):s=r[5],s}let lR=(0,x.memo)(lT);function lT(e){let t,n,a,s,r,o,d,c,m,u=(0,l.c)(39),{headBranchName:h,headRepoName:f,headRepoOwner:p,onSetFilterState:g,pullRequestGlobalRelayId:v,repository:_,showPullRequestGroups:b}=e,[y]=(0,x.useState)(!1),w=(0,x.useRef)(null),j=(0,C.yg)(),S=(0,C.JA)(),{startQueue:N}=(0,C.pV)();u[0]!==N?(t=()=>{N({autoLoadAllDiffs:!0})},n=[N],u[0]=N,u[1]=t,u[2]=n):(t=u[1],n=u[2]),(0,x.useEffect)(t,n);let{onScrollToAndFocusEntry:R,getTargetableEntriesMap:T}=lN();u[3]!==T?(a=T(),u[3]=T,u[4]=a):a=u[4];let E=a;u[5]!==E?(s=(e,t)=>(t?E.set(e,t):E.delete(e),()=>{E.delete(e)}),u[5]=E,u[6]=s):s=u[6];let L=s,I=(0,C.qg)(),D=j.length>=15;if(0===I){let e;return u[7]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(lx,{}),u[7]=e):e=u[7],e}if(0===j.length){let e;return u[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(iZ,{}),u[8]=e):e=u[8],e}if(u[9]!==S||u[10]!==g||u[11]!==b?(r=b&&S?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"f4 text-bold mb-0",children:[(0,i.jsx)("span",{className:"fgColor-accent",children:(0,i.jsx)(O.A,{href:"",onClick:e=>{e.preventDefault(),g({activeChangeGroupId:void 0})},children:"All files"})})," ",(0,i.jsx)("span",{className:"fgColor-muted text-normal",children:"/"})," ",S.name]}),S.description?.trim()?(0,i.jsx)("p",{children:S.description}):null]}):null,u[9]=S,u[10]=g,u[11]=b,u[12]=r):r=u[12],u[13]!==L||u[14]!==j||u[15]!==y||u[16]!==h||u[17]!==f||u[18]!==p||u[19]!==R||u[20]!==v||u[21]!==_){let e;u[23]!==L||u[24]!==y||u[25]!==h||u[26]!==f||u[27]!==p||u[28]!==R||u[29]!==v||u[30]!==_?(e=e=>(0,i.jsx)(lE,{pathDigest:e,ref:L,children:(0,i.jsx)(lp,{diffManuallyExpanded:y,headBranchName:h,headRepoName:f,headRepoOwner:p,pullRequestGlobalRelayId:v,onScrollToAndFocusEntry:R,pathDigest:e,repository:_})},e),u[23]=L,u[24]=y,u[25]=h,u[26]=f,u[27]=p,u[28]=R,u[29]=v,u[30]=_,u[31]=e):e=u[31],o=j.map(e),u[13]=L,u[14]=j,u[15]=y,u[16]=h,u[17]=f,u[18]=p,u[19]=R,u[20]=v,u[21]=_,u[22]=o}else o=u[22];return u[32]!==D?(d=D&&(0,i.jsx)(lS,{}),u[32]=D,u[33]=d):d=u[33],u[34]===Symbol.for("react.memo_cache_sentinel")?(c=(0,i.jsx)(iK.nq,{}),u[34]=c):c=u[34],u[35]!==r||u[36]!==o||u[37]!==d?(m=(0,i.jsxs)("div",{ref:w,"data-hpc":!0,"data-testid":"progressive-diffs-list",className:"d-flex flex-column gap-3",children:[r,o,d,c]}),u[35]=r,u[36]=o,u[37]=d,u[38]=m):m=u[38],m}function lE(e){let t,n,a=(0,l.c)(6),{pathDigest:s,ref:r,children:o}=e;a[0]!==s||a[1]!==r?(t=e=>r(s,e),a[0]=s,a[1]=r,a[2]=t):t=a[2];let d=t;return a[3]!==o||a[4]!==d?(n=(0,i.jsx)("div",{ref:d,children:o}),a[3]=o,a[4]=d,a[5]=n):n=a[5],n}lR.displayName="PullRequestDiffsList",lT.displayName="PullRequestDiffsListUnmemoized",lE.displayName="DiffEntryWrapper";let lL=(0,x.memo)(function(e){let t,n,i,a=(0,l.c)(12),{virtualizer:s,virtualItems:r,pathDigestToIndex:o,diffEntryDigests:d,getProgressiveDiffEntry:c,loadManyPriority:m}=e,u=(0,C.m9)(),h=(0,x.useRef)(null);a[0]!==c||a[1]!==u?(t=!!u&&c(u)?.isLoaded===!0,a[0]=c,a[1]=u,a[2]=t):t=a[2];let f=t;return a[3]!==d||a[4]!==m||a[5]!==o||a[6]!==u||a[7]!==f||a[8]!==r||a[9]!==s?(n=()=>{if(!u){h.current=null;return}if(h.current===u)return;let e=o.get(u);if(void 0===e)return;if(!f)return void m([d[e-2],d[e-1],d[e]].filter(lI));let t=r.find(t=>t.index===e);if(t&&t.start>=(s.scrollOffset??0)-t.size&&t.start<=(s.scrollOffset??0)+(s.scrollRect?.height??0)){h.current=u;return}requestAnimationFrame(()=>{s.scrollToIndex(e,{align:"start"})}),h.current=u},i=[u,o,s,r,f,m,d],a[3]=d,a[4]=m,a[5]=o,a[6]=u,a[7]=f,a[8]=r,a[9]=s,a[10]=n,a[11]=i):(n=a[10],i=a[11]),(0,x.useEffect)(n,i),null});function lI(e){return void 0!==e}lL.displayName="ScrollToSelectedDiff";var lD=n(36895),lP=n(51220);let lA="PullRequestVirtualizedDiffRow-module__virtualizedDiffRow__LvCLz",lO="u">typeof navigator&&/firefox/i.test(navigator.userAgent),lF=(0,x.memo)(function(e){let t,n,a,s,r=(0,l.c)(69),{virtualRow:o,virtualizedDiffEntry:d,diffEntry:c,diffSummary:m,scrollMargin:u,measureElement:h,headBranchName:f,headRepoName:p,headRepoOwner:g,pullRequestGlobalRelayId:x,repository:v,virtualWindowHeight:_,isOptimizedMeasurementEnabled:b}=e,y=(0,C.Py)(c?.pathDigest),w=(0,C.lF)(),j=(0,C.ce)(),S=(0,C.kN)(d?.path??""),N=!d?.isLoaded||!c;if(!d)return null;let R=o.start-u;r[0]===Symbol.for("react.memo_cache_sentinel")?(t=lO,r[0]=t):t=r[0];let T=t;r[1]!==R?(n=T?{top:`${R}px`}:{transform:`translateY(${R}px)`},r[1]=R,r[2]=n):n=r[2];let E=n,L=T?0:-R;if(N){let e,t,n,l,a,s;r[3]!==w||r[4]!==m||r[5]!==S||r[6]!==j?(e=la({diffSummary:m,commentPreference:w,lineSpacingPreference:j,isCollapsed:S}),r[3]=w,r[4]=m,r[5]=S,r[6]=j,r[7]=e):e=r[7];let c=e,u=b?void 0:h,f=`${L}px`;r[8]!==f?(t={"--header-sticky-offset":f},r[8]=f,r[9]=t):t=r[9];let p=`#diff-${d.pathDigest}`,g=m?.linesAdded??0,x=m?.linesChanged??0,v=m?.linesDeleted??0,y=m?.changeType??"";r[10]!==v||r[11]!==y||r[12]!==p||r[13]!==g||r[14]!==x||r[15]!==d.path?(n=(0,i.jsx)(lf.B,{areLinesExpanded:!1,canExpandOrCollapseLines:!1,fileLinkHref:p,canToggleRichDiff:!1,linesAdded:g,linesChanged:x,linesDeleted:v,newPath:d.path,patchStatus:y,path:d.path,onToggleExpandAllLines:tA.l,onToggleFileCollapsed:tA.l,onToggleDiffDisplay:tA.l,isInSingleFileMode:!1}),r[10]=v,r[11]=y,r[12]=p,r[13]=g,r[14]=x,r[15]=d.path,r[16]=n):n=r[16],r[17]!==n||r[18]!==t?(l=(0,i.jsx)("div",{className:lc.A.diffHeaderWrapper,style:t,children:n}),r[17]=n,r[18]=t,r[19]=l):l=r[19];let C=`Loading ${d.path}`,N=`lazy-load-${d.path}`,R=`diff-${d.pathDigest}`,T=_?.8*_:void 0;return r[20]!==c||r[21]!==C||r[22]!==N||r[23]!==R||r[24]!==T?(a=(0,i.jsx)(lm,{ariaLabel:C,testId:N,id:R,approximateDiffHeight:c,maximumSkeletonHeight:T}),r[20]=c,r[21]=C,r[22]=N,r[23]=R,r[24]=T,r[25]=a):a=r[25],r[26]!==c||r[27]!==l||r[28]!==a||r[29]!==u||r[30]!==o.index||r[31]!==E||r[32]!==d.pathDigest?(s=(0,i.jsxs)("div",{style:E,className:lA,ref:u,"data-index":o.index,"data-path-digest":d.pathDigest,"data-estimated-height":c,children:[l,a]}),r[26]=c,r[27]=l,r[28]=a,r[29]=u,r[30]=o.index,r[31]=E,r[32]=d.pathDigest,r[33]=s):s=r[33],s}let I=c.reviewed??!1;return r[34]!==f||r[35]!==p||r[36]!==g||r[37]!==L||r[38]!==y||r[39]!==c.diffLines||r[40]!==c.diffSize||r[41]!==c.helpUrl||r[42]!==c.isBinary||r[43]!==c.isSubmodule||r[44]!==c.isTooBig||r[45]!==c.linesAdded||r[46]!==c.linesChanged||r[47]!==c.linesDeleted||r[48]!==c.newCommitOid||r[49]!==c.newTreeEntry||r[50]!==c.objectId||r[51]!==c.oldCommitOid||r[52]!==c.oldTreeEntry||r[53]!==c.path||r[54]!==c.pathDigest||r[55]!==c.richDiff||r[56]!==c.status||r[57]!==c.submodule||r[58]!==c.truncatedReason||r[59]!==x||r[60]!==v||r[61]!==I?(a=(0,i.jsx)(lo,{changeType:c.status,diffLines:c.diffLines,diffManuallyExpanded:!1,diffSize:c.diffSize,headerStickyOffset:L,headBranchName:f,headRepoName:p,headRepoOwner:g,helpUrl:c.helpUrl,isBinary:c.isBinary,isSelected:y,isSubmodule:c.isSubmodule,isTooBig:c.isTooBig,linesAdded:c.linesAdded,linesChanged:c.linesChanged,linesDeleted:c.linesDeleted,newCommitOid:c.newCommitOid,newTreeEntry:c.newTreeEntry,objectId:c.objectId,oldCommitOid:c.oldCommitOid,oldTreeEntry:c.oldTreeEntry,path:c.path,pathDigest:c.pathDigest,pullRequestGlobalRelayId:x,repository:v,reviewed:I,richDiff:c.richDiff,status:c.status,submodule:c.submodule,truncatedReason:c.truncatedReason}),r[34]=f,r[35]=p,r[36]=g,r[37]=L,r[38]=y,r[39]=c.diffLines,r[40]=c.diffSize,r[41]=c.helpUrl,r[42]=c.isBinary,r[43]=c.isSubmodule,r[44]=c.isTooBig,r[45]=c.linesAdded,r[46]=c.linesChanged,r[47]=c.linesDeleted,r[48]=c.newCommitOid,r[49]=c.newTreeEntry,r[50]=c.objectId,r[51]=c.oldCommitOid,r[52]=c.oldTreeEntry,r[53]=c.path,r[54]=c.pathDigest,r[55]=c.richDiff,r[56]=c.status,r[57]=c.submodule,r[58]=c.truncatedReason,r[59]=x,r[60]=v,r[61]=I,r[62]=a):a=r[62],r[63]!==c.pathDigest||r[64]!==h||r[65]!==a||r[66]!==o.index||r[67]!==E?(s=(0,i.jsx)("div",{style:E,className:lA,ref:h,"data-index":o.index,"data-path-digest":c.pathDigest,children:a}),r[63]=c.pathDigest,r[64]=h,r[65]=a,r[66]=o.index,r[67]=E,r[68]=s):s=r[68],s});lF.displayName="MemoizedVirtualizedDiffRow";function lk({headBranchName:e,headRepoName:t,headRepoOwner:n,onSetFilterState:l,pullRequestGlobalRelayId:a,repository:s,showPullRequestGroups:r}){let d=(0,C.lF)(),c=(0,C.ce)(),m=(0,C.zJ)(),u=(0,x.useRef)(null),[h,f]=(0,x.useState)(0),p=(0,C.yg)(),g=(0,C.gg)(),v=(0,C.JA)(),{startQueue:_,loadManyPriority:b}=(0,C.pV)(),y=(0,C.qg)(),w=(0,C.l0)(),j=(0,C.HZ)(),S=(0,C.xQ)(),N=p.length,R=(0,C.y)(),T=(0,o.G7)("pull_request_files_debug_virtualization"),E=(0,o.G7)("pull_request_files_accurate_size_estimates"),L=(0,o.G7)("pull_request_virtualization_preload_diffs");(0,x.useEffect)(()=>{_()},[_]);let I=(0,x.useCallback)(e=>{let t=p[e];if(!t)return 0;let n=g(t);return n?la({diffSummary:w[n.path??""],commentPreference:d,lineSpacingPreference:c,isCollapsed:R(n.path??""),threadSizeInfoMap:E?S:void 0,isSplitView:E&&"split"===m}):0},[g,p,w,R,d,c,E,S,m]),D=(0,x.useCallback)(e=>p[e]??e,[p]);(0,x.useEffect)(()=>{u.current&&f(u.current.offsetTop)},[]);let P=(0,x.useMemo)(()=>j&&Object.keys(j).length===y?5:0,[j,y]),A=(0,x.useMemo)(()=>{let e=new Map;for(let t=0;t{let t=document.querySelector("[data-path-digest]:focus-within")?.getAttribute("data-path-digest"),n=t?A.get(t)??-1:-1;if(n<0)return(0,lD.vp)(e);let i=new Set((0,lD.vp)(e));return i.add(n),Array.from(i).sort((e,t)=>e-t)},[A]),k=(0,lP.XW)({count:p.length,estimateSize:I,getItemKey:D,overscan:P,scrollPaddingStart:70,scrollMargin:h,gap:16,rangeExtractor:F,debug:T,onChange(e){e.shouldAdjustScrollPositionOnItemSizeChange=(e,t,n)=>!1}}),$=k.getVirtualItems();return((0,x.useEffect)(()=>{if(L){if(0===$.length)return;let e=$[0]?.index??0,t=$[$.length-1]?.index??0,n=Math.max(0,e-5),i=Math.min(p.length,t+5+1);b(p.slice(n,i).filter(e=>void 0!==e))}else b($.map(e=>e.key))},[L,b,$,p]),0===y)?(0,i.jsx)(lx,{}):0===p.length?(0,i.jsx)(iZ,{}):(0,i.jsxs)("div",{ref:u,"data-hpc":!0,"data-testid":"virtualized-diffs-list",className:"d-flex flex-column gap-3",children:[r&&v?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"f4 text-bold mb-0",children:[(0,i.jsx)("span",{className:"fgColor-accent",children:(0,i.jsx)(O.A,{href:"",onClick:e=>{e.preventDefault(),l({activeChangeGroupId:void 0})},children:"All files"})})," ",(0,i.jsx)("span",{className:"fgColor-muted text-normal",children:"/"})," ",v.name]}),v.description?.trim()?(0,i.jsx)("p",{children:v.description}):null]}):null,(0,i.jsx)("div",{className:"PullRequestVirtualizedDiffsList-module__virtualized-diff-row__fZopz",style:{height:`${k.getTotalSize()}px`},children:$.map(l=>{let r=p[l.index];if(!r)return null;let o=g(r);return(0,i.jsx)(lF,{virtualRow:l,virtualizedDiffEntry:o,diffEntry:j[o?.path??""],diffSummary:w[o?.path??""],scrollMargin:k.options.scrollMargin,measureElement:k.measureElement,headBranchName:e,headRepoName:t,headRepoOwner:n,pullRequestGlobalRelayId:a,repository:s,virtualWindowHeight:k.scrollRect?.height},l.key)})}),N>=15&&(0,i.jsx)(lS,{}),(0,i.jsx)(lL,{virtualizer:k,virtualItems:$,pathDigestToIndex:A,diffEntryDigests:p,getProgressiveDiffEntry:g,loadManyPriority:b}),(0,i.jsx)(iK.nq,{})]})}lk.displayName="PullRequestVirtualizedDiffsList";var l$=n(73286),lB=n(50531),lq=n(87),lM=n(26090),lV=n(77236);function lG(e){let t,n,a,s,r,o,d,m,u,h,f,p,g,x,v,_,b,y,j,S,C,N,R,T,E=(0,l.c)(79),{commit:L,pullRequest:I,commits:D,repository:A}=e;E[0]!==D?(t=void 0===D?[]:D,E[0]=D,E[1]=t):t=E[1];let F=t,{helpUrl:k}=(0,lt.X)();e:{let e,t,i;if(0===F.length){let e;E[2]===Symbol.for("react.memo_cache_sentinel")?(e={prevCommitUrl:null,nextCommitUrl:null,canNavigate:!1},E[2]=e):e=E[2],n=e;break e}let l=L.oid,a=F.findIndex(e=>e.oid===l);if(-1===a){let e;E[3]===Symbol.for("react.memo_cache_sentinel")?(e={prevCommitUrl:null,nextCommitUrl:null,canNavigate:!1},E[3]=e):e=E[3],n=e;break e}let s=a>0?F[a-1]:null,r=a$&&M($),"pull-request-files-changed:go-to-next-commit":()=>B&&M(B)}}),E[70]=q,E[71]=M,E[72]=B,E[73]=$,E[74]=R):R=E[74],E[75]!==f||E[76]!==N||E[77]!==R?(T=(0,i.jsxs)("div",{className:"d-flex flex-column border rounded-2 overflow-hidden tmp-mb-3",children:[f,N,R]}),E[75]=f,E[76]=N,E[77]=R,E[78]=T):T=E[78],T}lG.displayName="PullRequestCommitHeader";let lU=(0,x.memo)(function(e){let t,n,a,s,r,o,d=(0,l.c)(60),{diffEntryPathDigest:c,diffManuallyExpanded:m,filteredDiffSummaries:u,headBranchName:h,headRepoName:f,headRepoOwner:p,pullRequestGlobalRelayId:v,repository:_,onScrollToAndFocusEntry:b}=e,y=(0,C.m9)()||c,w=(0,C.if)(y),j=(0,C.Fm)(w?.path||""),S=w?.path||"",N=(0,C.jT)(S),R=(0,C.j5)(),T=(0,x.useRef)(!1);d[0]!==b||d[1]!==w?.isLoaded||d[2]!==y?(t=()=>{!T.current&&w?.isLoaded&&(b(y,{focusPathName:!0}),T.current=!0)},d[0]=b,d[1]=w?.isLoaded,d[2]=y,d[3]=t):t=d[3];let E=w?.isLoaded;if(d[4]!==b||d[5]!==y||d[6]!==E?(n=[b,E,y],d[4]=b,d[5]=y,d[6]=E,d[7]=n):n=d[7],(0,x.useEffect)(t,n),!u.some(e=>e.path===S)){let e;return d[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(iZ,{}),d[8]=e):e=d[8],e}if(w&&!w.isLoaded){let e,t,n,l,a=`diff-${S}`;d[9]===Symbol.for("react.memo_cache_sentinel")?(e=(0,g.$)(lc.A.diffTargetable,lc.A.diff),d[9]=e):e=d[9];let s=`${y}_${S}`,r=`#diff-${y}`,o=j?.linesAdded??0,c=j?.linesChanged??0,m=j?.linesDeleted??0;return d[10]!==S||d[11]!==R||d[12]!==m||d[13]!==r||d[14]!==o||d[15]!==c?(t=(0,i.jsx)("div",{className:lc.A.diffHeaderWrapper,children:(0,i.jsx)(lf.B,{areLinesExpanded:!1,canExpandOrCollapseLines:!1,fileLinkHref:r,canToggleRichDiff:!1,linesAdded:o,linesChanged:c,linesDeleted:m,newPath:S,patchStatus:"",path:S,onToggleExpandAllLines:tA.l,onToggleFileCollapsed:tA.l,onToggleDiffDisplay:tA.l,isInSingleFileMode:R})}),d[10]=S,d[11]=R,d[12]=m,d[13]=r,d[14]=o,d[15]=c,d[16]=t):t=d[16],d[17]!==w?(n=(0,i.jsx)(lu,{progressiveDiffEntry:w,approximateLineCount:5}),d[17]=w,d[18]=n):n=d[18],d[19]!==t||d[20]!==n||d[21]!==a||d[22]!==s?(l=(0,i.jsxs)("div",{role:"region",id:a,className:e,"data-targeted":!1,"data-hpc":!0,children:[t,n]},s),d[19]=t,d[20]=n,d[21]=a,d[22]=s,d[23]=l):l=d[23],l}if(!N){let e;return d[24]!==S||d[25]!==c?(e=(0,i.jsx)(lh,{linesAdded:0,linesChanged:0,linesDeleted:0,path:S,pathDigest:c,newTreeEntry:void 0,oldTreeEntry:void 0,status:"MODIFIED"}),d[24]=S,d[25]=c,d[26]=e):e=d[26],e}d[27]!==N?(a=(0,i.jsx)(lh,{...N}),d[27]=N,d[28]=a):a=d[28];let L=N.reviewed??!1;return d[29]!==N.diffLines||d[30]!==N.diffSize||d[31]!==N.helpUrl||d[32]!==N.isBinary||d[33]!==N.isTooBig||d[34]!==N.linesAdded||d[35]!==N.linesChanged||d[36]!==N.linesDeleted||d[37]!==N.newCommitOid||d[38]!==N.newTreeEntry||d[39]!==N.objectId||d[40]!==N.oldCommitOid||d[41]!==N.oldTreeEntry||d[42]!==N.path||d[43]!==N.pathDigest||d[44]!==N.richDiff||d[45]!==N.status||d[46]!==N.submodule||d[47]!==N.truncatedReason||d[48]!==m||d[49]!==h||d[50]!==f||d[51]!==p||d[52]!==v||d[53]!==_||d[54]!==L?(s=(0,i.jsx)(lo,{changeType:N.status,diffLines:N.diffLines,diffManuallyExpanded:m,diffSize:N.diffSize,headBranchName:h,headRepoName:f,headRepoOwner:p,helpUrl:N.helpUrl,isBinary:N.isBinary,isSelected:!1,isTooBig:N.isTooBig,linesAdded:N.linesAdded,linesChanged:N.linesChanged,linesDeleted:N.linesDeleted,newCommitOid:N.newCommitOid,newTreeEntry:N.newTreeEntry,objectId:N.objectId,oldCommitOid:N.oldCommitOid,oldTreeEntry:N.oldTreeEntry,path:N.path,pathDigest:N.pathDigest,pullRequestGlobalRelayId:v,repository:_,reviewed:L,richDiff:N.richDiff,status:N.status,submodule:N.submodule,truncatedReason:N.truncatedReason}),d[29]=N.diffLines,d[30]=N.diffSize,d[31]=N.helpUrl,d[32]=N.isBinary,d[33]=N.isTooBig,d[34]=N.linesAdded,d[35]=N.linesChanged,d[36]=N.linesDeleted,d[37]=N.newCommitOid,d[38]=N.newTreeEntry,d[39]=N.objectId,d[40]=N.oldCommitOid,d[41]=N.oldTreeEntry,d[42]=N.path,d[43]=N.pathDigest,d[44]=N.richDiff,d[45]=N.status,d[46]=N.submodule,d[47]=N.truncatedReason,d[48]=m,d[49]=h,d[50]=f,d[51]=p,d[52]=v,d[53]=_,d[54]=L,d[55]=s):s=d[55],d[56]===Symbol.for("react.memo_cache_sentinel")?(r=(0,i.jsx)(iK.nq,{}),d[56]=r):r=d[56],d[57]!==a||d[58]!==s?(o=(0,i.jsxs)(ee.t,{boundaryName:"SingleFileModePullRequestDiffEntry",fallback:a,children:[s,r]}),d[57]=a,d[58]=s,d[59]=o):o=d[59],o});lU.displayName="SingleFileModePullRequestDiffEntry";let lz=(0,x.memo)(function(e){let t,n,a,s,r,o,d,c,m,u,h=(0,l.c)(32),{filteredDiffSummaries:f,headBranchName:p,headRepoName:g,headRepoOwner:v,pullRequestGlobalRelayId:_,repository:b}=e,y=(0,C.HZ)();h[0]!==y?(t=Object.values(y??{}).filter(lH),h[0]=y,h[1]=t):t=h[1];let w=t[0],S=(0,C.m9)(),{onScrollToAndFocusEntry:N,getTargetableEntriesMap:R}=lN(),T=(0,C.qg)(),E=(0,C.uh)()[0],{loadPriority:L,startQueue:I}=(0,C.pV)();h[2]!==I?(n=()=>{I()},a=[I],h[2]=I,h[3]=n,h[4]=a):(n=h[3],a=h[4]),(0,x.useEffect)(n,a),h[5]!==L||h[6]!==S?(s=()=>{L(S)},r=[L,S],h[5]=L,h[6]=S,h[7]=s,h[8]=r):(s=h[7],r=h[8]),(0,x.useEffect)(s,r),h[9]!==E||h[10]!==S?(o=()=>{!S&&E?.pathDigest&&(0,j.Zu)(`diff-${E.pathDigest}`)},h[9]=E,h[10]=S,h[11]=o):o=h[11];let D=E?.pathDigest;if(h[12]!==S||h[13]!==D?(d=[D,S],h[12]=S,h[13]=D,h[14]=d):d=h[14],(0,x.useEffect)(o,d),0===T){let e;return h[15]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(lx,{}),h[15]=e):e=h[15],e}if(0===f.length){let e;return h[16]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(iZ,{}),h[16]=e):e=h[16],e}let P=S||w?.pathDigest||E?.pathDigest;return P?(h[17]!==R||h[18]!==P?(c=e=>{let t=R();e?t.set(P,e):t.delete(P)},h[17]=R,h[18]=P,h[19]=c):c=h[19],h[20]!==f||h[21]!==p||h[22]!==g||h[23]!==v||h[24]!==N||h[25]!==P||h[26]!==_||h[27]!==b?(m=(0,i.jsx)(lU,{diffEntryPathDigest:P,diffManuallyExpanded:!1,filteredDiffSummaries:f,headBranchName:p,headRepoName:g,headRepoOwner:v,pullRequestGlobalRelayId:_,repository:b,onScrollToAndFocusEntry:N}),h[20]=f,h[21]=p,h[22]=g,h[23]=v,h[24]=N,h[25]=P,h[26]=_,h[27]=b,h[28]=m):m=h[28],h[29]!==m||h[30]!==c?(u=(0,i.jsx)("div",{ref:c,children:m}),h[29]=m,h[30]=c,h[31]=u):u=h[31],u):null});function lH(e){return null!==e}lz.displayName="SingleFileModeDiffEntryNavigator";var lW=n(45088);async function lQ(e,t,n,i){let l=new FormData;l.set("docked_panel_width",String(e)),(0,eS.DI)((0,nE.Yiz)({owner:t,repo:n,pullNumber:i}),{method:"POST",body:l,headers:{Accept:"application/json"}})}let lK="diff-sidebar-width";function lZ(e){let t,n,a=(0,l.c)(19),{repository:s,urls:r,isDiffVirtualizationEnabled:d,isInSingleFileMode:c}=e;if(!d&&!c)return null;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.G7)("pull_request_files_virtualization"),a[0]=t):t=a[0];let m=t,u=c&&m&&!d;a[1]!==s?(n=async function(){let e=new FormData;e.append("feature_name","pull_request_files_virtualization"),await (0,eS.DI)((0,nE.ZD8)({repo:s}),{body:e,method:"POST"})},a[1]=s,a[2]=n):n=a[2];let h=n;if(d){let e,t=`${r.changes}?mode=single`;return a[3]!==h||a[4]!==t?(e=(0,i.jsx)(eB.l,{title:"This page has been optimized for large pull requests.",hideTitle:!0,variant:"info",description:"This page has been optimized for large pull requests. Some browser features (like Find on Page or Select All) may not work as expected.",className:"tmp-mb-3",primaryAction:(0,i.jsx)(ec.Q,{variant:"invisible",as:"a",href:t,rel:"noopener noreferrer",onClick:h,className:"fgColor-accent",children:"Switch to single file mode"})}),a[3]=h,a[4]=t,a[5]=e):e=a[5],e}if(c){let e,t,n,l;a[6]!==h||a[7]!==u||a[8]!==r?(e=u&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:"To view all files in a single page, "}),(0,i.jsx)(O.A,{inline:!0,href:`${r.changes}?mode=virtualization`,onClick:h,rel:"noreferrer",children:"try a new experimental mode"}),"."]}),a[6]=h,a[7]=u,a[8]=r,a[9]=e):e=a[9],a[10]!==e?(t=(0,i.jsxs)(i.Fragment,{children:["Due to the size of this pull request, only one file can be shown at a time."," ",e]}),a[10]=e,a[11]=t):t=a[11];let s=t;return a[12]!==h||a[13]!==u||a[14]!==r?(n=!u&&(0,i.jsx)(ec.Q,{variant:"invisible",as:"a",href:`${r.files}?new_files_changed=false`,rel:"noopener noreferrer",onClick:h,className:"fgColor-accent",target:"_blank",children:"View in the classic experience"}),a[12]=h,a[13]=u,a[14]=r,a[15]=n):n=a[15],a[16]!==s||a[17]!==n?(l=(0,i.jsx)(eB.l,{title:"Single file mode",description:s,hideTitle:!0,variant:"info",className:"tmp-mb-3",primaryAction:n}),a[16]=s,a[17]=n,a[18]=l):l=a[18],l}}function lY(e){let t,n,a,s,r=(0,l.c)(22),{basePath:d,baseSha:c,forceUnifiedView:m,headSha:u,initialData:h,treeCollapsedByDefault:f,treeEnableInlineCompactMode:p,userCanComment:g,useChangeGroups:x,useInlineComments:v,useEditOptions:_,useFileTree:b,useAdvancedToolbar:y,useBasicToolbar:w}=e,j=x??!1,S=v??!1,C=_??!1,N=b??!1,R=y??!1,T=w??!1,E=g??!0,L=m??!1,I=f??!1,D=p??!1;r[0]!==j||r[1]!==D||r[2]!==S||r[3]!==C||r[4]!==N||r[5]!==R||r[6]!==T||r[7]!==E||r[8]!==L||r[9]!==I?(t={useChangeGroups:j,useInlineComments:S,useEditOptions:C,useFileTree:N,useAdvancedToolbar:R,useBasicToolbar:T,userCanComment:E,forceUnifiedView:L,treeCollapsedByDefault:I,treeEnableInlineCompactMode:D},r[0]=j,r[1]=D,r[2]=S,r[3]=C,r[4]=N,r[5]=R,r[6]=T,r[7]=E,r[8]=L,r[9]=I,r[10]=t):t=r[10];let P=t,A=h?h.pullRequest.comparison.headOid:u,O=h?h.pullRequest.comparison.baseOid:c;if(!A)throw Error("DiffComparisonViewer: headSha is required if initialData is not provided");let F=!h;r[11]!==d||r[12]!==O||r[13]!==A||r[14]!==F?(n={basePath:d,headSha:A,baseSha:O,shouldFetch:F},r[11]=d,r[12]=O,r[13]=A,r[14]=F,r[15]=n):n=r[15];let{data:k,isLoading:$}=function(e){let t,n,i,a,s,r,o=(0,l.c)(17),{basePath:d,headSha:c,baseSha:m,shouldFetch:u}=e;if(o[0]!==d||o[1]!==m||o[2]!==c){let e=new URLSearchParams;m===c?e.append("range",c??""):m&&c?e.append("range",`${m}..${c}`):c&&e.append("range",c),t=d,n=ef.uT.baseComparisonInfo,i=e.toString(),o[0]=d,o[1]=m,o[2]=c,o[3]=t,o[4]=n,o[5]=i}else t=o[3],n=o[4],i=o[5];let h=`${t}/page_data/${n}?${i}`,f=m??"base-sha-not-provided";o[6]!==d||o[7]!==c||o[8]!==f?(a=function({basePath:e,selectedRange:t}){return[ef.uT.baseComparisonInfo,e,`baseOid:${t.baseOid}`,`headOid:${t.headOid}`]}({basePath:d,selectedRange:{baseOid:f,headOid:c}}),o[6]=d,o[7]=c,o[8]=f,o[9]=a):a=o[9];let p=a;return o[10]!==h||o[11]!==c?(s=async()=>{if(!c)return;let e=await (0,eS.QJ)(h);if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()??void 0},o[10]=h,o[11]=c,o[12]=s):s=o[12],o[13]!==p||o[14]!==u||o[15]!==s?(r={queryKey:p,queryFn:s,staleTime:1/0,enabled:u},o[13]=p,o[14]=u,o[15]=s,o[16]=r):r=o[16],(0,ej.I)(r)}(n),B=h??k;r[16]===Symbol.for("react.memo_cache_sentinel")?(a=(0,o.G7)("pull_request_files_virtualization_without_min_threshold"),r[16]=a):a=r[16];let q=(a||B?.virtualizeDiffEntries)??!1;return r[17]!==P||r[18]!==B||r[19]!==$||r[20]!==q?(s=(0,i.jsx)(i.Fragment,{children:B&&!$?(0,i.jsx)(i$.Kg,{basePageDataUrl:B.pullRequest.pathName,children:(0,i.jsx)(lW.n,{initData:{diffVersion:"v2",virtualizationEnabled:q},children:(0,i.jsx)(ik.vX,{initData:B,configOpts:P,children:(0,i.jsx)(lJ,{...B,configOpts:P})})})}):(0,i.jsxs)("div",{className:"width-full",children:[(0,i.jsx)("div",{className:"DiffComparisonViewer-module__SkeletonWrapper__d4EHy",children:(0,i.jsx)("div",{className:"DiffComparisonViewer-module__SkeletonIconWrapper__DCaGh",children:(0,i.jsx)(iH.O,{width:"lg",height:"lg",variant:"rounded"})})}),(0,i.jsxs)("div",{className:"d-flex flex-column gap-3 tmp-p-3",children:[(0,i.jsx)(iW,{lines:4}),(0,i.jsx)(iW,{lines:8}),(0,i.jsx)(iW,{lines:5})]})]})}),r[17]=P,r[18]=B,r[19]=$,r[20]=q,r[21]=s):s=r[21],s}function lJ(e){var t;let n,v,_,b,y,w,j,T,E,L,I,D,P,A,O,F,k,$,B,q,M,V,G,U,z,H,W,Q,K,Z,Y,J,X,ee,et,en,ei,el=(0,l.c)(138),{codeowners:ea,commit:es,commits:er,configOpts:eo,diffSummaries:ed,fileFilter:ec,markers:em,pullRequest:eu,repository:eh,pageLimits:ev,urls:e_,user:eb,userNotices:ey,isSingleFileMode:ew,virtualizeDiffEntries:ej}=e;(0,m.L)(!0),function(){let e,t,n=(0,l.c)(3),{handleHashUpdate:i}=(0,C.Lh)();n[0]!==i?(e=()=>{let e=()=>{i()};return i(),window.addEventListener("hashchange",e),()=>{window.removeEventListener("hashchange",e)}},t=[i],n[0]=i,n[1]=e,n[2]=t):(e=n[1],t=n[2]),(0,x.useEffect)(e,t)}();let eN=(t=eb,v=(0,l.c)(5),_=(0,s.C0)(t.viewSettings.splitPreference),b=(0,s.Qn)(t.viewSettings.hideWhitespace),v[0]!==t.viewSettings.commentsPreference||v[1]!==t.viewSettings.lineSpacing||v[2]!==_||v[3]!==b?(n={hideWhitespace:b,splitPreference:_,lineSpacing:t.viewSettings.lineSpacing,commentsPreference:t.viewSettings.commentsPreference},v[0]=t.viewSettings.commentsPreference,v[1]=t.viewSettings.lineSpacing,v[2]=_,v[3]=b,v[4]=n):n=v[4],n);el[0]===Symbol.for("react.memo_cache_sentinel")?(y=(0,o.G7)("pull_request_files_virtualization_without_min_threshold"),el[0]=y):y=el[0];let eR=y;el[1]===Symbol.for("react.memo_cache_sentinel")?(w={onSuccess:l0,onError:lX},el[1]=w):w=el[1];let{mutate:eT}=(0,a.U)(w),{data:eE}=(0,s.ID)(eN);el[2]!==eE?.commentsPreference||el[3]!==eT?(j=()=>{eT({commentsPreference:eE?.commentsPreference===r.sI.Visible?r.sI.Collapsed:r.sI.Visible})},el[2]=eE?.commentsPreference,el[3]=eT,el[4]=j):j=el[4],eE?.commentsPreference;let eL=j,{updateCommentsPreference:eI}=(0,C.CQ)();el[5]!==eE?.commentsPreference||el[6]!==eI?(T=()=>{eI(eE?.commentsPreference??r.sI.Visible)},el[5]=eE?.commentsPreference,el[6]=eI,el[7]=T):T=el[7];let eD=eE?.commentsPreference;el[8]!==eD||el[9]!==eI?(E=[eD,eI],el[8]=eD,el[9]=eI,el[10]=E):E=el[10],(0,x.useEffect)(T,E);let eO=(0,d.u)("pull_request_file_tree_width_persistence");el[11]!==eo.useFileTree||el[12]!==eO||el[13]!==eu.number||el[14]!==eh.name||el[15]!==eh.ownerLogin?(L=eO&&eo.useFileTree&&eh.ownerLogin&&eh.name&&eu.number?{owner:eh.ownerLogin,repo:eh.name,pullNumber:eu.number}:void 0,el[11]=eo.useFileTree,el[12]=eO,el[13]=eu.number,el[14]=eh.name,el[15]=eh.ownerLogin,el[16]=L):L=el[16];let eF=L;el[17]!==eF||el[18]!==eb.fileTreeWidth?(I=e=>{e!==eb.fileTreeWidth&&eF&&(0,f.M3)()&&(0,p.c)(e,eF)},el[17]=eF,el[18]=eb.fileTreeWidth,el[19]=I):I=el[19];let ek=I,e$=eb.currentUserLogin||"";el[20]!==e$?(D={login:e$},el[20]=e$,el[21]=D):D=el[21];let{splitPagePaneHidden:eB,treeViewState:eM,treeToggleElement:eV,collapseMobileTree:eG,expandTree:eU}=function(e,t,n,a){let s,r,o,d,c,m,u,h,f,g,v,_,b=(0,l.c)(39),{isServer:y}=(0,iV.V)(),w=(0,x.useRef)(null),j=(0,x.useRef)(null),S=t?"expanded":"collapsed";b[0]!==S?(s={wideMode:S,compactMode:"none"},b[0]=S,b[1]=s):s=b[1];let[C,N]=(0,x.useState)(s);b[2]!==a?(r=()=>{N(iz),(0,p.B)(!0,a),requestAnimationFrame(()=>w.current?.focus())},b[2]=a,b[3]=r):r=b[3];let R=r;b[4]!==a?(o=()=>{N({wideMode:"collapsed",compactMode:"none"}),(0,p.B)(!1,a),requestAnimationFrame(()=>w.current?.focus())},b[4]=a,b[5]=o):o=b[5];let T=o;b[6]!==n?(d=()=>{let e="overlay";if(n){let t=window.innerWidth;(0,iM.nn)(t)>iM.Gy.large&&(e="inline")}N(t=>({...t,compactMode:e})),requestAnimationFrame(()=>j.current?.focus())},b[6]=n,b[7]=d):d=b[7];let E=d;b[8]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{N(iU),requestAnimationFrame(()=>j.current?.focus())},b[8]=c):c=b[8];let L=c;b[9]!==E||b[10]!==R||b[11]!==C.compactMode||b[12]!==C.wideMode?(m=()=>{(0,iG.QK)()?"collapsed"===C.wideMode&&R():"none"===C.compactMode&&E()},b[9]=E,b[10]=R,b[11]=C.compactMode,b[12]=C.wideMode,b[13]=m):m=b[13];let I=m,D="expanded"===C.wideMode,P="expanded"===C.wideMode?"Collapse file tree":"Expand file tree";b[14]!==T||b[15]!==R||b[16]!==C.wideMode?(u=()=>{"expanded"===C.wideMode?T():R()},b[14]=T,b[15]=R,b[16]=C.wideMode,b[17]=u):u=b[17],b[18]!==e||b[19]!==D||b[20]!==P||b[21]!==u?(h=(0,i.jsx)(iq.L,{expanded:D,alignment:"left",ariaLabel:P,tooltipDirection:"se",testid:"file-tree-button",ariaControls:e,ref:w,className:"DiffComparisonViewer-module__RegularTreeToggle__fSFG6",onToggleExpanded:u,size:"small"}),b[18]=e,b[19]=D,b[20]=P,b[21]=u,b[22]=h):h=b[22];let A=h,O="none"!==C.compactMode,F="none"!==C.compactMode?"Collapse file tree":"Expand file tree";b[23]!==E||b[24]!==C.compactMode?(f=()=>{"none"!==C.compactMode?L():E()},b[23]=E,b[24]=C.compactMode,b[25]=f):f=b[25],b[26]!==e||b[27]!==O||b[28]!==F||b[29]!==f?(g=(0,i.jsx)(iq.L,{expanded:O,alignment:"left",ariaLabel:F,tooltipDirection:"se",testid:"file-tree-button",ariaControls:e,ref:j,className:"DiffComparisonViewer-module__MobileTreeToggle__wwbbS",onToggleExpanded:f,size:"small"}),b[26]=e,b[27]=O,b[28]=F,b[29]=f,b[30]=g):g=b[30];let k=g;b[31]!==k||b[32]!==A?(v=(0,i.jsxs)(i.Fragment,{children:[k,A]}),b[31]=k,b[32]=A,b[33]=v):v=b[33];let $=v,B=y&&!t;return b[34]!==I||b[35]!==B||b[36]!==$||b[37]!==C?(_={splitPagePaneHidden:B,treeViewState:C,collapseMobileTree:L,expandTree:I,treeToggleElement:$},b[34]=I,b[35]=B,b[36]=$,b[37]=C,b[38]=_):_=b[38],_}(eP,eb.isFileTreeExpanded&&!eo.treeCollapsedByDefault,eo.treeEnableInlineCompactMode,D);el[22]!==ea||el[23]!==eu.pathName?(P={basePath:eu.pathName},ea&&(P.initialData=ea),el[22]=ea,el[23]=eu.pathName,el[24]=P):P=el[24];let{data:ez}=(0,S.dG)(P),{setCodeowners:eH}=(0,C.wh)();el[25]!==ez||el[26]!==eH?(A=()=>{eH(ez)},O=[ez,eH],el[25]=ez,el[26]=eH,el[27]=A,el[28]=O):(A=el[27],O=el[28]),(0,x.useEffect)(A,O);let eW=eu.pathName,eQ=em?.threadsPageInfo?.cursor,eK=em?.threadsPageInfo?.hasNextPage??!1;el[29]!==em?.threads?(F=Object.values(em?.threads||{}),el[29]=em?.threads,el[30]=F):F=el[30],el[31]!==eu.pathName||el[32]!==eQ||el[33]!==eK||el[34]!==F?(k={pathName:eW,cursor:eQ,hasMorePages:eK,initialThreads:F},el[31]=eu.pathName,el[32]=eQ,el[33]=eK,el[34]=F,el[35]=k):k=el[35];let{hasNextPage:eZ,isFetchingNextPage:eY,fetchNextPage:eJ}=function(e){let t,n,i,a,s,r,d,c,m,u,h=(0,l.c)(28),{pathName:f,cursor:p,hasMorePages:g,initialThreads:x}=e,v=void 0!==g&&g;h[0]!==x?(t=void 0===x?[]:x,h[0]=x,h[1]=t):t=h[1];let _=t,b=(0,C.ls)(),{updateThread:y}=(0,C.an)();h[2]!==p||h[3]!==v||h[4]!==f?(n=v&&p&&(0,o.G7)("load_paginated_threads_on_diff")?`${iA(f)}?after=${p}`:null,h[2]=p,h[3]=v,h[4]=f,h[5]=n):n=h[5];let w=n;if(h[6]!==f)i=[ef.uT.threads,f],h[6]=f,h[7]=i;else i=h[7];return h[8]!==f?(a=iA(f),h[8]=f,h[9]=a):a=h[9],h[10]!==_||h[11]!==w?(s=[{data:_,nextUrl:w}],h[10]=_,h[11]=w,h[12]=s):s=h[12],h[13]!==f?(r=iA(f),h[13]=f,h[14]=r):r=h[14],h[15]!==r?(d=[r],h[15]=r,h[16]=d):d=h[16],h[17]!==s||h[18]!==d?(c={pages:s,pageParams:d},h[17]=s,h[18]=d,h[19]=c):c=h[19],h[20]!==b||h[21]!==y?(m=async e=>{let{pageParam:t}=e,n=await (0,eS.QJ)(t);if(!n.ok)throw Error(`Failed to fetch thread data from ${t}: HTTP ${n.status}`);let i=await n.json(),l=n.headers.get("Link"),a=(0,iP.N)(l,"next");for(let e of i){let t=Number(e.id),n=b(t);if(n)if(n.positioning){let i=n.positioning.path,l="RIGHT"===n.positioning.endDiffSide?"R":"L";y(t,i,e.subjectType?.toUpperCase()==="FILE"?"FILE":n.positioning.endLine?`${l}${n.positioning.endLine}`:N.Ao,()=>({...e,positioning:n.positioning,hideUntilLoadedAndInView:!0}))}else y(t,N.Ao,N.Ao,()=>e);else y(t,N.Ao,N.Ao,()=>e)}return{data:i,nextUrl:a}},h[20]=b,h[21]=y,h[22]=m):m=h[22],h[23]!==c||h[24]!==m||h[25]!==i||h[26]!==a?(u={queryKey:i,initialPageParam:a,initialData:c,queryFn:m,getNextPageParam:iO,staleTime:1/0,retry:1},h[23]=c,h[24]=m,h[25]=i,h[26]=a,h[27]=u):u=h[27],(0,iD.U)(u)}(k),eX=(0,x.useRef)(!1);el[36]!==eJ||el[37]!==eZ||el[38]!==eY?($=()=>{(async()=>{!eZ||eY||eX.current||(eX.current=!0,await eJ(),eX.current=!1)})()},B=[eZ,eY,eJ],el[36]=eJ,el[37]=eZ,el[38]=eY,el[39]=$,el[40]=B):($=el[39],B=el[40]),(0,x.useEffect)($,B);let e0=(0,C.qg)(),{isServer:e1}=(0,iV.V)(),e2=eR||ej,e3=(0,C.I8)(),{updateDiffFilter:e4}=(0,C.or)();el[41]!==ec.initialState||el[42]!==e4?(q=()=>{e4({...ec.initialState,unselectedFileExtensions:new Set(ec.initialState.unselectedFileExtensions)})},M=[e4,ec.initialState],el[41]=ec.initialState,el[42]=e4,el[43]=q,el[44]=M):(q=el[43],M=el[44]),(0,x.useEffect)(q,M);let e5=(0,C.mU)();(0,C.nE)(),el[45]!==e4?(V=e=>{e4(e,!0)},el[45]=e4,el[46]=V):V=el[46];let e6=V;el[47]!==eG||el[48]!==eM.compactMode?(G=()=>{"none"!==eM.compactMode&&eG()},el[47]=eG,el[48]=eM.compactMode,el[49]=G):G=el[49];let e7=G,e8=(0,x.useRef)(null),e9="expanded"!==eM.wideMode?"small":"medium";el[50]!==e3||el[51]!==ec.menuOptions||el[52]!==e6||el[53]!==eu.pathName||el[54]!==e9||el[55]!==eb.currentUserLogin?(U=(0,i.jsx)(R,{ref:e8,basePath:eu.pathName,fileFilterMenuOptions:ec.menuOptions,fileFilterState:e3,setFileFilterState:e6,viewerLogin:eb.currentUserLogin,filterSize:e9}),el[50]=e3,el[51]=ec.menuOptions,el[52]=e6,el[53]=eu.pathName,el[54]=e9,el[55]=eb.currentUserLogin,el[56]=U):U=el[56];let te=U,tt=(0,tE.Yf)(),tn=(0,C.gt)(),ti=ed.length>0,tl=eo.useChangeGroups&&tn&&ti;el[57]!==tl?(z={changeGroupsEnabled:tl},el[57]=tl,el[58]=z):z=el[58],function(e){let t,n,i,a=(0,l.c)(11),{changeGroupsEnabled:s}=e,r=(0,C.gt)(),o=(0,C.iY)(),c=!!(o&&o.length>0),m=(0,d.u)("generate_groups_on_files_view"),{mutate:u}=function(){let e,t,n,i=(0,l.c)(7),a=(0,ep.e)(ef.uT.generateChangeGroups),{updateChangeGroupGeneration:s}=(0,C.wL)();return i[0]!==a?(e=async()=>{let e=await (0,ex.q$)(a,{method:"POST"}),t=await (0,ex.hp)(e);return(0,ex.R)(e,t),t},i[0]=a,i[1]=e):e=i[1],i[2]!==s?(t=e=>{s(e)},i[2]=s,i[3]=t):t=i[3],i[4]!==e||i[5]!==t?(n={mutationFn:e,onSuccess:t},i[4]=e,i[5]=t,i[6]=n):n=i[6],(0,eg.n)(n)}(),h=(0,C.Fl)();a[0]!==h?(t=h&&(function(e){switch(e){case"ABANDONED":case"FAILED":case"SKIPPED":return!0;default:return!1}}(h.state)||!eC(h.state)),a[0]=h,a[1]=t):t=a[1];let f=t,p=(0,C.ww)(),g=(0,x.useRef)(!1);a[2]!==r||a[3]!==s||a[4]!==u||a[5]!==c||a[6]!==p||a[7]!==f||a[8]!==m?(n=()=>{g.current||!m||!s||!r||c||p||f||(u(),g.current=!0)},i=[r,m,u,c,f,p,s],a[2]=r,a[3]=s,a[4]=u,a[5]=c,a[6]=p,a[7]=f,a[8]=m,a[9]=n,a[10]=i):(n=a[9],i=a[10]),(0,x.useEffect)(n,i)}(z),el[59]!==eU?(H=()=>{eU(),window.requestAnimationFrame(()=>{e8.current?.focus()})},el[59]=eU,el[60]=H):H=el[60];let ta=H;el[61]!==ta||el[62]!==eL?(W=(0,i.jsx)(c.ak,{commands:{"pull-request-files-changed:collapse-expand-comments":eL,"pull-request-files-changed:focus-file-tree-filter":ta}}),el[61]=ta,el[62]=eL,el[63]=W):W=el[63],el[64]!==te||el[65]!==tl||el[66]!==eG||el[67]!==er||el[68]!==eo.useAdvancedToolbar||el[69]!==eo.useBasicToolbar||el[70]!==e0||el[71]!==e5||el[72]!==e7||el[73]!==e6||el[74]!==ev||el[75]!==eu||el[76]!==eh||el[77]!==eV||el[78]!==eM.compactMode||el[79]!==eM.wideMode||el[80]!==eb.currentUserLogin||el[81]!==eb.lastReviewOid||el[82]!==eb.shouldShowViewedFilesCount||el[83]!==ey?(Q=eo.useAdvancedToolbar||eo.useBasicToolbar?(0,i.jsxs)(i.Fragment,{children:[eo.useAdvancedToolbar&&(0,i.jsx)(iE,{changeGroupsPreferenceAvailable:tl,commits:er,currentUserLogin:eb.currentUserLogin,isFileTreeExpanded:"expanded"===eM.wideMode,lastReviewOid:eb.lastReviewOid,pageLimits:ev,pullRequest:eu,repository:eh,shouldShowViewedFilesCount:eb.shouldShowViewedFilesCount,totalFilesCount:e0,treeToggleElement:eV,userNotices:ey}),eo.useBasicToolbar&&(0,i.jsx)(iB,{fileFilter:te,isFileTreeExpanded:"expanded"===eM.wideMode,shouldShowViewedFilesCount:eb.shouldShowViewedFilesCount,totalFilesCount:e0,treeToggleElement:eV,userNotices:ey}),"overlay"===eM.compactMode&&(0,i.jsx)(u.l,{onClose:()=>eG(),position:{narrow:"fullscreen",regular:"left",wide:"left"},title:"Files",className:"p-0",children:(0,i.jsx)(eA,{allowPullRequestGroups:tl,fileFilter:te,filteredDiffs:e5,onFileSelected:e7,onSetFilterState:e6})})]}):null,el[64]=te,el[65]=tl,el[66]=eG,el[67]=er,el[68]=eo.useAdvancedToolbar,el[69]=eo.useBasicToolbar,el[70]=e0,el[71]=e5,el[72]=e7,el[73]=e6,el[74]=ev,el[75]=eu,el[76]=eh,el[77]=eV,el[78]=eM.compactMode,el[79]=eM.wideMode,el[80]=eb.currentUserLogin,el[81]=eb.lastReviewOid,el[82]=eb.shouldShowViewedFilesCount,el[83]=ey,el[84]=Q):Q=el[84],el[85]!==te||el[86]!==tl||el[87]!==eo.useBasicToolbar||el[88]!==eo.useFileTree||el[89]!==e5||el[90]!==e7||el[91]!==ek||el[92]!==e6||el[93]!==eO||el[94]!==eB||el[95]!==eM.compactMode||el[96]!==eM.wideMode||el[97]!==eb.fileTreeWidth?(K=eo.useFileTree?(0,i.jsx)(h.O7.Pane,{position:"start",sticky:!0,offsetHeader:eo.useBasicToolbar?"50px":"60px","aria-label":"File tree",width:{min:"256px",default:`${eO&&eb.fileTreeWidth?eb.fileTreeWidth:296}px`,max:"700px"},padding:"none",className:(0,g.$)("DiffComparisonViewer-module__Pane__qt0lk",eB&&"DiffComparisonViewer-module__HiddenPane__GXkzX","expanded"===eM.wideMode&&iF,"collapsed"===eM.wideMode&&"DiffComparisonViewer-module__WideCollapsed__gwl74","none"===eM.compactMode&&"DiffComparisonViewer-module__CompactHidden__O9P2K","overlay"===eM.compactMode&&"DiffComparisonViewer-module__CompactOverlay__FQ2m7","inline"===eM.compactMode&&"DiffComparisonViewer-module__CompactInline__cMCtO","DiffComparisonViewer-module__PaneOverflowVisible__hPL5H"),divider:{regular:"inline"===eM.compactMode?"none":"line",narrow:"none"},currentWidth:eb.fileTreeWidth,widthStorageKey:"diff-tree-pane-width",onResizeEnd:ek,resizable:"inline"!==eM.compactMode,children:(0,i.jsx)(eA,{allowPullRequestGroups:tl,className:(0,g.$)("PullRequestFileTree-module__sidebar__PJ8nx","DiffComparisonViewer-module__PaneContain__zbswe"),fileFilter:te,filteredDiffs:e5,onFileSelected:e7,onSetFilterState:e6})}):null,el[85]=te,el[86]=tl,el[87]=eo.useBasicToolbar,el[88]=eo.useFileTree,el[89]=e5,el[90]=e7,el[91]=ek,el[92]=e6,el[93]=eO,el[94]=eB,el[95]=eM.compactMode,el[96]=eM.wideMode,el[97]=eb.fileTreeWidth,el[98]=K):K=el[98];let ts="inline"===eM.compactMode;el[99]!==ts?(Z={narrow:!1,regular:ts},el[99]=ts,el[100]=Z):Z=el[100];let tr=("expanded"===eM.wideMode||tt)&&iF;return el[101]!==tr?(Y=(0,g.$)("DiffComparisonViewer-module__Content__DYd2m",tr,"DiffComparisonViewer-module__NarrowScreenContent__s_87n"),el[101]=tr,el[102]=Y):Y=el[102],el[103]!==es||el[104]!==er||el[105]!==eu||el[106]!==eh?(J=es&&(0,i.jsx)(lG,{commit:es,pullRequest:eu,commits:er,repository:eh}),el[103]=es,el[104]=er,el[105]=eu,el[106]=eh,el[107]=J):J=el[107],el[108]!==e2||el[109]!==ew||el[110]!==eh||el[111]!==e_?(X=(0,i.jsx)(lZ,{isDiffVirtualizationEnabled:e2,isInSingleFileMode:ew,repository:eh,urls:e_}),el[108]=e2,el[109]=ew,el[110]=eh,el[111]=e_,el[112]=X):X=el[112],el[113]!==ev?(ee=(0,i.jsx)(eq,{pageLimits:ev}),el[113]=ev,el[114]=ee):ee=el[114],el[115]!==e5||el[116]!==e6||el[117]!==e2||el[118]!==e1||el[119]!==ew||el[120]!==eu.globalRelayId||el[121]!==eu.headBranch||el[122]!==eu.headRepositoryName||el[123]!==eu.headRepositoryOwnerLogin||el[124]!==eh?(et=e2&&!e1?(0,i.jsx)(lk,{headBranchName:eu.headBranch,headRepoName:eu.headRepositoryName,headRepoOwner:eu.headRepositoryOwnerLogin,onSetFilterState:e6,pullRequestGlobalRelayId:eu.globalRelayId,repository:eh,showPullRequestGroups:!0}):(0,i.jsx)(i.Fragment,{children:ew?(0,i.jsx)(lz,{filteredDiffSummaries:e5,headBranchName:eu.headBranch,headRepoName:eu.headRepositoryName,headRepoOwner:eu.headRepositoryOwnerLogin,pullRequestGlobalRelayId:eu.globalRelayId,repository:eh}):(0,i.jsx)(lR,{headBranchName:eu.headBranch,headRepoName:eu.headRepositoryName,headRepoOwner:eu.headRepositoryOwnerLogin,onSetFilterState:e6,pullRequestGlobalRelayId:eu.globalRelayId,repository:eh,showPullRequestGroups:!0})}),el[115]=e5,el[116]=e6,el[117]=e2,el[118]=e1,el[119]=ew,el[120]=eu.globalRelayId,el[121]=eu.headBranch,el[122]=eu.headRepositoryName,el[123]=eu.headRepositoryOwnerLogin,el[124]=eh,el[125]=et):et=el[125],el[126]!==Z||el[127]!==Y||el[128]!==J||el[129]!==X||el[130]!==ee||el[131]!==et?(en=(0,i.jsxs)(h.O7.Content,{as:"div",width:"full",hidden:Z,padding:"none",className:Y,children:[J,X,ee,et]}),el[126]=Z,el[127]=Y,el[128]=J,el[129]=X,el[130]=ee,el[131]=et,el[132]=en):en=el[132],el[133]!==W||el[134]!==Q||el[135]!==K||el[136]!==en?(ei=(0,i.jsxs)(i.Fragment,{children:[W,Q,K,en]}),el[133]=W,el[134]=Q,el[135]=K,el[136]=en,el[137]=ei):ei=el[137],ei}function lX(){}function l0(){}function l1(e){let t,n,a,s,r,o,d,c,m,u,p,v,_,b=(0,l.c)(17),{children:y,className:w,dockedPanelWidth:j,owner:S,repo:C,pullNumber:N}=e,R=(0,tE.Yf)(),T=(0,tE.JE)();v=(0,l.c)(8),_=(0,x.useRef)(j),v[0]!==j?(c=()=>{null!=j&&(_.current=j)},m=[j],v[0]=j,v[1]=c,v[2]=m):(c=v[1],m=v[2]),(0,x.useEffect)(c,m),v[3]!==S||v[4]!==N||v[5]!==C?(u=()=>{if(!S||!C||!N)return;let e=localStorage.setItem.bind(localStorage);return localStorage.setItem=(t,n)=>{if(e(t,n),t!==lK)return;let i=parseInt(n,10);isNaN(i)||i<=0||i!==_.current&&(_.current=i,(0,f.M3)()&&lQ(i,S,C,N))},()=>{localStorage.setItem=e}},p=[S,C,N],v[3]=S,v[4]=N,v[5]=C,v[6]=u,v[7]=p):(u=v[6],p=v[7]),(0,x.useEffect)(u,p);let E=null!=j&&j>=450&&j<=768?j:544;b[0]!==w?(t=(0,g.$)("DiffComparisonViewer-module__Container__YGBgR",w,"DiffComparisonViewer-module__ContainerSidePanel__iIFyg"),b[0]=w,b[1]=t):t=b[1];let L=R&&!T,I=(!R||T)&&"DiffComparisonViewer-module__HiddenSidePanel__Ak8xR";b[2]!==I?(n=(0,g.$)("DiffComparisonViewer-module__SidePanel__S_Ttg",I),b[2]=I,b[3]=n):n=b[3];let D=`${E}px`;return b[4]!==D?(a={min:"450px",default:D,max:"768px"},b[4]=D,b[5]=a):a=b[5],b[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,i.jsx)("div",{className:"height-full",children:(0,i.jsx)(tD.r,{})}),b[6]=s):s=b[6],b[7]!==n||b[8]!==a?(r=(0,i.jsx)(h.O7.Sidebar,{resizable:!0,className:n,responsiveVariant:"fullscreen",sticky:!0,position:"end",width:a,widthStorageKey:lK,children:s}),b[7]=n,b[8]=a,b[9]=r):r=b[9],b[10]!==y||b[11]!==r?(o=(0,i.jsxs)(h.O7,{children:[y,r]}),b[10]=y,b[11]=r,b[12]=o):o=b[12],b[13]!==t||b[14]!==L||b[15]!==o?(d=(0,i.jsx)("div",{id:iG.Ti,className:t,"data-side-panel-open":L,children:o}),b[13]=t,b[14]=L,b[15]=o,b[16]=d):d=b[16],d}lZ.displayName="LargeDiffOptimizationsBanner",lY.displayName="BaseDiffComparisonViewer",lJ.displayName="InternalDiffComparisonViewer",l1.displayName="Container";let l2=Object.assign({},{Container:l1,Header:h.O7.Header,Viewer:lY})},80645(e,t,n){n.d(t,{O:()=>Q});var i=n(74848),l=n(96540),a=n(45360),s=n(23666),r=n(95126),o=n(30012),d=n(7478),c=n(83223),m=n(56149),u=n(21373),h=n(62935),f=n(49305),p=n(32363),g=n(50964),x=n(34256),v=n(97665),_=n(68108),b=n(16522),y=n(89149),w=n(62764),j=n(49671),S=n(78597),C=n(94747);async function N(e){let t=await e.json();if(t.error)throw Error(t.error);let n=await (await (0,y.Ee)(t.orchestration.url,{headers:{accept:"application/json"}})).json();if(n.orchestration.error_message)throw Error(n.orchestration.error_message)}function R(e,t,n){return n&&n!==t?`${t}:${e}`:e}var T=n(23707),E=n(19315),L=n(58209),I=n(52130),D=n(5095),P=n(55717);let A="PullRequestBranchName-module__truncateBranch__cQb3D";function O(e){let t=(0,b.c)(12),{branchText:n,repositoryOwner:l,repositoryName:a,branch:r}=e;if(a&&l){let e,o,d;t[0]!==r||t[1]!==a||t[2]!==l?(e=(0,s.WJ9)({owner:l,repo:a,branch:r}),t[0]=r,t[1]=a,t[2]=l,t[3]=e):e=t[3];let c=e,m=`${l}/${a}:${r}`;return t[4]!==n||t[5]!==c?(o=(0,i.jsx)(D.A,{href:c,className:A,children:n}),t[4]=n,t[5]=c,t[6]=o):o=t[6],t[7]!==m||t[8]!==o?(d=(0,i.jsx)(P.m,{text:m,children:o}),t[7]=m,t[8]=o,t[9]=d):d=t[9],d}{let e;return t[10]!==n?(e=(0,i.jsx)(D.A,{as:"span",className:A,title:"This repository has been deleted",children:n}),t[10]=n,t[11]=e):e=t[11],e}}O.displayName="PullRequestBranchName";var F=n(32694),k=n(66818),$=n(38621),B=n(46623);function q(e){let t,n,l,a,s=(0,b.c)(6);return s[0]!==e?({state:n,...t}=e,s[0]=e,s[1]=t,s[2]=n):(t=s[1],n=s[2]),l=n===_.Q.Queued?B.I.IN_MERGE_QUEUE:B.I[n],s[3]!==l||s[4]!==t?(a=(0,i.jsx)(l,{...t}),s[3]=l,s[4]=t,s[5]=a):a=s[5],a}q.displayName="StateIcon";var M=n(6877);function V(e){let t,n,a,r,o,d,c,m,h,f,p,g,x,v=(0,b.c)(38),{pullRequestNumber:_,stack:y}=e,w=(0,M.u)("pull_request_stacks"),[j,S]=(0,l.useState)(!1);if(!w||!y)return null;let{baseBranch:C,repositoryOwnerLogin:N,repositoryName:T,position:E,size:L,pulls:I}=y;v[0]!==C||v[1]!==N?(t=R(C,N,N),v[0]=C,v[1]=N,v[2]=t):t=v[2];let P=t;if(v[3]===Symbol.for("react.memo_cache_sentinel")?(n=()=>S(!0),a=()=>S(!1),v[3]=n,v[4]=a):(n=v[3],a=v[4]),v[5]!==E||v[6]!==L?(r=e=>(0,i.jsxs)(u.Q,{className:"d-inline",variant:"link",leadingVisual:$.StackIcon,"aria-label":`Navigate pull request stack, position ${E} of ${L}`,...e,children:[E,"/",L]}),v[5]=E,v[6]=L,v[7]=r):r=v[7],v[8]!==_||v[9]!==I){let e;v[11]!==_?(e=e=>(0,i.jsxs)(F.c.Item,{href:e.url,"aria-current":e.number===_?"page":void 0,children:[(0,i.jsx)(q,{state:e.state})," ",e.title," ",(0,i.jsxs)("span",{className:"fgColor-muted",children:["#",e.number]})]},e.number),v[11]=_,v[12]=e):e=v[12],o=I.map(e),v[8]=_,v[9]=I,v[10]=o}else o=v[10];return v[13]!==C||v[14]!==T||v[15]!==N?(d=(0,s.WJ9)({owner:N,repo:T,branch:C}),v[13]=C,v[14]=T,v[15]=N,v[16]=d):d=v[16],v[17]!==P?(c=(0,i.jsx)(D.A,{as:"span",children:P}),v[17]=P,v[18]=c):c=v[18],v[19]!==d||v[20]!==c?(m=(0,i.jsx)(F.c.Item,{href:d,children:c}),v[19]=d,v[20]=c,v[21]=m):m=v[21],v[22]!==o||v[23]!==m?(h=(0,i.jsxs)(F.c,{className:"m-1",children:[o,m]}),v[22]=o,v[23]=m,v[24]=h):h=v[24],v[25]!==j||v[26]!==r||v[27]!==h?(f=(0,i.jsx)(k.T,{open:j,onOpen:n,onClose:a,renderAnchor:r,children:h}),v[25]=j,v[26]=r,v[27]=h,v[28]=f):f=v[28],v[29]===Symbol.for("react.memo_cache_sentinel")?(p=(0,i.jsx)($.ArrowRightIcon,{verticalAlign:"middle",size:16}),v[29]=p):p=v[29],v[30]!==C||v[31]!==P||v[32]!==T||v[33]!==N?(g=(0,i.jsx)(O,{branch:C,branchText:P,repositoryName:T,repositoryOwner:N}),v[30]=C,v[31]=P,v[32]=T,v[33]=N,v[34]=g):g=v[34],v[35]!==f||v[36]!==g?(x=(0,i.jsxs)("div",{className:"fgColor-muted d-flex flex-items-center",children:[f,p," ",g]}),v[35]=f,v[36]=g,v[37]=x):x=v[37],x}V.displayName="StackState";var G=n(61398),U=n(69161),z=n(78431);function H({setIsEditing:e,stack:t}){let n=(0,M.u)("pull_request_stacks"),[a,s]=(0,l.useState)(!1),[r,o]=(0,l.useState)(""),d=(0,v.jE)(),c=(0,T.f)(),{mutate:m,isPending:h}=function(){let e,t=(0,b.c)(2),{basePageDataUrl:n}=(0,U.Yu)(),i=`${n}/page_data/${w.uT.unstackPullRequests}`;return t[0]!==i?(e={mutationFn:async e=>{let{stackId:t}=e,n=`${i}/${t}`,l=await (0,z.q$)(n,{method:"DELETE"}),a=await (0,z.hp)(l);return(0,z.R)(l,a),a}},t[0]=i,t[1]=e):e=t[1],(0,C.n)(e)}(),f=(0,l.useRef)(null),p=e=>{o(e)};if(!n||!t)return null;let g=t.pulls.some(e=>!e.isUnstackable);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.Q,{ref:f,onClick:()=>{s(!0)},size:"small",inactive:g,children:"Unstack"}),(0,i.jsx)(W,{unstackButtonRef:f,onCancelUnstack:()=>{s(!1),o("")},onConfirmUnstack:()=>{t&&(o(""),m({stackId:t.id},{onError:e=>p(e.message),onSuccess:async()=>{try{await d.refetchQueries({queryKey:c},{throwOnError:!0}),e?.(!1),s(!1)}catch{p("Something unexpected happened. Please refresh the page.")}}}))},isConfirmingUnstack:a,isInactive:g,isLoading:h,errorMessage:r})]})}function W(e){let t,n,l,a,s,r,o=(0,b.c)(22),{unstackButtonRef:d,onCancelUnstack:c,onConfirmUnstack:m,isConfirmingUnstack:u,isInactive:h,isLoading:f,errorMessage:p}=e;if(!u)return null;if(h){let e;return o[0]!==c||o[1]!==d?(e=(0,i.jsx)(G.l,{title:"Unstacking not allowed",returnFocusRef:d,onClose:c,children:"One or more pull requests in the stack are queued for merge. Remove from queue and try again."}),o[0]=c,o[1]=d,o[2]=e):e=o[2],e}o[3]!==c?(t={buttonType:"default",content:"Cancel",onClick:c},o[3]=c,o[4]=t):t=o[4];let g=f?"true":void 0;o[5]!==f||o[6]!==m||o[7]!==g?(n={buttonType:"primary",content:"Confirm",onClick:m,"aria-disabled":g,disabled:f,loading:f},o[5]=f,o[6]=m,o[7]=g,o[8]=n):n=o[8],o[9]!==t||o[10]!==n?(l=[t,n],o[9]=t,o[10]=n,o[11]=l):l=o[11],o[12]!==p?(a=p&&(0,i.jsx)(x.v,{className:"mt-2",variant:"critical",children:p}),o[12]=p,o[13]=a):a=o[13];let v=f?"Unstacking pull requests in progress.":"";return o[14]!==v?(s=(0,i.jsx)("span",{className:"sr-only","aria-live":"polite",children:v}),o[14]=v,o[15]=s):s=o[15],o[16]!==c||o[17]!==l||o[18]!==a||o[19]!==s||o[20]!==d?(r=(0,i.jsxs)(G.l,{title:"Are you sure you want to unstack these pull requests?",returnFocusRef:d,onClose:c,footerButtons:l,children:["All pull requests will be removed from the stack. Their base branches will not be retargeted and their commit histories will remain the same.",a,s]}),o[16]=c,o[17]=l,o[18]=a,o[19]=s,o[20]=d,o[21]=r):r=o[21],r}function Q({author:e,baseBranch:t,baseRepositoryDefaultBranch:n="",baseRepositoryName:y="",baseRepositoryOwnerLogin:D="",canChangeBase:P=!1,commitsCount:A,headBranch:F,headRepositoryOwnerLogin:k="",headRepositoryName:$="",isInAdvisoryRepo:B,isEditing:q=!1,mergedBy:M,mergedByName:G,mergedTime:U,pullRequestId:z,pullRequestNumber:W,repositoryId:K,setIsEditing:Z,state:Y,stack:J}){var X,ee,et;let en,ei,el,ea,es=(0,r.yY)(),er=(0,v.jE)(),{refListCacheKey:eo}=(0,g.X)(),[ed,ec]=(0,l.useState)(!1),[em,eu]=(0,l.useState)(!1),[eh,ef]=(0,l.useState)(""),[ep,eg]=(0,l.useState)(""),ex=(0,T.f)(),ev=(0,I.NP)(),{mutate:e_}=(el=(0,b.c)(2),ea=(0,j.e)(w.uT.changeBase),el[0]!==ea?(ei={mutationFn:e=>{let{newBaseBranch:t}=e,n=btoa(t);return(0,S.Sr)(ea,{method:"PATCH",body:{new_base_binary:n}})},onSuccess:N},el[0]=ea,el[1]=ei):ei=el[1],(0,C.n)(ei)),eb=e=>{eu(!1),ef(e)},ey=em?()=>(0,i.jsx)(d.A,{size:"small"}):null,ew=R(t,D,k),ej=function(e,t,n,i,l){if(!t)return"unknown repository";let a=!!t&&t!==e,s=l&&!!n;switch(!0){case a&&s:return`${t}/${n}:${i}`;case a:return`${t}:${i}`;case s:return`${n}:${i}`;default:return i}}(D,k,$,F,B),eS=Y===_.Q.Merged?M?{login:M,displayName:G}:null:e,eC=(X=Y,ee=A,et=eS?.login,en=`${ee} ${ee>1?"commits":"commit"}`,X!==_.Q.Merged?`wants to merge ${en} into`:et?`merged ${en} into`:`${en} merged into`),eN=P&&q&&!J;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:"fgColor-muted d-flex flex-items-center overflow-hidden PullRequestHeaderSummary-module__summaryContainer__dA7dP",children:[eS?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.A,{inline:!0,className:"fgColor-muted text-bold",...es("user",{login:eS.login}),href:`/${eS.login}`,children:(0,i.jsx)(o.v,{login:eS.login,profileName:eS.displayName,isAgent:!1})})," "]}):null,eC,eN?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.PI,{cacheKey:eo,canCreate:!1,closeOnSelect:!0,currentCommitish:t,defaultBranch:n,hideShowAll:!0,owner:D,repo:y,types:["branch"],onSelectItem:e=>{ec(!0),eg(e)}}),(0,i.jsx)(m.ZL,{children:(0,i.jsxs)(f.A,{"aria-labelledby":"confirm-change-base-branch",isOpen:ed,onDismiss:()=>{ec(!1),eg(""),ef("")},children:[(0,i.jsx)(f.A.Header,{id:"confirm-change-base-branch",children:"Are you sure you want to change the base?"}),(0,i.jsxs)("div",{className:"tmp-p-3",children:[(0,i.jsx)("span",{children:"Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated."}),eh&&(0,i.jsx)(x.v,{className:"mt-2",variant:"critical",children:eh}),(0,i.jsx)("span",{className:"sr-only","aria-live":"polite",children:em?"Base branch update in progress.":""}),(0,i.jsx)(u.Q,{alignContent:"center","aria-disabled":em?"true":void 0,block:!0,className:"tmp-mt-3",disabled:em,leadingVisual:ey,onClick:()=>{eu(!0),e_({newBaseBranch:ep},{onError:e=>eb(e.message),onSuccess:async()=>{try{await Promise.all([er.refetchQueries({queryKey:ex},{throwOnError:!0}),er.refetchQueries({queryKey:ev},{throwOnError:!0})]),eu(!1),Z?.(!1),ec(!1)}catch{eb("Unable to refetch commits. Please refresh the page.")}}})},variant:"primary",children:em?null:"Change base"})]})]})})]}):(0,i.jsx)(O,{branch:t,branchText:ew,repositoryName:y,repositoryOwner:D}),(0,i.jsx)("span",{children:"from "}),(0,i.jsxs)("div",{className:"d-flex flex-items-center overflow-hidden gap-1",children:[(0,i.jsx)(O,{branch:F,branchText:ej,repositoryName:$,repositoryOwner:k}),(0,i.jsx)(a.T,{ariaLabel:"Copy head branch name to clipboard",size:"small",textToCopy:k?ej:F})]}),Y===_.Q.Merged&&(0,i.jsx)(h.A,{datetime:U}),Y===_.Q.Open&&!(0,L.kA)()&&(0,i.jsx)(E.i,{processingIndicatorUrl:(0,s.CZ9)({owner:D,repo:y,number:W}),repositoryId:K,pullRequestId:z})]}),J&&(0,i.jsxs)("div",{className:"d-flex flex-items-center gap-2 mt-2",children:[(0,i.jsx)(V,{pullRequestNumber:W,stack:J}),q&&(0,i.jsx)(H,{setIsEditing:Z,stack:J})]})]})}H.displayName="UnstackButton",W.displayName="UnstackDialog",Q.displayName="PullRequestHeaderSummary"},28569(e,t,n){n.d(t,{u:()=>o});var i=n(74848),l=n(16522),a=n(79335),s=n(34164),r=n(68108);function o(e){let t,n,o=(0,l.c)(6),{className:d,state:c}=e,m=r.a[c];o[0]!==d?(t=(0,s.$)("flex-self-start",d),o[0]=d,o[1]=t):t=o[1];let u=m.status;return o[2]!==m.description||o[3]!==t||o[4]!==u?(n=(0,i.jsx)(a.A,{className:t,status:u,children:m.description}),o[2]=m.description,o[3]=t,o[4]=u,o[5]=n):n=o[5],n}o.displayName="PullRequestStateLabel"},71677(e,t,n){n.d(t,{I:()=>s,r:()=>r});var i=n(74848),l=n(16522),a=n(96540);let s="docked-side-panel-content",r=(0,a.memo)(function(){let e,t=(0,l.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{id:s,className:"height-full"}),t[0]=e):e=t[0],e});r.displayName="DockedSidePanelContent"},11452(e,t,n){n.d(t,{s:()=>p,Z:()=>y});var i=n(74848),l=n(16522),a=n(96540),s=n(38621),r=n(24217),o=n(51875),d=n(46249),c=n(26108),m=n(57919),u=n(34164),h=n(96613),f=n(26316);let p={agentSessions:"Agent sessions",comments:"Comments",alerts:"Alerts",overview:"Overview",mergeStatus:"Merge status"};function g(e){let t,n=(0,l.c)(2),{children:a}=e;return n[0]!==a?(t=(0,i.jsx)(i.Fragment,{children:a}),n[0]=a,n[1]=t):t=n[1],t}function x(e){let t,n,a=(0,l.c)(5),{children:s,className:r}=e,o=r??"pr-p-3";return a[0]!==o?(t=(0,u.$)("flex-1 overflow-auto",o),a[0]=o,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}function v(e){let t,n=(0,l.c)(2),{children:a}=e;return n[0]!==a?(t=(0,i.jsx)(i.Fragment,{children:a}),n[0]=a,n[1]=t):t=n[1],t}function _(e){let t,n,s,r,o,d=(0,l.c)(2),{children:c}=e,m=(0,a.useRef)(null);return r=(0,l.c)(3),o=(0,a.useRef)(0),r[0]!==m?(n=()=>{let e=m.current;if(!e)return;let t=function(){if(o.current=0,!e)return;let t=Math.max(0,window.innerHeight-e.getBoundingClientRect().top);e.style.maxHeight=`${t}px`},n=function(){o.current||(o.current=requestAnimationFrame(t))};return t(),window.addEventListener("scroll",n),window.addEventListener("resize",n),()=>{window.removeEventListener("scroll",n),window.removeEventListener("resize",n),o.current&&cancelAnimationFrame(o.current),e.style.maxHeight=""}},s=[m],r[0]=m,r[1]=n,r[2]=s):(n=r[1],s=r[2]),(0,a.useEffect)(n,s),d[0]!==c?(t=(0,i.jsx)("div",{ref:m,className:"Panel-module__ViewportFill__sFEdz",children:c}),d[0]=c,d[1]=t):t=d[1],t}function b(e){let t,n,s,r,o,d=(0,l.c)(2),{children:c}=e,m=(0,a.useRef)(null);return r=(0,l.c)(3),o=(0,a.useRef)(0),r[0]!==m?(n=()=>{let e=m.current;if(!e)return;let t=e.closest('[role="dialog"]');if(!t)return;let n=function(){if(o.current=0,!e||!t)return;let n=Math.floor(t.getBoundingClientRect().bottom-e.getBoundingClientRect().top);n>0&&e.style.height!==`${n}px`&&(e.style.height=`${n}px`)},i=new ResizeObserver(()=>{o.current||(o.current=requestAnimationFrame(n))});return n(),i.observe(t),()=>{i.disconnect(),o.current&&cancelAnimationFrame(o.current),e.style.height=""}},s=[m],r[0]=m,r[1]=n,r[2]=s):(n=r[1],s=r[2]),(0,a.useEffect)(n,s),d[0]!==c?(t=(0,i.jsx)("div",{ref:m,className:"Panel-module__DialogFill__hj9sW",children:c}),d[0]=c,d[1]=t):t=d[1],t}function y(e){let t,n,u,_,b,y,j,S,C,N,R=(0,l.c)(24),{panelName:T,children:E}=e,{closeButtonRef:L,returnFocusRef:I}=(0,h.cM)(),{closePanel:D}=(0,h.LI)(),P=(0,h.JE)(),A=(0,a.useRef)(null),[O,F]=(0,a.useState)(w);R[0]!==D||R[1]!==I?(t=()=>{let e=I.current;D(),e&&requestAnimationFrame(()=>e.focus())},R[0]=D,R[1]=I,R[2]=t):t=R[2];let k=t,$=p[T];R[3]===Symbol.for("react.memo_cache_sentinel")?(n={header:g,body:x,footer:v},R[3]=n):n=R[3];let[B]=(0,m.H)(E,n),q=!O;return R[4]!==q?(u={containerRef:A,disabled:q},R[4]=q,R[5]=u):u=R[5],(0,r.r)(u),R[6]!==k?(_=()=>{A.current?.contains(document.activeElement)&&k()},b=[k],R[6]=k,R[7]=_,R[8]=b):(_=R[7],b=R[8]),(0,o.P)(_,b),R[9]!==L?(y=()=>{let e=f.cg?.matchMedia("(max-width: calc(48rem - 0.02px))"),t=e=>{F(e.matches),e.matches&&!A.current?.contains(document.activeElement)&&L.current?.focus()};return e?.addEventListener("change",t),()=>e?.removeEventListener("change",t)},j=[L],R[9]=L,R[10]=y,R[11]=j):(y=R[10],j=R[11]),(0,a.useEffect)(y,j),R[12]!==L||R[13]!==k||R[14]!==$||R[15]!==P||R[16]!==B.header?(S=(!P||B.header)&&(0,i.jsxs)("div",{className:"Panel-module__Header__xEN9c",children:[!P&&(0,i.jsxs)("div",{className:"Panel-module__HeaderContent__kGBUi",children:[(0,i.jsx)(d.A,{as:"h3",className:"Panel-module__Heading__LLNzs",children:$}),(0,i.jsx)(c.K,{ref:L,"aria-label":"Close side panel",icon:s.XIcon,variant:"invisible",size:"medium",onClick:k})]}),B.header]}),R[12]=L,R[13]=k,R[14]=$,R[15]=P,R[16]=B.header,R[17]=S):S=R[17],R[18]!==B.footer?(C=B.footer&&(0,i.jsx)("div",{className:"pr-p-3",children:B.footer}),R[18]=B.footer,R[19]=C):C=R[19],R[20]!==B.body||R[21]!==C||R[22]!==S?(N=(0,i.jsxs)("div",{ref:A,className:"d-flex flex-column height-full",children:[S,B.body,C]}),R[20]=B.body,R[21]=C,R[22]=S,R[23]=N):N=R[23],N}function w(){return window.matchMedia("(max-width: calc(48rem - 0.02px))").matches}g.displayName="PanelHeader",x.displayName="PanelBody",v.displayName="PanelFooter",_.displayName="PanelViewportFill",b.displayName="PanelDialogFill",y.displayName="Panel",y.Header=g,y.Body=x,y.Footer=v,y.ViewportFill=_,y.DialogFill=b},96613(e,t,n){n.d(t,{JE:()=>w,LI:()=>_,Yf:()=>b,cM:()=>y,r0:()=>d,w4:()=>v});var i=n(74848),l=n(16522),a=n(73537),s=n(88015),r=n(96540),o=n(79538);let d={AgentSessions:"agentSessions",Comments:"comments",Alerts:"alerts",Overview:"overview",MergeStatus:"mergeStatus"},c={activePanel:null,isCompact:!1,renderActive:!1};function m(e,t){switch(t.type){case"OPEN_PANEL":return{activePanel:t.panel,isCompact:t.isCompact,renderActive:!0};case"CLOSE_PANEL":return c;case"HIDE_FOR_RESIZE":return{...e,renderActive:!1};case"SHOW_ON_RESIZE":return{...e,renderActive:!0};case"TOGGLE_PANEL":if(e.activePanel===t.panel&&e.renderActive)return c;return{activePanel:t.panel,isCompact:t.isCompact,renderActive:!0}}}let u=(0,r.createContext)(c);u.displayName="DockedPanelStateContext";let h=(0,r.createContext)({openPanel:()=>void 0,closePanel:()=>void 0,togglePanel:()=>void 0});h.displayName="DockedPanelDispatchContext";let f=(0,r.createContext)({closeButtonRef:{current:null},returnFocusRef:{current:null}});f.displayName="DockedPanelFocusContext";let p="panel",g=new Set(Object.values(d));function x(e){return null!==e&&g.has(e)?e:null}function v(e){let t,n,d,g,v,_,b,y,w,j,S,C,N,R=(0,l.c)(21),{children:T,isOnSupportedRoute:E}=e;R[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,a.G7)("prs_url_search_param_panels"),R[0]=t):t=R[0];let L=t,[I,D]=(0,s.ok)(),P=(0,r.useRef)(null),A=(0,r.useRef)(null),[O,F]=(0,r.useReducer)(m,c),k=(0,r.useRef)(!1);R[1]!==I?(n=()=>{if(k.current||!L)return;k.current=!0;let e=x(I.get(p));e&&F({type:"OPEN_PANEL",panel:e,isCompact:!(0,o.QK)()})},d=[L,I],R[1]=I,R[2]=n,R[3]=d):(n=R[2],d=R[3]),(0,r.useEffect)(n,d);let $=(0,r.useRef)(O);R[4]!==O?(g=()=>{$.current=O},v=[O],R[4]=O,R[5]=g,R[6]=v):(g=R[5],v=R[6]),(0,r.useEffect)(g,v),R[7]!==I||R[8]!==D||R[9]!==O.activePanel?(_=()=>{if(!L)return;let e=x(I.get(p));if(O.activePanel===e)return;let t=new URLSearchParams(I);O.activePanel?t.set(p,O.activePanel):t.delete(p),D(t)},b=[O.activePanel,L,I,D],R[7]=I,R[8]=D,R[9]=O.activePanel,R[10]=_,R[11]=b):(_=R[10],b=R[11]),(0,r.useEffect)(_,b),R[12]===Symbol.for("react.memo_cache_sentinel")?(y={openPanel:(e,t)=>{t&&(A.current=t);let n=(0,o.QK)();F({type:"OPEN_PANEL",panel:e,isCompact:!n}),n&&requestAnimationFrame(()=>P.current?.focus())},closePanel:()=>{F({type:"CLOSE_PANEL"})},togglePanel:(e,t)=>{t&&(A.current=t);let n=(0,o.QK)();F({type:"TOGGLE_PANEL",panel:e,isCompact:!n}),$.current.activePanel!==e&&n&&requestAnimationFrame(()=>P.current?.focus())}},R[12]=y):y=R[12];let B=y;R[13]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{let e=document.getElementById(o.Ti),t=null;return e&&(t=new ResizeObserver(function(){if(!$.current.activePanel)return;let e=(0,o.QK)();$.current.isCompact||e||F({type:"HIDE_FOR_RESIZE"}),!1===$.current.renderActive&&e&&F({type:"SHOW_ON_RESIZE"})})).observe(e),()=>{t?.disconnect()}},j=[],R[13]=w,R[14]=j):(w=R[13],j=R[14]),(0,r.useEffect)(w,j),R[15]===Symbol.for("react.memo_cache_sentinel")?(S={closeButtonRef:P,returnFocusRef:A},R[15]=S):S=R[15];let q=S,M=void 0!==E&&E?O:c;return R[16]!==T?(C=(0,i.jsx)(h,{value:B,children:(0,i.jsx)(f,{value:q,children:T})}),R[16]=T,R[17]=C):C=R[17],R[18]!==M||R[19]!==C?(N=(0,i.jsx)(u,{value:M,children:C}),R[18]=M,R[19]=C,R[20]=N):N=R[20],N}function _(){return(0,r.use)(h)}function b(e){let t=(0,r.use)(u);return e?t.activePanel===e&&t.renderActive:null!==t.activePanel&&t.renderActive}function y(){return(0,r.use)(f)}function w(){return(0,r.use)(u).isCompact}v.displayName="DockedPanelProvider"},26815(e,t,n){function i(e){let t=new Map;if(!e)return t;for(let[n,i]of Object.entries(e))for(let e of Object.values(i))for(let i of e?.threads??[])for(let e of i.commentsData?.comments??[])void 0!==e.databaseId&&null!==e.databaseId&&t.set(e.databaseId,{comment:e,path:n,thread:i});return t}function l(e,t){if(!e||0===t.length)return[];let n=i(e),l=[];for(let e of t){let t=n.get(e.commentDatabaseId);t&&l.push({commentDatabaseId:e.commentDatabaseId,suggestionIndex:e.suggestionIndex,path:t.path,bodyHTML:t.comment.bodyHTML,diffEntries:t.comment.automatedComment?.suggestion?.diffEntries})}return l}n.d(t,{F:()=>l,O:()=>i})},79538(e,t,n){n.d(t,{QK:()=>a,Ti:()=>l});var i=n(26316);let l="diff-comparison-viewer-container";function a(){if("u"=1012:t>=1012}return!!i.cg&&i.cg.innerWidth>=1012}},41893(e,t,n){n.d(t,{F:()=>s});var i=n(16522),l=n(27259),a=n(23707);function s(e){let t,n=(0,i.c)(1),{pullRequest:s,pullRequestState:r}=e,{refetch:o}=(0,a.W)();n[0]===Symbol.for("react.memo_cache_sentinel")?(t={git_updated:!0,title_updated:!0},n[0]=t):t=n[0],(0,l.og)(s,o,t),(0,l.og)(r,o)}},31409(e,t,n){n.d(t,{q:()=>r});var i=n(16522),l=n(73537),a=n(6877),s=n(68108);function r(e,t){let n,r,o=(0,i.c)(8),d=(0,l.G7)("pull_request_merge_status_button"),c=(0,a.u)("pull_request_merge_status_button_opt_out");if(e===s.Q.Closed||e===s.Q.Merged||!d||c)return null;o[0]!==t?(n=t||{},o[0]=t,o[1]=n):n=o[1];let{channels:m,headSha:u,helpUrl:h,viewerLogin:f,defaultMergeMethod:p}=n;return m&&u&&h&&f&&p?(o[2]!==m||o[3]!==p||o[4]!==u||o[5]!==h||o[6]!==f?(r={channels:m,defaultMergeMethod:p,headSha:u,helpUrl:h,viewerLogin:f},o[2]=m,o[3]=p,o[4]=u,o[5]=h,o[6]=f,o[7]=r):r=o[7],r):null}},42368(e,t,n){n.d(t,{q:()=>a});var i=n(16522),l=n(51581);function a(){let e,t,n=(0,i.c)(4),{sendAnalyticsEvent:a}=(0,l.s)();n[0]!==a?(e=(e,t,n)=>{a(e,t,void 0===n?{}:n)},n[0]=a,n[1]=e):e=n[1];let s=e;return n[2]!==s?(t={sendPullRequestAnalyticsEvent:s},n[2]=s,n[3]=t):t=n[3],t}},27259(e,t,n){n.d(t,{G:()=>o,og:()=>r});var i=n(16522),l=n(59592),a=n(70170),s=n(19129);function r(e,t,n,i){o(e,t,n,i)}function o(e,t,n,r){let o,d,c,m=(0,i.c)(9),u=(0,s.A)();m[0]!==t||m[1]!==u?(o=()=>{u()&&t()},m[0]=t,m[1]=u,m[2]=o):o=m[2];let h=r??2e3;m[3]!==o||m[4]!==h?(d=(0,a.n)(o,h),m[3]=o,m[4]=h,m[5]=d):d=m[5];let f=d;m[6]!==f||m[7]!==n?(c=e=>{if(n&&e.event_updates)for(let[t,i]of Object.entries(n))!!e.event_updates[t]==!!i&&window.setTimeout(f,e.wait||0);else window.setTimeout(f,e.wait||0)},m[6]=f,m[7]=n,m[8]=c):c=m[8];let p=c;(0,l.x)(e,p)}},35981(e,t,n){n.d(t,{Bk:()=>r,Wo:()=>o});var i=n(16522),l=n(7909),a=n(23666),s=n(78597);function r(e,t){let n,l=(0,i.c)(5),a=(t??[]).filter(e=>!e.dismissed);if(l[0]!==a||l[1]!==e){let t;l[3]!==e?(t=t=>t.name===e,l[3]=e,l[4]=t):t=l[4],n=a.filter(t),l[0]=a,l[1]=e,l[2]=n}else n=l[2];return 0===n.length}function o(e,t){let n,o,d=(0,i.c)(5),c=r(e,t);d[0]!==c||d[1]!==e?(n=()=>{(0,l.M3)()&&!c&&(0,s.DI)((0,a.VB1)({noticeName:e}),{method:"POST"})},d[0]=c,d[1]=e,d[2]=n):n=d[2];let m=n;return d[3]!==m?(o={dismissNotice:m},d[3]=m,d[4]=o):o=d[4],o}},54783(e,t,n){n.d(t,{r:()=>f});var i=n(16522),l=n(62764),a=n(78431),s=n(94747),r=n(26316),o=n(78597),d=n(49671),c=n(70503),m=n(26815),u=n(68938),h=n(65222);function f(e,t){let n,f,p,g=(0,i.c)(11),x=(0,d.e)(l.uT.submitSuggestedChanges),v=(0,c.WK)(),_=(0,c.qL)(),{clearSuggestionBatch:b}=(0,c.xJ)();return g[0]!==x||g[1]!==_||g[2]!==v?(n=async e=>{let{currentOid:t,message:n}=e,i=function(e,t){if(!e||0===t.length)return[];let n=(0,m.O)(e),i=[];for(let e of t){let t=n.get(e.commentDatabaseId);if(!t)continue;let{comment:l,path:a}=t,s=(0,u.T)(l.body);!s||void 0===e.suggestionIndex||e.suggestionIndex<0||e.suggestionIndex>=s.length||i.push({threadId:String(e.commentDatabaseId),path:a,suggestion:s})}return i}(_,v.activeBatch);if(0===i.length)throw Error("No valid suggestions found in batch");let l=await (0,o.Sr)(x,{method:"POST",headers:{Accept:"application/json"},body:{changes:i,currentOid:t,message:n}}),s=await (0,a.hp)(l);return(0,a.R)(l,s),s},g[0]=x,g[1]=_,g[2]=v,g[3]=n):n=g[3],g[4]!==b||g[5]!==t||g[6]!==e?(f=()=>{b(),(0,h.hW)(e,t),r.cg?.location.reload()},g[4]=b,g[5]=t,g[6]=e,g[7]=f):f=g[7],g[8]!==n||g[9]!==f?(p={mutationFn:n,onSuccess:f},g[8]=n,g[9]=f,g[10]=p):p=g[10],(0,s.n)(p)}},99131(e,t,n){n.d(t,{V:()=>u});var i=n(16522),l=n(78431),a=n(62764),s=n(49671),r=n(94747),o=n(26316),d=n(78597),c=n(70503),m=n(65222);function u(e,t){let n,u,f,p=(0,i.c)(10),g=(0,s.e)(a.uT.applySuggestedChanges),x=(0,c.WK)(),{clearSuggestionBatch:v}=(0,c.xJ)();return p[0]!==g||p[1]!==x?(n=async e=>{let{message:t}=e,n=x.activeBatch.map(h);if(0===n.length)throw Error("No valid suggestions found in batch");let i=await (0,d.Sr)(g,{method:"POST",headers:{Accept:"application/json"},body:{comments:n,message:t}}),a=await (0,l.hp)(i);return(0,l.R)(i,a),a},p[0]=g,p[1]=x,p[2]=n):n=p[2],p[3]!==v||p[4]!==t||p[5]!==e?(u=()=>{v(),(0,m.hW)(e,t),o.cg?.location.reload()},p[3]=v,p[4]=t,p[5]=e,p[6]=u):u=p[6],p[7]!==n||p[8]!==u?(f={mutationFn:n,onSuccess:u},p[7]=n,p[8]=u,p[9]=f):f=p[9],(0,r.n)(f)}function h(e){let t={id:e.commentDatabaseId};return null!=e.suggestionIndex&&(t.suggestionIndex=e.suggestionIndex),t}},23707(e,t,n){n.d(t,{W:()=>c,f:()=>d});var i=n(16522),l=n(65510),a=n(62764),s=n(49671),r=n(78597),o=n(69161);function d(){let e,t=(0,i.c)(2),{basePageDataUrl:n}=(0,o.Yu)(),l=`basePageDataURL:${n}`;return t[0]!==l?(e=[a.uT.header,l],t[0]=l,t[1]=e):e=t[1],e}function c(e){let t,n,o=(0,i.c)(6),c=(0,s.e)(a.uT.header),m=d();return o[0]!==c?(t=async()=>{let e=await (0,r.QJ)(c);if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()},o[0]=c,o[1]=t):t=o[1],o[2]!==e||o[3]!==m||o[4]!==t?(n={queryKey:m,queryFn:t,initialData:e,staleTime:1/0},o[2]=e,o[3]=m,o[4]=t,o[5]=n):n=o[5],(0,l.U)(n)}},73485(e,t,n){n.d(t,{jX:()=>d,mN:()=>c});var i=n(16522),l=n(62764),a=n(15610),s=n(78597),r=n(60815),o=n(70503);function d(e){return[l.uT.issueComments,e]}function c(e){let t,n,c,u,h=(0,i.c)(10),{pathName:f}=e,{addIssueComments:p}=(0,o._o)();if(h[0]!==f?(t=d(f),h[0]=f,h[1]=t):t=h[1],h[2]!==f)n=`${f}/page_data/${l.uT.issueComments}`,h[2]=f,h[3]=n;else n=h[3];return h[4]!==p?(c=async e=>{let{pageParam:t}=e,n=await (0,s.QJ)(t);if(!n.ok)throw Error(`Failed to fetch issue comments from ${t}: HTTP ${n.status}`);let i=await n.json(),l=n.headers.get("Link"),a=(0,r.N)(l,"next");return p(i),{data:i,nextUrl:a}},h[4]=p,h[5]=c):c=h[5],h[6]!==t||h[7]!==n||h[8]!==c?(u={queryKey:t,initialPageParam:n,queryFn:c,getNextPageParam:m,staleTime:1/0},h[6]=t,h[7]=n,h[8]=c,h[9]=u):u=h[9],(0,a.U)(u)}function m(e){return e.nextUrl??void 0}},28553(e,t,n){n.d(t,{q:()=>i});let i={SingleFileMode:"single_file_mode",CompactDiffLines:"compact_diff_lines",FilesChangedOptOut:"files_changed_opt_out"}},52130(e,t,n){n.d(t,{Bz:()=>a,NP:()=>s});var i=n(14193),l=n(24222);n(26941);let a=i.G.createQueryRouteConfig("pullRequestsCommitsRoute",{path:"/:owner/:repo/pull/:pr_number/commits",queries:[(0,l.Y)()]});function s(){return a.queries.mainQuery.makeQueryKey()}},68108(e,t,n){n.d(t,{Q:()=>i,a:()=>l});let i={Open:"OPEN",Closed:"CLOSED",Merged:"MERGED",Queued:"QUEUED",Draft:"DRAFT"},l={[i.Open]:{description:"Open",status:"pullOpened"},[i.Closed]:{description:"Closed",status:"pullClosed"},[i.Queued]:{description:"Queued",status:"pullQueued"},[i.Merged]:{description:"Merged",status:"pullMerged"},[i.Draft]:{description:"Draft",status:"draft"}}}}]); //# sourceMappingURL=28107-982c24913e681466-d53c4a3bfb57c988.js.map