"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_github_combobox-nav_dist_index_js-node_modules_github_jtml_lib_index_js"],{35908:(e,t,i)=>{i.d(t,{A:()=>Combobox});let Combobox=class Combobox{constructor(e,t,{tabInsertsSuggestions:i,firstOptionSelectionMode:n,scrollIntoViewOptions:r}={}){this.input=e,this.list=t,this.tabInsertsSuggestions=null==i||i,this.firstOptionSelectionMode=null!=n?n:"none",this.scrollIntoViewOptions=null!=r?r:{block:"nearest",inline:"nearest"},this.isComposing=!1,t.id||(t.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=e=>(function(e,t){if(!e.shiftKey&&!e.metaKey&&!e.altKey&&(t.ctrlBindings||!e.ctrlKey)&&!t.isComposing)switch(e.key){case"Enter":s(t.input,t.list)&&e.preventDefault();break;case"Tab":t.tabInsertsSuggestions&&s(t.input,t.list)&&e.preventDefault();break;case"Escape":t.clearSelection();break;case"ArrowDown":t.navigate(1),e.preventDefault();break;case"ArrowUp":t.navigate(-1),e.preventDefault();break;case"n":t.ctrlBindings&&e.ctrlKey&&(t.navigate(1),e.preventDefault());break;case"p":t.ctrlBindings&&e.ctrlKey&&(t.navigate(-1),e.preventDefault());break;default:if(e.ctrlKey)break;t.resetSelection()}})(e,this),this.compositionEventHandler=e=>(function(e,t){t.isComposing="compositionstart"===e.type,document.getElementById(t.input.getAttribute("aria-controls")||"")&&t.clearSelection()})(e,this),this.inputHandler=this.clearSelection.bind(this),e.setAttribute("role","combobox"),e.setAttribute("aria-controls",t.id),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",n),this.resetSelection()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",n)}indicateDefaultOption(){var e;"active"===this.firstOptionSelectionMode?null===(e=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(r)[0])||void 0===e||e.setAttribute("data-combobox-option-default","true"):"selected"===this.firstOptionSelectionMode&&this.navigate(1)}navigate(e=1){let t=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(r)[0],i=Array.from(this.list.querySelectorAll('[role="option"]')).filter(r),n=i.indexOf(t);if(n===i.length-1&&1===e||0===n&&-1===e){this.clearSelection(),this.input.focus();return}let s=1===e?0:i.length-1;if(t&&n>=0){let t=n+e;t>=0&&t0||e.offsetHeight>0)}},31143:(e,t,i)=>{i.d(t,{qy:()=>S,XX:()=>g,_3:()=>x});let n=new Map;function s(e){if(n.has(e))return n.get(e);let t=e.length,i=0,s=0,r=0,a=[];for(let n=0;ni&&(a.push(Object.freeze({type:"string",start:i,end:s,value:e.slice(i,s)})),i=s),a.push(Object.freeze({type:"part",start:s,end:n+2,value:e.slice(i+2,n).trim()})),n+=1,i=n+1)}return i"string"==typeof e?e:e.value).join("");this.element.setAttributeNS(this.attr.namespaceURI,this.attr.name,e)}}};let o=new WeakMap;let NodeTemplatePart=class NodeTemplatePart{constructor(e,t){this.expression=t,o.set(this,[e]),e.textContent=""}get value(){return o.get(this).map(e=>e.textContent).join("")}set value(e){this.replace(e)}get previousSibling(){return o.get(this)[0].previousSibling}get nextSibling(){return o.get(this)[o.get(this).length-1].nextSibling}replace(...e){let t=e.map(e=>"string"==typeof e?new Text(e):e);for(let e of(t.length||t.push(new Text("")),o.get(this)[0].before(...t),o.get(this)))e.remove();o.set(this,t)}};function l(e){return{processCallback(t,i,n){var s;if("object"==typeof n&&n){for(let t of i)if(t.expression in n){let i=null!==(s=n[t.expression])&&void 0!==s?s:"";e(t,i)}}}}}function u(e,t){e.value=String(t)}function c(e,t){return"boolean"==typeof t&&e instanceof AttributeTemplatePart&&"boolean"==typeof e.element[e.attributeName]&&(e.booleanValue=t,!0)}let p=l(u);l((e,t)=>{c(e,t)||u(e,t)});let h=new WeakMap,d=new WeakMap;let TemplateInstance=class TemplateInstance extends DocumentFragment{constructor(e,t,i=p){var n,r;super(),Object.getPrototypeOf(this)!==TemplateInstance.prototype&&Object.setPrototypeOf(this,TemplateInstance.prototype),this.appendChild(e.content.cloneNode(!0)),d.set(this,Array.from(function*(e){let t;let i=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null,!1);for(;t=i.nextNode();)if(t instanceof Element&&t.hasAttributes())for(let e=0;ee+t+(i{let i=e(...t);return v.add(i),i}}let T=new WeakMap;let EventHandler=class EventHandler{constructor(e,t){this.element=e,this.type=t,this.element.addEventListener(this.type,this),T.get(this.element).set(this.type,this)}set(e){"function"==typeof e?this.handleEvent=e.bind(this.element):"object"==typeof e&&"function"==typeof e.handleEvent?this.handleEvent=e.handleEvent.bind(e):(this.element.removeEventListener(this.type,this),T.get(this.element).delete(this.type))}static for(e){T.has(e.element)||T.set(e.element,new Map);let t=e.attributeName.slice(2),i=T.get(e.element);return i.has(t)?i.get(t):new EventHandler(e.element,t)}};function A(e,t){v.has(t)&&(t(e),1)||c(e,t)||e instanceof AttributeTemplatePart&&e.attributeName.startsWith("on")&&(EventHandler.for(e).set(t),e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),1)||t instanceof TemplateResult&&e instanceof NodeTemplatePart&&(t.renderInto(e),1)||t instanceof DocumentFragment&&e instanceof NodeTemplatePart&&(t.childNodes.length&&e.replace(...t.childNodes),1)||function(e,t){if(!("object"==typeof t&&Symbol.iterator in t))return!1;if(!(e instanceof NodeTemplatePart))return e.value=Array.from(t).join(" "),!0;{let i=[];for(let e of t)if(e instanceof TemplateResult){let t=document.createDocumentFragment();e.renderInto(t),i.push(...t.childNodes)}else e instanceof DocumentFragment?i.push(...e.childNodes):i.push(String(e));return i.length&&e.replace(...i),!0}}(e,t)||u(e,t)}let E=l(A);function S(e,...t){return new TemplateResult(e,t,E)}let k=new WeakMap;y((...e)=>t=>{k.has(t)||k.set(t,{i:e.length});let i=k.get(t);for(let n=0;n{nt=>{var i,n;if(!(t instanceof NodeTemplatePart))return;let s=document.createElement("template"),r=null!==(n=null===(i=TemplateResult.cspTrustedTypesPolicy)||void 0===i?void 0:i.createHTML(e))&&void 0!==n?n:e;s.innerHTML=r;let a=document.importNode(s.content,!0);t.replace(...a.childNodes)})}}]); //# sourceMappingURL=vendors-node_modules_github_combobox-nav_dist_index_js-node_modules_github_jtml_lib_index_js-cccd1cbad6c8.js.map