"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["keyboard-shortcuts-dialog"],{40578:(e,t,r)=>{let n;function a(){if(!n)throw Error("Client env was requested before it was loaded. This likely means you are attempting to use client env at the module level in SSR, which is not supported. Please move your client env usage into a function.");return n}function i(){return n?.locale??"en-US"}r.d(t,{Kd:()=>i,dU:()=>a}),function(){if("undefined"!=typeof document){let e=document.getElementById("client-env");if(e)try{n=JSON.parse(e.textContent||"")}catch(e){console.error("Error parsing client-env",e)}}}()},87274:(e,t,r)=>{r.d(t,{C:()=>i,x:()=>a});var n=r(71207);let a=n.n4?.readyState==="interactive"||n.n4?.readyState==="complete"?Promise.resolve():new Promise(e=>{n.n4?.addEventListener("DOMContentLoaded",()=>{e()})}),i=n.n4?.readyState==="complete"?Promise.resolve():new Promise(e=>{n.iG?.addEventListener("load",e)})},18515:(e,t,r)=>{r.d(t,{$:()=>d,c:()=>l});var n=r(15205),a=r(40578),i=r(71207);function o(){let e=(0,a.dU)().featureFlags,t=e.map(e=>e.toUpperCase());return new Set(t)}let s=i.W6?o:(0,n.Z)(o);function l(e){return s().has(e.toUpperCase())}let d={isFeatureEnabled:l}},51505:(e,t,r)=>{r.d(t,{eE:()=>i});var n=r(71207);let a={Android:"Android",iOS:"iOS",macOS:"macOS",Windows:"Windows",Linux:"Linux",Unknown:"Unknown"};function i(){return function(){let e=a.Unknown,t=!1;if(n.iG){let r=n.iG.navigator,i=r.userAgent,o=r?.userAgentData?.platform||r.platform;-1!==["Macintosh","MacIntel","MacPPC","Mac68K","macOS"].indexOf(o)?e=a.macOS:-1!==["iPhone","iPad","iPod"].indexOf(o)?e=a.iOS:-1!==["Win32","Win64","Windows","WinCE"].indexOf(o)?e=a.Windows:/Android/.test(i)?e=a.Android:/Linux/.test(o)&&(e=a.Linux),t=r?.userAgentData?.mobile??(e===a.Android||e===a.iOS)}return{os:e,isAndroid:e===a.Android,isIOS:e===a.iOS,isMacOS:e===a.macOS,isWindows:e===a.Windows,isLinux:e===a.Linux,isDesktop:e===a.macOS||e===a.Windows||e===a.Linux,isMobile:t}}().isMacOS}},71483:(e,t,r)=>{r.d(t,{DV:()=>i,D_:()=>n.D_,EL:()=>n.EL,N9:()=>n.N9,Tz:()=>n.Tz,k0:()=>n.k0});var n=r(11793);let a=/(?:^|,)((?:[^,]|,(?=\+| |$))*(?:,(?=,))?)/g;function i(e){return Array.from(e.matchAll(a)).map(([,e])=>e)}},85772:(e,t,r)=>{r.d(t,{Ty:()=>i,YE:()=>o,Zf:()=>l});var n=r(18515),a=r(71483);let i=()=>{let e=document.querySelector("meta[name=keyboard-shortcuts-preference]");return!e||"all"===e.content},o=e=>/Enter|Arrow|Escape|Meta|Control|Mod|Esc/.test(e)||e.includes("Alt")&&e.includes("Shift"),s=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),l=e=>{let t=(0,a.EL)(e),r=function(e){if(!(e instanceof HTMLElement))return!1;let t=e.nodeName.toLowerCase(),r=e.getAttribute("type")?.toLowerCase()??"text",n="true"===e.ariaReadOnly||"true"===e.getAttribute("aria-readonly")||null!==e.getAttribute("readonly");return("select"===t||"textarea"===t||"input"===t&&!s.has(r)||e.isContentEditable)&&!n}(e.target)&&(0,n.c)("no_character_key_shortcuts_in_inputs"),l=i()&&!r;return o(t)||l}},10743:(e,t,r)=>{var n=r(74898),a=r(85893),i=r(67294),o=r(98374),s=r(44067),l=r(42483),d=r(74121),c=r(88216),u=r(59148),m=r(96567);function p({group:{service:{name:e},commands:t}}){let r=(0,i.useId)();return(0,a.jsxs)(l.Z,{sx:{borderRadius:2,border:"1px solid",borderColor:"border.default",overflow:"hidden"},children:[(0,a.jsx)(l.Z,{as:"h3",id:r,sx:{bg:"canvas.subtle",fontWeight:"bold",py:2,px:3,fontSize:1},children:e}),(0,a.jsx)(l.Z,{as:"ul",role:"list","aria-labelledby":r,sx:{listStyleType:"none"},children:t.map(({id:e,name:t,keybinding:r})=>(0,a.jsxs)(l.Z,{as:"li",sx:{borderTop:"1px solid",borderColor:"border.default",py:2,px:3,display:"flex",gap:2,justifyContent:"space-between",alignItems:"center"},children:[(0,a.jsx)(l.Z,{children:t}),(0,a.jsx)(l.Z,{sx:{textAlign:"right"},children:(Array.isArray(r)?r:[r]).map((e,t)=>(0,a.jsxs)(i.Fragment,{children:[t>0&&" or ",(0,a.jsx)(m.u,{keys:e})]},e))})]},e))})]})}try{p.displayName||(p.displayName="ShortcutsGroupList")}catch{}let h={keyboardShortcuts:"Keyboard shortcuts",siteWideShortcuts:"Site-wide shortcuts",loading:"Loading"};var f=r(5202);r(69427);var g=r(87623),y=r(71483);let b=()=>(0,a.jsxs)(l.Z,{role:"status",sx:{display:"flex",height:"100%",justifyContent:"center",alignItems:"center"},children:[(0,a.jsx)(d.Z,{size:"large"}),(0,a.jsx)(s.T,{children:h.loading})]}),v=e=>Array.isArray(e)?e.map(e=>(0,y.D_)(e)):(0,y.D_)(e??""),w=({children:e})=>(0,a.jsx)(l.Z,{sx:{display:"flex",flexDirection:"row",gap:2,flexWrap:"wrap"},children:e}),x=({children:e})=>(0,a.jsx)(l.Z,{sx:{flex:"250px",display:"flex",flexDirection:"column",gap:2},children:e}),E=({visible:e,onVisibleChange:t})=>{let[r,n]=(0,i.useState)({service:{id:"global",name:"Global"},commands:[]}),[o,s]=(0,i.useState)([]),[l,d]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{let t=(0,f.e)(),r=async()=>{d(!0);let e=document.querySelector("meta[name=github-keyboard-shortcuts]");if(!e)throw Error('The "github-keyboard-shortcuts" meta tag must be present');let r={contexts:e.content},a=`/site/keyboard_shortcuts?${new URLSearchParams(r).toString()}`,i=await (0,g.v)(a,{method:"GET"});if(i.ok){let e=await i.json(),{global:r,...a}=e.commands;n({service:{id:"global",name:h.siteWideShortcuts},commands:[...r.commands,...t.find(e=>"global"===e.service.id)?.commands??[]].map(e=>({...e,keybinding:v(e.keybinding)}))});let o=[...Object.values(a),...t].map(e=>({...e,commands:e.commands.map(e=>({...e,keybinding:v(e.keybinding)}))}));s(o)}else s(t.map(e=>({...e,commands:e.commands.map(e=>({...e,keybinding:v(e.keybinding)}))})));d(!1)};e&&r()},[e]),e)?(0,a.jsx)(u.V,{title:h.keyboardShortcuts,"aria-modal":"true",width:"xlarge",height:"large",onClose:()=>t(!1),sx:{color:"fg.default"},children:l?(0,a.jsx)(b,{}):(0,a.jsxs)(w,{children:[(0,a.jsx)(x,{children:o.map(e=>(0,a.jsx)(p,{group:e},e.service.id))}),(0,a.jsxs)(x,{children:[(0,a.jsx)(p,{group:r},r.service.id),(0,a.jsx)(c.r,{as:"a",href:"https://docs.github.com/get-started/accessibility/keyboard-shortcuts",sx:{width:"100%"},children:"View all keyboard shortcuts"})]})]})}):null};try{b.displayName||(b.displayName="LoadingState")}catch{}try{w.displayName||(w.displayName="Columns")}catch{}try{x.displayName||(x.displayName="Column")}catch{}try{E.displayName||(E.displayName="ShortcutsDialog")}catch{}var k=r(18515);function S(){let[e,t]=(0,i.useState)(!1);return(0,k.c)("react_keyboard_shortcuts_dialog")?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.xN,{commands:{"keyboard-shortcuts-dialog:show-dialog":()=>t(!0)}}),(0,a.jsx)(E,{visible:e,onVisibleChange:t})]}):(0,a.jsx)(a.Fragment,{})}try{S.displayName||(S.displayName="KeyboardShortcutsDialog")}catch{}(0,n.t)("keyboard-shortcuts-dialog",{Component:S})},83206:(e,t,r)=>{r.d(t,{e:()=>DeferredRegistry});let DeferredRegistry=class DeferredRegistry{register(e,t){let r=this.registrationEntries[e];r?r.resolve?.(t):this.registrationEntries[e]={promise:Promise.resolve(t)}}getRegistration(e){var t;return(t=this.registrationEntries)[e]||(t[e]=new n),this.registrationEntries[e].promise}constructor(){this.registrationEntries={}}};let n=class Deferred{constructor(){this.promise=new Promise(e=>{this.resolve=e})}}},48968:(e,t,r)=>{r.d(t,{Ac:()=>i,Z_:()=>o,ev:()=>a});var n=r(67294);function a(e){return((0,n.useEffect)(()=>{let t=e?.anchor;t&&("disabled"in t&&(t.disabled=!1),t.classList.remove("cursor-wait"))},[e]),e)?{reactPartialAnchor:{__wrapperElement:e}}:{}}function i(e){let t=(0,n.useRef)(e.__wrapperElement.anchor||null),[r,a]=(0,n.useState)(!1),i=(0,n.useCallback)(()=>{a(!r)},[r,a]);return(0,n.useEffect)(()=>{t.current&&(t.current.setAttribute("aria-expanded",r.toString()),t.current.setAttribute("aria-haspopup","true"))},[t,r]),o(e,i),{ref:t,open:r,setOpen:a}}function o(e,t){let r=(0,n.useRef)(e.__wrapperElement.anchor);(0,n.useEffect)(()=>{let e=r.current;if(e)return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},[r,t])}},74898:(e,t,r)=>{r.d(t,{t:()=>c});var n=r(83206);let a=new n.e;var i=r(85893),o=r(76006),s=r(60302),l=r(75069);let d=class ReactPartialElement extends s.S{async getReactNode(e){var t;let{Component:r}=await (t=this.name,a.getRegistration(t)),n=this.closest("react-partial-anchor");return(0,i.jsx)(l.S,{partialName:this.name,embeddedData:e,Component:r,wasServerRendered:this.hasSSRContent,ssrError:this.ssrError,anchorElement:n})}constructor(...e){super(...e),this.nameAttribute="partial-name"}};function c(e,t){a.register(e,t)}d=function(e,t,r,n){var a,i=arguments.length,o=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}([o.Ih],d)},82914:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(56363);let{getItem:a,setItem:i,removeItem:o}=(0,n.Z)("localStorage"),s="REACT_PROFILING_ENABLED",l={enable:()=>i(s,"true"),disable:()=>o(s),isEnabled:()=>!!a(s)}},54508:(e,t,r)=>{r.d(t,{A7:()=>l,ko:()=>s,q1:()=>o});var n=r(15205),a=r(71207);let i=(0,n.Z)(function(){return a.n4?.head?.querySelector('meta[name="runtime-environment"]')?.content||""}),o=(0,n.Z)(function(){return a.n4?.head?.querySelector('meta[name="is-private-instance"]')?.content==="true"}),s=(0,n.Z)(function(){return"enterprise"===i()}),l="webpack"},56363:(e,t,r)=>{r.d(t,{Z:()=>o,_:()=>s});var n=r(71207),a=r(43786);let i=class NoOpStorage{getItem(){return null}setItem(){}removeItem(){}clear(){}key(){return null}get length(){return 0}};function o(e,t={throwQuotaErrorsOnSet:!1},r=n.iG,o=e=>e,s=e=>e){let l;try{if(!r)throw Error();l=r[e]||new i}catch{l=new i}let{throwQuotaErrorsOnSet:d}=t;function c(e){t.sendCacheStats&&(0,a.b)({incrementKey:e})}function u(e){try{if(l.removeItem(e),t.ttl){let t=`${e}:expiry`;l.removeItem(t)}}catch(e){}}return{getItem:function(e,t=new Date().getTime()){try{let r=l.getItem(e);if(!r)return null;let n=`${e}:expiry`,a=Number(l.getItem(n));if(a&&t>a)return u(e),u(n),c("SAFE_STORAGE_VALUE_EXPIRED"),null;return c("SAFE_STORAGE_VALUE_WITHIN_TTL"),o(r)}catch(e){return null}},setItem:function(e,r,n=new Date().getTime()){try{if(l.setItem(e,s(r)),t.ttl){let r=`${e}:expiry`,a=n+t.ttl;l.setItem(r,a.toString())}}catch(e){if(d&&e instanceof Error&&e.message.toLowerCase().includes("quota"))throw e}},removeItem:u,clear:l.clear,key:l.key,get length(){return l.length}}}function s(e){return o(e,{throwQuotaErrorsOnSet:!1},n.iG,JSON.parse,JSON.stringify)}},71207:(e,t,r)=>{r.d(t,{Qg:()=>n.Qg,W6:()=>n.W6,cF:()=>n.cF,iG:()=>a.iG,n4:()=>a.n4,ssrSafeLocation:()=>a.jX,zu:()=>a.zu});var n=r(60327),a=r(66199)},66199:(e,t,r)=>{r.d(t,{iG:()=>a,jX:()=>o,n4:()=>n,zu:()=>i});let n="undefined"==typeof document?void 0:document,a="undefined"==typeof window?void 0:window,i="undefined"==typeof history?void 0:history,o="undefined"==typeof location?{pathname:"",origin:"",search:"",hash:""}:location},60327:(e,t,r)=>{r.d(t,{Qg:()=>i,W6:()=>a,cF:()=>o});var n=r(66199);let a=void 0===n.n4,i=!a;function o(){return!!a||!!n.n4.querySelector('react-app[data-ssr="true"]')}},43786:(e,t,r)=>{r.d(t,{B:()=>m,b:()=>l});var n=r(71207),a=r(87274),i=r(54508),o=r(18515);let s=[];function l(e,t=!1,r=1){if(!0!==(0,o.c)("BROWSER_STATS_DISABLED")){if(r<0||r>1)throw RangeError("Sampling probability must be between 0 and 1");void 0===e.timestamp&&(e.timestamp=new Date().getTime()),e.loggedIn=!!n.n4?.head?.querySelector('meta[name="user-login"]')?.content,e.staff=m(),e.bundler=i.A7,Math.random()JSON.stringify(e));for(;r.length>0;)t.push(function(e){let t=e.shift(),r=[t],n=t.length;for(;e.length>0&&n<=65536;){let t=e[0].length;if(n+t<=65536){let a=e.shift();r.push(a),n+=t}else break}return r}(r));return t}(s);for(let r of t)!function(e,t){try{navigator.sendBeacon&&navigator.sendBeacon(e,t)}catch{}}(e,`{"stats": [${r.join(",")}] }`);s=[]}function m(){return!!n.n4?.head?.querySelector('meta[name="user-staff"]')?.content}n.n4?.addEventListener("pagehide",u),n.n4?.addEventListener("visibilitychange",u)},82347:(e,t,r)=>{r.d(t,{M:()=>CommandEvent,c:()=>a});var n=r(69427);let CommandEvent=class CommandEvent{constructor(e){this.commandId=e}};let a={entries:e=>Object.entries(e).filter(e=>n.mm.is(e[0])&&void 0!==e[1]),keys:e=>Object.keys(e).filter(n.mm.is)}},5202:(e,t,r)=>{r.d(t,{V:()=>l,e:()=>s});var n=r(67294),a=r(82347),i=r(69427);let o=new Map;function s(){let e=new Map;for(let t of new Set(Array.from(o.values()).flat())){let r=i.mm.getServiceId(t);if(!e.has(r)){let t=(0,i.C6)(r);e.set(r,{service:{id:t.id,name:t.name},commands:[]})}let n=(0,i.gm)(t);n&&n.defaultBinding&&e.get(r)?.commands.push({id:t,name:n.name,description:n.description,keybinding:n.defaultBinding})}return Array.from(e.values())}let l=e=>{let t=(0,n.useId)();(0,n.useEffect)(()=>(o.set(t,a.c.keys(e)),()=>{o.delete(t)}),[e,t])}},69427:(e,t,r)=>{r.d(t,{mm:()=>d,gm:()=>c,gF:()=>m,g_:()=>p,C6:()=>u});var n=r(71483),a=r(18515);let i=JSON.parse('{"services":{"github":{"id":"github","name":"GitHub (site-wide)","commandIds":["github:submit-form","github:open-context-menu"]},"item-pickers":{"id":"item-pickers","name":"Item Pickers","commandIds":["item-pickers:open-assignees","item-pickers:open-development","item-pickers:open-labels","item-pickers:open-milestone","item-pickers:open-projects"]},"keyboard-shortcuts-dialog":{"id":"keyboard-shortcuts-dialog","name":"Keyboard Shortcuts Dialog","commandIds":["keyboard-shortcuts-dialog:show-dialog"]},"pull-requests-diff-view":{"id":"pull-requests-diff-view","name":"Pull requests - \'Files changed\' view","commandIds":["pull-requests-diff-view:copy-code","pull-requests-diff-view:expand-all-hunks","pull-requests-diff-view:expand-hunk-up","pull-requests-diff-view:expand-hunk-down","pull-requests-diff-view:copy-anchor-link","pull-requests-diff-view:start-conversation-current"]},"react-sandbox":{"id":"react-sandbox","name":"React Sandbox","commandIds":["react-sandbox:example-command"]}},"commands":{"github:open-context-menu":{"name":"Open context menu","description":"Open a context menu if one is available","defaultBinding":"Alt+Shift+C"},"github:submit-form":{"name":"Submit form","description":"Submit the current form","defaultBinding":"Mod+Enter"},"item-pickers:open-assignees":{"name":"Open assignees panel","description":"Open panel to select assignees","defaultBinding":"a"},"item-pickers:open-development":{"name":"Open development panel","description":"Open panel to create or link a pull request","defaultBinding":"d"},"item-pickers:open-labels":{"name":"Open labels panel","description":"Open panel to select labels","defaultBinding":"l"},"item-pickers:open-milestone":{"name":"Open milestone panel","description":"Open panel to select milestone","defaultBinding":"m"},"item-pickers:open-projects":{"name":"Open projects panel","description":"Open panel to select projects","defaultBinding":"p"},"keyboard-shortcuts-dialog:show-dialog":{"name":"Show Keyboard Shortcuts Dialog","description":"Display the keyboard shortcuts help dialog","defaultBinding":"Shift+?"},"pull-requests-diff-view:copy-anchor-link":{"name":"Copy anchor link","description":"Copy link to the current line","defaultBinding":"Mod+Alt+y","featureFlag":"prx"},"pull-requests-diff-view:copy-code":{"name":"Copy code","description":"Copy the code for the current line(s)","defaultBinding":"Mod+c","featureFlag":"prx"},"pull-requests-diff-view:expand-all-hunks":{"name":"Expand all","description":"Expand all hunks in the current file","defaultBinding":"Mod+Shift+ArrowLeft","featureFlag":"prx"},"pull-requests-diff-view:expand-hunk-down":{"name":"Expand below","description":"Expand the current hunk downward","featureFlag":"prx"},"pull-requests-diff-view:expand-hunk-up":{"name":"Expand above","description":"Expand the current hunk upward","featureFlag":"prx"},"pull-requests-diff-view:start-conversation-current":{"name":"Start conversation on line","description":"Start a conversation on the current line","featureFlag":"prx"},"react-sandbox:example-command":{"name":"React Sandbox Example Command","description":"Do something.","defaultBinding":"Mod+Shift+Enter"}}}'),{commands:o,services:s}=i,l=new Set(Object.keys(o)),d={is:e=>l.has(e),getServiceId:e=>e.split(":")[0]},c=e=>{let t=o[e];return!t.featureFlag||(0,a.c)(t.featureFlag.toUpperCase())?t:void 0},u=e=>s[e],m=e=>{let t=c(e);return t?.defaultBinding?(0,n.D_)(t.defaultBinding):void 0},p=e=>new Map(e.map(e=>[e,m(e)]).filter(e=>void 0!==e[1]))},98374:(e,t,r)=>{r.d(t,{hj:()=>P,xN:()=>w,FU:()=>j});var n,a=r(69427),i=r(85893),o=r(61511),s=r(67294),l=r(82347),d=r(86058);let c=new d.R({collectorUrl:"https://collector.githubapp.com/ui-commands/collect"}),u={TYPE:"command.trigger",send(e){c.sendEvent(u.TYPE,e)}};function m(e,t){u.send({command_id:e.commandId,trigger_type:t instanceof KeyboardEvent?"keybinding":"click",target_element_html:t.target instanceof HTMLElement?function(e){let t=e.tagName.toLowerCase(),r=Array.from(e.attributes).map(e=>`${e.name}="${e.value.replaceAll('"','\\"')}"`).join(" ");return`<${t}${r?` ${r}`:""}>`}(t.target):void 0,keybinding:(0,a.gF)(e.commandId)})}let p=new Map;function h(e,t){let r=(0,s.useMemo)(()=>new Map,[]),n="global"===e?p:r;(0,s.useEffect)(()=>{for(let[e,r]of(0,a.g_)(l.c.keys(t))){let t=n.get(r)??[];t.length&&console.warn(`The keybinding (${r}) for the "${e}" command conflicts with the keybinding for the already-registered command(s) "${t.join(", ")}". This may result in unpredictable behavior.`),n.set(r,t.concat(e))}return()=>{for(let[e,r]of(0,a.g_)(l.c.keys(t))){let t=function(e,t){let r=!1;return e.filter(e=>e!==t||!!r||(r=!0,!1))}(n.get(r)??[],e);t?.length?n.set(r,t):n.delete(r)}}},[t,n])}var f=r(71483),g=r(85772);function y(e,t){let r=(0,s.useMemo)(()=>new f.k0,[]),n=(0,s.useMemo)(()=>{let t=new Map;for(let r of e){let e=(0,a.gF)(r);e&&t.set(e,r)}return t},[e]),i=(0,s.useRef)(null);return(0,s.useCallback)(e=>{let a="nativeEvent"in e?e.nativeEvent:e;if(i.current===a)return;if(i.current=a,!(0,g.Zf)(a)){r.reset();return}r.registerKeypress(a);let o=n.get(r.sequence)??n.get((0,f.EL)(a));o&&(r.reset(),e.preventDefault(),e.stopPropagation(),t(o,a))},[n,r,t])}var b=r(5202);let v="ui-command-trigger",w=({commands:e})=>{let t=(0,s.useCallback)((t,r)=>{let n=e[t];if(n){let e=new l.M(t);try{n(e)}finally{m(e,r)}}},[e]),r=y(l.c.keys(e),t);return h("global",e),(0,b.V)(e),(0,s.useEffect)(()=>{let e=e=>{let r="detail"in e&&"object"==typeof e.detail?e.detail:void 0;if(!r)return;let n="commandId"in r&&"string"==typeof r.commandId&&a.mm.is(r.commandId)?r.commandId:void 0,i="domEvent"in r&&(r.domEvent instanceof KeyboardEvent||r.domEvent instanceof MouseEvent)?r.domEvent:void 0;n&&i&&t(n,i)};return document.addEventListener("keydown",r),document.addEventListener(v,e),()=>{document.removeEventListener("keydown",r),document.removeEventListener(v,e)}},[r,t]),null};try{w.displayName||(w.displayName="GlobalCommands")}catch{}let x=(0,s.createContext)({triggerCommand:function(e,t){document.dispatchEvent(new CustomEvent(v,{detail:{commandId:e,domEvent:t}}))}}),E=x.Provider,k=()=>(0,s.useContext)(x);var S=r(8504),_=r(31171);let j=(0,s.forwardRef)(({commands:e,as:t="div",...r},n)=>{let a=(0,S.Z)(e),d=k(),c=(0,s.useCallback)((e,t)=>{let r=a.current[e];if(r){let n=new l.M(e);try{r(n)}finally{m(n,t)}}else d.triggerCommand(e,t)},[a,d]);h("scoped",e),(0,b.V)(e);let u=(0,s.useMemo)(()=>({triggerCommand:c}),[c]),p=y(l.c.keys(e),c),f=(0,o.u)(p),g=(0,s.useRef)(null);(0,_.z)(n,g),(0,s.useEffect)(()=>{let e=g.current,t=f.onKeyDown;if(e)return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)});let v="div"!==t?void 0:{display:"contents"};return(0,i.jsx)(E,{value:u,children:(0,i.jsx)(t,{style:v,...r,...f,ref:g})})});j.displayName="ScopedCommands";var C=r(88216),R=r(96567);let A=({commandId:e,...t})=>{let r=(0,a.gF)(e);return r?(0,i.jsx)(R.u,{keys:r,...t}):null};try{A.displayName||(A.displayName="CommandKeybindingHint")}catch{}var O=r(44067);let L=(0,s.forwardRef)(({commandId:e,children:t,trailingVisual:r,showKeybindingHint:n=!1,...o},s)=>{let l=(0,a.gm)(e),{triggerCommand:d}=k();return l?(0,i.jsx)(C.r,{...o,onClick:t=>d(e,t.nativeEvent),trailingVisual:r??n?()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(O.T,{children:"("}),(0,i.jsx)(A,{commandId:e,format:"condensed"}),(0,i.jsx)(O.T,{children:")"})]}):void 0,ref:s,children:t??l.name}):null});L.displayName="CommandButton";try{(n=HintVisual).displayName||(n.displayName="HintVisual")}catch{}var N=r(50919);let I=(0,s.forwardRef)(({commandId:e,"aria-label":t,...r},n)=>{let o=(0,a.gm)(e),{triggerCommand:s}=k();return o?(0,i.jsx)(N.h,{...r,"aria-label":t??o.name,onClick:t=>s(e,t.nativeEvent),ref:n}):null});I.displayName="CommandIconButton";var D=r(52516);let P=(0,s.forwardRef)(({commandId:e,children:t,description:r,leadingVisual:n,trailingVisual:o,...s},l)=>{let d=(0,a.gm)(e),{triggerCommand:c}=k();return d?(0,i.jsxs)(D.S.Item,{...s,onSelect:t=>c(e,t.nativeEvent),ref:l,children:[t??d.name,r&&(0,i.jsx)(D.S.Description,{children:r}),n&&(0,i.jsx)(D.S.LeadingVisual,{children:n}),null!==o&&(0,i.jsx)(D.S.TrailingVisual,{children:o??(0,i.jsx)(A,{commandId:e,format:"condensed"})})]}):null});P.displayName="ActionList.CommandItem"},61511:(e,t,r)=>{r.d(t,{u:()=>o});var n=r(51505),a=r(67294);let i=new Set(["enter","tab"]),o=e=>{let t=(0,a.useRef)(!1),r=(0,a.useRef)(!1),o=(0,a.useCallback)(e=>{"compositionstart"===e.type&&(t.current=!0,r.current=!1),"compositionend"===e.type&&(t.current=!1,r.current=!0)},[]),s=(0,a.useCallback)(a=>{if(!i.has(a.key.toLowerCase())||!t.current){if((0,n.eE)()&&229===a.keyCode&&r.current){r.current=!1;return}e(a)}},[e]),l=(0,a.useMemo)(()=>({onCompositionStart:o,onCompositionEnd:o,onKeyDown:s}),[o,s]);return l}},63451:(e,t,r)=>{r.d(t,{b:()=>i});var n=r(71207),a=r(67294);let i=void 0!==n.iG?.document?.createElement?a.useLayoutEffect:a.useEffect},8504:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(63451),a=r(67294);function i(e){let t=(0,a.useRef)(e);return(0,n.b)(()=>{t.current=e},[e]),t}},87623:(e,t,r)=>{function n(e,t={}){if(e.match(/^(https?:|\/\/)/))throw Error("Can not make cross-origin requests from verifiedFetch");let r={...t.headers,"GitHub-Verified-Fetch":"true","X-Requested-With":"XMLHttpRequest"};return fetch(e,{...t,headers:r})}function a(e,t){let r=t?.headers??{},a={...r,Accept:"application/json","Content-Type":"application/json"},i=t?.body?JSON.stringify(t.body):void 0;return n(e,{...t,body:i,headers:a})}r.d(t,{Q:()=>n,v:()=>a})},96567:(e,t,r)=>{r.d(t,{u:()=>b});var n=r(85893),a=r(97011),i=r(28975),o=r(67294),s=r(44067),l=r(51505);let d={alt:(0,l.eE)()?"\u2325":"Alt",control:"\u2303",shift:"\u21E7",meta:(0,l.eE)()?"\u2318":"Win",mod:(0,l.eE)()?"\u2318":"\u2303",pageup:"PgUp",pagedown:"PgDn",arrowup:"\u2191",arrowdown:"\u2193",arrowleft:"\u2190",arrowright:"\u2192",plus:"+",backspace:"\u232B",delete:"Del",space:"\u2423",tab:"\u21E5",enter:"\u23CE",escape:"Esc",function:"Fn",capslock:"CapsLock",insert:"Ins",printscreen:"PrtScn"},c={alt:(0,l.eE)()?"Option":"Alt",mod:(0,l.eE)()?"Command":"Control","+":"Plus",pageup:"Page Up",pagedown:"Page Down",arrowup:"Up Arrow",arrowdown:"Down Arrow",arrowleft:"Left Arrow",arrowright:"Right Arrow",capslock:"Caps Lock",printscreen:"Print Screen"},u={alt:(0,l.eE)()?"option":"alt",meta:(0,l.eE)()?"command":"Windows",mod:(0,l.eE)()?"command":"control",pageup:"page up",pagedown:"page down",arrowup:"up arrow",arrowdown:"down arrow",arrowleft:"left arrow",arrowright:"right arrow",capslock:"caps lock",printscreen:"print screen","`":"backtick","~":"tilde","!":"exclamation point","@":"at","#":"hash",$:"dollar sign","%":"percent","^":"caret","&":"ampersand","*":"asterisk","(":"left parenthesis",")":"right parenthesis",_:"underscore","-":"dash","+":"plus","=":"equals","[":"left bracket","{":"left curly brace","]":"right bracket","}":"right curly brace","\\":"backslash","|":"pipe",";":"semicolon",":":"colon","'":"single quote",'"':"double quote",",":"comma","<":"left angle bracket",".":"period",">":"right angle bracket","/":"forward slash","?":"question mark"," ":"space"},m={control:1,meta:2,alt:3,option:4,shift:5,function:6,DEFAULT:7};function p(e){return e in m?m[e]:m.DEFAULT}let h=({children:e})=>(0,n.jsx)(a.Z,{as:"kbd",sx:{color:"inherit",fontFamily:"inherit",fontSize:"inherit",border:"none",background:"none",boxShadow:"none",p:0,lineHeight:"unset",position:"relative",overflow:"visible"},children:e}),f=({name:e,format:t})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.T,{children:u[e]||e}),(0,n.jsx)("span",{"aria-hidden":!0,children:("condensed"===t?d[e]:c[e])??(0,i.Z)(e)})]}),g=(e,t)=>p(e)-p(t),y=({keys:e,format:t="condensed"})=>(0,n.jsx)(a.Z,{sx:{display:"inline-flex",bg:"canvas.default",color:"fg.muted",border:"1px solid",borderColor:"border.default",borderRadius:2,fontWeight:"normal",fontFamily:"normal",fontSize:0,p:1,gap:"0.5ch",boxShadow:"none",verticalAlign:"baseline",overflow:"hidden",lineHeight:"10px"},children:e.split("+").map(e=>e.toLowerCase()).sort(g).map((e,r)=>(0,n.jsxs)(o.Fragment,{children:[r>0&&"full"===t?(0,n.jsx)("span",{"aria-hidden":!0,children:" + "}):" ",(0,n.jsx)(f,{name:e,format:t})]},r))}),b=(0,o.memo)(({keys:e,format:t="condensed"})=>(0,n.jsx)(h,{children:e.split(" ").map((e,r)=>(0,n.jsxs)(o.Fragment,{children:[r>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.T,{children:", then"})," "]}),(0,n.jsx)(y,{keys:e,format:t})]},r))}));b.displayName="KeyboardKey";try{h.displayName||(h.displayName="Kbd")}catch{}try{y.displayName||(y.displayName="Chord")}catch{}},75069:(e,t,r)=>{r.d(t,{S:()=>h});var n=r(85893),a=r(67294),i=r(66629),o=r(12599),s=r(73216),l=r(89250),d=r(22877);function c({children:e,history:t}){let[r,i]=(0,a.useState)({location:t.location});return(0,d.g)(()=>t.listen(i),[t]),(0,n.jsx)(l.F0,{location:r.location,navigator:t,children:e})}try{c.displayName||(c.displayName="PartialRouter")}catch{}var u=r(80491),m=r(7533),p=r(48968);function h({partialName:e,embeddedData:t,Component:r,wasServerRendered:l,ssrError:d,anchorElement:h}){let f=a.useRef(),g=globalThis.window;f.current||(f.current=g?(0,m.l)({window:g}):(0,o.PP)({initialEntries:[{pathname:"/"}]}));let y=f.current,b=(0,p.ev)(h);return(0,n.jsx)(i.R,{appName:e,wasServerRendered:l,children:(0,n.jsx)(s.i,{history:y,routes:[],children:(0,n.jsxs)(c,{history:y,children:[(0,n.jsx)(r,{...t.props,...b}),(0,n.jsx)(u.P,{ssrError:d})]})})})}try{h.displayName||(h.displayName="PartialEntry")}catch{}},60302:(e,t,r)=>{r.d(t,{S:()=>ReactBaseElement});var n=r(85893),a=r(76006),i=r(20745),o=r(67294),s=r(82914),l=r(18448);function d(e,t,r,n){var a,i=arguments.length,o=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}let ReactBaseElement=class ReactBaseElement extends HTMLElement{get name(){return this.getAttribute(this.nameAttribute)}get embeddedDataText(){let e=this.embeddedData?.textContent;if(!e)throw Error(`No embedded data provided for react element ${this.name}`);return e}get hasSSRContent(){return"true"===this.getAttribute("data-ssr")}connectedCallback(){this.renderReact()}disconnectedCallback(){this.root?.unmount(),this.root=void 0}async renderReact(){if(!this.reactRoot)throw Error("No react root provided");let e={createRoot:i.s,hydrateRoot:i.a};s.Z.isEnabled()&&(e=await this.getReactDomWithProfiling());let t=JSON.parse(this.embeddedDataText),r=this.ssrError?.textContent,a=await this.getReactNode(t),l=(0,n.jsx)(o.StrictMode,{children:a});if(r&&this.logSSRError(r),this.hasSSRContent){let t=this.querySelector('style[data-styled="true"]');t&&document.head.appendChild(t),this.root=e.hydrateRoot(this.reactRoot,l,{onRecoverableError:()=>{}}),t&&requestIdleCallback(()=>{t.parentElement?.removeChild(t)})}else this.root=e.createRoot(this.reactRoot),this.root.render(l);this.classList.add("loaded")}getReactDomWithProfiling(){return r.e("react-profiling").then(r.t.bind(r,62518,19))}logSSRError(e){if(l.t[e])return console.error("SSR failed with an expected error:",l.t[e]);try{let t=JSON.parse(e),r=function(e){if(!e.stacktrace)return"";let t="\n ",r=e.stacktrace.map(e=>{let{function:r,filename:n,lineno:a,colno:i}=e,o=`${t} at ${r} (${n}:${a}:${i})`;return t=" ",o});return r.join("\n")}(t);console.error("Error During Alloy SSR:",`${t.type}: ${t.value} `,t,r)}catch{console.error("Error During Alloy SSR:",e,"unable to parse as json")}}};d([a.fA],ReactBaseElement.prototype,"embeddedData",void 0),d([a.fA],ReactBaseElement.prototype,"ssrError",void 0),d([a.fA],ReactBaseElement.prototype,"reactRoot",void 0)},44067:(e,t,r)=>{r.d(t,{T:()=>a});var n=r(15388);let a=n.ZP.span.withConfig({displayName:"VisuallyHidden",componentId:"sc-ea4b9adb-0"})` border: 0; clip: rect(0 0 0 0); /* Elements without a height and width aren't accessible to screen readers * however, the negative margin trick is used to hide the element by removing * the same amount of margin as the height and width * */ height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; `}},e=>{var t=t=>e(e.s=t);e.O(0,["react-lib","vendors-node_modules_primer_octicons-react_dist_index_esm_js-node_modules_primer_react_lib-es-541a38","vendors-node_modules_primer_react_lib-esm_Box_Box_js","vendors-node_modules_primer_react_lib-esm_Button_Button_js","vendors-node_modules_primer_react_lib-esm_ActionList_index_js","vendors-node_modules_primer_behaviors_dist_esm_focus-zone_js","vendors-node_modules_primer_react_lib-esm_Button_IconButton_js-node_modules_primer_react_lib--73d4d2","ui_packages_react-core_create-browser-history_ts-ui_packages_react-core_AppContextProvider_ts-809ab9"],()=>t(10743)),e.O()}]); //# sourceMappingURL=keyboard-shortcuts-dialog-54c8b5e5c6d5.js.map