1import { a as autobind } from './bundled-index2.js'; 2import { g as gsapWithCSS } from './bundled-index3.js'; 3import { D as Directive } from './bundled-Directive.js'; 4import './bundled-app.js'; 5 6function e(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r}function t(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}class SimpleTablist extends Directive{onAppInit(){this.bindEvents();}bindEvents(){this.tabs.forEach(e=>{e.addEventListener("click",this.onTabClick);});}async switchTab(e,t){t.focus(),t.removeAttribute("tabindex"),t.setAttribute("aria-selected","true"),e.removeAttribute("aria-selected"),e.setAttribute("tabindex","-1");let i=document.getElementById(t.getAttribute("aria-controls")),n=Array.from(this.tabPanels).filter(e=>!e.classList.contains("hidden"));for(let e in n)await this.hideActivePanel(n[e]);this.showPanel(i),i.dispatchEvent(new CustomEvent("simple-tablist:change",{bubbles:!0}));}showPanel(e){e.hidden=!1,e.classList.add("panel-opened"),e.classList.remove("hidden"),gsapWithCSS.killTweensOf(e),gsapWithCSS.set(e,{autoAlpha:0}),gsapWithCSS.to(e,{autoAlpha:1,duration:.25});}hideActivePanel(e){return gsapWithCSS.killTweensOf(e),new Promise(t=>{gsapWithCSS.set(e,{autoAlpha:100}),gsapWithCSS.to(e,{autoAlpha:0,duration:.25,onComplete:()=>{e.hidden=!0,e.classList.add("hidden"),t();}});})}onTabClick(e){if(e.preventDefault(),e.currentTarget.hasAttribute("aria-selected"))return;let t=this.host.querySelector("[aria-selected]");this.switchTab(t,e.currentTarget);}constructor(...e){super(...e),this.tabs=this.host.querySelectorAll('[role="tab"]'),this.tabPanels=this.host.querySelectorAll('[role="tabpanel"]');}}SimpleTablist.selector="[simple-tablist]",e([autobind,t("design:type",Function),t("design:paramtypes",["undefined"==typeof HTMLElement?Object:HTMLElement,"undefined"==typeof HTMLElement?Object:HTMLElement]),t("design:returntype",Promise)],SimpleTablist.prototype,"switchTab",null),e([autobind,t("design:type",Function),t("design:paramtypes",["undefined"==typeof Event?Object:Event]),t("design:returntype",void 0)],SimpleTablist.prototype,"onTabClick",null); 7 8export { SimpleTablist };
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.