forked from github/docs
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
app_assets_modules_react-shared_hooks_use-canonical-object_ts.js
134 lines (132 loc) · 70.4 KB
/
app_assets_modules_react-shared_hooks_use-canonical-object_ts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["app_assets_modules_react-shared_hooks_use-canonical-object_ts-ui_packages_code-view-shared_ho-e725dc"],{55822:(e,t,r)=>{r.d(t,{f:()=>i});var o=r(58081);function i(e){let t=(0,o.useRef)([]);for(let r of t.current)if(e===r||function e(t,r){if(t===r)return!0;if("object"!=typeof t||typeof t!=typeof r||!t||!r)return!1;if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let o=0;o<t.length;o++)if(!e(t[o],r[o]))return!1;return!0}let o=Object.keys(t),i=Object.keys(r);if(o.length!==i.length)return!1;for(let i of o)if(!e(t[i],r[i]))return!1;return!0}(r,e))return r;return t.current.unshift(e),t.current.length>5&&t.current.pop(),e}},29881:(e,t,r)=>{r.d(t,{bx:()=>s,ln:()=>l,tW:()=>c});var o=r(15631),i=r(20679);let n={cursorNavigationHopWordLeft:{hotkey:"Alt+ArrowLeft,Ctrl+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationHopWordRight:{hotkey:"Alt+ArrowRight,Ctrl+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationTopOfPage:{hotkey:"Meta+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationBottomOfPage:{hotkey:"Meta+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationEnd:{hotkey:"End,Meta+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["End"]},cursorNavigationHome:{hotkey:"Home,Meta+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["Home"]},cursorNavigationPageUp:{hotkey:"PageUp",useWhileBlobFocused:!0,noModifierHotkey:["PageUp"]},cursorNavigationPageDown:{hotkey:"PageDown",useWhileBlobFocused:!0,noModifierHotkey:["PageDown"]},cursorNavigationArrowDown:{hotkey:"ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"]},cursorNavigationArrowUp:{hotkey:"ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"]},cursorNavigationArrowLeft:{hotkey:"ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"]},cursorNavigationArrowRight:{hotkey:"ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"]},cursorNavigationShiftHopWordLeft:{hotkey:"Alt+Shift+ArrowLeft,Ctrl+Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationShiftHopWordRight:{hotkey:"Alt+Shift+ArrowRight,Ctrl+Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationShiftTopOfPage:{hotkey:"Meta+Shift+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationShiftBottomOfPage:{hotkey:"Meta+Shift+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationShiftEnd:{hotkey:"Shift+End,Meta+Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["End"],modifierRequired:!0},cursorNavigationShiftHome:{hotkey:"Shift+Home,Meta+Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["Home"],modifierRequired:!0},cursorNavigationShiftPageUp:{hotkey:"Shift+PageUp",useWhileBlobFocused:!0,noModifierHotkey:["PageUp"],modifierRequired:!0},cursorNavigationShiftPageDown:{hotkey:"Shift+PageDown",useWhileBlobFocused:!0,noModifierHotkey:["PageDown"],modifierRequired:!0},cursorNavigationShiftArrowDown:{hotkey:"Shift+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationShiftArrowUp:{hotkey:"Shift+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationShiftArrowLeft:{hotkey:"Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationShiftArrowRight:{hotkey:"Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationHighlightLine:{text:"J",hotkey:"Shift+J",useWhileBlobFocused:!0,noModifierHotkey:["J"],modifierRequired:!0},cursorNavigationGoLineUp:{hotkey:"Ctrl+p",useWhileBlobFocused:!0,noModifierHotkey:["p"],modifierRequired:!0},cursorNavigationOpenHelpDialog:{hotkey:"Alt+F1,Control+Alt+\u02D9,Control+Alt+h",useWhileBlobFocused:!0,noModifierHotkey:["F1","h","\u02D9"],modifierRequired:!0},cursorNavigationGoLineDown:{hotkey:"Ctrl+n",useWhileBlobFocused:!0,noModifierHotkey:["n"],modifierRequired:!0},cursorNavigationEnter:{text:"\u2318 Enter",hotkey:"Meta+Enter",useWhileBlobFocused:!0,noModifierHotkey:["Enter"],modifierRequired:!0},cursorNavigationSpace:{hotkey:" ",useWhileBlobFocused:!0,noModifierHotkey:[" "],modifierRequired:!1},cursorNavigationShiftSpace:{hotkey:"Shift+ ",useWhileBlobFocused:!0,noModifierHotkey:[" "],modifierRequired:!0},expandAndFocusLineContextMenu:{text:"Shift Alt C",hotkey:"Alt+Shift+C,Alt+Shift+\xc7",useWhileBlobFocused:!0,noModifierHotkey:["C"],modifierRequired:!0},copyFilePathShortcut:{text:"\u2318 shift .",hotkey:"Meta+Shift+>",useWhileBlobFocused:!0,noModifierHotkey:["."],modifierRequired:!0},copyPermalinkShortcut:{text:"\u2318 shift ,",hotkey:"Meta+Shift+<",useWhileBlobFocused:!0,noModifierHotkey:[","],modifierRequired:!0},copyRawContentShortcut:{text:"\u2318 shift c",hotkey:"Meta+Shift+C",useWhileBlobFocused:!0,noModifierHotkey:["c"],modifierRequired:!0},downloadRawContentShortcut:{text:"\u2318 shift s",hotkey:"Meta+Shift+S",useWhileBlobFocused:!0,noModifierHotkey:["s"],modifierRequired:!0},editFileShortcut:{hotkey:"e,Shift+E",useWhileBlobFocused:!0,noModifierHotkey:["e","E"]},goToLineShortcut:{text:"l",hotkey:"l,Shift+L",ariaKeyShortcuts:"l",useWhileBlobFocused:!0,noModifierHotkey:["l","L"]},alternativeGoToLineShortcut:{hotkey:"Mod+Alt+g",ariaKeyShortcuts:"Mod+Alt+g",useWhileBlobFocused:!0,noModifierHotkey:["g","G"]},findInFileShortcut:{hotkey:"Meta+f, F3",text:"\u2318 f",ariaKeyShortcuts:"Meta+F",useWhileBlobFocused:!0,noModifierHotkey:["f","F3"],modifierRequired:!0},findFilesShortcut:{hotkey:"t,Shift+T",useWhileBlobFocused:!0,noModifierHotkey:["t","T"]},findSelectionShortcut:{hotkey:"Meta+e",useWhileBlobFocused:!0,noModifierHotkey:["e"],modifierRequired:!0},findNextShortcut:{hotkey:"Mod+g"},findPrevShortcut:{hotkey:"Mod+Shift+G"},openWithGitHubDevShortcut:{hotkey:"., Meta+Shift+/",useWhileBlobFocused:!0,noModifierHotkey:["."]},openWithGitHubDevInNewWindowShortcut:{hotkey:"Shift+.,Shift+>,>",useWhileBlobFocused:!0,noModifierHotkey:[">"]},permalinkShortcut:{hotkey:"y,Shift+Y",useWhileBlobFocused:!0,noModifierHotkey:["y","Y"]},searchShortcut:{hotkey:"/",useWhileBlobFocused:!0,noModifierHotkey:["/"]},selectAllShortcut:{hotkey:"Meta+a",useWhileBlobFocused:!0,noModifierHotkey:["a"],modifierRequired:!0},selectEditTabShortcut:{hotkey:"Mod+Shift+P"},submitCommitDialogShortcut:{hotkey:"Mod+Enter"},refSelectorShortcut:{hotkey:"w",text:"w",useWhileBlobFocused:!0,noModifierHotkey:["w"]},escapeRightClickMenu:{hotkey:"Escape",useWhileBlobFocused:!0,noModifierHotkey:["Escape"]},toggleFocusedPaneShortcut:{hotkey:"Meta+F6,Meta+Shift+F6",useWhileBlobFocused:!0,noModifierHotkey:["F6"],modifierRequired:!0},toggleSymbolsShortcut:{hotkey:"Meta+i",useWhileBlobFocused:!0,noModifierHotkey:["i"],modifierRequired:!0},toggleTreeShortcut:{hotkey:"Meta+b",useWhileBlobFocused:!0,noModifierHotkey:["b"],modifierRequired:!0},viewBlameShortcut:{hotkey:"b,Shift+B,Meta+/ Meta+b",useWhileBlobFocused:!0,noModifierHotkey:["b"]},viewCodeShortcut:{hotkey:"Meta+/ Meta+c",useWhileBlobFocused:!0,modifierRequired:!0},viewPreviewShortcut:{hotkey:"Meta+/ Meta+p"},viewRawContentShortcut:{text:"\u2318 / \u2318 r",hotkey:"Meta+/ Meta+r",useWhileBlobFocused:!0,noModifierHotkey:["r"],modifierRequired:!0},findSymbolShortcut:{hotkey:"r,Shift+R",useWhileBlobFocused:!0,noModifierHotkey:["r","R"],modifierRequired:!1}},a=new Map;function s(){let e=(0,i.f)(["mac"]),[t]=(0,o.D)(()=>!1,!0,[]),r=0;if(e?r=1:t||(r=2),!a.has(r)){var s,l;let o=n;e||t||(o=Object.keys(s=o).reduce((e,t)=>{let r=s[t];return e[t]={hotkey:r.hotkey?.replace(/Meta/g,"Control"),text:r.text?.replace(/⌘/g,"Ctrl").replace(/⇧/g,"Shift"),ariaKeyShortcuts:r.ariaKeyShortcuts?.replace(/Meta/g,"Control"),useWhileBlobFocused:r.useWhileBlobFocused,modifierRequired:r.modifierRequired,noModifierHotkey:r.noModifierHotkey},e},{})),t&&(o=Object.keys(l=o).reduce((e,t)=>{let r=l[t];return e[t]={hotkey:void 0,text:r.text?.replace(/⌘/g,"Ctrl").replace(/⇧/g,"Shift"),ariaKeyShortcuts:r.ariaKeyShortcuts?.replace(/Meta/g,"Control"),useWhileBlobFocused:r.useWhileBlobFocused,modifierRequired:r.modifierRequired,noModifierHotkey:r.noModifierHotkey},e},{})),a.set(r,o)}return a.get(r)}function l(){let e=s();return Object.keys(e).reduce((t,r)=>{let o=e[r];if(o.useWhileBlobFocused&&o.noModifierHotkey&&o.modifierRequired)for(let e of o.noModifierHotkey)t.includes(e)||t.push(e);return t},[])}function c(){let e=s();return Object.keys(e).reduce((t,r)=>{let o=e[r];if(o.useWhileBlobFocused&&o.noModifierHotkey&&!o.modifierRequired)for(let e of o.noModifierHotkey)t.includes(e)||t.push(e);return t},[])}},81700:(e,t,r)=>{r.d(t,{U:()=>l});var o=r(22326),i=r(58081),n=r(59309),a=r(24533),s=r(41768);function l(e){let t=(0,a.T)(),r=e||t,l=(0,i.useRef)(r),c=(0,i.useContext)(n.h);if(r)l.current=r;else{let e=(0,o.Vr)(location.pathname,l.current.refInfo.name,l.current.path);r=(0,s.xC)(l.current,c,e)}return r}},23180:(e,t,r)=>{r.d(t,{a:()=>d});var o=r(52674),i=r(22326),n=r(7949),a=r(59434),s=r(87623),l=r(58081),c=r(37589);function d(){let{sendAnalyticsEvent:e}=(0,a.z)(),t=function(){let e=function(){let e=(0,o.H)(),t=(0,c.x)();return(0,l.useMemo)(()=>({react_app:"code-view",repository_id:e.id,repository_nwo:`${e.ownerLogin}/${e.name}`,repository_public:e.public,repository_is_fork:e.isFork,actor_id:t?.id,actor_login:t?.login}),[e,t])}(),t=(0,o.H)(),r=(0,i.Mf)(i.V6,{owner:t.ownerLogin,repo:t.name});return(0,l.useCallback)((t,o,i)=>{let n={target:t,interaction:o,context:i,...e,url:window.location.href,user_agent:window.navigator.userAgent,browser_width:window.innerWidth,browser_languages:window.navigator.languages.join(",")};(0,s.v)(r,{method:"POST",body:n})},[e,r])}(),r=(0,n.y)("code_nav_ui_events");return{sendRepoClickEvent:(0,l.useCallback)((o,i={})=>{e("repository.click",o,i),r&&t(o,"click",i)},[e,t,r]),sendRepoKeyDownEvent:(0,l.useCallback)((o,i={})=>{e("repository.keydown",o,i),r&&t(o,"keydown",i)},[e,t,r]),sendStats:(0,l.useCallback)((o,i={})=>{e(o,"",i),r&&t(o,"stats",i)},[e,t,r]),sendMarketplaceActionEvent:(0,l.useCallback)((t,r={})=>{e("marketplace.action.click",t,r)},[e])}}},79842:(e,t,r)=>{r.d(t,{B:()=>l});var o=r(86525),i=r(52674),n=r(22326),a=r(15631),s=r(58081);function l(){let e=(0,i.H)(),{path:t,action:r,refInfo:l}=(0,o.Br)(),[c]=(0,a.D)(()=>!1,!0,[]),d=s.useCallback(t=>(0,n.Qi)({repo:e,commitish:l.name,action:"directory"===t.contentType?"tree":"blob",path:t.path}),[e.ownerLogin,e.name,l.name]);function u(e){return e?`?${e}`:""}function h(e){return c?"":void 0===e?window.location.hash:e?`#${e}`:""}return{getItemUrl:d,getUrl(o={}){let i=(0,n.Qi)({repo:e,commitish:o.commitish||l.name,action:o.action||r,path:o.path||t})+function({params:e,hash:t}){return u(e)+h(t)}(o);return o.absolute?new URL(i,window.location.origin).href:i},createPermalink(o={}){let i=(0,n.Qi)({repo:e,commitish:l.currentOid,action:o.action||r,path:o.path||t})+function({params:e,hash:t}){return u(e)+h(t)}(o);return o.absolute?new URL(i,window.location.origin).href:i},isCurrentPagePermalink:()=>!c&&l.name===l.currentOid&&window.location.pathname.includes(l.currentOid)}}},41768:(e,t,r)=>{r.d(t,{r8:()=>i,xC:()=>n});var o=r(91801);function i(e){return(0,o.g6)(e)?{...e.fileTree,[e.path]:{items:e.tree.items,totalCount:e.tree.totalCount}}:e.fileTree}function n(e,t,r){return{path:r,repo:e.repo,refInfo:e.refInfo,currentUser:e.currentUser,fileTree:i(e),fileTreeProcessingTime:e.fileTreeProcessingTime,foldersToFetch:e.foldersToFetch,allShortcutsEnabled:e.allShortcutsEnabled,treeExpanded:e.treeExpanded,symbolsExpanded:e.symbolsExpanded,codeLineWrapEnabled:e.codeLineWrapEnabled,error:t||void 0}}},80589:(e,t,r)=>{r.d(t,{A:()=>o});let o={"&:hover:not([disabled])":{textDecoration:"none"},"&:focus:not([disabled])":{textDecoration:"none"},"&:active:not([disabled])":{textDecoration:"none"}}},91801:(e,t,r)=>{var o,i;function n(e){return"blob"in e}function a(e){return n(e)&&"blame"in e}function s(e){return"deleteInfo"in e&&"webCommitInfo"in e}function l(e){return"editInfo"in e&&"webCommitInfo"in e}function c(e){return"tree"in e}r.d(t,{kl:()=>i,K$:()=>a,Kg:()=>n,XU:()=>s,OH:()=>l,g6:()=>c}),function(e){e.FALSE_POSITIVE="false_positive",e.USED_IN_TESTS="used_in_tests",e.WILL_FIX_LATER="will_fix_later"}(o||(o={})),function(e){e.README="readme",e.CODE_OF_CONDUCT="code_of_conduct",e.LICENSE="license",e.SECURITY="security"}(i||(i={}))},14136:(e,t,r)=>{r.d(t,{m:()=>h,z:()=>u});var o=r(48055),i=r(79621),n=r(44459),a=r(85529),s=r(50919),l=r(42483),c=r(58081),d=r(41436);function u(e){if("clipboard"in navigator)return navigator.clipboard.writeText(e);let t=document.body;if(!t)return Promise.reject(Error());let r=function(e){let t=document.createElement("pre");return t.style.width="1px",t.style.height="1px",t.style.position="fixed",t.style.top="5px",t.textContent=e,t}(e);return t.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 r=document.createRange();r.selectNodeContents(e),t.addRange(r),document.execCommand("copy"),t.removeAllRanges(),Promise.resolve()}(r),t.removeChild(r),Promise.resolve()}function h({icon:e=a.CopyIcon,size:t="medium",onCopy:r,sx:i,textToCopy:l,tooltipProps:h,ariaLabel:f,accessibleButton:p,hasPortalTooltip:y=!1}){let[x,g]=c.useState(!1),b=(0,n.Z)(),w=()=>{g(!0),u(l),r?.(),setTimeout(()=>b()&&g(!1),2e3)},j=x?"Copied!":f??`Copy ${l} to clipboard`;return y?(0,o.jsx)(m,{label:j,textToCopy:l,copied:x,onClickCopy:w,tooltipProps:h,sx:{...i}}):(0,o.jsx)(d.u,{text:j,"aria-label":j,...h,sx:{position:"absolute"},children:(0,o.jsx)(s.h,{"aria-label":j,icon:x?a.CheckIcon:e,variant:"invisible",size:t,tabIndex:!1===p?-1:0,className:x?"color-fg-success":void 0,sx:{...i},onClick:w})})}function m({icon:e=a.CopyIcon,size:t="medium",label:r,accessibleButton:n,copied:d,onClickCopy:u,tooltipProps:h,sx:m}){let f=c.useRef(null),[p,y]=(0,i.g)({contentRef:f,"aria-label":d?"Copied!":r,...h});return(0,o.jsxs)(l.Z,{ref:f,...p,children:[(0,o.jsx)(s.h,{"aria-label":r,icon:d?a.CheckIcon:e,variant:"invisible",size:t,tabIndex:!1===n?-1:0,className:d?"color-fg-success":void 0,sx:{...m},onClick:u}),y]})}try{h.displayName||(h.displayName="CopyToClipboardButton")}catch{}try{m.displayName||(m.displayName="PortalTooltipCopyButton")}catch{}},65809:(e,t,r)=>{r.d(t,{eK:()=>y});var o=r(82918),i=r(21630),n=r(28382);function a(e){let t=document.querySelectorAll(e);if(t.length>0)return t[t.length-1]}var s=r(54508),l=r(71207),c=r(18515),d=r(58374);let u=!1,h=0,m=Date.now(),f=new Set(["Failed to fetch","NetworkError when attempting to fetch resource."]);function p(e){return!!("AbortError"===e.name||"TypeError"===e.name&&f.has(e.message)||e.name.startsWith("ApiError")&&f.has(e.message))}function y(e,t={}){if((0,c.c)("FAILBOT_HANDLE_NON_ERRORS")){if(!(e instanceof Error||"object"==typeof e&&null!==e&&"name"in e&&"string"==typeof e.name&&"message"in e&&"string"==typeof e.message)){if(function(e){if(!e||"boolean"==typeof e||"number"==typeof e)return!0;if("string"==typeof e){if(v.some(t=>e.includes(t)))return!0}else if("object"==typeof e&&"string"==typeof e.message&&"number"==typeof e.code)return!0;return!1}(e))return;let r=Error(),o=function(e){try{return JSON.stringify(e)}catch{return"Unserializable"}}(e),i={type:"UnknownError",value:`Unable to report error, due to a thrown non-Error type: ${typeof e}, with value ${o}`,stacktrace:w(r),catalogService:void 0};x(b(i,t));return}p(e)||x(b(g(e),t))}else p(e)||x(b(g(e),t))}async function x(e){if(!(!k&&!u&&h<10&&(0,i.Gb)()))return;let t=document.head?.querySelector('meta[name="browser-errors-url"]')?.content;if(t){if(e.error.stacktrace.some(e=>j.test(e.filename)||j.test(e.function))){u=!0;return}h++;try{await fetch(t,{method:"post",body:JSON.stringify(e)})}catch{}}}function g(e){return{type:e.name,value:e.message,stacktrace:w(e),catalogService:e.catalogService}}function b(e,t={}){return Object.assign({error:e,sanitizedUrl:`${window.location.protocol}//${window.location.host}${function(){let e=a("meta[name=analytics-location]");return e?e.content:window.location.pathname}()+function(){let e=a("meta[name=analytics-location-query-strip]"),t="";e||(t=window.location.search);let r=a("meta[name=analytics-location-params]");for(let e of(r&&(t+=(t?"&":"?")+r.content),document.querySelectorAll("meta[name=analytics-param-rename]"))){let r=e.content.split(":",2);t=t.replace(RegExp(`(^|[?&])${r[0]}($|=)`,"g"),`$1${r[1]}$2`)}return t}()}`||window.location.href,readyState:document.readyState,referrer:(0,d.wP)(),timeSinceLoad:Math.round(Date.now()-m),user:function(){let e=document.head?.querySelector('meta[name="user-login"]')?.content;if(e)return e;let t=(0,o.b)();return`anonymous-${t}`}()||void 0,bundler:s.A,ui:!!document.querySelector('meta[name="ui"]')},t)}function w(e){return(0,n.Q)(e.stack||"").map(e=>({filename:e.file||"",function:String(e.methodName),lineno:(e.lineNumber||0).toString(),colno:(e.column||0).toString()}))}let j=/(chrome|moz|safari)-extension:\/\//,k=!1;if(l.iG?.addEventListener("pageshow",()=>k=!1),l.iG?.addEventListener("pagehide",()=>k=!0),"function"==typeof BroadcastChannel){let e=new BroadcastChannel("shared-worker-error");e.addEventListener("message",e=>{y(e.data.error)})}let v=["Object Not Found Matching Id","Not implemented on this platform","provider because it's not your default extension"]},15429:(e,t,r)=>{r.d(t,{M:()=>n});let o=e=>{let t=getComputedStyle(e,null);return["overflow","overflow-y","overflow-x"].some(e=>{let r=t.getPropertyValue(e);return"auto"===r||"scroll"===r})},i=(e,t)=>e&&null!==e.parentNode?i(e.parentNode,t.concat([e])):t;function n(e){if(!(e instanceof HTMLElement||e instanceof SVGElement))return;let t=i(e.parentNode,[]);for(let e of t)if((e instanceof HTMLElement||e instanceof SVGElement)&&o(e))return e;return document.scrollingElement||document.documentElement}},7949:(e,t,r)=>{r.d(t,{g:()=>i,y:()=>n});var o=r(12008);let i=()=>o.M()?.enabled_features??{},n=e=>!!i()[e]},59434:(e,t,r)=>{r.d(t,{w:()=>s,z:()=>a});var o=r(58081),i=r(79697),n=r(15470);function a(){let e=(0,o.useContext)(n.f);if(!e)throw Error("useAnalytics must be used within an AnalyticsContext");let{appName:t,category:r,metadata:a}=e;return{sendAnalyticsEvent:(0,o.useCallback)((e,o,n={})=>{let s={react:!0,app_name:t,category:r,...a};(0,i.qP)(e,{...s,...n,target:o})},[t,r,a])}}function s(){let{sendAnalyticsEvent:e}=a();return{sendClickAnalyticsEvent:(0,o.useCallback)((t={})=>{e("analytics.click",void 0,t)},[e])}}},20679:(e,t,r)=>{r.d(t,{f:()=>i});var o=r(15631);function i(e){let t=e.join(","),[r]=(0,o.D)(()=>{let e=/Windows/.test(navigator.userAgent)?"windows":/Macintosh/.test(navigator.userAgent)?"mac":null;return!!e&&t.includes(e)},!1,[t]);return r}},52973:(e,t,r)=>{r.d(t,{F:()=>u,f:()=>h});var o=r(15205),i=r(22326),n=r(90804),a=r(87623),s=r(58081);async function l(e){let t=await (0,a.v)(e);return t.ok?await t.json():void 0}let c=new Map,d=(0,o.Z)(l,{cache:c});function u(){c.clear()}function h(e,t,r,o){let[a,l]=(0,s.useState)(),[c,h]=(0,s.useState)(!1),[m,f]=(0,s.useState)(!0),p=t&&e&&r&&o?(0,i.Qi)({repo:{name:t,ownerLogin:e},commitish:r,action:"latest-commit",path:o}):null;return(0,s.useEffect)(()=>(document.addEventListener(n.Q.START,u),()=>{document.removeEventListener(n.Q.START,u)})),(0,s.useEffect)(()=>{let e=!1,t=async()=>{if(!p)return;h(!1),f(!0),l(void 0);let t=await d(p);if(!e){try{t?l(t):h(!0)}catch(e){h(!0)}f(!1)}};return t(),function(){e=!0}},[p,r]),[a,m,c]}},87623:(e,t,r)=>{function o(e,t={}){!function(e){let t=new URL(e,window.location.origin);if(t.origin!==window.location.origin)throw Error("Can not make cross-origin requests from verifiedFetch")}(e);let r={...t.headers,"GitHub-Verified-Fetch":"true","X-Requested-With":"XMLHttpRequest"};return fetch(e,{...t,headers:r})}function i(e,t){let r=t?.headers??{},i={...r,Accept:"application/json","Content-Type":"application/json"},n=t?.body?JSON.stringify(t.body):void 0;return o(e,{...t,body:n,headers:i})}r.d(t,{Q:()=>o,v:()=>i})},34734:(e,t,r)=>{r.d(t,{s:()=>f});var o=r(48055),i=r(52674),n=r(22326),a=r(77461),s=r(46741),l=r(85529),c=r(45677),d=r(50919),u=r(14786),h=r(86525),m=r(23180);function f({useIcon:e}){let{refInfo:t,path:r}=(0,h.Br)(),f=(0,i.H)(),{sendRepoClickEvent:p}=(0,m.a)();return t.canEdit?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.N,{as:"h2",text:"Add file"}),(0,o.jsxs)(c.P,{children:[e?(0,o.jsx)(c.P.Anchor,{children:(0,o.jsx)(d.h,{icon:l.PlusIcon,"aria-label":"Add file"})}):(0,o.jsx)(c.P.Button,{children:"Add file"}),(0,o.jsx)(c.P.Overlay,{sx:{maxHeight:"55vh",overflowY:"auto"},children:(0,o.jsxs)(u.S,{children:[(0,o.jsxs)(u.S.LinkItem,{as:a.r,onClick:()=>p("NEW_FILE_BUTTON"),to:(0,n.Qi)({repo:f,path:r,commitish:t.name,action:"new"}),children:[(0,o.jsx)(u.S.LeadingVisual,{children:(0,o.jsx)(l.PlusIcon,{})}),"Create new file"]}),(0,o.jsxs)(u.S.LinkItem,{onClick:()=>p("UPLOAD_FILES_BUTTON"),href:(0,n.Qi)({repo:f,path:r,commitish:t.name,action:"upload"}),children:[(0,o.jsx)(u.S.LeadingVisual,{children:(0,o.jsx)(l.UploadIcon,{})}),"Upload files"]})]})})]})]}):null}try{f.displayName||(f.displayName="AddFileDropdownButton")}catch{}},47357:(e,t,r)=>{r.d(t,{I:()=>n});var o=r(48055),i=r(56830);function n({children:e}){let t=(0,i.n)();return t?(0,o.jsx)(o.Fragment,{children:e}):null}try{n.displayName||(n.displayName="AllShortcutsEnabled")}catch{}},70668:(e,t,r)=>{r.d(t,{K:()=>p});var o=r(48055),i=r(86525),n=r(80589),a=r(52674),s=r(22326),l=r(85529),c=r(42483),d=r(98833),u=r(89042),h=r(48170),m=r(97011),f=r(73290);function p(e){let t=(0,a.H)(),{refInfo:r,path:h}=(0,i.Br)();return(0,o.jsx)(c.Z,{sx:{minHeight:"100vh",margin:16},children:(0,o.jsxs)(c.Z,{sx:{border:"1px solid var(--borderColor-default, var(--color-border-default))",borderRadius:"6px",padding:50,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:[(0,o.jsx)(d.Z,{icon:l.AlertIcon,sx:{color:"fg.muted",mb:2},size:20}),(0,o.jsx)(y,{...e}),(h||!r.currentOid)&&(0,o.jsx)(u.Q,{type:"button",sx:{mt:4,...n.A},variant:"primary","aria-label":r.currentOid?"go to Overview":"go to default branch",href:r.currentOid?(0,s.IY)(t):(0,s.sA)(t),children:r.currentOid?"Return to the repository overview":"Go to default branch"})]})})}function y({httpStatus:e,type:t}){return(0,o.jsxs)(c.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1,textAlign:"center"},children:[(0,o.jsx)(c.Z,{sx:{fontSize:4,color:"fg.default",fontWeight:"bold"},children:404===e?"404 - page not found":"Error loading page"}),404===e?(0,o.jsx)(x,{}):(0,o.jsx)(g,{httpStatus:e,type:t})]})}function x(){let e=(0,a.H)(),{path:t,refInfo:r}=(0,i.Br)();return r.currentOid?(0,o.jsxs)(c.Z,{sx:{color:"fg.muted",display:"flex",flexWrap:"wrap",justifyContent:"center"},"data-testid":"eror-404-description",children:["The\xa0",(0,o.jsx)(h.Z,{as:"p",sx:{mb:0},children:r.name}),"\xa0branch of\xa0",(0,o.jsx)(m.Z,{as:"p",sx:{fontWeight:"bold",mb:0},children:e.name}),"\xa0does not contain the path\xa0",(0,o.jsxs)(m.Z,{as:"p",sx:{fontWeight:"bold",mb:0},children:[t,"."]})]}):(0,o.jsxs)(c.Z,{sx:{color:"fg.muted",display:"flex",flexWrap:"wrap",justifyContent:"center"},"data-testid":"error-404-description",children:["Cannot find a valid ref in\xa0",(0,o.jsx)(h.Z,{as:"p",sx:{mb:0},children:r.name})]})}function g({httpStatus:e,type:t}){let r=e?` ${e} error`:"error";return"fetchError"===t?(0,o.jsx)(c.Z,{sx:{fontSize:1,color:"fg.muted"},"data-testid":"fetch-error-description",children:"It looks like your internet connection is down. Please check it."}):(0,o.jsxs)(c.Z,{sx:{fontSize:1,color:"fg.muted"},"data-testid":"default-error-description",children:["An unexpected ",r," occured. Try",(0,o.jsx)(f.Z,{onClick:()=>window.location.reload(),children:"\xa0reloading the page."},"reload-page")]})}try{p.displayName||(p.displayName="CodeViewError")}catch{}try{y.displayName||(y.displayName="ErrorText")}catch{}try{x.displayName||(x.displayName="DescriptionText404")}catch{}try{g.displayName||(g.displayName="DefaultDescriptionText")}catch{}},94614:(e,t,r)=>{r.d(t,{w:()=>l});var o=r(48055),i=r(85193),n=r(85529),a=r(50919),s=r(29881);function l({editPath:e,editTooltip:t,customSx:r}){let{editFileShortcut:l}=(0,s.bx)(),c=(0,i.s)();return e?(0,o.jsx)(a.h,{icon:n.PencilIcon,sx:{...r},"aria-label":t,onClick:()=>{c(e)},"data-hotkey":l.hotkey,size:"small",title:t,variant:"invisible"}):null}try{l.displayName||(l.displayName="EditButton")}catch{}},65286:(e,t,r)=>{r.d(t,{x:()=>M,d:()=>R});var o=r(48055),i=r(86028),n=r(86525),a=r(23180),s=r(80589),l=r(53924),c=r(52674),d=r(22326),u=r(77461),h=r(75299),m=r(46741),f=r(52973),p=r(85529),y=r(42483),x=r(97011),g=r(98833),b=r(91863),w=r(73290),j=r(65379),k=r(89042),v=r(50919),N=r(58081),C=r(20756);function S({status:e,oid:t}){let r=(0,c.H)(),[i,n]=(0,C.fQ)(t,r);return e?(0,o.jsx)(C.vC,{statusRollup:e,combinedStatus:i,onWillOpenPopup:n,size:"small"}):null}try{S.displayName||(S.displayName="ReposChecksStatusBadge")}catch{}function R({commitCount:e}){return(0,o.jsx)(y.Z,{sx:{display:"flex",flexDirection:"column",border:"1px solid",borderColor:"border.default",borderRadius:6,mb:3},children:(0,o.jsx)(M,{commitCount:e})})}function M({commitCount:e}){let t=(0,c.H)(),{refInfo:r,path:a}=(0,n.Br)(),[s,l,d]=(0,f.f)(t.ownerLogin,t.name,r.name,a),[u,h]=(0,N.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(y.Z,{sx:{display:"flex",flexDirection:"row",flexWrap:["wrap","nowrap"],justifyContent:"space-between",alignItems:"center",gap:2,minWidth:"273px",pr:2,pl:3,py:2},children:[(0,o.jsx)(m.N,{as:"h2",text:"Latest commit"}),d?(0,o.jsx)(H,{}):l?(0,o.jsx)(i.N,{width:120,"data-testid":"loading"}):s?(0,o.jsx)(F,{commit:s,detailsOpen:u,setDetailsOpen:h}):null,(0,o.jsxs)("div",{className:"d-flex gap-2",children:[(0,o.jsx)(T,{commit:s}),(0,o.jsx)(B,{commit:s,commitCount:e,detailsOpen:u,setDetailsOpen:h})]})]}),u&&s&&(0,o.jsx)(y.Z,{sx:{display:s.bodyMessageHtml?"flex":["flex","none","none"]},children:(0,o.jsx)(E,{commit:s})})]})}function H(){return(0,o.jsxs)(x.Z,{sx:{color:"attention.fg"},"data-testid":"latest-commit-error-message",children:[(0,o.jsx)(g.Z,{icon:p.AlertFillIcon}),"\xa0Cannot retrieve latest commit at this time."]})}function F({commit:e,detailsOpen:t,setDetailsOpen:r}){let i=(0,c.H)(),n=`data-hovercard-url=${(0,d.QY)({owner:i.ownerLogin,repo:i.name,commitish:e.oid})} `,a=function(e,t){let r="";if(e){let o=e.split("<a ");for(let e of o)if(""!==e){if(e.includes("data-hovercard-url")){r=r.concat("<a ",e);continue}r=r.concat(...["<a ",t,e])}}return r}(e.shortMessageHtmlLink,n);return(0,o.jsxs)(y.Z,{sx:{display:"flex",minWidth:0,fontSize:1,alignItems:"center",width:"max-content",gap:2,flexGrow:1},"data-testid":"latest-commit",children:[e.authors&&e.authors.length>0?(0,o.jsx)(l.C,{authors:e.authors,repo:i,includeVerbs:!1,committer:e.committer,committerAttribution:e.committerAttribution}):(0,o.jsx)(l.D,{author:e.author,repo:i}),(0,o.jsxs)(y.Z,{className:"react-last-commit-message",sx:{alignItems:"center",minWidth:0,gap:2},children:[(0,o.jsx)(y.Z,{className:"Truncate",sx:{fontSize:1,alignItems:"center"},children:e.shortMessageHtmlLink&&(0,o.jsx)(h.WZ,{className:"Truncate-text","data-testid":"latest-commit-html",unverifiedHTML:a})}),e.bodyMessageHtml&&(0,o.jsx)(Z,{detailsOpen:t,setDetailsOpen:r}),(0,o.jsx)(S,{oid:e.oid,status:e.status})]}),(0,o.jsx)(x.Z,{className:"react-last-commit-summary-timestamp",sx:{color:"fg.muted",fontSize:0},children:(0,o.jsx)(b.Z,{datetime:e.date,tense:"past"})})]})}function T({commit:e}){let t=e?.oid.slice(0,7);return(0,o.jsx)(y.Z,{sx:{alignItems:"center"},"data-testid":"latest-commit-details",className:"latest-commit-timestamp-container",children:e&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(x.Z,{className:"react-last-commit-oid-timestamp",sx:{color:"fg.muted",fontSize:0},children:[(0,o.jsx)(w.Z,{as:u.r,to:e.url,className:"Link--secondary","aria-label":`Commit ${t}`,children:t}),"\xa0\xb7\xa0",(0,o.jsx)(b.Z,{datetime:e.date,tense:"past"})]}),(0,o.jsx)(x.Z,{className:"react-last-commit-timestamp",sx:{color:"fg.muted",fontSize:0},children:(0,o.jsx)(b.Z,{datetime:e.date,tense:"past"})})]})})}function B({commit:e,commitCount:t,detailsOpen:r,setDetailsOpen:i}){return(0,o.jsxs)(y.Z,{sx:{display:"flex",gap:2},children:[(0,o.jsx)(m.N,{as:"h2",text:"History"}),(0,o.jsx)(A,{className:"react-last-commit-history-group",size:"small",leadingVisual:p.HistoryIcon,children:(0,o.jsx)(x.Z,{sx:{color:"fg.default"},children:t?`${t} Commits`:"History"})}),(0,o.jsx)(y.Z,{sx:{display:["inherit","none","none"]},children:(e?.shortMessageHtmlLink||e?.bodyMessageHtml)&&(0,o.jsx)(Z,{detailsOpen:r,setDetailsOpen:i,useMediumButton:!0})}),(0,o.jsx)(j.Z,{"aria-label":"Commit history",children:(0,o.jsx)(A,{className:"react-last-commit-history-icon",leadingVisual:p.HistoryIcon})})]})}function A({children:e,className:t,leadingVisual:r,size:i}){let{sendRepoClickEvent:l}=(0,a.a)(),{refInfo:u,path:h}=(0,n.Br)(),m=(0,c.H)();return(0,o.jsx)(k.Q,{className:t,sx:{alignItems:"center",color:"fg.default",...s.A},onClick:()=>l("HISTORY_BUTTON"),href:(0,d.w2)({owner:m.ownerLogin,repo:m.name,ref:u.name,path:h}),variant:"invisible",size:i,leadingVisual:r,children:e})}function Z({detailsOpen:e,setDetailsOpen:t,useMediumButton:r}){return(0,o.jsx)(v.h,{"aria-label":"Open commit details",icon:p.EllipsisIcon,sx:{color:"fg.muted",minWidth:"28px"},onClick:()=>t(!e),variant:"invisible","aria-pressed":e,"aria-expanded":e,"data-testid":"latest-commit-details-toggle",size:r?"medium":"small"})}function E({commit:e}){let t=e?.oid.slice(0,7);return(0,o.jsxs)(y.Z,{sx:{backgroundColor:"canvas.subtle",borderTop:"1px solid",borderColor:"border.default",borderRadius:"0px 0px 6px 6px",px:3,py:2,flexGrow:1},children:[(0,o.jsxs)(y.Z,{sx:{display:["flex","none","none"],flexDirection:"column"},children:[(0,o.jsxs)(y.Z,{sx:{display:"flex",flexDirection:"row",minWidth:0,gap:2,alignItems:"center"},children:[e.shortMessageHtmlLink&&(0,o.jsx)(h.WZ,{className:"Truncate-text","data-testid":"latest-commit-html",html:e.shortMessageHtmlLink,sx:{"> a":{color:"var(--fgColor-default, var(--color-fg-default)) !important"}}}),(0,o.jsx)(S,{oid:e.oid,status:e.status})]}),(0,o.jsx)(w.Z,{as:u.r,to:e.url,className:"Link--secondary","aria-label":`Commit ${t}`,children:t}),e.bodyMessageHtml&&(0,o.jsx)("br",{})]}),e.bodyMessageHtml&&(0,o.jsx)(y.Z,{sx:{mt:[2,0,0],color:"fg.muted"},children:(0,o.jsx)(h.WZ,{className:"Truncate-text","data-testid":"latest-commit-html",html:e.bodyMessageHtml,sx:{whiteSpace:"pre-wrap"}})})]})}try{R.displayName||(R.displayName="LatestCommitSingleLine")}catch{}try{M.displayName||(M.displayName="LatestCommitContent")}catch{}try{H.displayName||(H.displayName="CommitErrorMessage")}catch{}try{F.displayName||(F.displayName="CommitSummary")}catch{}try{T.displayName||(T.displayName="LastCommitTimestamp")}catch{}try{B.displayName||(B.displayName="HistoryLink")}catch{}try{A.displayName||(A.displayName="HistoryLinkButton")}catch{}try{Z.displayName||(Z.displayName="CommitDetailsButton")}catch{}try{E.displayName||(E.displayName="CommitDetails")}catch{}},11646:(e,t,r)=>{r.d(t,{Z:()=>h});var o=r(48055),i=r(87623),n=r(85529),a=r(51461),s=r(42483),l=r(89042),c=r(50919),d=r(58081),u=r(80589);function h({showPublishActionBanner:e,releasePath:t,dismissActionNoticePath:r,sx:h}){let[m,f]=(0,d.useState)(!1);return e?(0,o.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"row",alignItems:"center",mt:3,...h},hidden:m,children:[e&&(0,o.jsx)(s.Z,{sx:{flexGrow:1},children:"You can publish this Action to the GitHub Marketplace"}),(0,o.jsx)(l.Q,{href:t,sx:{fontSize:0,mr:2,...u.A},children:"Draft a release"}),(0,o.jsx)(c.h,{icon:n.XIcon,"aria-label":"Dismiss",onClick:e?()=>{(0,i.Q)(r,{method:"POST"}),f(!0)}:()=>{},sx:{backgroundColor:"transparent",border:0,pr:0},title:"Dismiss"})]}):null}try{h.displayName||(h.displayName="PublishBanners")}catch{}},17191:(e,t,r)=>{r.d(t,{S:()=>h});var o=r(48055),i=r(52674),n=r(22326),a=r(44355),s=r(88049),l=r(58081),c=r(86525),d=r(29881),u=r(23180);function h({size:e,buttonClassName:t,allowResizing:r,idEnding:h}){let m=(0,i.H)(),{refInfo:f,path:p,action:y}=(0,c.Br)(),x=function(){let{addToast:e}=(0,s.V6)();return(0,l.useCallback)(t=>e({type:"error",message:t}),[e])}(),{sendRepoClickEvent:g}=(0,u.a)(),{refSelectorShortcut:b}=(0,d.bx)(),w=f.name;return w===f.currentOid&&(w=f.name.slice(0,7)),(0,o.jsx)(a.cq,{currentCommitish:w,defaultBranch:m.defaultBranch,owner:m.ownerLogin,repo:m.name,canCreate:m.currentUserCanPush,cacheKey:f.listCacheKey,selectedRefType:"tree"===f.refType?"branch":f.refType,getHref:e=>`${(0,n.Qi)({repo:m,commitish:e,action:y,path:p})}${window.location.search}`,hotKey:b.hotkey,onBeforeCreate:e=>g("REF_SELECTOR_MENU.CREATE_BRANCH",{ref_name:e}),onCreateError:x,onOpenChange:e=>e&&g("REF_SELECTOR_MENU"),size:e,buttonClassName:t,allowResizing:r,idEnding:h||"repos-header-ref-selector",useFocusZone:!0})}try{h.displayName||(h.displayName="ReposHeaderRefSelector")}catch{}},71735:(e,t,r)=>{r.d(t,{X:()=>u,D:()=>h});var o=r(48055),i=r(52674),n=r(91534),a=r(75299),s=r(63451),l=r(85193),c=r(58081),d=r(89250);let u=(0,c.forwardRef)(function({onAnchorClick:e,richText:t,stickyHeaderHeight:r,sx:u},m){let{hash:f}=(0,d.TH)(),p=(0,i.H)(),y=(0,l.s)(),x=(0,c.useRef)(null);return(0,c.useImperativeHandle)(m,()=>x.current),(0,c.useEffect)(()=>{let e=()=>{h(window.location.hash,r)};return window.addEventListener("load",e),window.addEventListener("hashchange",e),()=>{window.removeEventListener("load",e),window.removeEventListener("hashchange",e)}},[]),(0,s.b)(()=>{x?.current&&h(window.location.hash,r)},[f]),(0,o.jsx)(a.wB,{ref:x,className:"js-snippet-clipboard-copy-unpositioned",html:t,sx:u,"data-hpc":!0,onClick:t=>{let o=t.metaKey||t.ctrlKey,i=t.target.closest("a");if(i&&i.href){if(!o){let e=i.href,o=new URL(e,window.location.origin);(0,n.Z)(window.location.href,e)?(h(o.hash,r),window.location.hash===o.hash&&t.preventDefault()):e.startsWith(`${window.location.origin}/${p.ownerLogin}/${p.name}/`)&&(y(o.pathname+o.search+o.hash),t.preventDefault())}e?.(t)}}})});function h(e,t=125){var r;if(!e)return;let o=(function(e){try{return decodeURIComponent(e.slice(1))}catch{return""}})(e).toLowerCase(),i=o.startsWith("user-content-")?o:`user-content-${o}`,n=(r=document,""===i?null:r.getElementById(i)||r.getElementsByName(i)[0]||null);n&&document&&document.defaultView&&window.requestAnimationFrame(()=>{let e=n.getBoundingClientRect().top-document.body.getBoundingClientRect().top-t;window.scrollTo({top:e});let r=n.closest("h1,h2,h3,h4,h5,h6,li,span");r&&(r.focus(),r.setAttribute("data-react-autofocus","true"))})}try{u.displayName||(u.displayName="SharedMarkdownContent")}catch{}try{u.displayName||(u.displayName="SharedMarkdownContent")}catch{}},86028:(e,t,r)=>{r.d(t,{N:()=>i});var o=r(48055);function i({width:e,...t}){return(0,o.jsx)("div",{style:{width:e},className:"Skeleton Skeleton--text",...t,children:"\xa0"})}try{i.displayName||(i.displayName="SkeletonText")}catch{}},54042:(e,t,r)=>{r.d(t,{Z:()=>h});var o=r(48055),i=r(75299),n=r(85529),a=r(42483),s=r(50919),l=r(51526),c=r(14783),d=r(58081),u=r(71735);function h({onClose:e,toc:t}){let[r,h]=(0,d.useState)(""),[m,f]=(0,d.useState)(""),p=(0,d.useRef)(null);return((0,d.useEffect)(()=>{p.current?.focus()},[]),(0,d.useEffect)(()=>{let e=()=>{window.location.hash&&f(window.location.hash)};return e(),window.addEventListener("hashchange",e),()=>{window.removeEventListener("hashchange",e)}},[]),t)?(0,o.jsxs)(a.Z,{sx:{px:2,pt:2,maxWidth:"100vw"},as:"section","aria-labelledby":"outline-id",children:[e?(0,o.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,o.jsx)(a.Z,{as:"h3",id:"outline-id",ref:p,sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:1,fontWeight:600,px:2},tabIndex:-1,children:"Outline"}),(0,o.jsx)(s.h,{"aria-label":"Close outline",icon:n.XIcon,onClick:e,variant:"invisible",sx:{color:"fg.muted"}})]}):null,t.length>=8?(0,o.jsx)(a.Z,{sx:{pt:3,px:2},children:(0,o.jsx)(l.Z,{leadingVisual:n.FilterIcon,placeholder:"Filter headings","aria-label":"Filter headings",sx:{width:"100%"},onChange:e=>{h(e.target.value)}})}):null,(0,o.jsx)(c.$,{sx:{overflowY:"auto","> li":{borderRadius:2,width:"100%"}},children:t.map(({level:e,htmlText:t,anchor:n},a)=>{let s;if(!t||r&&!t.toLowerCase().includes(r.toLowerCase()))return null;s=1===e?{fontWeight:"bold"}:{paddingLeft:`${(e-1)*16}px`};let l=`#${n}`;return(0,o.jsx)(c.$.Item,{"aria-current":m===l?"page":void 0,href:l,onClick:e=>{1===e.button||e.metaKey||e.ctrlKey||(m!==l&&(location.href=l),(0,u.D)(l),e.preventDefault())},children:(0,o.jsx)(i.wB,{sx:{...s},html:t})},`outline-${n}-${a}`)})})]}):null}try{h.displayName||(h.displayName="TableOfContentsPanel")}catch{}},12484:(e,t,r)=>{r.d(t,{e:()=>O,y:()=>q});var o=r(48055),i=r(52674),n=r(42483),a=r(51461),s=r(97011),l=r(86028),c=r(86525),d=r(22326),u=r(87623),h=r(58081),m=r(23180),f=r(85529),p=r(45677),y=r(88216),x=r(48170),g=r(73290),b=r(75308),w=r(84915);function j({children:e}){return(0,o.jsx)(n.Z,{className:"popover-container-width",sx:{borderRadius:6,minWidth:250},children:e})}function k({icon:e,header:t,content:r}){return(0,o.jsxs)(n.Z,{sx:{display:"flex",p:3},children:[(0,o.jsx)(n.Z,{sx:{mr:2},children:e}),(0,o.jsxs)("div",{children:[(0,o.jsx)(b.Z,{as:"h2",sx:{fontSize:1,mb:1},children:t}),(0,o.jsx)(s.Z,{sx:{color:"fg.muted",fontSize:0},children:r})]})]})}function v({icon:e,bg:t}){return(0,o.jsx)(w.Z,{sx:{bg:t,color:"fg.onEmphasis"},size:30,icon:()=>(0,o.jsx)(e,{size:16})})}function N({children:e}){return(0,o.jsx)(n.Z,{sx:{display:"flex",flexWrap:"wrap",p:3,justifyContent:"space-between",borderTop:"solid 1px",borderColor:"border.muted",gap:3},children:e})}try{j.displayName||(j.displayName="PopoverContainer")}catch{}try{k.displayName||(k.displayName="PopoverContent")}catch{}try{v.displayName||(v.displayName="PopoverIcon")}catch{}try{N.displayName||(N.displayName="PopoverActions")}catch{}function C(e){return`${e} ${1===e?"commit":"commits"}`}function S({comparison:e,repo:t,linkify:r=!1}){let{sendRepoClickEvent:i}=(0,m.a)(),{ahead:n,behind:a,baseBranch:s,baseBranchRange:l,currentRef:c}=e,u=(0,d.j6)({repo:t,base:l,head:c}),h=(0,d.j6)({repo:t,base:c,head:l}),f=()=>i("AHEAD_BEHIND_LINK",{category:"Branch Infobar",action:"Ahead Compare",label:`ref_loc:bar;is_fork:${t.isFork}`}),p=()=>i("AHEAD_BEHIND_LINK",{category:"Branch Infobar",action:"Behind Compare",label:`ref_loc:bar;is_fork:${t.isFork}`});return 0===n&&0===a?(0,o.jsxs)("span",{children:["This branch is up to date with ",(0,o.jsx)(x.Z,{as:"span",children:s}),"."]}):n>0&&a>0?(0,o.jsxs)("span",{children:["This branch is"," ",(0,o.jsxs)(R,{linkify:r,href:u,onClick:f,children:[C(n)," ahead of"]}),","," ",(0,o.jsxs)(R,{linkify:r,href:h,onClick:p,children:[C(a)," behind"]})," ",(0,o.jsx)(x.Z,{as:"span",children:s}),"."]}):n>0?(0,o.jsxs)("span",{children:["This branch is"," ",(0,o.jsxs)(R,{linkify:r,href:u,onClick:f,children:[C(n)," ahead of"]})," ",(0,o.jsx)(x.Z,{as:"span",children:s}),"."]}):(0,o.jsxs)("span",{children:["This branch is"," ",(0,o.jsxs)(R,{linkify:r,href:h,onClick:p,children:[C(a)," behind"]})," ",(0,o.jsx)(x.Z,{as:"span",children:s}),"."]})}function R({sx:e,href:t,linkify:r,children:i,...n}){return r?(0,o.jsx)(g.Z,{sx:e,href:t,...n,children:i}):(0,o.jsx)(s.Z,{children:i})}try{S.displayName||(S.displayName="RefComparisonText")}catch{}try{R.displayName||(R.displayName="LinkOrText")}catch{}var M=r(80589);function H({comparison:e}){let t=(0,i.H)(),r=e.ahead>0,n=(0,d.j6)({repo:t,base:e.baseBranchRange,head:e.currentRef}),a=(0,d.wu)({repo:t,refName:e.currentRef});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(k,{icon:(0,o.jsx)(v,{bg:"neutral.emphasis",icon:f.GitPullRequestIcon}),header:r?(0,o.jsx)(S,{repo:t,comparison:{...e,behind:0}}):(0,o.jsxs)(s.Z,{children:["This branch is not ahead of the upstream ",(0,o.jsx)(x.Z,{as:"span",children:e.baseBranch}),"."]}),content:(0,o.jsx)(s.Z,{as:"p",children:r?"Open a pull request to contribute your changes upstream.":"No new commits yet. Enjoy your day!"})}),r&&(0,o.jsxs)(N,{children:[!t.isFork&&(0,o.jsx)(y.r,{as:g.Z,sx:{flex:1,...M.A},href:n,"data-testid":"compare-button",children:"Compare"}),(0,o.jsx)(y.r,{as:g.Z,sx:{flex:1,...M.A},href:a,variant:"primary","data-testid":"open-pr-button",children:"Open pull request"})]})]})}try{H.displayName||(H.displayName="ContributePopoverContent")}catch{}function F({comparison:e}){let{sendRepoClickEvent:t}=(0,m.a)();return(0,o.jsxs)(p.P,{onOpenChange:e=>e&&t("CONTRIBUTE_BUTTON",{category:"Branch Infobar",action:"Open Contribute dropdown",label:"ref_loc:contribute_dropdown"}),children:[(0,o.jsx)(p.P.Anchor,{children:(0,o.jsx)(y.r,{leadingVisual:f.GitPullRequestIcon,trailingVisual:f.TriangleDownIcon,children:"Contribute"})}),(0,o.jsx)(p.P.Overlay,{align:"end",sx:{marginTop:2},children:(0,o.jsx)(j,{children:(0,o.jsx)(H,{comparison:e})})})]})}try{F.displayName||(F.displayName="ContributeButton")}catch{}var T=r(74121);function B(e,t,r){let[o,i]=(0,h.useState)(!1);return{disabled:o,label:o?t:e,action:async()=>{i(!0),await r(),i(!1)}}}let A={category:"Branch Infobar",label:"ref_loc:fetch_upstream_dropdown"};function Z({comparison:e,discard:t,update:r}){let n=(0,i.H)(),{helpUrl:a}=(0,c.Ou)(),{sendRepoClickEvent:s}=(0,m.a)(),l=`${a}/github/collaborating-with-issues-and-pull-requests/syncing-a-fork`,u=(0,d.j6)({repo:n,base:e.baseBranchRange,head:e.currentRef}),h=E(e),p=e.behind>0,x=B(`Discard ${C(e.ahead)}`,"Discarding changes...",t),b=B("Update branch","Updating...",r),w={compare:"behind"===h,discard:"behind-and-ahead"===h&&e.isTrackingBranch,update:["behind","behind-and-ahead"].includes(h)},j=Object.values(w).some(Boolean);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(k,{icon:(0,o.jsx)(v,{icon:p?f.GitMergeIcon:f.CheckIcon,bg:p?"neutral.emphasis":"success.emphasis"}),header:(0,o.jsx)(L,{comparison:e}),content:(0,o.jsx)(W,{comparison:e,helpUrl:l})}),j&&(0,o.jsxs)(N,{children:[w.compare&&(0,o.jsx)(y.r,{as:g.Z,sx:{flex:1,...M.A},href:u,onClick:()=>s("SYNC_FORK.COMPARE",{...A,action:"Compare"}),"data-testid":"compare-button",children:"Compare"}),w.discard&&(0,o.jsx)(y.r,{onClick:x.action,sx:{flex:1},"data-testid":"discard-button",variant:"danger",disabled:x.disabled,children:x.label}),w.update&&(0,o.jsx)(y.r,{onClick:b.action,disabled:b.disabled,sx:{flex:1},variant:"primary","data-testid":"update-branch-button",children:b.label})]})]})}function E({behind:e,ahead:t}){return 0===e&&0===t?"sync":e>0&&t>0?"behind-and-ahead":e>0?"behind":"ahead"}function L({comparison:e}){let t=E(e);switch(t){case"behind":case"behind-and-ahead":return(0,o.jsx)(s.Z,{children:"This branch is out-of-date"});default:return(0,o.jsxs)(s.Z,{children:["This branch is not behind the upstream ",(0,o.jsx)(x.Z,{as:"span",children:e.baseBranch}),"."]})}}function W({comparison:e,helpUrl:t}){let r=E(e);switch(r){case"sync":case"ahead":return(0,o.jsx)(s.Z,{as:"p",children:"No new commits to fetch. Enjoy your day!"});case"behind":return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(s.Z,{as:"p",children:["Update branch to keep this branch up-to-date by syncing ",C(e.behind)," from the upstream repository."]}),(0,o.jsx)(s.Z,{as:"p",children:(0,o.jsx)(g.Z,{href:t,target:"_blank",rel:"noopener noreferrer",children:"Learn more about syncing a fork"})})]});case"behind-and-ahead":return e.isTrackingBranch?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.Z,{as:"p",children:"Update branch to merge the latest changes from the upstream repository into this branch."}),(0,o.jsxs)(s.Z,{as:"p",children:["Discard ",C(e.ahead)," to make this branch match the upstream repository."," ",C(e.ahead)," will be removed from this branch."]}),(0,o.jsx)(s.Z,{as:"p",children:(0,o.jsx)(g.Z,{href:t,target:"_blank",rel:"noopener noreferrer",children:"Learn more about syncing a fork"})})]}):(0,o.jsx)(s.Z,{as:"p",children:"Update branch to merge the latest changes from the upstream repository into this branch."})}}try{Z.displayName||(Z.displayName="FetchUpstreamPopoverContent")}catch{}try{L.displayName||(L.displayName="HeaderText")}catch{}try{W.displayName||(W.displayName="ContentText")}catch{}function I({comparison:e,discard:t}){let r=(0,i.H)(),{sendRepoClickEvent:n}=(0,m.a)(),a=(0,d.wu)({repo:r,refName:e.currentRef}),l=C(e.ahead),c=B(`Discard ${l}`,"Discarding changes...",t);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(k,{icon:(0,o.jsx)(v,{icon:f.AlertIcon,bg:"neutral.emphasis"}),header:"This branch has conflicts that must be resolved",content:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(s.Z,{as:"p",children:["Discard ",l," to make this branch match the upstream repository. ",l," will be removed from this branch."]}),(0,o.jsx)(s.Z,{as:"p",children:"You can resolve merge conflicts using the command line and a text editor."})]})}),(0,o.jsxs)(N,{children:[(0,o.jsx)(y.r,{sx:{flex:1},onClick:c.action,disabled:c.disabled,"data-testid":"discard-button",variant:"danger",children:c.label}),(0,o.jsx)(y.r,{as:g.Z,sx:{flex:1,...M.A},href:a,variant:"primary","data-testid":"open-pr-button",onClick:()=>n("SYNC_FORK.OPEN_PR",{...A,action:"Open pull request"}),children:"Open pull request"})]})]})}try{I.displayName||(I.displayName="FetchUpstreamWithConflictsPopoverContent")}catch{}function P({comparison:e}){let[t,r,a]=function({head:e,base:t}){let[r,o]=(0,h.useState)(),[n,a]=(0,h.useState)(!0),[s,l]=(0,h.useState)(),c=(0,i.H)(),m=(0,d.$_)({repo:c,head:e,base:t});return(0,h.useEffect)(()=>{let e=async()=>{a(!0),o(void 0);let e=await (0,u.v)(m);try{e.ok?o((await e.json()).state):l(e.statusText)}catch(e){l(e?.message||e?.toString())}a(!1)};e()},[m]),[r,n,s]}({base:e.currentRef,head:e.baseBranchRange}),{sendRepoClickEvent:s}=(0,m.a)(),{discardChanges:l,updateBranch:f}=function(){let e=(0,i.H)(),{refInfo:{name:t}}=(0,c.Br)(),r=(0,d.db)({repo:e,refName:t,discard:!0}),o=(0,d.db)({repo:e,refName:t,discard:!1}),n=(0,h.useCallback)(()=>(0,u.Q)(o,{method:"POST"}),[o]),a=(0,h.useCallback)(()=>(0,u.Q)(r,{method:"POST"}),[r]);return{updateBranch:n,discardChanges:a}}(),p=async()=>{s("SYNC_FORK.DISCARD",{...A,action:"Discard Conflicts"});let e=await l();e.ok&&e.url&&(window.location.href=e.url)},y=async()=>{s("SYNC_FORK.UPDATE",{...A,action:"Fetch and merge"});let e=await f();e.ok&&e.url&&(window.location.href=e.url)};return 0===e.behind?(0,o.jsx)(Z,{update:y,discard:p,comparison:e}):r||a?(0,o.jsx)(n.Z,{sx:{p:4,display:"flex",justifyContent:"center"},children:(0,o.jsx)(T.Z,{})}):"clean"===t?(0,o.jsx)(Z,{update:y,discard:p,comparison:e}):(0,o.jsx)(I,{discard:p,comparison:e})}try{P.displayName||(P.displayName="FetchPopoverContainer")}catch{}function _({comparison:e}){let{sendRepoClickEvent:t}=(0,m.a)();return(0,o.jsxs)(p.P,{onOpenChange:r=>r&&t("SYNC_FORK_BUTTON",{category:"Branch Infobar",action:"Open Fetch upstream dropdown",label:"ref_loc:fetch_upstream_dropdown",ahead:e.ahead,behind:e.behind}),children:[(0,o.jsx)(p.P.Anchor,{children:(0,o.jsx)(y.r,{leadingVisual:f.SyncIcon,trailingAction:f.TriangleDownIcon,children:"Sync fork"})}),(0,o.jsx)(p.P.Overlay,{align:"end",sx:{marginTop:2},children:(0,o.jsx)(j,{children:(0,o.jsx)(P,{comparison:e})})})]})}try{_.displayName||(_.displayName="FetchUpstreamButton")}catch{}function D({repo:e,pullRequestNumber:t}){return(0,o.jsxs)(g.Z,{href:(0,d.xR)({repo:e,number:t}),sx:{display:"flex",gap:1,alignItems:"center",color:"fg.muted","&:hover":{color:"accent.fg"}},children:[(0,o.jsx)(f.GitPullRequestIcon,{size:16}),"#",t]})}try{D.displayName||(D.displayName="PullRequestLink")}catch{}function O({sx:e}){let t;let[r,a]=function(){let[e,t]=(0,h.useState)(),[r,o]=(0,h.useState)(),{refInfo:n,path:a}=(0,c.Br)(),s=(0,i.H)(),l=(0,d.Qi)({repo:s,action:"branch-infobar",commitish:n.name,path:a});return(0,h.useEffect)(()=>{let e=async()=>{t(void 0);let e=await (0,u.v)(l);try{e.ok?t(await e.json()):o(422===e.status?"timeout":e.statusText)}catch(e){o(e?.message||e?.toString())}};e()},[l]),[e,r]}(),s=(0,i.H)();return t="timeout"===a?(0,o.jsx)(o.Fragment,{children:"Sorry, getting ahead/behind information for this branch is taking too long."}):r?r.refComparison?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(S,{linkify:!0,repo:s,comparison:r.refComparison}),(0,o.jsx)(n.Z,{sx:{display:"flex",gap:2},children:r.pullRequestNumber?(0,o.jsx)(D,{repo:s,pullRequestNumber:r.pullRequestNumber}):(0,o.jsxs)(o.Fragment,{children:[s.currentUserCanPush&&(0,o.jsx)(F,{comparison:r.refComparison}),s.isFork&&s.currentUserCanPush&&(0,o.jsx)(_,{comparison:r.refComparison})]})})]}):(0,o.jsx)(o.Fragment,{children:"Cannot retrieve ahead/behind information for this branch."}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(l.N,{width:"40%"}),(0,o.jsx)(l.N,{width:"30%"})]}),(0,o.jsx)(U,{sx:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",justifyContent:"space-between",border:"solid 1px",borderColor:"border.default",borderRadius:"6px",pl:3,pr:2,py:2,mb:3,...e},children:t})}function U({children:e,sx:t}){return(0,o.jsx)(n.Z,{"data-testid":"branch-info-bar","aria-live":"polite",sx:{display:"flex",gap:2,bg:"canvas.subtle",fontSize:1,...t},children:e})}function q(){return(0,o.jsx)(a.Z,{variant:"warning",sx:{my:3},children:(0,o.jsx)(s.Z,{children:"Cannot retrieve comparison with upstream repository."})})}try{O.displayName||(O.displayName="BranchInfoBar")}catch{}try{U.displayName||(U.displayName="BranchInfoBarContainer")}catch{}try{q.displayName||(q.displayName="BranchInfoBarErrorBanner")}catch{}},77149:(e,t,r)=>{r.d(t,{t:()=>U});var o,i=r(48055),n=r(18602),a=r(86525),s=r(52674),l=r(22326),c=r(46741),d=r(51952),u=r(85193),h=r(85529),m=r(42483),f=r(97011),p=r(79902),y=r(51461),x=r(98833),g=r(73290),b=r(58081),w=r(81473),j=r(15062),k=r(87623),v=r(79842),N=r(65286);function C({uploadUrl:e}){return(0,i.jsx)("div",{className:"repo-file-upload-tree-target js-document-dropzone js-upload-manifest-tree-view","data-testid":"dragzone","data-drop-url":e,children:(0,i.jsx)("div",{className:"repo-file-upload-outline",children:(0,i.jsxs)("div",{className:"repo-file-upload-slate",children:[(0,i.jsx)(m.Z,{sx:{color:"fg.muted"},children:(0,i.jsx)(h.FileIcon,{size:32})}),(0,i.jsx)("h2",{"aria-hidden":"true",children:"Drop to upload your files"})]})})})}try{C.displayName||(C.displayName="Dropzone")}catch{}var S=r(77461),R=r(86028),M=r(75299),H=r(91863);let F={directory:"Directory",submodule:"Submodule",symlink_directory:"Symlink to directory",symlink_file:"Symlink to file"};function T({item:e}){switch(e.contentType){case"directory":return(0,i.jsx)(h.FileDirectoryFillIcon,{className:"icon-directory"});case"submodule":case"symlink_directory":case"symlink_file":return(0,i.jsx)(h.FileSubmoduleIcon,{className:"icon-directory"});default:return(0,i.jsx)(h.FileIcon,{className:"color-fg-muted"})}}function B({initialFocus:e,item:t,getItemUrl:r,onNavigate:o}){let n=r(t),a=t.hasSimplifiedPath?"This path skips through empty directories":t.name;return"submodule"===t.contentType&&(n=t.submoduleUrl??n,o=e=>{e.preventDefault(),t.submoduleUrl&&(window.location.href=t.submoduleUrl)}),(0,i.jsx)("div",{className:"overflow-hidden",children:(0,i.jsx)("h3",{children:(0,i.jsx)("div",{className:"react-directory-truncate",children:(0,i.jsx)(S.r,{title:a,"aria-label":`${t.name}, ${function({contentType:e}){return`(${F[e]||"File"})`}(t)}`,className:"symlink_directory"!==t.contentType&&"symlink_file"!==t.contentType?"Link--primary":void 0,"data-react-autofocus":!!e||null,onClick:o,to:n,children:(0,i.jsx)(A,{item:t})})})})})}function A({item:e}){return e.hasSimplifiedPath?(0,i.jsx)(i.Fragment,{children:e.name.split("/").map((e,t,r)=>{let o=t===r.length-1;return(0,i.jsx)("span",{className:o?"":"react-directory-default-color","data-testid":"path-name-segment",children:`${e}${o?"":"/"}`},t)})}):e.submoduleDisplayName?(0,i.jsx)("span",{style:{color:"var(--fgColor-accent, var(--color-accent-fg))"},children:e.submoduleDisplayName}):(0,i.jsx)(i.Fragment,{children:e.name})}function Z({commit:e}){return e?e.shortMessageHtmlLink?(0,i.jsx)("div",{children:(0,i.jsx)(M.sF,{className:"react-directory-commit-message",html:e.shortMessageHtmlLink})}):(0,i.jsx)(g.Z,{className:"Link--secondary",href:e.url,children:"No commit message"}):(0,i.jsx)(R.N,{})}function E({commit:e}){return e?.date?(0,i.jsx)("div",{className:"react-directory-commit-age",children:(0,i.jsx)(H.Z,{datetime:e.date,tense:"past"})}):(0,i.jsx)(R.N,{})}try{T.displayName||(T.displayName="IconCell")}catch{}try{B.displayName||(B.displayName="NameCell")}catch{}try{A.displayName||(A.displayName="ItemPathName")}catch{}try{Z.displayName||(Z.displayName="CommitMessageCell")}catch{}try{E.displayName||(E.displayName="CommitAgeCell")}catch{}function L({children:e,sx:t,...r}){return(0,i.jsx)(m.Z,{as:"table",sx:{width:"100%",borderCollapse:"separate",borderSpacing:0,border:"1px solid",borderColor:"border.default",borderRadius:"6px",tableLayout:"fixed",overflow:"hidden",...t},...r,children:e})}let W=({children:e,sx:t})=>(0,i.jsx)(m.Z,{as:"thead",sx:{height:"40px",...t},children:(0,i.jsx)(m.Z,{as:"tr",sx:{p:3,color:"fg.muted",fontSize:0,textAlign:"left",height:"40px",th:{pl:3,backgroundColor:"canvas.subtle"}},children:e})}),I=({children:e,onClick:t,index:r,id:o})=>(0,i.jsx)(m.Z,{as:"tr",sx:{fontSize:1,height:"40px",td:{pl:3,textAlign:"left",borderTopStyle:"solid",borderTopWidth:1,borderTopColor:"border.default"},"&:hover":{bg:"canvas.subtle"}},onClick:t,"data-index":r,id:o,children:e}),P=({children:e})=>(0,i.jsx)(m.Z,{as:"tfoot",sx:{backgroundColor:"canvas.subtle",borderTopColor:"border.default",p:3},children:e});try{L.displayName||(L.displayName="Table")}catch{}try{W.displayName||(W.displayName="HeaderRow")}catch{}try{I.displayName||(I.displayName="Row")}catch{}try{P.displayName||(P.displayName="TableFooter")}catch{}function _({initialFocus:e,item:t,commit:r,onNavigate:o,getItemUrl:n,navigate:a,index:s,className:l}){let c=b.useCallback(e=>{window.innerWidth<d._G.small&&!e.defaultPrevented&&("submodule"===t.contentType?t.submoduleUrl&&a(t.submoduleUrl):a(n(t)))},[t,n,a]);return(0,i.jsx)(()=>(0,i.jsxs)("tr",{className:`react-directory-row ${l}`,onClick:c,id:`folder-row-${s}`,children:[(0,i.jsx)("td",{className:"react-directory-row-name-cell-small-screen",colSpan:2,children:(0,i.jsxs)("div",{className:"react-directory-filename-column",children:[(0,i.jsx)(T,{item:t}),(0,i.jsx)(B,{initialFocus:e,item:t,getItemUrl:n,onNavigate:o})]})}),(0,i.jsx)("td",{className:"react-directory-row-name-cell-large-screen",colSpan:1,children:(0,i.jsxs)("div",{className:"react-directory-filename-column",children:[(0,i.jsx)(T,{item:t}),(0,i.jsx)(B,{initialFocus:e,item:t,getItemUrl:n,onNavigate:o})]})}),(0,i.jsx)("td",{className:"react-directory-row-commit-cell",children:(0,i.jsx)(Z,{commit:r})}),(0,i.jsx)("td",{children:(0,i.jsx)(E,{commit:r})})]}),{})}let D=b.memo(_);function O({initialFocus:e,linkTo:t,linkRef:r,navigate:o}){let{setFocusHint:n}=(0,w.x)(),{path:s}=(0,a.Br)(),l=b.useCallback(()=>{let e=window.innerWidth<d._G.medium;e&&o(t)},[t,o]);return(0,i.jsx)(I,{onClick:l,id:"folder-row-0",children:(0,i.jsxs)(m.Z,{as:"td",colSpan:3,sx:{fontSize:1,fontWeight:400,px:3},children:[(0,i.jsx)(c.N,{as:"h3",text:"parent directory"}),(0,i.jsx)(g.Z,{"aria-label":"Parent directory","data-react-autofocus":!!e||null,"data-testid":"up-tree",as:S.r,muted:!0,onClick:()=>{n(s)},ref:r,rel:"nofollow",sx:{fontWeight:"bold",textDecoration:"none",cursor:"pointer","&:hover":{textDecoration:"none"},"&:focus:focus-visible div":{outline:"2px solid var(--focus-outlineColor, var(--color-accent-fg))",outlineOffset:"-2px"}},to:t,children:(0,i.jsxs)(m.Z,{className:"width-full",sx:{width:16,textAlign:"center",letterSpacing:"2px",display:"flex",alignItems:"center"},children:[(0,i.jsx)(x.Z,{icon:h.FileDirectoryFillIcon,size:"small",sx:{color:"var(--treeViewItem-leadingVisual-iconColor-rest, var(--color-icon-directory))",mr:"10px"}}),".."]})})]})})}try{_.displayName||(_.displayName="WrappedDirectoryRow")}catch{}try{(o=RowContent).displayName||(o.displayName="RowContent")}catch{}try{D.displayName||(D.displayName="DirectoryRow")}catch{}try{O.displayName||(O.displayName="GoDirectoryUpRow")}catch{}function U({overview:e}){let t=(0,s.H)(),{refInfo:r,path:o}=(0,a.Br)(),{items:S,templateDirectorySuggestionUrl:R,totalCount:M}=(0,n.j)(),{items:H}=function(e,t){let r=e.length>t,[o,i]=(0,b.useState)(r);!function(e,t){let r=(0,b.useCallback)(e,t);(0,b.useEffect)(()=>{let e=null,t=null;return t=requestAnimationFrame(()=>{e=setTimeout(()=>{r(),e=null},0),t=null}),()=>{e&&clearTimeout(e),t&&cancelAnimationFrame(t)}},[r])}(()=>{o&&i(!1)},[o]);let n=o?e.slice(0,t):e;return{truncated:o,items:n}}(S,100),[F,T]=b.useState(!!e),B=M-S.length,{commitInfo:A}=function(){let{refInfo:e,path:t}=(0,a.Br)(),r=(0,s.H)(),[o,i]=(0,b.useState)({loading:!0}),n=(0,j.Lr)(),c=(0,l.Qi)({repo:r,action:"tree-commit-info",commitish:e.name,path:t});return(0,b.useEffect)(()=>{let e=!1,t=async()=>{i({loading:!0});let t=await (0,k.v)(c);if(!e)try{t.ok?i({commitInfo:await t.json()}):(n({variant:"warning",message:"Failed to load latest commit information."}),i({error:!0}))}catch(e){i({error:!0})}};return t(),function(){e=!0}},[n,c]),o}(),Z=o.length>1,E=(0,l.C2)(o),_=(0,l.Qi)({repo:t,action:"tree",commitish:r.name,path:E}),U=(0,l.Qi)({repo:t,commitish:r.name,path:o,action:"upload"}),q=b.useRef(null),{getItemUrl:$}=(0,v.B)(),z=(0,u.s)(),{focusHint:Q}=(0,w.x)(),[G,K]=b.useState(-1),V=b.useCallback(e=>{0===e.screenX&&0===e.screenY&&q.current?.focus()},[]),Y=b.useCallback(()=>{T(!1)},[]),X=b.useCallback(e=>{let t;K(e);let r=document.getElementById(`folder-row-${e}`);(t=window.innerWidth<=d._G.medium?r?.querySelector(".react-directory-row-name-cell-small-screen"):r?.querySelector(".react-directory-row-name-cell-large-screen"))||(t=r),t?.getElementsByTagName("a")[0]?.focus()},[]);return(0,i.jsxs)(m.Z,{"data-hpc":!0,children:[(0,i.jsx)("button",{hidden:!0,"data-testid":"focus-next-element-button","data-hotkey":"j",onClick:()=>{let e=Math.min(G+1,Z?H.length:H.length-1);X(e)}}),(0,i.jsx)("button",{hidden:!0,"data-testid":"focus-previous-element-button","data-hotkey":"k",onClick:()=>{X(Math.max(G-1,0))}}),(0,i.jsx)(c.N,{as:"h2",text:"Folders and files",id:"folders-and-files"}),(0,i.jsxs)(L,{"aria-labelledby":"folders-and-files",sx:{overflow:"unset"},children:[(0,i.jsxs)(W,{sx:e?{height:"0px",lineHeight:"0px",tr:{height:"0px",fontSize:"0px"}}:void 0,children:[(0,i.jsx)(m.Z,{as:"th",sx:{width:"100%",borderTopLeftRadius:"6px","@media screen and (min-width: 544px)":{display:"none"}},colSpan:2,children:(0,i.jsx)(f.Z,{sx:{fontWeight:600},children:"Name"})}),(0,i.jsx)(m.Z,{as:"th",sx:{width:"40%",borderTopLeftRadius:"6px","@media screen and (max-width: 543px)":{display:"none"}},colSpan:1,children:(0,i.jsx)(f.Z,{sx:{fontWeight:600},children:"Name"})}),(0,i.jsx)(m.Z,{as:"th",sx:{"@media screen and (max-width: 543px)":{display:"none"}},children:(0,i.jsx)(p.Z,{inline:!0,title:"Last commit message",sx:{maxWidth:"100%"},children:(0,i.jsx)(f.Z,{sx:{fontWeight:600},children:"Last commit message"})})}),(0,i.jsx)(m.Z,{as:"th",sx:{textAlign:"right",pr:3,width:"136px",borderTopRightRadius:"6px"},colSpan:1,children:(0,i.jsx)(p.Z,{inline:!0,title:"Last commit date",sx:{maxWidth:"100%"},children:(0,i.jsx)(f.Z,{sx:{fontWeight:600},children:"Last commit date"})})})]}),(0,i.jsxs)("tbody",{children:[!!e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.Z,{as:"tr",sx:{color:"fg.muted",fontSize:0,height:"40px"},children:(0,i.jsx)(m.Z,{as:"td",colSpan:3,sx:{backgroundColor:"canvas.subtle",p:1,borderTopLeftRadius:2,borderTopRightRadius:2},children:(0,i.jsx)(N.x,{commitCount:e?.commitCount})})}),B>0?(0,i.jsx)("tr",{children:(0,i.jsx)("td",{colSpan:3,children:(0,i.jsxs)(y.Z,{variant:"warning",sx:{borderRadius:0},children:[(0,i.jsx)(x.Z,{icon:h.AlertIcon}),"Sorry, we had to truncate this directory to 1,000 files. ",B," entries were omitted from the list."]})})}):null]}),Z&&(0,i.jsx)(O,{initialFocus:!Q||!H.some(e=>e.path===Q),linkTo:_,linkRef:q,navigate:z}),H.map((e,t)=>(0,i.jsx)(D,{initialFocus:e.path===Q,item:e,commit:(A||{})[e.name],onNavigate:V,getItemUrl:$,navigate:z,className:F&&t>=10?"truncate-for-mobile":void 0,index:Z?t+1:t},e.name)),(0,i.jsx)(m.Z,{as:"tr",className:F&&H.length>10?"show-for-mobile":"d-none",sx:{textAlign:"center",verticalAlign:"center",height:"40px",borderTop:"1px solid",borderColor:"border.default"},"data-testid":"view-all-files-row",children:(0,i.jsx)(m.Z,{as:"td",colSpan:3,onClick:Y,sx:{borderTop:"1px solid var(--borderColor-default, var(--color-border-default))",cursor:"pointer"},children:(0,i.jsx)("div",{children:(0,i.jsx)(g.Z,{as:"button",onClick:Y,children:"View all files"})})})})]}),R&&(0,i.jsx)(P,{children:(0,i.jsx)(I,{children:(0,i.jsxs)("td",{colSpan:3,children:["Customize the issue creation experience with a ",(0,i.jsx)("code",{children:"config.yml"})," file."," ",(0,i.jsx)(g.Z,{href:R,children:"Learn more about configuring a template chooser."})]})})})]}),t.currentUserCanPush&&(0,i.jsx)(C,{uploadUrl:U})]})}try{U.displayName||(U.displayName="DirectoryContent")}catch{}},54431:(e,t,r)=>{r.d(t,{e:()=>h});var o=r(48055),i=r(86525),n=r(52674),a=r(22326),s=r(85529),l=r(42483),c=r(98833),d=r(73290),u=r(71735);function h({errorMessage:e,onAnchorClick:t,path:r,richText:h,stickyHeaderHeight:m,timedOut:f}){let p=(0,n.H)(),{refInfo:y}=(0,i.Br)();return e?(0,o.jsxs)(l.Z,{sx:{py:6,px:3,textAlign:"center"},children:[f&&(0,o.jsx)(c.Z,{icon:s.HourglassIcon,size:32}),(0,o.jsx)(l.Z,{"data-testid":"directory-richtext-error-message",children:e}),f&&(0,o.jsxs)("div",{children:["But you can view the"," ",(0,o.jsx)(d.Z,{href:(0,a.Qi)({repo:p,commitish:y.name,action:"raw",path:r}),"data-testid":"directory-richtext-timeout-raw-link",children:"raw file"}),"."]})]}):h?(0,o.jsx)(u.X,{onAnchorClick:t,richText:h,stickyHeaderHeight:m,sx:{p:5,overflow:"auto"}}):null}try{h.displayName||(h.displayName="DirectoryRichtextContent")}catch{}},56830:(e,t,r)=>{r.d(t,{K:()=>a,n:()=>s});var o=r(48055),i=r(58081);let n=i.createContext(!0);function a({allShortcutsEnabled:e,children:t}){return(0,o.jsxs)(n.Provider,{value:e,children:[" ",t," "]})}function s(){return i.useContext(n)}try{n.displayName||(n.displayName="AllShortcutsEnabledContext")}catch{}try{a.displayName||(a.displayName="AllShortcutsEnabledProvider")}catch{}},15062:(e,t,r)=>{r.d(t,{Is:()=>d,KG:()=>s,Lr:()=>l,QV:()=>c});var o=r(48055),i=r(58081),n=r(89250);let a=(0,i.createContext)({banners:[],addBanner:()=>void 0,addQueuedBanner:()=>void 0});function s(){return(0,i.useContext)(a).banners}function l(){return(0,i.useContext)(a).addBanner}function c(){return(0,i.useContext)(a).addQueuedBanner}function d({children:e}){let t=(0,n.TH)(),[r,s]=(0,i.useState)([]),[l,c]=(0,i.useState)([]),d=(0,i.useCallback)(e=>s(t=>[...t,e]),[]),u=(0,i.useCallback)(e=>c(t=>[...t,e]),[]),h=(0,i.useMemo)(()=>({banners:r,addBanner:d,addQueuedBanner:u}),[d,u,r]);return(0,i.useEffect)(()=>{s(l),c([])},[t.key]),(0,o.jsx)(a.Provider,{value:h,children:e})}try{a.displayName||(a.displayName="CodeViewBannersContext")}catch{}try{d.displayName||(d.displayName="CodeViewBannersProvider")}catch{}},18602:(e,t,r)=>{r.d(t,{J:()=>s,j:()=>a});var o=r(48055),i=r(58081);let n=i.createContext({});function a(){return i.useContext(n)}function s({payload:e,children:t}){return(0,o.jsx)(n.Provider,{value:e,children:t})}try{n.displayName||(n.displayName="TreeContext")}catch{}try{s.displayName||(s.displayName="CurrentTreeProvider")}catch{}},211:(e,t,r)=>{r.d(t,{aM:()=>a,ve:()=>s});var o=r(48055),i=r(58081);let n=(0,i.createContext)({query:"",setQuery:()=>void 0});function a(){return(0,i.useContext)(n)}function s({children:e}){let[t,r]=(0,i.useState)(""),a=(0,i.useMemo)(()=>({query:t,setQuery:r}),[r,t]);return(0,o.jsx)(n.Provider,{value:a,children:e})}try{n.displayName||(n.displayName="FileQueryContext")}catch{}try{s.displayName||(s.displayName="FileQueryProvider")}catch{}},86525:(e,t,r)=>{r.d(t,{Br:()=>l,Ou:()=>c,Tv:()=>s});var o=r(48055),i=r(12008),n=r(58081);let a=n.createContext({});function s({children:e,...t}){return(0,o.jsx)(a.Provider,{value:t,children:e})}function l(){return n.useContext(a)}function c(){return(0,i.M)()}try{a.displayName||(a.displayName="FilesPageInfoContext")}catch{}try{s.displayName||(s.displayName="FilesPageInfoProvider")}catch{}},81473:(e,t,r)=>{r.d(t,{o:()=>s,x:()=>l});var o=r(48055),i=r(71207),n=r(58081);let a=n.createContext({focusHint:null,setFocusHint:()=>void 0});function s({children:e}){let t={key:i.ssrSafeLocation.pathname+i.ssrSafeLocation.search},r=(0,n.useRef)(t.key),s=(0,n.useRef)(t.key),l=(0,n.useRef)({hint:null,location:null}),c=(0,n.useCallback)((e,r)=>{l.current={hint:e,context:r,location:t.key}},[t.key]);s.current!==t.key&&(r.current=s.current,s.current=t.key);let d=l.current.location===r.current,u=d?l.current.hint:null,h=d?l.current.context:null,m=(0,n.useMemo)(()=>({focusHint:u,context:h,setFocusHint:c}),[u,h,c]);return(0,o.jsx)(a.Provider,{value:m,children:e})}function l(){return(0,n.useContext)(a)}try{a.displayName||(a.displayName="FocusHintContext")}catch{}try{s.displayName||(s.displayName="FocusHintContextProvider")}catch{}},79804:(e,t,r)=>{r.d(t,{O:()=>s});var o=r(48055),i=r(58081),n=r(26012),a=r(71207);let s=(0,i.forwardRef)(function({src:e,size:t=20,...r},s){let l=(0,i.useMemo)(()=>{let r=new URL(e,a.ssrSafeLocation.origin);return r.searchParams.has("size")||r.searchParams.has("s")||r.searchParams.set("size",String(2*Number(t))),r.toString()},[e,t]);return(0,o.jsx)(n.Z,{ref:s,src:l,size:t,"data-testid":"github-avatar",...r})});try{s.displayName||(s.displayName="GitHubAvatar")}catch{}},98888:(e,t,r)=>{r.d(t,{h:()=>f});var o=r(48055),i=r(42379),n=r(15173),a=r(41905),s=r(86010),l=r(58081),c=r(15388);let d=c.ZP.span.withConfig({displayName:"ControlledTooltip__TooltipBase",componentId:"sc-d9c4a331-0"})`
&::after {
position: absolute;
z-index: 1000000;
display: none;
/* stylelint-disable-next-line primer/spacing */
padding: 0.5em 0.75em;
font: normal normal 11px/1.5 ${(0,i.U2)("fonts.normal")};
-webkit-font-smoothing: subpixel-antialiased;
color: ${(0,i.U2)("colors.fg.onEmphasis")};
text-align: center;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-wrap: break-word;
white-space: pre;
pointer-events: none;
content: attr(aria-label);
background: ${(0,i.U2)("colors.neutral.emphasisPlus")};
border-radius: ${(0,i.U2)("radii.2")};
opacity: 0;
}
/* delay animation for tooltip */
@keyframes tooltip-appear {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
&.tooltipped-open,
&:hover,
&:active,
&:focus {
&::after {
display: inline-block;
text-decoration: none;
animation-name: tooltip-appear;
animation-duration: 0.1s;
animation-fill-mode: forwards;
animation-timing-function: ease-in;
animation-delay: 0s;
}
}
&.tooltipped-no-delay.tooltipped-open,
&.tooltipped-no-delay:hover,
&.tooltipped-no-delay:active,
&.tooltipped-no-delay:focus {
&::after {
animation-delay: 0s;
}
}
/* Tooltipped south */
&.tooltipped-s,
&.tooltipped-se,
&.tooltipped-sw {
&::after {
top: 100%;
right: 50%;
/* stylelint-disable-next-line primer/spacing */
margin-top: 6px;
}
}
&.tooltipped-se {
&::after {
right: auto;
left: 50%;
margin-left: -${(0,i.U2)("space.3")};
}
}
&.tooltipped-sw::after {
margin-right: -${(0,i.U2)("space.3")};
}
/* Tooltips above the object */
&.tooltipped-n,
&.tooltipped-ne,
&.tooltipped-nw {
&::after {
right: 50%;
bottom: 100%;
/* stylelint-disable-next-line primer/spacing */
margin-bottom: 6px;
}
}
&.tooltipped-ne {
&::after {
right: auto;
left: 50%;
margin-left: -${(0,i.U2)("space.3")};
}
}
&.tooltipped-nw::after {
margin-right: -${(0,i.U2)("space.3")};
}
/* Move the tooltip body to the center of the object. */
&.tooltipped-s::after,
&.tooltipped-n::after {
transform: translateX(50%);
}
/* Tooltipped to the left */
&.tooltipped-w {
&::after {
right: 100%;
bottom: 50%;
/* stylelint-disable-next-line primer/spacing */
margin-right: 6px;
transform: translateY(50%);
}
}
/* tooltipped to the right */
&.tooltipped-e {
&::after {
bottom: 50%;
left: 100%;
/* stylelint-disable-next-line primer/spacing */
margin-left: 6px;
transform: translateY(50%);
}
}
&.tooltipped-align-right-2::after {
right: 0;
margin-right: 0;
}
&.tooltipped-align-left-2::after {
left: 0;
margin-left: 0;
}
${n.Z};
`,u=()=>()=>void 0,h=()=>!1,m=()=>!0,f=(0,l.forwardRef)(function({direction:e="n",className:t,text:r,noDelay:i,align:n,wrap:c,open:f=!1,portalProps:p={},...y},x){let g=(0,l.useSyncExternalStore)(u,m,h),b=(0,s.W)(t,`tooltipped-${e}`,n&&`tooltipped-align-${n}-2`,i&&"tooltipped-no-delay",c&&"tooltipped-multiline",f&&"tooltipped-open");return g?(0,o.jsx)(a.h,{...p,children:(0,o.jsx)(d,{ref:x,role:"tooltip","aria-label":r,...y,sx:{position:"fixed",zIndex:1,...y.sx},className:b})}):null});try{f.displayName||(f.displayName="ControlledTooltip")}catch{}},24815:(e,t,r)=>{r.d(t,{u:()=>l});var o=r(48055),i=r(48030),n=r(58081),a=r(98888),s=r(15429);let l=(0,n.forwardRef)(function({contentRef:e,open:t,anchoredPositionAlignment:r,anchorSide:l,anchorOffset:c,alignmentOffset:d,allowOutOfBounds:u,...h},m){let f=(0,n.useRef)(null);(0,n.useImperativeHandle)(m,()=>f.current);let p=(0,n.useRef)({left:0,top:0}),y=(0,n.useSyncExternalStore)((0,n.useCallback)(r=>{if(!f.current||!e.current||!t)return()=>void 0;let o=(0,s.M)(e.current);return o?.addEventListener("scroll",r),()=>{o?.removeEventListener("scroll",r)}},[e,t]),(0,n.useCallback)(()=>{if(!f.current||!e.current)return p.current;let t=(0,i.N)(f.current,e.current,{align:r??"center",side:l??"outside-top",alignmentOffset:d??0,anchorOffset:c??0,allowOutOfBounds:u});return(t.left!==p.current.left||t.top!==p.current.top)&&(p.current=t),p.current},[e,d,c,r,l,u]),(0,n.useCallback)(()=>p.current,[]));return(0,o.jsx)(a.h,{...h,ref:f,open:t,style:{position:"absolute",...y,...h.style}})});try{l.displayName||(l.displayName="PortalTooltip")}catch{}},79621:(e,t,r)=>{r.d(t,{g:()=>a});var o=r(48055),i=r(58081),n=r(24815);function a({includeAriaAttributes:e=!0,...t}){let r=(0,i.useId)(),[a,s]=(0,i.useState)(!1),l=t.open??a,c=t.id??r,d=(0,i.useCallback)(()=>s(!0),[]),u=(0,i.useCallback)(()=>s(!1),[]);return[{...e?{"aria-describedby":c}:{},onPointerEnter:d,onPointerLeave:u,onFocus:d,onBlur:u},(0,o.jsx)(n.u,{...t,open:l,id:c},"portal-tooltip")]}},75299:(e,t,r)=>{r.d(t,{WZ:()=>h,sF:()=>f,wB:()=>u});var o,i=r(48055),n=r(42483),a=r(97011),s=r(27856),l=r.n(s),c=r(58081);function d(e){if("html"in e&&void 0!==e.html){let{html:t,...r}=e;return{safeHTML:t,props:r}}let{unverifiedHTML:t,unverifiedHTMLConfig:r,...o}=e,i={...r,RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1};return{safeHTML:l().sanitize(t,i),props:o}}let u=m(n.Z);u.displayName="SafeHTMLBox";let h=m(a.Z);function m(e){let t=(0,c.forwardRef)((t,r)=>{let{safeHTML:o,props:n}=d(t);return(0,i.jsx)(e,{ref:r,...n,dangerouslySetInnerHTML:o?{__html:o}:void 0})});return t}h.displayName="SafeHTMLText";let f=(0,c.forwardRef)((e,t)=>{let{safeHTML:r,props:o}=d(e);return(0,i.jsx)("div",{ref:t,...o,dangerouslySetInnerHTML:r?{__html:r}:void 0})});f.displayName="SafeHTMLDiv";try{(o=SafeHTMLComponent).displayName||(o.displayName="SafeHTMLComponent")}catch{}},46741:(e,t,r)=>{r.d(t,{N:()=>n});var o=r(48055),i=r(75308);function n({as:e,text:t,...r}){return(0,o.jsx)(i.Z,{as:e,className:"sr-only","data-testid":"screen-reader-heading",...r,children:t})}try{n.displayName||(n.displayName="ScreenReaderHeading")}catch{}}}]);
//# sourceMappingURL=app_assets_modules_react-shared_hooks_use-canonical-object_ts-ui_packages_code-view-shared_ho-e725dc-c29e50b90370.js.map