performance.mark("js-parse-end:repos-branches-48b7cd81befcd88d.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["9192"],{87253(e,t,r){r.d(t,{_S:()=>l,cB:()=>o,cW:()=>i});var n=r(56341),a=r(26316);let l=()=>{let e=(0,n.JV)().appId;return e&&"rails"!==e?e:crypto.randomUUID()},i=e=>{(0,n.C3)({appId:e})},o=()=>{let e=document.querySelector("react-app")||document.querySelector("projects-v2");return e?.uuid||"rails"};a.cg?.addEventListener("hashchange",()=>{(0,n.C3)({appId:o()})},!0)},54242(e,t,r){r.d(t,{d:()=>o,t:()=>s});var n=r(74848),a=r(16522),l=r(96540);let i=l.createContext({});function o(e){let t,r=(0,a.c)(3),{repository:l,children:o}=e;return r[0]!==o||r[1]!==l?(t=(0,n.jsxs)(i,{value:l,children:[" ",o," "]}),r[0]=o,r[1]=l,r[2]=t):t=r[2],t}function s(){return l.use(i)}i.displayName="CurrentRepositoryContext",o.displayName="CurrentRepositoryProvider"},16197(e,t,r){r.d(t,{U:()=>l});let n=e=>{let t=getComputedStyle(e,null);return!!t&&"function"==typeof t.getPropertyValue&&["overflow","overflow-y","overflow-x"].some(e=>{let r=t.getPropertyValue(e);return"auto"===r||"scroll"===r})},a=(e,t)=>e&&null!==e.parentNode?a(e.parentNode,t.concat([e])):t;function l(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(let t of a(e.parentNode,[]))if((t instanceof HTMLElement||t instanceof SVGElement)&&n(t))return t;return document.scrollingElement||document.documentElement}}},206(e,t,r){r.d(t,{r:()=>o});var n=r(74848),a=r(16522),l=r(26316),i=r(35490);function o(e){let t,r,o,s,c,u,d=(0,a.c)(13);d[0]!==e?({ref:r,src:o,size:s,...t}=e,d[0]=e,d[1]=t,d[2]=r,d[3]=o,d[4]=s):(t=d[1],r=d[2],o=d[3],s=d[4]);let h=void 0===s?20:s;if(d[5]!==h||d[6]!==o){let e=new URL(o,l.fV.origin);e.searchParams.has("size")||e.searchParams.has("s")||e.searchParams.set("size",String(2*Number(h))),c=e.toString(),d[5]=h,d[6]=o,d[7]=c}else c=d[7];let m=c;return d[8]!==m||d[9]!==t||d[10]!==r||d[11]!==h?(u=(0,n.jsx)(i.A,{src:m,size:h,"data-testid":"github-avatar",...t,ref:r}),d[8]=m,d[9]=t,d[10]=r,d[11]=h,d[12]=u):u=d[12],u}o.displayName="GitHubAvatar"},56341(e,t,r){r.d(t,{C3:()=>s,JV:()=>l,K3:()=>h,MM:()=>c,OE:()=>m,Qb:()=>p,Zu:()=>d,bj:()=>i,jc:()=>u,kd:()=>o});var n=r(26316);let a=null;function l(){return n.Kn?.state||{}}function i(e){_(l(),"",e)}function o(e){n.Kn?.pushState({appId:l().appId},"",e),f()}function s(e){let t={...l(),...e};a&&(a=t),_(t,"",location.href)}function c(e){i(`?${e.toString()}${n.fV.hash}`)}function u(){i(n.fV.pathname+n.fV.hash)}function d(e){i(e.startsWith("#")?e:`#${e}`),(a=l())&&requestIdleCallback(()=>{!history.state&&a&&(s(a),a=null)})}function h(){i(n.fV.pathname+n.fV.search)}function m(){n.Kn?.back()}function p(){n.Kn?.forward()}function _(e,t,r){n.Kn?.replaceState(e,t,r),f()}function f(){n.cg?.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!1}))}},58084(e,t,r){let n,a;function l(){if("u"o,mM:()=>l,rx:()=>i});let o="Alt+ArrowUp"},95126(e,t,r){r.d(t,{yY:()=>c});var n=r(16522),a=r(23666),l=r(19519),i=r(58084);let o=Object.freeze({});function s(e){return(0,i.rx)()?{...e,"aria-keyshortcuts":i.IX}:e}function c(){let e,t,r=(0,n.c)(4),{isServer:c}=(0,l.V)();r[0]!==c?(e=c||!(0,i.mM)(),r[0]=c,r[1]=e):e=r[1];let u=e;return r[2]!==u?(t=(e,t)=>{if(u)return o;let r=function(e,t){if("string"==typeof t.url&&t.url)return t.url;switch(e){case"user":if("userId"in t&&null!=t.userId)return(0,a.GrN)({userId:t.userId});if("login"in t&&t.login)return(0,a.dCN)({owner:t.login});return null;case"organization":if("login"in t&&t.login)return(0,a.qsO)({owner:t.login});return null;case"team":if("owner"in t&&t.owner&&"team"in t&&t.team)return(0,a.Pmq)({owner:t.owner,team:t.team});return null;case"issue":if("owner"in t&&t.owner&&"repo"in t&&t.repo&&"issueNumber"in t&&null!=t.issueNumber)return(0,a.Nbg)({owner:t.owner,repo:t.repo,issueNumber:t.issueNumber});return null;case"pull_request":if("owner"in t&&t.owner&&"repo"in t&&t.repo&&"pullRequestNumber"in t&&null!=t.pullRequestNumber)return(0,a.i9S)({owner:t.owner,repo:t.repo,pullRequestNumber:t.pullRequestNumber});return null;case"commit":if("owner"in t&&t.owner&&"repo"in t&&t.repo&&"commitish"in t&&t.commitish)return(0,a.fQd)({owner:t.owner,repo:t.repo,commitish:t.commitish});return null;case"copilot":if("botSlug"in t&&t.botSlug)return(0,a._nf)({bot_slug:t.botSlug});return null;case"repository":if("owner"in t&&t.owner&&"repo"in t&&t.repo)return(0,a.SHX)({owner:t.owner,repo:t.repo,action:"hovercard"});return null;case"discussion":if("owner"in t&&t.owner&&"repo"in t&&t.repo&&"discussionNumber"in t&&null!=t.discussionNumber)return(0,a.yIS)({owner:t.owner,repo:t.repo,discussionNumber:t.discussionNumber});return null;case"advisory":if("ghsaId"in t&&t.ghsaId)return(0,a.lEN)({ghsaId:t.ghsaId});return null;case"cwe":if("id"in t&&t.id)return(0,a.dQ4)({id:t.id});return null;case"sponsors_listing":if("login"in t&&t.login)return(0,a.xyp)({login:t.login});return null;case"achievement":if("login"in t&&t.login&&"slug"in t&&t.slug)return(0,a.HgL)({login:t.login,slug:t.slug});return null;case"tracked_in":if("owner"in t&&t.owner&&"repo"in t&&t.repo&&"issueNumber"in t&&null!=t.issueNumber)return(0,a.fJg)({owner:t.owner,repo:t.repo,issueNumber:t.issueNumber});return null;case"tracking":if("owner"in t&&t.owner&&"repo"in t&&t.repo&&"issueNumber"in t&&null!=t.issueNumber&&"id"in t&&null!=t.id)return(0,a.Z1d)({owner:t.owner,repo:t.repo,issueNumber:t.issueNumber,id:t.id});return null;case"security_alert":if("owner"in t&&t.owner&&"repo"in t&&t.repo&&"alertNumber"in t&&null!=t.alertNumber)return(0,a.Ofx)({owner:t.owner,repo:t.repo,alertNumber:t.alertNumber});return null;case"dependabot_alert":if("owner"in t&&t.owner&&"repo"in t&&t.repo&&"alertNumber"in t&&null!=t.alertNumber)return(0,a.iRo)({owner:t.owner,repo:t.repo,alertNumber:t.alertNumber});return null;case"dependency_graph_package":if("owner"in t&&t.owner&&"repo"in t&&t.repo&&"id"in t&&t.id&&"name"in t&&t.name)return(0,a.ZBO)({owner:t.owner,repo:t.repo,id:t.id,name:t.name});return null;case"project":if("projectId"in t&&null!=t.projectId)return(0,a.L$n)({projectId:t.projectId});return null;case"integration":if("id"in t&&null!=t.id)return(0,a.Ss0)({id:t.id});return null;case"profile_highlight":if("login"in t&&t.login&&"highlightType"in t&&t.highlightType)return(0,a.Hpm)({login:t.login,highlightType:t.highlightType});return null;default:return null}}(e,t);return r?function(e,t,r=!0,n){let a=function(e,t,r=!0){let n={"data-hovercard-url":e,"data-hovercard-type":t};return r?s({...n,"octo-click":"hovercard-link-click","octo-dimensions":"link_type:self"}):s(n)}(e,t,r);if(0===Object.keys(a).length)return o;if(!n)return a;let l={...a};return n.fixedPositioning&&(l["data-hovercard-fixed-positioning"]=""),void 0!==n.zIndexOverride&&(l["data-hovercard-z-index-override"]=String(n.zIndexOverride)),n.cache&&(l["data-hovercard-cache"]=n.cache),l}(r,e,t.tracking??!0,{fixedPositioning:t.fixedPositioning,zIndexOverride:t.zIndexOverride,cache:t.cache}):o},r[2]=u,r[3]=t):t=r[3],t}},76331(e,t,r){r.d(t,{m:()=>f});var n=r(74848),a=r(16522),l=r(29941),i=r(96540),o=r(56149),s=r(34164);let c={n:"ControlledTooltip-module__tooltippedN__KIj7h",s:"ControlledTooltip-module__tooltippedS__JL_qv",e:"ControlledTooltip-module__tooltippedE__oIBoq",w:"ControlledTooltip-module__tooltippedW__aMYMo",ne:"ControlledTooltip-module__tooltippedNe__gVDNf",nw:"ControlledTooltip-module__tooltippedNw__irSZE",se:"ControlledTooltip-module__tooltippedSe__OyhVh",sw:"ControlledTooltip-module__tooltippedSw__me2O2"},u={left:"ControlledTooltip-module__tooltippedAlignLeft2__F4iA8",right:"ControlledTooltip-module__tooltippedAlignRight2__gd5yl"},d=()=>()=>void 0,h=()=>!1,m=()=>!0;function p(e){let t,r,l,p,_,f,b,x,g,y,v,j,w,N,C=(0,a.c)(29);C[0]!==e?({ref:p,direction:f,className:r,text:g,noDelay:l,align:t,wrap:y,open:b,portalProps:x,..._}=e,C[0]=e,C[1]=t,C[2]=r,C[3]=l,C[4]=p,C[5]=_,C[6]=f,C[7]=b,C[8]=x,C[9]=g,C[10]=y):(t=C[1],r=C[2],l=C[3],p=C[4],_=C[5],f=C[6],b=C[7],x=C[8],g=C[9],y=C[10]);let B=void 0===f?"n":f,S=void 0!==b&&b;C[11]!==x?(v=void 0===x?{}:x,C[11]=x,C[12]=v):v=C[12];let A=v,P=(0,i.useSyncExternalStore)(d,m,h),z=c[B],I=t&&u[t],T=l&&"ControlledTooltip-module__tooltippedNoDelay__bW6WD",k=y&&"ControlledTooltip-module__tooltippedMultiline__t2wgM",R=S&&"ControlledTooltip-module__tooltippedOpen__eNKn6";C[13]!==r||C[14]!==z||C[15]!==I||C[16]!==T||C[17]!==k||C[18]!==R?(j=(0,s.$)("ControlledTooltip-module__tooltipBase__N1MbN",z,I,T,k,R,"ControlledTooltip-module__fixedPosition__eEZcA",r),C[13]=r,C[14]=z,C[15]=I,C[16]=T,C[17]=k,C[18]=R,C[19]=j):j=C[19];let L=j;if(!P)return null;let M=g||_["aria-label"];return C[20]!==L||C[21]!==p||C[22]!==_||C[23]!==M||C[24]!==g?(w=(0,n.jsx)("span",{ref:p,role:"tooltip","aria-label":g,"data-visible-text":M,..._,className:L}),C[20]=L,C[21]=p,C[22]=_,C[23]=M,C[24]=g,C[25]=w):w=C[25],C[26]!==A||C[27]!==w?(N=(0,n.jsx)(o.ZL,{...A,children:w}),C[26]=A,C[27]=w,C[28]=N):N=C[28],N}p.displayName="ControlledTooltip";var _=r(16197);function f(e){let t,r,o,s,c,u,d,h,m,f,x,g,y,v,j,w,N=(0,a.c)(30);N[0]!==e?({ref:d,contentRef:u,open:h,anchoredPositionAlignment:c,anchorSide:s,anchorOffset:o,alignmentOffset:t,allowOutOfBounds:r,...m}=e,N[0]=e,N[1]=t,N[2]=r,N[3]=o,N[4]=s,N[5]=c,N[6]=u,N[7]=d,N[8]=h,N[9]=m):(t=N[1],r=N[2],o=N[3],s=N[4],c=N[5],u=N[6],d=N[7],h=N[8],m=N[9]);let C=(0,i.useRef)(null);N[10]===Symbol.for("react.memo_cache_sentinel")?(f=()=>C.current,N[10]=f):f=N[10],(0,i.useImperativeHandle)(d,f),N[11]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,top:0},N[11]=x):x=N[11];let B=(0,i.useRef)(x);N[12]!==u||N[13]!==h?(g=e=>{if(!C.current||!u.current||!h)return b;let t=(0,_.U)(u.current);return t?.addEventListener("scroll",e),()=>{t?.removeEventListener("scroll",e)}},N[12]=u,N[13]=h,N[14]=g):g=N[14],N[15]!==t||N[16]!==r||N[17]!==o||N[18]!==s||N[19]!==c||N[20]!==u?(y=()=>{if(!C.current||!u.current)return B.current;let e=(0,l.uG)(C.current,u.current,{align:c??"center",side:s??"outside-top",alignmentOffset:t??0,anchorOffset:o??0,allowOutOfBounds:r});return(e.left!==B.current.left||e.top!==B.current.top)&&(B.current=e),B.current},N[15]=t,N[16]=r,N[17]=o,N[18]=s,N[19]=c,N[20]=u,N[21]=y):y=N[21],N[22]===Symbol.for("react.memo_cache_sentinel")?(v=()=>B.current,N[22]=v):v=N[22];let S=(0,i.useSyncExternalStore)(g,y,v);return N[23]!==S||N[24]!==m.style?(j={position:"absolute",...S,...m.style},N[23]=S,N[24]=m.style,N[25]=j):j=N[25],N[26]!==h||N[27]!==m||N[28]!==j?(w=(0,n.jsx)(p,{...m,ref:C,open:h,style:j}),N[26]=h,N[27]=m,N[28]=j,N[29]=w):w=N[29],w}function b(){}f.displayName="PortalTooltip"},58926(e,t,r){r.d(t,{B:()=>o});var n=r(74848),a=r(16522),l=r(96540),i=r(76331);function o(e){let t,r,o,s,c,u,d,h,m,p=(0,a.c)(20);p[0]!==e?({includeAriaAttributes:r,...t}=e,p[0]=e,p[1]=t,p[2]=r):(t=p[1],r=p[2]);let _=void 0===r||r,f=(0,l.useId)(),[b,x]=(0,l.useState)(!1),g=t.open??b,y=t.id??f;p[3]!==y||p[4]!==_?(o=_?{"aria-describedby":y}:{},p[3]=y,p[4]=_,p[5]=o):o=p[5];let v=o;p[6]===Symbol.for("react.memo_cache_sentinel")?(s=()=>x(!0),p[6]=s):s=p[6];let j=s;p[7]===Symbol.for("react.memo_cache_sentinel")?(c=()=>x(!1),p[7]=c):c=p[7];let w=c;return p[8]!==v?(u={...v,onPointerEnter:j,onPointerLeave:w,onFocus:j,onBlur:w},p[8]=v,p[9]=u):u=p[9],p[10]!==y||p[11]!==g||p[12]!==t?(d=(0,n.jsx)(i.m,{...t,open:g,id:y},"portal-tooltip"),p[10]=y,p[11]=g,p[12]=t,p[13]=d):d=p[13],p[14]!==b?(h=()=>x(!b),p[14]=b,p[15]=h):h=p[15],p[16]!==u||p[17]!==d||p[18]!==h?(m=[u,d,h],p[16]=u,p[17]=d,p[18]=h,p[19]=m):m=p[19],m}},54848(e,t,r){r.r(t),r.d(t,{AheadBehindCountWidth:()=>c,default:()=>o,scaleAheadBehind:()=>u});var n=r(74848),a=r(16522),l=r(4978),i=r(34164);function o(e){let t,r,o,d,h,m,p,_,f,b=(0,a.c)(29),{aheadCount:x,behindCount:g,className:y,maxDiverged:v,width:j}=e,w=void 0===j?c:j,N=x+g;b[0]!==N||b[1]!==x||b[2]!==v?(t=void 0!==v?u(x,v):Math.floor(x/N*100),b[0]=N,b[1]=x,b[2]=v,b[3]=t):t=b[3];let C=t;b[4]!==C||b[5]!==g||b[6]!==v?(r=void 0!==v?u(g,v):100-C,b[4]=C,b[5]=g,b[6]=v,b[7]=r):r=b[7];let B=r,S=`Ahead behind count: ${N}`;b[8]!==y?(o=(0,i.$)(y,"branch-a-b-count","AheadBehindCount-module__Container__q_y6y"),b[8]=y,b[9]=o):o=b[9];let A=`Ahead behind count: ${N}`;return b[10]!==w?(d={width:w},b[10]=w,b[11]=d):d=b[11],b[12]!==g||b[13]!==B?(h=(0,n.jsx)(s,{aheadOrBehind:"behind",count:g,percentage:B}),b[12]=g,b[13]=B,b[14]=h):h=b[14],b[15]!==x||b[16]!==C?(m=(0,n.jsx)(s,{aheadOrBehind:"ahead",count:x,percentage:C}),b[15]=x,b[16]=C,b[17]=m):m=b[17],b[18]!==d||b[19]!==h||b[20]!==m?(p=(0,n.jsxs)("div",{style:d,className:"AheadBehindCount-module__ChartWrapper__w_iXX",children:[h,m]}),b[18]=d,b[19]=h,b[20]=m,b[21]=p):p=b[21],b[22]!==p||b[23]!==A?(_=(0,n.jsx)(l.A,{"aria-label":A,children:p}),b[22]=p,b[23]=A,b[24]=_):_=b[24],b[25]!==_||b[26]!==S||b[27]!==o?(f=(0,n.jsx)("div",{"aria-label":S,className:o,role:"img",children:_}),b[25]=_,b[26]=S,b[27]=o,b[28]=f):f=b[28],f}o.displayName="AheadBehindCount";let s=e=>{let t,r,l,o,s,c,u,d,h=(0,a.c)(22),{aheadOrBehind:m,count:p,percentage:_}=e,f="ahead"===m?"AheadBehindCount-module__CountHalfAhead__CByZH":"AheadBehindCount-module__CountHalfBehind__nVHW2";h[0]!==f?(t=(0,i.$)("AheadBehindCount-module__CountHalf__V7cLA",f),h[0]=f,h[1]=t):t=h[1],h[2]!==p?(r=(0,n.jsx)("div",{className:"AheadBehindCount-module__CountLabel__CW8xQ",children:p}),h[2]=p,h[3]=r):r=h[3];let b=`ahead-behind-${_}`,x=`${_}%`;h[4]!==x?(l={width:x},h[4]=x,h[5]=l):l=h[5];let g="ahead"===m?"AheadBehindCount-module__BarContainerAhead__t0Lp1":"AheadBehindCount-module__BarContainerBehind__hR7z4";h[6]!==g?(o=(0,i.$)("AheadBehindCount-module__BarContainer__bOhg5",g),h[6]=g,h[7]=o):o=h[7];let y="ahead"===m?"AheadBehindCount-module__ProgressBarAhead___mjtt":"AheadBehindCount-module__ProgressBarBehind__MxtB4",v=p>0?"AheadBehindCount-module__ProgressBarActive__gyE_H":"AheadBehindCount-module__ProgressBarInactive__xnZfg";return h[8]!==v||h[9]!==y?(s=(0,i.$)("anim-grow-x","AheadBehindCount-module__ProgressBar__VXxoC",y,v),h[8]=v,h[9]=y,h[10]=s):s=h[10],h[11]!==s?(c=(0,n.jsx)("div",{className:s}),h[11]=s,h[12]=c):c=h[12],h[13]!==c||h[14]!==b||h[15]!==l||h[16]!==o?(u=(0,n.jsx)("div",{"data-testid":b,style:l,className:o,children:c}),h[13]=c,h[14]=b,h[15]=l,h[16]=o,h[17]=u):u=h[17],h[18]!==u||h[19]!==t||h[20]!==r?(d=(0,n.jsxs)("div",{className:t,children:[r,u]}),h[18]=u,h[19]=t,h[20]=r,h[21]=d):d=h[21],d};s.displayName="CountHalf";let c=150;function u(e,t){return e=e<=0?0:Math.log10(e),parseFloat((100*((t=t<=0?0:Math.log10(t))>0?e/t:0)).toFixed(2))}},14804(e,t,r){r.d(t,{S:()=>x,u:()=>g});var n=r(74848),a=r(16522),l=r(96540),i=r(26108),o=r(20757),s=r(18990),c=r(38621),u=r(77236),d=r(23666),h=r(40914),m=r(78597),p=r(49845),_=r(34164);let f=(0,l.lazy)(()=>r.e("99555").then(r.bind(r,17806)));f.displayName="DeleteBranchDialog";let b=(0,l.lazy)(()=>Promise.all([r.e("83465"),r.e("46721")]).then(r.bind(r,21464)));async function x(e,t,r,n){e(!0);let a=await (0,m.DI)(`${(0,d.yf2)({repo:n})}/${encodeURIComponent(t)}`,{method:"delete"});return a.ok&&r(t),e(!1),a.ok}function g(e){let t,r,g,y,v,j,w,N,C,B,S,A=(0,a.c)(61),{repo:P,branch:z,oid:I,pullRequest:T,onDelete:k,onRestore:R,className:L,deletedAt:M}=e,{addToast:q}=(0,h.Y6)(),{enabled:D,canCreate:E}=(0,p.e)(),[$,O]=(0,l.useState)(!1),[V,U]=(0,l.useState)(!1),[G,H]=(0,l.useState)(!1),W=D&&E&&P.currentUserCanPush;A[0]!==q||A[1]!==z.deleteProtected||A[2]!==z.deleteable||A[3]!==z.isBeingRenamed||A[4]!==z.isDefault||A[5]!==z.name||A[6]!==$||A[7]!==V||A[8]!==I||A[9]!==k||A[10]!==T?.state||A[11]!==D||A[12]!==P?(t=async function(){!$&&!V&&I&&(z.isDefault?q({type:"error",message:"You can't delete the default branch."}):z.deleteProtected?q({type:"error",message:"You can't delete this protected branch."}):z.isBeingRenamed?q({type:"error",message:"You can't delete this branch because it is being renamed."}):z.deleteable&&I?D&&T?.state==="open"?H(!0):await x(O,z.name,k,P)||q({type:"error",message:"Branch could not be deleted."}):q({type:"error",message:"You can't delete this branch."}))},A[0]=q,A[1]=z.deleteProtected,A[2]=z.deleteable,A[3]=z.isBeingRenamed,A[4]=z.isDefault,A[5]=z.name,A[6]=$,A[7]=V,A[8]=I,A[9]=k,A[10]=T?.state,A[11]=D,A[12]=P,A[13]=t):t=A[13];let Y=t;A[14]!==q||A[15]!==z.name||A[16]!==$||A[17]!==V||A[18]!==I||A[19]!==R||A[20]!==P?(r=async function(){V||$||!I||(U(!0),(await (0,m.DI)(`${(0,d.yf2)({repo:P})}/?branch=${I}&name=${z.name}`,{method:"post"})).ok?R(z.name):q({type:"error",message:"Branch could not be restored."}),U(!1))},A[14]=q,A[15]=z.name,A[16]=$,A[17]=V,A[18]=I,A[19]=R,A[20]=P,A[21]=r):r=A[21];let F=r,[Q,K]=(0,l.useState)(!1);A[22]!==q||A[23]!==z.isBeingRenamed||A[24]!==z.renameable?(g=function(){z.isBeingRenamed?q({type:"error",message:"You can't rename this branch because it is being renamed."}):z.renameable?K(!0):q({type:"error",message:"You don't have permission to rename this branch."})},A[22]=q,A[23]=z.isBeingRenamed,A[24]=z.renameable,A[25]=g):g=A[25];let X=g;A[26]===Symbol.for("react.memo_cache_sentinel")?(y=function(){K(!1)},A[26]=y):y=A[26];let Z=y;return A[27]!==L?(v=(0,_.$)(L,"BranchActionMenu-module__Container__e3sub"),A[27]=L,A[28]=v):v=A[28],A[29]!==q||A[30]!==z.isDefault||A[31]!==z.name||A[32]!==z.rulesetsPath||A[33]!==W||A[34]!==Y||A[35]!==M||A[36]!==X||A[37]!==I||A[38]!==P||A[39]!==F?(j=M&&I?(0,n.jsx)(i.K,{icon:c.UndoIcon,onClick:F,size:"small",variant:"invisible","aria-label":"Restore"}):(0,n.jsxs)("div",{className:"BranchActionMenu-module__ActionButtonGroup__AGrdf",children:[(0,n.jsx)(i.K,{icon:c.TrashIcon,variant:"invisible",onClick:()=>{M?q({type:"error",message:"This branch no longer exists."}):Y()},"aria-label":"Delete branch",size:"small"}),(0,n.jsxs)(o.W,{children:[(0,n.jsx)(o.W.Anchor,{children:(0,n.jsx)(i.K,{icon:c.KebabHorizontalIcon,size:"small",variant:"invisible",className:"color-fg-muted align-center","aria-label":"Branch menu",name:"Branch menu"})}),(0,n.jsx)(o.W.Overlay,{children:(0,n.jsxs)(s.l,{children:[!z.isDefault&&(M?(0,n.jsxs)(s.l.Item,{onSelect:()=>{q({type:"error",message:"This branch no longer exists."})},children:[(0,n.jsx)(s.l.LeadingVisual,{children:W?(0,n.jsx)(c.GitPullRequestIcon,{size:16}):(0,n.jsx)(c.GitCompareIcon,{size:16})}),W?"New pull request":"Compare"]}):(0,n.jsxs)(s.l.LinkItem,{as:u.N,"aria-label":W?"New pull request":"Compare",to:W?(0,d.w7M)({repo:P,refName:z.name}):(0,d.bSP)({repo:P,head:z.name}),className:"text-decoration-skip",children:[(0,n.jsx)(s.l.LeadingVisual,{children:W?(0,n.jsx)(c.GitPullRequestIcon,{size:16}):(0,n.jsx)(c.GitCompareIcon,{size:16})}),W?"New pull request":"Compare"]})),(0,n.jsxs)(s.l.LinkItem,{as:u.N,"aria-label":"Activity",to:(0,d.PUd)({repo:P,branch:z.name}),className:"text-decoration-skip",children:[(0,n.jsx)(s.l.LeadingVisual,{children:(0,n.jsx)(c.PulseIcon,{size:16})}),"Activity"]}),z.rulesetsPath?(0,n.jsxs)(s.l.LinkItem,{as:u.N,"aria-label":"View rules",to:z.rulesetsPath,className:"text-decoration-skip",children:[(0,n.jsx)(s.l.LeadingVisual,{children:(0,n.jsx)(c.ShieldLockIcon,{size:16})}),"View rules"]}):(0,n.jsxs)(s.l.Item,{onSelect:()=>{q({type:"error",message:"There are no rulesets associated with this branch."})},children:[(0,n.jsx)(s.l.LeadingVisual,{children:(0,n.jsx)(c.ShieldLockIcon,{size:16})}),"View rules"]}),P.currentUserCanPush&&(0,n.jsxs)(s.l.Item,{"aria-label":`Rename branch '${z.name}'`,onSelect:()=>{M?q({type:"error",message:"This branch no longer exists."}):X()},children:[(0,n.jsx)(s.l.LeadingVisual,{children:(0,n.jsx)(c.PencilIcon,{size:16})}),"Rename branch"]})]})})]})]}),A[29]=q,A[30]=z.isDefault,A[31]=z.name,A[32]=z.rulesetsPath,A[33]=W,A[34]=Y,A[35]=M,A[36]=X,A[37]=I,A[38]=P,A[39]=F,A[40]=j):j=A[40],A[41]!==v||A[42]!==j?(w=(0,n.jsx)("div",{className:v,children:j}),A[41]=v,A[42]=j,A[43]=w):w=A[43],A[44]!==z||A[45]!==P||A[46]!==Q?(N=Q&&(0,n.jsx)(b,{repo:P,branch:z,onDismiss:Z}),A[44]=z,A[45]=P,A[46]=Q,A[47]=N):N=A[47],A[48]!==z.name||A[49]!==k||A[50]!==T||A[51]!==D||A[52]!==P||A[53]!==G?(C=G&&D&&T&&(0,n.jsx)(f,{showModal:G,setShowModal:H,setDeleting:O,branchName:z.name,onDelete:k,pullRequest:T,repo:P}),A[48]=z.name,A[49]=k,A[50]=T,A[51]=D,A[52]=P,A[53]=G,A[54]=C):C=A[54],A[55]!==N||A[56]!==C?(B=(0,n.jsxs)(l.Suspense,{children:[N,C]}),A[55]=N,A[56]=C,A[57]=B):B=A[57],A[58]!==B||A[59]!==w?(S=(0,n.jsxs)(n.Fragment,{children:[w,B]}),A[58]=B,A[59]=w,A[60]=S):S=A[60],S}b.displayName="RenameBranchDialog",g.displayName="BranchActionMenu"},49845(e,t,r){r.d(t,{I:()=>s,e:()=>c});var n=r(74848),a=r(16522),l=r(96540);let i={enabled:!0,canCreate:!0},o=(0,l.createContext)(i);function s(e){let t,r=(0,a.c)(3),{pullRequestConfig:l,children:s}=e,c=l??i;return r[0]!==s||r[1]!==c?(t=(0,n.jsx)(o,{value:c,children:s}),r[0]=s,r[1]=c,r[2]=t):t=r[2],t}function c(){return(0,l.use)(o)}o.displayName="PullRequestConfigContext",s.displayName="PullRequestConfigProvider"},59376(e,t,r){var n=r(74848),a=r(16522),l=r(50964),i=r(54242),o=r(31854),s=r(96540);let c=(0,s.createContext)(null);function u(e){let t,r=(0,a.c)(3),{options:l,children:i}=e;return r[0]!==i||r[1]!==l?(t=(0,n.jsx)(c,{value:l,children:i}),r[0]=i,r[1]=l,r[2]=t):t=r[2],t}function d(){let e=(0,s.use)(c);if(!e)throw Error("useCreateBranchButtonOptions must be used within CreateBranchButtonOptionProvider");return e}c.displayName="CreateBranchButtonOptionContext",u.displayName="CreateBranchButtonOptionProvider";let h=(0,s.createContext)(void 0);function m(e){let t,r=(0,a.c)(3),{user:l,children:i}=e;return r[0]!==i||r[1]!==l?(t=(0,n.jsxs)(h,{value:l,children:[" ",i," "]}),r[0]=i,r[1]=l,r[2]=t):t=r[2],t}function p(){return(0,s.use)(h)}h.displayName="CurrentUserContext",m.displayName="CurrentUserProvider";var _=r(49845);function f(e){let t,r,s,c,d,h=(0,a.c)(14),{children:p}=e,{repo:f,createBranchButtonOptions:b,currentUser:x,pullRequestConfig:g}=(0,l.X)();return h[0]!==p?(t=(0,n.jsx)(o.LB,{children:p}),h[0]=p,h[1]=t):t=h[1],h[2]!==b||h[3]!==t?(r=(0,n.jsx)(u,{options:b,children:t}),h[2]=b,h[3]=t,h[4]=r):r=h[4],h[5]!==f||h[6]!==r?(s=(0,n.jsx)(i.d,{repository:f,children:r}),h[5]=f,h[6]=r,h[7]=s):s=h[7],h[8]!==g||h[9]!==s?(c=(0,n.jsx)(_.I,{pullRequestConfig:g,children:s}),h[8]=g,h[9]=s,h[10]=c):c=h[10],h[11]!==x||h[12]!==c?(d=(0,n.jsx)(m,{user:x,children:c}),h[11]=x,h[12]=c,h[13]=d):d=h[13],d}f.displayName="App";var b=r(10095),x=r(38621),g=r(77236),y=r(72098),v=r(65594),j=r(34164),w=r(46249),N=r(67554),C=r(16969),B=r(14969);let S=[{type:"overview",title:"Overview",href:"branches"},{type:"yours",title:"Yours",href:"branches/yours",onlyShowForPushUsers:!0},{type:"active",title:"Active",href:"branches/active"},{type:"stale",title:"Stale",href:"branches/stale"},{type:"all",title:"All",href:"branches/all"}];var A=r(79040),P=r(7624),z=r(38750),I=r(70170);function T(){let e,t=(0,a.c)(3),r=(0,i.t)();return t[0]!==r.name||t[1]!==r.ownerLogin?(e=e=>{let{href:t}=S.find(t=>t.type===e)||{};if(t)return`/${r.ownerLogin}/${r.name}/${t}`},t[0]=r.name,t[1]=r.ownerLogin,t[2]=e):e=t[2],e}function k({onChange:e,selectedPage:t}){let[r,a]=(0,A.ok)(),[l,i]=(0,s.useState)(!1),[o,c]=(0,s.useState)(r.get("query")??""),u=(0,s.useRef)(null),d=(0,A.Zp)(),h=T(),m=(0,s.useRef)(e=>{});(0,s.useEffect)(()=>{m.current=n=>{e?.(n),"all"!==t?d(`${h("all")}?query=${encodeURIComponent(n)}&lastTab=${encodeURIComponent(t)}`,{replace:!0}):r.get("lastTab")&&!n?d(`${h(r.get("lastTab"))}?query=`,{replace:!0}):a({query:n},{replace:!0})}});let p=(0,s.useMemo)(()=>(0,I.s)(e=>m.current(e),250),[]);return(0,s.useEffect)(()=>()=>p.cancel(),[p]),(0,n.jsxs)(P.A,{children:[(0,n.jsx)(P.A.Label,{visuallyHidden:!0,children:"Search"}),(0,n.jsx)(z.A,{value:o,ref:u,placeholder:"Search branches...",leadingVisual:x.SearchIcon,onChange:e=>{c(e.target.value),p(e.target.value)},block:!0,onFocus:()=>i(!0),onBlur:()=>i(!1),"data-react-autofocus":l})]})}k.displayName="SearchInput";var R=r(22216);function L(e){let t,r,l,i=(0,a.c)(11),{className:o}=e,{current_page:s,has_more:c}=(0,v.B)(),[u,d]=(0,A.ok)(),h=c?s+1:s;return 1===s&&1===h?null:(i[0]!==s||i[1]!==u||i[2]!==d?(t=(e,t)=>{e.preventDefault(),s!==t&&(u.set("page",`${t}`),d(u))},i[0]=s,i[1]=u,i[2]=d,i[3]=t):t=i[3],i[4]!==s||i[5]!==h||i[6]!==t?(r=(0,n.jsx)(R.A,{pageCount:h,currentPage:s,onPageChange:t,showPages:!1}),i[4]=s,i[5]=h,i[6]=t,i[7]=r):r=i[7],i[8]!==o||i[9]!==r?(l=(0,n.jsx)("div",{className:o,children:r}),i[8]=o,i[9]=r,i[10]=l):l=i[10],l)}L.displayName="BranchPagination";function M(e){let t,r,l,o,s,c,u,h,m,p,_=(0,a.c)(31),{selectedPage:f,children:b}=e,{currentUserCanPush:x}=(0,i.t)(),y=T(),v=d();if(_[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.jsx)(w.A,{as:"h1",className:"Layout-module__Heading__q49YA",children:"Branches"}),_[0]=t):t=_[0],_[1]!==v||_[2]!==x?(r=x&&(0,n.jsx)(B.F,{...v,liveReload:!0}),_[1]=v,_[2]=x,_[3]=r):r=_[3],_[4]!==r?(l=(0,n.jsx)(N.M.Header,{children:(0,n.jsxs)("div",{className:"Layout-module__HeaderContainer__aAw0i",children:[t,(0,n.jsx)("div",{className:"Layout-module__HeaderActions__pf37V",children:r})]})}),_[4]=r,_[5]=l):l=_[5],_[6]!==x||_[7]!==y||_[8]!==f){let e,t;_[10]!==x?(e=e=>{let{onlyShowForPushUsers:t}=e;return x||!t},_[10]=x,_[11]=e):e=_[11],_[12]!==y||_[13]!==f?(t=e=>(0,n.jsx)(C.A.Link,{as:g.N,to:y(e.type),selected:e.type===f,children:e.title},e.type),_[12]=y,_[13]=f,_[14]=t):t=_[14],o=S.filter(e).map(t),_[6]=x,_[7]=y,_[8]=f,_[9]=o}else o=_[9];return _[15]!==o?(s=(0,n.jsx)(C.A,{children:o}),_[15]=o,_[16]=s):s=_[16],_[17]!==f?(c=(0,n.jsx)(k,{selectedPage:f}),_[17]=f,_[18]=c):c=_[18],_[19]!==b?(u=(0,n.jsx)("div",{"data-hpc":!0,children:b}),_[19]=b,_[20]=u):u=_[20],_[21]!==f?(h="overview"!==f?(0,n.jsx)(L,{}):null,_[21]=f,_[22]=h):h=_[22],_[23]!==s||_[24]!==c||_[25]!==u||_[26]!==h?(m=(0,n.jsx)(N.M.Content,{as:"div",children:(0,n.jsxs)("div",{className:"Layout-module__ContentContainer__fleLy",children:[s,c,u,h]})}),_[23]=s,_[24]=c,_[25]=u,_[26]=h,_[27]=m):m=_[27],_[28]!==l||_[29]!==m?(p=(0,n.jsxs)(N.M,{children:[l,m]}),_[28]=l,_[29]=m,_[30]=p):p=_[30],p}M.displayName="Layout";var q=r(4925),D=r(70944),E=r(5024),$=r(3803),O=r(45360),V=r(26108),U=r(58926);function G(e){let t,r,n=(0,a.c)(6),{rulesetsPath:l,protectedByBranchProtections:i}=e,o="unprotected";l?o="protectedByRulesets":i&&(o="protectedByBranchProtections");let s="protectedByBranchProtections"===o,c="protectedByRulesets"===o;n[0]!==s||n[1]!==c?(t={branchProtections:s,rulesets:c},n[0]=s,n[1]=c,n[2]=t):t=n[2];let u="unprotected"!==o;return n[3]!==t||n[4]!==u?(r={isProtectedBy:t,isProtected:u},n[3]=t,n[4]=u,n[5]=r):r=n[5],r}function H(e){let t,r,l,i=(0,a.c)(14);i[0]!==e?({isLarge:r,...t}=e,i[0]=e,i[1]=t,i[2]=r):(t=i[1],r=i[2]);let{isProtectedBy:o}=G(t),c=(0,s.useRef)(null),u=!r&&t.name.length<5?"ne":void 0;i[3]!==u?(l={contentRef:c,"aria-label":"This branch is protected by branch protections",direction:u},i[3]=u,i[4]=l):l=i[4];let[d,h]=(0,U.B)(l);if(o.branchProtections){let e,t,r;return i[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(b.A,{size:16,icon:x.ShieldIcon,"aria-label":"This branch is protected by branch protections",className:"BranchProtectionShield-module__ShieldIcon__zVbCj"}),i[5]=e):e=i[5],i[6]!==d?(t=(0,n.jsx)("div",{"data-testid":"branch-protection-shield",ref:c,...d,children:e}),i[6]=d,i[7]=t):t=i[7],i[8]!==t||i[9]!==h?(r=(0,n.jsxs)(n.Fragment,{children:[t,h]}),i[8]=t,i[9]=h,i[10]=r):r=i[10],r}if(o.rulesets){let e,r;return i[11]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(V.K,{variant:"invisible",icon:x.ShieldIcon,"aria-label":"View rules"}),i[11]=e):e=i[11],i[12]!==t.rulesetsPath?(r=(0,n.jsx)(g.N,{to:t.rulesetsPath,"aria-label":"This branch is protected",children:e}),i[12]=t.rulesetsPath,i[13]=r):r=i[13],r}return null}H.displayName="BranchProtectionShield";var W=r(39775),Y=r(5095);let F={[o.Gy.small]:200,[o.Gy.medium]:200,[o.Gy.large]:225,[o.Gy.xlarge]:250,[o.Gy.xxlarge]:460,[o.Gy.xxxlarge]:530,[o.Gy.xxxxlarge]:540};function Q(e){let t,r,l=(0,a.c)(6),{screenSize:i}=(0,o.lm)(),{isProtected:s}=G(e),c=(F[i]??F[o.Gy.small])+(s?-32:0);return l[0]!==e.name||l[1]!==c?(t=(0,n.jsx)(W.A,{title:e.name,maxWidth:c,children:e.name}),l[0]=e.name,l[1]=c,l[2]=t):t=l[2],l[3]!==e.path||l[4]!==t?(r=(0,n.jsx)(Y.A,{href:e.path,children:t}),l[3]=e.path,l[4]=t,l[5]=r):r=l[5],r}Q.displayName="TruncatedBranchName";function K(e){let t,r,l,i,o,s,c,u,d,h,m,p=(0,a.c)(24);p[0]!==e?({className:r,isLarge:l,...t}=e,p[0]=e,p[1]=t,p[2]=r,p[3]=l):(t=p[1],r=p[2],l=p[3]);let _=void 0!==l&&l,f=!_&&t.name.length<3?"ne":void 0;return p[4]!==r?(i=(0,j.$)(r,"BranchDescription-module__Container__XwtqV"),p[4]=r,p[5]=i):i=p[5],p[6]!==t?(o=(0,n.jsx)(Q,{...t}),p[6]=t,p[7]=o):o=p[7],p[8]===Symbol.for("react.memo_cache_sentinel")?(s={width:X},p[8]=s):s=p[8],p[9]!==f?(c={direction:f},p[9]=f,p[10]=c):c=p[10],p[11]!==t.name||p[12]!==c?(u=(0,n.jsx)(O.T,{className:"d-flex flex-justify-center",style:s,textToCopy:t.name,ariaLabel:"Copy branch name to clipboard",tooltipProps:c}),p[11]=t.name,p[12]=c,p[13]=u):u=p[13],p[14]!==t||p[15]!==_?(d=(0,n.jsx)(H,{...t,isLarge:_}),p[14]=t,p[15]=_,p[16]=d):d=p[16],p[17]!==u||p[18]!==d?(h=(0,n.jsxs)("div",{className:"BranchDescription-module__ActionGroup__OraDG",children:[u,d]}),p[17]=u,p[18]=d,p[19]=h):h=p[19],p[20]!==i||p[21]!==o||p[22]!==h?(m=(0,n.jsxs)("div",{className:i,children:[o,h]}),p[20]=i,p[21]=o,p[22]=h,p[23]=m):m=p[23],m}K.displayName="BranchDescription";let X=32;var Z=r(54848),J=r(56133),ee=r(62935),et=r(60625),er=r(95126),en=r(206);let ea="UpdatedBy-module__UserLink__DfNhT",el="UpdatedBy-module__GitHubAvatar___HLZN";function ei(e){let t,r,l,i,o=(0,a.c)(11),{user:s,updatedAt:c,deletedAt:u}=e,d=void 0===u?void 0:u,h=(0,er.yY)();o[0]!==h||o[1]!==s?(t=s&&(s.path.startsWith("/apps/")?(0,n.jsx)(et.m,{text:s.name,children:(0,n.jsx)(J.A,{href:s.path,className:ea,children:(0,n.jsx)(en.r,{"aria-label":s.login,src:s.avatarUrl,alt:s.login,size:16,square:!0,className:el})})}):(0,n.jsx)(J.A,{href:s.path,...h("user",{login:s.login}),className:ea,children:(0,n.jsx)(en.r,{"aria-label":s.login,src:s.avatarUrl,alt:s.login,size:16,square:!1,className:el})})),o[0]=h,o[1]=s,o[2]=t):t=o[2],o[3]!==d?(r=d&&(0,n.jsx)("span",{children:"Deleted"}),o[3]=d,o[4]=r):r=o[4];let m=d||c;return o[5]!==m?(l=(0,n.jsx)(ee.A,{datetime:m,tense:"past"}),o[5]=m,o[6]=l):l=o[6],o[7]!==t||o[8]!==r||o[9]!==l?(i=(0,n.jsxs)("div",{className:"UpdatedBy-module__Container__EJxAb",children:[t,r,"\xa0",l]}),o[7]=t,o[8]=r,o[9]=l,o[10]=i):i=o[10],i}ei.displayName="UpdatedBy";var eo=r(14804);let es=(0,s.lazy)(()=>Promise.all([r.e("13333"),r.e("3549")]).then(r.bind(r,13907)));es.displayName="StatusCheckRollup";let ec=(0,s.lazy)(()=>r.e("60274").then(r.bind(r,16745)));ec.displayName="PullRequestLabel";let eu=(0,s.lazy)(()=>r.e("96474").then(r.bind(r,97025)));eu.displayName="MergeQueueLabel";let ed=(0,s.lazy)(()=>Promise.resolve().then(r.bind(r,54848)));function eh(e){let t,r,l,o,c,u,d,h,m,f,b,g=(0,a.c)(37),{labelId:y,branches:v,deferredMetadata:j,showMergeQueueHeader:w,isLarge:N}=e,C=void 0!==N&&N,B=(0,i.t)(),S=p(),{enabled:A}=(0,_.e)(),[P,z]=(0,s.useState)(ef);g[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{z(t=>{let r=new Map(t);return r.set(e,{deleted:!0,deletedAt:new Date().toISOString()}),r})},g[0]=t):t=g[0];let I=t;g[1]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{z(t=>{let r=new Map(t);return r.delete(e),r})},g[1]=r):r=g[1];let T=r;if(g[2]!==P||g[3]!==v||g[4]!==j||g[5]!==C){let e;g[7]!==P||g[8]!==j||g[9]!==C?(e=e=>{let t=j?.get(e.name),r=P.get(e.name),n=r?.deletedAt??e.deletedAt,a=r?r.deleted:!!e.deletedAt;return{id:e.name,...e,author:e.author??t?.author,oid:t?.oid,deletedAt:n,aheadBehind:t?.aheadBehind,statusCheckRollup:t?.statusCheckRollup,pullRequest:t?.pullRequest,mergeQueue:t?.mergeQueue,maxDiverged:t?.maxDiverged,isLarge:C,deleted:a}},g[7]=P,g[8]=j,g[9]=C,g[10]=e):e=g[10],l=v.map(e),g[2]=P,g[3]=v,g[4]=j,g[5]=C,g[6]=l}else l=g[6];let k=l;if(0===v.length){let e;return g[11]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsxs)(D.E,{border:!0,children:[(0,n.jsx)(D.E.Visual,{children:(0,n.jsx)(x.GitBranchIcon,{size:"medium"})}),(0,n.jsx)(D.E.Heading,{children:"No branches"}),(0,n.jsx)(D.E.Description,{children:"No branches match the search"})]}),g[11]=e):e=g[11],e}return g[12]===Symbol.for("react.memo_cache_sentinel")?(o={header:"Branch",field:"name",width:"grow",renderCell:e_},g[12]=o):o=g[12],g[13]!==S||g[14]!==j?(c={header:"Updated",field:"author",width:180,renderCell:e=>{let{author:t,authoredDate:r,deleted:a,deletedAt:l}=e;return(0,n.jsx)(eb,{children:(0,n.jsxs)(n.Fragment,{children:[j||a||t?null:(0,n.jsx)(E.f,{width:"16px",height:"16px",className:"mr-2"}),(0,n.jsx)(ei,{user:a?S:t,updatedAt:r,deletedAt:l})]})})}},g[13]=S,g[14]=j,g[15]=c):c=g[15],g[16]!==j?(u={header:"Check status",id:"statusCheckRollup",width:125,renderCell:e=>{let{oid:t,statusCheckRollup:r}=e,a=(0,n.jsx)(E.f,{width:"33%",height:"20px",style:{maxWidth:"42px"}});return j?t&&r?(0,n.jsx)(eb,{children:(0,n.jsx)(s.Suspense,{fallback:a,children:(0,n.jsx)(es,{oid:t,statusCheckRollup:r})})}):null:(0,n.jsx)(eb,{children:a})}},g[16]=j,g[17]=u):u=g[17],g[18]!==j?(d={header:ep,field:"aheadBehind",width:Z.AheadBehindCountWidth,renderCell:e=>{let{isDefault:t,aheadBehind:r,maxDiverged:a}=e,l=(0,n.jsx)(E.f,{width:`${Z.AheadBehindCountWidth-24}px`,height:"20px"});return j?t?(0,n.jsx)(eb,{className:"BranchesTable-module__VerticallyCenteredCell__aPZi5",children:(0,n.jsx)(q.A,{children:"Default"})}):r?(0,n.jsx)(s.Suspense,{fallback:l,children:(0,n.jsx)(ed,{width:Z.AheadBehindCountWidth-24,aheadCount:r[0],behindCount:r[1],maxDiverged:a})}):null:(0,n.jsx)(eb,{children:l})}},g[18]=j,g[19]=d):d=g[19],g[20]!==j||g[21]!==A||g[22]!==B||g[23]!==w?(h=w||A?[{header:w?"Merge queue":"Pull request",id:"pullRequestOrMergeQueue",width:125,renderCell:e=>{let{mergeQueue:t,pullRequest:r}=e,a=(0,n.jsx)(E.f,{width:"33%",height:"20px",style:{maxWidth:"75px"}});return j?t?(0,n.jsx)(eb,{children:(0,n.jsx)(s.Suspense,{fallback:a,children:(0,n.jsx)(eu,{mergeQueueUrl:t.path,queueCount:t.count})})}):A&&r?(0,n.jsx)(eb,{children:(0,n.jsx)(s.Suspense,{fallback:a,children:(0,n.jsx)(ec,{repo:B,pullRequest:r})})}):null:(0,n.jsx)(eb,{children:a})}}]:[],g[20]=j,g[21]=A,g[22]=B,g[23]=w,g[24]=h):h=g[24],g[25]!==B?(m={header:em,id:"actionMenu",width:70,renderCell:e=>{let{isDefault:t,name:r,rulesetsPath:a,path:l,deleteable:i,deleteProtected:o,renameable:s,isBeingRenamed:c,oid:u,pullRequest:d,deletedAt:h}=e;return(0,n.jsx)(eo.u,{repo:B,branch:{isDefault:t,name:r,rulesetsPath:a,path:l,deleteable:i,deleteProtected:o,renameable:s,isBeingRenamed:c},oid:u,pullRequest:d,onDelete:I,onRestore:T,deletedAt:h,className:"BranchesTable-module__BranchActionMenu__YcoNF"})}},g[25]=B,g[26]=m):m=g[26],g[27]!==m||g[28]!==c||g[29]!==u||g[30]!==d||g[31]!==h?(f=[o,c,u,d,...h,m],g[27]=m,g[28]=c,g[29]=u,g[30]=d,g[31]=h,g[32]=f):f=g[32],g[33]!==y||g[34]!==f||g[35]!==k?(b=(0,n.jsx)($.b,{"aria-labelledby":y,data:k,columns:f}),g[33]=y,g[34]=f,g[35]=k,g[36]=b):b=g[36],b}function em(){return(0,n.jsx)("span",{className:(0,j.$)("sr-only","BranchesTable-module__RelativeText__tXBVm"),children:"Action menu"})}function ep(){return(0,n.jsxs)("div",{className:"BranchesTable-module__CenteredContent__KOd3y",children:[(0,n.jsx)("span",{className:"BranchesTable-module__BorderedText__xY50a",children:"Behind"}),(0,n.jsx)("span",{className:"BranchesTable-module__PaddedText__bkYDq",children:"Ahead"})]})}function e_(e){return(0,n.jsx)(K,{...e})}function ef(){return new Map}ed.displayName="AheadBehindCount",eh.displayName="BranchesTable";let eb=e=>{let t,r,l=(0,a.c)(5),{className:i,children:o}=e;return l[0]!==i?(t=(0,j.$)("BranchesTable-module__VerticallyCenteredCellBase__bRQfE",i),l[0]=i,l[1]=t):t=l[1],l[2]!==o||l[3]!==t?(r=(0,n.jsx)("div",{className:t,children:o}),l[2]=o,l[3]=t,l[4]=r):r=l[4],r};eb.displayName="VerticallyCenteredCell";var ex=r(21373),eg=r(51581),ey=r(78597),ev=r(23666);let ej="ProtectThisBranchBanner-module__ContentRow__oq2RV";function ew(e){let t,r,l,o,s,c,u,h,m,_,f,b,y,v,w,N,C,B=(0,a.c)(40),{onDismiss:S}=e,A=p(),{defaultBranch:P,ownerLogin:z,name:I,id:T}=(0,i.t)(),{helpUrl:k}=d(),{sendClickAnalyticsEvent:R}=(0,eg.S)();B[0]!==A||B[1]!==T||B[2]!==S?(t=()=>{A&&(async()=>{(await (0,ey.DI)(`${(0,ev.jMU)(A)}?notice_name=sculk_protect_this_branch&repository_id=${T}`,{method:"DELETE"})).ok&&S()})()},B[0]=A,B[1]=T,B[2]=S,B[3]=t):t=B[3];let L=t;B[4]!==R?(r=()=>{R({category:"suggestion",action:"click_to_dismiss",label:"ref_cta:dismiss;ref_loc:repo_branches_listing;"})},B[4]=R,B[5]=r):r=B[5];let M=r;B[6]!==R?(l=()=>{R({category:"suggestion",action:"click_to_learn_more_about_rulesets",label:"ref_cta:learn_more_about_rulesets;ref_loc:repo_files_listing;"})},B[6]=R,B[7]=l):l=B[7];let q=l;B[8]!==R?(o=()=>{R({category:"suggestion",action:"click_to_add_a_rule",label:"ref_cta:protect_this_branch;ref_loc:repo_branches_listing;"})},B[8]=R,B[9]=o):o=B[9];let D=o;B[10]===Symbol.for("react.memo_cache_sentinel")?(s=(0,j.$)("color-border-default js-notice","ProtectThisBranchBanner-module__BannerContainer__nQ_g7"),B[10]=s):s=B[10];let E=`Your ${P} branch isn't protected`;B[11]===Symbol.for("react.memo_cache_sentinel")?(c=(0,n.jsx)("div",{"data-testid":"protect-this-branch-primer-icon",className:(0,j.$)("branch-action-item-icon completeness-indicator completeness-indicator-problem","ProtectThisBranchBanner-module__ShieldIcon__rQR3o"),children:(0,n.jsx)(x.GitBranchIcon,{})}),u=(0,j.$)("h5","ProtectThisBranchBanner-module__BannerTitle__E34Ok"),B[11]=c,B[12]=u):(c=B[11],u=B[12]),B[13]!==P?(h=(0,n.jsxs)("h3",{className:u,children:["Your ",P," branch isn't protected"]}),B[13]=P,B[14]=h):h=B[14];let $=`${k}/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets`;return B[15]===Symbol.for("react.memo_cache_sentinel")?(m={textDecoration:"underline"},B[15]=m):m=B[15],B[16]!==$||B[17]!==q?(_=(0,n.jsxs)("p",{className:"ProtectThisBranchBanner-module__BannerText__dQC6k",children:["Protect this branch from force pushing or deletion, or require status checks before merging.\xa0",(0,n.jsx)(g.N,{onClick:q,to:$,style:m,children:"Learn more"})]}),B[16]=$,B[17]=q,B[18]=_):_=B[18],B[19]!==_||B[20]!==h?(f=(0,n.jsxs)("div",{className:ej,children:[c,(0,n.jsxs)("div",{children:[h,_]})]}),B[19]=_,B[20]=h,B[21]=f):f=B[21],B[22]!==L||B[23]!==M?(b=(0,n.jsx)(ex.Q,{variant:"invisible",onClick:()=>{L(),M()},className:"ProtectThisBranchBanner-module__DismissButton___OBRS",children:"Dismiss"}),B[22]=L,B[23]=M,B[24]=b):b=B[24],B[25]!==I||B[26]!==z?(y=(0,ev.cmy)({owner:z,repo:I}),B[25]=I,B[26]=z,B[27]=y):y=B[27],B[28]!==y||B[29]!==D?(v=(0,n.jsx)(g.N,{onClick:D,to:y,className:"btn btn-sm",children:"Protect this branch"}),B[28]=y,B[29]=D,B[30]=v):v=B[30],B[31]!==b||B[32]!==v?(w=(0,n.jsxs)("div",{className:ej,children:[b,v]}),B[31]=b,B[32]=v,B[33]=w):w=B[33],B[34]!==f||B[35]!==w?(N=(0,n.jsxs)("div",{className:"ProtectThisBranchBanner-module__BannerContent__Tslad","data-testid":"protect-this-branch-banner",children:[f,w]}),B[34]=f,B[35]=w,B[36]=N):N=B[36],B[37]!==N||B[38]!==E?(C=(0,n.jsx)("aside",{className:s,"aria-label":E,children:N}),B[37]=N,B[38]=E,B[39]=C):C=B[39],C}function eN(e,t){let r,n,l,i,o,c=(0,a.c)(14),[u,d]=(0,s.useState)(void 0),[h]=(0,A.ok)();c[0]!==h?(r=h.get("query")??"",c[0]=h,c[1]=r):r=c[1];let m=r;if(c[2]!==m.length||c[3]!==e.name||c[4]!==e.ownerLogin){let t=new URLSearchParams;m.length>0&&t.append("include_authors","true"),c[7]!==e.name||c[8]!==e.ownerLogin?(n=(0,ev.SHX)({owner:e.ownerLogin,repo:e.name,action:"branches"}),c[7]=e.name,c[8]=e.ownerLogin,c[9]=n):n=c[9],l=t.toString(),c[2]=m.length,c[3]=e.name,c[4]=e.ownerLogin,c[5]=n,c[6]=l}else n=c[5],l=c[6];let p=`${n}/deferred_metadata?${l}`;return c[10]!==t||c[11]!==p?(i=()=>{let e=!1;return(async()=>{if(d(void 0),!t.length)return d(new Map);let r=await (0,ey.lS)(p,{body:{branches:t},method:"POST"});if(!e)try{if(r.ok){let e=await r.json();e&&d(new Map(Object.entries(e.deferredMetadata)))}else d(new Map)}catch{d(new Map)}})(),function(){e=!0}},o=[t,p],c[10]=t,c[11]=p,c[12]=i,c[13]=o):(i=c[12],o=c[13]),(0,s.useEffect)(i,o),u}ew.displayName="ProtectThisBranchBanner";function eC(e){let t,r,l,i,s,c,u,d=(0,a.c)(27),{id:h,title:m,viewMorePath:p,branches:_,deferredMetadata:f,showMergeQueueHeader:v,showFooter:w,isSecurityAdvisory:N,onDismissBanner:C}=e,B=void 0===C?eB:C,{screenSize:S}=(0,o.lm)(),A=S>=o.Gy.xxxlarge,P="default"===h;if(!_.length)return null;let z=w&&"Overview-module__TableContainerWithFooter__MB89k";return d[0]!==z?(t=(0,j.$)(z),d[0]=z,d[1]=t):t=d[1],d[2]!==h||d[3]!==m?(r=(0,n.jsx)(y.X.Title,{as:"h2",id:h,children:m}),d[2]=h,d[3]=m,d[4]=r):r=d[4],d[5]!==_||d[6]!==f||d[7]!==h||d[8]!==A||d[9]!==v?(l=(0,n.jsx)(eh,{labelId:h,branches:_,deferredMetadata:f,showMergeQueueHeader:v,isLarge:A}),d[5]=_,d[6]=f,d[7]=h,d[8]=A,d[9]=v,d[10]=l):l=d[10],d[11]!==t||d[12]!==r||d[13]!==l?(i=(0,n.jsxs)(y.X.Container,{className:t,children:[r,l]}),d[11]=t,d[12]=r,d[13]=l,d[14]=i):i=d[14],d[15]!==P||d[16]!==N||d[17]!==B||d[18]!==w?(s=P&&w&&!N?(0,n.jsx)(eP,{children:(0,n.jsx)(ew,{onDismiss:B})}):null,d[15]=P,d[16]=N,d[17]=B,d[18]=w,d[19]=s):s=d[19],d[20]!==w||d[21]!==p?(c=p&&w?(0,n.jsx)(eP,{children:(0,n.jsx)("span",{children:(0,n.jsxs)(g.N,{to:p,children:["View more branches ",(0,n.jsx)(b.A,{icon:x.ChevronRightIcon})]})})}):null,d[20]=w,d[21]=p,d[22]=c):c=d[22],d[23]!==i||d[24]!==s||d[25]!==c?(u=(0,n.jsxs)("div",{className:"Overview-module__SectionContainer__Uh2tH",children:[i,s,c]}),d[23]=i,d[24]=s,d[25]=c,d[26]=u):u=d[26],u}function eB(){return null}function eS(){let e,t,r,l,o,c,u,d,h,m=(0,a.c)(31),p=(0,v.B)(),_=T(),f=(0,i.t)(),b=p.protectThisBranchBanner?.isSecurityAdvisory??!1,[x,g]=(0,s.useState)(p.protectThisBranchBanner?.dismissed??!0);m[0]!==p.branches.default?(e=p.branches.default?[p.branches.default]:[],m[0]=p.branches.default,m[1]=e):e=m[1];let y=e;m[2]!==y||m[3]!==p.branches.yours?(t=y.concat(p.branches.yours),m[2]=y,m[3]=p.branches.yours,m[4]=t):t=m[4],m[5]!==p.branches.active||m[6]!==t?(r=t.concat(p.branches.active).map(eA),m[5]=p.branches.active,m[6]=t,m[7]=r):r=m[7];let j=eN(f,r);m[8]!==j||m[9]!==x||m[10]!==b||m[11]!==p.branches.default?(l=p.branches.default&&(0,n.jsx)(eC,{id:"default",title:"Default",branches:[p.branches.default],deferredMetadata:j,showMergeQueueHeader:p.branches.default.mergeQueueEnabled,onDismissBanner:()=>{g(!0)},showFooter:!x,isSecurityAdvisory:b}),m[8]=j,m[9]=x,m[10]=b,m[11]=p.branches.default,m[12]=l):l=m[12];let w=p.branches.yours;m[13]!==_?(o=_("yours"),m[13]=_,m[14]=o):o=m[14],m[15]!==j||m[16]!==p.branches.yours||m[17]!==p.hasMore.yours||m[18]!==o?(c=(0,n.jsx)(eC,{id:"yours",title:"Your branches",branches:w,deferredMetadata:j,viewMorePath:o,showFooter:p.hasMore.yours}),m[15]=j,m[16]=p.branches.yours,m[17]=p.hasMore.yours,m[18]=o,m[19]=c):c=m[19];let N=p.branches.active;return m[20]!==_?(u=_("active"),m[20]=_,m[21]=u):u=m[21],m[22]!==j||m[23]!==p.branches.active||m[24]!==p.hasMore.active||m[25]!==u?(d=(0,n.jsx)(eC,{id:"Active",title:"Active branches",branches:N,deferredMetadata:j,viewMorePath:u,showFooter:p.hasMore.active}),m[22]=j,m[23]=p.branches.active,m[24]=p.hasMore.active,m[25]=u,m[26]=d):d=m[26],m[27]!==l||m[28]!==c||m[29]!==d?(h=(0,n.jsxs)(M,{selectedPage:"overview",children:[l,c,d]}),m[27]=l,m[28]=c,m[29]=d,m[30]=h):h=m[30],h}function eA(e){return e.name}function eP(e){let t,r=(0,a.c)(2),{children:l}=e;return r[0]!==l?(t=(0,n.jsx)("div",{className:"Overview-module__TableFooter__jvjjX",children:l}),r[0]=l,r[1]=t):t=r[1],t}eC.displayName="BranchSection",eS.displayName="Overview",eP.displayName="FooterRow";var ez=r(51591),eI=r(31199),eT=r(49481);function ek(){let e,t=(0,a.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(eq,{type:"yours"}),t[0]=e):e=t[0],e}function eR(){let e,t=(0,a.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(eq,{type:"active"}),t[0]=e):e=t[0],e}function eL(){let e,t=(0,a.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(eq,{type:"stale"}),t[0]=e):e=t[0],e}function eM(){let e,t=(0,a.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(eq,{type:"all"}),t[0]=e):e=t[0],e}function eq(e){let t,r,l,c,u,d=(0,a.c)(13),{type:h}=e,m=(0,v.B)(),p=(0,i.t)(),[_]=(0,A.ok)(),{screenSize:f}=(0,o.lm)(),b=f>=o.Gy.xxxlarge;d[0]!==m.branches?(t=m.branches.map(eD),d[0]=m.branches,d[1]=t):t=d[1];let x=t,g=eN(p,x);return d[2]!==x||d[3]!==_?(r=()=>{_.get("query")&&(0===x.length?(0,eT.i)("No results found"):(0,eT.i)(`${x.length} result${x.length>1?"s":""} found`))},l=[x,_],d[2]=x,d[3]=_,d[4]=r,d[5]=l):(r=d[4],l=d[5]),(0,s.useEffect)(r,l),d[6]!==g||d[7]!==b||d[8]!==m.branches?(c=(0,n.jsx)(eh,{branches:m.branches,deferredMetadata:g,isLarge:b}),d[6]=g,d[7]=b,d[8]=m.branches,d[9]=c):c=d[9],d[10]!==c||d[11]!==h?(u=(0,n.jsx)(M,{selectedPage:h,children:c}),d[10]=c,d[11]=h,d[12]=u):u=d[12],u}function eD(e){return e.name}ek.displayName="Yours",eR.displayName="Active",eL.displayName="Stale",eM.displayName="All",eq.displayName="List",(0,ez.o)("repos-branches",()=>({App:f,routes:[(0,eI.a)({path:"/:user_id/:repository/branches",Component:eS}),(0,eI.a)({path:"/:user_id/:repository/branches/yours",Component:ek}),(0,eI.a)({path:"/:user_id/:repository/branches/active",Component:eR}),(0,eI.a)({path:"/:user_id/:repository/branches/stale",Component:eL}),(0,eI.a)({path:"/:user_id/:repository/branches/all",Component:eM})]}))},31854(e,t,r){r.d(t,{nn:()=>h,LB:()=>d,Gy:()=>o,lm:()=>u});var n=r(74848),a=r(16522),l=r(96540);class i{#e=null;#t=null;#r=new Set;#n;#a;constructor(e,t){this.#n=[...e].sort((e,t)=>t-e),this.#a=t}subscribe=e=>{if("u"{this.#r.delete(e),this.#i()}};getSnapshot=()=>{if("u"{let t=e[0];if(!t)return;let r=this.#s(t.contentRect.width);if(null===this.#e||r!==this.#e)for(let e of(this.#e=r,this.#r))e()};#s(e){for(let t of this.#n)if(e>=t)return t;return this.#a}#o(){if("u"typeof window&&"number"==typeof window.innerWidth&&(e=window.innerWidth);let t=this.#s(e);return this.#e=t,t}#l(){this.#t||(this.#t=new ResizeObserver(this.#c),this.#t.observe(document.documentElement),null===this.#e&&this.#o())}#i(){0===this.#r.size&&this.#t&&(this.#t.disconnect(),this.#t=null)}}let o={small:1,medium:544,large:768,xlarge:1012,xxlarge:1280,xxxlarge:1350,xxxxlarge:1440},s=new i([o.xxxxlarge,o.xxxlarge,o.xxlarge,o.xlarge,o.large,o.medium,o.small],o.small),c=l.createContext({screenSize:o.small});function u(){return l.use(c)}function d(e){let t,r,i,u=(0,a.c)(7),{children:d,initialValue:h}=e,m=void 0===h?o.small:h;u[0]!==m?(t=()=>m,u[0]=m,u[1]=t):t=u[1];let p=(0,l.useSyncExternalStore)(s.subscribe,s.getSnapshot,t);u[2]!==p?(r={screenSize:p},u[2]=p,u[3]=r):r=u[3];let _=r;return u[4]!==d||u[5]!==_?(i=(0,n.jsx)(c,{value:_,children:d}),u[4]=d,u[5]=_,u[6]=i):i=u[6],i}function h(e){return s.computeSize(e)}c.displayName="ScreenContext",d.displayName="ScreenSizeProvider"},51581(e,t,r){r.d(t,{S:()=>s,s:()=>o});var n=r(16522),a=r(96540),l=r(66743),i=r(8470);function o(){let e,t,r=(0,n.c)(6),o=(0,a.use)(i.I);if(!o)throw Error("useAnalytics must be used within an AnalyticsContext");let{appName:s,category:c,metadata:u}=o;r[0]!==s||r[1]!==c||r[2]!==u?(e=(e,t,r)=>{let n={react:!0,app_name:s,category:c,...u};(0,l.BI)(e,{...n,...void 0===r?{}:r,target:t})},r[0]=s,r[1]=c,r[2]=u,r[3]=e):e=r[3];let d=e;return r[4]!==d?(t={sendAnalyticsEvent:d},r[4]=d,r[5]=t):t=r[5],t}function s(){let e,t,r=(0,n.c)(4),{sendAnalyticsEvent:a}=o();r[0]!==a?(e=e=>{a("analytics.click",void 0,void 0===e?{}:e)},r[0]=a,r[1]=e):e=r[1];let l=e;return r[2]!==l?(t={sendClickAnalyticsEvent:l},r[2]=l,r[3]=t):t=r[3],t}}},function(e){e.O(0,["11168","13726","28839","2966","34646","36600","37869","41013","46287","58889","59299","59852","60481","63991","6695","68751","7053","7463","7542","76015","79039","83465","85924","87376","90225","98131"],function(){return e(e.s=59376)}),e.O()}]); //# sourceMappingURL=repos-branches-48b7cd81befcd88d-7fde4b58b725b945.js.map