performance.mark("js-parse-end:26497-0218f0d73e1fb641.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["26497"],{99947(e,t,n){n.d(t,{A:()=>r});let r={codeFileContents:"CodeLines-module__codeFileContents__TXelD",scrollBarContainer:"CodeLines-module__scrollBarContainer__fsxaw",scrollBarSpacer:"CodeLines-module__scrollBarSpacer__ArS9V",scrollContainerHidden:"CodeLines-module__scrollContainerHidden__g7TeZ",scrollContainerAuto:"CodeLines-module__scrollContainerAuto__KCNMe"}},62269(e,t,n){function r(e){let t=e.match(/#?(?:L)(\d+)((?:C)(\d+))?/g);if(t){if(1===t.length){let e=s(t[0]);if(!e)return;return Object.freeze({start:e,end:e})}if(2!==t.length)return;{let e=s(t[0]),n=s(t[1]);if(!e||!n)return;return u(Object.freeze({start:e,end:n}))}}}function l(e){let{start:t,end:n}=u(e);return null!=t.column&&null!=n.column?`L${t.line}C${t.column}-L${n.line}C${n.column}`:null!=t.column?`L${t.line}C${t.column}-L${n.line}`:null!=n.column?`L${t.line}-L${n.line}C${n.column}`:t.line===n.line?`L${t.line}`:`L${t.line}-L${n.line}`}function i(e){let t;return{blobRange:r(e),anchorPrefix:(t=e.length<5e3&&e.match(/(file-.+?-)L\d+?/i))&&t[1]?t[1]:""}}function o({anchorPrefix:e,blobRange:t}){return t?`#${e}${l(t)}`:"#"}function s(e){if(!e)return null;let t=e.match(/L(\d+)/),n=e.match(/C(\d+)/);return t&&t[1]?Object.freeze({line:parseInt(t[1]),column:n&&n[1]?parseInt(n[1]):null}):null}function a(e,t){let[n,r]=c(e.start,!0,t),[l,i]=c(e.end,!1,t);if(!n||!l)return;let o=r,s=i;if(-1===o&&(o=0),-1===s&&(s=l.childNodes.length),!n.ownerDocument)throw Error("DOMRange needs to be inside document");let a=n.ownerDocument.createRange();return a.setStart(n,o),a.setEnd(l,s),a}function c(e,t,n){let r=[null,0],l=n(e.line);if(!l)return r;if(null==e.column)return[l,-1];let i=e.column-1,o=function e(t){if(t.nodeType===Node.TEXT_NODE)return[t];if(!t.childNodes||!t.childNodes.length)return[];let n=[];for(let r of t.childNodes)n=n.concat(e(r));return n}(l);for(let e=0;ei,JB:()=>o,Kn:()=>l,Py:()=>a,eC:()=>r})},27678(e,t,n){n.d(t,{O:()=>s,y:()=>a});var r=n(74848),l=n(16522),i=n(96540);let o=i.createContext("tree");function s(e){let t,n=(0,l.c)(3),{children:i,action:s}=e;return n[0]!==s||n[1]!==i?(t=(0,r.jsx)(o,{value:s,children:i}),n[0]=s,n[1]=i,n[2]=t):t=n[2],t}function a(){return i.use(o)}o.displayName="ActionContext",s.displayName="ActionProvider"},95173(e,t,n){n.d(t,{d:()=>s,w:()=>a});var r=n(74848),l=n(16522),i=n(96540);let o=i.createContext({copilotAccessAllowed:!1,copilotSpacesEnabled:!1,modelsAccessAllowed:!1,modelsRepoIntegrationEnabled:!1});function s(e){let t,n,i=(0,l.c)(8),{children:s,copilotAccessAllowed:a,copilotSpacesEnabled:c,modelsAccessAllowed:u,modelsRepoIntegrationEnabled:d}=e,f=void 0!==a&&a,m=void 0!==c&&c,h=void 0!==u&&u,p=void 0!==d&&d;i[0]!==f||i[1]!==m||i[2]!==h||i[3]!==p?(t={copilotAccessAllowed:f,copilotSpacesEnabled:m,modelsAccessAllowed:h,modelsRepoIntegrationEnabled:p},i[0]=f,i[1]=m,i[2]=h,i[3]=p,i[4]=t):t=i[4];let g=t;return i[5]!==s||i[6]!==g?(n=(0,r.jsx)(o,{value:g,children:s}),i[5]=s,i[6]=g,i[7]=n):n=i[7],n}function a(){return i.use(o)}o.displayName="CopilotSettingsContext",s.displayName="CopilotSettingsProvider"},51336(e,t,n){n.d(t,{s:()=>l});var r=n(50964);function l(){return(0,r.X)()}},74208(e,t,n){n.d(t,{A:()=>s,m:()=>a});var r=n(74848),l=n(16522),i=n(96540);let o=i.createContext(!1);function s(e){let t,n=(0,l.c)(3),{children:i,isMarketplaceEnabled:s}=e,a=void 0!==s&&s;return n[0]!==i||n[1]!==a?(t=(0,r.jsx)(o,{value:a,children:i}),n[0]=i,n[1]=a,n[2]=t):t=n[2],t}function a(){return i.use(o)}o.displayName="MarketplaceEnabledContext",s.displayName="MarketplaceEnabledProvider"},31595(e,t,n){n.d(t,{l:()=>a,n:()=>s});var r=n(74848),l=n(16522),i=n(96540);let o=i.createContext("");function s(e){let t,n=(0,l.c)(3),{children:i,path:s}=e;return n[0]!==i||n[1]!==s?(t=(0,r.jsx)(o,{value:s,children:i}),n[0]=i,n[1]=s,n[2]=t):t=n[2],t}function a(){return i.use(o)}o.displayName="PathContext",s.displayName="PathProvider"},68541(e,t,n){n.d(t,{x:()=>s,z:()=>a});var r=n(74848),l=n(16522),i=n(96540);let o=i.createContext(null);function s(e){let t,n,i=(0,l.c)(8),{children:s,refInfo:a}=e;a?.name,a?.listCacheKey,a?.refType,a?.currentOid;let c=a?.name??"",u=a?.listCacheKey??"",d=a?.refType,f=a?.currentOid??"";i[0]!==c||i[1]!==u||i[2]!==d||i[3]!==f?(t={name:c,listCacheKey:u,refType:d,currentOid:f},i[0]=c,i[1]=u,i[2]=d,i[3]=f,i[4]=t):t=i[4];let m=t;return i[5]!==s||i[6]!==m?(n=(0,r.jsx)(o,{value:m,children:s}),i[5]=s,i[6]=m,i[7]=n):n=i[7],n}function a(){let e=i.use(o);if(null===e)throw Error("useRefInfo must be used within a RefInfoProvider");return e}o.displayName="RefInfoContext",s.displayName="RefInfoProvider"},7231(e,t,n){n.d(t,{T:()=>d});var r=n(16522),l=n(54242),i=n(95424),o=n(23666),s=n(51581),a=n(78597),c=n(36594),u=n(73537);function d(){let e,t,n,d,f,m,h,p,g,v,b,y,x,w,C,L,_,N,S,j=(0,r.c)(17),{sendAnalyticsEvent:E}=(0,s.s)(),R=(v=(0,r.c)(6),b=(t=(0,r.c)(7),n=(0,l.t)(),d=(0,c.i)(),f=`${n.ownerLogin}/${n.name}`,m=d?.id,h=d?.login,t[0]!==n.id||t[1]!==n.isFork||t[2]!==n.public||t[3]!==f||t[4]!==m||t[5]!==h?(e={react_app:"code-view",repository_id:n.id,repository_nwo:f,repository_public:n.public,repository_is_fork:n.isFork,actor_id:m,actor_login:h},t[0]=n.id,t[1]=n.isFork,t[2]=n.public,t[3]=f,t[4]=m,t[5]=h,t[6]=e):e=t[6],e),y=(0,l.t)(),v[0]!==y.name||v[1]!==y.ownerLogin?(p=(0,i.yH)(o.tTz,{owner:y.ownerLogin,repo:y.name}),v[0]=y.name,v[1]=y.ownerLogin,v[2]=p):p=v[2],x=p,v[3]!==b||v[4]!==x?(g=(e,t,n)=>{let r={target:e,interaction:t,context:n,...b,...{url:window.location.href,user_agent:window.navigator.userAgent,browser_width:document.documentElement.clientWidth,browser_languages:window.navigator.languages.join(",")}};(0,a.lS)(x,{method:"POST",body:r})},v[3]=b,v[4]=x,v[5]=g):g=v[5],g);j[0]===Symbol.for("react.memo_cache_sentinel")?(w=(0,u.G7)("code_nav_ui_events"),j[0]=w):w=j[0];let $=w;j[1]!==E||j[2]!==R?(C=(e,t)=>{let n=void 0===t?{}:t;E("repository.click",e,n),$&&R(e,"click",n)},j[1]=E,j[2]=R,j[3]=C):C=j[3];let k=C;j[4]!==E||j[5]!==R?(L=(e,t)=>{let n=void 0===t?{}:t;E("repository.keydown",e,n),$&&R(e,"keydown",n)},j[4]=E,j[5]=R,j[6]=L):L=j[6];let O=L;j[7]!==E||j[8]!==R?(_=(e,t)=>{let n=void 0===t?{}:t;E(e,"",n),$&&R(e,"stats",n)},j[7]=E,j[8]=R,j[9]=_):_=j[9];let A=_;j[10]!==E?(N=(e,t)=>{E("marketplace.action.click",e,void 0===t?{}:t)},j[10]=E,j[11]=N):N=j[11];let I=N;return j[12]!==k||j[13]!==O||j[14]!==A||j[15]!==I?(S={sendRepoClickEvent:k,sendRepoKeyDownEvent:O,sendStats:A,sendMarketplaceActionEvent:I},j[12]=k,j[13]=O,j[14]=A,j[15]=I,j[16]=S):S=j[16],S}},12191(e,t,n){n.d(t,{Z:()=>d});var r=n(16522),l=n(27678),i=n(31595),o=n(68541),s=n(54242),a=n(23666),c=n(19519);function u({params:e,hash:t},n){let r=e?`?${e}`:"",l="";return n||(l=void 0===t?window.location.hash:t?`#${t}`:""),r+l}function d(){let e,t,n,d,f,m=(0,r.c)(27),{name:h,ownerLogin:p}=(0,s.t)(),g=(0,i.l)(),v=(0,l.y)(),b=(0,o.z)(),{isServer:y}=(0,c.V)();m[0]!==p||m[1]!==b.name||m[2]!==h?(e=e=>(0,a.IO9)({repo:{name:h,ownerLogin:p},commitish:b.name,action:"directory"===e.contentType?"tree":"blob",path:e.path}),m[0]=p,m[1]=b.name,m[2]=h,m[3]=e):e=m[3];let x=e;m[4]!==v||m[5]!==g||m[6]!==y||m[7]!==p||m[8]!==b.name||m[9]!==h?(t=e=>{let t=void 0===e?{}:e,n=(0,a.IO9)({repo:{name:h,ownerLogin:p},commitish:t.commitish||b.name,action:t.action||v,path:t.path||g})+u(t,y);return t.absolute?new URL(n,window.location.origin).href:n},m[4]=v,m[5]=g,m[6]=y,m[7]=p,m[8]=b.name,m[9]=h,m[10]=t):t=m[10];let w=t;m[11]!==v||m[12]!==g||m[13]!==y||m[14]!==p||m[15]!==b.currentOid||m[16]!==h?(n=e=>{let t=void 0===e?{}:e,n=(0,a.IO9)({repo:{name:h,ownerLogin:p},commitish:b.currentOid,action:t.action||v,path:t.path||g})+u(t,y);return t.absolute?new URL(n,window.location.origin).href:n},m[11]=v,m[12]=g,m[13]=y,m[14]=p,m[15]=b.currentOid,m[16]=h,m[17]=n):n=m[17];let C=n;m[18]!==y||m[19]!==b.currentOid||m[20]!==b.name?(d=()=>!y&&b.name===b.currentOid&&window.location.pathname.includes(b.currentOid),m[18]=y,m[19]=b.currentOid,m[20]=b.name,m[21]=d):d=m[21];let L=d;return m[22]!==C||m[23]!==x||m[24]!==w||m[25]!==L?(f={getItemUrl:x,getUrl:w,createPermalink:C,isCurrentPagePermalink:L},m[22]=C,m[23]=x,m[24]=w,m[25]=L,m[26]=f):f=m[26],f}},82307(e,t,n){n.d(t,{om:()=>g,TA:()=>y,bp:()=>C,T4:()=>v,Y:()=>w,$E:()=>x});var r=n(74848),l=n(16522),i=n(26316),o=n(19519),s=n(38621),a=n(56133),c=n(59134),u=n(21373),d=n(4978);let f=/[\u202A-\u202E]|[\u2066-\u2069]|\u{E0001}|\u{E007F}/u,m=/[\u202A-\u202E]|[\u2066-\u2069]|\u{E0001}|\u{E007F}/gu,h=/([\u202A-\u202E]|[\u2066-\u2069]|\u{E0001}|\u{E007F})/gu,p=new Map(Object.entries({"\u202A":"U+202A","\u202B":"U+202B","\u202C":"U+202C","\u202D":"U+202D","\u202E":"U+202E","\u2066":"U+2066","\u2067":"U+2067","\u2068":"U+2068","\u2069":"U+2069","\uDB40\uDC01":"U+E0001","\uDB40\uDC7F":"U+E007F"}));function g(){let e,t,n,d,f,m,h=(0,l.c)(11),{isBrowser:p}=(0,o.V)(),g=p?i.cg:void 0;if(!g)return null;h[0]!==g.location.href||h[1]!==g.location.origin?((t="1"===(e=new URL(g.location.href,g.location.origin)).searchParams.get("h"))?e.searchParams.delete("h"):e.searchParams.set("h","1"),h[0]=g.location.href,h[1]=g.location.origin,h[2]=e,h[3]=t):(e=h[2],t=h[3]),h[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,r.jsx)(s.AlertIcon,{}),h[4]=n):n=h[4],h[5]===Symbol.for("react.memo_cache_sentinel")?(d=(0,r.jsxs)("span",{children:["This file contains bidirectional or hidden Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters."," ",(0,r.jsx)(a.A,{inline:!0,href:"https://github.co/hiddenchars",target:"_blank",rel:"noreferrer",children:"Learn more about bidirectional Unicode characters"})]}),h[5]=d):d=h[5],h[6]!==e.href?(f=()=>{window.location.href=e.href},h[6]=e.href,h[7]=f):f=h[7];let v=t?"Hide revealed characters":"Show hidden characters";return h[8]!==f||h[9]!==v?(m=(0,r.jsxs)(c.A,{full:!0,variant:"warning",className:"HiddenUnicode-module__Flash__W7rYG",children:[n,d,(0,r.jsx)(u.Q,{as:"a",onClick:f,size:"small",className:"HiddenUnicode-module__Button__YXJk7",children:v})]}),h[8]=f,h[9]=v,h[10]=m):m=h[10],m}function v(){let e,t=(0,l.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(d.A,{direction:"e",text:"This line has hidden Unicode characters",children:(0,r.jsx)(s.AlertIcon,{className:"HiddenUnicode-module__Octicon__zhTmr"})}),t[0]=e):e=t[0],e}function b(e){let t,n=(0,l.c)(2),{char:i}=e;return n[0]!==i?(t=(0,r.jsx)("span",{className:"hidden-unicode-replacement padded",children:i}),n[0]=i,n[1]=t):t=n[1],t}function y(e){return w(e)?e.replaceAll(m,e=>p.get(e)??""):e}function x(e){return w(e)?e.split(h).map((e,t)=>{let n=p.get(e);return n?(0,r.jsx)(b,{char:n},t):e}):null}function w(e){return f.test(e)}function C(){return!!i.cg&&"1"===new URL(i.cg.location.href,i.cg.location.origin).searchParams.get("h")}g.displayName="HiddenUnicodeAlert",v.displayName="HiddenUnicodeTooltip",b.displayName="HiddenUnicodeCharacter"},4575(e,t,n){n.d(t,{M:()=>u,U:()=>c});var r=n(74848),l=n(16522),i=n(38621),o=n(87763),s=n(22520),a=n(22776);function c(e){let t,n=(0,l.c)(2),{linesData:i,onLineStickOrUnstick:c,setIsCollapsed:d,tabSize:f,extraLeftPadding:m,contentWidth:h}=e,p=[...(0,s.bP)().keys()],g=(0,o.o)("react-line-numbers"),v=p.map(e=>{let t=(0,s.N9)(e,i);if(void 0===t||i[t]?.ownedSection===void 0)return null;let n=i[t],l=(0,s.m)(n?.rawText?.length??0,n?.rawText??"",f);return(0,r.jsxs)("div",{className:"CodeFoldingEllipsisOverlay-module__ellipsisRow__Z5MC7",style:{top:g*t,height:g},children:[h?(0,r.jsx)(a.I,{subtle:!0,lineNumber:e,highlightPosition:{offset:-82,width:h}}):null,(0,r.jsx)(u,{codeLineData:n,setIsCollapsed:d,onLineStickOrUnstick:c,leftOffset:l+(m??0)})]},`expand-row-ellipsis-${e}`)});return n[0]!==v?(t=(0,r.jsx)(r.Fragment,{children:v}),n[0]=v,n[1]=t):t=n[1],t}function u({codeLineData:e,leftOffset:t,setIsCollapsed:n,onLineStickOrUnstick:l}){let{lineNumber:o,ownedSection:a}=e;return(0,s.$0)(o)?(0,r.jsx)("button",{"aria-label":"Expand row",className:"Button Button--iconOnly Button--invisible Button--small px-2 py-0 ml-1 border-0 expand-row-ellipsis",style:{left:t},onMouseDown:t=>{(0,s.ny)(o),n?.(!1),a&&(a.collapsed=!1,l?.(e,!0)),t.preventDefault()},children:(0,r.jsx)(i.EllipsisIcon,{})}):null}c.displayName="CodeFoldingEllipsisOverlay",u.displayName="ExpandRowEllipsis"},22776(e,t,n){n.d(t,{S:()=>b,I:()=>x});var r=n(74848),l=n(16522),i=n(88134),o=n(76849),s=n(34164),a=n(96540),c=n(77879),u=n(73342),d=n(22520),f=n(65938),m=n(90224),h=n(4575),p=n(5672),g=n(23827),v=n(40772);let b=a.memo(y);function y(e){let t,n,o,b,y,w,C,L,_,N,S,j,E,R,$,k,O=(0,l.c)(68),{codeLineData:A,codeLineClassName:I,colorizedLine:T,id:B,onClick:M,setIsCollapsed:D,onLineStickOrUnstick:z,sharedLineObserver:H,virtualOffset:P,codeLineToSectionMap:U,stylingDirectivesLine:F,virtualKey:W,forceVisible:Y,measureRef:V,virtualIndex:G,copilotAccessAllowed:X,currentLineHeight:K,shouldUseInert:q}=e,{lineNumber:J,rawText:Q}=A,Z=(0,d.$0)(J),{tabSize:ee}=(0,c.A)(),et=(0,p.kT)(J),en=(0,a.useRef)(null),[er,el]=(0,a.useState)(void 0);O[0]!==et||O[1]!==J||O[2]!==Q||O[3]!==ee?(t=()=>{et&&en.current?el((0,d.jH)(et,en.current,J,ee,Q??"")):el(void 0)},n=[et,J,ee,Q],O[0]=et,O[1]=J,O[2]=Q,O[3]=ee,O[4]=t,O[5]=n):(t=O[4],n=O[5]),(0,a.useLayoutEffect)(t,n),O[6]!==U||O[7]!==J?(o=U?.get(J)?.length??0,O[6]=U,O[7]=J,O[8]=o):o=O[8];let ei=o,eo=(0,u.B)(H,A,ei),es=(0,i.ud)().codeWrappingOption,ea=(0,g.WB)(J),ec=(0,g.e6)(J),eu=et?.start.line===J,ed=(0,a.useRef)(null),ef=(0,a.useRef)(null);O[9]!==eu?(b=()=>{eu&&ef.current?.setAnchor(ed.current)},y=[eu],O[9]=eu,O[10]=b,O[11]=y):(b=O[10],y=O[11]),(0,a.useLayoutEffect)(b,y),O[12]!==V||O[13]!==eo?(w=e=>{V?.(e),eo(e)},O[12]=V,O[13]=eo,O[14]=w):w=O[14];let em=P&&"virtual",eh=es.enabled&&V&&"react-code-text-cell";O[15]!==I||O[16]!==em||O[17]!==eh?(C=(0,s.$)(I,"react-code-text react-code-line-contents",em,eh),O[15]=I,O[16]=em,O[17]=eh,O[18]=C):C=O[18];let ep=P?`translateY(${P}px)`:void 0,eg=es.enabled?void 0===K?20:K:"auto";O[19]!==ep||O[20]!==eg?(L={transform:ep,minHeight:eg},O[19]=ep,O[20]=eg,O[21]=L):L=O[21],O[22]!==er||O[23]!==et||O[24]!==J?(_=et&&(0,r.jsx)(x,{lineNumber:J,highlightPosition:er}),O[22]=er,O[23]=et,O[24]=J,O[25]=_):_=O[25],O[26]!==Z||O[27]!==er||O[28]!==et||O[29]!==J?(N=Z&&!et&&(0,r.jsx)(x,{subtle:!0,lineNumber:J,highlightPosition:er}),O[26]=Z,O[27]=er,O[28]=et,O[29]=J,O[30]=N):N=O[30],O[31]!==ec||O[32]!==J||O[33]!==ea?(S=ea&&ea.length>0&&(0,r.jsx)(m.U,{symbols:ea,focusedSymbol:ec,className:"CodeLine-module__highlightedOverlayInCodeLine__FMeq1",lineNumber:J}),O[31]=ec,O[32]=J,O[33]=ea,O[34]=S):S=O[34];let ev=!!et;return O[35]!==T||O[36]!==Y||O[37]!==B||O[38]!==J||O[39]!==Q||O[40]!==q||O[41]!==F||O[42]!==ev?(j=(0,r.jsx)(v.FS,{id:B,lineNumber:J,stylingDirectivesLine:F,current:ev,rawText:Q,forceVisible:Y,ref:en,shouldUseInert:q,colorizedLine:T}),O[35]=T,O[36]=Y,O[37]=B,O[38]=J,O[39]=Q,O[40]=q,O[41]=F,O[42]=ev,O[43]=j):j=O[43],O[44]!==A||O[45]!==z||O[46]!==D||O[47]!==es.enabled?(E=es.enabled&&(0,r.jsx)(h.M,{codeLineData:A,setIsCollapsed:D,onLineStickOrUnstick:z,leftOffset:0}),O[44]=A,O[45]=z,O[46]=D,O[47]=es.enabled,O[48]=E):E=O[48],O[49]!==X||O[50]!==et||O[51]!==eu?(R=eu&&X&&(0,r.jsx)(f.z8,{ref:ef,rowBeginNumber:et.start.line,rowEndNumber:et.end.line,id:"code-line-copilot-button"}),O[49]=X,O[50]=et,O[51]=eu,O[52]=R):R=O[52],O[53]!==_||O[54]!==N||O[55]!==S||O[56]!==j||O[57]!==E||O[58]!==R?($=(0,r.jsxs)("div",{ref:ed,children:[_,N,S,j,E,R]}),O[53]=_,O[54]=N,O[55]=S,O[56]=j,O[57]=E,O[58]=R,O[59]=$):$=O[59],O[60]!==M||O[61]!==C||O[62]!==L||O[63]!==$||O[64]!==w||O[65]!==G||O[66]!==W?(k=(0,r.jsx)("div",{ref:w,"data-key":W,"data-index":G,className:C,style:L,onClick:M,children:$}),O[60]=M,O[61]=C,O[62]=L,O[63]=$,O[64]=w,O[65]=G,O[66]=W,O[67]=k):k=O[67],k}function x(e){let t,n,i=(0,l.c)(9),{lineNumber:s,highlightPosition:a,subtle:c}=e,u=(0,o.Y)(),d=a?.offset!==void 0,f=a?.width!==void 0,m=a?.offset??-72,h=a?.width??0,p=c?"var(--bgColor-neutral-muted, var(--color-neutral-subtle))":"var(--bgColor-attention-muted, var(--color-attention-subtle))",g=c?"inset 2px 0 0 var(--fgColor-muted, var(--color-fg-subtle))":"inset 2px 0 0 var(--fgColor-attention, var(--color-attention-fg))",v=u?"-3px":0,b=`${m}px`,y=f?`${d&&f?h:h+82}px`:"calc(100% + 72px)";i[0]!==p||i[1]!==g||i[2]!==v||i[3]!==b||i[4]!==y?(t={backgroundColor:p,boxShadow:g,top:v,left:b,width:y},i[0]=p,i[1]=g,i[2]=v,i[3]=b,i[4]=y,i[5]=t):t=i[5];let x=`highlighted-line-${s}`;return i[6]!==t||i[7]!==x?(n=(0,r.jsx)("div",{className:"CodeLine-module__highlighterElement__nPzf1",style:t},x),i[6]=t,i[7]=x,i[8]=n):n=i[8],n}b.displayName="CodeLine",y.displayName="CodeLineUnmemoized",x.displayName="HighlighterElement"},12788(e,t,n){n.d(t,{FL:()=>w,Ru:()=>_,_x:()=>L});var r=n(74848),l=n(88134),i=n(34164),o=n(96540),s=n(18955),a=n(79250),c=n(22520),u=n(19490),d=n(4575),f=n(22776),m=n(99947),h=n(16522),p=n(51220),g=n(36895),v=n(87763);function b(e){return e.getBoundingClientRect().height}function y(e){window.scrollTo({top:e,left:0,behavior:"instant"})}var x=n(95630);let w=o.memo(C);function C({linesData:e,onLineNumberClick:t,codeSections:n,codeLineToSectionMap:w,onLineStickOrUnstick:N,sharedLineObserver:S,tabSize:j,contentWidth:E,onCollapseToggle:R,cursorContainerRef:$,textAreaRef:k,materializeAllLines:O,copilotAccessAllowed:A,ref:I}){let T=(0,o.useRef)(null),B=(0,o.useRef)(null),M=(0,o.useRef)(null),D=(0,a.fY)(),z=(0,o.useRef)(!0),H=(0,o.useRef)(!0),P=(0,o.useRef)(!0),{stylingDirectives:U}=(0,s.PL)();(0,o.useEffect)(()=>{if(k&&k.current){k.current.onscroll=()=>{if(B.current&&k?.current){if(!P.current){P.current=!0;return}if(k.current.scrollLeft===B.current.scrollLeft)return;z.current=!(H.current&&P.current),B.current.scrollLeft=k.current.scrollLeft}$&&$.current&&k?.current&&($.current.scrollLeft=k.current.scrollLeft)};let e=k.current;return()=>{e&&(e.onscroll=null)}}},[k,T,D,$]);let F=(0,l.ud)().codeWrappingOption.enabled,W=(0,c.Gb)(),{virtualizer:Y,currentLineHeight:V}=function(e){var t;let n,r,l,i,o=(0,h.c)(12),{lineCount:s,materializeAllLines:a}=e,c=(0,v.o)("react-line-numbers");o[0]!==c?(n=()=>c,o[0]=c,o[1]=n):n=o[1];let u=n;o[2]!==s?(t=s,r=function(e){if(t<150){let e=Array(t);for(let n=0;n{Y.measure()},[F,Y]),(0,o.useImperativeHandle)(I,()=>({scrollToTop:()=>{(0,c.si)(0)||Y.scrollToIndex(0,{align:"start"})},scrollToLine:(e,t)=>{Y.scrollToIndex(e,{align:"start"});let n=T.current;n&&n.scroll({left:_(n,e,t)})}})),(0,r.jsxs)("div",{ref:T,style:{pointerEvents:D?"none":"auto"},onScroll:e=>L(e,k),children:[(0,r.jsx)("div",{className:(0,i.$)("react-code-line-container",D?m.A.scrollContainerHidden:m.A.scrollContainerAuto),ref:B,tabIndex:0,onScroll:()=>{if(D&&B.current&&M.current){if(!H.current){H.current=!0;return}M.current.scrollLeft!==B.current.scrollLeft&&(P.current=!(H.current&&z.current),M.current.scrollLeft=B.current.scrollLeft)}},children:(0,r.jsxs)("div",{className:(0,i.$)("react-code-file-contents",m.A.codeFileContents),role:"presentation","aria-hidden":!0,"data-tab-size":j,"data-testid":"code-lines-container","data-paste-markdown-skip":!0,style:{tabSize:j,width:E,maxWidth:F?"100%":"unset",height:Y.getTotalSize()},"data-hpc":!0,children:[(0,r.jsx)("div",{className:"react-line-numbers",style:{pointerEvents:"auto",height:Y.getTotalSize(),position:"relative",zIndex:2},children:Y.getVirtualItems().map(l=>{let i=e[l.index];return(0,r.jsx)(x.Kn,{codeLineData:i,onClick:t,ownedCodeSections:n,onLineStickOrUnstick:N,onCollapseToggle:R,virtualOffset:l.start,copilotAccessAllowed:A},i.lineNumber)})}),(0,r.jsx)("div",{className:"react-code-lines",style:{height:Y.getTotalSize()},children:Y.getVirtualItems().map(t=>{let n=e[t.index];return(0,r.jsx)(f.S,{codeLineData:n,stylingDirectivesLine:n.stylingDirectivesLine??(U?U[n.lineNumber-1]:void 0),shouldUseInert:W,codeLineClassName:n.codeLineClassName,id:`LC${n.lineNumber}`,onLineStickOrUnstick:N,sharedLineObserver:S,setIsCollapsed:R,codeLineToSectionMap:w,virtualOffset:t.start,virtualKey:String(t.key),copilotAccessAllowed:A,currentLineHeight:V,measureRef:F?Y.measureElement:void 0,virtualIndex:F?t.index:void 0},n.lineNumber)})}),(0,r.jsx)(u.A,{shouldNotOverrideCopy:D,containerRef:D?k:T}),!F&&(0,r.jsx)(d.U,{linesData:e,onLineStickOrUnstick:N,setIsCollapsed:R,tabSize:j,extraLeftPadding:82})]})}),D&&E&&B.current&&B.current.clientWidth{if(M.current&&k?.current){if(!z.current){z.current=!0;return}M.current.scrollLeft!==k.current.scrollLeft&&(H.current=!(P.current&&z.current),k.current.scrollLeft=M.current.scrollLeft)}},ref:M,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onMouseUp:e=>e.preventDefault(),children:(0,r.jsx)("div",{className:m.A.scrollBarSpacer,style:{width:E}})}):null]})}function L(e,t){let n=e.target;t?.current?.scrollTo(n.scrollLeft,n.scrollTop)}function _(e,t,n){if(!n)return 0;let r=(0,c.a2)(t,n);if(!r)return 0;let l=e.getBoundingClientRect(),i=r.getBoundingClientRect();return l.left+l.width-e.scrollLeft-(i.left+i.width)>0?0:r.offsetLeft}w.displayName="CodeLines",C.displayName="CodeLinesUnmemoized"},46513(e,t,n){n.d(t,{kd:()=>_,G:()=>j,P9:()=>L,OL:()=>N});var r=n(74848),l=n(16522),i=n(73537),o=n(88134),s=n(34164),a=n(96540),c=n(87763),u=n(79250),d=n(22520),f=n(19490),m=n(4575),h=n(12788),p=n(99947),g=n(3633),v=n(67572),b=n(41559),y=n(73342);function x(e){let t,n,i=(0,l.c)(7),{linesData:o,sharedLineObserver:s,codeLineToSectionMap:a}=e,u=(0,c.o)("react-line-numbers");return void 0===a?null:(i[0]!==a||i[1]!==u||i[2]!==o||i[3]!==s?(t=o.map(e=>{let t=e.lineNumber,n=a?.get(t)?.length??0;if(void 0===t||void 0===e.ownedSection)return null;let l=(0,d.N9)(t,o);return(0,r.jsx)(w,{className:"symbol-highlight react-code-text",lineData:o[l],sharedLineObserver:s,numParents:n,style:{top:u*(l-1),height:u}},`observer-overlay-${l}-lineNumber-no-virtualization`)}),i[0]=a,i[1]=u,i[2]=o,i[3]=s,i[4]=t):t=i[4],i[5]!==t?(n=(0,r.jsx)(r.Fragment,{children:t}),i[5]=t,i[6]=n):n=i[6],n)}function w(e){let t,n,i,o=(0,l.c)(8),{lineData:a,sharedLineObserver:c,numParents:u,className:d,style:f}=e,m=(0,y.B)(c,a,u);return o[0]!==m?(t=e=>{m(e)},o[0]=m,o[1]=t):t=o[1],o[2]!==d?(n=(0,s.$)(d,"StickyLineObserverOverlay-module__stickyLineObserver__rhc2u"),o[2]=d,o[3]=n):n=o[3],o[4]!==f||o[5]!==t||o[6]!==n?(i=(0,r.jsx)("div",{ref:t,className:n,style:f,"data-testid":"sticky-line-observer"}),o[4]=f,o[5]=t,o[6]=n,o[7]=i):i=o[7],i}x.displayName="StickyLineObserverOverlay",w.displayName="StickyLineObserverLine";var C=n(40772);let L=a.memo(S);L.displayName="CodeLinesNoVirtualization";let _=60,N=3500;function S({linesData:e,onLineNumberClick:t,codeSections:n,nonTruncatedLinesData:l,codeLineToSectionMap:i,onLineStickOrUnstick:o,sharedLineObserver:y,colorizedLines:w,tabSize:L,contentWidth:N,cursorContainerRef:j,onCollapseToggle:E,textAreaRef:R,copilotAccessAllowed:$,ref:k}){let O=(0,a.useRef)(null),A=(0,a.useRef)(null),I=(0,a.useRef)(null),T=(0,u.fY)(),B=(0,a.useRef)(!0),M=(0,a.useRef)(!0),D=(0,a.useRef)(!0),z=(0,c.o)("react-line-numbers"),H=(0,a.useMemo)(()=>[...Array(Math.floor(e.length/_)+1).keys()],[e.length]);return(0,a.useImperativeHandle)(k,()=>({scrollToTop:()=>{(0,d.si)(0)||window.scrollTo({left:0,top:0})},scrollToLine:(e,t)=>{let n=O.current;n&&setTimeout(()=>window.scrollTo({left:(0,h.Ru)(n,e,t),top:z*e}),0)}})),(0,a.useEffect)(()=>{if(R&&R.current){R.current.onscroll=()=>{if(A.current&&R?.current){if(!D.current){D.current=!0;return}if(R.current.scrollLeft===A.current.scrollLeft)return;B.current=!(M.current&&D.current),A.current.scrollLeft=R.current.scrollLeft}j&&j.current&&R?.current&&(j.current.scrollLeft=R.current.scrollLeft)};let e=R.current;return()=>{e&&(e.onscroll=null)}}},[R,O,T,j]),(0,r.jsxs)("div",{ref:O,style:{pointerEvents:T?"none":"auto"},onScroll:e=>(0,h._x)(e,R),children:[(0,r.jsx)("div",{ref:A,className:(0,s.$)(T?p.A.scrollContainerHidden:p.A.scrollContainerAuto),tabIndex:0,onScroll:()=>{if(T&&A.current&&I.current){if(!M.current){M.current=!0;return}I.current.scrollLeft!==A.current.scrollLeft&&(D.current=!(M.current&&B.current),I.current.scrollLeft=A.current.scrollLeft)}},children:(0,r.jsxs)("div",{className:(0,s.$)("react-code-file-contents",p.A.codeFileContents),role:"presentation","aria-hidden":!0,"data-tab-size":L,"data-paste-markdown-skip":!0,style:{tabSize:L,width:N,maxWidth:"unset"},"data-hpc":!0,children:[(0,r.jsx)("div",{className:"react-line-numbers-no-virtualization",style:{pointerEvents:"auto",position:"relative",zIndex:2},children:H.map(l=>{let s=e.slice(l*_,Math.min(l*_+_,e.length));return(0,r.jsx)("div",{className:"react-no-virtualization-wrapper-lines",children:s.map(e=>(0,r.jsx)(b.m,{codeLineData:e,onClick:t,ownedCodeSections:n,onLineStickOrUnstick:o,onCollapseToggle:E,codeLineToSectionMap:i,copilotAccessAllowed:$},`line-number-${e.lineNumber}-content:${e.rawText?.substring(0,100)}`))},`line-number-wrapper-${l}-content:${s[0]?.rawText?.substring(0,100)}`)})}),(0,r.jsxs)("div",{className:"react-code-lines",children:[(0,r.jsx)(v.R,{linesData:e}),(0,r.jsx)(g.n,{linesData:e,copilotAccessAllowed:$}),(0,r.jsx)(C.Bg,{colorizedLines:w,linesData:l}),(0,r.jsx)(x,{linesData:e,sharedLineObserver:y,codeLineToSectionMap:i}),(0,r.jsx)(m.U,{linesData:e,onLineStickOrUnstick:o,setIsCollapsed:E,tabSize:L,contentWidth:N})]}),(0,r.jsx)(f.A,{shouldNotOverrideCopy:T,containerRef:T?R:O})]})}),T&&N&&A.current&&A.current.clientWidth{if(I.current&&R?.current){if(!B.current){B.current=!0;return}I.current.scrollLeft!==R.current.scrollLeft&&(M.current=!(D.current&&B.current),R.current.scrollLeft=I.current.scrollLeft)}},ref:I,onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault(),onMouseUp:e=>e.preventDefault(),children:(0,r.jsx)("div",{className:p.A.scrollBarSpacer,style:{width:N}})}):null]})}function j(e){let t,n=(0,l.c)(1),r=(0,o.ud)().codeWrappingOption.enabled;n[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.G7)("react_blob_overlay"),n[0]=t):t=n[0];let s=t,a=(0,d.Gb)(),c=(0,d.hO)();return s&&!r&&!(c&&!a)&&eu,iU:()=>c,kT:()=>d});var r=n(74848),l=n(16522),i=n(13589),o=n(13865),s=n(96540);let a=s.createContext(new i.Lj(void 0));function c({highlightedLines:e,children:t}){let n=(0,o.AI)(e);return(0,s.useEffect)(()=>{n.value=e},[n,e]),(0,r.jsx)(a,{value:n,children:t})}function u(){return(0,o.HN)(s.use(a))}function d(e){let t,n=(0,l.c)(2),r=s.use(a);n[0]!==e?(t=t=>t&&e>=t.start.line&&e<=t.end.line?t:void 0,n[0]=e,n[1]=t):t=n[1];let i=(0,o.Sk)(r,t);return(0,o.HN)(i)}a.displayName="HighlightedLineContext",c.displayName="HighlightedLinesProvider"},3633(e,t,n){n.d(t,{n:()=>m});var r=n(74848),l=n(16522),i=n(76849),o=n(34164),s=n(96540),a=n(77879),c=n(87763),u=n(22520),d=n(65938),f=n(5672);function m(e){let t,n,o,m,p,g,v,b,y,x=(0,l.c)(32),{linesData:w,copilotAccessAllowed:C}=e,L=(0,f.Df)(),{tabSize:_}=(0,a.A)(),N=(0,c.o)("react-line-numbers"),S=(0,i.Y)(),j=(0,s.useRef)(null),E=(0,s.useRef)(null);x[0]!==w||x[1]!==L?(t=L?(0,u.N9)(L.start.line,w):0,x[0]=w,x[1]=L,x[2]=t):t=x[2];let R=t;x[3]!==w||x[4]!==L||x[5]!==R?(n=L?.end.line?(0,u.N9)(L.end.line,w):R,x[3]=w,x[4]=L,x[5]=R,x[6]=n):n=x[6];let $=n,[k,O]=(0,s.useState)(S?R*N-3:R*N);if(x[7]!==S||x[8]!==N||x[9]!==L||x[10]!==R?(o=()=>{L&&(E.current?.setAnchor(j.current),O(S?R*N-3:R*N))},m=[L,S,N,R],x[7]=S,x[8]=N,x[9]=L,x[10]=R,x[11]=o,x[12]=m):(o=x[11],m=x[12]),(0,s.useLayoutEffect)(o,m),!L)return null;if(x[13]!==$||x[14]!==w||x[15]!==L||x[16]!==R||x[17]!==_){p=[];for(let e=R;e<=$;e++){let t=(0,u.zS)("",e+1);if(!t)continue;let n=(0,u.jH)(L,t,e+1,_,w[e+1]?.rawText??"")??{};p.push({position:n,lineNumber:e})}x[13]=$,x[14]=w,x[15]=L,x[16]=R,x[17]=_,x[18]=p}else p=x[18];let A=k+10;return x[19]!==A?(g={position:"relative",top:A},x[19]=A,x[20]=g):g=x[20],x[21]!==p||x[22]!==R?(v=p.map(e=>{let{position:t,lineNumber:n}=e;return(0,r.jsx)(h,{highlightPosition:t,lineNumber:n,startingLineNumber:R},`line-${n}-highlight-${t.offset}`)}),x[21]=p,x[22]=R,x[23]=v):v=x[23],x[24]!==C||x[25]!==k||x[26]!==L?(b=C&&(0,r.jsx)(d.z8,{ref:E,rowBeginNumber:L.start.line,rowEndNumber:L.end.line,recalcPosition:k,id:"code-line-copilot-button"}),x[24]=C,x[25]=k,x[26]=L,x[27]=b):b=x[27],x[28]!==g||x[29]!==v||x[30]!==b?(y=(0,r.jsxs)("div",{ref:j,style:g,children:[v,b]}),x[28]=g,x[29]=v,x[30]=b,x[31]=y):y=x[31],y}function h(e){let t,n,i,s=(0,l.c)(11),{startingLineNumber:a,lineNumber:u,highlightPosition:d,subtle:f}=e,m=(0,c.o)("react-line-numbers"),h=(u-a)*m,p=f?"HighlightedLinesOverlay-module__lineHighlightSubtle__wHQDF":"HighlightedLinesOverlay-module__lineHighlightActive__RseNi";s[0]!==p?(t=(0,o.$)("line-highlight",p,"HighlightedLinesOverlay-module__lineHighlight__kvRG4"),s[0]=p,s[1]=t):t=s[1];let g=d&&d.offset?`${d.offset-10}px`:"-82px",v=`${h-10}px`,b=d&&d.width?`${d.width+82}px`:"calc(100% + 82px)";s[2]!==m||s[3]!==g||s[4]!==v||s[5]!==b?(n={height:m,left:g,top:v,width:b},s[2]=m,s[3]=g,s[4]=v,s[5]=b,s[6]=n):n=s[6];let y=`highlighted-line-${u}`;return s[7]!==t||s[8]!==n||s[9]!==y?(i=(0,r.jsx)("div",{className:t,style:n},y),s[7]=t,s[8]=n,s[9]=y,s[10]=i):i=s[10],i}m.displayName="HighlightedLinesOverlay",h.displayName="LineHighlight"},67572(e,t,n){n.d(t,{R:()=>c});var r=n(74848),l=n(16522),i=n(87763),o=n(22520),s=n(90224),a=n(23827);function c(e){let t,n=(0,l.c)(5),{linesData:c}=e,u=(0,a.VT)(),d=(0,a.Gp)(),f=(0,i.o)("react-line-numbers");return n[0]!==d||n[1]!==f||n[2]!==c||n[3]!==u?(t=(0,r.jsx)(r.Fragment,{children:[...u.values()].map(e=>{let t=e[0]?.lineNumber;if(void 0===t)return null;let n=(0,o.N9)(t,c)+1;return(0,r.jsx)(s.U,{className:"symbol-highlight react-code-text",lineNumber:n,symbols:e,focusedSymbol:d,style:{position:"absolute",top:f*(n-1),paddingLeft:"10px",height:f,whiteSpace:"pre"}},`overlay-${n}-lineNumber-no-virtualization`)})}),n[0]=d,n[1]=f,n[2]=c,n[3]=u,n[4]=t):t=n[4],t}c.displayName="HighlightedSymbolsOverlay"},95630(e,t,n){n.d(t,{Kn:()=>x,_Y:()=>L,cw:()=>C});var r=n(74848),l=n(16522),i=n(62269),o=n(83914),s=n(7231),a=n(56341),c=n(88134),u=n(38621),d=n(34164),f=n(96540),m=n(79250),h=n(22520),p=n(82307),g=n(65938),v=n(36899),b=n(5672);let y="LineNumber-module__codeFoldingChevron__sY2Yt",x=f.memo(w);function w({codeLineData:e,onClick:t,ownedCodeSections:n,onCollapseToggle:l,preventClick:u,onLineStickOrUnstick:y,virtualOffset:x,copilotAccessAllowed:_}){let{lineNumber:N,ownedSection:S,codeLineClassName:j,isStartLine:E,codeownersLineError:R,hiddenUnicode:$}=e,{sendRepoClickEvent:k}=(0,s.T)(),O=(0,m.Jo)(),[A,I]=(0,f.useState)(!1),T=(0,f.useCallback)(e=>{let n,r;if(e.defaultPrevented)return;let l=parseInt(e.currentTarget.getAttribute("data-line-number")||"",10),o=(0,i.$c)(`L${l}`),s=O.current;if(s&&(s.start.line!==s.end.line||s.start.column!==s.end.column))n=s.start,r=s.end;else{let e=window.getSelection()?.rangeCount?window.getSelection()?.getRangeAt(0):null;e&&(n=(0,h.um)(e.startContainer,e.startOffset),r=(0,h.um)(e.endContainer,e.endOffset))}let c=!1;n&&r&&n.line<=l&&r.line>=l&&(c=!0,o={anchorPrefix:"",blobRange:{start:n,end:r}});let{blobRange:u}=o,d=(0,i.eC)(window.location.hash);d&&e.shiftKey&&!c?(k("BLOB.MULTILINE"),o.blobRange={start:d.start,end:u.end}):k("BLOB.LINE");let f=(0,i.JB)(o);(0,a.Zu)(f),t?.(e)},[t,O,k]),B=(0,b.kT)(N),M=B?.start.line===N,D=B&&B.start.line=N||M&&B?.start.column===null,z=(0,f.useRef)(null),H=(0,f.useRef)(null),P=(0,f.useRef)(null);(0,f.useLayoutEffect)(()=>{M&&H.current?.setAnchor(z.current)},[M]);let{codeFoldingOption:U}=(0,c.ud)(),F=U.enabled;(0,f.useEffect)(()=>{!U.enabled&&((0,h.X5)(),l?.(!1),S&&(S.collapsed=!1))},[U.enabled,S,l]);let W=e=>{_&&(I(e),setTimeout(()=>P.current?.setAnchor(e?z.current:null),0))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{ref:z,"data-line-number":N,className:(0,d.$)(j,"react-line-number react-code-text",x&&"virtual",u&&"prevent-click",D&&"highlighted-line"),style:x?{paddingRight:"16px",transform:`translateY(${x}px)`}:{paddingRight:"16px"},onMouseDown:u?void 0:T,onMouseEnter:_?()=>W(!0):void 0,onMouseLeave:_?()=>W(!1):void 0,children:[N,R&&(0,r.jsx)(C,{children:(0,r.jsx)(o.pO,{})}),$&&(0,r.jsx)(C,{children:(0,r.jsx)(p.T4,{})}),F&&E&&S&&n&&(0,r.jsx)(C,{displayRight:!0,children:(0,r.jsx)(L,{codeLineData:e,onCollapseToggle:l,onLineStickOrUnstick:y})})]}),M&&(0,r.jsx)(v.Ay,{codeLineClassName:j,ref:H,rowBeginId:`LG${B.start.line}`,rowBeginNumber:B.start.line,rowEndNumber:B.end.line,rowEndId:`LG${B.end.line}`}),_&&A&&(0,r.jsx)("div",{children:(0,r.jsx)(g.z8,{ref:P,rowBeginNumber:N,rowEndNumber:N,id:"code-line-copilot-button"})})]})}function C(e){let t,n,i=(0,l.c)(5),{children:o,displayRight:s}=e,a=s&&"LineNumber-module__codeAlertRight__hdWmf";return i[0]!==a?(t=(0,d.$)("LineNumber-module__codeAlert__WexRo",a),i[0]=a,i[1]=t):t=i[1],i[2]!==o||i[3]!==t?(n=(0,r.jsx)("span",{className:t,children:o}),i[2]=o,i[3]=t,i[4]=n):n=i[4],n}function L({codeLineData:e,onCollapseToggle:t,onLineStickOrUnstick:n}){let l=(0,h.$0)(e.lineNumber),i=(0,f.useCallback)(r=>{let{lineNumber:l,ownedSection:i}=e;i&&(i.collapsed=!1),t?.(!1),(0,h.ny)(l),n?.(e,!0),r.preventDefault()},[e,t,n]),o=(0,f.useCallback)(n=>{let{lineNumber:r,ownedSection:l}=e;l&&(l.collapsed=!0),t?.(!0),(0,h.E8)(r),n.preventDefault()},[e,t]);return l?(0,r.jsx)("div",{"aria-label":"Expand code section",onMouseDown:i,role:"button",tabIndex:0,className:y,children:(0,r.jsx)(u.ChevronRightIcon,{})}):(0,r.jsx)("div",{"aria-label":"Collapse code section",onMouseDown:o,role:"button",tabIndex:0,className:y,children:(0,r.jsx)(u.ChevronDownIcon,{})})}x.displayName="LineNumber",w.displayName="LineNumberUnmemoized",C.displayName="CodeAlert",L.displayName="CodeFoldingChevron"},41559(e,t,n){n.d(t,{m:()=>b});var r=n(74848),l=n(62269),i=n(83914),o=n(7231),s=n(56341),a=n(88134),c=n(34164),u=n(96540),d=n(79250),f=n(22520),m=n(82307),h=n(65938),p=n(36899),g=n(5672),v=n(95630);let b=u.memo(y);function y({codeLineData:e,onClick:t,ownedCodeSections:n,onCollapseToggle:b,preventClick:x,onLineStickOrUnstick:w,virtualOffset:C,copilotAccessAllowed:L}){let{lineNumber:_,ownedSection:N,codeLineClassName:S,isStartLine:j,codeownersLineError:E,hiddenUnicode:R}=e,{sendRepoClickEvent:$}=(0,o.T)(),k=(0,d.Jo)(),O=(0,u.useCallback)(e=>{let n,r;if(e.defaultPrevented)return;let i=parseInt(e.currentTarget.getAttribute("data-line-number")||"",10),o=(0,l.$c)(`L${i}`),a=k.current;if(a&&(a.start.line!==a.end.line||a.start.column!==a.end.column))n=a.start,r=a.end;else{let e=window.getSelection()?.rangeCount?window.getSelection()?.getRangeAt(0):null;e&&(n=(0,f.um)(e.startContainer,e.startOffset),r=(0,f.um)(e.endContainer,e.endOffset))}let c=!1;n&&r&&n.line<=i&&r.line>=i&&(c=!0,o={anchorPrefix:"",blobRange:{start:n,end:r}});let{blobRange:u}=o,d=(0,l.eC)(window.location.hash);d&&e.shiftKey&&!c?($("BLOB.MULTILINE"),o.blobRange={start:d.start,end:u.end}):$("BLOB.LINE");let m=(0,l.JB)(o);(0,s.Zu)(m),t?.(e)},[t,k,$]),A=(0,g.kT)(_),I=A?.start.line===_,T=A&&A.start.line<_&&A.end.line>=_||I&&A?.start.column===null,B=(0,u.useRef)(null),M=(0,u.useRef)(null),D=(0,u.useRef)(null),[z,H]=(0,u.useState)(!1);(0,u.useLayoutEffect)(()=>{I&&M.current?.setAnchor(B.current)},[I]);let{codeFoldingOption:P}=(0,a.ud)(),U=P.enabled,F=e=>{L&&(H(e),setTimeout(()=>D.current?.setAnchor(e?B.current:null),0))};return(0,u.useEffect)(()=>{!P.enabled&&((0,f.X5)(),b?.(!1),N&&(N.collapsed=!1))},[P.enabled,N,b]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{ref:e=>{B.current=e},"data-line-number":_,className:(0,c.$)(S,"react-line-number react-code-text",C&&"virtual",x&&"prevent-click",T&&"highlighted-line"),style:C?{paddingRight:"16px",transform:`translateY(${C}px)`}:{paddingRight:"16px"},onMouseDown:x?void 0:O,onMouseEnter:L?()=>F(!0):void 0,onMouseLeave:L?()=>F(!1):void 0,children:[_,E&&(0,r.jsx)(v.cw,{children:(0,r.jsx)(i.pO,{})}),R&&(0,r.jsx)(v.cw,{children:(0,r.jsx)(m.T4,{})}),U&&j&&N&&n&&(0,r.jsx)(v.cw,{displayRight:!0,children:(0,r.jsx)(v._Y,{codeLineData:e,onCollapseToggle:b,onLineStickOrUnstick:w})})]}),I&&(0,r.jsx)(p.Ay,{codeLineClassName:S,ref:M,rowBeginId:`LG${A.start.line}`,rowBeginNumber:A.start.line,rowEndNumber:A.end.line,rowEndId:`LG${A.end.line}`}),L&&z&&(0,r.jsx)("div",{children:(0,r.jsx)(h.z8,{ref:D,rowBeginNumber:_,rowEndNumber:_,id:"code-line-copilot-button"})})]})}b.displayName="LineNumberNoVirtualziation",y.displayName="LineNumberNoVirtualizationUnmemoized"},23827(e,t,n){n.d(t,{Gp:()=>m,VT:()=>u,WB:()=>d,e6:()=>f,gt:()=>c});var r=n(74848),l=n(16522),i=n(13589),o=n(13865),s=n(96540);let a=(0,s.createContext)({resultsByLineNumber:new i.Es,focusedResult:new i.Lj(void 0)});function c({searchResults:e,focusedSearchResult:t,children:n}){let l=(0,o.R)(),i=(0,o.AI)(void 0!==t?e[t]:void 0);(0,s.useEffect)(()=>{let t=new Map;for(let n of e){let e=n.lineNumber;t.has(e)?t.get(e).push(n):t.set(e,[n])}for(let[e,n]of(l.clear(),t))l.set(e,n)},[l,e]),(0,s.useEffect)(()=>{i.value=void 0!==t?e[t]:void 0},[e,i,t]);let u=(0,s.useMemo)(()=>({resultsByLineNumber:l,focusedResult:i}),[l,i]);return(0,r.jsx)(a,{value:u,children:n})}function u(){let{resultsByLineNumber:e}=(0,s.use)(a);return(0,o.tQ)(e)}function d(e){let t,n=(0,l.c)(3),{resultsByLineNumber:r}=(0,s.use)(a);return n[0]!==e||n[1]!==r?(t=r.get(e),n[0]=e,n[1]=r,n[2]=t):t=n[2],(0,o.HN)(t)}function f(e){let t,n=(0,l.c)(2),{focusedResult:r}=(0,s.use)(a);n[0]!==e?(t=t=>t?.lineNumber===e?t:void 0,n[0]=e,n[1]=t):t=n[1];let i=(0,o.Sk)(r,t);return(0,o.HN)(i)}function m(){let{focusedResult:e}=(0,s.use)(a);return(0,o.HN)(e)}a.displayName="SearchResultsContext",c.displayName="SearchResultsProvider"},40772(e,t,n){n.d(t,{Bg:()=>v,FS:()=>p});var r=n(74848),l=n(16522),i=n(41230),o=n(16497),s=n(19519),a=n(35228),c=n(96540),u=n(77879),d=n(79250),f=n(22520),m=n(82307),h=n(46513);let p=c.memo(g);function g(e){let t,n,i,s,c,h,p=(0,l.c)(9),{id:g,stylingDirectivesLine:v,rawText:b,lineNumber:y,current:x,forceVisible:w,shouldUseInert:C,colorizedLine:L,ref:_}=e,N=(t=(0,d.fY)(),n=(0,f.hO)(),i=(0,f.Gb)(),!t||i?"plain":n&&!i?"separated-characters-chunked":"data-attribute"),{tabSize:S}=(0,u.A)();p[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,m.bp)(),p[0]=s):s=p[0];let j=s,E=(0,a.W)(L,v,b,w?"plain":N,S,j);p[1]===Symbol.for("react.memo_cache_sentinel")?(c={position:"relative"},p[1]=c):c=p[1];let R=x?"location":void 0;return p[2]!==E||p[3]!==g||p[4]!==y||p[5]!==_||p[6]!==C||p[7]!==R?(h=(0,r.jsx)(o.$6,{id:g,className:"react-file-line html-div","data-testid":"code-cell","data-line-number":y,html:E,ref:_,style:c,"aria-current":R,inert:C}),p[2]=E,p[3]=g,p[4]=y,p[5]=_,p[6]=C,p[7]=R,p[8]=h):h=p[8],h}p.displayName="SyntaxHighlightedLine",g.displayName="SyntaxHighlightedLineWithRef";let v=c.memo(b);function b(e){let t,n,a=(0,l.c)(4),{linesData:c,colorizedLines:u}=e;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,m.bp)(),a[0]=t):t=a[0];let d=function(e,t,n){let r,o=(0,l.c)(5),{isServer:a}=(0,s.V)();return o[0]!==t||o[1]!==n||o[2]!==a||o[3]!==e?(r=t?t.map((r,l)=>{if(l>=e.length)return null;let o="",s="";l%h.kd!=0||a||(o=a?"
":'
'),(l+1)%h.kd!=0&&l!==t.length||a||(s="
");let c=0!==r.length?r:"\n",u=n?(0,i.Gx)(c)??c:c;return`${o}
${u}
${s}`}).join("\n"):"
",o[0]=t,o[1]=n,o[2]=a,o[3]=e,o[4]=r):r=o[4],r}(c,u??null,t),p=(0,f.Gb)();return a[1]!==d||a[2]!==p?(n=(0,r.jsx)(o.$6,{inert:p,html:d}),a[1]=d,a[2]=p,a[3]=n):n=a[3],n}v.displayName="SyntaxHighlightedOverlay",b.displayName="SyntaxHighlightedOverlayUnmemoed"},65938(e,t,n){n.d(t,{eT:()=>b,z8:()=>y});var r=n(74848),l=n(16522),i=n(95173),o=n(31595),s=n(68541),a=n(21063),c=n(54242),u=n(44241),d=n(96540),f=n(40961),m=n(77879),h=n(97136),p=n(5672);let g="copilot-button-positioner",v="copilot-button-container";function b(e){let t,n,i=(0,l.c)(3),{children:o}=e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)("div",{id:v}),i[0]=t):t=i[0],i[1]!==o?(n=(0,r.jsxs)("div",{id:g,className:"position-relative",children:[o,t]}),i[1]=o,i[2]=n):n=i[2],n}b.displayName="CopilotButtonContainer";let y=d.memo(function(e){let t,n,b,y,x,w,C,L,_=(0,l.c)(33),{rowBeginNumber:N,rowEndNumber:S,id:j,recalcPosition:E,ref:R}=e,[$,k]=(0,d.useState)(null);_[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>({setAnchor:k}),_[0]=t):t=_[0],(0,d.useImperativeHandle)(R,t);let[O,A]=(0,d.useState)(void 0);_[1]!==$?(n=()=>{let e=()=>requestAnimationFrame(()=>A(function(e,t={x:0,y:0}){let n=document.getElementById(g);if(!e||!n)return{display:"none"};let{top:r,height:l}=e.getBoundingClientRect(),{top:i}=n.getBoundingClientRect(),o=(h.u9-l)/2;return{top:`${r-i-o+t.y+1}px`,right:"37px"}}($)));return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},_[1]=$,_[2]=n):n=_[2],_[3]!==$||_[4]!==E?(b=[$,E],_[3]=$,_[4]=E,_[5]=b):b=_[5],(0,d.useLayoutEffect)(n,b);let I=(0,o.l)(),{copilotAccessAllowed:T}=(0,i.w)(),B=(0,s.z)(),M=(0,p.Df)(),D=(0,c.t)(),{language:z,languageID:H,copilotSWEAgentEnabled:P}=(0,m.A)();_[6]!==N||_[7]!==S?(y={start:N,end:S},_[6]=N,_[7]=S,_[8]=y):y=_[8];let U=B.refType;_[9]!==B.name||_[10]!==U?(x=(0,u.D7)(B.name,U),_[9]=B.name,_[10]=U,_[11]=x):x=_[11],_[12]!==z||_[13]!==H||_[14]!==I||_[15]!==B.currentOid||_[16]!==D.id||_[17]!==D.name||_[18]!==D.ownerLogin||_[19]!==y||_[20]!==x?(w={type:"snippet",languageID:H,languageName:z,path:I,range:y,ref:x,commitOID:B.currentOid,repoID:D.id,repoName:D.name,repoOwner:D.ownerLogin,url:window.location.href},_[12]=z,_[13]=H,_[14]=I,_[15]=B.currentOid,_[16]=D.id,_[17]=D.name,_[18]=D.ownerLogin,_[19]=y,_[20]=x,_[21]=w):w=_[21];let F=w;_[22]!==T||_[23]!==j||_[24]!==F||_[25]!==I||_[26]!==O||_[27]!==D||_[28]!==M||_[29]!==P?(C=void 0===O?null:(0,r.jsx)("div",{style:{alignSelf:"center",position:"absolute",lineHeight:"16px",height:"24px",width:"24px",zIndex:2,...O},children:(0,r.jsx)(a.Ay,{copilotAccessAllowed:T,messageReference:F,id:j,showAgentTaskButton:P,currentRepo:D,currentReference:{path:I,range:M?{start:M.start.line,end:M.end.line}:void 0}})}),_[22]=T,_[23]=j,_[24]=F,_[25]=I,_[26]=O,_[27]=D,_[28]=M,_[29]=P,_[30]=C):C=_[30];let W=C;if(_[31]!==W){let e=document.getElementById(v);L=e?(0,f.createPortal)(W,e):null,_[31]=W,_[32]=L}else L=_[32];return L});y.displayName="CopilotButton"},36899(e,t,n){n.d(t,{AG:()=>R,Ay:()=>k,Dp:()=>E});var r=n(74848),l=n(16522),i=n(95173),o=n(51336),s=n(74208),a=n(31595),c=n(68541),u=n(12191),d=n(99637),f=n(54242),m=n(53181),h=n(26316),p=n(70887),g=n(54590),v=n(38621),b=n(20757),y=n(26108),x=n(18990),w=n(34164),C=n(96540),L=n(40961),_=n(61968),N=n(97136),S=n(22520);let j="highlighted-line-menu-container",E="highlighted-line-menu-first-option";function R(e){let t,n,i=(0,l.c)(3),{children:o}=e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,r.jsx)("div",{id:j}),i[0]=t):t=i[0],i[1]!==o?(n=(0,r.jsxs)("div",{id:N.uU,className:"position-relative",children:[o,t]}),i[1]=o,i[2]=n):n=i[2],n}R.displayName="HighlightedLineMenuContainer";let $=C.memo(function(e){let t,n,R,$,k,O,A,I,T,B,M=(0,l.c)(45),{codeLineClassName:D,offset:z,lineData:H,onLineStickOrUnstick:P,onMenuClose:U,onCollapseToggle:F,openOnLoad:W,cursorRef:Y,rowBeginId:V,rowBeginNumber:G,rowEndId:X,rowEndNumber:K,ref:q}=e,J=void 0!==W&&W,[Q,Z]=(0,C.useState)(null);M[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>({setAnchor:Z}),M[0]=t):t=M[0],(0,C.useImperativeHandle)(q,t);let ee=C.useRef(null),{githubDevUrl:et}=(0,o.s)(),en=(0,a.l)(),er=(0,s.m)(),{modelsAccessAllowed:el}=(0,i.w)(),ei=(0,c.z)(),eo=(0,f.t)(),[es,ea]=(0,C.useState)(J?"hidden":"visible"),[ec,eu]=(0,C.useState)(void 0);M[1]!==Q||M[2]!==z?(n=()=>{let e=()=>{ea("hidden"),requestAnimationFrame(()=>{eu((0,N.sZ)(Q,z)),ea("visible")})};return e(),h.cg?.addEventListener("resize",e),()=>{h.cg?.removeEventListener("resize",e)}},R=[Q,z],M[1]=Q,M[2]=z,M[3]=n,M[4]=R):(n=M[3],R=M[4]),(0,C.useLayoutEffect)(n,R);let[ed,ef]=C.useState(!1);M[5]!==Y||M[6]!==J?($=()=>{if(J){Y&&Z(Y.current);let e=window.setTimeout(()=>{ef(!0)},50);return()=>{window.clearTimeout(e)}}},M[5]=Y,M[6]=J,M[7]=$):$=M[7];let em=(0,C.useEffectEvent)($);M[8]!==em?(k=()=>em(),M[8]=em,M[9]=k):k=M[9],M[10]===Symbol.for("react.memo_cache_sentinel")?(O=[],M[10]=O):O=M[10],(0,C.useLayoutEffect)(k,O);let{newDiscussionPath:eh,newIssuePath:ep}=(0,_.Y_)(),{createPermalink:eg,getUrl:ev}=(0,u.Z)();M[11]!==H||M[12]!==F||M[13]!==P||M[14]!==U?(A={lineData:H,onLineStickOrUnstick:P,onMenuClose:U,onCollapseToggle:F,setOpen:ef},M[11]=H,M[12]=F,M[13]=P,M[14]=U,M[15]=A):A=M[15];let{setShouldBeOpen:eb,expandOrCollapseSection:ey,openUpRefSelector:ex}=(0,N.S9)(A),[ew]=(0,g.ok)(),eC="1"===ew.get("plain"),eL=`L${G}${V!==X?`-L${K}`:""}`,e_=eC?"plain=1":void 0;M[16]!==eg||M[17]!==eL||M[18]!==e_?(I=eg({absolute:!0,params:e_,hash:eL}),M[16]=eg,M[17]=eL,M[18]=e_,M[19]=I):I=M[19];let eN=I,eS=encodeURIComponent(eN);M[20]!==D||M[21]!==eS||M[22]!==ey||M[23]!==ev||M[24]!==et||M[25]!==er||M[26]!==H||M[27]!==eL||M[28]!==el||M[29]!==eh||M[30]!==ep||M[31]!==ed||M[32]!==ex||M[33]!==en||M[34]!==eN||M[35]!==ec||M[36]!==ei||M[37]!==eo||M[38]!==G||M[39]!==K||M[40]!==eb||M[41]!==es?(T=void 0===ec?null:(0,r.jsxs)(b.W,{open:ed,onOpenChange:eb,children:[(0,r.jsx)(b.W.Anchor,{children:(0,r.jsx)(y.K,{className:(0,w.$)(D,"HighlightedLineMenu-module__highlightedLineMenuButton__hVBhI"),size:"small",icon:v.KebabHorizontalIcon,"aria-label":`Line ${G} options`,"data-testid":"highlighted-line-menu-button",style:{visibility:es,...ec}})}),(0,r.jsx)(b.W.Overlay,{width:"small",children:(0,r.jsxs)(x.l,{"data-testid":"highlighted-line-menu",children:[G===K&&(0,r.jsx)(x.l.Item,{onClick:()=>{(0,S.kY)(`Copied line ${G}.`);let e=(0,N.zM)(h.XC?.getElementById(`LC${G}`)??null);e&&(0,d.D)(e),eb(!1)},onSelect:()=>{(0,S.kY)(`Copied line ${G}.`);let e=(0,N.zM)(h.XC?.getElementById(`LC${G}`)??null);e&&(0,d.D)(e),eb(!1)},ref:ee,className:E,children:"Copy line"}),G!==K&&(0,r.jsx)(x.l.Item,{onClick:()=>{(0,S.kY)(`Copied lines ${G}-${K}.`);let e="";for(let t=G;t<=K;t++)e+=`${(0,N.zM)(h.XC?.getElementById(`LC${t}`)??null)}${t!==K?"\n":""}`;e&&(0,d.D)(e),eb(!1)},onSelect:()=>{(0,S.kY)(`Copied lines ${G}-${K}.`);let e="";for(let t=G;t<=K;t++)e+=`${(0,N.zM)(h.XC?.getElementById(`LC${t}`)??null)}${t!==K?"\n":""}`;e&&(0,d.D)(e),eb(!1)},className:E,children:"Copy lines"}),eN&&(0,r.jsx)(x.l.Item,{onClick:()=>{(0,S.kY)("Copied permalink."),(0,d.D)(eN),eb(!1)},onSelect:()=>{(0,S.kY)("Copied permalink."),(0,d.D)(eN),eb(!1)},children:"Copy permalink"}),(0,r.jsx)(x.l.LinkItem,{href:ev({action:"blame",hash:eL}),children:"View git blame"}),ep&&eN&&(0,r.jsx)(x.l.LinkItem,{href:`${ep}?permalink=${eS}`,children:"Reference in new issue"}),eh&&eN&&(0,r.jsx)(x.l.LinkItem,{href:`${eh}?permalink=${eS}`,children:"Reference in new discussion"}),et&&(0,r.jsx)(x.l.LinkItem,{href:et+h.cg?.location.pathname.substring(1),children:"View file in GitHub.dev"}),G===K&&H&&(0,r.jsxs)(x.l.Item,{onClick:ey,onSelect:ey,children:[H.ownedSection&&H.ownedSection.collapsed?"Expand":"Collapse"," current section"]}),(0,r.jsxs)(x.l.Item,{onClick:ex,onSelect:ex,children:["View file in different branch/tag",(0,r.jsx)(x.l.TrailingVisual,{children:(0,r.jsx)(p.hh,{commandId:"code-view:open-ref-selector"})})]}),er&&el&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.W.Divider,{}),(0,r.jsxs)(x.l.LinkItem,{href:(0,m.D)({registry:"azure-openai",name:"gpt-4o",commit:ei.currentOid,filePath:en,repoOwner:eo.ownerLogin,repoName:eo.name,beginLine:G,endLine:K}),target:"_blank",children:[(0,r.jsx)("p",{className:"mb-1",children:"Open as prompt in GitHub Models"}),(0,r.jsx)("span",{className:"HighlightedLineMenu-module__aiDisclaimer__V9Fv5",children:"This tool uses AI to process your code"})]})]})]})})]}),M[20]=D,M[21]=eS,M[22]=ey,M[23]=ev,M[24]=et,M[25]=er,M[26]=H,M[27]=eL,M[28]=el,M[29]=eh,M[30]=ep,M[31]=ed,M[32]=ex,M[33]=en,M[34]=eN,M[35]=ec,M[36]=ei,M[37]=eo,M[38]=G,M[39]=K,M[40]=eb,M[41]=es,M[42]=T):T=M[42];let ej=T;if(M[43]!==ej){let e=h.XC?.getElementById(j);B=e?(0,L.createPortal)(ej,e):null,M[43]=ej,M[44]=B}else B=M[44];return B});$.displayName="HighlightedLineMenu";let k=$},90224(e,t,n){n.d(t,{p:()=>a,U:()=>s});var r=n(74848),l=n(88134),i=n(34164);let o="HighlightedOverlay-module__hiddenText__yijzZ";function s({symbols:e,focusedSymbol:t,lineNumber:n,style:c,isNotUsingWhitespace:u,className:d}){let f=0,m=e.length>0?e[0].bodyText:"",h=`overlay-${n}-${c?"blob":"panel"}-${m}`,p=(0,l.ud)().codeWrappingOption,g=e.length>0&&!u?e[0].leadingWhitespace??0:0;return(0,r.jsxs)("span",{className:(0,i.$)("HighlightedOverlay-module__overlayWrapper__X2ab9",p.enabled?"HighlightedOverlay-module__overlayWrapperWrap__UNKrl":"HighlightedOverlay-module__overlayWrapperNoWrap__utsVG",d),style:c,children:[e.map(e=>{let n=e===t,l=(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:o,children:m.substring(f,e.ident.start.column+g)}),(0,r.jsx)("span",{className:(0,i.$)("HighlightedOverlay-module__highlightBackground__POs8P",n?"HighlightedOverlay-module__focusedHighlight__ffA7o":"HighlightedOverlay-module__unfocusedHighlight__ti2EU"),children:(0,r.jsx)("span",{className:n?void 0:o,id:a(e.lineNumber,e.ident.start.column+g),children:m.substring(e.ident.start.column+g,e.ident.end.column+g)})})]},`symbol-${e.ident.start.line}-${e.ident.start.column+g}`);return f=e.ident.end.column+g,l}),(0,r.jsx)("span",{className:o,children:m.substring(f)})]},h)}function a(e,t){return`match-${e}-${t}`}s.displayName="HighlightedOverlay"},18955(e,t,n){n.d(t,{$Q:()=>v,PL:()=>p,Zj:()=>h});var r=n(74848),l=n(16522),i=n(54242),o=n(73537),s=n(23666),a=n(97286),c=n(78597),u=n(96540),d=n(46513);let f={stylingDirectives:null},m=u.createContext(f);function h(e){let t,n,i,o=(0,l.c)(6);return o[0]!==e?({children:t,...n}=e,o[0]=e,o[1]=t,o[2]=n):(t=o[1],n=o[2]),o[3]!==t||o[4]!==n?(i=(0,r.jsx)(m,{value:n,children:t}),o[3]=t,o[4]=n,o[5]=i):i=o[5],i}function p(){return u.use(m)}async function g(e){if(!e)return f;let t=await (0,c.lS)(e);if(t.ok){let e=await t.json();if(e&&Array.isArray(e.stylingDirectives))return e}return f}function v(e,t,n,r){let c,u,m,h,p,v=(0,l.c)(18);v[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.G7)("react_blob_overlay"),v[0]=c):c=v[0];let b=c,y=(0,i.t)();v[1]!==n||v[2]!==t||v[3]!==e||v[4]!==y?(u=e&&t&&!n?(0,s.rzN)({repo:y,commitish:e.name,path:t}):null,v[1]=n,v[2]=t,v[3]=e,v[4]=y,v[5]=u):u=v[5];let x=u,w=!!x&&r<=d.OL&&b,C=e?.name;v[6]!==t||v[7]!==y.name||v[8]!==y.ownerLogin||v[9]!==C||v[10]!==x?(m=["deferredAST",y.ownerLogin,y.name,C,t,x],v[6]=t,v[7]=y.name,v[8]=y.ownerLogin,v[9]=C,v[10]=x,v[11]=m):m=v[11],v[12]!==x?(h=()=>g(x),v[12]=x,v[13]=h):h=v[13],v[14]!==w||v[15]!==m||v[16]!==h?(p={queryKey:m,queryFn:h,enabled:w,placeholderData:f},v[14]=w,v[15]=m,v[16]=h,v[17]=p):p=v[17];let{data:L}=(0,a.I)(p);return w?L??f:f}m.displayName="DeferredASTContext",h.displayName="DeferredASTProvider"},61968(e,t,n){n.d(t,{Y_:()=>c,mA:()=>o,mD:()=>a});var r=n(74848),l=n(16522);n(78597);var i=n(96540);let o={showLicenseMeta:!1,license:null,codeownerInfo:{codeownerPath:null,ownedByCurrentUser:null,ownersForFile:null,ruleForPathLine:null},newDiscussionPath:null,newIssuePath:null},s=i.createContext(o);function a(e){let t,n,i,o=(0,l.c)(6);return o[0]!==e?({children:t,...n}=e,o[0]=e,o[1]=t,o[2]=n):(t=o[1],n=o[2]),o[3]!==t||o[4]!==n?(i=(0,r.jsx)(s,{value:n,children:t}),o[3]=t,o[4]=n,o[5]=i):i=o[5],i}function c(){return i.use(s)}s.displayName="DeferredMetadataContext",a.displayName="DeferredMetadataProvider"},90441(e,t,n){n.d(t,{O:()=>a,k:()=>s});var r=n(74848),l=n(16522),i=n(96540);let o=i.createContext(void 0);function s(e){let t,n=(0,l.c)(3),{blame:i,children:s}=e;return n[0]!==i||n[1]!==s?(t=(0,r.jsxs)(o,{value:i,children:[" ",s," "]}),n[0]=i,n[1]=s,n[2]=t):t=n[2],t}function a(){return i.use(o)}o.displayName="CurrentBlameContext",s.displayName="CurrentBlameProvider"},77879(e,t,n){n.d(t,{A:()=>a,s:()=>s});var r=n(74848),l=n(16522),i=n(96540);let o=i.createContext({});function s(e){let t,n=(0,l.c)(3),{blob:i,children:s}=e;return n[0]!==i||n[1]!==s?(t=(0,r.jsxs)(o,{value:i,children:[" ",s," "]}),n[0]=i,n[1]=s,n[2]=t):t=n[2],t}function a(){return i.use(o)}o.displayName="CurrentBlobContext",s.displayName="CurrentBlobProvider"},98667(e,t,n){n.d(t,{EN:()=>c,Px:()=>d,YP:()=>u,pm:()=>f});var r=n(74848),l=n(16522),i=n(96540),o=n(90441),s=n(77879);let a=i.createContext(null);function c(e){let t,n=(0,l.c)(3),{children:c}=e,u=(()=>{let e=(0,l.c)(2),t=(0,s.A)(),n=(0,o.O)(),[r,a]=i.useState(m),[c,u]=i.useState(t),[d,f]=i.useState(n);if(t!==c||n!==d){let r;e[0]!==n?(r=n?null:new Map,e[0]=n,e[1]=r):r=e[1];let l=r;return a(l),u(t),f(n),l}return r})();return n[0]!==c||n[1]!==u?(t=(0,r.jsxs)(a,{value:u,children:[" ",c," "]}),n[0]=c,n[1]=u,n[2]=t):t=n[2],t}function u(){return i.use(a)}function d(){let e,t=(0,l.c)(2),n=i.use(a);return t[0]!==n?(e=e=>n?.get(e),t[0]=n,t[1]=e):e=t[1],e}function f(){let e,t=(0,l.c)(2),n=i.use(a);return t[0]!==n?(e=(e,t)=>{n&&(n.has(e)?n.get(e)?.push(t):n.set(e,[t]))},t[0]=n,t[1]=e):e=t[1],e}function m(){return new Map}a.displayName="CurrentLineRefMapContext",c.displayName="CurrentLineRefMapProvider"},17430(e,t,n){n.d(t,{y:()=>a});var r=n(7231),l=n(99637),i=n(96540),o=n(81634),s=n(77879);function a(){let{sendRepoClickEvent:e}=(0,r.T)(),{rawBlobUrl:t}=(0,s.A)(),n=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{n.current=navigator.userAgent.toLowerCase().indexOf("firefox")>-1},[]),(0,i.useCallback)(async()=>{e("BLOB_RAW_DROPDOWN.COPY");try{let e=(0,o.Ix)(t);if((0,o.j5)()&&navigator&&navigator.clipboard&&"write"in navigator.clipboard&&!n.current)await navigator.clipboard.write([new ClipboardItem({"text/plain":e})]);else{let t=await e;if(!t)return o.T9.Error;await (0,l.D)(await t.text())}}catch{return o.T9.Error}return o.T9.Success},[n,e,t])}},87763(e,t,n){n.d(t,{o:()=>a});var r=n(16522),l=n(70170),i=n(54590),o=n(88134),s=n(96540);function a(e,t){let n,a,c=(0,r.c)(9),u=void 0===t?20:t,[d,f]=(0,s.useState)(u),m=(0,s.useRef)(u),h=(0,o.ud)().codeWrappingOption,p=(0,i.zy)();return c[0]!==u||c[1]!==e||c[2]!==h.enabled?(n=()=>{let t=document.getElementById("file-name-id-wide");if(!t)return;let n=new ResizeObserver((0,l.s)(()=>{let t=document.getElementsByClassName(e)[0]?.firstChild?.getBoundingClientRect().height??u;t>100&&(t=document.getElementsByClassName(e)[0]?.firstChild?.firstChild?.getBoundingClientRect().height),0===t||t===m.current||h.enabled||(f(t),m.current=t)}));return n.observe(t),()=>n.disconnect()},c[0]=u,c[1]=e,c[2]=h.enabled,c[3]=n):n=c[3],c[4]!==u||c[5]!==e||c[6]!==p.key||c[7]!==h.enabled?(a=[p.key,h.enabled,e,u],c[4]=u,c[5]=e,c[6]=p.key,c[7]=h.enabled,c[8]=a):a=c[8],(0,s.useLayoutEffect)(n,a),d}},79250(e,t,n){n.d(t,{DC:()=>$,Jo:()=>k,M1:()=>I,M_:()=>y,Ov:()=>O,QM:()=>b,aM:()=>E,cH:()=>x,di:()=>w,fY:()=>A,ue:()=>R});var r=n(16522),l=n(62269),i=n(13589),o=n(13865),s=n(54590),a=n(19519),c=n(5063),u=n(88134),d=n(15393),f=n(96540),m=n(18955),h=n(22520),p=n(90441),g=n(87763),v=n(38841);let b=7.2293,y=92,x=92,w=70;function C(e,t){let n=0,r=0,l=0,i=0,o=0,s=0,a=t.length-1;for(;s<=a;){let c=Math.floor((s+a)/2);if(l=t[c]+1,i=c>0?t[c-1]+1:0,o=c=i&&e=l&&e=o&&(s=c+1)}return{line:n,offset:r}}let L=new i.Lj(1),_=new i.Lj(0),N=new i.Lj(1),S=new i.Lj(0),j=new i.Lj(!1);function E(){return(0,o.HN)(L)}function R(){return(0,o.HN)(N)}function $(){return(0,o.HN)(j)}function k(){let e,t=(0,r.c)(1),n=(0,f.useRef)(null);t[0]===Symbol.for("react.memo_cache_sentinel")?(e=function(){n.current={start:{line:L.value,column:_.value+1},end:{line:N.value,column:S.value+1}}},t[0]=e):e=t[0];let l=e;return(0,o.Rs)(L,l),(0,o.Rs)(_,l),(0,o.Rs)(N,l),(0,o.Rs)(S,l),n}function O(e){j.value=e}function A(e){let t=(0,u.ud)().codeWrappingOption.enabled,n=!!(0,p.O)(),{isServer:r}=(0,a.V)();return!t&&!n&&!e&&!r}function I(e,t,n,i,o,a,u,p,E,R,$,k){let O,A,I,T,B,M,D,z,H,P,U,F,W,Y,V,G,X,K,q,J,Q,Z,ee,et,en,er,el,ei,eo,es,ea,ec=(0,r.c)(105),eu=(0,f.useRef)(0),ed=(0,f.useRef)(0),ef=(0,f.useRef)(0),em=(0,f.useRef)(0),eh=(0,f.useRef)(0),ep=(0,f.useRef)(0),eg=(0,f.useRef)(null),ev=(0,f.useRef)(0),eb=(0,f.useRef)(0),ey=(0,f.useRef)(15),ex=(0,f.useRef)(0),ew=(0,f.useRef)(0),eC=u?x:y;ec[0]===Symbol.for("react.memo_cache_sentinel")?(O=["windows"],ec[0]=O):O=ec[0];let eL=(0,d.X)(O)?6.6:b,e_=(0,g.o)("react-line-numbers"),{stylingDirectives:eN}=(0,m.PL)();if(ec[1]!==o){A=[];for(let e=0;eo.length||!o[e])return n;let r=o[e].rawText;return r&&(t>r.length?(n=r.length,ej((0,h.m)(n,r,R),n)):n=r.length&&(n=r.length,ej((0,h.m)(n,r,R),n))),n},ec[17]=o,ec[18]=ej,ec[19]=R,ec[20]=P):P=ec[20];let eI=P;ec[21]!==e$||ec[22]!==o||ec[23]!==t||ec[24]!==eN?(U=function(){let e=o[eh.current];if(!e)return;let{rawText:n}=e,r=eN?eN[e.lineNumber-1]:e.stylingDirectivesLine;if(!n||!r)return;let l=(0,c.M)(r),i=null;for(let e of l)if(!(e.s>ep.current)&&!(e.e=t+r?eg.current.scrollBy(l-t-r+e,0):l<=t&&eg.current.scrollBy(l-t-r,0)}},ec[28]=eL,ec[29]=eC,ec[30]=W):W=ec[30];let eM=W;ec[31]!==eL||ec[32]!==e$||ec[33]!==e_||ec[34]!==o.length||ec[35]!==eC?(Y=function(){let e=eO(),t=ed.current,n=eu.current;"end"===e&&(t=em.current,n=ef.current);let r=Math.min(e$(n+5),o.length),l=Math.max(e$(n-5),1),i=document.documentElement.clientHeight,s=document.documentElement.clientWidth,a=(0,h.ap)(r),c=(0,h.ap)(l),u=a?.getBoundingClientRect(),d=c?.getBoundingClientRect(),f=!!u&&u.top>=0&&u.left>=0&&u.bottom<=i,m=!!d&&d.top>=0&&d.left>=0&&d.bottom<=i;cancelAnimationFrame(ew.current),ew.current=requestAnimationFrame(()=>{!f&&(null===a?window.scrollTo(0,n*e_):u.y<0||u.y>i?(a.scrollIntoView({block:"center"}),window.scrollBy(-300,0)):window.scrollBy(0,100),si?(c.scrollIntoView({block:"center"}),window.scrollBy(-300,0)):window.scrollBy(0,-200)})},ec[31]=eL,ec[32]=e$,ec[33]=e_,ec[34]=o.length,ec[35]=eC,ec[36]=Y):Y=ec[36];let eD=Y;ec[37]!==eA||ec[38]!==eM||ec[39]!==eD?(V=function(e){eg.current&&(eD(),eM(e)),eA()},ec[37]=eA,ec[38]=eM,ec[39]=eD,ec[40]=V):V=ec[40];let ez=V;ec[41]!==eI||ec[42]!==e_||ec[43]!==o.length||ec[44]!==eE||ec[45]!==ez||ec[46]!==ek?(G=function(){ek();let e=eu.current,t=ed.current;e+ey.current>o.length?e=o.length-1:e+=ey.current,t=eI(e,t),eu.current=e,ed.current=t,eR(),eE(e*e_,e),ez(w)},ec[41]=eI,ec[42]=e_,ec[43]=o.length,ec[44]=eE,ec[45]=ez,ec[46]=ek,ec[47]=G):G=ec[47];let eH=G;ec[48]!==eI||ec[49]!==e_||ec[50]!==eE||ec[51]!==ez||ec[52]!==ek?(X=function(){ek();let e=eu.current,t=ed.current;e{let t=L.value!==N.value,n={start:{line:L.value,column:t?_.value+1:null},end:{line:N.value,column:t?S.value+1:null}},r={anchorPrefix:"L",blobRange:{start:n.start,end:n.end}},i=(0,l.JB)(r);window.location.hash=i,p?.(e)},ec[56]=p,ec[57]=q):q=ec[57];let eF=q,{hash:eW}=(0,s.zy)();ec[58]!==e_?(J=()=>{let e=document.documentElement.clientHeight;ey.current=Math.min(Math.max(Math.round((e-200>300?e-200:300)/e_),1),100)},Q=[e_],ec[58]=e_,ec[59]=J,ec[60]=Q):(J=ec[59],Q=ec[60]),(0,f.useEffect)(J,Q),ec[61]!==$||ec[62]!==eH||ec[63]!==eP?(Z=()=>{$&&""!==$&&($.includes("PageUp")?eP():$.includes("PageDown")&&eH())},ec[61]=$,ec[62]=eH,ec[63]=eP,ec[64]=Z):Z=ec[64];let eY=(0,f.useEffectEvent)(Z);ec[65]!==eY?(ee=()=>{eY()},ec[65]=eY,ec[66]=ee):ee=ec[66],ec[67]!==$?(et=[$],ec[67]=$,ec[68]=et):et=ec[68],(0,f.useEffect)(ee,et),ec[69]!==eS||ec[70]!==eD||ec[71]!==e_||ec[72]!==o||ec[73]!==eT||ec[74]!==ej||ec[75]!==eE||ec[76]!==eB||ec[77]!==R||ec[78]!==k?(en=()=>{if(!k||k.start<0&&k.end<0||eb.current===k.start&&ex.current===k.end)return;let e=C(k.start,eS),t=C(k.end,eS);(eb.current!==k.start||ex.current===k.end)&&(k.keyboard||k.displayStart)?(ej((0,h.m)(e.offset,o[e.line]?.rawText??"",R),e.offset),ev.current=e.offset,eE(e.line*e_,e.line),eB(e.line,t.line,e.offset,t.offset,!0)):(ej((0,h.m)(t.offset,o[t.line]?.rawText??"",R),t.offset),ev.current=t.offset,eE(t.line*e_,t.line),eB(e.line,t.line,e.offset,t.offset,!1)),ex.current=k.end,eb.current=k.start,k.end!==k.start||k.keyboard||(j.value=!1,eT()),eh.current<=5&&k.keyboard&&eD()},ec[69]=eS,ec[70]=eD,ec[71]=e_,ec[72]=o,ec[73]=eT,ec[74]=ej,ec[75]=eE,ec[76]=eB,ec[77]=R,ec[78]=k,ec[79]=en):en=ec[79];let eV=(0,f.useEffectEvent)(en);ec[80]!==eV?(er=()=>{eV()},ec[80]=eV,ec[81]=er):er=ec[81],ec[82]!==o||ec[83]!==R||ec[84]!==k?(el=[o,R,k],ec[82]=o,ec[83]=R,ec[84]=k,ec[85]=el):el=ec[85],(0,f.useEffect)(er,el),ec[86]!==eW||ec[87]!==e_||ec[88]!==o.length||ec[89]!==ej||ec[90]!==eE||ec[91]!==ez?(ei=()=>{let e=(0,l.$c)(eW);if(!e.blobRange?.start?.line||e.blobRange.start.line>o.length)return;let t=e.blobRange.start.line-1;eu.current=t,L.value=t,_.value=0,N.value=t,S.value=0,ed.current=0,ef.current=t,em.current=0,ev.current=0,ej(ed.current,ed.current),eE(eu.current*e_,eu.current),ez(w)},ec[86]=eW,ec[87]=e_,ec[88]=o.length,ec[89]=ej,ec[90]=eE,ec[91]=ez,ec[92]=ei):ei=ec[92];let eG=(0,f.useEffectEvent)(ei);return ec[93]!==eG?(eo=()=>{eG()},ec[93]=eG,ec[94]=eo):eo=ec[94],ec[95]!==eW||ec[96]!==o?(es=[eW,o],ec[95]=eW,ec[96]=o,ec[97]=es):es=ec[97],(0,f.useEffect)(eo,es),ec[98]!==eA||ec[99]!==e$||ec[100]!==eU||ec[101]!==eH||ec[102]!==eP||ec[103]!==eF?(ea={inspectSymbol:eU,updateUrlForLineNumber:eF,onPageDown:eH,onPageUp:eP,currentStartLine:eu,currentStartChar:ed,currentEndLine:ef,currentEndChar:em,determineAndSetTextAreaCursorPosition:eA,getCorrectLineNumberWithCollapsedSections:e$},ec[98]=eA,ec[99]=e$,ec[100]=eU,ec[101]=eH,ec[102]=eP,ec[103]=eF,ec[104]=ea):ea=ec[104],ea}},38841(e,t,n){n.d(t,{DE:()=>a,FO:()=>s,Gp:()=>o});var r=n(16522),l=n(96540);let i="react_blob_view_focus_symbol_pane";function o(e){let t,n,o=(0,r.c)(3),s=(0,l.useEffectEvent)(e);o[0]!==s?(t=()=>{let e=e=>{s(e.detail?.focusSymbolSearch||!1)};return window.addEventListener(i,e),()=>{window.removeEventListener(i,e)}},o[0]=s,o[1]=t):t=o[1],o[2]===Symbol.for("react.memo_cache_sentinel")?(n=[],o[2]=n):n=o[2],(0,l.useEffect)(t,n)}function s(){window.dispatchEvent(new CustomEvent(i,{detail:{focusSymbolSearch:!1}}))}function a(){window.dispatchEvent(new CustomEvent(i,{detail:{focusSymbolSearch:!0}}))}},97136(e,t,n){n.d(t,{S9:()=>a,sZ:()=>c,u9:()=>s,uU:()=>o,zM:()=>function e(t){let n=t?.textContent??"";if(""!==n)return n;if(t){let r=t.childNodes;for(let t=0;t{if(!e)return;let{lineNumber:n,ownedSection:r}=e;r&&(r.collapsed=!1),o?.(),(0,i.ny)(n),t?.(e,!0)},[e,o,t]),d=(0,l.useCallback)(()=>{if(!e)return;let{lineNumber:t,ownedSection:n}=e;n&&(n.collapsed=!0),o?.(),(0,i.E8)(t)},[e,o]);return{setShouldBeOpen:c,expandOrCollapseSection:function(){if(!e)return;let{ownedSection:t}=e;t&&(t.collapsed?(u(),(0,i.kY)("Code section expanded")):(d(),(0,i.kY)("Code section collapsed"))),c(!1,!0)},openUpRefSelector:function(){let e=document.getElementsByClassName("ref-selector-class");e&&1===e.length?(e[0]?.click(),(0,r.i)("ref selector opened")):e&&2===e.length&&(e[1]?.click(),(0,r.i)("ref selector opened")),c(!1)}}}function c(e,t={x:0,y:0}){let n=document.getElementById(o);if(!e||!n)return{display:"none"};let{top:r,left:l,height:i}=e.getBoundingClientRect(),{top:a,left:u}=n.getBoundingClientRect();return{top:`${r-a-(s-i)/2+t.y}px`,left:`${Math.max(l-u+t.x,0)-13}px`}}},73342(e,t,n){n.d(t,{B:()=>d,z:()=>u});var r=n(16522),l=n(19519),i=n(96540),o=n(98667);let s=[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function a(e,t,n,r){return new IntersectionObserver(e=>{for(let t of e){let e=n.get(t.target);if(!e||"start"!==e.type)continue;let{currentY:l,currentRatio:i}=function(e,t,n,r,l,i,o){let s=r.getBoundingClientRect(),a=s.y,c=window.innerHeight-s.bottom>0,u=s.bottom>0,d=s.top<150&&s.top>-300,f=0===s.bottom&&0===s.top&&0===s.height&&0===s.width&&0===s.x&&0===s.y;return!e.ownedSection||e.ownedSection?.collapsed||(a<=t&&(c&&u||d)&&!f?l>n&&i||d&&o(e,!1):a>t&&i&&(l{for(let l of e){let e=t.get(l.target);if(!e||"end"!==e.type)continue;let{currentY:i,currentRatio:o}=function(e,t,n,r,l,i,o,s){let a=n.getBoundingClientRect(),c=a.y,u=l?i():void 0,d=window.innerHeight-a.bottom>0,f=a.bottom>0,m=a.top<150,h=d&&f,p=window.innerHeight-a.bottom>150&&window.innerHeight>300;for(let n of u||[])n&&h&&(ct&&o||s(n,!0):c>e&&o&&(rn.current(e.lineNumber),l.isIntersecting,r.current);e.previousY=i,e.previousRatio=o}},{root:null,rootMargin:`-${e}px 0px 0px 0px`,threshold:0})}function u(e,t,n){let s,u,d,f,m,h,p=(0,r.c)(14),g=(0,l.V)().isServer;p[0]===Symbol.for("react.memo_cache_sentinel")?(s=new Map,p[0]=s):s=p[0];let v=(0,i.useRef)(s);p[1]===Symbol.for("react.memo_cache_sentinel")?(u=new Map,p[1]=u):u=p[1];let b=(0,i.useRef)(u),y=(0,i.useRef)(null),x=(0,i.useRef)(n),w=(0,o.pm)(),C=(0,i.useRef)(w),L=(0,o.Px)(),_=(0,i.useRef)(L),N=(0,i.useRef)(null);if(null==N.current){let e;p[2]===Symbol.for("react.memo_cache_sentinel")?(e=new Set,p[2]=e):e=p[2],N.current=e}let S=(0,i.useRef)(t),j=(0,i.useRef)(!1);p[3]!==w||p[4]!==L||p[5]!==n||p[6]!==t?(d=()=>{x.current=n,_.current=L,S.current=t,w!==C.current&&(N.current=new Set,C.current=w)},p[3]=w,p[4]=L,p[5]=n,p[6]=t,p[7]=d):d=p[7],(0,i.useLayoutEffect)(d),p[8]!==e||p[9]!==g||p[10]!==t?(f=()=>{if(!e||g)return;for(let e of(y.current?.disconnect(),b.current.values()))e.disconnect();let n=v.current;for(let e of n.values())e.previousY=0,e.previousRatio=1;let r=c(t,n,_,x);y.current=r;let l=new Map;for(let e of n.values())"start"!==e.type||l.has(e.numParents)||l.set(e.numParents,a(t,e.numParents,n,x));for(let[e,t]of(b.current=l,n))"start"===t.type?l.get(t.numParents)?.observe(e):r.observe(e);return j.current=!0,()=>{for(let e of(r.disconnect(),l.values()))e.disconnect()}},m=[e,g,t],p[8]=e,p[9]=g,p[10]=t,p[11]=f,p[12]=m):(f=p[11],m=p[12]),(0,i.useLayoutEffect)(f,m);e:{let e;if(g){h=void 0;break e}p[13]===Symbol.for("react.memo_cache_sentinel")?(e={observe(e,t,n){let{isStartLine:r,isEndLine:l,lineNumber:i,ownedSection:o}=t;if(r){if(v.current.set(e,{type:"start",codeLineData:t,numParents:n,previousY:0,previousRatio:1}),o&&i&&!N.current?.has(i)&&(C.current(o.endLine,{lineNumber:i}),N.current?.add(i)),j.current){let t=b.current.get(n);t||(t=a(S.current,n,v.current,x),b.current.set(n,t)),t.observe(e)}}else l&&i&&(v.current.set(e,{type:"end",lineNumber:i,previousY:0,previousRatio:1}),j.current&&(y.current||(y.current=c(S.current,v.current,_,x)),y.current.observe(e)))},unobserve(e){let t=v.current.get(e);t&&("start"===t.type?b.current.get(t.numParents)?.unobserve(e):y.current?.unobserve(e),v.current.delete(e))}},p[13]=e):e=p[13],h=e}let E=h;if(e&&!g)return E}function d(e,t,n){let l,o,s,a=(0,r.c)(6),c=(0,i.useRef)(null);a[0]===Symbol.for("react.memo_cache_sentinel")?(l=e=>{c.current=e},a[0]=l):l=a[0];let u=l;return a[1]!==t||a[2]!==n||a[3]!==e?(o=()=>{let r=c.current;if(!r||!e)return;let{isStartLine:l,isEndLine:i}=t;if(l||i)return e.observe(r,t,n),()=>{e.unobserve(r)}},s=[t,n,e],a[1]=t,a[2]=n,a[3]=e,a[4]=o,a[5]=s):(o=a[4],s=a[5]),(0,i.useLayoutEffect)(o,s),u}},81634(e,t,n){n.d(t,{Ix:()=>a,T9:()=>o,j5:()=>s,t0:()=>c});var r=n(74848),l=n(38621),i=n(7478);let o={Idle:"Idle",Fetching:"Fetching",Success:"Success",Error:"Error"};function s(){let e="u">typeof ClipboardItem;return"clipboard"in navigator&&e}async function a(e){let t=await fetch(e,{method:"get"});if(!t.ok)throw Error(`Failed to fetch ${e}: ${t.status} ${t.statusText}`);return new Blob([(await t.text()).replace(/\r?\n$/,"")],{type:"text/plain"})}function c(e){let t,n;switch(e){case o.Success:t="Copied!",n=(0,r.jsx)(l.CheckIcon,{});break;case o.Fetching:t="Copying",n=(0,r.jsx)(i.A,{size:"small"});break;case o.Error:t="Something went wrong. Try again.",n=(0,r.jsx)(l.AlertIcon,{});break;default:t="Copy",n=(0,r.jsx)(l.CopyIcon,{})}return{ariaLabel:t,content:n}}},19490(e,t,n){n.d(t,{A:()=>s});var r=n(74848),l=n(23082),i=n(96540),o=n(17430);function s({containerRef:e,shouldNotOverrideCopy:t}){let{selectAllShortcut:n}=(0,l.wk)(),a=(0,i.useRef)(!1),c=(0,o.y)(),u=(0,i.useCallback)(()=>{a.current=!1,document.removeEventListener("selectionchange",u)},[]);(0,i.useEffect)(()=>()=>document.removeEventListener("selectionchange",u),[u]);let d=(0,i.useCallback)(t=>{var n;let r,l;e&&e.current&&(n=e.current,(r=document.createRange()).selectNode(n),l=window.getSelection(),l?.removeAllRanges(),l?.addRange(r),t.preventDefault(),a.current=!0,setTimeout(()=>document.addEventListener("selectionchange",u),0))},[e,u]),f=(0,i.useCallback)(e=>{a.current&&(e.preventDefault(),c())},[c]);return(0,i.useEffect)(()=>{if(!t)return window.addEventListener("copy",f),()=>window.removeEventListener("copy",f)},[f,t]),(0,r.jsx)("button",{hidden:!0,"data-hotkey":n.hotkey,onClick:d})}s.displayName="SelectAllShortcutButton"},22520(e,t,n){n.d(t,{$0:()=>w,Bm:()=>K,Bn:()=>U,CZ:()=>W,E8:()=>V,Gb:()=>_,N9:()=>en,Wb:()=>C,X5:()=>G,a2:()=>y,ap:()=>ee,bP:()=>L,hO:()=>N,jH:()=>Q,kY:()=>er,m:()=>J,ny:()=>Y,si:()=>Z,t1:()=>et,um:()=>q,wQ:()=>v,zS:()=>b});var r=n(16522),l=n(62269),i=n(13589),o=n(13865),s=n(26316),a=n(96540),c=n(90224),u=n(79250),d=n(24987);let f=/firefox\/(\d+(\.\d+)?)/,m=/Chrom(e|ium)\/([0-9]+)\./,h=/\n|\s|[();&.=,]/,p=/\n|\s|[();&.=",]/,g="collapse-show-rows-styles",v="read-only-cursor-text-area";function b(e,t){return document.querySelector(`#${e}LC${t}`)}function y(e,t){return document.querySelector(`main #${(0,c.p)(e,t)}`)}let x=new i.yy;function w(e){let t,n=(0,r.c)(2);return n[0]!==e?(t=x.has(e),n[0]=e,n[1]=t):t=n[1],(0,o.HN)(t)}function C(e){return(0,o.Rs)(x,e)}function L(){return(0,o.tQ)(x)}function _(){let e=N(),t=(0,a.useSyncExternalStore)(H,z,D)??0,n=(0,a.useSyncExternalStore)(O,k,$),r=(0,a.useSyncExternalStore)(B,T,I)??0;return(0,u.fY)()&&(e||n)&&(t>=124||r>=124)}function N(){return(0,a.useSyncExternalStore)(E,j,S)}function S(){return!1}function j(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}function E(){return R}function R(){}function $(){return!1}function k(){return navigator.userAgent.toLowerCase().indexOf("chrome")>-1||navigator.userAgent.toLowerCase().indexOf("chromium")>-1||navigator.userAgent.toLowerCase().indexOf("edge")>-1}function O(){return A}function A(){}function I(){return null}function T(){let e;return(e=navigator.userAgent.match(m))&&e.length>=3&&e[2]?parseFloat(e[2]):null}function B(){return M}function M(){}function D(){return null}function z(){let e;return(e=navigator.userAgent.toLowerCase().match(f))&&e.length>=2&&e[1]?parseFloat(e[1]):null}function H(){return P}function P(){}function U(e,t,n,r){if(!r)return"";let l="";for(let t=0;te.lineNumber&&r(e,!1)}}function Y(e){X(e,!1),x.delete(e)}function V(e){X(e,!0),x.add(e)}function G(){let e=document.getElementById(g);e&&(e.textContent=""),x.clear()}function X(e,t){let n=`.${F(e-1)} { display: none; } `;if(document.getElementById(g)){let e=document.getElementById(g);if(t)e.textContent+=n;else{let t=e?.textContent||"";e.textContent=t=t.replace(n,"")}}else{let e=document.createElement("style");e.id=g,e.textContent=n,document.head.appendChild(e)}}function K(e,t){if(e.length<3)return!1;let n=t.split(" "),r=n.includes("pl-ent")?h:p;return!(e.match(r)||n.includes("pl-c")||n.includes("pl-k"))}function q(e,t){let n=null,r=null,l=null,i=t;if(e.parentElement?.classList.contains("react-file-line"))n=e.parentElement.getAttribute("data-line-number"),r=e.parentElement,l=e;else if(e.parentElement?.parentElement?.classList.contains("react-file-line"))n=e.parentElement.parentElement.getAttribute("data-line-number"),r=e.parentElement.parentElement,l=e.parentNode;else{if(!e.parentElement?.firstElementChild?.classList.contains("react-file-line")||!(n=e.parentElement.firstElementChild.getAttribute("data-line-number"))||!parseInt(n,10))return;return{line:parseInt(n,10)-1,column:null}}if(n&&parseInt(n,10)){for(let e of r.childNodes){if(e===l)break;i+=e.textContent?.length||0}return{line:parseInt(n,10),column:0!==i?i+1:null}}}function J(e,t,n){let r,l;return r=t.slice(0,e),(l=(0,d.J)(r,n))>0||0===e?Math.round(l):0!==e?e*u.QM:0}function Q(e,t,n,r,i){if(e?.start.line===n&&e?.start.column!==null){let o=(0,l.Py)({start:e.start,end:{line:e.start.line,column:e.end.line===n?e.end.column:null}},()=>t);if(o&&o.startContainer.parentElement){let r=o.getBoundingClientRect(),l=t.getBoundingClientRect();return{offset:r.x-l.x+10,width:e.end.line===n?r.width:void 0}}if(i){let t=J(e.start.column-1,i,r),l=e.end.line===n?e.end.column:null;return{offset:t+20,width:e.end.line===n?J(l?l-1:i.length-1,i,r)-t:void 0}}}else if(e?.end.line===n&&e?.end.column!==null){let n=(0,l.Py)({start:{line:e.end.line,column:0},end:e.end},()=>t);return n?{width:n.getBoundingClientRect().width+10}:{width:J(e.end.column-1,i,r)+10}}}function Z(e){var t=b("",e);if(!t)return!1;let n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)}function ee(e){return b("",e)}function et(e,t,n){return Math.floor((e-t)/n)+1}function en(e,t){let n=0,r=t.length-1;for(;n<=r;){let l=Math.floor((n+r)/2),i=t[l];if(!i)break;if(i.lineNumber===e)return l;i.lineNumber{n&&(n.textContent=r)},t)}},24987(e,t,n){n.d(t,{J:()=>h});let r="ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",l="12px",i=`normal normal ${l} ${r}`,o=null,s=null,a=0,c=!1,u=null,d=null;function f(){o&&s&&(o.font=s,0!==a&&u&&(o.letterSpacing=`${a}px`))}function m(){if(s&&!c)return;let e=function(){if("u">typeof document){let e=document.querySelector(".react-code-text, .react-code-lines code, .react-blob-print-hide code");if(e)return getComputedStyle(e)}return null}();if(e){let t=e.fontStyle||"normal",n=e.fontWeight||"normal",i=e.fontSize||l,o=e.fontFamily||r,u=e.letterSpacing;a=0,u&&"normal"!==u&&(a=parseFloat(u)||0),s=`${t} ${n} ${i} ${o}`,c=!1}else s=i,c=!0}function h(e,t){let n=(o?c&&(m(),c||f()):("u">typeof OffscreenCanvas?o=new OffscreenCanvas(0,0).getContext("2d"):"u">typeof document&&(o=document.createElement("canvas").getContext("2d")),o&&(u="letterSpacing"in o,m(),f(),!d&&"u">typeof document&&(d=new MutationObserver(()=>{s=null,a=0,c=!1,o&&(m(),f())})).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-mode","data-dark-theme","data-light-theme"]}))),o);if(!n)return 0;let r=null!=t?e.replace(/\t/g," ".repeat(t)):e,l=n.measureText(r).width;return 0!==a&&!u&&r.length>1&&(l+=a*(r.length-1)),l}},70877(e,t,n){n.d(t,{c:()=>a});var r=n(74848),l=n(16522),i=n(38621),o=n(26108),s=n(96540);function a(e){let t,n,a,c=(0,l.c)(6);if(c[0]!==e){let{children:r,referenceType:l,...i}=e;n=l,t=i,c[0]=e,c[1]=t,c[2]=n}else t=c[1],n=c[2];let u=(0,s.useRef)(null),d=`Ask Copilot about this ${n}`;return c[3]!==t||c[4]!==d?(a=(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.K,{ref:u,icon:i.CopilotIcon,size:"small","aria-label":d,tooltipDirection:"n","data-testid":"copilot-ask-menu",...t})}),c[3]=t,c[4]=d,c[5]=a):a=c[5],a}a.displayName="AskCopilotButton"},21063(e,t,n){n.d(t,{Xu:()=>L,Ay:()=>w});var r=n(74848),l=n(16522),i=n(73537),o=n(11515),s=n(10506),a=n(66743),c=n(38621),u=n(47819),d=n(20757),f=n(18990),m=n(96540),h=n(32442),p=n(49685),g=n(82615),v=n(34349),b=n(20331),y=n(70877);let x="code-line-dropdown-copilot-button";function w(e){let t,n,a,w,S,j,E,R,$,k=(0,l.c)(35),{copilotAccessAllowed:O,messageReference:A,hideDropdown:I,id:T,showAgentTaskButton:B,currentRepo:M,currentReference:D}=e,[z,H]=(0,m.useState)(!1),[P,U]=(0,m.useState)("actionMenu");k[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.G7)("copilot_chat_opening_thread_switch"),k[0]=t):t=k[0];let F=t;k[1]!==A?(n=()=>{N(A.type,_(A.type)),p.W.copilotRedirectSnippetToImmersive&&"snippet"===A.type?(s.Jt.setEntrypointMessage({message:(0,g.XX)(),references:[A]}),window.location.href="proxy.php?url=https%3A%2F%2Fgithub.githubassets.com%2Fcopilot"):(0,v.qR)({content:"Explain",intent:b.wh.explain,references:[A],id:x}),H(!1)},k[1]=A,k[2]=n):n=k[2];let W=n;k[3]!==A?(a=()=>{let e=(0,g.UT)();p.W.copilotRedirectSnippetToImmersive&&"snippet"===A.type?(N(A.type,_(A.type)),s.Jt.setEntrypointMessage({message:e,references:[A]}),window.location.href="proxy.php?url=https%3A%2F%2Fgithub.githubassets.com%2Fcopilot"):(0,v.qR)({content:e,intent:b.wh.suggest,references:[A],id:x}),H(!1)},k[3]=A,k[4]=a):a=k[4];let Y=a;k[5]===Symbol.for("react.memo_cache_sentinel")?(w=()=>{U("newTask")},k[5]=w):w=k[5];let V=w;k[6]!==T||k[7]!==A?(S=()=>{N(A.type,_(A.type));let e={intent:b.wh.conversation,references:[A],id:T};(0,v.qR)(e),H(!1)},k[6]=T,k[7]=A,k[8]=S):S=k[8];let G=S;k[9]!==A?(j=()=>{F?C(A,x):L(A,!0,x),H(!1)},k[9]=A,k[10]=j):j=k[10];let X=j;k[11]!==G||k[12]!==I||k[13]!==T||k[14]!==A?(E=()=>{N(A.type,_(A.type)),"file"===A.type&&p.W.copilotRedirectFileViewToImmersive?window.location.href=`/copilot?reference_id=${(0,o.Vb)(A)}`:"snippet"===A.type&&p.W.copilotRedirectSnippetToImmersive?(s.Jt.setCurrentReferences(null,[A]),window.location.href="proxy.php?url=https%3A%2F%2Fgithub.githubassets.com%2Fcopilot"):I?L(A,!0,T):G()},k[11]=G,k[12]=I,k[13]=T,k[14]=A,k[15]=E):E=k[15];let K=E;k[16]!==K||k[17]!==T||k[18]!==A.type?(R={referenceType:A.type,onClick:K,id:T},k[16]=K,k[17]=T,k[18]=A.type,k[19]=R):R=k[19];let q=R;return k[20]!==O||k[21]!==q||k[22]!==D||k[23]!==M||k[24]!==X||k[25]!==K||k[26]!==W||k[27]!==Y||k[28]!==I||k[29]!==T||k[30]!==A.type||k[31]!==z||k[32]!==B||k[33]!==P?($=O?I?(0,r.jsx)(y.c,{referenceType:A.type,onClick:K,id:T}):(0,r.jsxs)(r.Fragment,{children:["actionMenu"===P&&(0,r.jsxs)(u.A,{children:[(0,r.jsx)(y.c,{...q}),(0,r.jsxs)(d.W,{open:z,onOpenChange:H,children:[(0,r.jsx)(d.W.Button,{id:x,trailingAction:c.TriangleDownIcon,size:"small","aria-label":"Copilot menu",className:"CopilotSplitButton-module__menuButton__qqKbX",children:(0,r.jsx)(r.Fragment,{})}),(0,r.jsx)(d.W.Overlay,{align:"end",onKeyDown:e=>{"Escape"===e.key&&(e?.stopPropagation(),H(!1))},children:(0,r.jsxs)(f.l,{children:[(0,r.jsx)(f.l.Item,{onSelect:W,children:"Explain"}),(0,r.jsx)(f.l.Item,{onSelect:Y,children:"Suggest improvements"}),B&&(0,r.jsx)(f.l.Item,{onSelect:V,children:"New agent session"}),!p.W.copilotRedirectSnippetToImmersive&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.l.Divider,{}),(0,r.jsx)(f.l.Item,{onSelect:X,children:"Attach to current thread"})]})]})})]})]}),"newTask"===P&&(0,r.jsxs)(u.A,{children:[(0,r.jsx)(y.c,{...q}),(0,r.jsx)(h.V,{isIconButton:!0,icon:c.TriangleDownIcon,size:"small",label:"Copilot menu",eventType:"new_agent_task_button_codeview_line_selection",currentReference:D,currentRepo:M,hideRepoSelector:!0,open:!0,onClose:()=>U("actionMenu"),setContentOpen:e=>{e||U("actionMenu")}})]})]}):null,k[20]=O,k[21]=q,k[22]=D,k[23]=M,k[24]=X,k[25]=K,k[26]=W,k[27]=Y,k[28]=I,k[29]=T,k[30]=A.type,k[31]=z,k[32]=B,k[33]=P,k[34]=$):$=k[34],$}w.displayName="CopilotCodeLinesMenu";let C=(e,t)=>{(0,v.Oc)(e,!1,t),(0,v.qR)({intent:b.wh.conversation,id:t,attachThread:!0})},L=(e,t,n)=>{t?((0,v.Oc)(e,!0,n),(0,v.qR)({intent:b.wh.conversation,id:n})):(0,v.qR)({intent:b.wh.conversation,references:[e],id:n})};function _(e){return"file"===e&&p.W.copilotRedirectFileViewToImmersive||"snippet"===e&&p.W.copilotRedirectSnippetToImmersive?"immersive":"assistive"}function N(e,t){(0,a.BI)("dotcom_chat.activate",{target:e,mode:t})}},99637(e,t,n){n.d(t,{D:()=>r});function r(e){let t;if("clipboard"in navigator)return navigator.clipboard.writeText(e);let n=document.body;if(!n)return Promise.reject(Error());let r=((t=document.createElement("pre")).style.width="1px",t.style.height="1px",t.style.position="fixed",t.style.top="5px",t.textContent=e,t);return n.appendChild(r),!function(e){if("clipboard"in navigator)return navigator.clipboard.writeText(e.textContent||"");let t=getSelection();if(null==t)return Promise.reject(Error());t.removeAllRanges();let n=document.createRange();n.selectNodeContents(e),t.addRange(n),document.execCommand("copy"),t.removeAllRanges(),Promise.resolve()}(r),n.removeChild(r),Promise.resolve()}},32442(e,t,n){n.d(t,{V:()=>m});var r=n(74848),l=n(16522),i=n(96540),o=n(38621),s=n(26108),a=n(21373),c=n(7478),u=n(26707),d=n(19519);let f=(0,i.lazy)(()=>Promise.all([n.e("59299"),n.e("83465"),n.e("90225"),n.e("76015"),n.e("98131"),n.e("7463"),n.e("15272"),n.e("41013"),n.e("79039"),n.e("62094"),n.e("46903"),n.e("37119"),n.e("93741"),n.e("58348"),n.e("46287"),n.e("59852"),n.e("3624"),n.e("66231"),n.e("36600"),n.e("33684"),n.e("18222"),n.e("96755"),n.e("6478"),n.e("62874"),n.e("44880"),n.e("9991"),n.e("1347"),n.e("50304"),n.e("94045"),n.e("75674"),n.e("15117"),n.e("5401"),n.e("74193"),n.e("84964"),n.e("45861"),n.e("65365")]).then(n.bind(n,74659)).then(e=>({default:e.NewAgentTaskButtonContent})));function m(e){let t,n,c,m,p,g=(0,l.c)(25),{isIconButton:v,icon:b,label:y,onOpen:x,onClose:w,setContentOpen:C,open:L,currentRepo:_,currentReference:N,hideRepoSelector:S,eventType:j,size:E,tooltipDirection:R,variant:$}=e,k=void 0===b?o.AgentIcon:b,O=void 0===y?"New agent session":y,[A,I]=(0,i.useState)(!!L),{isServer:T}=(0,d.V)(),B=(0,i.useRef)(null);g[0]!==x?(t=()=>{I(!0),x?.()},g[0]=x,g[1]=t):t=g[1];let M=t;g[2]!==w||g[3]!==C?(n=()=>{I(!1),w?.(),C?.(!1)},g[2]=w,g[3]=C,g[4]=n):n=g[4];let D=n,z=_?`${O} in ${_.ownerLogin}/${_.name}`:O;return g[5]!==M||g[6]!==k||g[7]!==v||g[8]!==O||g[9]!==E||g[10]!==R||g[11]!==$?(c=v?(0,r.jsx)(s.K,{ref:B,icon:k,"aria-label":O,size:E,tooltipDirection:R,variant:$,onClick:M}):(0,r.jsx)(a.Q,{ref:B,onClick:M,leadingVisual:k,size:E,children:O}),g[5]=M,g[6]=k,g[7]=v,g[8]=O,g[9]=E,g[10]=R,g[11]=$,g[12]=c):c=g[12],g[13]!==N||g[14]!==_||g[15]!==z||g[16]!==j||g[17]!==D||g[18]!==S||g[19]!==A||g[20]!==T?(m=A&&!T&&(0,r.jsx)(u.l,{title:z,onClose:D,returnFocusRef:B,position:{narrow:"fullscreen"},children:(0,r.jsx)(u.l.Body,{className:"p-0",children:(0,r.jsx)(i.Suspense,{fallback:(0,r.jsx)(h,{}),children:(0,r.jsx)(f,{currentRepo:_,currentReference:N,hideRepoSelector:S,setOpen:D,eventType:j})})})}),g[13]=N,g[14]=_,g[15]=z,g[16]=j,g[17]=D,g[18]=S,g[19]=A,g[20]=T,g[21]=m):m=g[21],g[22]!==c||g[23]!==m?(p=(0,r.jsxs)(r.Fragment,{children:[c,m]}),g[22]=c,g[23]=m,g[24]=p):p=g[24],p}function h(){let e,t=(0,l.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"d-flex flex-column flex-items-center tmp-p-6",children:(0,r.jsx)(c.A,{srText:"Loading\u2026"})}),t[0]=e):e=t[0],e}f.displayName="LazyNewAgentTaskButtonContent",m.displayName="NewAgentTaskButton",h.displayName="FallbackContent"},13589(e,t,n){n.d(t,{Es:()=>o,Lj:()=>l,yy:()=>i});class r{#e=new Set;subscribe(e){return this.#e.add(e),()=>{this.#e.delete(e)}}notify(e){for(let t of this.#e)t(e)}}class l extends r{#t;constructor(e){super(),this.#t=e}get value(){return this.#t}set value(e){var t,n;t=this.#t,("object"==typeof(n=e)&&n&&"object"==typeof t&&t?function(e,t){for(let n of new Set(Object.keys(e).concat(Object.keys(t))))if(!Object.is(e[n],t[n]))return!0;return!1}(t,n):!Object.is(t,n))&&(this.#t=e,this.notify(e))}setValue(e){this.value=e}}class i extends r{#t;#n=new Map;constructor(...e){super(),this.#t=new Set(...e)}get value(){return this.#t}has(e){if(!this.#n.has(e)){let t=new l(this.#t.has(e));this.#n.set(e,t)}return this.#n.get(e)}add(e){this.#t.has(e)||(this.#t.add(e),this.#n.has(e)&&(this.#n.get(e).value=!0),this.notify(this.#t))}delete(e){this.#t.has(e)&&(this.#t.delete(e),this.#n.has(e)&&(this.#n.get(e).value=!1),this.notify(this.#t))}clear(){if(0!==this.#t.size){for(let e of(this.#t.clear(),this.#n.values()))e.value=!1;this.notify(this.#t)}}}class o extends r{#t;#r=new Map;#l=new Map;constructor(...e){super(),this.#t=new Map(...e)}get value(){return this.#t}has(e){if(!this.#r.has(e)){let t=new l(this.#t.has(e));this.#r.set(e,t)}return this.#r.get(e)}get(e){if(!this.#l.has(e)){let t=new l(this.#t.get(e));this.#l.set(e,t)}return this.#l.get(e)}set(e,t){this.#t.get(e)!==t&&(this.#t.set(e,t),this.#r.has(e)&&(this.#r.get(e).value=!0),this.#l.has(e)&&(this.#l.get(e).value=t),this.notify(this.#t))}delete(e){this.#t.has(e)&&(this.#t.delete(e),this.#r.has(e)&&(this.#r.get(e).value=!1),this.#l.has(e)&&(this.#l.get(e).value=void 0),this.notify(this.#t))}clear(){if(0!==this.#t.size){for(let e of(this.#t.clear(),this.#r.values()))e.value=!1;for(let e of this.#l.values())e.value=void 0;this.notify(this.#t)}}}},53181(e,t,n){n.d(t,{$$:()=>d,Al:()=>f,Aw:()=>a,D:()=>c,LH:()=>i,Lo:()=>u,NG:()=>l,RS:()=>s,af:()=>m,k7:()=>h,kD:()=>p,m2:()=>o,xG:()=>g});var r=n(95424);function l({category:e,publisher:t,task:n}={}){if(!e&&!n&&!t)return"/marketplace/models/catalog";let i=new URLSearchParams;return i.append("type","models"),e&&i.append("category",e),n&&i.append("task",(0,r.y9)(n)),t&&i.append("publisher",t),`/marketplace?${i.toString()}`}let i=({registry:e,name:t})=>`/marketplace/models/${e}/${t}`,o=e=>`${i(e)}/playground`,s=()=>"/marketplace/models",a=e=>`${(({registry:e,name:t})=>`/models/${e}/${t}`)(e)}/feedback`;function c({commit:e,filePath:t,repoOwner:n,repoName:r,beginLine:l,endLine:o,...s}){let a=new URLSearchParams;if(e&&a.set("c",e),t&&a.set("path",t),n&&a.set("l",n),r&&a.set("n",r),null!=l&&null!=o){let e="";e=l===o?`${Math.max(l-10,0)}-${o+10}`:`${l}-${o}`,a.set("lines",e)}let u=`${i(s)}/prompt`,d=a.toString();return d.length<1?u:`${u}?${d}`}let u=({org:e})=>`/organizations/${e}/settings/models/billing`,d=({owner:e,repo:t})=>`/${e}/${t}/settings/models/access-policy`;function f({repo:e,action:t,allModels:n=!1}){let l=["",e.ownerLogin,e.name,"models"];t&&l.push(t);let i=new URLSearchParams;n&&i.set("all_models","true");let o=i.toString(),s=l.map(r.QU).join("/");return o.length<1?s:`${s}?${o}`}function m({repo:e,commitish:t,action:n,path:l}){let i=["",e.ownerLogin,e.name,"models","prompt",n];return t&&i.push(t),l&&"/"!==l&&i.push(l),i.map(r.QU).join("/")}let h=e=>`${f({repo:e})}/prompt/new`,p=(e,t)=>"isCustom"in t&&t.isCustom?`${f({repo:e})}/${t.registry}/${t.publisher}/${t.name}/playground`:`${f({repo:e})}/${t.registry}/${t.name}/playground`,g=(e,t,n)=>n?`/enterprises/${n}/settings/models`:e&&""!==t.trim()?`/organizations/${t}/settings/models/access-policy`:"/settings/models"},13865(e,t,n){n.d(t,{AI:()=>o,HN:()=>d,R:()=>a,Rs:()=>u,Sk:()=>h,XG:()=>s,tQ:()=>f});var r=n(16522),l=n(96540),i=n(13589);function o(e){let t,n=(0,r.c)(2);n[0]!==e?(t=()=>new i.Lj(e),n[0]=e,n[1]=t):t=n[1];let[o]=(0,l.useState)(t);return o}function s(e){let t,n,o=(0,r.c)(4),s=(0,l.useRef)(null);if(null===s.current){let t;o[0]!==e?(t=new i.Lj(e),o[0]=e,o[1]=t):t=o[1],s.current=t}o[2]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{null!==s.current&&(s.current.value=e)},o[2]=t):t=o[2];let a=t;return o[3]===Symbol.for("react.memo_cache_sentinel")?(n=[s,a],o[3]=n):n=o[3],n}function a(...e){let t,n=(0,r.c)(2);n[0]!==e?(t=()=>new i.Es(...e),n[0]=e,n[1]=t):t=n[1];let[o]=(0,l.useState)(t);return o}let c=Symbol("no value");function u(e,t){let n,i,o=(0,r.c)(5),s=(0,l.useRef)(e.value),a=(0,l.useEffectEvent)(t);o[0]!==a||o[1]!==e?(n=()=>(s.current!==c&&s.current!==e.value&&(a(e.value),s.current=c),e.subscribe(e=>a(e))),o[0]=a,o[1]=e,o[2]=n):n=o[2],o[3]!==e?(i=[e],o[3]=e,o[4]=i):i=o[4],(0,l.useEffect)(n,i)}function d(e){let t,n=(0,r.c)(1),[i,o]=(0,l.useState)(e.value);return n[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>o(e),n[0]=t):t=n[0],u(e,t),i}function f(e){let t,n=(0,r.c)(2),[i,o]=(0,l.useState)(e.value),[,s]=(0,l.useReducer)(m,0);return n[0]!==s?(t=e=>{o(e),s()},n[0]=s,n[1]=t):t=n[1],u(e,t),i}function m(e){return e+1}function h(e,t){let n=o(t(e.value));return u(e,e=>{n.value=t(e)}),n}},44241(e,t,n){n.d(t,{D7:()=>l,MQ:()=>r,gE:()=>i});let r=e=>{if(e){if(e.startsWith("refs/tags/"))return"tag";if(e.startsWith("refs/heads/"))return"branch"}},l=(e,t)=>"branch"===t?`refs/heads/${e}`:"tag"===t?`refs/tags/${e}`:e,i=e=>{if(!e)return;if(!r(e))return e;let[,,...t]=e.split("/");return t.join("/")}},5063(e,t,n){n.d(t,{M:()=>i});let r=(e,t)=>e[({start:0,end:1,cssClass:2})[t]],l=e=>Array.isArray(e)?{s:r(e,"start"),e:r(e,"end"),c:r(e,"cssClass")}:e,i=e=>0===e.length?[]:Array.isArray(e[0])?e.map(l):e},35228(e,t,n){n.d(t,{W:()=>u});var r=n(16522),l=n(39879),i=n(5063),o=n(41230);function s(e,t,n,r,l,i,o){let s=t.substring(n,r);return{c:e,s:n,e:r,text:"plain"!==o?function(e,t,n){let r=[];for(let l of e)if(" "===l){let e=t-n.value%t;r.push(Array(e).fill(" ").join("")),n.value+=e}else r.push(l),n.value+=Array.from(l).length;return r.join("")}(s,i,l):s}}function a(e){return e.replace(/[&<>"']/g,c)}function c(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"'":return"'";default:return e}}function u(e,t,n,c,u,d){let f,m=(0,r.c)(7),h=void 0===c?"plain":c;if(m[0]!==t||m[1]!==d||m[2]!==e||m[3]!==n||m[4]!==h||m[5]!==u){var p;let r,c;f=e??(p=n,r=function(e,t,n,r){let l={value:0},i={nodes:[],s:0,e:e.length,c:""},o=t?.filter(e=>e.e>e.s);if(!o||0===o.length)return i.nodes.push(s("",e,0,e.length,l,r,n)),i;let a=[i];for(let t=0;td.s){let t=s("",e,d.s,c.s,l,r,n);d.nodes.push(t)}else if(f&&c.s>f.e){let t=s("",e,f.e,c.s,l,r,n);d.nodes.push(t)}if(u&&u.s=d.e){let t=c.e;if(d.e>t){let i=s("",e,t,d.e,l,r,n);d.nodes.push(i),t=d.e}for(;a.length>1&&u.s>=d.e;)if(a.pop(),d=a[a.length-1]??i,a.length>1&&u.s>=d.e&&d.e>t){let i=s("",e,t,d.e,l,r,n);t=d.e,d.nodes.push(i)}}}for(;a.length>0;){let t=a.pop(),i=t.nodes[t.nodes.length-1];if(i&&i.e`),t.nodes))"nodes"in s?e(s,n,r,i):i.push(function e(t,n,r){switch(n){case"data-attribute":{let i=a(t.text);if(r&&(0,l.Y)(i)){let r=(0,l.t6)(i).map(r=>{let i=(0,l._n)(r);return i?(0,l.rE)(i):e({...t,text:r,c:""},n,!1)});return t.c?`${r.join("")}`:r.join("")}return t.c?``:``}case"separated-characters-chunked":case"separated-characters":{if(t.text&&!t.text.trim())return e({...t},"data-attribute",r);let i=[...t.text];"separated-characters-chunked"!==n||r||(i=t.text.match(/.{1,2}/g)??i);let o=[...i].map(e=>{let t=r?(0,l._n)(e):void 0;return t?(0,l.rE)(t):``}).join("");return t.c?`${o}`:o}default:{let e=a(t.text),n=r?(0,o.Gx)(e)??e:e;return t.c?`${n}`:n}}}(s,n,r));t.c&&i.push("")}(r,h,d,c=[]),c.join("")),m[0]=t,m[1]=d,m[2]=e,m[3]=n,m[4]=h,m[5]=u,m[6]=f}else f=m[6];return f}},76849(e,t,n){n.d(t,{Y:()=>l});var r=n(96540);function l(){return(0,r.useSyncExternalStore)(s,i,o)}function i(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function o(){return!1}function s(){return()=>{}}}}]); //# sourceMappingURL=26497-0218f0d73e1fb641-25284d040ae1c0ab.js.map