티스토리 수익 글 보기
“use strict”;(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[81565],{6873:(e,t,a)=>{a.r(t),a.d(t,{FileResultRow:()=>O,default:()=>S});var n=a(74848),r=a(31078),l=a(53552),i=a(6665),o=a(19189),s=a(78314),c=a(65787),d=a(25407),u=a(66108),m=a(39467),h=a(96459),f=a(97068),p=a(38621),y=a(45800),g=a(72511),x=a(5524),v=a(84268),w=a(31604),R=a(69726),b=a(12683),F=a(10095),_=a(91385),C=a(96540),N=a(7808),T=a(64642),I=a(76492),j=a(54030),k=a(34164);let E={excludeDirectories:!1,excludeSeeAllResults:!1};function S({actionListClassName:e,additionalResults:t,commitOid:a,config:u=E,findFileWorkerPath:p,getItemUrl:R,onRenderRow:F,onItemSelected:_,searchBoxRef:S,className:O,sx:L}){var P;let B,{excludeDirectories:D,excludeSeeAllResults:V}=u,{query:G,setQuery:W}=(0,r.JS)(),z=(0,s.t)(),M=C.useRef(null),H=S??M,[U,K]=C.useState(G.length>0),[q,Z]=C.useState(!!G),{list:X,directories:Y,loading:J,error:Q}=(0,j.o)(a,U,!!D),{path:ee}=(0,l.eu)(),{getUrl:et}=(0,o.Z)(),{queryText:ea,queryLine:en}=(B=(P=(P=G).replaceAll(” “,””)).indexOf(“:”))>=0?{queryText:P.substring(0,B),queryLine:parseInt(P.substring(B+1),10)}:{queryText:P,queryLine:void 0},{matches:er,clearMatches:el}=function(e,t,a,n){let[r,l]=C.useState(),o=C.useRef(“”),s=C.useRef(null),{sendStats:c}=(0,i.T)(),d=C.useRef(!1),u=C.useCallback(()=>{let e=new N.z(a,T.j);e.onmessage=({data:e})=>{d.current=!1,l(e.list),o.current=e.query,e.startTime&&c(“repository.find-file”,{“find-file-base-count”:e.baseCount,”find-file-results-count”:e.list.length,”find-file-duration-ms”:performance.now()-e.startTime})},s.current=e},[c,a]);return C.useEffect(()=>{if(n)return u(),function(){s.current?.terminate()}},[u,n]),C.useEffect(()=>{if(e.length&&t){d.current&&(s.current?.terminate(),u());let a=o.current&&t.startsWith(o.current);d.current=!0,s.current?.postMessage({baseList:a&&r||e,query:t,startTime:performance.now()})}},[e,t,u]),{matches:r,clearMatches:()=>l(void 0)}}((0,C.useMemo)(()=>[…X,…t??[]].sort(),[t,X]),ea,p,U),{sendRepoClickEvent:ei}=(0,i.T)(),eo=(0,h.Z)(),[es,ec]=C.useState(0),[ed,eu]=C.useState(()=>(0,I.q)()),em=C.useRef(null),eh=C.useRef(null),ef=”file-results-list”,{sendRepoKeyDownEvent:ep}=(0,i.T)(),{screenSize:ey}=(0,m.lm)(),eg=u.enableOverlay??ey>=m.Gy.large,ex=C.useCallback(e=>{ei(“FILE_TREE.SEARCH_RESULT_CLICK”),_?.(e),Z(!1)},[ei,_]),ev=(e,t,a)=>R?R(e,t,a):et({path:e,action:t?”tree”:”blob”,hash:a}),{containerRef:ew}=(0,y.G)({bindKeys:f.z0.ArrowVertical|f.z0.HomeAndEnd,focusInStrategy:”previous”},[J,Q]);C.useEffect(()=>{G||Z(!1)},[G]),C.useEffect(()=>{document.activeElement!==H.current&&eg&&Z(!1)},[ee,H,eg]);let eR=er?.slice(0,40)||[],eb=er&&er.length>eR.length,eF=(0,n.jsx)(“div”,{className:(0,k.$)(“FileResultsList-module__Box–vA4S3”,{“FileResultsList-module__OverlayEnabled–TR58f”:eg}),children:Q?(0,n.jsx)(g.A,{variant:”danger”,className:”m-3″,children:”Failed to search”}):(0,n.jsxs)(x.l,{ref:ew,className:(0,k.$)(e,”FileResultsList-module__ActionList–_Vf2k”,{“FileResultsList-module__ActionList_Overlay–_kFTy”:eg}),role:”listbox”,children:[!J&&eR.map((e,t)=>{let a=Y.includes(e),r=ev(e,a,en?`L${en}`:””);return(0,n.jsx)($,{active:e===ee,index:t,focused:ed&&es===t,match:e,onRender:F,query:ea,onClick:ex,isDirectory:a,to:r,useOverlay:eg,listRef:ew},e)}),(0,n.jsxs)(“div”,{className:”m-3 text-center”,children:[(0,n.jsx)(A,{loading:J||!er,visibleResultCount:eR.length,truncated:!!eb}),eb&&!V&&(0,n.jsxs)(n.Fragment,{children:[“\xa0″,(0,n.jsx)(v.A,{id:”see-all-results-link”,className:(0,k.$)(“focus-visible”,{“FileResultsList-module__PrimerLink–vMxOi”:ed&&es===eR.length}),ref:em,href:(0,d.Y8Y)({owner:z.ownerLogin,repo:z.name,searchTerm:`path:${ea}`}),children:”See all results”})]})]})]})});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(b.az,{ref:eh,sx:L,className:O,children:(0,n.jsx)(I.Z,{ariaActiveDescendant:(!eg&&G||eg&&q)&&ed&&es>-1?eb&&es===eR.length?”see-all-results-link”:`file-result-${es}`:void 0,ariaExpanded:eg?q:void 0,ariaHasPopup:eg,ariaControls:eg?ef:void 0,ref:H,query:G,onKeyDown:e=>{let{key:t,shiftKey:a,metaKey:n,altKey:r,ctrlKey:l}=e;if(!a&&!n&&!r){if(“Escape”===t)G?(ep(“FILE_TREE.CANCEL_SEARCH”),W(“”),el()):document.activeElement&&document.activeElement.blur();else if(!G)return;else if(“Enter”===t){if(!V&&eb&&es===eR.length)eo((0,d.Y8Y)({owner:z.ownerLogin,repo:z.name,searchTerm:`path:${ea}`})),_?.();else if(eR[es]){let e=eR[es];eo(ev(eR[es],!1,en?`L${en}`:””)),Z(!1),_?.(e)}}else if(“ArrowDown”===t||l&&”n”===t){if(!V&&eb&&es>=eR.length-1){if(ec(eR.length),em.current&&ew.current){let e=(0,c.U)(ew.current);(0,f.Rt)(em.current,e,{behavior:”instant”})}}else ec(Math.min(es+1,eR.length-1));e.preventDefault();return}else if(“ArrowUp”===t||l&&”p”===t){ec(Math.max(es-1,0)),e.preventDefault();return}}},onPreload:()=>K(!0),onSearch:e=>{W(e),e?Z(!0):(el(),Z(!1)),ec(0)},onBlur:e=>{ew.current?.contains(e.relatedTarget)||(Z(!1),eu(!1))},onFocus:()=>{G&&Z(!0),eu(!0)},className:”FileResultsList-module__FilesSearchBox–fSAh3″})}),eg&&(0,n.jsx)(w.T,{anchorRef:eh,open:eg&&q,renderAnchor:null,onClose:()=>{Z(!1)},focusZoneSettings:{disabled:!0},focusTrapSettings:{disabled:!0},width:”xlarge”,align:”end”,overlayProps:{id:ef,role:”dialog”},children:eF}),!eg&&G&&eF]})}function A({visibleResultCount:e,truncated:t,loading:a}){return(0,n.jsx)(“span”,{role:”status”,className:a||t||0===e?void 0:”sr-only”,”aria-label”:a?”Loading”:void 0,children:a?(0,n.jsx)(R.A,{size:”large”}):0===e?”No matches found”:t?`First ${e} files shown.`:`Showing ${e} files.`},”results-count-status”)}let O=({active:e,focused:t,index:a,match:r,query:l,to:i,isDirectory:o,onClick:s,onRender:d,useOverlay:m,listRef:h})=>{let p=(0,_.Xq)(l,r);d?.();let y=C.useRef(null);C.useEffect(()=>{if(t&&y.current&&h?.current){let e=(0,c.U)(h.current);(0,f.Rt)(y.current,e,{behavior:”instant”})}},[t,h]);let g=(0,C.useCallback)(()=>{s?.(r)},[r,s]);return(0,n.jsx)(x.l.Item,{role:”group”,active:e,className:(0,k.$)(t?”FileResultsList-module__ActionList_ItemFocused–lCTMd”:void 0),children:(0,n.jsxs)(u.N,{to:i,ref:y,role:”option”,onClick:g,id:`file-result-${a}`,tabIndex:m?-1:0,”data-focus-visible-added”:t||void 0,className:(0,k.$)(“d-flex”,”FileResultsList-module__ActionList_Item–DMdMo”),children:[(0,n.jsx)(“div”,{className:”d-flex flex-1 flex-column overflow-hidden”,children:(0,n.jsx)(B,{text:r,positionsList:p,LeadingIcon:o?L:P,className:”FileResultsList-module__HighlightMatch–Is2AV”})}),t&&(0,n.jsx)(“div”,{className:”sr-only”,children:`Go to ${o?”folder”:”file”}`})]})},r)},L=()=>(0,n.jsx)(F.A,{“aria-label”:”Directory”,icon:p.FileDirectoryFillIcon,size:”small”,className:”FileResultsList-module__Octicon–LtXx2″}),P=()=>(0,n.jsx)(F.A,{“aria-label”:”File”,icon:p.FileIcon,className:”fgColor-muted mr-2″,size:”small”}),$=C.memo(O);function B({text:e,positionsList:t,className:a,LeadingIcon:r}){let l=[],i=0;for(let a of t){if(Number(a)!==a||ae.length)continue;let t=e.slice(i,a);t&&l.push(D(t)),i=a+1,l.push((0,n.jsx)(“mark”,{className:”text-bold bgColor-transparent fgColor-default”,children:e[a]},a))}return l.push(D(e.slice(i))),(0,n.jsx)(“div”,{className:a,children:(0,n.jsxs)(n.Fragment,{children:[r&&(0,n.jsx)(r,{}),l]})})}function D(e){return e.replaceAll(“/”,”/\u200B”)}try{S.displayName||(S.displayName=”FileResultsList”)}catch{}try{A.displayName||(A.displayName=”FileResultsStatus”)}catch{}try{O.displayName||(O.displayName=”FileResultRow”)}catch{}try{L.displayName||(L.displayName=”DirectoryIcon”)}catch{}try{P.displayName||(P.displayName=”FileResultIcon”)}catch{}try{$.displayName||($.displayName=”MemoizedFileResultRow”)}catch{}try{B.displayName||(B.displayName=”HighlightMatch”)}catch{}},8624:(e,t,a)=>{a.d(t,{L:()=>s});var n=a(74848),r=a(16522),l=a(38621),i=a(26108),o=a(34164);a(96540);let s=e=>{let t,a,s,c=(0,r.c)(17),{ref:d,expanded:u,testid:m,ariaLabel:h,ariaControls:f,onToggleExpanded:p,alignment:y,dataHotkey:g,className:x,size:v,tooltipDirection:w,variant:R}=e,b=u?`collapse-${m}`:`expand-${m}`,F=u?”left”===y?l.SidebarExpandIcon:l.SidebarCollapseIcon:”left”===y?l.SidebarCollapseIcon:l.SidebarExpandIcon;c[0]!==p?(t=e=>{p(e)},c[0]=p,c[1]=t):t=c[1];let _=R??”invisible”;return c[2]!==x?(a=(0,o.$)(x,”fgColor-muted”),c[2]=x,c[3]=a):a=c[3],c[4]!==f||c[5]!==h||c[6]!==g||c[7]!==u||c[8]!==d||c[9]!==v||c[10]!==b||c[11]!==F||c[12]!==t||c[13]!==_||c[14]!==a||c[15]!==w?(s=(0,n.jsx)(i.K,{“aria-label”:h,tooltipDirection:w,ref:d,”data-testid”:b,”aria-expanded”:u,”aria-controls”:f,icon:F,”data-hotkey”:g,onClick:t,variant:_,size:v,className:a}),c[4]=f,c[5]=h,c[6]=g,c[7]=u,c[8]=d,c[9]=v,c[10]=b,c[11]=F,c[12]=t,c[13]=_,c[14]=a,c[15]=w,c[16]=s):s=c[16],s};s.displayName=”ExpandButton”},12748:(e,t,a)=>{a.d(t,{_:()=>r});var n=a(74848);function r({buttonFocusId:e,buttonHotkey:t,onButtonClick:a,buttonTestLabel:r,onlyAddHotkeyScopeButton:l}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(“button”,{hidden:!0,”data-testid”:r||””,”data-hotkey”:t,onClick:a,”data-hotkey-scope”:e}),!l&&(0,n.jsx)(“button”,{hidden:!0,”data-hotkey”:t,onClick:a})]})}try{r.displayName||(r.displayName=”DuplicateOnKeydownButton”)}catch{}},23451:(e,t,a)=>{a.d(t,{Z:()=>n});function n({appendQuery:e,retainScrollPosition:t,returnTarget:a}){window.dispatchEvent(new CustomEvent(“blackbird_monolith_append_and_focus_input”,{detail:{appendQuery:e,retainScrollPosition:t,returnTarget:a}}))}},29731:(e,t,a)=>{a.d(t,{G:()=>n});let n=e=>({})},31315:(e,t,a)=>{function n(e){return r(e)[0]}function r(e){let t=[];for(let a of function(){try{return document.cookie.split(“;”)}catch{return[]}}()){let[n,r]=a.trim().split(“=”);e===n&&void 0!==r&&t.push({key:n,value:r})}return t}function l(e,t,a=null,n=!1,r=”lax”){let i=document.domain;if(null==i)throw Error(“Unable to get document domain”);i.endsWith(“.github.com”)&&(i=”github.com”);let o=”https:”===location.protocol?”; secure”:””,s=a?`; expires=${a}`:””;!1===n&&(i=`.${i}`);try{document.cookie=`${e}=${t}; path=/; domain=${i}${s}${o}; samesite=${r}`}catch{}}function i(e,t=!1){let a=document.domain;if(null==a)throw Error(“Unable to get document domain”);a.endsWith(“.github.com”)&&(a=”github.com”);let n=new Date(Date.now()-1).toUTCString(),r=”https:”===location.protocol?”; secure”:””,l=`; expires=${n}`;!1===t&&(a=`.${a}`);try{document.cookie=`${e}=”; path=/; domain=${a}${l}${r}`}catch{}}a.d(t,{OR:()=>r,Ri:()=>n,TV:()=>l,Yj:()=>i})},46209:(e,t,a)=>{a.d(t,{Ak:()=>m,cD:()=>u,iK:()=>d});var n=a(74848),r=a(41617),l=a(35898),i=a(82075),o=a(39467),s=a(96540);let c=(0,i.A)(“localStorage”),d=(0,s.createContext)({openPanel:void 0,setOpenPanel:()=>void 0});function u({children:e,payload:t,openPanelRef:a}){let i=”blame”in t,u=(0,r.Hf)(t),m=(0,l.i)(),h=(0,s.useRef)(void 0),[f,p]=(0,s.useState)(()=>{let e=c.getItem(“codeNavOpen”);if(!m&&””!==e&&null!==e||m&&t.symbolsExpanded)return”codeNav”}),y=(i||u)&&”codeNav”===f?void 0:f;s.useEffect(()=>{a.current=y},[y,a]);let g=(0,s.useCallback)((e,t)=>{p(a=>(a&&h.current&&h.current.focus(),h.current=t,i||u&&”codeNav”===e?void 0:e))},[i,u]);!function(e){let{screenSize:t}=(0,o.lm)(),a=(0,s.useRef)(t);(0,s.useEffect)(()=>{let n=a.current>=o.Gy.large,r=a.current===t;t({openPanel:y,setOpenPanel:g}),[y,g]);return(0,n.jsx)(d,{value:x,children:e})}function m(){return(0,s.use)(d)}try{d.displayName||(d.displayName=”OpenPanelContext”)}catch{}try{u.displayName||(u.displayName=”OpenPanelProvider”)}catch{}},52475:(e,t,a)=>{a.d(t,{_S:()=>l,cB:()=>o,cW:()=>i});var n=a(53627),r=a(71315);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”};r.cg?.addEventListener(“hashchange”,()=>{(0,n.C3)({appId:o()})},!0)},64830:(e,t,a)=>{a.d(t,{T2:()=>c,cp:()=>f,ud:()=>y});var n=a(74848),r=a(16522),l=a(82075),i=a(96540);let o=(0,l.A)(“localStorage”),s=”codeView.codeFolding”,c=”codeView.codeWrapping”,d=”codeView.centerView”,u=”codeView.openSymbolsOnClick”,m=new Map([[s,”Show code folding buttons”],[c,”Wrap lines”],[d,”Center content”],[u,”Open symbols on click”]]),h=(0,i.createContext)({codeFoldingOption:{},codeWrappingOption:{},codeCenterOption:{},openSymbolsOption:{}}),f=e=>{let t,a,l=(0,r.c)(8),{children:i}=e,o=p(s,!0),m=p(c,!1),f=p(d,!1),y=p(u,!0);l[0]!==f||l[1]!==o||l[2]!==m||l[3]!==y?(t={codeFoldingOption:o,codeWrappingOption:m,codeCenterOption:f,openSymbolsOption:y},l[0]=f,l[1]=o,l[2]=m,l[3]=y,l[4]=t):t=l[4];let g=t;return l[5]!==i||l[6]!==g?(a=(0,n.jsx)(h,{value:g,children:i}),l[5]=i,l[6]=g,l[7]=a):a=l[7],a};function p(e,t){let a,n,l,s,c=(0,r.c)(11);c[0]!==e?(a=o.getItem(e),c[0]=e,c[1]=a):a=c[1];let d=a;c[2]!==t||c[3]!==d?(n=()=>d?”true”===d:t,c[2]=t,c[3]=d,c[4]=n):n=c[4];let[u,h]=(0,i.useState)(n);c[5]!==e?(l=m.get(e)||””,c[5]=e,c[6]=l):l=c[6];let f=l;return c[7]!==u||c[8]!==f||c[9]!==e?(s={name:e,enabled:u,setEnabled:h,label:f},c[7]=u,c[8]=f,c[9]=e,c[10]=s):s=c[10],s}function y(){return(0,i.use)(h)}try{h.displayName||(h.displayName=”CodeViewOptionsContext”)}catch{}try{f.displayName||(f.displayName=”CodeViewOptionsProvider”)}catch{}},76492:(e,t,a)=>{a.d(t,{Z:()=>m,q:()=>h});var n=a(74848),r=a(70170),l=a(37272),i=a(6665),o=a(71315),s=a(38621),c=a(12683),d=a(96540),u=a(34164);let m=({ref:e,ariaActiveDescendant:t,ariaControls:a,ariaExpanded:o,ariaHasPopup:m,onBlur:f,onFocus:p,onKeyDown:y,onPreload:g,onSearch:x,query:v,sx:w,className:R})=>{let{sendRepoClickEvent:b}=(0,i.T)(),[F,_]=d.useState(v),C=d.useRef((0,r.s)(e=>x(e),250));d.useEffect(()=>{_(v)},[v]);let N=v?(0,n.jsx)(c.ks.Action,{onClick:()=>{b(“FILE_TREE.CANCEL_SEARCH”),x(“”)},icon:s.XCircleFillIcon,”aria-label”:”Clear”,className:”fgColor-muted”}):void 0;return(0,n.jsx)(c.ks,{autoFocus:h(),ref:e,value:F,onKeyDown:y,onChange:e=>{_(e.target.value),g(),C.current(e.target.value)},sx:w,className:(0,u.$)(“d-flex”,R),”aria-label”:”Go to file”,”aria-activedescendant”:t,role:m?”combobox”:void 0,”aria-controls”:a,”aria-expanded”:o,”aria-haspopup”:m?”dialog”:void 0,autoCorrect:”off”,spellCheck:”false”,placeholder:”Go to file”,leadingVisual:s.SearchIcon,trailingAction:N,trailingVisual:N?void 0:()=>(0,n.jsx)(l.E,{children:(0,n.jsx)(“kbd”,{children:”t”})}),onFocus:e=>{g(),e.target.select(),p?.(e)},onBlur:f,onClick:()=>b(“FILE_TREE.SEARCH_BOX”)})};function h(){return”1″===new URLSearchParams(o.fV.search).get(“search”)}m.displayName=”FilesSearchBox”},82697:(e,t,a)=>{a.d(t,{Nq:()=>K,H:()=>y,c2:()=>eu,Uy:()=>q,qn:()=>ev});var n=a(74848),r=a(16522),l=a(12748),i=a(80780),o=a(8624),s=a(54571),c=a(38621),d=a(21373),u=a(34164),m=a(96540);let h=e=>{let t,a,m,h,p,y,g,x=(0,r.c)(33),{ref:v,expanded:w,onToggleExpanded:R,className:b,ariaControls:F,textAreaId:_,useFilesButtonBreakpoint:C,variant:N,getTooltipDirection:T}=e,I=void 0===C||C,{toggleTreeShortcut:j}=(0,i.wk)();x[0]===Symbol.for(“react.memo_cache_sentinel”)?(t=[],x[0]=t):t=x[0];let[k]=(0,s.I)(f,!0,t);x[1]!==w||x[2]!==T?(a=T?.(w)??”se”,x[1]=w,x[2]=T,x[3]=a):a=x[3];let E=a;x[4]!==w||x[5]!==k||x[6]!==R||x[7]!==v||x[8]!==j.hotkey||x[9]!==I||x[10]!==N?(m=I&&(!w||k)&&(0,n.jsx)(d.Q,{“aria-label”:”Expand file tree”,leadingVisual:c.ArrowLeftIcon,”data-hotkey”:j.hotkey,”data-testid”:”expand-file-tree-button-mobile”,ref:v,onClick:R,variant:N??”invisible”,className:”ExpandFileTreeButton-module__Button_1–g8F6Q”,children:”Files”}),x[4]=w,x[5]=k,x[6]=R,x[7]=v,x[8]=j.hotkey,x[9]=I,x[10]=N,x[11]=m):m=x[11];let S=j.hotkey,A=I&&(!w||k);x[12]!==b||x[13]!==A?(h=(0,u.$)(b,”position-relative”,”ExpandFileTreeButton-module__expandButton–oKI1R”,{“ExpandFileTreeButton-module__filesButtonBreakpoint–03FKA”:A}),x[12]=b,x[13]=A,x[14]=h):h=x[14];let O=w?”Collapse file tree”:”Expand file tree”;return x[15]!==F||x[16]!==w||x[17]!==R||x[18]!==v||x[19]!==h||x[20]!==O||x[21]!==j.hotkey||x[22]!==E||x[23]!==N?(p=(0,n.jsx)(o.L,{dataHotkey:S,className:h,expanded:w,alignment:”left”,ariaLabel:O,tooltipDirection:E,testid:”file-tree-button”,ariaControls:F,ref:v,variant:N,onToggleExpanded:R}),x[15]=F,x[16]=w,x[17]=R,x[18]=v,x[19]=h,x[20]=O,x[21]=j.hotkey,x[22]=E,x[23]=N,x[24]=p):p=x[24],x[25]!==R||x[26]!==_||x[27]!==j.hotkey?(y=(0,n.jsx)(l._,{buttonFocusId:_,buttonHotkey:j.hotkey,onButtonClick:R,onlyAddHotkeyScopeButton:!0}),x[25]=R,x[26]=_,x[27]=j.hotkey,x[28]=y):y=x[28],x[29]!==y||x[30]!==m||x[31]!==p?(g=(0,n.jsxs)(n.Fragment,{children:[m,p,y]}),x[29]=y,x[30]=m,x[31]=p,x[32]=g):g=x[32],g};function f(){return!1}h.displayName=”ExpandFileTreeButton”;var p=a(6665);function y(e){let t,a,o=(0,r.c)(8),{inputRef:s,onFindFilesShortcut:c,textAreaId:d}=e,{sendRepoKeyDownEvent:u}=(0,p.T)(),{findFilesShortcut:m}=(0,i.wk)();return o[0]!==s||o[1]!==c||o[2]!==u?(t=()=>{c?.(),s?.current?.focus(),u(“GO_TO_FILE”)},o[0]=s,o[1]=c,o[2]=u,o[3]=t):t=o[3],o[4]!==m.hotkey||o[5]!==t||o[6]!==d?(a=(0,n.jsx)(l._,{buttonFocusId:d,buttonHotkey:m.hotkey,onButtonClick:t}),o[4]=m.hotkey,o[5]=t,o[6]=d,o[7]=a):a=o[7],a}try{y.displayName||(y.displayName=”FindFilesShortcut”)}catch{}var g=a(6873),x=a(93753),v=a(31078),w=a(46209),R=a(19189),b=a(78314),F=a(53419),_=a(25407),C=a(66108),N=a(39467),T=a(64830),I=a(97068),j=a(73783),k=a(26108),E=a(87555),S=a(79080),A=a(10095),O=a(12683),L=a(27104);let P=(0,m.createContext)({knownFolders:new Map,dispatchKnownFolders:()=>{}});try{P.displayName||(P.displayName=”FileTreeContext”)}catch{}var $=a(96379);async function B(e){let t=await (0,$.lS)(`${e}?noancestors=1`);if(!t.ok)throw Error(`Failed to fetch tree data: ${t.status} ${t.statusText}`);let a=await t.json();return”codeViewTreeWithPathRoute”in a.payload?{tree:{items:a.payload.codeViewTreeWithPathRoute.tree.items,totalCount:a.payload.codeViewTreeWithPathRoute.tree.totalCount}}:”codeViewTreeRoute”in a.payload?{tree:{items:a.payload.codeViewTreeRoute.tree.items,totalCount:a.payload.codeViewTreeRoute.tree.totalCount}}:{tree:{items:a.payload.tree.items,totalCount:a.payload.tree.totalCount}}}let D=”ReposFileTreePane-module__HideTree–IyYTf”;var V=a(53552),G=a(25556),W=a(34535),z=a(96459),M=a(60569),H=a(69726);let U=(0,m.createContext)({});function K(e){let t,a,l,i,o,s=(0,r.c)(6),{children:c}=e,d=(0,m.useRef)(!1),u=(0,m.useRef)(!1),h=(0,m.useRef)(!0);s[0]===Symbol.for(“react.memo_cache_sentinel”)?(t=e=>{d.current=e},s[0]=t):t=s[0];let f=t;s[1]===Symbol.for(“react.memo_cache_sentinel”)?(a=e=>{u.current=e},s[1]=a):a=s[1];let p=a;s[2]===Symbol.for(“react.memo_cache_sentinel”)?(l=e=>{h.current=e},s[2]=l):l=s[2];let y=l;s[3]===Symbol.for(“react.memo_cache_sentinel”)?(i={expandAllFolders:d,refreshTree:u,shouldFetchFolders:h,setExpandAllFolders:f,setRefreshTree:p,setShouldFetchFolders:y},s[3]=i):i=s[3];let g=i;return s[4]!==c?(o=(0,n.jsx)(U,{value:g,children:c}),s[4]=c,s[5]=o):o=s[5],o}function q(){return(0,m.use)(U)}try{U.displayName||(U.displayName=”FileTreeControlContext”)}catch{}try{K.displayName||(K.displayName=”FileTreeControlProvider”)}catch{}var Z=a(52870);function X(e,t,a){let n=[];for(let r of t)if(r.startsWith(e)){let t=r.slice(e.length+1),l=t.indexOf(“/”),i=l>0?t.slice(0,l):t,o=`${e}/${i}`;if(a&&a.some(e=>e.path===o))continue;let s={items:[],data:{contentType:o===r?”file”:”directory”,name:i,path:o,isClientOnly:!0}};n.push(s)}return n}function Y(e,t,a){e.data.name=e.data.name.slice(e.data.name.lastIndexOf(“/”)+1,e.data.name.length);let n=t.name.slice(0,t.name.lastIndexOf(“/”)),r=n.indexOf(“/”)>-1,l={path:t.path.slice(0,t.path.lastIndexOf(“/”)),contentType:t.contentType,name:n,hasSimplifiedPath:r},i={items:[e],data:l};return(a.set(l.path,i),r)?Y(i,{…l},a):i}function J(e,t,a,n){if(!e)return{newRootItems:a,rootItemsUpdated:!1};let r=!!e[“”]&&Q(“”,t,a,e[“”].items);for(let r of(n?.(a),Object.keys(e).sort()))if(r){let a=t.get(r);a&&(Q(r,t,a.items,e[r].items,n),a.data.totalCount=e[r].totalCount)}return{newRootItems:a,rootItemsUpdated:r}}function Q(e,t,a,n,r){let l=!1;for(let i of n){let n=e?`${e}/${i.name}`:i.name;if(!t.get(n)){let e={items:[],data:{…i}};if(t.set(n,e),i.hasSimplifiedPath){let n=Y(e,i,t),o=a.findIndex(e=>e.data.path===n.data.path);-1!==o?n.items.length>a[o].items.length&&(a[o]=n,l=!0):(a.push(n),r?.(a))}else a.push(e),r?.(a)}}return l}function ee(e){let t,a,l,i,o,s,d,u,h,f,y,g,x=(0,r.c)(43),{isActive:v,file:w,onItemSelected:R,getItemUrl:b,selectedItemRef:F,navigate:_,onRenderRow:C,getFileTrailingVisual:N,getFileIcon:T}=e,{sendRepoClickEvent:I}=(0,p.T)(),j=m.useRef(null);x[0]===Symbol.for(“react.memo_cache_sentinel”)?(t={focusRowRef:j,mouseRowRef:j},x[0]=t):t=x[0];let k=(0,W.Z)(t),E=”submodule”===w.data.contentType;x[1]!==w.data||x[2]!==N?(a=N?.(w.data),x[1]=w.data,x[2]=N,x[3]=a):a=x[3];let S=a;x[4]!==w.data||x[5]!==b||x[6]!==v||x[7]!==E||x[8]!==_||x[9]!==R||x[10]!==I?(l=e=>{E?(e.preventDefault(),w.data.submoduleUrl&&(window.location.href=w.data.submoduleUrl)):e.metaKey||e.ctrlKey||1===e.button?(window.open(b(w.data),”_blank”),e.preventDefault()):v?e.preventDefault():(R?.(),I(“FILES_TREE.ITEM”,{item_path:w.data.path}),_(b(w.data)),e.stopPropagation())},x[4]=w.data,x[5]=b,x[6]=v,x[7]=E,x[8]=_,x[9]=R,x[10]=I,x[11]=l):l=x[11];let A=l;C?.();let O=`${w.data.path}-item`,L=v?void 0:”auto 2rem”;x[12]!==w.data||x[13]!==T||x[14]!==E?(i=T?T(w.data):E?(0,n.jsx)(c.FileSubmoduleIcon,{}):(0,n.jsx)(c.FileIcon,{}),x[12]=w.data,x[13]=T,x[14]=E,x[15]=i):i=x[15],x[16]!==i?(o=(0,n.jsx)(M.G.LeadingVisual,{children:i}),x[16]=i,x[17]=o):o=x[17];let P=E?”var(–fgColor-accent, var(–color-accent-fg))”:void 0;return x[18]!==P?(s={color:P},x[18]=P,x[19]=s):s=x[19],x[20]!==w.data.name||x[21]!==F||x[22]!==s?(d=(0,n.jsx)(“span”,{ref:F,style:s,children:w.data.name}),x[20]=w.data.name,x[21]=F,x[22]=s,x[23]=d):d=x[23],x[24]!==w.data.name||x[25]!==k?(u=k&&(0,n.jsx)(G.m,{“data-testid”:`${w.data.name}-item-tooltip`,id:`${w.data.name}-item-tooltip`,contentRef:j,”aria-label”:w.data.name,open:!0,direction:”ne”}),x[24]=w.data.name,x[25]=k,x[26]=u):u=x[26],x[27]!==d||x[28]!==u?(h=(0,n.jsxs)(n.Fragment,{children:[d,u]}),x[27]=d,x[28]=u,x[29]=h):h=x[29],x[30]!==S?(f=!!S?.screenReaderText&&(0,n.jsx)(“span”,{className:”sr-only”,children:S.screenReaderText}),x[30]=S,x[31]=f):f=x[31],x[32]!==S?(y=!!S?.trailingVisual&&(0,n.jsx)(M.G.TrailingVisual,{children:S.trailingVisual}),x[32]=S,x[33]=y):y=x[33],x[34]!==v||x[35]!==A||x[36]!==h||x[37]!==f||x[38]!==y||x[39]!==O||x[40]!==L||x[41]!==o?(g=(0,n.jsxs)(M.G.Item,{ref:j,onSelect:A,current:v,id:O,containIntrinsicSize:L,children:[o,h,f,y]}),x[34]=v,x[35]=A,x[36]=h,x[37]=f,x[38]=y,x[39]=O,x[40]=L,x[41]=o,x[42]=g):g=x[42],g}let et=m.memo(ee);function ea({clientOnlyFilePaths:e,directory:t,isActive:a,isAncestorOfActive:r,leadingPath:l=””,onItemSelected:i,dispatchKnownFolders:o,getItemUrl:s,getFetchUrl:c,selectedItemRef:d,navigate:u,onRenderRow:h,getFileTrailingVisual:f,getFileIcon:y,navigateOnClick:g=!0}){let{expandAllFolders:x,shouldFetchFolders:v}=q(),[w,R]=(0,m.useState)(x?.current||r),{sendRepoClickEvent:b}=(0,p.T)(),F=m.useRef(null),_=m.useRef(null),C=(0,W.Z)({focusRowRef:_,mouseRowRef:F}),[N,T,I,j,k,E,S]=function(e,t,a){let[n,r]=m.useState(e.items),[l,i]=m.useState(e.data.totalCount||0),[o,s]=m.useState(!1),[c,d]=m.useState(!1),{safeSetTimeout:u}=(0,Z.A)();m.useEffect(()=>{r(e.items)},[e.items]),m.useEffect(()=>{void 0!==e.data.totalCount&&i(e.data.totalCount)},[e.data.totalCount]);let h=m.useCallback(()=>{d(!1)},[]),f=m.useCallback((e,t)=>{let a=e||[…n];r(a.slice(0,100)),u(()=>{r(a),void 0!==t&&i(t)},1)},[n,u]);return[m.useCallback(async n=>{let l=new Map;if(e.data.isClientOnly){if(n){let a=X(e.data.path,n);for(let e of a)l.set(e.data.path,e);t({type:”add”,folders:l,processingTime:0}),a.length>100?f(a,a.length):(r(a),i(a.length))}}else{let o=a(e.data);d(!1),s(!0);let c=Date.now();try{let a=await B(o),s=a.tree.items.map(e=>{let t={items:[],data:{…e},autoExpand:”directory”===e.contentType&&1===a.tree.items.length};return(l.set(e.path,t),e.hasSimplifiedPath)?Y(t,e,l):t});if(n){let t=e.data.path,r=X(t,n,a.tree.items);for(let e of(s.push(…r),r))l.set(e.data.path,e)}t({type:”add”,folders:l,processingTime:Date.now()-c}),e.items=s,e.data.totalCount=a.tree.totalCount,s.length>100?f(s,a.tree.totalCount):(r(s),i(a.tree.totalCount))}catch{d(!0)}}s(!1)},[a,e,t,f]),f,n,o,c,h,l]}(t,o,c),A=S-I.length,O=l?`${l}/`:””;(0,m.useEffect)(()=>{x?.current&&!w&&R(!0)},[t,x,w]);let L=m.useCallback(n=>{x?.current&&(x.current=!1),n&&!w&&!j&&!k&&(t.items.length>100?T():0!==t.items.length||a||r||v?.current===!1||N(e)),n!==w&&R(n)},[x,w,j,k,t.items.length,a,r,v,T,N,e]),P=m.useCallback(e=>{e.metaKey||e.ctrlKey||1===e.button&&g?(window.open(s(t.data),”_blank”),e.preventDefault()):a?e.preventDefault():(i?.(),b(“FILES_TREE.ITEM”,{item_path:t.data.path}),g?u(s(t.data)):L?.(!w),e.stopPropagation())},[t.data,s,a,w,u,g,i,L,b]);m.useEffect(()=>{r&&!w&&L?.(!0)},[r]),m.useEffect(()=>{0===t.items.length&&w?L?.(!1):!w&&t.autoExpand&&L?.(!0)},[t.items.length]);let $=m.useCallback(e=>{d&&a&&d(e),F.current=e},[d,a]);return 1===t.items.length&&”directory”===t.items[0].data.contentType?(0,n.jsx)(el,{clientOnlyFilePaths:e,directoryItems:t.items,leadingPath:O+t.data.name,inheritsActive:a,dispatchKnownFolders:o,onItemSelected:i,selectedItemRef:d,getItemUrl:s,directoryNavigateOnClick:g,getFileTrailingVisual:f,getFileIcon:y}):(h?.(),(0,n.jsxs)(M.G.Item,{ref:_,expanded:w,onExpandedChange:L,current:a,onSelect:P,id:`${t.data.path}-item`,containIntrinsicSize:a?void 0:”auto 2rem”,children:[(0,n.jsx)(M.G.LeadingVisual,{children:(0,n.jsx)(M.G.DirectoryIcon,{})}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(“span”,{ref:$,children:[O,t.data.name]}),C&&(0,n.jsx)(G.m,{“data-testid”:`${t.data.name}-directory-item-tooltip`,id:`${t.data.name}-directory-item-tooltip`,contentRef:_,”aria-label”:`${O}${t.data.name}`,open:!0,direction:”ne”})]}),(0,n.jsx)(M.G.SubTree,{state:j?”loading”:k?”error”:”done”,children:k?(0,n.jsx)(M.G.ErrorDialog,{onRetry:N,onDismiss:E,children:”There was an error loading the folder contents.”}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(el,{clientOnlyFilePaths:e,directoryItems:I,dispatchKnownFolders:o,onItemSelected:i,selectedItemRef:d,getItemUrl:s,directoryNavigateOnClick:g,getFileTrailingVisual:f,getFileIcon:y}),A>0&&(0,n.jsx)(eo,{message:`${A} entries not shown`})]})})]}))}let en=m.memo(ea);function er({clientOnlyFilePaths:e,directoryItems:t,leadingPath:a,inheritsActive:r,onItemSelected:l,dispatchKnownFolders:i,selectedItemRef:o,onRenderRow:s,getItemUrl:c,getFileTrailingVisual:d,getFileIcon:u,directoryNavigateOnClick:h=!0}){let{path:f}=(0,V.eu)(),p=(0,R.Z)(),y=(0,z.Z)(),g=m.useRef(y);return(0,n.jsx)(n.Fragment,{children:t.map(t=>{let m=f===t.data.path,y=m||f.startsWith(`${t.data.path}/`);return”directory”===t.data.contentType?(0,n.jsx)(en,{clientOnlyFilePaths:e,isActive:r||m,isAncestorOfActive:y,onItemSelected:l,leadingPath:a,directory:t,dispatchKnownFolders:i,getItemUrl:c,getFetchUrl:p.getItemUrl,selectedItemRef:y?o:void 0,navigate:g.current,onRenderRow:s,navigateOnClick:h,getFileTrailingVisual:d,getFileIcon:u,itemCount:t.items.length},t.data.name):(0,n.jsx)(et,{onItemSelected:l,file:t,isActive:m,getItemUrl:c,selectedItemRef:m?o:void 0,navigate:g.current,onRenderRow:s,getFileTrailingVisual:d,getFileIcon:u},t.data.name)})})}let el=m.memo(er);function ei(e){let{clientOnlyFilePaths:t,data:a,rootItems:r,setRootItems:l,fetchError:i,incompleteFileTree:o,processingTime:s,loading:c,onRenderRow:d,getItemUrl:h,getFileTrailingVisual:f,getFileIcon:p,sortDirectoryItems:y}=e,{knownFolders:g,dispatchKnownFolders:x}=(0,m.use)(P),{refreshTree:v}=q();m.useEffect(()=>{if(c)return;let e=new Map,t=[];v?.current||(e=new Map(g),t=r.slice());let{newRootItems:n,rootItemsUpdated:i}=J(a,e,t,y);(n.length>r.length||i||v?.current)&&l(n),(e.size>g.size||v?.current)&&x({type:”set”,folders:e,processingTime:s}),v?.current&&(v.current=!1)},[a,c]);let w=m.useCallback(e=>{1===e.button&&e.preventDefault()},[]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(“div”,{onMouseDown:w,className:(0,u.$)(e.className,”ReposFileTreeView-module__Box–bDodO”),”data-testid”:”repos-file-tree-container”,children:c?(0,n.jsx)(“div”,{className:”ReposFileTreeView-module__Box_1–Q_A5H”,children:(0,n.jsx)(H.A,{“aria-label”:”Loading file tree”})}):(0,n.jsx)(“nav”,{“aria-label”:”File Tree Navigation”,children:(0,n.jsxs)(M.G,{“aria-label”:”Files”,children:[i&&(0,n.jsx)(eo,{message:”Some files could not be loaded.”}),o&&(0,n.jsx)(eo,{message:”Sign in to see the full file tree.”}),(0,n.jsx)(el,{clientOnlyFilePaths:t,directoryItems:r,onItemSelected:e.onItemSelected,dispatchKnownFolders:x,selectedItemRef:e.selectedItemRef,onRenderRow:d,directoryNavigateOnClick:e.directoryNavigateOnClick,getItemUrl:h,getFileTrailingVisual:f,getFileIcon:p})]})})})})}function eo(e){let t,a,l=(0,r.c)(3),{message:i}=e,o=i||”Couldn’t load.”;return l[0]===Symbol.for(“react.memo_cache_sentinel”)?(t=(0,n.jsx)(M.G.LeadingVisual,{children:(0,n.jsx)(A.A,{icon:c.AlertFillIcon,className:”ReposFileTreeView-module__Octicon–XcIsb”})}),l[0]=t):t=l[0],l[1]!==o?(a=(0,n.jsxs)(M.G.Item,{id:”error-tree-row”,children:[t,(0,n.jsx)(“div”,{className:”ReposFileTreeView-module__Box_2–bCLXn”,children:o})]}),l[1]=o,l[2]=a):a=l[2],a}try{ee.displayName||(ee.displayName=”WrappedFileTreeRow”)}catch{}try{et.displayName||(et.displayName=”FileTreeRow”)}catch{}try{ea.displayName||(ea.displayName=”WrappedDirectoryTreeRow”)}catch{}try{en.displayName||(en.displayName=”DirectoryTreeRow”)}catch{}try{er.displayName||(er.displayName=”WrappedDirectoryContents”)}catch{}try{el.displayName||(el.displayName=”DirectoryContents”)}catch{}try{ei.displayName||(ei.displayName=”ReposFileTreeView”)}catch{}try{eo.displayName||(eo.displayName=”ErrorTreeRow”)}catch{}var es=a(23451);function ec(e){let t,a,o,s,d,u=(0,r.c)(16),{sx:m,onClick:h,textAreaId:f}=e,{searchShortcut:p}=(0,i.wk)();return u[0]!==h?(t=e=>{h?.(),(0,es.Z)({retainScrollPosition:!0,returnTarget:e.target.closest(“button”)})},u[0]=h,u[1]=t):t=u[1],u[2]!==p.hotkey||u[3]!==m||u[4]!==t?(a=(0,n.jsx)(O.K0,{“aria-label”:”Search this repository”,tooltipDirection:”nw”,icon:c.SearchIcon,”data-hotkey”:p.hotkey,sx:m,size:”medium”,onClick:t,className:”SearchButton-module__IconButton–kxA3Q”}),u[2]=p.hotkey,u[3]=m,u[4]=t,u[5]=a):a=u[5],u[6]!==h||u[7]!==f?(o=()=>{let e=document.getElementById(f);h?.(),(0,es.Z)({retainScrollPosition:!0,returnTarget:e??void 0})},u[6]=h,u[7]=f,u[8]=o):o=u[8],u[9]!==p.hotkey||u[10]!==o||u[11]!==f?(s=(0,n.jsx)(l._,{buttonFocusId:f,buttonHotkey:p.hotkey,onButtonClick:o,onlyAddHotkeyScopeButton:!0}),u[9]=p.hotkey,u[10]=o,u[11]=f,u[12]=s):s=u[12],u[13]!==a||u[14]!==s?(d=(0,n.jsxs)(n.Fragment,{children:[a,s]}),u[13]=a,u[14]=s,u[15]=d):d=u[15],d}try{ec.displayName||(ec.displayName=”SearchButton”)}catch{}let ed=N.Gy.xxxlarge;function eu({clientOnlyFilePaths:e,collapseTree:t,showTree:a,fileTree:r,treeToggleElement:l,treeToggleRef:i,onItemSelected:o,processingTime:d,searchBoxRef:h,repo:f,path:p,refInfo:F,isFilePath:$,foldersToFetch:V,incompleteFileTree:G,id:W,onFindFilesShortcut:z,textAreaId:M,getItemUrlOverride:H,headerClassName:U,paneClassName:K,paneContentsClassName:q,treeContainerClassName:Z,findFileWorkerPath:X,headerContent:Y,getFileTrailingVisual:Q,getFileIcon:ee,sortDirectoryItems:et,showFindFile:ea=!0,directoryNavigateOnClick:en=!0,showRefSelectorRow:er=!0,paneResizable:el=!0}){if(ea&&void 0===X)throw Error(“findFileWorkerPath must be provided when showFindFile is true”);let{openPanel:eo}=(0,w.Ak)(),[es,eu]=m.useState(V.length>0),[ef,ep]=m.useState(!1),ey=m.useRef([]),eg=m.useRef(null),ex=m.useRef(!1),ev=m.useRef(!1),ew=m.useRef(null),{query:eR}=(0,v.JS)(),eb=m.useRef(eR);eb.current=eR;let{codeCenterOption:eF}=(0,T.ud)(),e_=m.useRef(eo),[eC]=(0,s.I)(()=>!1,!0,[]),{getItemUrl:eN}=(0,R.Z)(),eT=H||eN,{defaultBranch:eI}=(0,b.t)(),ej=[],ek=new Map,eE=m.useRef(es);!eE.current&&r&&(ej=J(r,ek,[],et).newRootItems),eE.current=!0;let[eS,eA]=m.useReducer(em,ek),[eO,eL]=m.useState(ej);m.useEffect(()=>{a&&(!eR||window.innerWidth>=N.Gy.large)||(ew.current=null)},[a,eR]),m.useEffect(()=>{eo&&e_.current!==eo&&window.innerWidth{let t=eN({contentType:”directory”,path:e,name:e});try{let a=await B(t),n={items:a.tree.items,totalCount:a.tree.totalCount};r[e]=n}catch{ep(!0)}ey.current.push(e),ey.current.length===V.length&&eu(!1)},[r,V.length,eN]);m.useEffect(()=>{if(G)eu(!1);else if(V&&!ex.current)for(let e of V)eP(e);ex.current=!0},[eP,V,G,eS.size]);let e$=m.useCallback(e=>{a&&(!eb.current||window.innerWidth>=N.Gy.large)&&eg.current&&e&&(0,I.Rt)(e,eg.current,{endMargin:window.innerHeight/2,startMargin:window.innerHeight/2,behavior:”auto”})},[a]),eB=m.useCallback(e=>{e&&ev.current?ev.current=!1:ew.current!==e&&e$(e),ew.current=e},[e$]),eD=m.useCallback(e=>{eg.current=e,window.innerWidth>=ed&&e$(ew.current)},[e$]),eV=m.useCallback(e=>{e&&e$(ew.current)},[e$]),{screenSize:eG}=(0,N.lm)(),eW=!eC&&(eo&&eG=N.Gy.large,ez=m.useCallback(()=>{eW||o(),ev.current=!0},[o,eW]),eM=$?p.substring(0,p.lastIndexOf(“/”)):p,eH=(0,m.useMemo)(()=>({knownFolders:eS,dispatchKnownFolders:eA}),[eS]),eU=m.useMemo(()=>eC?null:(0,L.KF)(),[eC]),eK=m.useCallback(()=>{window.innerWidth>N.Gy.large&&window.innerWidth0;return(0,F.BI)(“file-tree”,{“fetch-count”:a?t.folders.size-e.size:t.folders.size,”file-count”:t.folders.size,”nav-type”:a?”soft”:”hard”,”processing-time”:t.processingTime}),t.folders}case”add”:{let a=new Map([…e,…t.folders]);return(0,F.BI)(“file-tree”,{“fetch-count”:t.folders.size,”file-count”:a.size,”nav-type”:”fetch”,”processing-time”:t.processingTime}),a}default:throw Error(`Unknown action type: ${t.type}`)}}function eh({scrollingRef:e}){let[t,a]=m.useState(e.current&&e.current.scrollTop>0);return m.useEffect(()=>{if(e.current){let t=e.current,n=()=>{t&&t.scrollTop>0?a(!0):a(!1)};return t.addEventListener(“scroll”,n),()=>{t.removeEventListener(“scroll”,n)}}},[e]),t?(0,n.jsx)(“div”,{className:”ReposFileTreePane-module__Box_8–KVzCi”}):null}try{eu.displayName||(eu.displayName=”ReposFileTreePane”)}catch{}try{eh.displayName||(eh.displayName=”TreeBorder”)}catch{}var ef=a(76492),ep=a(31315),ey=a(35898),eg=a(71315),ex=a(81960);function ev(e,t,a,r,l,i=”fileTreeExpanded”,o){let{sendRepoClickEvent:s}=(0,p.T)(),c=(0,ey.i)(),d=i?(0,ep.Ri)(i):void 0,u=void 0===eg.XC,f=!c&&d&&”false”!==d.value||c&&a;void 0===f&&(f=!1);let y=(0,m.useRef)(null),g=(0,m.useRef)(null),{screenSize:x}=(0,N.lm)(),[v,w]=(0,m.useState)(f),R=(0,m.useRef)(f),b=(0,m.useRef)(!1),F=(0,m.useRef)(!1),_=(0,m.useCallback)(()=>!(t.current&&window.innerWidth>=ed||!t.current&&window.innerWidth>=N.Gy.xlarge),[t]);(0,m.useLayoutEffect)(()=>{let e=_();e||(b.current=!1),w((0,ef.q)()&&x{let e=!t.current&&window.innerWidth=N.Gy.xlarge;e&&R.current&&!(0,ef.q)()&&v&&w(!1),a&&R.current&&!v&&w(!0)},[t,x]),(0,m.useLayoutEffect)(()=>{let e=t.current&&window.innerWidth=ed;e&&R.current&&!(0,ef.q)()&&v&&w(!1),a&&R.current&&!v&&w(!0)},[t]);let C=(0,m.useCallback)(e=>{if(w(!0),_()&&(b.current=!0),e?.setPreference&&(l?.(!0),R.current=!0,i)){let e=new Date(Date.now()+2592e6).toUTCString();(0,ep.TV)(i,”true”,e)}e?.focus===”toggleButton”?requestAnimationFrame(()=>y.current?.focus()):e?.focus===”search”&&requestAnimationFrame(()=>g.current?.focus())},[i,2592e6,_,l]),T=(0,m.useCallback)(e=>{if(w(!1),b.current=!1,F.current=!0,e?.setPreference&&(l?.(!1),R.current=!1,i)){let e=new Date(Date.now()+2592e6).toUTCString();(0,ep.TV)(i,”false”,e)}e?.focus===”toggleButton”&&requestAnimationFrame(()=>y.current?.focus())},[i,2592e6,l]),I=(0,m.useCallback)(e=>e&&window.innerWidth>=ed||!t.current&&window.innerWidth>=N.Gy.xlarge,[t]),j=(0,m.useMemo)(()=>(0,n.jsx)(ex.A,{as:”h2″,className:”use-tree-pane-module__Heading–iI_ad”,children:(0,n.jsx)(h,{expanded:v,ariaControls:e,onToggleExpanded:()=>{s(v?”FILES_TREE.HIDE”:”FILES_TREE.SHOW”),v?T({focus:”toggleButton”,setPreference:I(t.current)}):C({focus:”toggleButton”,setPreference:I(t.current)})},className:void 0!==d||v||u?void 0:”react-tree-toggle-button-with-indicator”,ref:y,textAreaId:r,…o})}),[v,e,d,u,r,o,s,T,I,t,C]);return{isTreeExpanded:v,expandTree:C,collapseTree:T,treeToggleElement:j,treeToggleRef:y,searchBoxRef:g}}}}]);
//# sourceMappingURL=81565-117825acb2c8.js.map