@primer/components 0.0.0-202192953933 → 0.0.0-20219296335

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,14 +19,14 @@
19
19
  `,Ct=i.default.div`
20
20
  ${wt};
21
21
  ${yt};
22
- `;function zt(e){const{children:t,...r}=e;return require("focus-visible"),n.default.createElement(Ct,Tt({},r,{"data-portal-root":!0}),n.default.createElement(Et,null),t)}zt.displayName="BaseStyles",zt.defaultProps={color:"fg.default",fontFamily:"normal",lineHeight:"default"};var Rt=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Nt}(e)}(e)};var Nt="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function At(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Pt((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function It(e,t,r){return e.concat(t).map((function(e){return At(e,r)}))}function Lt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Ot(e,t){try{return t in e}catch(e){return!1}}function Mt(e,t,r){var o={};return r.isMergeableObject(e)&&Lt(e).forEach((function(t){o[t]=At(e[t],r)})),Lt(t).forEach((function(a){(function(e,t){return Ot(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(Ot(e,a)&&r.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return Pt;var r=t.customMerge(e);return"function"==typeof r?r:Pt}(a,r)(e[a],t[a],r):o[a]=At(t[a],r))})),o}function Pt(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||It,r.isMergeableObject=r.isMergeableObject||Rt,r.cloneUnlessOtherwiseSpecified=At;var o=Array.isArray(t);return o===Array.isArray(e)?o?r.arrayMerge(e,t,r):Mt(e,t,r):At(t,r)}Pt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return Pt(e,r,t)}),{})};var Ht=Pt;const Dt="light",Wt="dark",Ft=n.default.createContext({setColorMode:()=>null,setDayScheme:()=>null,setNightScheme:()=>null}),_t=({children:e,...t})=>{var o,a,i,l,s,c,f,u;const{theme:g,colorMode:b,dayScheme:p,nightScheme:h}=jt(),m=null!==(o=null!==(a=t.theme)&&void 0!==a?a:g)&&void 0!==o?o:d,[v,x]=n.default.useState(null!==(i=null!==(l=t.colorMode)&&void 0!==l?l:b)&&void 0!==i?i:"day"),[y,w]=n.default.useState(null!==(s=null!==(c=t.dayScheme)&&void 0!==c?c:p)&&void 0!==s?s:Dt),[B,k]=n.default.useState(null!==(f=null!==(u=t.nightScheme)&&void 0!==u?u:h)&&void 0!==f?f:Wt),$=function(e,t){switch(e){case"auto":return t;default:return e}}(v,function(){const[e,t]=n.default.useState(Gt);return n.default.useEffect((()=>{var e,r;const o=null===(e=window)||void 0===e||null===(r=e.matchMedia)||void 0===r?void 0:r.call(e,"(prefers-color-scheme: dark)");function a(e){const r=e.matches;t(r?"night":"day")}if(o){if(void 0!==o.addEventListener)return o.addEventListener("change",a),function(){o.removeEventListener("change",a)};if(void 0!==o.addListener)return o.addListener(a),function(){o.removeListener(a)}}}),[]),e}()),S=function(e,t,r){switch(e){case"day":return t;case"night":return r}}($,y,B),T=n.default.useMemo((()=>function(e,t){if(!e.colorSchemes)return e;if(!e.colorSchemes[t]){console.error(`\`${t}\` scheme not defined in \`theme.colorSchemes\``);const r=Object.keys(e.colorSchemes)[0];return Ht(e,e.colorSchemes[r])}return Ht(e,e.colorSchemes[t])}(m,S)),[m,S]);return n.default.useEffect((()=>{var e,r;x(null!==(e=null!==(r=t.colorMode)&&void 0!==r?r:b)&&void 0!==e?e:"day")}),[t.colorMode,b]),n.default.useEffect((()=>{var e,r;w(null!==(e=null!==(r=t.dayScheme)&&void 0!==r?r:p)&&void 0!==e?e:Dt)}),[t.dayScheme,p]),n.default.useEffect((()=>{var e,r;k(null!==(e=null!==(r=t.nightScheme)&&void 0!==r?r:h)&&void 0!==e?e:Wt)}),[t.nightScheme,h]),n.default.createElement(Ft.Provider,{value:{theme:T,colorScheme:S,colorMode:v,resolvedColorMode:$,dayScheme:y,nightScheme:B,setColorMode:x,setDayScheme:w,setNightScheme:k}},n.default.createElement(r.ThemeProvider,{theme:T},e))};function jt(){return n.default.useContext(Ft)}function Ut(e,t){var r;const{colorScheme:o=""}=jt();return null!==(r=e[o])&&void 0!==r?r:t}function Gt(){var e,t,r;return"undefined"!=typeof window&&null!==(e=(t=window).matchMedia)&&void 0!==e&&null!==(r=e.call(t,"(prefers-color-scheme: dark)"))&&void 0!==r&&r.matches?"night":"day"}_t.displayName="ThemeProvider";var Vt=_t;var Kt=e=>te(e.sx);var qt=i.default.div(U,E,C,S,z,N,O,I,P,G,Kt);const Xt=i.default(qt)``;Xt.defaultProps={borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2};var Yt=Xt;const Jt=i.default(qt)``;Jt.defaultProps={display:"flex"};var Zt=Jt;const Qt=i.default(qt)``;Qt.defaultProps={display:"grid"};var er=Qt;const tr=i.default(qt)``;var rr=tr;const or=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"absolute",ref:t}))));or.displayName="Absolute";const ar=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"fixed",ref:t}))));ar.displayName="Fixed";const nr=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"relative",ref:t}))));nr.displayName="Relative";const ir=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"sticky",ref:t}))));function lr({ref:e,closeOnOutsideClick:r,defaultOpen:o,onClickOutside:a}){const[n,i]=t.useState(o),l=t.useRef(null),d=null!=e?e:l,s=t.useCallback((e=>{const{current:t}=d;e.target.closest("details")!==t&&(a&&a(e),e.defaultPrevented||i(!1))}),[d,i,a]);t.useEffect((()=>{if(n&&r)return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}}),[n,r,s]);const c=e=>{if(!e.defaultPrevented){const t=e.target;i(t.open)}};return{open:n,setOpen:i,getDetailsProps:()=>({onToggle:c,open:n,ref:d})}}ir.defaultProps={top:0,zIndex:1},ir.displayName="Sticky";const dr=!0;function sr(e){if(!e.defaultPrevented)for(const t of Object.values(cr).reverse())if(t(e)===dr||e.defaultPrevented)break}const cr={};let fr=0;const ur=({containerRef:e,ignoreClickRefs:r,onClickOutside:o})=>{const a=t.useMemo((()=>fr++),[]),n=t.useCallback((t=>{var a;return t instanceof MouseEvent&&t.button>0||null!==(a=e.current)&&void 0!==a&&a.contains(t.target)||r&&r.some((({current:e})=>null==e?void 0:e.contains(t.target)))?dr:void o(t)}),[e,r,o]);t.useEffect((()=>(0===Object.keys(cr).length&&document.addEventListener("mousedown",sr,{capture:!0}),function(e,t){cr[e]=t}(a,n),()=>{!function(e){delete cr[e]}(a),0===Object.keys(cr).length&&document.removeEventListener("mousedown",sr,{capture:!0})})),[a,n])};function*gr(e,t={}){var r,o;const a=null!==(r=t.strict)&&void 0!==r&&r,n=null!==(o=t.onlyTabbable)&&void 0!==o&&o?pr:br,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e instanceof HTMLElement&&n(e,a)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let l=null;if(!t.reverse&&n(e,a)&&(yield e),t.reverse){let e=i.lastChild();for(;e;)l=e,e=i.lastChild()}else l=i.firstChild();for(;l instanceof HTMLElement;)yield l,l=t.reverse?i.previousNode():i.nextNode();t.reverse&&n(e,a)&&(yield e)}function br(e,t=!1){const r=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled,o=e.hidden,a=e instanceof HTMLInputElement&&"hidden"===e.type;if(r||o||a)return!1;if(t){const t=0===e.offsetWidth||0===e.offsetHeight,r=["hidden","collapse"].includes(getComputedStyle(e).visibility),o=0===e.getClientRects().length;if(t||r||o)return!1}return null!=e.getAttribute("tabindex")||!(e instanceof HTMLAnchorElement&&null==e.getAttribute("href"))&&-1!==e.tabIndex}function pr(e,t=!1){return br(e,t)&&"-1"!==e.getAttribute("tabindex")}function hr({initialFocusRef:e,returnFocusRef:r,containerRef:o,preventFocusOnOpen:a}){t.useEffect((()=>{if(a)return;const t=r.current;if(e&&e.current)e.current.focus();else if(o.current){const e=gr(o.current).next().value;null==e||e.focus()}return function(){null==t||t.focus()}}),[e,r,o,a])}const mr=[];function vr(e){if("Escape"===e.key&&!e.defaultPrevented)for(let t=mr.length-1;t>=0&&(mr[t](e),!e.defaultPrevented);--t);}const xr=(e,r=[e])=>{const o=t.useCallback(e,r);t.useEffect((()=>(0===mr.length&&document.addEventListener("keydown",vr),mr.push(o),()=>{mr.splice(mr.findIndex((e=>e===o)),1),0===mr.length&&document.removeEventListener("keydown",vr)})),[o])};function yr(e){const t=n.default.useRef(null);return null!=e?e:t}const wr=({overlayRef:e,returnFocusRef:t,initialFocusRef:r,onEscape:o,ignoreClickRefs:a,onClickOutside:n,preventFocusOnOpen:i})=>{const l=yr(e);return hr({containerRef:l,returnFocusRef:t,initialFocusRef:r,preventFocusOnOpen:i}),ur({containerRef:l,ignoreClickRefs:a,onClickOutside:n}),xr(o),{ref:l}};let Br,kr=!1;function $r(){}try{const e=Object.create({},{signal:{get(){kr=!0}}});window.addEventListener("test",$r,e),window.removeEventListener("test",$r,e)}catch(Kd){}function Sr(){kr||(!function(){if("undefined"==typeof window)return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,o){return"object"==typeof o&&"signal"in o&&o.signal instanceof AbortSignal&&e.call(o.signal,"abort",(()=>{this.removeEventListener(t,r,o)})),e.call(this,t,r,o)}}(),kr=!0)}function Tr(){return void 0===Br&&(Br=/^mac/i.test(window.navigator.platform)),Br}let Er,Cr=1e4;function zr(){return"__primer_id_"+Cr++}Sr(),function(e){e[e.ArrowHorizontal=1]="ArrowHorizontal",e[e.ArrowVertical=2]="ArrowVertical",e[e.JK=4]="JK",e[e.HL=8]="HL",e[e.HomeAndEnd=16]="HomeAndEnd",e[e.PageUpDown=256]="PageUpDown",e[e.WS=32]="WS",e[e.AD=64]="AD",e[e.Tab=128]="Tab",e[e.ArrowAll=e.ArrowHorizontal|e.ArrowVertical]="ArrowAll",e[e.HJKL=e.HL|e.JK]="HJKL",e[e.WASD=e.WS|e.AD]="WASD",e[e.All=e.ArrowAll|e.HJKL|e.HomeAndEnd|e.PageUpDown|e.WASD|e.Tab]="All"}(Er||(Er={}));const Rr={ArrowLeft:Er.ArrowHorizontal,ArrowDown:Er.ArrowVertical,ArrowUp:Er.ArrowVertical,ArrowRight:Er.ArrowHorizontal,h:Er.HL,j:Er.JK,k:Er.JK,l:Er.HL,a:Er.AD,s:Er.WS,w:Er.WS,d:Er.AD,Tab:Er.Tab,Home:Er.HomeAndEnd,End:Er.HomeAndEnd,PageUp:Er.PageUpDown,PageDown:Er.PageUpDown},Nr={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end"};function Ar(e){const t=Nr[e.key];if("Tab"===e.key&&e.shiftKey)return"previous";const r=Tr();if(r&&e.metaKey||!r&&e.ctrlKey){if("ArrowLeft"===e.key||"ArrowUp"===e.key)return"start";if("ArrowRight"===e.key||"ArrowDown"===e.key)return"end"}return t}const Ir="data-is-active-descendant",Lr="activated-directly",Or="activated-indirectly",Mr="data-has-active-descendant";function Pr(e,t){var r,o,a,n;const i=[],l=new WeakMap,d=null!==(r=null==t?void 0:t.bindKeys)&&void 0!==r?r:(null!=t&&t.getNextFocusable?Er.ArrowAll:Er.ArrowVertical)|Er.HomeAndEnd,s=null!==(o=null==t?void 0:t.focusOutBehavior)&&void 0!==o?o:"stop",c=null!==(a=null==t?void 0:t.focusInStrategy)&&void 0!==a?a:"previous",f=null==t?void 0:t.activeDescendantControl,u=null==t?void 0:t.onActiveDescendantChanged;let g;function b(){return i[0]}function p(e,t=!1){const r=g;g=e,f?e&&document.activeElement===f?h(r,e,t):m():(r&&r!==e&&l.has(r)&&r.setAttribute("tabindex","-1"),null==e||e.setAttribute("tabindex","0"))}function h(t,r,o=!1){r.id||r.setAttribute("id",zr()),t&&t!==r&&t.removeAttribute(Ir),f&&(o||f.getAttribute("aria-activedescendant")!==r.id)&&(f.setAttribute("aria-activedescendant",r.id),e.setAttribute(Mr,r.id),r.setAttribute(Ir,o?Lr:Or),null==u||u(r,t,o))}function m(t=g){"first"===c&&(g=void 0),null==f||f.removeAttribute("aria-activedescendant"),e.removeAttribute(Mr),null==t||t.removeAttribute(Ir),null==u||u(void 0,t,!1)}function v(...e){const r=e.filter((e=>{var r,o;return null===(r=null==t||null===(o=t.focusableElementFilter)||void 0===o?void 0:o.call(t,e))||void 0===r||r}));if(0===r.length)return;const o=i.findIndex((e=>(e.compareDocumentPosition(r[0])&Node.DOCUMENT_POSITION_PRECEDING)>0));i.splice(-1===o?i.length:o,0,...r);for(const e of r)l.has(e)||l.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1");g||p(b())}function x(...e){for(const t of e){const e=i.indexOf(t);e>=0&&i.splice(e,1);const r=l.get(t);if(void 0!==r&&(null===r?t.removeAttribute("tabindex"):t.setAttribute("tabindex",r),l.delete(t)),t===g){p(b())}}}v(...gr(e)),p(b());new MutationObserver((e=>{for(const t of e)for(const e of t.removedNodes)e instanceof HTMLElement&&x(...gr(e));for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&v(...gr(e))})).observe(e,{subtree:!0,childList:!0});const y=new AbortController,w=null!==(n=null==t?void 0:t.abortSignal)&&void 0!==n?n:y.signal;let B;w.addEventListener("abort",(()=>{x(...i)})),e.addEventListener("mousedown",(e=>{e.target instanceof HTMLElement&&e.target!==document.activeElement&&(B=i.indexOf(e.target))}),{signal:w}),f?(e.addEventListener("focusin",(e=>{e.target instanceof HTMLElement&&i.includes(e.target)&&(f.focus(),p(e.target))})),e.addEventListener("mousemove",(({target:e})=>{if(!(e instanceof Node))return;const t=i.find((t=>t.contains(e)));t&&p(t)}),{signal:w,capture:!0}),f.addEventListener("focusin",(()=>{g?h(void 0,g):p(b())})),f.addEventListener("focusout",(()=>{m()}))):e.addEventListener("focusin",(t=>{if(t.target instanceof HTMLElement)if(void 0!==B)B>=0&&i[B]!==g&&p(i[B]),B=void 0;else if("previous"===c)p(t.target);else if("closest"===c||"first"===c){if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e="previous"===$?i.length-1:0,t=i[e];return void(null==t||t.focus())}p(t.target)}else if("function"==typeof c)if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e=c(t.relatedTarget);if((e?i.indexOf(e):-1)>=0&&e instanceof HTMLElement)return void e.focus();console.warn("Element requested is not a known focusable element.")}else p(t.target);$=void 0}),{signal:w});const k=null!=f?f:e;let $;return"closest"===c&&document.addEventListener("keydown",(e=>{"Tab"===e.key&&($=Ar(e))}),{signal:w,capture:!0}),k.addEventListener("keydown",(r=>{if(r.key in Nr){const a=Rr[r.key];if(!r.defaultPrevented&&(a&d)>0&&!function(e,t){const r=e.key,o=[...r].length,a=t instanceof HTMLInputElement&&"text"===t.type||t instanceof HTMLTextAreaElement;if(a&&(1===o||"Home"===r||"End"===r))return!0;if(t instanceof HTMLSelectElement){if(1===o)return!0;if("ArrowDown"===r&&Tr()&&!e.metaKey)return!0;if("ArrowDown"===r&&!Tr()&&e.altKey)return!0}if(t instanceof HTMLTextAreaElement&&("PageUp"===r||"PageDown"===r))return!0;if(a){const e=t,o=0===e.selectionStart&&0===e.selectionEnd,a=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===r&&!o)return!0;if("ArrowRight"===r&&!a)return!0;if(e instanceof HTMLTextAreaElement){if("ArrowUp"===r&&!o)return!0;if("ArrowDown"===r&&!a)return!0}}return!1}(r,document.activeElement)){const a=Ar(r);let n;var o;if(null!=t&&t.getNextFocusable)n=t.getNextFocusable(a,null!==(o=document.activeElement)&&void 0!==o?o:void 0,r);if(!n){const t=function(){if(!g)return 0;const t=i.indexOf(g);return-1!==t?t:g===e?-1:0}();let o=t;"previous"===a?o-=1:"start"===a?o=0:"next"===a?o+=1:o=i.length-1,o<0&&(o="wrap"===s&&"Tab"!==r.key?i.length-1:0),o>=i.length&&(o="wrap"===s&&"Tab"!==r.key?0:i.length-1),t!==o&&(n=i[o])}f?p(n||g,!0):n&&($=a,n.focus()),("Tab"!==r.key||n)&&r.preventDefault()}}}),{signal:w}),y}var Hr={small:16,medium:32,large:64};function Dr(e){var t=e["aria-label"],r=e.className,o=e.fill,a=void 0===o?"currentColor":o,n=e.size,i=e.verticalAlign,l=e.svgDataByHeight,d=Hr[n]||n,s=function(e,t){return e.map((function(e){return parseInt(e,10)})).reduce((function(e,r){return r<=t?r:e}),e[0])}(Object.keys(l),d),c=l[s].width;return{"aria-hidden":t?"false":"true","aria-label":t,role:"img",className:r,viewBox:"0 0 "+c+" "+s,width:d*(c/s),height:d,fill:a,style:{display:"inline-block",userSelect:"none",verticalAlign:i},dangerouslySetInnerHTML:{__html:l[s].path}}}var Wr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};function Fr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M21.03 5.72a.75.75 0 010 1.06l-11.5 11.5a.75.75 0 01-1.072-.012l-5.5-5.75a.75.75 0 111.084-1.036l4.97 5.195L19.97 5.72a.75.75 0 011.06 0z"></path>'}}})))}function _r(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M5 3.254V3.25v.005a.75.75 0 110-.005v.004zm.45 1.9a2.25 2.25 0 10-1.95.218v5.256a2.25 2.25 0 101.5 0V7.123A5.735 5.735 0 009.25 9h1.378a2.251 2.251 0 100-1.5H9.25a4.25 4.25 0 01-3.8-2.346zM12.75 9a.75.75 0 100-1.5.75.75 0 000 1.5zm-8.5 4.5a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.75 21a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 19.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM5.75 6.5a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 4.75a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM18.25 15a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM15 13.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0z"></path><path fill-rule="evenodd" d="M6.5 7.25c0 2.9 2.35 5.25 5.25 5.25h4.5V14h-4.5A6.75 6.75 0 015 7.25h1.5z"></path><path fill-rule="evenodd" d="M5.75 16.75A.75.75 0 006.5 16V8A.75.75 0 005 8v8c0 .414.336.75.75.75z"></path>'}}})))}function jr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M4.75 3a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 4.75a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zM4.75 17.5a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zm17.75-1.75a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM16 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0z"></path><path fill-rule="evenodd" d="M4.75 7.25A.75.75 0 015.5 8v8A.75.75 0 014 16V8a.75.75 0 01.75-.75zm8.655-5.53a.75.75 0 010 1.06L12.185 4h4.065A3.75 3.75 0 0120 7.75v8.75a.75.75 0 01-1.5 0V7.75a2.25 2.25 0 00-2.25-2.25h-4.064l1.22 1.22a.75.75 0 01-1.061 1.06l-2.5-2.5a.75.75 0 010-1.06l2.5-2.5a.75.75 0 011.06 0z"></path>'}}})))}function Ur(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 0110.65-5.003.75.75 0 00.959-1.153 8 8 0 102.592 8.33.75.75 0 10-1.444-.407A6.5 6.5 0 011.5 8zM8 12a1 1 0 100-2 1 1 0 000 2zm0-8a.75.75 0 01.75.75v3.5a.75.75 0 11-1.5 0v-3.5A.75.75 0 018 4zm4.78 4.28l3-3a.75.75 0 00-1.06-1.06l-2.47 2.47-.97-.97a.749.749 0 10-1.06 1.06l1.5 1.5a.75.75 0 001.06 0z"></path>'},24:{width:24,path:'<path d="M2.5 12c0-5.24 4.288-9.5 9.593-9.5a9.608 9.608 0 017.197 3.219.75.75 0 001.12-.998A11.108 11.108 0 0012.093 1C5.973 1 1 5.919 1 12s4.973 11 11.093 11c5.403 0 9.91-3.832 10.893-8.915a.75.75 0 10-1.472-.285c-.848 4.381-4.74 7.7-9.421 7.7C6.788 21.5 2.5 17.24 2.5 12z"></path><path d="M12 17a1 1 0 100-2 1 1 0 000 2zm0-10a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm11.28.78a.75.75 0 00-1.06-1.06l-3.47 3.47-1.47-1.47a.75.75 0 10-1.06 1.06l2 2a.75.75 0 001.06 0l4-4z"></path>'}}})))}function Gr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"></path>'},24:{width:24,path:'<path d="M12 7a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm1 9a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function Vr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.75 2a.75.75 0 01.75.75V7h4.25a.75.75 0 110 1.5H8.5v4.25a.75.75 0 11-1.5 0V8.5H2.75a.75.75 0 010-1.5H7V2.75A.75.75 0 017.75 2z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M11.75 4.5a.75.75 0 01.75.75V11h5.75a.75.75 0 010 1.5H12.5v5.75a.75.75 0 01-1.5 0V12.5H5.25a.75.75 0 010-1.5H11V5.25a.75.75 0 01.75-.75z"></path>'}}})))}function Kr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zM6.92 6.085c.081-.16.19-.299.34-.398.145-.097.371-.187.74-.187.28 0 .553.087.738.225A.613.613 0 019 6.25c0 .177-.04.264-.077.318a.956.956 0 01-.277.245c-.076.051-.158.1-.258.161l-.007.004a7.728 7.728 0 00-.313.195 2.416 2.416 0 00-.692.661.75.75 0 001.248.832.956.956 0 01.276-.245 6.3 6.3 0 01.26-.16l.006-.004c.093-.057.204-.123.313-.195.222-.149.487-.355.692-.662.214-.32.329-.702.329-1.15 0-.76-.36-1.348-.863-1.725A2.76 2.76 0 008 4c-.631 0-1.155.16-1.572.438-.413.276-.68.638-.849.977a.75.75 0 101.342.67z"></path>'},24:{width:24,path:'<path d="M10.97 8.265a1.45 1.45 0 00-.487.57.75.75 0 01-1.341-.67c.2-.402.513-.826.997-1.148C10.627 6.69 11.244 6.5 12 6.5c.658 0 1.369.195 1.934.619a2.45 2.45 0 011.004 2.006c0 1.033-.513 1.72-1.027 2.215-.19.183-.399.358-.579.508l-.147.123a4.329 4.329 0 00-.435.409v1.37a.75.75 0 11-1.5 0v-1.473c0-.237.067-.504.247-.736.22-.28.486-.517.718-.714l.183-.153.001-.001c.172-.143.324-.27.47-.412.368-.355.569-.676.569-1.136a.953.953 0 00-.404-.806C12.766 8.118 12.384 8 12 8c-.494 0-.814.121-1.03.265zM13 17a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function qr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path d="M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"></path>'},24:{width:24,path:'<path d="M11.646 15.146L5.854 9.354a.5.5 0 01.353-.854h11.586a.5.5 0 01.353.854l-5.793 5.792a.5.5 0 01-.707 0z"></path>'}}})))}function Xr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.72 5.72a.75.75 0 011.06 0L12 10.94l5.22-5.22a.75.75 0 111.06 1.06L13.06 12l5.22 5.22a.75.75 0 11-1.06 1.06L12 13.06l-5.22 5.22a.75.75 0 01-1.06-1.06L10.94 12 5.72 6.78a.75.75 0 010-1.06z"></path>'}}})))}Fr.defaultProps={className:"octicon octicon-check",size:16,verticalAlign:"text-bottom"},_r.defaultProps={className:"octicon octicon-git-merge",size:16,verticalAlign:"text-bottom"},jr.defaultProps={className:"octicon octicon-git-pull-request",size:16,verticalAlign:"text-bottom"},Ur.defaultProps={className:"octicon octicon-issue-closed",size:16,verticalAlign:"text-bottom"},Gr.defaultProps={className:"octicon octicon-issue-opened",size:16,verticalAlign:"text-bottom"},Vr.defaultProps={className:"octicon octicon-plus",size:16,verticalAlign:"text-bottom"},Kr.defaultProps={className:"octicon octicon-question",size:16,verticalAlign:"text-bottom"},qr.defaultProps={className:"octicon octicon-triangle-down",size:16,verticalAlign:"text-bottom"},Xr.defaultProps={className:"octicon octicon-x",size:16,verticalAlign:"text-bottom"};var Yr=r.css(["position:relative;display:inline-block;font-family:inherit;font-weight:",";line-height:20px;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border-radius:",";appearance:none;text-decoration:none;text-align:center;&:hover{text-decoration:none;}&:focus{outline:none;}&:disabled{cursor:default;}&:disabled svg{opacity:0.6;}"],xt("fontWeights.bold"),xt("radii.2"));const Jr={display:"inline-block",padding:"0px 6px",backgroundColor:"neutral.muted",borderRadius:"50%",marginLeft:"8px"},Zr=({count:e})=>n.default.createElement(qt,{sx:Jr},e);Zr.displayName="Counter";var Qr=Zr;const eo=re({prop:"size",variants:{small:{fontSize:0},medium:{fontSize:1},large:{fontSize:2}}}),to=i.default.button`
22
+ `;function zt(e){const{children:t,...r}=e;return require("focus-visible"),n.default.createElement(Ct,Tt({},r,{"data-portal-root":!0}),n.default.createElement(Et,null),t)}zt.displayName="BaseStyles",zt.defaultProps={color:"fg.default",fontFamily:"normal",lineHeight:"default"};var Rt=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Nt}(e)}(e)};var Nt="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function At(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Pt((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function It(e,t,r){return e.concat(t).map((function(e){return At(e,r)}))}function Lt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Ot(e,t){try{return t in e}catch(e){return!1}}function Mt(e,t,r){var o={};return r.isMergeableObject(e)&&Lt(e).forEach((function(t){o[t]=At(e[t],r)})),Lt(t).forEach((function(a){(function(e,t){return Ot(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(Ot(e,a)&&r.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return Pt;var r=t.customMerge(e);return"function"==typeof r?r:Pt}(a,r)(e[a],t[a],r):o[a]=At(t[a],r))})),o}function Pt(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||It,r.isMergeableObject=r.isMergeableObject||Rt,r.cloneUnlessOtherwiseSpecified=At;var o=Array.isArray(t);return o===Array.isArray(e)?o?r.arrayMerge(e,t,r):Mt(e,t,r):At(t,r)}Pt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return Pt(e,r,t)}),{})};var Ht=Pt;const Dt="light",Wt="dark",Ft=n.default.createContext({setColorMode:()=>null,setDayScheme:()=>null,setNightScheme:()=>null}),_t=({children:e,...t})=>{var o,a,i,l,s,c,f,u;const{theme:g,colorMode:b,dayScheme:p,nightScheme:h}=jt(),m=null!==(o=null!==(a=t.theme)&&void 0!==a?a:g)&&void 0!==o?o:d,[v,x]=n.default.useState(null!==(i=null!==(l=t.colorMode)&&void 0!==l?l:b)&&void 0!==i?i:"day"),[y,w]=n.default.useState(null!==(s=null!==(c=t.dayScheme)&&void 0!==c?c:p)&&void 0!==s?s:Dt),[B,k]=n.default.useState(null!==(f=null!==(u=t.nightScheme)&&void 0!==u?u:h)&&void 0!==f?f:Wt),$=function(e,t){switch(e){case"auto":return t;default:return e}}(v,function(){const[e,t]=n.default.useState(Gt);return n.default.useEffect((()=>{var e,r;const o=null===(e=window)||void 0===e||null===(r=e.matchMedia)||void 0===r?void 0:r.call(e,"(prefers-color-scheme: dark)");function a(e){const r=e.matches;t(r?"night":"day")}if(o){if(void 0!==o.addEventListener)return o.addEventListener("change",a),function(){o.removeEventListener("change",a)};if(void 0!==o.addListener)return o.addListener(a),function(){o.removeListener(a)}}}),[]),e}()),S=function(e,t,r){switch(e){case"day":return t;case"night":return r}}($,y,B),T=n.default.useMemo((()=>function(e,t){if(!e.colorSchemes)return e;if(!e.colorSchemes[t]){console.error(`\`${t}\` scheme not defined in \`theme.colorSchemes\``);const r=Object.keys(e.colorSchemes)[0];return Ht(e,e.colorSchemes[r])}return Ht(e,e.colorSchemes[t])}(m,S)),[m,S]);return n.default.useEffect((()=>{var e,r;x(null!==(e=null!==(r=t.colorMode)&&void 0!==r?r:b)&&void 0!==e?e:"day")}),[t.colorMode,b]),n.default.useEffect((()=>{var e,r;w(null!==(e=null!==(r=t.dayScheme)&&void 0!==r?r:p)&&void 0!==e?e:Dt)}),[t.dayScheme,p]),n.default.useEffect((()=>{var e,r;k(null!==(e=null!==(r=t.nightScheme)&&void 0!==r?r:h)&&void 0!==e?e:Wt)}),[t.nightScheme,h]),n.default.createElement(Ft.Provider,{value:{theme:T,colorScheme:S,colorMode:v,resolvedColorMode:$,dayScheme:y,nightScheme:B,setColorMode:x,setDayScheme:w,setNightScheme:k}},n.default.createElement(r.ThemeProvider,{theme:T},e))};function jt(){return n.default.useContext(Ft)}function Ut(e,t){var r;const{colorScheme:o=""}=jt();return null!==(r=e[o])&&void 0!==r?r:t}function Gt(){var e,t,r;return"undefined"!=typeof window&&null!==(e=(t=window).matchMedia)&&void 0!==e&&null!==(r=e.call(t,"(prefers-color-scheme: dark)"))&&void 0!==r&&r.matches?"night":"day"}_t.displayName="ThemeProvider";var Vt=_t;var Kt=e=>te(e.sx);var qt=i.default.div(U,E,C,S,z,N,O,I,P,G,Kt);const Xt=i.default(qt)``;Xt.defaultProps={borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2};var Yt=Xt;const Jt=i.default(qt)``;Jt.defaultProps={display:"flex"};var Zt=Jt;const Qt=i.default(qt)``;Qt.defaultProps={display:"grid"};var er=Qt;const tr=i.default(qt)``;var rr=tr;const or=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"absolute",ref:t}))));or.displayName="Absolute";const ar=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"fixed",ref:t}))));ar.displayName="Fixed";const nr=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"relative",ref:t}))));nr.displayName="Relative";const ir=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"sticky",ref:t}))));function lr({ref:e,closeOnOutsideClick:r,defaultOpen:o,onClickOutside:a}){const[n,i]=t.useState(o),l=t.useRef(null),d=null!=e?e:l,s=t.useCallback((e=>{const{current:t}=d;e.target.closest("details")!==t&&(a&&a(e),e.defaultPrevented||i(!1))}),[d,i,a]);t.useEffect((()=>{if(n&&r)return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}}),[n,r,s]);const c=e=>{if(!e.defaultPrevented){const t=e.target;i(t.open)}};return{open:n,setOpen:i,getDetailsProps:()=>({onToggle:c,open:n,ref:d})}}ir.defaultProps={top:0,zIndex:1},ir.displayName="Sticky";const dr=!0;function sr(e){if(!e.defaultPrevented)for(const t of Object.values(cr).reverse())if(t(e)===dr||e.defaultPrevented)break}const cr={};let fr=0;const ur=({containerRef:e,ignoreClickRefs:r,onClickOutside:o})=>{const a=t.useMemo((()=>fr++),[]),n=t.useCallback((t=>{var a;return t instanceof MouseEvent&&t.button>0||null!==(a=e.current)&&void 0!==a&&a.contains(t.target)||r&&r.some((({current:e})=>null==e?void 0:e.contains(t.target)))?dr:void o(t)}),[e,r,o]);t.useEffect((()=>(0===Object.keys(cr).length&&document.addEventListener("mousedown",sr,{capture:!0}),function(e,t){cr[e]=t}(a,n),()=>{!function(e){delete cr[e]}(a),0===Object.keys(cr).length&&document.removeEventListener("mousedown",sr,{capture:!0})})),[a,n])};function*gr(e,t={}){var r,o;const a=null!==(r=t.strict)&&void 0!==r&&r,n=null!==(o=t.onlyTabbable)&&void 0!==o&&o?pr:br,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e instanceof HTMLElement&&n(e,a)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let l=null;if(!t.reverse&&n(e,a)&&(yield e),t.reverse){let e=i.lastChild();for(;e;)l=e,e=i.lastChild()}else l=i.firstChild();for(;l instanceof HTMLElement;)yield l,l=t.reverse?i.previousNode():i.nextNode();t.reverse&&n(e,a)&&(yield e)}function br(e,t=!1){const r=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled,o=e.hidden,a=e instanceof HTMLInputElement&&"hidden"===e.type;if(r||o||a)return!1;if(t){const t=0===e.offsetWidth||0===e.offsetHeight,r=["hidden","collapse"].includes(getComputedStyle(e).visibility),o=0===e.getClientRects().length;if(t||r||o)return!1}return null!=e.getAttribute("tabindex")||!(e instanceof HTMLAnchorElement&&null==e.getAttribute("href"))&&-1!==e.tabIndex}function pr(e,t=!1){return br(e,t)&&"-1"!==e.getAttribute("tabindex")}function hr({initialFocusRef:e,returnFocusRef:r,containerRef:o,preventFocusOnOpen:a}){t.useEffect((()=>{if(a)return;const t=r.current;if(e&&e.current)e.current.focus();else if(o.current){const e=gr(o.current).next().value;null==e||e.focus()}return function(){null==t||t.focus()}}),[e,r,o,a])}const mr=[];function vr(e){if("Escape"===e.key&&!e.defaultPrevented)for(let t=mr.length-1;t>=0&&(mr[t](e),!e.defaultPrevented);--t);}const xr=(e,r=[e])=>{const o=t.useCallback(e,r);t.useEffect((()=>(0===mr.length&&document.addEventListener("keydown",vr),mr.push(o),()=>{mr.splice(mr.findIndex((e=>e===o)),1),0===mr.length&&document.removeEventListener("keydown",vr)})),[o])};function yr(e){const t=n.default.useRef(null);return null!=e?e:t}const wr=({overlayRef:e,returnFocusRef:t,initialFocusRef:r,onEscape:o,ignoreClickRefs:a,onClickOutside:n,preventFocusOnOpen:i})=>{const l=yr(e);return hr({containerRef:l,returnFocusRef:t,initialFocusRef:r,preventFocusOnOpen:i}),ur({containerRef:l,ignoreClickRefs:a,onClickOutside:n}),xr(o),{ref:l}};let Br,kr=!1;function $r(){}try{const e=Object.create({},{signal:{get(){kr=!0}}});window.addEventListener("test",$r,e),window.removeEventListener("test",$r,e)}catch(Kd){}function Sr(){kr||(!function(){if("undefined"==typeof window)return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,o){return"object"==typeof o&&"signal"in o&&o.signal instanceof AbortSignal&&e.call(o.signal,"abort",(()=>{this.removeEventListener(t,r,o)})),e.call(this,t,r,o)}}(),kr=!0)}function Tr(){return void 0===Br&&(Br=/^mac/i.test(window.navigator.platform)),Br}let Er,Cr=1e4;function zr(){return"__primer_id_"+Cr++}Sr(),function(e){e[e.ArrowHorizontal=1]="ArrowHorizontal",e[e.ArrowVertical=2]="ArrowVertical",e[e.JK=4]="JK",e[e.HL=8]="HL",e[e.HomeAndEnd=16]="HomeAndEnd",e[e.PageUpDown=256]="PageUpDown",e[e.WS=32]="WS",e[e.AD=64]="AD",e[e.Tab=128]="Tab",e[e.ArrowAll=e.ArrowHorizontal|e.ArrowVertical]="ArrowAll",e[e.HJKL=e.HL|e.JK]="HJKL",e[e.WASD=e.WS|e.AD]="WASD",e[e.All=e.ArrowAll|e.HJKL|e.HomeAndEnd|e.PageUpDown|e.WASD|e.Tab]="All"}(Er||(Er={}));const Rr={ArrowLeft:Er.ArrowHorizontal,ArrowDown:Er.ArrowVertical,ArrowUp:Er.ArrowVertical,ArrowRight:Er.ArrowHorizontal,h:Er.HL,j:Er.JK,k:Er.JK,l:Er.HL,a:Er.AD,s:Er.WS,w:Er.WS,d:Er.AD,Tab:Er.Tab,Home:Er.HomeAndEnd,End:Er.HomeAndEnd,PageUp:Er.PageUpDown,PageDown:Er.PageUpDown},Nr={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end"};function Ar(e){const t=Nr[e.key];if("Tab"===e.key&&e.shiftKey)return"previous";const r=Tr();if(r&&e.metaKey||!r&&e.ctrlKey){if("ArrowLeft"===e.key||"ArrowUp"===e.key)return"start";if("ArrowRight"===e.key||"ArrowDown"===e.key)return"end"}return t}const Ir="data-is-active-descendant",Lr="activated-directly",Or="activated-indirectly",Mr="data-has-active-descendant";function Pr(e,t){var r,o,a,n;const i=[],l=new WeakMap,d=null!==(r=null==t?void 0:t.bindKeys)&&void 0!==r?r:(null!=t&&t.getNextFocusable?Er.ArrowAll:Er.ArrowVertical)|Er.HomeAndEnd,s=null!==(o=null==t?void 0:t.focusOutBehavior)&&void 0!==o?o:"stop",c=null!==(a=null==t?void 0:t.focusInStrategy)&&void 0!==a?a:"previous",f=null==t?void 0:t.activeDescendantControl,u=null==t?void 0:t.onActiveDescendantChanged;let g;function b(){return i[0]}function p(e,t=!1){const r=g;g=e,f?e&&document.activeElement===f?h(r,e,t):m():(r&&r!==e&&l.has(r)&&r.setAttribute("tabindex","-1"),null==e||e.setAttribute("tabindex","0"))}function h(t,r,o=!1){r.id||r.setAttribute("id",zr()),t&&t!==r&&t.removeAttribute(Ir),f&&(o||f.getAttribute("aria-activedescendant")!==r.id)&&(f.setAttribute("aria-activedescendant",r.id),e.setAttribute(Mr,r.id),r.setAttribute(Ir,o?Lr:Or),null==u||u(r,t,o))}function m(t=g){"first"===c&&(g=void 0),null==f||f.removeAttribute("aria-activedescendant"),e.removeAttribute(Mr),null==t||t.removeAttribute(Ir),null==u||u(void 0,t,!1)}function v(...e){const r=e.filter((e=>{var r,o;return null===(r=null==t||null===(o=t.focusableElementFilter)||void 0===o?void 0:o.call(t,e))||void 0===r||r}));if(0===r.length)return;const o=i.findIndex((e=>(e.compareDocumentPosition(r[0])&Node.DOCUMENT_POSITION_PRECEDING)>0));i.splice(-1===o?i.length:o,0,...r);for(const e of r)l.has(e)||l.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1");g||p(b())}function x(...e){for(const t of e){const e=i.indexOf(t);e>=0&&i.splice(e,1);const r=l.get(t);if(void 0!==r&&(null===r?t.removeAttribute("tabindex"):t.setAttribute("tabindex",r),l.delete(t)),t===g){p(b())}}}v(...gr(e)),p(b());new MutationObserver((e=>{for(const t of e)for(const e of t.removedNodes)e instanceof HTMLElement&&x(...gr(e));for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&v(...gr(e))})).observe(e,{subtree:!0,childList:!0});const y=new AbortController,w=null!==(n=null==t?void 0:t.abortSignal)&&void 0!==n?n:y.signal;let B;w.addEventListener("abort",(()=>{x(...i)})),e.addEventListener("mousedown",(e=>{e.target instanceof HTMLElement&&e.target!==document.activeElement&&(B=i.indexOf(e.target))}),{signal:w}),f?(e.addEventListener("focusin",(e=>{e.target instanceof HTMLElement&&i.includes(e.target)&&(f.focus(),p(e.target))})),e.addEventListener("mousemove",(({target:e})=>{if(!(e instanceof Node))return;const t=i.find((t=>t.contains(e)));t&&p(t)}),{signal:w,capture:!0}),f.addEventListener("focusin",(()=>{g?h(void 0,g):p(b())})),f.addEventListener("focusout",(()=>{m()}))):e.addEventListener("focusin",(t=>{if(t.target instanceof HTMLElement)if(void 0!==B)B>=0&&i[B]!==g&&p(i[B]),B=void 0;else if("previous"===c)p(t.target);else if("closest"===c||"first"===c){if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e="previous"===$?i.length-1:0,t=i[e];return void(null==t||t.focus())}p(t.target)}else if("function"==typeof c)if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e=c(t.relatedTarget);if((e?i.indexOf(e):-1)>=0&&e instanceof HTMLElement)return void e.focus();console.warn("Element requested is not a known focusable element.")}else p(t.target);$=void 0}),{signal:w});const k=null!=f?f:e;let $;return"closest"===c&&document.addEventListener("keydown",(e=>{"Tab"===e.key&&($=Ar(e))}),{signal:w,capture:!0}),k.addEventListener("keydown",(r=>{if(r.key in Nr){const a=Rr[r.key];if(!r.defaultPrevented&&(a&d)>0&&!function(e,t){const r=e.key,o=[...r].length,a=t instanceof HTMLInputElement&&"text"===t.type||t instanceof HTMLTextAreaElement;if(a&&(1===o||"Home"===r||"End"===r))return!0;if(t instanceof HTMLSelectElement){if(1===o)return!0;if("ArrowDown"===r&&Tr()&&!e.metaKey)return!0;if("ArrowDown"===r&&!Tr()&&e.altKey)return!0}if(t instanceof HTMLTextAreaElement&&("PageUp"===r||"PageDown"===r))return!0;if(a){const e=t,o=0===e.selectionStart&&0===e.selectionEnd,a=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===r&&!o)return!0;if("ArrowRight"===r&&!a)return!0;if(e instanceof HTMLTextAreaElement){if("ArrowUp"===r&&!o)return!0;if("ArrowDown"===r&&!a)return!0}}return!1}(r,document.activeElement)){const a=Ar(r);let n;var o;if(null!=t&&t.getNextFocusable)n=t.getNextFocusable(a,null!==(o=document.activeElement)&&void 0!==o?o:void 0,r);if(!n){const t=function(){if(!g)return 0;const t=i.indexOf(g);return-1!==t?t:g===e?-1:0}();let o=t;"previous"===a?o-=1:"start"===a?o=0:"next"===a?o+=1:o=i.length-1,o<0&&(o="wrap"===s&&"Tab"!==r.key?i.length-1:0),o>=i.length&&(o="wrap"===s&&"Tab"!==r.key?0:i.length-1),t!==o&&(n=i[o])}f?p(n||g,!0):n&&($=a,n.focus()),("Tab"!==r.key||n)&&r.preventDefault()}}}),{signal:w}),y}var Hr={small:16,medium:32,large:64};function Dr(e){var t=e["aria-label"],r=e.className,o=e.fill,a=void 0===o?"currentColor":o,n=e.size,i=e.verticalAlign,l=e.svgDataByHeight,d=Hr[n]||n,s=function(e,t){return e.map((function(e){return parseInt(e,10)})).reduce((function(e,r){return r<=t?r:e}),e[0])}(Object.keys(l),d),c=l[s].width;return{"aria-hidden":t?"false":"true","aria-label":t,role:"img",className:r,viewBox:"0 0 "+c+" "+s,width:d*(c/s),height:d,fill:a,style:{display:"inline-block",userSelect:"none",verticalAlign:i},dangerouslySetInnerHTML:{__html:l[s].path}}}var Wr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};function Fr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M21.03 5.72a.75.75 0 010 1.06l-11.5 11.5a.75.75 0 01-1.072-.012l-5.5-5.75a.75.75 0 111.084-1.036l4.97 5.195L19.97 5.72a.75.75 0 011.06 0z"></path>'}}})))}function _r(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M5 3.254V3.25v.005a.75.75 0 110-.005v.004zm.45 1.9a2.25 2.25 0 10-1.95.218v5.256a2.25 2.25 0 101.5 0V7.123A5.735 5.735 0 009.25 9h1.378a2.251 2.251 0 100-1.5H9.25a4.25 4.25 0 01-3.8-2.346zM12.75 9a.75.75 0 100-1.5.75.75 0 000 1.5zm-8.5 4.5a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.75 21a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 19.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM5.75 6.5a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 4.75a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM18.25 15a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM15 13.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0z"></path><path fill-rule="evenodd" d="M6.5 7.25c0 2.9 2.35 5.25 5.25 5.25h4.5V14h-4.5A6.75 6.75 0 015 7.25h1.5z"></path><path fill-rule="evenodd" d="M5.75 16.75A.75.75 0 006.5 16V8A.75.75 0 005 8v8c0 .414.336.75.75.75z"></path>'}}})))}function jr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M4.75 3a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 4.75a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zM4.75 17.5a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zm17.75-1.75a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM16 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0z"></path><path fill-rule="evenodd" d="M4.75 7.25A.75.75 0 015.5 8v8A.75.75 0 014 16V8a.75.75 0 01.75-.75zm8.655-5.53a.75.75 0 010 1.06L12.185 4h4.065A3.75 3.75 0 0120 7.75v8.75a.75.75 0 01-1.5 0V7.75a2.25 2.25 0 00-2.25-2.25h-4.064l1.22 1.22a.75.75 0 01-1.061 1.06l-2.5-2.5a.75.75 0 010-1.06l2.5-2.5a.75.75 0 011.06 0z"></path>'}}})))}function Ur(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 0110.65-5.003.75.75 0 00.959-1.153 8 8 0 102.592 8.33.75.75 0 10-1.444-.407A6.5 6.5 0 011.5 8zM8 12a1 1 0 100-2 1 1 0 000 2zm0-8a.75.75 0 01.75.75v3.5a.75.75 0 11-1.5 0v-3.5A.75.75 0 018 4zm4.78 4.28l3-3a.75.75 0 00-1.06-1.06l-2.47 2.47-.97-.97a.749.749 0 10-1.06 1.06l1.5 1.5a.75.75 0 001.06 0z"></path>'},24:{width:24,path:'<path d="M2.5 12c0-5.24 4.288-9.5 9.593-9.5a9.608 9.608 0 017.197 3.219.75.75 0 001.12-.998A11.108 11.108 0 0012.093 1C5.973 1 1 5.919 1 12s4.973 11 11.093 11c5.403 0 9.91-3.832 10.893-8.915a.75.75 0 10-1.472-.285c-.848 4.381-4.74 7.7-9.421 7.7C6.788 21.5 2.5 17.24 2.5 12z"></path><path d="M12 17a1 1 0 100-2 1 1 0 000 2zm0-10a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm11.28.78a.75.75 0 00-1.06-1.06l-3.47 3.47-1.47-1.47a.75.75 0 10-1.06 1.06l2 2a.75.75 0 001.06 0l4-4z"></path>'}}})))}function Gr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"></path>'},24:{width:24,path:'<path d="M12 7a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm1 9a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function Vr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.75 2a.75.75 0 01.75.75V7h4.25a.75.75 0 110 1.5H8.5v4.25a.75.75 0 11-1.5 0V8.5H2.75a.75.75 0 010-1.5H7V2.75A.75.75 0 017.75 2z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M11.75 4.5a.75.75 0 01.75.75V11h5.75a.75.75 0 010 1.5H12.5v5.75a.75.75 0 01-1.5 0V12.5H5.25a.75.75 0 010-1.5H11V5.25a.75.75 0 01.75-.75z"></path>'}}})))}function Kr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zM6.92 6.085c.081-.16.19-.299.34-.398.145-.097.371-.187.74-.187.28 0 .553.087.738.225A.613.613 0 019 6.25c0 .177-.04.264-.077.318a.956.956 0 01-.277.245c-.076.051-.158.1-.258.161l-.007.004a7.728 7.728 0 00-.313.195 2.416 2.416 0 00-.692.661.75.75 0 001.248.832.956.956 0 01.276-.245 6.3 6.3 0 01.26-.16l.006-.004c.093-.057.204-.123.313-.195.222-.149.487-.355.692-.662.214-.32.329-.702.329-1.15 0-.76-.36-1.348-.863-1.725A2.76 2.76 0 008 4c-.631 0-1.155.16-1.572.438-.413.276-.68.638-.849.977a.75.75 0 101.342.67z"></path>'},24:{width:24,path:'<path d="M10.97 8.265a1.45 1.45 0 00-.487.57.75.75 0 01-1.341-.67c.2-.402.513-.826.997-1.148C10.627 6.69 11.244 6.5 12 6.5c.658 0 1.369.195 1.934.619a2.45 2.45 0 011.004 2.006c0 1.033-.513 1.72-1.027 2.215-.19.183-.399.358-.579.508l-.147.123a4.329 4.329 0 00-.435.409v1.37a.75.75 0 11-1.5 0v-1.473c0-.237.067-.504.247-.736.22-.28.486-.517.718-.714l.183-.153.001-.001c.172-.143.324-.27.47-.412.368-.355.569-.676.569-1.136a.953.953 0 00-.404-.806C12.766 8.118 12.384 8 12 8c-.494 0-.814.121-1.03.265zM13 17a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function qr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path d="M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"></path>'},24:{width:24,path:'<path d="M11.646 15.146L5.854 9.354a.5.5 0 01.353-.854h11.586a.5.5 0 01.353.854l-5.793 5.792a.5.5 0 01-.707 0z"></path>'}}})))}function Xr(e){return n.default.createElement("svg",Dr(Wr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.72 5.72a.75.75 0 011.06 0L12 10.94l5.22-5.22a.75.75 0 111.06 1.06L13.06 12l5.22 5.22a.75.75 0 11-1.06 1.06L12 13.06l-5.22 5.22a.75.75 0 01-1.06-1.06L10.94 12 5.72 6.78a.75.75 0 010-1.06z"></path>'}}})))}Fr.defaultProps={className:"octicon octicon-check",size:16,verticalAlign:"text-bottom"},_r.defaultProps={className:"octicon octicon-git-merge",size:16,verticalAlign:"text-bottom"},jr.defaultProps={className:"octicon octicon-git-pull-request",size:16,verticalAlign:"text-bottom"},Ur.defaultProps={className:"octicon octicon-issue-closed",size:16,verticalAlign:"text-bottom"},Gr.defaultProps={className:"octicon octicon-issue-opened",size:16,verticalAlign:"text-bottom"},Vr.defaultProps={className:"octicon octicon-plus",size:16,verticalAlign:"text-bottom"},Kr.defaultProps={className:"octicon octicon-question",size:16,verticalAlign:"text-bottom"},qr.defaultProps={className:"octicon octicon-triangle-down",size:16,verticalAlign:"text-bottom"},Xr.defaultProps={className:"octicon octicon-x",size:16,verticalAlign:"text-bottom"};var Yr=r.css(["position:relative;display:inline-block;font-family:inherit;font-weight:",";line-height:20px;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border-radius:",";appearance:none;text-decoration:none;text-align:center;&:hover{text-decoration:none;}&:focus{outline:none;}&:disabled{cursor:default;}&:disabled svg{opacity:0.6;}"],xt("fontWeights.bold"),xt("radii.2"));const Jr={display:"inline-block",padding:"0px 6px",backgroundColor:"neutral.muted",borderRadius:"50%",marginLeft:"8px",marginRight:"-4px"},Zr=({count:e})=>n.default.createElement(qt,{sx:Jr},e);Zr.displayName="Counter";var Qr=Zr;const eo=re({prop:"size",variants:{small:{fontSize:0},medium:{fontSize:1},large:{fontSize:2}}}),to=i.default.button`
23
23
  ${Yr}
24
24
  ${e=>((e,t="default")=>({default:`\n color: ${xt("colors.btn.text")({theme:e})};\n background-color: ${xt("colors.btn.bg")({theme:e})};\n border-width: 1px;\n border-style: solid;\n border-color: ${xt("colors.btn.border")({theme:e})};\n box-shadow: ${xt("shadows.btn.shadow")({theme:e}),xt("shadows.btn.insetShadow")({theme:e})};\n &:hover:not([disabled]) {\n background-color: ${xt("colors.btn.hoverBg")({theme:e})};\n }\n // focus must come before :active so that the active box shadow overrides\n &:focus:not([disabled]) {\n box-shadow: ${xt("shadows.btn.focusShadow")({theme:e})};\n }\n &:active:not([disabled]) {\n background-color: ${xt("colors.btn.selectedBg")({theme:e})};\n box-shadow: ${xt("shadows.btn.shadowActive")({theme:e})};\n }\n &:disabled {\n color: ${xt("colors.primer.fg.disabled")({theme:e})};\n background-color: ${xt("colors.btn.disabledBg")({theme:e})};\n }\n `,primary:`\n color: ${xt("colors.btn.primary.text")({theme:e})};\n background-color: ${xt("colors.btn.primary.bg")({theme:e})};\n border-width: 1px;\n border-style: solid;\n border-color: ${xt("colors.border.subtle")({theme:e})};\n box-shadow: ${xt("shadows.btn.primary.shadow")({theme:e})};\n\n &:hover:not([disabled]) {\n color: ${xt("colors.btn.primary.hoverText")({theme:e})};\n background-color: ${xt("colors.btn.primary.hoverBg")({theme:e})};\n }\n // focus must come before :active so that the active box shadow overrides\n &:focus:not([disabled]) {\n box-shadow: ${xt("shadows.btn.primary.focusShadow")({theme:e})};\n }\n\n &:active:not([disabled]) {\n background-color: ${xt("colors.btn.primary.selectedBg")({theme:e})};\n box-shadow: ${xt("shadows.btn.primary.selectedShadow")({theme:e})};\n }\n\n &:disabled {\n color: ${xt("colors.btn.primary.disabledText")({theme:e})};\n background-color: ${xt("colors.btn.primary.disabledBg")({theme:e})};\n }`,danger:`\n color: ${xt("colors.btn.danger.text")({theme:e})};\n border: 1px solid ${xt("colors.btn.border")({theme:e})};\n background-color: ${xt("colors.btn.bg")({theme:e})};\n box-shadow: ${xt("shadows.btn.shadow")({theme:e})};\n\n &:hover:not([disabled]) {\n color: ${xt("colors.btn.danger.hoverText")({theme:e})};\n background-color: ${xt("colors.btn.danger.hoverBg")({theme:e})};\n border-color: ${xt("colors.btn.danger.hoverBorder")({theme:e})};\n box-shadow: ${xt("shadows.btn.danger.hoverShadow")({theme:e})};\n }\n // focus must come before :active so that the active box shadow overrides\n &:focus:not([disabled]) {\n border-color: ${xt("colors.btn.danger.focusBorder")({theme:e})};\n box-shadow: ${xt("shadows.btn.danger.focusShadow")({theme:e})};\n }\n\n &:active:not([disabled]) {\n color: ${xt("colors.btn.danger.selectedText")({theme:e})};\n background-color: ${xt("colors.btn.danger.selectedBg")({theme:e})};\n box-shadow: ${xt("shadows.btn.danger.selectedShadow")({theme:e})};\n border-color: ${xt("colors.btn.danger.selectedBorder")({theme:e})};\n }\n\n &:disabled {\n color: ${xt("colors.btn.danger.disabledText")({theme:e})};\n background-color: ${xt("colors.btn.danger.disabledBg")({theme:e})};\n border-color: ${xt("colors.btn.danger.disabledBorder")({theme:e})};\n }\n `,invisible:`\n color: ${xt("colors.accent.fg")({theme:e})};\n background-color: transparent;\n border: 0;\n border-radius: ${xt("radii.2")({theme:e})};\n box-shadow: none;\n \n &:disabled {\n color: ${xt("colors.primer.fg.disabled")({theme:e})};\n }\n &:focus:not([disabled]) {\n box-shadow: ${xt("shadows.btn.focusShadow")({theme:e})};\n }\n &:hover:not([disabled]) {\n background-color: ${xt("colors.btn.hoverBg")({theme:e})};\n }\n &:active:not([disabled]) {\n background-color: ${xt("colors.btn.selectedBg")({theme:e})};\n }\n `}[t]))(e.theme,e.variant)}
25
25
  ${e=>((e="medium",t="default",r)=>{let o,a;switch(e){case"small":o=3,a=12;break;case"large":o=9,a=20;break;case"medium":default:o=5,a=16}return r&&(a=o+2),"invisible"===t&&(o+=1),`\n padding:${o}px ${a}px;\n `})(e.size,e.variant,e.iconOnly)}
26
26
  ${eo}
27
27
  ${Kt}
28
28
  ${xe}
29
- `,ro=t.forwardRef((({children:e,...t},r)=>{const{icon:o,caret:a,size:i}=t;let l=!1;o&&!e&&(l=!0);const d={display:"inline-block",...l?{}:{pr:3}};return n.default.createElement(to,Tt({ref:r},t,{iconOnly:l}),o&&n.default.createElement(qt,{sx:d,"aria-hidden":!l},n.default.createElement(o,{size:i})),e,a&&n.default.createElement(qt,{sx:{display:"inline-block",pl:3},"aria-hidden":!0},n.default.createElement(qr,{size:i})))}));ro.displayName="Button",ro.defaultProps={size:"medium",variant:"default"};var oo=Object.assign(ro,{Counter:Qr});const ao={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]};function no(e,t,r={}){const o=function(e){let t=e.parentNode;for(;null!==t;){if(t instanceof HTMLElement&&"static"!==getComputedStyle(t).position)return t;t=t.parentNode}return document.body}(e),a=function(e){let t=e;for(;null!==t&&t!==document.body;){if("visible"!==getComputedStyle(t).overflow)break;t=t.parentNode}const r=t!==document.body&&t instanceof HTMLElement?t:document.body,o=r.getBoundingClientRect(),a=getComputedStyle(r),[n,i,l,d]=[a.borderTopWidth,a.borderLeftWidth,a.borderRightWidth,a.borderBottomWidth].map((e=>parseInt(e,10)||0));return{top:o.top+n,left:o.left+i,width:o.width-l-i,height:Math.max(o.height-n-d,r===document.body?window.innerHeight:-1/0)}}(o),n=getComputedStyle(o),i=o.getBoundingClientRect(),[l,d]=[n.borderTopWidth,n.borderLeftWidth].map((e=>parseInt(e,10)||0));return function(e,t,r,o,{side:a,align:n,allowOutOfBounds:i,anchorOffset:l,alignmentOffset:d}){const s={top:e.top-t.top,left:e.left-t.left,width:e.width,height:e.height};let c=uo(r,o,a,n,l,d),f=a;if(c.top-=t.top,c.left-=t.left,!i){const i=ao[a];let u=0;if(i){let e=a;for(;u<i.length&&go(e,c,s,r);){const a=i[u++];e=a,c=uo(r,o,a,n,l,d),c.top-=t.top,c.left-=t.left,f=a}}c.top<s.top&&(c.top=s.top),c.left<s.left&&(c.left=s.left),c.left+r.width>e.width+s.left&&(c.left=e.width+s.left-r.width),i&&u<i.length&&c.top+r.height>e.height+s.top&&(c.top=e.height+s.top-r.height)}return{...c,anchorSide:f}}(a,{top:i.top+l,left:i.left+d},e.getBoundingClientRect(),t instanceof Element?t.getBoundingClientRect():t,function(e={}){var t,r,o,a,n;const i=null!==(t=e.side)&&void 0!==t?t:io,l=null!==(r=e.align)&&void 0!==r?r:lo;return{side:i,align:l,anchorOffset:null!==(o=e.anchorOffset)&&void 0!==o?o:"inside-center"===i?0:so,alignmentOffset:null!==(a=e.alignmentOffset)&&void 0!==a?a:"center"!==l&&i.startsWith("inside")?co:0,allowOutOfBounds:null!==(n=e.allowOutOfBounds)&&void 0!==n?n:fo}}(r))}const io="outside-bottom",lo="start",so=4,co=4,fo=!1;function uo(e,t,r,o,a,n){const i=t.left+t.width,l=t.top+t.height;let d=-1,s=-1;return"outside-top"===r?d=t.top-a-e.height:"outside-bottom"===r?d=l+a:"outside-left"===r?s=t.left-a-e.width:"outside-right"===r&&(s=i+a),"outside-top"!==r&&"outside-bottom"!==r||(s="start"===o?t.left+n:"center"===o?t.left-(e.width-t.width)/2+n:i-e.width-n),"outside-left"!==r&&"outside-right"!==r||(d="start"===o?t.top+n:"center"===o?t.top-(e.height-t.height)/2+n:l-e.height-n),"inside-top"===r?d=t.top+a:"inside-bottom"===r?d=l-a-e.height:"inside-left"===r?s=t.left+a:"inside-right"===r?s=i-a-e.width:"inside-center"===r&&(s=(i+t.left)/2-e.width/2+a),"inside-top"===r||"inside-bottom"===r?s="start"===o?t.left+n:"center"===o?t.left-(e.width-t.width)/2+n:i-e.width-n:"inside-left"!==r&&"inside-right"!==r&&"inside-center"!==r||(d="start"===o?t.top+n:"center"===o?t.top-(e.height-t.height)/2+n:l-e.height-n),{top:d,left:s}}function go(e,t,r,o){return"outside-top"===e||"outside-bottom"===e?t.top<r.top||t.top+o.height>r.height+r.top:t.left<r.left||t.left+o.width>r.width+r.left}function bo(e,t=[]){const r=yr(null==e?void 0:e.floatingElementRef),o=yr(null==e?void 0:e.anchorElementRef),[a,i]=n.default.useState(void 0),l=n.default.useCallback((()=>{r.current instanceof Element&&o.current instanceof Element?i(no(r.current,o.current,e)):i(void 0)}),[r,o,...t]);var d;return n.default.useLayoutEffect(l,[l]),d=l,n.default.useLayoutEffect((()=>{const e=new window.ResizeObserver((()=>d()));return e.observe(document.documentElement),()=>{e.disconnect()}}),[d]),{floatingElementRef:r,anchorElementRef:o,position:a}}Sr();const po=[];let ho;function mo(e,t=!1){return gr(e,{reverse:t,strict:!0,onlyTabbable:!0}).next().value}function vo(e,t,r){const o=new AbortController,a=null!=r?r:o.signal;let n;function i(r){if(r instanceof HTMLElement&&document.contains(e)){if(e.contains(r))return void(n=r);if(n&&pr(n)&&e.contains(n))return void n.focus();if(t&&e.contains(t))return void t.focus();{const t=null===e.getAttribute("tabindex");return t&&e.setAttribute("tabindex","-1"),e.focus(),void(t&&e.addEventListener("blur",(()=>e.removeAttribute("tabindex")),{once:!0}))}}}e.setAttribute("data-focus-trap","active");const l=function(e){const t=new AbortController;return e.addEventListener("abort",(()=>{t.abort()})),t}(a);if(e.addEventListener("keydown",(t=>{if("Tab"!==t.key||t.defaultPrevented)return;const{target:r}=t,o=mo(e),a=mo(e,!0);r===o&&t.shiftKey?(t.preventDefault(),null==a||a.focus()):r!==a||t.shiftKey||(t.preventDefault(),null==o||o.focus())}),{signal:l.signal}),ho){const e=ho;ho.container.setAttribute("data-focus-trap","suspended"),ho.controller.abort(),po.push(e)}l.signal.addEventListener("abort",(()=>{ho=void 0})),a.addEventListener("abort",(()=>{e.removeAttribute("data-focus-trap");const t=po.findIndex((t=>t.container===e));t>=0&&po.splice(t,1),function(){const e=po.pop();e&&vo(e.container,e.initialFocus,e.originalSignal)}()})),document.addEventListener("focus",(e=>{i(e.target)}),{signal:l.signal,capture:!0}),i(document.activeElement),ho={container:e,controller:l,initialFocus:t,originalSignal:a};const d=po.findIndex((t=>t.container===e));if(d>=0&&po.splice(d,1),!r)return o}function xo(e,t=[]){const r=yr(null==e?void 0:e.containerRef),o=yr(null==e?void 0:e.initialFocusRef),a=null==e?void 0:e.disabled,i=n.default.useRef(),l=n.default.useRef(null);function d(){var t;null===(t=i.current)||void 0===t||t.abort(),null!=e&&e.restoreFocusOnCleanUp&&l.current instanceof HTMLElement&&(l.current.focus(),l.current=null)}return l.current||null!=e&&e.disabled||(l.current=document.activeElement),n.default.useEffect((()=>{if(r.current instanceof HTMLElement){var e;if(!a)return i.current=vo(r.current,null!==(e=o.current)&&void 0!==e?e:void 0),()=>{d()};d()}}),[r,o,a,...t]),{containerRef:r,initialFocusRef:o}}function yo(e={},r=[]){const o=yr(e.containerRef),a=!!e.activeDescendantFocus,i=yr("boolean"!=typeof e.activeDescendantFocus&&e.activeDescendantFocus?e.activeDescendantFocus:void 0),l=e.disabled,d=n.default.useRef();return t.useEffect((()=>{if(o.current instanceof HTMLElement&&(!a||i.current instanceof HTMLElement)){if(!l){var t;const r={...e,activeDescendantControl:null!==(t=i.current)&&void 0!==t?t:void 0};return d.current=Pr(o.current,r),()=>{var e;null===(e=d.current)||void 0===e||e.abort()}}var r;null===(r=d.current)||void 0===r||r.abort()}}),[l,...r]),{containerRef:o,activeDescendantControlRef:i}}const wo="__primerPortalRoot__",Bo="__default__",ko={};function $o(){const e=ko.__default__;if(!e||!document.body.contains(e)){let e=document.getElementById(wo);if(!(e instanceof Element)){e=document.createElement("div"),e.setAttribute("id",wo),e.style.position="absolute",e.style.top="0",e.style.left="0";const t=document.querySelector("[data-portal-root]");t?t.appendChild(e):document.body.appendChild(e)}!function(e,t="__default__"){ko[t]=e}(e)}}var So=({children:e,onMount:t,containerName:r})=>{const a=document.createElement("div");a.style.position="relative",a.style.zIndex="1";const i=n.default.useRef(a);return n.default.useLayoutEffect((()=>{let e=r;void 0===e&&(e=Bo,$o());const o=ko[e];if(!o)throw new Error(`Portal container '${r}' is not yet registered. Container must be registered with registerPortal before use.`);const a=i.current;return o.appendChild(a),null==t||t(),()=>{o.removeChild(a)}}),[i]),o.createPortal(e,i.current)};function To(...e){const r=t.useRef(null);return n.default.useLayoutEffect((()=>{function t(t=null){for(const r of e){if(!r)return;"function"==typeof r?r(t):r.current=t}}return t(r.current),()=>{t(r.current)}}),[...e,r.current]),r}const Eo={prefix:String(Math.round(1e10*Math.random())),current:0},Co=n.default.createContext(Eo);let zo=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function Ro(e){let r=t.useContext(Co);return r!==Eo||zo||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),t.useMemo((()=>e||"react-aria"+r.prefix+"-"+ ++r.current),[e])}const No="200ms",Ao=i.default("div")`
29
+ `,ro=t.forwardRef((({children:e,...t},r)=>{const{icon:o,caret:a,size:i}=t;let l=!1;o&&!e&&(l=!0);const d={display:"inline-block",...l?{}:{mr:2}};return n.default.createElement(to,Tt({ref:r},t,{iconOnly:l}),o&&n.default.createElement(qt,{sx:d,"aria-hidden":!l},n.default.createElement(o,{size:i})),e,a&&n.default.createElement(qt,{sx:{display:"inline-block",pl:3},"aria-hidden":!0},n.default.createElement(qr,{size:i})))}));ro.displayName="Button",ro.defaultProps={size:"medium",variant:"default"};var oo=Object.assign(ro,{Counter:Qr});const ao={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]};function no(e,t,r={}){const o=function(e){let t=e.parentNode;for(;null!==t;){if(t instanceof HTMLElement&&"static"!==getComputedStyle(t).position)return t;t=t.parentNode}return document.body}(e),a=function(e){let t=e;for(;null!==t&&t!==document.body;){if("visible"!==getComputedStyle(t).overflow)break;t=t.parentNode}const r=t!==document.body&&t instanceof HTMLElement?t:document.body,o=r.getBoundingClientRect(),a=getComputedStyle(r),[n,i,l,d]=[a.borderTopWidth,a.borderLeftWidth,a.borderRightWidth,a.borderBottomWidth].map((e=>parseInt(e,10)||0));return{top:o.top+n,left:o.left+i,width:o.width-l-i,height:Math.max(o.height-n-d,r===document.body?window.innerHeight:-1/0)}}(o),n=getComputedStyle(o),i=o.getBoundingClientRect(),[l,d]=[n.borderTopWidth,n.borderLeftWidth].map((e=>parseInt(e,10)||0));return function(e,t,r,o,{side:a,align:n,allowOutOfBounds:i,anchorOffset:l,alignmentOffset:d}){const s={top:e.top-t.top,left:e.left-t.left,width:e.width,height:e.height};let c=uo(r,o,a,n,l,d),f=a;if(c.top-=t.top,c.left-=t.left,!i){const i=ao[a];let u=0;if(i){let e=a;for(;u<i.length&&go(e,c,s,r);){const a=i[u++];e=a,c=uo(r,o,a,n,l,d),c.top-=t.top,c.left-=t.left,f=a}}c.top<s.top&&(c.top=s.top),c.left<s.left&&(c.left=s.left),c.left+r.width>e.width+s.left&&(c.left=e.width+s.left-r.width),i&&u<i.length&&c.top+r.height>e.height+s.top&&(c.top=e.height+s.top-r.height)}return{...c,anchorSide:f}}(a,{top:i.top+l,left:i.left+d},e.getBoundingClientRect(),t instanceof Element?t.getBoundingClientRect():t,function(e={}){var t,r,o,a,n;const i=null!==(t=e.side)&&void 0!==t?t:io,l=null!==(r=e.align)&&void 0!==r?r:lo;return{side:i,align:l,anchorOffset:null!==(o=e.anchorOffset)&&void 0!==o?o:"inside-center"===i?0:so,alignmentOffset:null!==(a=e.alignmentOffset)&&void 0!==a?a:"center"!==l&&i.startsWith("inside")?co:0,allowOutOfBounds:null!==(n=e.allowOutOfBounds)&&void 0!==n?n:fo}}(r))}const io="outside-bottom",lo="start",so=4,co=4,fo=!1;function uo(e,t,r,o,a,n){const i=t.left+t.width,l=t.top+t.height;let d=-1,s=-1;return"outside-top"===r?d=t.top-a-e.height:"outside-bottom"===r?d=l+a:"outside-left"===r?s=t.left-a-e.width:"outside-right"===r&&(s=i+a),"outside-top"!==r&&"outside-bottom"!==r||(s="start"===o?t.left+n:"center"===o?t.left-(e.width-t.width)/2+n:i-e.width-n),"outside-left"!==r&&"outside-right"!==r||(d="start"===o?t.top+n:"center"===o?t.top-(e.height-t.height)/2+n:l-e.height-n),"inside-top"===r?d=t.top+a:"inside-bottom"===r?d=l-a-e.height:"inside-left"===r?s=t.left+a:"inside-right"===r?s=i-a-e.width:"inside-center"===r&&(s=(i+t.left)/2-e.width/2+a),"inside-top"===r||"inside-bottom"===r?s="start"===o?t.left+n:"center"===o?t.left-(e.width-t.width)/2+n:i-e.width-n:"inside-left"!==r&&"inside-right"!==r&&"inside-center"!==r||(d="start"===o?t.top+n:"center"===o?t.top-(e.height-t.height)/2+n:l-e.height-n),{top:d,left:s}}function go(e,t,r,o){return"outside-top"===e||"outside-bottom"===e?t.top<r.top||t.top+o.height>r.height+r.top:t.left<r.left||t.left+o.width>r.width+r.left}function bo(e,t=[]){const r=yr(null==e?void 0:e.floatingElementRef),o=yr(null==e?void 0:e.anchorElementRef),[a,i]=n.default.useState(void 0),l=n.default.useCallback((()=>{r.current instanceof Element&&o.current instanceof Element?i(no(r.current,o.current,e)):i(void 0)}),[r,o,...t]);var d;return n.default.useLayoutEffect(l,[l]),d=l,n.default.useLayoutEffect((()=>{const e=new window.ResizeObserver((()=>d()));return e.observe(document.documentElement),()=>{e.disconnect()}}),[d]),{floatingElementRef:r,anchorElementRef:o,position:a}}Sr();const po=[];let ho;function mo(e,t=!1){return gr(e,{reverse:t,strict:!0,onlyTabbable:!0}).next().value}function vo(e,t,r){const o=new AbortController,a=null!=r?r:o.signal;let n;function i(r){if(r instanceof HTMLElement&&document.contains(e)){if(e.contains(r))return void(n=r);if(n&&pr(n)&&e.contains(n))return void n.focus();if(t&&e.contains(t))return void t.focus();{const t=null===e.getAttribute("tabindex");return t&&e.setAttribute("tabindex","-1"),e.focus(),void(t&&e.addEventListener("blur",(()=>e.removeAttribute("tabindex")),{once:!0}))}}}e.setAttribute("data-focus-trap","active");const l=function(e){const t=new AbortController;return e.addEventListener("abort",(()=>{t.abort()})),t}(a);if(e.addEventListener("keydown",(t=>{if("Tab"!==t.key||t.defaultPrevented)return;const{target:r}=t,o=mo(e),a=mo(e,!0);r===o&&t.shiftKey?(t.preventDefault(),null==a||a.focus()):r!==a||t.shiftKey||(t.preventDefault(),null==o||o.focus())}),{signal:l.signal}),ho){const e=ho;ho.container.setAttribute("data-focus-trap","suspended"),ho.controller.abort(),po.push(e)}l.signal.addEventListener("abort",(()=>{ho=void 0})),a.addEventListener("abort",(()=>{e.removeAttribute("data-focus-trap");const t=po.findIndex((t=>t.container===e));t>=0&&po.splice(t,1),function(){const e=po.pop();e&&vo(e.container,e.initialFocus,e.originalSignal)}()})),document.addEventListener("focus",(e=>{i(e.target)}),{signal:l.signal,capture:!0}),i(document.activeElement),ho={container:e,controller:l,initialFocus:t,originalSignal:a};const d=po.findIndex((t=>t.container===e));if(d>=0&&po.splice(d,1),!r)return o}function xo(e,t=[]){const r=yr(null==e?void 0:e.containerRef),o=yr(null==e?void 0:e.initialFocusRef),a=null==e?void 0:e.disabled,i=n.default.useRef(),l=n.default.useRef(null);function d(){var t;null===(t=i.current)||void 0===t||t.abort(),null!=e&&e.restoreFocusOnCleanUp&&l.current instanceof HTMLElement&&(l.current.focus(),l.current=null)}return l.current||null!=e&&e.disabled||(l.current=document.activeElement),n.default.useEffect((()=>{if(r.current instanceof HTMLElement){var e;if(!a)return i.current=vo(r.current,null!==(e=o.current)&&void 0!==e?e:void 0),()=>{d()};d()}}),[r,o,a,...t]),{containerRef:r,initialFocusRef:o}}function yo(e={},r=[]){const o=yr(e.containerRef),a=!!e.activeDescendantFocus,i=yr("boolean"!=typeof e.activeDescendantFocus&&e.activeDescendantFocus?e.activeDescendantFocus:void 0),l=e.disabled,d=n.default.useRef();return t.useEffect((()=>{if(o.current instanceof HTMLElement&&(!a||i.current instanceof HTMLElement)){if(!l){var t;const r={...e,activeDescendantControl:null!==(t=i.current)&&void 0!==t?t:void 0};return d.current=Pr(o.current,r),()=>{var e;null===(e=d.current)||void 0===e||e.abort()}}var r;null===(r=d.current)||void 0===r||r.abort()}}),[l,...r]),{containerRef:o,activeDescendantControlRef:i}}const wo="__primerPortalRoot__",Bo="__default__",ko={};function $o(){const e=ko.__default__;if(!e||!document.body.contains(e)){let e=document.getElementById(wo);if(!(e instanceof Element)){e=document.createElement("div"),e.setAttribute("id",wo),e.style.position="absolute",e.style.top="0",e.style.left="0";const t=document.querySelector("[data-portal-root]");t?t.appendChild(e):document.body.appendChild(e)}!function(e,t="__default__"){ko[t]=e}(e)}}var So=({children:e,onMount:t,containerName:r})=>{const a=document.createElement("div");a.style.position="relative",a.style.zIndex="1";const i=n.default.useRef(a);return n.default.useLayoutEffect((()=>{let e=r;void 0===e&&(e=Bo,$o());const o=ko[e];if(!o)throw new Error(`Portal container '${r}' is not yet registered. Container must be registered with registerPortal before use.`);const a=i.current;return o.appendChild(a),null==t||t(),()=>{o.removeChild(a)}}),[i]),o.createPortal(e,i.current)};function To(...e){const r=t.useRef(null);return n.default.useLayoutEffect((()=>{function t(t=null){for(const r of e){if(!r)return;"function"==typeof r?r(t):r.current=t}}return t(r.current),()=>{t(r.current)}}),[...e,r.current]),r}const Eo={prefix:String(Math.round(1e10*Math.random())),current:0},Co=n.default.createContext(Eo);let zo=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function Ro(e){let r=t.useContext(Co);return r!==Eo||zo||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),t.useMemo((()=>e||"react-aria"+r.prefix+"-"+ ++r.current),[e])}const No="200ms",Ao=i.default("div")`
30
30
  position: fixed;
31
31
  top: 0;
32
32
  left: 0;