summaryrefslogtreecommitdiff
path: root/assets/outbox/Release v0.54.0 · hyprwm_Hyprland_files/github-elements-b03340a48949734e.js
blob: 3a5df89794355a718d8939d59521e048f0c95599 (plain)
1
2
3
performance.mark("js-parse-end:github-elements-b03340a48949734e.js");
"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["79117"],{40721(t,e,i){i(39242),i(58466),i(74057),i(91707),i(62044),i(90204);var n=i(28078);i(78143),i(27552),i(72705),i(9841),i(44911),i(92284);var s=i(5045),r=i(26316);r.cg&&(r.cg.IncludeFragmentElement.prototype.fetch=function(t){let e=this.getAttribute("data-nonce")||"";return(0,s.tV)(t.headers,e),window.fetch(t)}),i(40102);var a=i(31635),o=i(94571);class l extends HTMLElement{updateURL(t){let e=t.currentTarget,i=e.getAttribute("data-url")||"";if(this.helpField.value=i,e.matches(".js-git-protocol-clone-url"))for(let t of this.helpTexts)t.textContent=i;for(let t of this.cloneURLButtons)t.classList.remove("selected");e.classList.add("selected")}}(0,a.Cg)([o.aC],l.prototype,"helpField",void 0),(0,a.Cg)([o.zV],l.prototype,"helpTexts",void 0),(0,a.Cg)([o.zV],l.prototype,"cloneURLButtons",void 0),l=(0,a.Cg)([(0,o.p_)("git-clone-help")],l);class u extends HTMLElement{#t="";#e="";#i;#n;positions;static observedAttributes=["query","data-owner-input"];get query(){return this.ownerInput?this.ownerInput.value:this.getAttribute("query")||""}set query(t){this.setAttribute("query",t)}get ownerInput(){let t=this.ownerDocument.getElementById(this.getAttribute("data-owner-input")||"");return t instanceof HTMLInputElement?t:null}connectedCallback(){this.handleEvent(),this.ownerInput?.addEventListener("input",this),this.#i=new MutationObserver(()=>this.handleEvent())}handleEvent(){this.#n&&cancelAnimationFrame(this.#n),this.#n=requestAnimationFrame(()=>this.mark())}disconnectedCallback(){this.ownerInput?.removeEventListener("input",this),this.#i.disconnect()}mark(){let t=this.textContent||"",e=this.query;if(t===this.#t&&e===this.#e)return;this.#t=t,this.#e=e,this.#i.disconnect();let i=0,n=document.createDocumentFragment();for(let s of(this.positions||function(t,e){let i=[],n=0;for(let s=0;s<t.length;s++){let r=t[s],a=e.indexOf(r,n);if(-1===a)break;n=a+1,i.push(a)}return i})(e,t)){if(Number(s)!==s||s<i||s>t.length)continue;""!==t.slice(i,s)&&n.appendChild(document.createTextNode(t.slice(i,s))),i=s+1;let e=document.createElement("mark");e.textContent=t[s],n.appendChild(e)}n.appendChild(document.createTextNode(t.slice(i))),this.replaceChildren(n),this.#i.observe(this,{attributes:!0,childList:!0,subtree:!0})}}window.customElements.get("marked-text")||(window.MarkedTextElement=u,window.customElements.define("marked-text",u));var d=i(29001);class h extends HTMLElement{connectedCallback(){this.addEventListener("input",c)}disconnectedCallback(){this.removeEventListener("input",c)}}function c(t){var e,i;let n,s=t.currentTarget;if(!(s instanceof h))return;let r=t.target;if(!(r instanceof HTMLInputElement))return;let a=r.form;if(!(a instanceof HTMLFormElement))return;let o=(e=r.value,i={minimumCharacterCount:Number(s.getAttribute("minimum-character-count")),passphraseLength:Number(s.getAttribute("passphrase-length"))},(n={valid:!1,hasMinimumCharacterCount:e.length>=i.minimumCharacterCount,hasMinimumPassphraseLength:0!==i.passphraseLength&&e.length>=i.passphraseLength,hasLowerCase:/[a-z]/.test(e),hasNumber:/\d/.test(e)}).valid=n.hasMinimumPassphraseLength||n.hasMinimumCharacterCount&&n.hasLowerCase&&n.hasNumber,n);if(o.valid){r.setCustomValidity("");let t=s.querySelector("dl.form-group");t&&(t.classList.remove("errored"),t.classList.add("successed"))}else"true"!==s.getAttribute("skip-custom-validity")&&r.setCustomValidity(s.getAttribute("invalid-message")||"Invalid");(function(t,e){let i=t.querySelector("[data-more-than-n-chars]"),n=t.querySelector("[data-min-chars]"),s=t.querySelector("[data-number-requirement]"),r=t.querySelector("[data-letter-requirement]"),a=t.getAttribute("error-class")?.split(" ").filter(t=>t.length>0)||[],o=t.getAttribute("pass-class")?.split(" ").filter(t=>t.length>0)||[];for(let t of[i,n,s,r])t?.classList.remove(...a,...o);if(e.hasMinimumPassphraseLength&&i)i.classList.add(...o);else if(e.valid)n.classList.add(...o),s.classList.add(...o),r.classList.add(...o);else{let t=e.hasMinimumCharacterCount?o:a,l=e.hasNumber?o:a,u=e.hasLowerCase?o:a;i?.classList.add(...a),n.classList.add(...t),s.classList.add(...l),r.classList.add(...u)}})(s,o),(0,d.t)(a)}window.customElements.get("password-strength")||(window.PasswordStrengthElement=h,window.customElements.define("password-strength",h)),i(19e3);class m extends n.T{intervalMilliseconds=1e3;backoffMultiplier=1.5;pollingTimeout=null;async fetch(t,e){let i=await super.fetch(t),n=e||this.intervalMilliseconds;(!n||isNaN(n))&&(n=1e3);let s=isNaN(this.backoffMultiplier)?1.5:this.backoffMultiplier;return 202===i.status?(await new Promise(t=>{this.pollingTimeout=setTimeout(t,n)}),this.fetch(t,n*s)):i}refetch(){return this.cancelPolling(),super.refetch()}connectedCallback(){super.connectedCallback(),this.retryButton&&this.retryButton.addEventListener("click",()=>{this.refetch()})}disconnectedCallback(){this.cancelPolling()}cancelPolling(){this.pollingTimeout&&clearTimeout(this.pollingTimeout)}}(0,a.Cg)([o.aC],m.prototype,"retryButton",void 0),(0,a.Cg)([o.CF],m.prototype,"intervalMilliseconds",void 0),(0,a.Cg)([o.CF],m.prototype,"backoffMultiplier",void 0),m=(0,a.Cg)([(0,o.p_)("poll-include-fragment")],m);var p=i(35908);let f=t=>void 0===t||/\n/.test(t),g=["position:absolute;","overflow:auto;","word-wrap:break-word;","top:0px;","left:-9999px;"],v=["box-sizing","font-family","font-size","font-style","font-variant","font-weight","height","letter-spacing","line-height","max-height","min-height","padding-bottom","padding-left","padding-right","padding-top","border-bottom","border-left","border-right","border-top","text-decoration","text-indent","text-transform","width","word-spacing"],b=new WeakMap,w=new WeakMap;class y{expander;input;menu;createLink;oninput;onkeydown;onpaste;oncommit;onblur;onmousedown;combobox;match;justPasted;interactingWithMenu;constructor(t,e){this.expander=t,this.input=e,this.combobox=null,this.menu=null,this.createLink=null,this.match=null,this.justPasted=!1,this.oninput=this.onInput.bind(this),this.onpaste=this.onPaste.bind(this),this.onkeydown=this.onKeydown.bind(this),this.oncommit=this.onCommit.bind(this),this.onmousedown=this.onMousedown.bind(this),this.onblur=this.onBlur.bind(this),this.onCreateCommandLinkKeyDown=this.onCreateCommandLinkKeyDown.bind(this),this.interactingWithMenu=!1,e.addEventListener("paste",this.onpaste),e.addEventListener("input",this.oninput),e.addEventListener("keydown",this.onkeydown),e.addEventListener("blur",this.onblur)}destroy(){this.input.removeEventListener("paste",this.onpaste),this.input.removeEventListener("input",this.oninput),this.input.removeEventListener("keydown",this.onkeydown),this.input.removeEventListener("blur",this.onblur)}activate(t,e){this.input===document.activeElement&&this.setMenu(t,e)}deactivate(){let t=this.menu,e=this.combobox;return!!t&&!!e&&(this.createLink?.removeEventListener("hotkey-fire",this.onCreateCommandLinkKeyDown),this.menu=null,this.createLink=null,this.combobox=null,t.removeEventListener("combobox-commit",this.oncommit),t.removeEventListener("mousedown",this.onmousedown),e.destroy(),t.remove(),!0)}setMenu(t,e){this.deactivate(),this.menu=e,this.createLink=e.querySelector(".js-slash-command-menu-create-link"),e.id||(e.id=`text-expander-${Math.floor(1e5*Math.random()).toString()}`),this.expander.append(e);let i=e.querySelector(".js-command-list-container"),n={tabInsertsSuggestions:!1};i?this.combobox=new p.A(this.input,i,n):this.combobox=new p.A(this.input,e,n);let{top:s,left:r}=function(t,e=t.selectionEnd){let{mirror:i,marker:n}=function(t,e){let i,n,s=t.nodeName.toLowerCase();if("textarea"!==s&&"input"!==s)throw Error("expected textField to a textarea or input");let r=b.get(t);if(r&&r.parentElement===t.parentElement)r.textContent="";else{r=document.createElement("div"),b.set(t,r);let e=window.getComputedStyle(t),i=g.slice(0);"textarea"===s?i.push("white-space:pre-wrap;"):i.push("white-space:nowrap;");for(let t=0,n=v.length;t<n;t++){let n=v[t];i.push(`${n}:${e.getPropertyValue(n)};`)}r.style.cssText=i.join(" ")}let a=document.createElement("span");if(a.style.cssText="position: absolute;",a.textContent="\xa0","number"==typeof e){let s=t.value.substring(0,e);s&&(i=document.createTextNode(s)),(s=t.value.substring(e))&&(n=document.createTextNode(s))}else{let e=t.value;e&&(i=document.createTextNode(e))}if(i&&r.appendChild(i),r.appendChild(a),n&&r.appendChild(n),!r.parentElement){if(!t.parentElement)throw Error("textField must have a parentElement to mirror");t.parentElement.insertBefore(r,t)}return r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft,{mirror:r,marker:a}}(t,e),s=i.getBoundingClientRect(),r=n.getBoundingClientRect();return setTimeout(()=>{i.remove()},5e3),{top:r.top-s.top,left:r.left-s.left}}(this.input,t.position),a=parseInt(window.getComputedStyle(this.input).fontSize);e.style.top=`${s+a}px`,e.style.left=`${r}px`,this.combobox.start(),e.addEventListener("combobox-commit",this.oncommit),e.addEventListener("mousedown",this.onmousedown),this.createLink?.addEventListener("hotkey-fire",this.onCreateCommandLinkKeyDown),this.combobox.navigate(1)}setValue(t){if(null==t)return;let e=this.match;if(!e)return;let{cursor:i,value:n}=this.replaceCursorMark(t);n=n?.length===0?n:`${n} `;let s=e.position-e.key.length,r=e.position+e.text.length;this.input.focus();let a=!1;try{this.input.setSelectionRange(s,r),a=document.execCommand("insertText",!1,n)}catch{a=!1}if(!a){let t=this.input.value.substring(0,e.position-e.key.length),i=this.input.value.substring(e.position+e.text.length);this.input.value=t+n+i}this.deactivate(),i=s+(i||n.length),this.input.selectionStart=i,this.input.selectionEnd=i}replaceCursorMark(t){let e=/%cursor%/gm,i=e.exec(t);return i?{cursor:i.index,value:t.replace(e,"")}:{cursor:null,value:t}}async onCommit({target:t}){if(!(t instanceof HTMLElement)||!this.combobox)return;let e=this.match;if(!e)return;let n={item:t,key:e.key,value:null},s=new CustomEvent("text-expander-value",{cancelable:!0,detail:n}),r=!this.expander.dispatchEvent(s),{onValue:a}=await i.e("3033").then(i.bind(i,51168));await a(this.expander,e.key,t),!r&&n.value&&this.setValue(n.value)}onBlur(){if(this.interactingWithMenu){this.interactingWithMenu=!1;return}this.deactivate()}onPaste(){this.justPasted=!0}async delay(t){return new Promise(e=>setTimeout(e,t))}async onInput(){if(this.justPasted){this.justPasted=!1;return}let t=this.findMatch();if(t){if(this.match=t,await this.delay(this.appropriateDelay()),this.match!==t)return;let e=await this.notifyProviders(t);if(!this.match)return;e?this.activate(t,e):this.deactivate()}else this.match=null,this.deactivate()}appropriateDelay(){return 250}findMatch(){let t=this.input.selectionEnd,e=this.input.value;for(let i of this.expander.getKeys()){let n=function(t,e,i){let n=t.lastIndexOf(e,i-1);if(-1===n||t.lastIndexOf(" ",i-1)>n||t.lastIndexOf("\n",i-1)>n)return;let s=t[n-1];if(!s||"\n"===s)return{word:t.substring(n+e.length,i),position:n+e.length,beginningOfLine:f(s)}}(e,i,t);if(n)return{text:n.word,key:i,position:n.position,beginningOfLine:n.beginningOfLine}}}async notifyProviders(t){let e=[],n=t=>e.push(t),s=new CustomEvent("text-expander-change",{cancelable:!0,detail:{provide:n,text:t.text,key:t.key}});if(!this.expander.dispatchEvent(s))return;let{onChange:r}=await i.e("3033").then(i.bind(i,51168));return r(this.expander,t.key,n,t.text),(await Promise.all(e)).filter(t=>t.matched).map(t=>t.fragment)[0]}onMousedown(){this.interactingWithMenu=!0}onKeydown(t){if("Tab"===t.key&&this.createLink){t.stopImmediatePropagation(),t.preventDefault();let e=this.combobox;this.combobox=null,this.createLink.focus(),this.combobox=e;return}"Escape"===t.key&&this.deactivate()&&(t.stopImmediatePropagation(),t.preventDefault())}onCreateCommandLinkKeyDown(t){t.stopImmediatePropagation(),t.preventDefault(),this.input?.focus()}}class E extends HTMLElement{getKeys(){let t=this.getAttribute("keys");return t?t.split(" "):[]}connectedCallback(){let t=this.querySelector('input[type="text"], textarea');if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))return;let e=new y(this,t);w.set(this,e)}reconnect(){if(null!==this.querySelector(".js-slash-command-menu:not(.d-none)"))return;let t=w.get(this);t&&(t.destroy(),w.delete(this)),this.connectedCallback()}disconnectedCallback(){let t=w.get(this);t&&(t.destroy(),w.delete(this))}setValue(t){let e=w.get(this);e&&e.setValue(t)}setMenu(t,e=!1){let i=w.get(this);!i||i.match&&(e&&(i.interactingWithMenu=!0),i.setMenu(i.match,t))}closeMenu(){let t=w.get(this);t&&t.setValue("")}isLoading(){let t=this.getElementsByClassName("js-slash-command-expander-loading")[0];if(t){let e=t.cloneNode(!0);e.classList.remove("d-none"),this.setMenu(e)}}showError(){let t=this.getElementsByClassName("js-slash-command-expander-error")[0];if(t){let e=t.cloneNode(!0);e.classList.remove("d-none"),this.setMenu(e)}}}window.customElements.get("slash-command-expander")||(window.SlashCommandExpanderElement=E,window.customElements.define("slash-command-expander",E));class C extends HTMLElement{acceptSuggestion(){this.suggestion?.textContent&&(this.input.value=this.suggestion.textContent,this.input.dispatchEvent(new Event("input")),this.suggestionContainer&&(this.suggestionContainer.hidden=!0),this.input.focus())}}(0,a.Cg)([o.aC],C.prototype,"input",void 0),(0,a.Cg)([o.aC],C.prototype,"suggestionContainer",void 0),(0,a.Cg)([o.aC],C.prototype,"suggestion",void 0),C=(0,a.Cg)([(0,o.p_)("text-suggester")],C);class x extends HTMLElement{#s;#r=0;#e=null;#n;#a=new Set;#o=null;filter=(t,e)=>String(t).includes(e);static get observedAttributes(){return["src","loading","data-property","aria-owns"]}get filtered(){if(this.#o)return this.#o;if(this.hasAttribute("aria-owns")){let t=this.ownerDocument.getElementById(this.getAttribute("aria-owns")||"");t&&(t instanceof Set||t&&"object"==typeof t&&"size"in t&&"add"in t&&"delete"in t&&"clear"in t)&&(this.#o=t)}return this.#o||=new Set}set filtered(t){this.#o=t}get input(){return this.querySelector("input, textarea")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get property(){return this.getAttribute("data-property")||""}set property(t){this.setAttribute("data-property",t)}reset(){this.filtered.clear(),this.#a=new Set}clear(){this.input&&(this.input.value="",this.input.dispatchEvent(new Event("input")))}attributeChangedCallback(t,e,i){let n=this.isConnected&&this.src,s="eager"===this.loading,r=e!==i;("src"===t||"data-property"===t)&&r&&(this.#e=null,this.#n&&clearTimeout(this.#n)),n&&s&&("src"===t||"loading"===t||"accept"===t||"data-property"===t)&&r?(cancelAnimationFrame(this.#r),this.#r=requestAnimationFrame(()=>this.load())):"aria-owns"===t&&(this.#o=null)}connectedCallback(){this.src&&"eager"===this.loading&&(cancelAnimationFrame(this.#r),this.#r=requestAnimationFrame(()=>this.load()));let t=this.input;if(!t)return;let e=this.getAttribute("aria-owns");null!==e&&this.attributeChangedCallback("aria-owns","",e),t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false"),this.src&&"lazy"===this.loading&&(document.activeElement===t?this.load():t.addEventListener("focus",()=>{this.load()},{once:!0})),t.addEventListener("input",this)}disconnectedCallback(){this.input?.removeEventListener("input",this)}handleEvent(t){"input"===t.type&&(this.#n&&clearTimeout(this.#n),this.#n=window.setTimeout(()=>this.filterItems(),(this.input?.value?.length,300)))}async load(){this.#s?.abort(),this.#s=new AbortController;let{signal:t}=this.#s;if(!this.src)throw Error("missing src");if(await new Promise(t=>setTimeout(t,0)),!t.aborted){this.dispatchEvent(new Event("loadstart"));try{let e=await this.fetch(this.request(),{signal:t,headers:{...(0,s.kt)()}});if(location.origin+this.src!==e.url)return;if(!e.ok)throw Error(`Failed to load resource: the server responded with a status of ${e.status}`);this.#a=new Set((await e.json())[this.property]),this.#e=null,this.dispatchEvent(new Event("loadend"))}catch(e){if(t.aborted)return void this.dispatchEvent(new Event("loadend"));throw(async()=>{this.dispatchEvent(new Event("error")),this.dispatchEvent(new Event("loadend"))})(),e}this.filtered.clear(),this.filterItems()}}request(){return new Request(this.src,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"application/json"}})}fetch(t,e){return fetch(t,e)}filterItems(){let t,e=this.input?.value.trim()??"",i=this.#e;if(this.#e=e,e!==i){for(let n of(this.dispatchEvent(new CustomEvent("virtual-filter-input-filter")),i&&e.includes(i)?t=this.filtered:(t=this.#a,this.filtered.clear()),t))this.filter(n,e)?this.filtered.add(n):this.filtered.delete(n);this.dispatchEvent(new CustomEvent("virtual-filter-input-filtered"))}}}window.customElements.get("virtual-filter-input")||(window.VirtualFilterInputElement=x,window.customElements.define("virtual-filter-input",x));let L=new IntersectionObserver(t=>{for(let e of t)e.isIntersecting&&e.target instanceof k&&"eager"===e.target.updating&&e.target.update()});class k extends HTMLElement{#l=!1;#a=new Set;#u=new Map;#d=1/0;#h=new Map;#c=new Map;#r=0;static get observedAttributes(){return["data-updating","aria-activedescendant"]}get updating(){return"lazy"===this.getAttribute("data-updating")?"lazy":"eager"}set updating(t){this.setAttribute("data-updating",t)}get size(){return this.#a.size}get range(){let t=this.getBoundingClientRect().height,{scrollTop:e}=this,i=`${e}-${t}`;if(this.#h.has(i))return this.#h.get(i);let n=0,s=0,r=0,a=0,o=this.#u;for(let i of this.#a){let l=o.get(i)||this.#d;if(r+l<e)r+=l,n+=1,s+=1;else if(a-l<t)a+=l,s+=1;else if(a>=t)break}return[n,s]}get list(){let t=this.querySelector("ul, ol, tbody");if(!t)throw Error("virtual-list must have a container element inside: any of <ul>, <ol>, <tbody>");return t}attributeChangedCallback(t,e,i){if(e===i||!this.isConnected)return;let n="data-updating"===t&&"eager"===i,s="data-sorted"===t&&this.hasAttribute("data-sorted");if((n||s)&&this.update(),"aria-activedescendant"===t){let t=this.getIndexByElementId(i);this.dispatchEvent(new A(t,i)),"eager"===this.updating&&this.update()}}connectedCallback(){this.addEventListener("scroll",()=>this.update()),this.updateSync=this.updateSync.bind(this),L.observe(this)}update(){this.#r&&cancelAnimationFrame(this.#r),!this.#l&&this.hasAttribute("data-sorted")?this.#r=requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("virtual-list-sort",{cancelable:!0}))&&this.sort()}):this.#r=requestAnimationFrame(this.updateSync)}renderItem(t){let e={item:t,fragment:document.createDocumentFragment()};return this.dispatchEvent(new CustomEvent("virtual-list-render-item",{detail:e})),e.fragment.children[0]}recalculateHeights(t){let e=this.list;if(!e)return;let i=this.renderItem(t);if(!i)return;e.append(i);let n=e.children[0].getBoundingClientRect().height;e.replaceChildren(),n&&(this.#d=n,this.#u.set(t,n))}getIndexByElementId(t){if(!t)return -1;let e=0;for(let[,i]of this.#c){if(i.id===t||i.querySelector(`#${t}`))return e;e++}return -1}updateSync(){let t=this.list,[e,i]=this.range;if(i<e||!this.dispatchEvent(new CustomEvent("virtual-list-update",{cancelable:!0})))return;let n=new Map,s=this.#c,r=-1,a=!0,o=0,l=0,u=0;for(let t of this.#a){if(-1!==r||Number.isFinite(this.#d)&&0!==this.#d||this.recalculateHeights(t),r+=1,u=this.#u.get(t)||this.#d,r<e){o+=u,l=o;continue}if(r>i){a=!1;break}let d=null;if(s.has(t))d=s.get(t);else{if(!(d=this.renderItem(t)))continue;d.querySelector("[aria-setsize]")?.setAttribute("aria-setsize",this.#a.size.toString()),d.querySelector("[aria-posinset]")?.setAttribute("aria-posinset",(r+1).toString()),s.set(t,d)}d.querySelector("[tabindex]")?.setAttribute("data-scrolltop",l.toString()),l+=u,n.set(t,d)}t.replaceChildren(...n.values()),t.style.paddingTop=`${o}px`;let d=this.size*this.#d;t.style.height=`${d||0}px`;let h=!1,c=this.getBoundingClientRect().bottom;for(let[t,e]of n){let{height:i,bottom:n}=e.getBoundingClientRect();h=h||n>=c,this.#u.set(t,i)}if(!a&&this.size>n.size&&!h)return this.#h.delete(`${this.scrollTop}-${this.getBoundingClientRect().height}`),this.update();this.dispatchEvent(new M(s)),this.dispatchEvent(new CustomEvent("virtual-list-updated"))}resetRenderCache(){this.#c=new Map}has(t){return this.#a.has(t)}add(t){return this.#a.add(t),this.#l=!1,Number.isFinite(this.#d)||this.recalculateHeights(t),this.resetRenderCache(),this.dispatchEvent(new Event("virtual-list-data-updated")),"eager"===this.updating&&this.update(),this}delete(t){let e=this.#a.delete(t);return this.#l=!1,this.#u.delete(t),this.resetRenderCache(),this.dispatchEvent(new Event("virtual-list-data-updated")),"eager"===this.updating&&this.update(),e}clear(){this.#a.clear(),this.#u.clear(),this.#d=1/0,this.#l=!0,this.resetRenderCache(),this.dispatchEvent(new Event("virtual-list-data-updated")),"eager"===this.updating&&this.update()}forEach(t,e){for(let i of this)t.call(e,i,i,this)}entries(){return this.#a.entries()}values(){return this.#a.values()}keys(){return this.#a.keys()}[Symbol.iterator](){return this.#a[Symbol.iterator]()}union(t){return this.#a.union(t)}intersection(t){return this.#a.intersection(t)}difference(t){return this.#a.difference(t)}symmetricDifference(t){return this.#a.symmetricDifference(t)}isSubsetOf(t){return this.#a.isSubsetOf(t)}isSupersetOf(t){return this.#a.isSupersetOf(t)}isDisjointFrom(t){return this.#a.isDisjointFrom(t)}[Symbol.toStringTag]="VirtualListElement";sort(t){return this.#a=new Set(Array.from(this).sort(t)),this.#l=!0,this.dispatchEvent(new Event("virtual-list-data-updated")),"eager"===this.updating&&this.update(),this}}class A extends Event{index;id;constructor(t,e){super("virtual-list-activedescendant-changed"),this.index=t,this.id=e}}class M extends Event{rowsCache;constructor(t){super("virtual-list-rendered"),this.rowsCache=t}}window.customElements.get("virtual-list")||(window.VirtualListElement=k,window.customElements.define("virtual-list",k))},29001(t,e,i){i.d(e,{t:()=>l});var n=i(63557),s=i(21403),r=i(21744);function a(t){let e=t.getAttribute("data-required-value"),i=t.getAttribute("data-required-value-prefix");if(t.value===e)t.setCustomValidity("");else{let n=e;i&&(n=i+n),t.setCustomValidity(n)}}(0,n.eC)("[data-required-value]",function(t){a(t.currentTarget)}),(0,r.on)("change","[data-required-value]",function(t){let e=t.currentTarget;a(e),l(e.form)}),(0,n.eC)("[data-required-trimmed]",function(t){let e=t.currentTarget;""===e.value.trim()?e.setCustomValidity(e.getAttribute("data-required-trimmed")):e.setCustomValidity("")}),(0,r.on)("change","[data-required-trimmed]",function(t){let e=t.currentTarget;""===e.value.trim()?e.setCustomValidity(e.getAttribute("data-required-trimmed")):e.setCustomValidity(""),l(e.form)}),(0,n.uE)("input[pattern],input[required],textarea[required],input[data-required-change],textarea[data-required-change],input[data-required-value],textarea[data-required-value]",t=>{let e=t.checkValidity();function i(){let i=t.checkValidity();i!==e&&t.form&&l(t.form),e=i}t.addEventListener("input",i),t.addEventListener("blur",function e(){t.removeEventListener("input",i),t.removeEventListener("blur",e)})});let o=new WeakMap;function l(t){let e=t.checkValidity();for(let i of t.querySelectorAll("button[data-disable-invalid]"))i.disabled=!e}(0,s.lB)("button[data-disable-invalid]",{constructor:HTMLButtonElement,initialize(t){let e=t.form;e&&(o.get(e)||(e.addEventListener("change",()=>l(e)),o.set(e,!0)),t.disabled=!e.checkValidity())}}),(0,s.lB)("input[data-required-change], textarea[data-required-change]",function(t){let e="radio"===t.type&&t.form?t.form.elements.namedItem(t.name).value:null;function i(i){let n=t.form;if(i&&"radio"===t.type&&n&&e)for(let i of n.elements.namedItem(t.name))i instanceof HTMLInputElement&&i.setCustomValidity(t.value===e?"unchanged":"");else t.setCustomValidity(t.value===(e||t.defaultValue)?"unchanged":"")}t.addEventListener("input",i),t.addEventListener("change",i),i(),t.form&&l(t.form)}),document.addEventListener("reset",function(t){if(t.target instanceof HTMLFormElement){let e=t.target;setTimeout(()=>l(e))}})},40102(t,e,i){i.d(e,{A:()=>h});var n=i(91385);let s=(t,e,i)=>{if(!(0,n.qA)(t,e))return-1/0;let s=(0,n.fN)(t,e);return s<i?-1/0:s},r=(t,e,i)=>{t.textContent="";let s=0;for(let r of(0,n.Xq)(e,i)){""!==i.slice(s,r)&&t.appendChild(document.createTextNode(i.slice(s,r))),s=r+1;let e=document.createElement("mark");e.textContent=i[r],t.appendChild(e)}t.appendChild(document.createTextNode(i.slice(s)))},a=new WeakMap,o=new WeakMap,l=new WeakMap,u=t=>{if(!l.has(t)&&t instanceof HTMLElement){let e=(t.getAttribute("data-value")||t.textContent||"").trim();return l.set(t,e),e}return l.get(t)||""};class d extends HTMLElement{connectedCallback(){let t=this.querySelector("ul");if(!t)return;let e=new Set(t.querySelectorAll("li")),i=this.querySelector("input");i instanceof HTMLInputElement&&i.addEventListener("input",()=>{this.value=i.value});let s=new MutationObserver(t=>{let i=!1;for(let s of t)if("childList"===s.type&&s.addedNodes.length){for(let t of s.addedNodes)if(t instanceof HTMLLIElement&&!e.has(t)){let s=u(t);i=i||(0,n.qA)(this.value,s),e.add(t)}}i&&this.sort()});s.observe(t,{childList:!0});let r={handler:s,items:e,lazyItems:new Map,timer:null};o.set(this,r)}disconnectedCallback(){let t=o.get(this);t&&(t.handler.disconnect(),o.delete(this))}addLazyItems(t,e){let i=o.get(this);if(!i)return;let{lazyItems:s}=i,{value:r}=this,a=!1;for(let i of t)s.set(i,e),a=a||!!r&&(0,n.qA)(r,i);a&&this.sort()}sort(){let t=a.get(this);t&&(t.aborted=!0);let e={aborted:!1};a.set(this,e);let{minScore:i,markSelector:n,maxMatches:d,value:h}=this,c=o.get(this);if(!c||!this.dispatchEvent(new CustomEvent("fuzzy-list-will-sort",{cancelable:!0,detail:h})))return;let{items:m,lazyItems:p}=c,f=this.hasAttribute("mark-selector"),g=this.querySelector("ul");if(!g)return;let v=[];if(h){for(let t of m){let e=s(h,u(t),i);e!==-1/0&&v.push({item:t,score:e})}for(let[t,e]of p){let n=s(h,t,i);n!==-1/0&&v.push({text:t,render:e,score:n})}v.sort((t,e)=>e.score-t.score).splice(d)}else{let t=v.length;for(let e of m){if(t>=d)break;v.push({item:e,score:1}),t+=1}for(let[e,i]of p){if(t>=d)break;v.push({text:e,render:i,score:1}),t+=1}}requestAnimationFrame(()=>{if(e.aborted)return;let t=g.querySelector('input[type="radio"]:checked');g.textContent="";let i=0,s=()=>{if(e.aborted)return;let a=Math.min(v.length,i+100),o=document.createDocumentFragment();for(let t=i;t<a;t+=1){let e=v[t],i=null;if("render"in e&&"text"in e){let{render:t,text:n}=e;i=t(n),m.add(i),l.set(i,n),p.delete(n)}else"item"in e&&(i=e.item);i instanceof HTMLElement&&(f&&r(n&&i.querySelector(n)||i,f?h:"",u(i)),o.appendChild(i))}i=a;let d=!1;if(t instanceof HTMLInputElement)for(let e of o.querySelectorAll('input[type="radio"]:checked'))e instanceof HTMLInputElement&&e.value!==t.value&&(e.checked=!1,d=!0);if(this.getAttribute("data-tab-only-first")){let t=this.querySelectorAll("button.js-emoji-button");for(let e of t)e.setAttribute("tabindex","-1");t.item(0)?.setAttribute("tabindex","0")}else for(let t of o.querySelectorAll('button[tabindex="-1"]'))t.setAttribute("tabindex","0");if(g.appendChild(o),t&&d&&t.dispatchEvent(new Event("change",{bubbles:!0})),a<v.length)requestAnimationFrame(s);else{g.hidden=0===v.length;let t=this.querySelector("[data-fuzzy-list-show-on-empty]");t&&(t.hidden=v.length>0),this.dispatchEvent(new CustomEvent("fuzzy-list-sorted",{detail:v.length}))}};s()})}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get markSelector(){return this.getAttribute("mark-selector")||""}set markSelector(t){t?this.setAttribute("mark-selector",t):this.removeAttribute("mark-selector")}get minScore(){return Number(this.getAttribute("min-score")||0)}set minScore(t){Number.isNaN(t)||this.setAttribute("min-score",String(t))}get maxMatches(){return Number(this.getAttribute("max-matches")||1/0)}set maxMatches(t){Number.isNaN(t)||this.setAttribute("max-matches",String(t))}get ariaLiveElement(){let t=this.getAttribute("data-aria-live-element");if(!t)return;let e=document.getElementById(t);if(e)return e}static get observedAttributes(){return["value","mark-selector","min-score","max-matches"]}attributeChangedCallback(t,e,i){if(e===i)return;let n=o.get(this);n&&(n.timer&&window.clearTimeout(n.timer),n.timer=window.setTimeout(()=>this.sort(),100))}}let h=d;window.customElements.get("fuzzy-list")||(window.FuzzyListElement=d,window.customElements.define("fuzzy-list",d))},19e3(t,e,i){function n(){return/Windows/.test(navigator.userAgent)?"windows":/Macintosh/.test(navigator.userAgent)?"mac":null}i.d(e,{u:()=>n}),(0,i(21403).lB)(".js-remove-unless-platform",function(t){let e,i;e=(t.getAttribute("data-platforms")||"").split(","),(i=n())&&e.includes(i)||t.remove()})},34619(t,e,i){i.d(e,{O:()=>a,S:()=>r});var n=i(26316);let s=n.cg?.document?.head?.querySelector('meta[name="release"]')?.content||"",r="X-GitHub-Client-Version";function a(){return s}},5045(t,e,i){i.d(e,{jC:()=>o,kt:()=>r,tV:()=>a});var n=i(34619),s=i(381);function r(t){let e={"X-Requested-With":"XMLHttpRequest",...(0,s.wE)(t)};return{...e,[n.S]:(0,n.O)()}}function a(t,e){for(let[i,n]of Object.entries(r(e)))t.set(i,n)}function o(t){return{"X-GitHub-App-Type":t}}},381(t,e,i){i.d(e,{$r:()=>a,M1:()=>o,li:()=>s,pS:()=>u,wE:()=>l});var n=i(26316);let s="X-Fetch-Nonce",r=new Set;function a(t){r.add(t)}function o(){return r.values().next().value||""}function l(t){let e={};return void 0!==t&&(e["X-Fetch-Nonce-To-Validate"]=t),void 0===t?e[s]=o():r.has(t)?e[s]=t:e[s]=Array.from(r).join(","),e}function u(){let t=n.XC?.head?.querySelector('meta[name="fetch-nonce"]')?.content||"";t&&a(t)}},63557(t,e,i){i.d(e,{Ff:()=>l,eC:()=>u,uE:()=>o});var n=i(6986);let s=!1,r=new n.A;function a(t){let e=t.target;if(e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE)for(let t of r.matches(e))t.data.call(null,e)}function o(t,e){s||(s=!0,document.addEventListener("focus",a,!0)),r.add(t,e),document.activeElement instanceof HTMLElement&&document.activeElement.matches(t)&&e(document.activeElement)}function l(t,e,i){function n(e){let s=e.currentTarget;s&&(s.removeEventListener(t,i),s.removeEventListener("blur",n))}o(e,function(e){e.addEventListener(t,i),e.addEventListener("blur",n)})}function u(t,e){function i(t){let{currentTarget:n}=t;n&&(n.removeEventListener("input",e),n.removeEventListener("blur",i))}o(t,function(t){t.addEventListener("input",e),t.addEventListener("blur",i)})}},26316(t,e,i){i.d(e,{Kn:()=>a,XC:()=>s,cg:()=>r,fV:()=>o});let n="u">typeof FORCE_SERVER_ENV&&FORCE_SERVER_ENV,s="u"<typeof document||n?void 0:document,r="u"<typeof window||n?void 0:window,a="u"<typeof history||n?void 0:history,o="u"<typeof location||n?{get pathname(){return(void 0)??""},get origin(){return(void 0)??""},get search(){return(void 0)??""},get hash(){return(void 0)??""},get href(){return(void 0)??""}}:location}},function(t){t.O(0,["13726","24387","2966","41013","46740","51210","81683","81751","96232"],function(){return t(t.s=40721)}),t.O()}]);
//# sourceMappingURL=github-elements-b03340a48949734e-d3b3ad4d65f95ea9.js.map