1
2
3
|
performance.mark("js-parse-end:3064-ff9d0f819c141e10.js");
"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["3064"],{62044(t,e,n){n.d(e,{A:()=>a});class r extends HTMLElement{constructor(){super(),this.currentQuery=null,this.filter=null,this.debounceInputChange=function(t){let e;return function(){clearTimeout(e),e=setTimeout(()=>{clearTimeout(e),t()},300)}}(()=>o(this,!0)),this.boundFilterResults=()=>{o(this,!1)}}static get observedAttributes(){return["aria-owns"]}attributeChangedCallback(t,e){e&&"aria-owns"===t&&o(this,!1)}connectedCallback(){let t=this.input;t&&(t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false"),t.addEventListener("focus",this.boundFilterResults),t.addEventListener("change",this.boundFilterResults),t.addEventListener("input",this.debounceInputChange))}disconnectedCallback(){let t=this.input;t&&(t.removeEventListener("focus",this.boundFilterResults),t.removeEventListener("change",this.boundFilterResults),t.removeEventListener("input",this.debounceInputChange))}get input(){let t=this.querySelector("input");return t instanceof HTMLInputElement?t:null}reset(){let t=this.input;t&&(t.value="",t.dispatchEvent(new Event("change",{bubbles:!0})))}}async function o(t,e=!1){var n,r,a,l,s;let u,c,d,f=t.input;if(!f)return;let h=f.value.trim(),b=t.getAttribute("aria-owns");if(!b)return;let p=document.getElementById(b);if(!p)return;let m=p.hasAttribute("data-filter-list")?p:p.querySelector("[data-filter-list]");if(!m||(t.dispatchEvent(new CustomEvent("filter-input-start",{bubbles:!0})),e&&t.currentQuery===h))return;t.currentQuery=h;let g=t.filter||i,w=m.childElementCount,v=0,y=!1;for(let t of Array.from(m.children)){if(!(t instanceof HTMLElement))continue;let e=(((n=t).querySelector("[data-filter-item-text]")||n).textContent||"").trim(),r=g(t,e,h);!0===r.hideNew&&(y=r.hideNew),t.hidden=!r.match,r.match&&v++}let E=p.querySelector("[data-filter-new-item]"),A=!!E&&h.length>0&&!y;E instanceof HTMLElement&&(E.hidden=!A,A&&(r=E,a=h,(u=r.querySelector("[data-filter-new-item-text]"))&&(u.textContent=a),((c=r.querySelector("[data-filter-new-item-value]"))instanceof HTMLInputElement||c instanceof HTMLButtonElement)&&(c.value=a))),l=p,s=v>0||A,(d=l.querySelector("[data-filter-empty-state]"))instanceof HTMLElement&&(d.hidden=s),t.dispatchEvent(new CustomEvent("filter-input-updated",{bubbles:!0,detail:{count:v,total:w}}))}function i(t,e,n){return{match:-1!==e.toLowerCase().indexOf(n.toLowerCase()),hideNew:e===n}}let a=r;window.customElements.get("filter-input")||(window.FilterInputElement=r,window.customElements.define("filter-input",r))},27552(t,e,n){n.d(e,{A:()=>l});let r=new WeakMap;class o extends HTMLElement{constructor(){super();const t=i.bind(null,this,!0),e={currentQuery:null,oninput:function(t){let e;return function(n){clearTimeout(e),e=setTimeout(()=>{clearTimeout(e),t(n)},300)}}(e=>t(e)),fetch:t,controller:null};r.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&i(this,!1)}connectedCallback(){let t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");let e=r.get(this);e&&(t.addEventListener("focus",e.fetch),t.addEventListener("change",e.fetch),t.addEventListener("input",e.oninput))}disconnectedCallback(){let t=this.input;if(!t)return;let e=r.get(this);e&&(t.removeEventListener("focus",e.fetch),t.removeEventListener("change",e.fetch),t.removeEventListener("input",e.oninput))}get input(){let t=this.querySelector("input, textarea");return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}}async function i(t,e,n){let o,i=t.input;if(!i)return;let l=r.get(t);if(!l)return;let s=i.value;if(e&&l.currentQuery===s)return;l.currentQuery=s;let u=t.src;if(!u)return;let c=document.getElementById(t.getAttribute("aria-owns")||"");if(!c)return;let d=new URL(u,window.location.href),f=new URLSearchParams(d.search);f.append(t.getAttribute("param")||"q",s),d.search=f.toString(),l.controller?l.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),l.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};let h="";try{o=await a(t,d.toString(),{signal:l.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),h=await o.text(),t.removeAttribute("loading"),l.controller=null}catch(e){e instanceof Error&&"AbortError"!==e.name&&(t.removeAttribute("loading"),l.controller=null);return}o&&o.ok?(c.innerHTML=h,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0,detail:{eventType:n?n.type:void 0}}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}async function a(t,e,n){try{let r=await fetch(e,n);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),r}catch(e){throw e instanceof Error&&(null==e?void 0:e.name)!=="AbortError"&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}let l=o;window.customElements.get("remote-input")||(window.RemoteInputElement=o,window.customElements.define("remote-input",o))},91385(t,e,n){n.d(e,{Xq:()=>l,ai:()=>o,fN:()=>a,qA:()=>s});var r=-1/0,o=1/0;function i(t,e,n,o){for(var i=t.length,a=e.length,l=t.toLowerCase(),s=e.toLowerCase(),u=function(t){for(var e=t.length,n=Array(e),r="/",o=0;o<e;o++){var i,a=t[o];"/"===r?n[o]=.9:"-"===r||"_"===r||" "===r?n[o]=.8:"."===r?n[o]=.6:(i=r).toLowerCase()===i&&a.toUpperCase()===a?n[o]=.7:n[o]=0,r=a}return n}(e,u),c=0;c<i;c++){n[c]=Array(a),o[c]=Array(a);for(var d=r,f=c===i-1?-.005:-.01,h=0;h<a;h++)if(l[c]===s[h]){var b=r;c?h&&(b=Math.max(o[c-1][h-1]+u[h],n[c-1][h-1]+1)):b=-.005*h+u[h],n[c][h]=b,o[c][h]=d=Math.max(b,d+f)}else n[c][h]=r,o[c][h]=d+=f}}function a(t,e){var n=t.length,a=e.length;if(!n||!a)return r;if(n===a)return o;if(a>1024)return r;var l=Array(n),s=Array(n);return i(t,e,l,s),s[n-1][a-1]}function l(t,e){var n=t.length,o=e.length,a=Array(n);if(!n||!o)return a;if(n===o){for(var l=0;l<n;l++)a[l]=l;return a}if(o>1024)return a;var s=Array(n),u=Array(n);i(t,e,s,u);for(var c=!1,l=n-1,d=o-1;l>=0;l--)for(;d>=0;d--)if(s[l][d]!==r&&(c||s[l][d]===u[l][d])){c=l&&d&&u[l][d]===s[l-1][d-1]+1,a[l]=d--;break}return a}function s(t,e){t=t.toLowerCase(),e=e.toLowerCase();for(var n=t.length,r=0,o=0;r<n;r+=1)if(0===(o=e.indexOf(t[r],o)+1))return!1;return!0}},94571(t,e,n){let r;n.d(e,{Se:()=>L,FB:()=>d,p_:()=>O,CF:()=>p,aC:()=>T,zV:()=>q});let o=new WeakSet,i=new WeakMap;function a(t=document){if(i.has(t))return i.get(t);let e=!1,n=new MutationObserver(t=>{for(let e of t)if("attributes"===e.type&&e.target instanceof Element)c(e.target);else if("childList"===e.type&&e.addedNodes.length)for(let t of e.addedNodes)t instanceof Element&&l(t)});n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});let r={get closed(){return e},unsubscribe(){e=!0,i.delete(t),n.disconnect()}};return i.set(t,r),r}function l(t){for(let e of t.querySelectorAll("[data-action]"))c(e);t instanceof Element&&t.hasAttribute("data-action")&&c(t)}function s(t){let e=t.currentTarget;for(let n of u(e))if(t.type===n.type){let r=e.closest(n.tag);o.has(r)&&"function"==typeof r[n.method]&&r[n.method](t);let i=e.getRootNode();if(i instanceof ShadowRoot&&o.has(i.host)&&i.host.matches(n.tag)){let e=i.host;"function"==typeof e[n.method]&&e[n.method](t)}}}function*u(t){for(let e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){let t=e.lastIndexOf(":"),n=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||"handleEvent"}}}function c(t){for(let e of u(t))t.addEventListener(e.type,s)}function d(t,e){let n=t.tagName.toLowerCase();if(t.shadowRoot){for(let r of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!r.closest(n))return r}for(let r of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(r.closest(n)===t)return r}let f=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),h=(t,e="property")=>{let n=f(t);if(!n.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return n},b="attr";function p(t,e){M(t,b).add(e)}let m=new WeakSet;function g(t,e){if(m.has(t))return;m.add(t);let n=Object.getPrototypeOf(t),r=n?.constructor?.attrPrefix??"data-";for(let o of(e||(e=M(n,b)),e)){let e=t[o],n=h(`${r}${o}`),i={configurable:!0,get(){return this.getAttribute(n)||""},set(t){this.setAttribute(n,t||"")}};"number"==typeof e?i={configurable:!0,get(){return Number(this.getAttribute(n)||0)},set(t){this.setAttribute(n,t)}}:"boolean"==typeof e&&(i={configurable:!0,get(){return this.hasAttribute(n)},set(t){this.toggleAttribute(n,t)}}),Object.defineProperty(t,o,i),o in t&&!t.hasAttribute(n)&&i.set.call(t,e)}}let w=new Map,v=new Promise(t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",()=>t(),{once:!0})}),y=new Promise(t=>{let e=new AbortController;e.signal.addEventListener("abort",()=>t());let n={once:!0,passive:!0,signal:e.signal},r=()=>e.abort();document.addEventListener("mousedown",r,n),document.addEventListener("touchstart",r,n),document.addEventListener("keydown",r,n),document.addEventListener("pointerdown",r,n)}),E={ready:()=>v,firstInteraction:()=>y,visible:t=>new Promise(e=>{let n=new IntersectionObserver(t=>{for(let r of t)if(r.isIntersecting){e(),n.disconnect();return}},{rootMargin:"0px 0px 256px 0px",threshold:.01});for(let e of document.querySelectorAll(t))n.observe(e)})},A=new WeakMap;function C(t){cancelAnimationFrame(A.get(t)||0),A.set(t,requestAnimationFrame(()=>{for(let e of w.keys()){let n=t instanceof Element&&t.matches(e)?t:t.querySelector(e);if(customElements.get(e)||n){let r=n?.getAttribute("data-load-on")||"ready",o=r in E?E[r]:E.ready;for(let t of w.get(e)||[])o(e).then(t);w.delete(e),A.delete(t)}}}))}function L(t,e){for(let[n,r]of("string"==typeof t&&e&&(t={[t]:e}),Object.entries(t)))w.has(n)||w.set(n,new Set),w.get(n).add(r);k(document)}function k(t){r||(r=new MutationObserver(t=>{if(w.size)for(let e of t)for(let t of e.addedNodes)t instanceof Element&&C(t)})),C(t),r.observe(t,{subtree:!0,childList:!0})}let S=Symbol.for("catalyst");class x{constructor(t,e){const n=this,r=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){n.connectedCallback(this,r)};const o=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){n.disconnectedCallback(this,o)};const i=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,e,r){n.attributeChangedCallback(this,t,e,r,i)};let a=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return n.observedAttributes(this,a)},set(t){a=t}}),function(t){let e=t.observedAttributes||[],n=t.attrPrefix??"data-",r=t=>h(`${n}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...M(t.prototype,b)].map(r).concat(e),set(t){e=t}})}(t),function(t,e){let n=e||f(t.name).replace(/-element$/,"");try{window.customElements.define(n,t),window[t.name]=customElements.get(n)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t,e)}observedAttributes(t,e){return e}connectedCallback(t,e){var n,r;for(let e of(t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),t.querySelectorAll("template[data-shadowroot]")))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0));(g(t),o.add(t),t.shadowRoot&&(l(r=t.shadowRoot),a(r)),l(t),a(t.ownerDocument),e?.call(t),t.shadowRoot)&&(l(n=t.shadowRoot),a(n),k(t.shadowRoot))}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,r,o){g(t),"data-catalyst"!==e&&o&&o.call(t,e,n,r)}}function M(t,e){if(!Object.prototype.hasOwnProperty.call(t,S)){let e=t[S],n=t[S]=new Map;if(e)for(let[t,r]of e)n.set(t,new Set(r))}let n=t[S];return n.has(e)||n.set(e,new Set),n.get(e)}function T(t,e){M(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return d(this,e)}})}function q(t,e){M(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){let t=this.tagName.toLowerCase(),n=[];if(this.shadowRoot)for(let r of this.shadowRoot.querySelectorAll(`[data-targets~="${t}.${e}"]`))r.closest(t)||n.push(r);for(let r of this.querySelectorAll(`[data-targets~="${t}.${e}"]`))r.closest(t)===this&&n.push(r);return n}})}function O(t){if("string"==typeof t)return e=>{new x(e,t)};new x(t)}}}]);
//# sourceMappingURL=3064-ff9d0f819c141e10-0d5b828796cc4a8c.js.map
|