@tabworthy/components 0.8.6 → 0.9.0
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.
- package/dist/cjs/{index-w-Wtojyv.js → index-B1s0tI-Z.js} +21 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tabworthy-components.cjs.js +2 -2
- package/dist/cjs/tabworthy-dates-calendar_2.cjs.entry.js +1960 -8
- package/dist/cjs/tabworthy-dates.cjs.entry.js +9 -8
- package/dist/cjs/tabworthy-times-picker.cjs.entry.js +1 -1
- package/dist/cjs/tabworthy-times.cjs.entry.js +6 -5
- package/dist/collection/components/tabworthy-dates/tabworthy-dates.js +32 -7
- package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.css +4 -1
- package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.js +257 -5
- package/dist/collection/components/tabworthy-times/tabworthy-times.js +29 -4
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DT8TK_a8.js → p-B8sG1vGD.js} +1 -1
- package/dist/components/{p-Bnmroodq.js → p-B9YA6avR.js} +1 -1
- package/dist/components/p-B9fGfjA-.js +1 -0
- package/dist/components/p-BiJ0HZVY.js +1 -0
- package/dist/components/tabworthy-dates-calendar.js +1 -1
- package/dist/components/tabworthy-dates-modal.js +1 -1
- package/dist/components/tabworthy-dates.js +1 -1
- package/dist/components/tabworthy-times-picker.js +1 -1
- package/dist/components/tabworthy-times.js +1 -1
- package/dist/esm/{index-CDFauf_3.js → index-CwtZ_Lud.js} +21 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/tabworthy-components.js +3 -3
- package/dist/esm/tabworthy-dates-calendar_2.entry.js +1960 -8
- package/dist/esm/tabworthy-dates.entry.js +9 -8
- package/dist/esm/tabworthy-times-picker.entry.js +1 -1
- package/dist/esm/tabworthy-times.entry.js +6 -5
- package/dist/tabworthy-components/{p-8416e0a9.entry.js → p-4eec41e5.entry.js} +1 -1
- package/dist/tabworthy-components/{p-dcb3ea8d.entry.js → p-90de04dd.entry.js} +1 -1
- package/dist/tabworthy-components/p-CwtZ_Lud.js +2 -0
- package/dist/tabworthy-components/{p-224503da.entry.js → p-c0f957f5.entry.js} +1 -1
- package/dist/tabworthy-components/p-ee41beed.entry.js +1 -0
- package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
- package/dist/themes/light.css +1 -1
- package/dist/types/components/tabworthy-dates/tabworthy-dates.d.ts +6 -1
- package/dist/types/components/tabworthy-modal/tabworthy-dates-modal.d.ts +27 -0
- package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +6 -1
- package/dist/types/components.d.ts +54 -0
- package/package.json +2 -1
- package/dist/components/p-CGobNAdR.js +0 -1
- package/dist/components/p-Kr35QPhi.js +0 -1
- package/dist/tabworthy-components/p-CDFauf_3.js +0 -2
- package/dist/tabworthy-components/p-e66c010b.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as n,g as s}from"./p-CwtZ_Lud.js";import{g as a,r,a as o,b as h,c,d,e as u,f as l,h as f,s as v,i as b,j as p,k as y,l as m,m as w,n as g,o as k,p as x,q as O,t as M,u as j,v as D,w as A}from"./p-BVHu5CWV.js";const C={clearButton:"Clear value",monthSelect:"Select month",nextMonthButton:"Next month",nextYearButton:"Next year",picker:"Choose date",previousMonthButton:"Previous month",previousYearButton:"Previous year",todayButton:"Show today",yearSelect:"Select year",keyboardHint:"Keyboard commands",selected:"Selected date",chooseAsStartDate:"choose as start date",chooseAsEndDate:"choose as end date"},S=class{constructor(i){t(this,i),this.selectDate=e(this,"selectDate",3),this.changeMonth=e(this,"changeMonth",3),this.changeYear=e(this,"changeYear",3),this.disabled=!1,this.modalIsOpen=!1,this.disableDate=()=>!1,this.elementClassName="tabworthy-dates-calendar",this.firstDayOfWeek=0,this.range=!1,this.labels=C,this.locale=(null===navigator||void 0===navigator?void 0:navigator.language)||"en-US",this.inline=!1,this.showClearButton=!1,this.showMonthStepper=!0,this.showTodayButton=!0,this.showYearStepper=!1,this.showKeyboardHint=!1,this.showHiddenTitle=!0,this.startDate=a(new Date),this.init=()=>{this.currentDate=this.startDate?r(new Date(this.startDate)):new Date,this.updateWeekdays()},this.nextMonth=()=>{this.updateCurrentDate(o(this.currentDate))},this.nextYear=()=>{this.updateCurrentDate(h(this.currentDate),!1,!0)},this.previousMonth=()=>{this.updateCurrentDate(c(this.currentDate))},this.previousYear=()=>{this.updateCurrentDate(d(this.currentDate),!1,!0)},this.showToday=()=>{this.updateCurrentDate(new Date,!0)},this.clear=()=>{var t;this.value=void 0,null===(t=this.selectDate)||void 0===t||t.emit(void 0)},this.onClick=t=>{if(this.disabled)return;const e=t.target.closest("[data-date]");if(!Boolean(e))return;const i=r(new Date(e.dataset.date));this.updateCurrentDate(i),this.onSelectDate(i)},this.onMonthSelect=t=>{const e=+t.target.value-1,i=new Date(this.currentDate);u(i,this.minDate,this.maxDate)&&(i.setMonth(e),this.updateCurrentDate(i))},this.onYearSelect=t=>{var e;const i=+t.target.value,n=new Date(this.currentDate);u(n,this.minDate,this.maxDate)&&(n.setFullYear(i),null===(e=this.changeYear)||void 0===e||e.emit({year:i}),this.updateCurrentDate(n))},this.onKeyDown=t=>{this.disabled||("ArrowLeft"===t.code?(t.preventDefault(),this.updateCurrentDate(l(this.currentDate),!0)):"ArrowRight"===t.code?(t.preventDefault(),this.updateCurrentDate(f(this.currentDate),!0)):"ArrowUp"===t.code?(t.preventDefault(),this.updateCurrentDate(v(this.currentDate,7),!0)):"ArrowDown"===t.code?(t.preventDefault(),this.updateCurrentDate(b(this.currentDate,7),!0)):"PageUp"===t.code?(t.preventDefault(),this.updateCurrentDate(t.shiftKey?d(this.currentDate):c(this.currentDate),!0)):"PageDown"===t.code?(t.preventDefault(),this.updateCurrentDate(t.shiftKey?h(this.currentDate):o(this.currentDate),!0)):"Home"===t.code?(t.preventDefault(),this.updateCurrentDate(p(this.currentDate),!0)):"End"===t.code?(t.preventDefault(),this.updateCurrentDate(y(this.currentDate),!0)):"Space"!==t.code&&"Enter"!==t.code||(t.preventDefault(),this.onSelectDate(this.currentDate)))},this.onMouseEnter=t=>{var e;if(this.disabled)return;const i=r(new Date(null===(e=t.target.closest("td"))||void 0===e?void 0:e.dataset.date));this.hoveredDate=i},this.onMouseLeave=()=>{this.hoveredDate=void 0}}componentWillLoad(){this.init()}watchModalIsOpen(){!0===this.modalIsOpen&&(this.moveFocusOnModalOpen=!0)}watchFirstDayOfWeek(){this.updateWeekdays()}watchLocale(){Boolean(this.locale)||(this.locale=(null===navigator||void 0===navigator?void 0:navigator.language)||"en-US"),this.updateWeekdays()}watchRange(){var t;this.value=void 0,null===(t=this.selectDate)||void 0===t||t.emit(void 0)}watchStartDate(){this.currentDate=this.startDate?r(new Date(this.startDate)):new Date}watchValue(){Boolean(this.value)&&(Array.isArray(this.value)&&this.value.length>=1?this.currentDate=this.value[0]:this.value instanceof Date&&(this.currentDate=this.value))}componentDidRender(){this.moveFocusAfterMonthChanged&&(this.focusDate(this.currentDate),this.moveFocusAfterMonthChanged=!1),this.moveFocusOnModalOpen&&setTimeout((()=>{this.focusDate(this.currentDate),this.moveFocusOnModalOpen=!1}),100)}updateWeekdays(){this.weekdays=m(this.firstDayOfWeek,this.locale)}getClassName(t){return Boolean(t)?`${this.elementClassName}__${t}`:this.elementClassName}getCalendarRows(){const t=w(this.currentDate,!0,0===this.firstDayOfWeek?7:this.firstDayOfWeek),e=[];for(let i=0;i<t.length;i+=7){const n=t.slice(i,i+7);e.push(n)}return e}getTitle(){if(Boolean(this.currentDate))return Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(this.currentDate)}focusDate(t){var e;t&&(null===(e=this.el.querySelector(`[data-date="${a(t)}"]`))||void 0===e||e.focus())}updateCurrentDate(t,e,i=!1){var n,s,a;const r=t.getMonth(),o=t.getFullYear();g(t,this.minDate)||(t=new Date(this.minDate)),k(t,this.maxDate)||(t=new Date(this.maxDate)),(r!==(null===(n=this.currentDate)||void 0===n?void 0:n.getMonth())||o!==this.currentDate.getFullYear())&&(null===(s=this.changeMonth)||void 0===s||s.emit({month:O(t),year:x(t)}),e&&(this.moveFocusAfterMonthChanged=!0)),this.currentDate=t,e&&this.focusDate(this.currentDate),i&&(null===(a=this.changeYear)||void 0===a||a.emit({year:x(t)}))}onSelectDate(t){var e,i,n,s;if(!this.disableDate(t)&&u(t,this.minDate,this.maxDate))if(this.isRangeValue(this.value)){const n=void 0===(null===(e=this.value)||void 0===e?void 0:e[0])||2===this.value.length?[t]:[this.value[0],t];2===n.length&&n[0]>n[1]&&n.reverse();const s=void 0===n[1]?[a(n[0])]:[a(n[0]),a(n[1])];this.value=n,null===(i=this.selectDate)||void 0===i||i.emit(s)}else{if((null===(n=this.value)||void 0===n?void 0:n.getTime())===t.getTime())return;this.value=t,null===(s=this.selectDate)||void 0===s||s.emit(a(t))}}isRangeValue(t){return!!this.range}render(){var t;const e=this.showTodayButton||this.showClearButton||this.showKeyboardHint,s={year:{prev:this.disabled||!!this.minDate&&new Date(this.minDate).getFullYear()>d(this.currentDate).getFullYear(),next:this.disabled||!!this.maxDate&&new Date(this.maxDate).getFullYear()<h(this.currentDate).getFullYear()},month:{prev:this.disabled||M(c(this.currentDate).getMonth(),c(this.currentDate).getFullYear(),this.minDate,this.maxDate),next:this.disabled||M(o(this.currentDate).getMonth(),o(this.currentDate).getFullYear(),this.minDate,this.maxDate)}};return i(n,{key:"cc8676fdeec05b5635c367353e7bb1b8c997dedd"},i("div",{key:"4a4efc949f954772a55dad16e507a938b0308130",class:{[`${this.getClassName()}-wrapper`]:!0,[`${this.getClassName()}-wrapper--inline`]:this.inline}},i("div",{key:"de0afeccacba5e76162a4d22041f3b65983e77fe",class:{[this.getClassName()]:!0,[`${this.getClassName()}--disabled`]:this.disabled}},i("div",{key:"e8ed89a15cd32f629e559c9e9922c97816aff70c",class:this.getClassName("header")},this.showHiddenTitle&&i("span",{key:"8a922cf4df9ee3f87a673cfaf2d04fe539305bbe","aria-atomic":"true","aria-live":"polite",class:"visually-hidden"},this.getTitle()),this.showYearStepper&&i("button",{key:"225e73d3b12646781661d28057f4d9611e624c69","aria-label":this.labels.previousYearButton,class:this.getClassName("previous-year-button"),"aria-disabled":s.year.prev,innerHTML:this.previousYearButtonContent||void 0,onClick:this.previousYear,type:"button"},i("svg",{key:"e0fd3f0d41f596b450642eb9c27c5958feb7ba30",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},i("polyline",{key:"85735b11b068015e671f550639ded6193dfbab28",points:"11 17 6 12 11 7"}),i("polyline",{key:"19c3ffcbb7b98261be4b309a2bbbaa826ea1ad73",points:"18 17 13 12 18 7"}))),this.showMonthStepper&&i("button",{key:"4b687ad0f92198cb9a324b8c0d380ae0a31f2346","aria-label":this.labels.previousMonthButton,class:this.getClassName("previous-month-button"),"aria-disabled":s.month.prev,innerHTML:this.previousMonthButtonContent||void 0,onClick:this.previousMonth,type:"button"},i("svg",{key:"a1931a36fddf8a84cc8f4d367b34b8b59d03cc09",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},i("polyline",{key:"e053a2405fb992e9eaeddf114b8da460b41ade13",points:"15 18 9 12 15 6"}))),i("span",{key:"fbf8feee129211cf10f611c879288d76f7456c9d",class:this.getClassName("current-month")},i("select",{key:"ca2826280a1ab8065551fa908d40f96cc04d5464","aria-label":this.labels.monthSelect,class:this.getClassName("month-select"),"aria-disabled":this.disabled,name:"month",onChange:this.onMonthSelect},j(this.locale).map(((t,e)=>i("option",{key:t,selected:this.currentDate.getMonth()===e,value:e+1,disabled:M(e,this.currentDate.getFullYear(),this.minDate,this.maxDate)},t)))),i("input",{key:"b3f5b2dabeb38734d3602ac8aaff56a7d5a49393","aria-label":this.labels.yearSelect,class:this.getClassName("year-select"),"aria-disabled":this.disabled,max:this.maxDate?this.maxDate.slice(0,4):9999,min:this.minDate?this.minDate.slice(0,4):1,name:"year",onChange:this.onYearSelect,type:"number",value:this.currentDate.getFullYear()})),this.showMonthStepper&&i("button",{key:"9312dc20b70fbda5bd86f25b230665a8f7f75386","aria-label":this.labels.nextMonthButton,class:this.getClassName("next-month-button"),"aria-disabled":s.month.next,innerHTML:this.nextMonthButtonContent||void 0,onClick:this.nextMonth,type:"button"},i("svg",{key:"82f1f31e919a2e316941824c0b0d59c5a1852f73",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},i("polyline",{key:"3365487b15f4149b5ae035ca1f1364396c133ef0",points:"9 18 15 12 9 6"}))),this.showYearStepper&&i("button",{key:"e83b33e034ee0fbd49e8aab90e1716ada40d2f19","aria-label":this.labels.nextYearButton,class:this.getClassName("next-year-button"),"aria-disabled":s.year.next,innerHTML:this.nextYearButtonContent||void 0,onClick:this.nextYear,type:"button"},i("svg",{key:"32b65eb085653d5c62e60262fc87f59b6d105e57",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},i("polyline",{key:"eaa98641ba48a322fd7b3ac953d13104bb63aad3",points:"13 17 18 12 13 7"}),i("polyline",{key:"89b7de7ec2e24a01a808e885ac68a11c3779f9c2",points:"6 17 11 12 6 7"})))),i("div",{key:"a21c8a94b1ae0e5b66074d2ca956afac456f366f",class:this.getClassName("body")},i("table",{key:"2968d8355122e3eb18de35b4c72d2404794f62e6",class:this.getClassName("calendar"),onKeyDown:this.onKeyDown,role:"grid","aria-label":this.getTitle()},i("thead",{key:"568a00357a3e64e692c80d90739c560513239c1d",class:this.getClassName("calendar-header")},i("tr",{key:"4e80bf075ad630237b5ea156267a0c0d9d4f0423",class:this.getClassName("weekday-row")},null===(t=this.weekdays)||void 0===t?void 0:t.map((t=>i("th",{role:"columnheader",abbr:t[1],class:this.getClassName("weekday"),key:t[0],scope:"col"},i("span",{"aria-hidden":"true"},t[0]),i("span",{class:"visually-hidden"},t[1])))))),i("tbody",{key:"26dfbb76ab92d065ab5f38b7135fced7738ca4a7"},this.getCalendarRows().map((t=>{const e=`row-${t[0].getMonth()}-${t[0].getDate()}`;return i("tr",{class:this.getClassName("calendar-row"),key:e},t.map((t=>{var e,n,s;const r=D(t,this.currentDate),o=t.getMonth()!==(null===(e=this.currentDate)||void 0===e?void 0:e.getMonth()),h=Array.isArray(this.value)?D(t,this.value[0])||this.value[1]&&u(t,a(this.value[0]),a(this.value[1])):D(t,this.value),c=this.disableDate(t)||!u(t,this.minDate,this.maxDate),d=!!this.isRangeValue(this.value)&&A(t,{from:null===(n=this.value)||void 0===n?void 0:n[0],to:(null===(s=this.value)||void 0===s?void 0:s[1])||this.hoveredDate||this.currentDate})&&!c,l=D(t,new Date),f=`cell-${t.getMonth()}-${t.getDate()}`,v={[this.getClassName("date")]:!0,[this.getClassName("date--current")]:r,[this.getClassName("date--disabled")]:c,[this.getClassName("date--overflowing")]:o,[this.getClassName("date--today")]:l,[this.getClassName("date--selected")]:h,[this.getClassName("date--in-range")]:d},b=h?"strong":l?"em":"span";return i("td",{"aria-disabled":String(c),"aria-selected":h?"true":void 0,class:v,"data-date":a(t),key:f,onClick:this.onClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,role:"gridcell",tabIndex:D(t,this.currentDate)&&!this.disabled?0:-1},i(b,{"aria-hidden":"true"},t.getDate()),i("span",{class:"visually-hidden"},(()=>{if(this.range){let e=this.value?"":`, ${this.labels.chooseAsStartDate}.`;return Array.isArray(this.value)&&(e={1:`, ${this.labels.chooseAsEndDate}.`,2:`, ${this.labels.chooseAsStartDate}.`}[this.value.length]),`${h?`${this.labels.selected}, `:""}${Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(t)}${e}`}return`${h?`${this.labels.selected}, `:""}${Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(t)}`})()))})))}))))),e&&i("div",{key:"102ea99b292e7a028692615c68be2e8c5720913c",class:this.getClassName("footer")},i("div",{key:"6e1d52da734e986a9044847edd7ace16460605f2",class:this.getClassName("footer-buttons")},this.showTodayButton&&i("button",{key:"9508eadf9835bea2e1640e6ac622665bd19da4d8",class:this.getClassName("today-button"),disabled:this.disabled,innerHTML:this.todayButtonContent||void 0,onClick:this.showToday,type:"button"},this.labels.todayButton),this.showClearButton&&i("button",{key:"262b926076309bc44d5b36dd64217196b4d6e8e2",class:this.getClassName("clear-button"),disabled:this.disabled,innerHTML:this.clearButtonContent||void 0,onClick:this.clear,type:"button"},this.labels.clearButton)),this.showKeyboardHint&&!window.matchMedia("(pointer: coarse)").matches&&i("button",{key:"09c974e2b246f57381e0461dbb27eb83e523812d",type:"button",onClick:()=>alert("Todo: Add Keyboard helper!"),class:this.getClassName("keyboard-hint")},i("svg",{key:"4dd5a8ce6e5c96e79adf6d8b0308b56fae5be361",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",viewBox:"0 0 48 48",fill:"currentColor"},i("path",{key:"f3378678d6a0dc9fe7ea9ffd42dc083c3dca5ec8",d:"M7 38q-1.2 0-2.1-.925Q4 36.15 4 35V13q0-1.2.9-2.1.9-.9 2.1-.9h34q1.2 0 2.1.9.9.9.9 2.1v22q0 1.15-.9 2.075Q42.2 38 41 38Zm0-3h34V13H7v22Zm8-3.25h18v-3H15Zm-4.85-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm-24.7-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3ZM7 35V13v22Z"})),this.labels.keyboardHint))),i("slot",{key:"ec9b51b9aaf6c48e643120115dbc7f418e9fb8e4",name:"after-calendar"})))}get el(){return s(this)}static get watchers(){return{modalIsOpen:[{watchModalIsOpen:0}],firstDayOfWeek:[{watchFirstDayOfWeek:0}],locale:[{watchLocale:0}],range:[{watchRange:0}],startDate:[{watchStartDate:0}],value:[{watchValue:0}]}}};function E(t,e,i,n=20,s=0){let a=[];if(s>=n)return a;const r=t=>{const a=t.assignedNodes().filter((t=>1===t.nodeType));return a.length>0?E(a[0].parentElement,e,i,n,s+1):[]},o=Array.from(t.children||[]);for(const t of o)e(t)||(i(t)&&a.push(t),null!=t.shadowRoot?a.push(...E(t.shadowRoot,e,i,n,s+1)):"SLOT"===t.tagName?a.push(...r(t)):a.push(...E(t,e,i,n,s+1)));return a}function L(t){return t.hasAttribute("hidden")||t.hasAttribute("aria-hidden")&&"false"!==t.getAttribute("aria-hidden")||"none"===t.style.display||"0"===t.style.opacity||"hidden"===t.style.visibility||"collapse"===t.style.visibility}function B(t){return"-1"!==t.getAttribute("tabindex")&&!L(t)&&!function(t){return t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")}(t)&&(t.hasAttribute("tabindex")||(t instanceof HTMLAnchorElement||t instanceof HTMLAreaElement)&&t.hasAttribute("href")||t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLIFrameElement)}S.style=".visually-hidden.sc-tabworthy-dates-calendar{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%)}";const T=new Map,H=document.createElement("template");H.innerHTML='\n\t<div id="start"></div>\n\t<div id="backup"></div>\n\t<slot></slot>\n\t<div id="end"></div>\n';class $ extends HTMLElement{constructor(){super(),this.debounceId=Math.random().toString(),this._focused=!1;const t=this.attachShadow({mode:"open"});t.appendChild(H.content.cloneNode(!0)),this.$backup=t.querySelector("#backup"),this.$start=t.querySelector("#start"),this.$end=t.querySelector("#end"),this.focusLastElement=this.focusLastElement.bind(this),this.focusFirstElement=this.focusFirstElement.bind(this),this.onFocusIn=this.onFocusIn.bind(this),this.onFocusOut=this.onFocusOut.bind(this)}static get observedAttributes(){return["inactive"]}get inactive(){return this.hasAttribute("inactive")}set inactive(t){t?this.setAttribute("inactive",""):this.removeAttribute("inactive")}get focused(){return this._focused}connectedCallback(){this.$start.addEventListener("focus",this.focusLastElement),this.$end.addEventListener("focus",this.focusFirstElement),this.addEventListener("focusin",this.onFocusIn),this.addEventListener("focusout",this.onFocusOut),this.render()}disconnectedCallback(){this.$start.removeEventListener("focus",this.focusLastElement),this.$end.removeEventListener("focus",this.focusFirstElement),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut)}attributeChangedCallback(){this.render()}focusFirstElement(){this.trapFocus()}focusLastElement(){this.trapFocus(!0)}getFocusableElements(){return E(this,L,B)}trapFocus(t){if(this.inactive)return;let e=this.getFocusableElements();e.length>0?(t?e[e.length-1].focus():e[0].focus(),this.$backup.setAttribute("tabindex","-1")):(this.$backup.setAttribute("tabindex","0"),this.$backup.focus())}onFocusIn(){this.updateFocused(!0)}onFocusOut(){this.updateFocused(!1)}updateFocused(t){!function(t,e,i){const n=T.get(i);null!=n&&window.clearTimeout(n),T.set(i,window.setTimeout((()=>{t(),T.delete(i)}),0))}((()=>{this.focused!==t&&(this._focused=t,this.render())}),0,this.debounceId)}render(){this.$start.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.$end.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.focused?this.setAttribute("focused",""):this.removeAttribute("focused")}}window.customElements.define("focus-trap",$);var P=new WeakMap,W=new WeakMap,I={},Z=0,q=function(t){return t&&(t.host||q(t.parentNode))},F=function(t,e,i){void 0===i&&(i="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=function(t){return"undefined"==typeof document?null:(Array.isArray(t)?t[0]:t).ownerDocument.body}(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),function(t,e,i,n){var s=function(t,e){return e.map((function(e){if(t.contains(e))return e;var i=q(e);return i&&t.contains(i)?i:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)})).filter((function(t){return Boolean(t)}))}(e,Array.isArray(t)?t:[t]);I[i]||(I[i]=new WeakMap);var a=I[i],r=[],o=new Set,h=new Set(s),c=function(t){t&&!o.has(t)&&(o.add(t),c(t.parentNode))};s.forEach(c);var d=function(t){t&&!h.has(t)&&Array.prototype.forEach.call(t.children,(function(t){if(o.has(t))d(t);else{var e=t.getAttribute(n),s=null!==e&&"false"!==e,h=(P.get(t)||0)+1,c=(a.get(t)||0)+1;P.set(t,h),a.set(t,c),r.push(t),1===h&&s&&W.set(t,!0),1===c&&t.setAttribute(i,"true"),s||t.setAttribute(n,"true")}}))};return d(e),o.clear(),Z++,function(){r.forEach((function(t){var e=P.get(t)-1,s=a.get(t)-1;P.set(t,e),a.set(t,s),e||(W.has(t)||t.removeAttribute(n),W.delete(t)),s||t.removeAttribute(i)})),--Z||(P=new WeakMap,P=new WeakMap,W=new WeakMap,I={})}}(n,s,i,"aria-hidden")):function(){return null}},R="top",V="bottom",_="right",U="left",z="auto",K=[R,V,_,U],N="start",Y="end",Q="viewport",G="popper",J=K.reduce((function(t,e){return t.concat([e+"-"+N,e+"-"+Y])}),[]),X=[].concat(K,[z]).reduce((function(t,e){return t.concat([e,e+"-"+N,e+"-"+Y])}),[]),tt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function et(t){return t?(t.nodeName||"").toLowerCase():null}function it(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function nt(t){return t instanceof it(t).Element||t instanceof Element}function st(t){return t instanceof it(t).HTMLElement||t instanceof HTMLElement}function at(t){return"undefined"!=typeof ShadowRoot&&(t instanceof it(t).ShadowRoot||t instanceof ShadowRoot)}function rt(t){return t.split("-")[0]}var ot=Math.max,ht=Math.min,ct=Math.round;function dt(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function ut(){return!/^((?!chrome|android).)*safari/i.test(dt())}function lt(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,a=1;e&&st(t)&&(s=t.offsetWidth>0&&ct(n.width)/t.offsetWidth||1,a=t.offsetHeight>0&&ct(n.height)/t.offsetHeight||1);var r=(nt(t)?it(t):window).visualViewport,o=!ut()&&i,h=(n.left+(o&&r?r.offsetLeft:0))/s,c=(n.top+(o&&r?r.offsetTop:0))/a,d=n.width/s,u=n.height/a;return{width:d,height:u,top:c,right:h+d,bottom:c+u,left:h,x:h,y:c}}function ft(t){var e=lt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function vt(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&at(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function bt(t){return it(t).getComputedStyle(t)}function pt(t){return["table","td","th"].indexOf(et(t))>=0}function yt(t){return((nt(t)?t.ownerDocument:t.document)||window.document).documentElement}function mt(t){return"html"===et(t)?t:t.assignedSlot||t.parentNode||(at(t)?t.host:null)||yt(t)}function wt(t){return st(t)&&"fixed"!==bt(t).position?t.offsetParent:null}function gt(t){for(var e=it(t),i=wt(t);i&&pt(i)&&"static"===bt(i).position;)i=wt(i);return i&&("html"===et(i)||"body"===et(i)&&"static"===bt(i).position)?e:i||function(t){var e=/firefox/i.test(dt());if(/Trident/i.test(dt())&&st(t)&&"fixed"===bt(t).position)return null;var i=mt(t);for(at(i)&&(i=i.host);st(i)&&["html","body"].indexOf(et(i))<0;){var n=bt(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function kt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function xt(t,e,i){return ot(t,ht(e,i))}function Ot(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Mt(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function jt(t){return t.split("-")[1]}var Dt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function At(t){var e,i=t.popper,n=t.popperRect,s=t.placement,a=t.variation,r=t.offsets,o=t.position,h=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,u=t.isFixed,l=r.x,f=void 0===l?0:l,v=r.y,b=void 0===v?0:v,p="function"==typeof d?d({x:f,y:b}):{x:f,y:b};f=p.x,b=p.y;var y=r.hasOwnProperty("x"),m=r.hasOwnProperty("y"),w=U,g=R,k=window;if(c){var x=gt(i),O="clientHeight",M="clientWidth";x===it(i)&&"static"!==bt(x=yt(i)).position&&"absolute"===o&&(O="scrollHeight",M="scrollWidth"),(s===R||(s===U||s===_)&&a===Y)&&(g=V,b-=(u&&x===k&&k.visualViewport?k.visualViewport.height:x[O])-n.height,b*=h?1:-1),s!==U&&(s!==R&&s!==V||a!==Y)||(w=_,f-=(u&&x===k&&k.visualViewport?k.visualViewport.width:x[M])-n.width,f*=h?1:-1)}var j,D=Object.assign({position:o},c&&Dt),A=!0===d?function(t,e){var i=t.y,n=e.devicePixelRatio||1;return{x:ct(t.x*n)/n||0,y:ct(i*n)/n||0}}({x:f,y:b},it(i)):{x:f,y:b};return f=A.x,b=A.y,Object.assign({},D,h?((j={})[g]=m?"0":"",j[w]=y?"0":"",j.transform=(k.devicePixelRatio||1)<=1?"translate("+f+"px, "+b+"px)":"translate3d("+f+"px, "+b+"px, 0)",j):((e={})[g]=m?b+"px":"",e[w]=y?f+"px":"",e.transform="",e))}var Ct={passive:!0},St={left:"right",right:"left",bottom:"top",top:"bottom"};function Et(t){return t.replace(/left|right|bottom|top/g,(function(t){return St[t]}))}var Lt={start:"end",end:"start"};function Bt(t){return t.replace(/start|end/g,(function(t){return Lt[t]}))}function Tt(t){var e=it(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ht(t){return lt(yt(t)).left+Tt(t).scrollLeft}function $t(t){var e=bt(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function Pt(t){return["html","body","#document"].indexOf(et(t))>=0?t.ownerDocument.body:st(t)&&$t(t)?t:Pt(mt(t))}function Wt(t,e){var i;void 0===e&&(e=[]);var n=Pt(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),a=it(n),r=s?[a].concat(a.visualViewport||[],$t(n)?n:[]):n,o=e.concat(r);return s?o:o.concat(Wt(mt(r)))}function It(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Zt(t,e,i){return e===Q?It(function(t,e){var i=it(t),n=yt(t),s=i.visualViewport,a=n.clientWidth,r=n.clientHeight,o=0,h=0;if(s){a=s.width,r=s.height;var c=ut();(c||!c&&"fixed"===e)&&(o=s.offsetLeft,h=s.offsetTop)}return{width:a,height:r,x:o+Ht(t),y:h}}(t,i)):nt(e)?function(t,e){var i=lt(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):It(function(t){var e,i=yt(t),n=Tt(t),s=null==(e=t.ownerDocument)?void 0:e.body,a=ot(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=ot(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),o=-n.scrollLeft+Ht(t),h=-n.scrollTop;return"rtl"===bt(s||i).direction&&(o+=ot(i.clientWidth,s?s.clientWidth:0)-a),{width:a,height:r,x:o,y:h}}(yt(t)))}function qt(t){var e,i=t.reference,n=t.element,s=t.placement,a=s?rt(s):null,r=s?jt(s):null,o=i.x+i.width/2-n.width/2,h=i.y+i.height/2-n.height/2;switch(a){case R:e={x:o,y:i.y-n.height};break;case V:e={x:o,y:i.y+i.height};break;case _:e={x:i.x+i.width,y:h};break;case U:e={x:i.x-n.width,y:h};break;default:e={x:i.x,y:i.y}}var c=a?kt(a):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case N:e[c]=e[c]-(i[d]/2-n[d]/2);break;case Y:e[c]=e[c]+(i[d]/2-n[d]/2)}}return e}function Ft(t,e){void 0===e&&(e={});var i=e.placement,n=void 0===i?t.placement:i,s=e.strategy,a=void 0===s?t.strategy:s,r=e.boundary,o=void 0===r?"clippingParents":r,h=e.rootBoundary,c=void 0===h?Q:h,d=e.elementContext,u=void 0===d?G:d,l=e.altBoundary,f=void 0!==l&&l,v=e.padding,b=void 0===v?0:v,p=Ot("number"!=typeof b?b:Mt(b,K)),y=t.rects.popper,m=t.elements[f?u===G?"reference":G:u],w=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=Wt(mt(t)),i=["absolute","fixed"].indexOf(bt(t).position)>=0&&st(t)?gt(t):t;return nt(i)?e.filter((function(t){return nt(t)&&vt(t,i)&&"body"!==et(t)})):[]}(t):[].concat(e),a=[].concat(s,[i]),r=a.reduce((function(e,i){var s=Zt(t,i,n);return e.top=ot(s.top,e.top),e.right=ht(s.right,e.right),e.bottom=ht(s.bottom,e.bottom),e.left=ot(s.left,e.left),e}),Zt(t,a[0],n));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(nt(m)?m:m.contextElement||yt(t.elements.popper),o,c,a),g=lt(t.elements.reference),k=qt({reference:g,element:y,placement:n}),x=It(Object.assign({},y,k)),O=u===G?x:g,M={top:w.top-O.top+p.top,bottom:O.bottom-w.bottom+p.bottom,left:w.left-O.left+p.left,right:O.right-w.right+p.right},j=t.modifiersData.offset;if(u===G&&j){var D=j[n];Object.keys(M).forEach((function(t){var e=[_,V].indexOf(t)>=0?1:-1,i=[R,V].indexOf(t)>=0?"y":"x";M[t]+=D[i]*e}))}return M}function Rt(t,e){void 0===e&&(e={});var i=e.boundary,n=e.rootBoundary,s=e.padding,a=e.flipVariations,r=e.allowedAutoPlacements,o=void 0===r?X:r,h=jt(e.placement),c=h?a?J:J.filter((function(t){return jt(t)===h})):K,d=c.filter((function(t){return o.indexOf(t)>=0}));0===d.length&&(d=c);var u=d.reduce((function(e,a){return e[a]=Ft(t,{placement:a,boundary:i,rootBoundary:n,padding:s})[rt(a)],e}),{});return Object.keys(u).sort((function(t,e){return u[t]-u[e]}))}var Vt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,a=void 0===s||s,r=i.altAxis,o=void 0===r||r,h=i.fallbackPlacements,c=i.padding,d=i.boundary,u=i.rootBoundary,l=i.altBoundary,f=i.flipVariations,v=void 0===f||f,b=i.allowedAutoPlacements,p=e.options.placement,y=rt(p),m=h||(y!==p&&v?function(t){if(rt(t)===z)return[];var e=Et(t);return[Bt(t),e,Bt(e)]}(p):[Et(p)]),w=[p].concat(m).reduce((function(t,i){return t.concat(rt(i)===z?Rt(e,{placement:i,boundary:d,rootBoundary:u,padding:c,flipVariations:v,allowedAutoPlacements:b}):i)}),[]),g=e.rects.reference,k=e.rects.popper,x=new Map,O=!0,M=w[0],j=0;j<w.length;j++){var D=w[j],A=rt(D),C=jt(D)===N,S=[R,V].indexOf(A)>=0,E=S?"width":"height",L=Ft(e,{placement:D,boundary:d,rootBoundary:u,altBoundary:l,padding:c}),B=S?C?_:U:C?V:R;g[E]>k[E]&&(B=Et(B));var T=Et(B),H=[];if(a&&H.push(L[A]<=0),o&&H.push(L[B]<=0,L[T]<=0),H.every((function(t){return t}))){M=D,O=!1;break}x.set(D,H)}if(O)for(var $=function(t){var e=w.find((function(e){var i=x.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return M=e,"break"},P=v?3:1;P>0&&"break"!==$(P);P--);e.placement!==M&&(e.modifiersData[n]._skip=!0,e.placement=M,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _t(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function Ut(t){return[R,_,V,U].some((function(e){return t[e]>=0}))}function zt(t,e,i){void 0===i&&(i=!1);var n,s,a=st(e),r=st(e)&&function(t){var e=t.getBoundingClientRect(),i=ct(e.width)/t.offsetWidth||1,n=ct(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),o=yt(e),h=lt(t,r,i),c={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(a||!a&&!i)&&(("body"!==et(e)||$t(o))&&(c=(n=e)!==it(n)&&st(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Tt(n)),st(e)?((d=lt(e,!0)).x+=e.clientLeft,d.y+=e.clientTop):o&&(d.x=Ht(o))),{x:h.left+c.scrollLeft-d.x,y:h.top+c.scrollTop-d.y,width:h.width,height:h.height}}function Kt(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var Nt={placement:"bottom",modifiers:[],strategy:"absolute"};function Yt(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Qt(t){void 0===t&&(t={});var e=t.defaultModifiers,i=void 0===e?[]:e,n=t.defaultOptions,s=void 0===n?Nt:n;return function(t,e,n){void 0===n&&(n=s);var a,r,o={placement:"bottom",orderedModifiers:[],options:Object.assign({},Nt,s),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},h=[],c=!1,d={state:o,setOptions:function(n){var a="function"==typeof n?n(o.options):n;u(),o.options=Object.assign({},s,o.options,a),o.scrollParents={reference:nt(t)?Wt(t):t.contextElement?Wt(t.contextElement):[],popper:Wt(e)};var r,c,l=function(t){var e=Kt(t);return tt.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}((r=[].concat(i,o.options.modifiers),c=r.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return o.orderedModifiers=l.filter((function(t){return t.enabled})),o.orderedModifiers.forEach((function(t){var e=t.options,i=t.effect;if("function"==typeof i){var n=i({state:o,name:t.name,instance:d,options:void 0===e?{}:e});h.push(n||function(){})}})),d.update()},forceUpdate:function(){if(!c){var t=o.elements,e=t.reference,i=t.popper;if(Yt(e,i)){o.rects={reference:zt(e,gt(i),"fixed"===o.options.strategy),popper:ft(i)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(t){return o.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<o.orderedModifiers.length;n++)if(!0!==o.reset){var s=o.orderedModifiers[n],a=s.fn,r=s.options;"function"==typeof a&&(o=a({state:o,options:void 0===r?{}:r,name:s.name,instance:d})||o)}else o.reset=!1,n=-1}}},update:(a=function(){return new Promise((function(t){d.forceUpdate(),t(o)}))},function(){return r||(r=new Promise((function(t){Promise.resolve().then((function(){r=void 0,t(a())}))}))),r}),destroy:function(){u(),c=!0}};if(!Yt(t,e))return d;function u(){h.forEach((function(t){return t()})),h=[]}return d.setOptions(n).then((function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)})),d}}var Gt=Qt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,a=void 0===s||s,r=n.resize,o=void 0===r||r,h=it(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&c.forEach((function(t){t.addEventListener("scroll",i.update,Ct)})),o&&h.addEventListener("resize",i.update,Ct),function(){a&&c.forEach((function(t){t.removeEventListener("scroll",i.update,Ct)})),o&&h.removeEventListener("resize",i.update,Ct)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=qt({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,a=i.adaptive,r=void 0===a||a,o=i.roundOffsets,h=void 0===o||o,c={placement:rt(e.placement),variation:jt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,At(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:h})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,At(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:h})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];st(s)&&et(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},a=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});st(n)&&et(n)&&(Object.assign(n.style,a),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.name,n=t.options.offset,s=void 0===n?[0,0]:n,a=X.reduce((function(t,i){return t[i]=function(t,e,i){var n=rt(t),s=[U,R].indexOf(n)>=0?-1:1,a="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=a[0],o=a[1];return r=r||0,o=(o||0)*s,[U,_].indexOf(n)>=0?{x:o,y:r}:{x:r,y:o}}(i,e.rects,s),t}),{}),r=a[e.placement],o=r.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=r.x,e.modifiersData.popperOffsets.y+=o),e.modifiersData[i]=a}},Vt,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,a=void 0===s||s,r=i.altAxis,o=void 0!==r&&r,h=i.tether,c=void 0===h||h,d=i.tetherOffset,u=void 0===d?0:d,l=Ft(e,{boundary:i.boundary,rootBoundary:i.rootBoundary,padding:i.padding,altBoundary:i.altBoundary}),f=rt(e.placement),v=jt(e.placement),b=!v,p=kt(f),y="x"===p?"y":"x",m=e.modifiersData.popperOffsets,w=e.rects.reference,g=e.rects.popper,k="function"==typeof u?u(Object.assign({},e.rects,{placement:e.placement})):u,x="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),O=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(m){if(a){var j,D="y"===p?R:U,A="y"===p?V:_,C="y"===p?"height":"width",S=m[p],E=S+l[D],L=S-l[A],B=c?-g[C]/2:0,T=v===N?w[C]:g[C],H=v===N?-g[C]:-w[C],$=e.elements.arrow,P=c&&$?ft($):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},I=W[D],Z=W[A],q=xt(0,w[C],P[C]),F=b?w[C]/2-B-q-I-x.mainAxis:T-q-I-x.mainAxis,z=b?-w[C]/2+B+q+Z+x.mainAxis:H+q+Z+x.mainAxis,K=e.elements.arrow&>(e.elements.arrow),Y=null!=(j=null==O?void 0:O[p])?j:0,Q=S+z-Y,G=xt(c?ht(E,S+F-Y-(K?"y"===p?K.clientTop||0:K.clientLeft||0:0)):E,S,c?ot(L,Q):L);m[p]=G,M[p]=G-S}if(o){var J,X=m[y],tt="y"===y?"height":"width",et=X+l["x"===p?R:U],it=X-l["x"===p?V:_],nt=-1!==[R,U].indexOf(f),st=null!=(J=null==O?void 0:O[y])?J:0,at=nt?et:X-w[tt]-g[tt]-st+x.altAxis,ct=nt?X+w[tt]+g[tt]-st-x.altAxis:it,dt=c&&nt?function(t,e,i){var n=xt(t,e,i);return n>i?i:n}(at,X,ct):xt(c?at:et,X,c?ct:it);m[y]=dt,M[y]=dt-X}e.modifiersData[n]=M}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,a=i.elements.arrow,r=i.modifiersData.popperOffsets,o=rt(i.placement),h=kt(o),c=[U,_].indexOf(o)>=0?"height":"width";if(a&&r){var d=function(t,e){return Ot("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Mt(t,K))}(s.padding,i),u=ft(a),l="y"===h?R:U,f="y"===h?V:_,v=i.rects.reference[c]+i.rects.reference[h]-r[h]-i.rects.popper[c],b=r[h]-i.rects.reference[h],p=gt(a),y=p?"y"===h?p.clientHeight||0:p.clientWidth||0:0,m=y/2-u[c]/2+(v/2-b/2),w=xt(d[l],m,y-u[c]-d[f]);i.modifiersData[n]=((e={})[h]=w,e.centerOffset=w-m,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&vt(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,a=e.modifiersData.preventOverflow,r=Ft(e,{elementContext:"reference"}),o=Ft(e,{altBoundary:!0}),h=_t(r,n),c=_t(o,s,a),d=Ut(h),u=Ut(c);e.modifiersData[i]={referenceClippingOffsets:h,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}}]});const Jt=class{constructor(i){t(this,i),this.opened=e(this,"opened",7),this.closed=e(this,"closed",7),this.inline=!1,this.placement="bottom-start",this.offset=[0,8],this.closing=!1,this.showing=this.inline||!1,this.positioned=!1,this.originalParent=null,this.originalNextSibling=null,this.isMovingPortal=!1,this.popperInstance=null,this.onKeyDown=t=>{"Escape"===t.code&&this.close()}}watchShowing(t){t||(this.destroyPopperInstance(),this.cleanupPortal()),this.positioned=!1}getAppendToElement(){return this.appendTo?"body"===this.appendTo?document.body:"string"==typeof this.appendTo?document.querySelector(this.appendTo):this.appendTo:null}setupPortal(){const t=this.getAppendToElement();t&&(this.originalParent=this.hostElement.parentElement,this.originalNextSibling=this.hostElement.nextSibling,this.isMovingPortal=!0,t.appendChild(this.hostElement),this.isMovingPortal=!1)}cleanupPortal(){this.isMovingPortal||this.originalParent&&(this.isMovingPortal=!0,this.originalNextSibling?this.originalParent.insertBefore(this.hostElement,this.originalNextSibling):this.originalParent.appendChild(this.hostElement),this.originalParent=null,this.originalNextSibling=null,this.isMovingPortal=!1)}createPopperInstance(){if(!this.triggerElement||!this.bodyRef)return;const t=!!this.appendTo,e=t?"viewport":"clippingParents";this.popperInstance=Gt(this.triggerElement,this.bodyRef,{placement:this.placement,strategy:t?"fixed":"absolute",modifiers:[{name:"offset",options:{offset:this.offset}},{name:"flip",options:{fallbackPlacements:["top-start","top-end","bottom-end"],boundary:e}},{name:"preventOverflow",options:{boundary:e,altAxis:!0,padding:8}},{name:"computeStyles",options:{gpuAcceleration:!0}},{name:"applyStyles",enabled:!0}]}),this.popperInstance.forceUpdate(),this.positioned=!0}destroyPopperInstance(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}async open(){this.inline||(this.showing=!0,this.undo=F(this.el),this.opened.emit(void 0))}async close(){var t;this.inline||(this.showing=!1,this.closed.emit(void 0),null===(t=this.undo)||void 0===t||t.call(this),this.triggerElement&&this.triggerElement.focus())}disconnectedCallback(){this.isMovingPortal||(this.destroyPopperInstance(),this.cleanupPortal())}async getState(){return this.showing}async setTriggerElement(t){this.triggerElement=t}async updatePosition(){var t;await(null===(t=this.popperInstance)||void 0===t?void 0:t.update())}handleClick(t){var e;if(this.showing){const i=t.target;this.hostElement.contains(i)||(null===(e=this.triggerElement)||void 0===e?void 0:e.contains(i))||this.originalParent&&this.originalParent.contains(i)||this.close()}}render(){return i(n,{key:"35e8ed14b0108e9cb75782516d070dfb8474b0b2",showing:this.showing,ref:t=>t&&(this.el=t)},!this.inline&&this.showing&&i("div",{key:"fdb64ed8717e2a1620ef2d4ffb21a44d1de03a46",part:"body",ref:t=>{t&&(this.bodyRef=t,this.showing&&this.triggerElement&&!this.popperInstance&&(this.setupPortal(),requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.createPopperInstance()}))}))))},style:{visibility:this.positioned?"visible":"hidden"},onKeyDown:this.onKeyDown,role:"dialog",tabindex:-1,"aria-hidden":!this.showing,"aria-label":this.label,"aria-modal":this.showing},i("focus-trap",{key:"af4734b1a18dd62a600ca49313b1ba07f2d19039"},i("div",{key:"fb41d5ce07b5aac179e4bed63c18a8d254503a50",part:"content"},i("slot",{key:"fc480cf1a29a42b1a19737a72d410c139dc32f07"})))),this.inline&&i("div",{key:"7aef10d50f790a1e72e05b26dc108c40500fa7c3",part:"content"},i("slot",{key:"06395cd19052d1b81ab448c0a9a618da876fa86d"})))}get hostElement(){return s(this)}static get watchers(){return{showing:[{watchShowing:0}]}}};Jt.style=":host::part(body){position:absolute;top:0;left:0;width:-moz-fit-content;width:fit-content;z-index:1200}:host::part(backdrop){}:host::part(content){}";export{S as tabworthy_dates_calendar,Jt as tabworthy_dates_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-
|
|
1
|
+
import{p as e,b as t}from"./p-CwtZ_Lud.js";export{s as setNonce}from"./p-CwtZ_Lud.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t([["p-4eec41e5",[[2,"tabworthy-times-picker",{hours:[1026],minutes:[1026],useTwelveHourFormat:[4,"use-twelve-hour-format"],labels:[16],labelsSrOnly:[4,"labels-sr-only"],disabled:[4],elementClassName:[1,"element-class-name"],internalHours:[32],internalMinutes:[32],period:[32]},null,{hours:[{watchHours:0}],minutes:[{watchMinutes:0}]}]]],["p-ee41beed",[[262,"tabworthy-dates-calendar",{clearButtonContent:[1,"clear-button-content"],disabled:[4],modalIsOpen:[4,"modal-is-open"],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],range:[4],labels:[16],locale:[1],nextMonthButtonContent:[1,"next-month-button-content"],nextYearButtonContent:[1,"next-year-button-content"],previousMonthButtonContent:[1,"previous-month-button-content"],previousYearButtonContent:[1,"previous-year-button-content"],minDate:[1,"min-date"],maxDate:[1,"max-date"],inline:[4],showClearButton:[4,"show-clear-button"],showMonthStepper:[4,"show-month-stepper"],showTodayButton:[4,"show-today-button"],showYearStepper:[4,"show-year-stepper"],showKeyboardHint:[4,"show-keyboard-hint"],showHiddenTitle:[4,"show-hidden-title"],startDate:[1,"start-date"],todayButtonContent:[1,"today-button-content"],value:[1040],currentDate:[32],hoveredDate:[32],weekdays:[32]},null,{modalIsOpen:[{watchModalIsOpen:0}],firstDayOfWeek:[{watchFirstDayOfWeek:0}],locale:[{watchLocale:0}],range:[{watchRange:0}],startDate:[{watchStartDate:0}],value:[{watchValue:0}]}],[257,"tabworthy-dates-modal",{label:[1],inline:[4],placement:[1],offset:[16],appendTo:[1,"append-to"],closing:[32],showing:[32],positioned:[32],open:[64],close:[64],getState:[64],setTriggerElement:[64],updatePosition:[64]},[[10,"click","handleClick"]],{showing:[{watchShowing:0}]}]]],["p-90de04dd",[[2,"tabworthy-times",{id:[513],value:[1025],range:[4],label:[1],placeholder:[1],locale:[1],disabled:[4],minDate:[1,"min-date"],maxDate:[1,"max-date"],startDate:[1,"start-date"],referenceDate:[1,"reference-date"],useTwelveHourFormat:[4,"use-twelve-hour-format"],timesLabels:[16],datesCalendarLabels:[16],inline:[4],hasError:[1028,"has-error"],showYearStepper:[4,"show-year-stepper"],showMonthStepper:[4,"show-month-stepper"],showClearButton:[4,"show-clear-button"],showTodayButton:[4,"show-today-button"],calendarButtonContent:[1,"calendar-button-content"],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],format:[1],inputShouldFormat:[8,"input-should-format"],disableFreeformInput:[4,"disable-freeform-input"],inputClass:[1,"input-class"],appendTo:[1,"append-to"],internalValue:[32],selectedDate:[32],selectedHours:[32],selectedMinutes:[32],errorState:[32],disabledState:[32],clearValue:[64]},null,{value:[{watchValue:0}],disabled:[{watchDisabled:0}],hasError:[{watchHasError:0}]}]]],["p-c0f957f5",[[2,"tabworthy-dates",{id:[513],value:[1025],range:[4],label:[1],placeholder:[1],locale:[1],disabled:[4],minDate:[1,"min-date"],maxDate:[1,"max-date"],startDate:[1,"start-date"],referenceDate:[1,"reference-date"],useStrictDateParsing:[4,"use-strict-date-parsing"],datesLabels:[16],datesCalendarLabels:[16],inline:[4],hasError:[1028,"has-error"],nextMonthButtonContent:[1,"next-month-button-content"],nextYearButtonContent:[1,"next-year-button-content"],showYearStepper:[4,"show-year-stepper"],showMonthStepper:[4,"show-month-stepper"],showClearButton:[4,"show-clear-button"],showTodayButton:[4,"show-today-button"],inputShouldFormat:[8,"input-should-format"],showKeyboardHint:[4,"show-keyboard-hint"],disableDate:[16],elementClassName:[1,"element-class-name"],firstDayOfWeek:[2,"first-day-of-week"],format:[1],quickButtons:[16],todayButtonContent:[1,"today-button-content"],calendarButtonContent:[1,"calendar-button-content"],showQuickButtons:[4,"show-quick-buttons"],disableFreeformInput:[4,"disable-freeform-input"],inputClass:[1,"input-class"],appendTo:[1,"append-to"],internalValue:[32],errorState:[32],disabledState:[32],parseDate:[64]},null,{disabled:[{watchDisabled:0}],value:[{watchValue:0}]}]]]],e))));
|
package/dist/themes/light.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
tabworthy-dates-calendar,tabworthy-dates-calendar *,tabworthy-dates-calendar *:before,tabworthy-dates-calendar *:after{margin:0;padding:0;box-sizing:border-box}tabworthy-dates-calendar{display:inline-flex}tabworthy-dates *:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-dates-calendar-wrapper{border:.0625rem solid var(--tw-dates-border-color);border-radius:.375rem;display:flex}.tabworthy-dates-calendar-wrapper--inline{margin-top:.5em}.tabworthy-dates-calendar,.tabworthy-dates{display:block;width:min-content;min-width:18rem;max-width:24rem;border-radius:.375rem;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg-color);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:var(--tw-dates-font-size, 1rem);font-weight:400;line-height:1.5}@media screen and (min-width: 23.5rem){.tabworthy-dates-calendar,.tabworthy-dates{min-width:20rem;max-width:24rem}}.tabworthy-dates-calendar--disabled *[aria-disabled]{opacity:.5;cursor:default}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__weekday{color:var(--tw-dates-disabled-color)}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date:focus>*{outline:none}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date{cursor:default;opacity:.5}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date:hover>*{background-color:rgba(0,0,0,0)}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date--in-range:hover>*{background-color:#f2f3f5}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date--selected:hover>*{color:#fff;background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__header{display:flex;padding:.75rem;align-items:center;gap:.5rem}.tabworthy-dates-calendar__current-month{display:flex;flex-grow:1;gap:.5rem}.tabworthy-dates-calendar__month-select,.tabworthy-dates-calendar__year-select{display:flex;height:2rem;padding-right:.5rem;padding-left:.5rem;align-items:center;border:none;border-radius:.25rem;color:var(--tw-dates-text-color);background:var(--tw-dates-bg2-color);font:inherit;line-height:1.125}.tabworthy-dates-calendar__month-select:hover:not(:disabled),.tabworthy-dates-calendar__year-select:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__month-select:focus-visible,.tabworthy-dates-calendar__year-select:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}@media screen and (forced-colors: active){.tabworthy-dates-calendar__month-select,.tabworthy-dates-calendar__year-select{border:1px solid rgba(0,0,0,0)}}.tabworthy-dates-calendar__month-select{flex-grow:1;cursor:pointer;appearance:none}.tabworthy-dates-calendar__year-select{max-width:5rem}.tabworthy-dates-calendar__previous-month-button,.tabworthy-dates-calendar__next-month-button,.tabworthy-dates-calendar__previous-year-button,.tabworthy-dates-calendar__next-year-button{display:inline-flex;width:2rem;height:2rem;padding:.375rem;flex-shrink:0;justify-content:center;align-items:center;border:none;border-radius:.25rem;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg2-color);cursor:pointer}.tabworthy-dates-calendar__previous-month-button:hover:not([aria-disabled]),.tabworthy-dates-calendar__next-month-button:hover:not([aria-disabled]),.tabworthy-dates-calendar__previous-year-button:hover:not([aria-disabled]),.tabworthy-dates-calendar__next-year-button:hover:not([aria-disabled]){background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__previous-month-button:focus-visible,.tabworthy-dates-calendar__next-month-button:focus-visible,.tabworthy-dates-calendar__previous-year-button:focus-visible,.tabworthy-dates-calendar__next-year-button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-dates-calendar__previous-month-button[aria-disabled],.tabworthy-dates-calendar__next-month-button[aria-disabled],.tabworthy-dates-calendar__previous-year-button[aria-disabled],.tabworthy-dates-calendar__next-year-button[aria-disabled]{color:var(--tw-dates-disabled-color)}@media screen and (forced-colors: active){.tabworthy-dates-calendar__previous-month-button[aria-disabled],.tabworthy-dates-calendar__next-month-button[aria-disabled],.tabworthy-dates-calendar__previous-year-button[aria-disabled],.tabworthy-dates-calendar__next-year-button[aria-disabled]{color:GrayText}}.tabworthy-dates-calendar__body{padding-right:.75rem;padding-bottom:.75rem;padding-left:.75rem}.tabworthy-dates-calendar__calendar{width:100%;table-layout:fixed;border-collapse:collapse}.tabworthy-dates-calendar__weekday>span{display:flex;padding:.2rem;justify-content:center;align-items:center;font-weight:600;aspect-ratio:1}.tabworthy-dates-calendar__date{padding:.125rem;text-align:center;cursor:pointer}.tabworthy-dates-calendar__date:focus{outline:none}.tabworthy-dates-calendar__date:focus-visible>*{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}@media screen and (forced-colors: active){.tabworthy-dates-calendar__date:focus-visible>*{outline-color:Highlight}}.tabworthy-dates-calendar__date:hover>*{background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__date>*{display:flex;justify-content:center;align-items:center;border-radius:.25rem;aspect-ratio:1}.tabworthy-dates-calendar__date--today>*{font-weight:700;font-style:normal;color:var(--tw-dates-active-color)}.tabworthy-dates-calendar__date--selected>*,.tabworthy-dates-calendar__date--selected:hover>*,.tabworthy-dates-calendar__date--in-range:hover>*,.tabworthy-dates-calendar__date--in-range>*{color:var(--tw-dates-bg-color);background-color:var(--tw-dates-active-color);font-weight:500;outline-offset:.125rem}@media screen and (forced-colors: active){.tabworthy-dates-calendar__date--selected>*,.tabworthy-dates-calendar__date--selected:hover>*,.tabworthy-dates-calendar__date--in-range:hover>*,.tabworthy-dates-calendar__date--in-range>*{background-color:Highlight}}.tabworthy-dates-calendar__date--disabled{color:var(--tw-dates-disabled-color);cursor:default}@media screen and (forced-colors: active){.tabworthy-dates-calendar__date--disabled{color:GrayText}}.tabworthy-dates-calendar__date--disabled{position:relative}.tabworthy-dates-calendar__date--disabled::after{content:"";position:absolute;height:1.5rem;width:.078125rem;background-color:var(--tw-dates-disabled-color);transform:rotate(45deg);right:50%;top:25%}.tabworthy-dates-calendar__date--disabled:not(.tabworthy-dates-calendar__date--selected):not(.tabworthy-dates-calendar__date--in-range):hover>*{background-color:rgba(0,0,0,0)}.tabworthy-dates-calendar__date--disabled.tabworthy-dates-calendar__date--in-range:not(.tabworthy-dates-calendar__date--selected):not(.tabworthy-dates-calendar__date--in-range)>*{background-color:rgba(0,0,0,0)}.tabworthy-dates-calendar__footer{padding-right:.75rem;padding-bottom:.75rem;padding-left:.75rem;display:flex;flex-direction:column;gap:1rem}.tabworthy-dates-calendar__footer-buttons{align-items:center;display:flex;gap:.5rem}.tabworthy-dates-calendar__clear-button,.tabworthy-dates-calendar__today-button,.tabworthy-dates__quick-button,.tabworthy-dates__calendar-button{display:inline-flex;height:2rem;padding-right:.5rem;padding-left:.5rem;justify-content:center;align-items:center;border:none;border-radius:.25rem;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg2-color);font:inherit;line-height:1;cursor:pointer}.tabworthy-dates-calendar__clear-button:hover:not(:disabled),.tabworthy-dates-calendar__today-button:hover:not(:disabled),.tabworthy-dates__quick-button:hover:not(:disabled),.tabworthy-dates__calendar-button:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__clear-button:focus-visible,.tabworthy-dates-calendar__today-button:focus-visible,.tabworthy-dates__quick-button:focus-visible,.tabworthy-dates__calendar-button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-dates-calendar__clear-button:disabled,.tabworthy-dates-calendar__today-button:disabled,.tabworthy-dates__quick-button:disabled,.tabworthy-dates__calendar-button:disabled{cursor:not-allowed;opacity:.6}.label{font-weight:600;display:block}.tabworthy-dates__calendar-button{margin-left:.5rem;height:2.5rem}.tabworthy-dates__quick-group{margin-top:.5rem;display:flex;flex-wrap:wrap;column-gap:.5rem}.tabworthy-dates__quick-button{color:var(--tw-dates-text-color);background-color:inherit;text-decoration:underline}.tabworthy-dates__quick-button:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-dates__input{box-sizing:border-box;display:inline-flex;height:2.5rem;padding-right:.5rem;padding-left:.5rem;justify-content:center;align-items:center;border-radius:.25rem;color:var(--tw-dates-text-color);background:var(--tw-dates-bg2-color);line-height:1;border:1px solid var(--tw-dates-border-color);font-size:var(--tw-dates-font-size, 1rem);flex-grow:1}.tabworthy-dates__input[aria-invalid]{border-color:var(--tw-dates-error-color)}.tabworthy-dates__input:disabled{cursor:not-allowed;opacity:.6}.tabworthy-dates__input::placeholder{color:var(--tw-dates-placeholder-color);opacity:var(--tw-dates-placeholder-opacity)}.tabworthy-dates-calendar__keyboard-hint{color:var(--tw-dates-secondary-color);display:flex;align-items:center;gap:.25rem;text-decoration:underline;text-underline-offset:.2em;border:none;margin:0;width:auto;overflow:visible;background:rgba(0,0,0,0);font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;padding:.25rem}.tabworthy-dates__label{font-weight:600;margin-bottom:.5rem;display:inline-block;font-family:"Segoe UI",sans-serif;color:var(--tw-dates-text-color)}.tabworthy-dates__input-container{min-width:300px;max-width:400px;display:flex}.tabworthy-dates__input-error{display:flex;padding:.5rem;color:var(--tw-dates-error-color);font-weight:700}.tabworthy-times{display:flex;flex-direction:column}.tabworthy-times__label{font-weight:600;margin-bottom:.5rem;display:inline-block;font-family:"Segoe UI",sans-serif;color:var(--tw-dates-text-color)}.tabworthy-times__input-container{min-width:300px;max-width:400px;display:flex}.tabworthy-times__input{box-sizing:border-box;display:inline-flex;height:2.5rem;padding-right:.5rem;padding-left:.5rem;justify-content:center;align-items:center;border-radius:.25rem;color:var(--tw-dates-text-color);background:var(--tw-dates-bg2-color);line-height:1;border:1px solid var(--tw-dates-border-color);font-size:var(--tw-dates-font-size, 1rem);flex-grow:1}.tabworthy-times__input:focus{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times__input:disabled{cursor:not-allowed;opacity:.6}.tabworthy-times__input::placeholder{color:var(--tw-dates-placeholder-color);opacity:var(--tw-dates-placeholder-opacity)}.tabworthy-times[has-error] .tabworthy-times__input{border-color:var(--tw-dates-error-color)}.tabworthy-times__calendar-button{display:inline-flex;height:2.5rem;padding-right:.5rem;padding-left:.5rem;justify-content:center;align-items:center;border:none;border-radius:.25rem;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg2-color);font:inherit;line-height:1;cursor:pointer;margin-left:.5rem}.tabworthy-times__calendar-button:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-times__calendar-button:disabled{cursor:not-allowed;opacity:.6}.tabworthy-times__calendar-button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times__picker-container{display:flex;gap:0;min-width:fit-content}.tabworthy-times__time-section{display:flex;flex-direction:column;background-color:var(--tw-dates-bg-color);height:100%;justify-content:center;border-radius:.375rem}.tabworthy-times__time-section tabworthy-times-picker{padding:0 .75rem .75rem .75rem !important;align-self:center}.tabworthy-times__input-error{display:flex;padding:.5rem;color:var(--tw-dates-error-color);font-weight:700}.tabworthy-times__divider{display:none}.tabworthy-times[inline] .tabworthy-times__calendar-button{display:none}.tabworthy-times[disabled]{opacity:.6;pointer-events:none}.tabworthy-times-picker{display:flex;flex-direction:column;padding:0;min-width:200px}.tabworthy-times-picker__container{display:flex;align-items:center;justify-content:center;gap:.5rem}.tabworthy-times-picker__field{display:flex;flex-direction:column;align-items:center;gap:.25rem}.tabworthy-times-picker__label{font-size:var(--tw-times-picker-label-font-size, 0.75rem);font-weight:500;color:var(--tw-dates-text-color);text-transform:uppercase;letter-spacing:.05em}.tabworthy-times-picker__label--sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.tabworthy-times-picker__control{display:flex;flex-direction:column;align-items:center;gap:.25rem}.tabworthy-times-picker__button{display:inline-flex;width:2rem;height:1.5rem;padding:.25rem;justify-content:center;align-items:center;border:none;border-radius:.25rem;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg2-color);cursor:pointer;transition:background-color .2s ease}.tabworthy-times-picker__button:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-times-picker__button:disabled{cursor:not-allowed;opacity:.5;color:var(--tw-dates-disabled-color)}.tabworthy-times-picker__button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times-picker__input{width:3rem;height:2.5rem;text-align:center;font-size:var(--tw-times-picker-input-font-size, 1.25rem);font-weight:600;border:1px solid var(--tw-dates-border-color);border-radius:.25rem;background-color:var(--tw-dates-bg2-color);color:var(--tw-dates-text-color);padding:.25rem}.tabworthy-times-picker__input:focus{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times-picker__input:disabled{cursor:not-allowed;opacity:.5}.tabworthy-times-picker__input::-webkit-inner-spin-button,.tabworthy-times-picker__input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.tabworthy-times-picker__input[type=number]{-moz-appearance:textfield}.tabworthy-times-picker__separator{font-size:var(--tw-times-picker-separator-font-size, 1.5rem);font-weight:600;color:var(--tw-dates-text-color)}.tabworthy-times-picker__period{display:flex;flex-direction:column;gap:.25rem;margin-left:.5rem;padding-top:1.25rem}.tabworthy-times-picker__period-button{width:2rem;height:2rem;display:flex;align-items:center;justify-content:center;border:none;background-color:var(--tw-dates-bg2-color);color:var(--tw-dates-text-color);cursor:pointer;border-radius:.25rem;font-size:var(--tw-times-period-button-font-size, 0.875rem);font-weight:500;transition:background-color .2s ease}.tabworthy-times-picker__period-button--active{background-color:var(--tw-dates-hover-color);font-weight:600}.tabworthy-times-picker__period-button:disabled{cursor:not-allowed;opacity:.5}.tabworthy-times-picker__period-button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times-picker__period-button:hover:not(:disabled):not(.tabworthy-times-picker__period-button--tw-dates-active){background-color:var(--tw-dates-hover-color);opacity:.8}@media(max-width: 768px){.tabworthy-times__picker-container{flex-direction:column}.tabworthy-dates-calendar-wrapper{display:flex;flex-direction:column}.tabworthy-times__divider{display:block}.tabworthy-times__time-section tabworthy-times-picker{padding:.75rem !important}}:root{--tw-dates-text-color: #111;--tw-dates-secondary-color: #767676;--tw-dates-border-color: #949494;--tw-dates-bg-color: #fff;--tw-dates-disabled-color: #959595;--tw-dates-hover-color: #e5e7eb;--tw-dates-bg2-color: #f2f3f5;--tw-dates-focus-color: #0000ff;--tw-dates-error-color: #d4351c;--tw-dates-active-color: #0000ff;--tw-dates-placeholder-color: unset;--tw-dates-placeholder-opacity: 1;--tw-dates-focus-outline-width: 0.25rem;--tw-dates-font-size: 1rem;--tw-times-picker-label-font-size: 0.75rem;--tw-times-picker-input-font-size: 1.25rem;--tw-times-period-button-font-size: 0.875rem;--tw-times-picker-separator-font-size: 1.5rem}
|
|
1
|
+
tabworthy-dates-calendar,tabworthy-dates-calendar *,tabworthy-dates-calendar *:before,tabworthy-dates-calendar *:after{margin:0;padding:0;box-sizing:border-box}tabworthy-dates-calendar{display:inline-flex}tabworthy-dates *:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-dates-calendar-wrapper{border:.0625em solid var(--tw-dates-border-color);border-radius:.375em;display:flex}.tabworthy-dates-calendar-wrapper--inline{margin-top:.5em}.tabworthy-dates-calendar,.tabworthy-dates{display:block;width:min-content;min-width:18em;max-width:24em;border-radius:.375em;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg-color);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:var(--tw-dates-font-size, 1em);font-weight:400;line-height:1.5}@media screen and (min-width: 23.5em){.tabworthy-dates-calendar,.tabworthy-dates{min-width:20em;max-width:24em}}.tabworthy-dates-calendar--disabled *[aria-disabled]{opacity:.5;cursor:default}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__weekday{color:var(--tw-dates-disabled-color)}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date:focus>*{outline:none}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date{cursor:default;opacity:.5}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date:hover>*{background-color:rgba(0,0,0,0)}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date--in-range:hover>*{background-color:#f2f3f5}.tabworthy-dates-calendar--disabled .tabworthy-dates-calendar__date--selected:hover>*{color:#fff;background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__header{display:flex;padding:.75em;align-items:center;gap:.5em}.tabworthy-dates-calendar__current-month{display:flex;flex-grow:1;gap:.5em}.tabworthy-dates-calendar__month-select,.tabworthy-dates-calendar__year-select{display:flex;height:2em;padding-right:.5em;padding-left:.5em;align-items:center;border:none;border-radius:.25em;color:var(--tw-dates-text-color);background:var(--tw-dates-bg2-color);font:inherit;line-height:1.125}.tabworthy-dates-calendar__month-select:hover:not(:disabled),.tabworthy-dates-calendar__year-select:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__month-select:focus-visible,.tabworthy-dates-calendar__year-select:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}@media screen and (forced-colors: active){.tabworthy-dates-calendar__month-select,.tabworthy-dates-calendar__year-select{border:1px solid rgba(0,0,0,0)}}.tabworthy-dates-calendar__month-select{flex-grow:1;cursor:pointer;appearance:none}.tabworthy-dates-calendar__year-select{max-width:5em}.tabworthy-dates-calendar__previous-month-button,.tabworthy-dates-calendar__next-month-button,.tabworthy-dates-calendar__previous-year-button,.tabworthy-dates-calendar__next-year-button{display:inline-flex;width:2em;height:2em;padding:.375em;flex-shrink:0;justify-content:center;align-items:center;border:none;border-radius:.25em;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg2-color);cursor:pointer}.tabworthy-dates-calendar__previous-month-button:hover:not([aria-disabled]),.tabworthy-dates-calendar__next-month-button:hover:not([aria-disabled]),.tabworthy-dates-calendar__previous-year-button:hover:not([aria-disabled]),.tabworthy-dates-calendar__next-year-button:hover:not([aria-disabled]){background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__previous-month-button:focus-visible,.tabworthy-dates-calendar__next-month-button:focus-visible,.tabworthy-dates-calendar__previous-year-button:focus-visible,.tabworthy-dates-calendar__next-year-button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-dates-calendar__previous-month-button[aria-disabled],.tabworthy-dates-calendar__next-month-button[aria-disabled],.tabworthy-dates-calendar__previous-year-button[aria-disabled],.tabworthy-dates-calendar__next-year-button[aria-disabled]{color:var(--tw-dates-disabled-color)}@media screen and (forced-colors: active){.tabworthy-dates-calendar__previous-month-button[aria-disabled],.tabworthy-dates-calendar__next-month-button[aria-disabled],.tabworthy-dates-calendar__previous-year-button[aria-disabled],.tabworthy-dates-calendar__next-year-button[aria-disabled]{color:GrayText}}.tabworthy-dates-calendar__body{padding-right:.75em;padding-bottom:.75em;padding-left:.75em}.tabworthy-dates-calendar__calendar{width:100%;table-layout:fixed;border-collapse:collapse}.tabworthy-dates-calendar__weekday>span{display:flex;padding:.2em;justify-content:center;align-items:center;font-weight:600;aspect-ratio:1}.tabworthy-dates-calendar__date{padding:.125em;text-align:center;cursor:pointer}.tabworthy-dates-calendar__date:focus{outline:none}.tabworthy-dates-calendar__date:focus-visible>*{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}@media screen and (forced-colors: active){.tabworthy-dates-calendar__date:focus-visible>*{outline-color:Highlight}}.tabworthy-dates-calendar__date:hover>*{background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__date>*{display:flex;justify-content:center;align-items:center;border-radius:.25em;aspect-ratio:1}.tabworthy-dates-calendar__date--today>*{font-weight:700;font-style:normal;color:var(--tw-dates-active-color)}.tabworthy-dates-calendar__date--selected>*,.tabworthy-dates-calendar__date--selected:hover>*,.tabworthy-dates-calendar__date--in-range:hover>*,.tabworthy-dates-calendar__date--in-range>*{color:var(--tw-dates-bg-color);background-color:var(--tw-dates-active-color);font-weight:500;outline-offset:.125em}@media screen and (forced-colors: active){.tabworthy-dates-calendar__date--selected>*,.tabworthy-dates-calendar__date--selected:hover>*,.tabworthy-dates-calendar__date--in-range:hover>*,.tabworthy-dates-calendar__date--in-range>*{background-color:Highlight}}.tabworthy-dates-calendar__date--disabled{color:var(--tw-dates-disabled-color);cursor:default}@media screen and (forced-colors: active){.tabworthy-dates-calendar__date--disabled{color:GrayText}}.tabworthy-dates-calendar__date--disabled{position:relative}.tabworthy-dates-calendar__date--disabled::after{content:"";position:absolute;height:1.5em;width:.078125em;background-color:var(--tw-dates-disabled-color);transform:rotate(45deg);right:50%;top:25%}.tabworthy-dates-calendar__date--disabled:not(.tabworthy-dates-calendar__date--selected):not(.tabworthy-dates-calendar__date--in-range):hover>*{background-color:rgba(0,0,0,0)}.tabworthy-dates-calendar__date--disabled.tabworthy-dates-calendar__date--in-range:not(.tabworthy-dates-calendar__date--selected):not(.tabworthy-dates-calendar__date--in-range)>*{background-color:rgba(0,0,0,0)}.tabworthy-dates-calendar__footer{padding-right:.75em;padding-bottom:.75em;padding-left:.75em;display:flex;flex-direction:column;gap:1em}.tabworthy-dates-calendar__footer-buttons{align-items:center;display:flex;gap:.5em}.tabworthy-dates-calendar__clear-button,.tabworthy-dates-calendar__today-button,.tabworthy-dates__quick-button,.tabworthy-dates__calendar-button{display:inline-flex;height:2em;padding-right:.5em;padding-left:.5em;justify-content:center;align-items:center;border:none;border-radius:.25em;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg2-color);font:inherit;line-height:1;cursor:pointer}.tabworthy-dates-calendar__clear-button:hover:not(:disabled),.tabworthy-dates-calendar__today-button:hover:not(:disabled),.tabworthy-dates__quick-button:hover:not(:disabled),.tabworthy-dates__calendar-button:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-dates-calendar__clear-button:focus-visible,.tabworthy-dates-calendar__today-button:focus-visible,.tabworthy-dates__quick-button:focus-visible,.tabworthy-dates__calendar-button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-dates-calendar__clear-button:disabled,.tabworthy-dates-calendar__today-button:disabled,.tabworthy-dates__quick-button:disabled,.tabworthy-dates__calendar-button:disabled{cursor:not-allowed;opacity:.6}.label{font-weight:600;display:block}.tabworthy-dates__calendar-button{margin-left:.5em;height:2.5em}.tabworthy-dates__quick-group{margin-top:.5em;display:flex;flex-wrap:wrap;column-gap:.5em}.tabworthy-dates__quick-button{color:var(--tw-dates-text-color);background-color:inherit;text-decoration:underline}.tabworthy-dates__quick-button:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-dates__input{box-sizing:border-box;display:inline-flex;height:2.5em;padding-right:.5em;padding-left:.5em;justify-content:center;align-items:center;border-radius:.25em;color:var(--tw-dates-text-color);background:var(--tw-dates-bg2-color);line-height:1;border:1px solid var(--tw-dates-border-color);font-size:var(--tw-dates-font-size, 1em);flex-grow:1}.tabworthy-dates__input[aria-invalid]{border-color:var(--tw-dates-error-color)}.tabworthy-dates__input:disabled{cursor:not-allowed;opacity:.6}.tabworthy-dates__input::placeholder{color:var(--tw-dates-placeholder-color);opacity:var(--tw-dates-placeholder-opacity)}.tabworthy-dates-calendar__keyboard-hint{color:var(--tw-dates-secondary-color);display:flex;align-items:center;gap:.25em;text-decoration:underline;text-underline-offset:.2em;border:none;margin:0;width:auto;overflow:visible;background:rgba(0,0,0,0);font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;padding:.25em}.tabworthy-dates__label{font-weight:600;margin-bottom:.5em;display:inline-block;font-family:"Segoe UI",sans-serif;color:var(--tw-dates-text-color)}.tabworthy-dates__input-container{min-width:300px;max-width:400px;display:flex}.tabworthy-dates__input-error{display:flex;padding:.5em;color:var(--tw-dates-error-color);font-weight:700}.tabworthy-times{display:flex;flex-direction:column}.tabworthy-times__label{font-weight:600;margin-bottom:.5em;display:inline-block;font-family:"Segoe UI",sans-serif;color:var(--tw-dates-text-color)}.tabworthy-times__input-container{min-width:300px;max-width:400px;display:flex}.tabworthy-times__input{box-sizing:border-box;display:inline-flex;height:2.5em;padding-right:.5em;padding-left:.5em;justify-content:center;align-items:center;border-radius:.25em;color:var(--tw-dates-text-color);background:var(--tw-dates-bg2-color);line-height:1;border:1px solid var(--tw-dates-border-color);font-size:var(--tw-dates-font-size, 1em);flex-grow:1}.tabworthy-times__input:focus{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times__input:disabled{cursor:not-allowed;opacity:.6}.tabworthy-times__input::placeholder{color:var(--tw-dates-placeholder-color);opacity:var(--tw-dates-placeholder-opacity)}.tabworthy-times[has-error] .tabworthy-times__input{border-color:var(--tw-dates-error-color)}.tabworthy-times__calendar-button{display:inline-flex;height:2.5em;padding-right:.5em;padding-left:.5em;justify-content:center;align-items:center;border:none;border-radius:.25em;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg2-color);font:inherit;line-height:1;cursor:pointer;margin-left:.5em}.tabworthy-times__calendar-button:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-times__calendar-button:disabled{cursor:not-allowed;opacity:.6}.tabworthy-times__calendar-button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times__picker-container{display:flex;gap:0;min-width:fit-content}.tabworthy-times__time-section{display:flex;flex-direction:column;background-color:var(--tw-dates-bg-color);height:100%;justify-content:center;border-top-right-radius:.375em;border-bottom-right-radius:.375em;border-bottom-left-radius:0;border-top-left-radius:0}.tabworthy-times__time-section tabworthy-times-picker{padding:0 .75em .75em .75em !important;align-self:center}.tabworthy-times__input-error{display:flex;padding:.5em;color:var(--tw-dates-error-color);font-weight:700}.tabworthy-times__divider{display:none}.tabworthy-times[inline] .tabworthy-times__calendar-button{display:none}.tabworthy-times[disabled]{opacity:.6;pointer-events:none}.tabworthy-times-picker{display:flex;flex-direction:column;padding:0;min-width:200px}.tabworthy-times-picker__container{display:flex;align-items:center;justify-content:center;gap:.5em}.tabworthy-times-picker__field{display:flex;flex-direction:column;align-items:center;gap:.25em}.tabworthy-times-picker__label{font-size:var(--tw-times-picker-label-font-size, 0.75em);font-weight:500;color:var(--tw-dates-text-color);text-transform:uppercase;letter-spacing:.05em}.tabworthy-times-picker__label--sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.tabworthy-times-picker__control{display:flex;flex-direction:column;align-items:center;gap:.25em}.tabworthy-times-picker__button{display:inline-flex;width:2em;height:1.5em;padding:.25em;justify-content:center;align-items:center;border:none;border-radius:.25em;color:var(--tw-dates-text-color);background-color:var(--tw-dates-bg2-color);cursor:pointer;transition:background-color .2s ease}.tabworthy-times-picker__button:hover:not(:disabled){background-color:var(--tw-dates-hover-color)}.tabworthy-times-picker__button:disabled{cursor:not-allowed;opacity:.5;color:var(--tw-dates-disabled-color)}.tabworthy-times-picker__button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times-picker__input{width:2em;height:2em;text-align:center;font-size:var(--tw-times-picker-input-font-size, 1.25em);font-weight:600;border:1px solid var(--tw-dates-border-color);border-radius:.25em;background-color:var(--tw-dates-bg2-color);color:var(--tw-dates-text-color);padding:.25em}.tabworthy-times-picker__input:focus{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times-picker__input:disabled{cursor:not-allowed;opacity:.5}.tabworthy-times-picker__input::-webkit-inner-spin-button,.tabworthy-times-picker__input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.tabworthy-times-picker__input[type=number]{-moz-appearance:textfield}.tabworthy-times-picker__separator{font-size:var(--tw-times-picker-separator-font-size, 1.5em);font-weight:600;color:var(--tw-dates-text-color)}.tabworthy-times-picker__period{display:flex;flex-direction:column;gap:.25em;margin-left:.5em;padding-top:1.25em}.tabworthy-times-picker__period-button{width:2em;height:2em;display:flex;align-items:center;justify-content:center;border:none;background-color:var(--tw-dates-bg2-color);color:var(--tw-dates-text-color);cursor:pointer;border-radius:.25em;font-size:var(--tw-times-period-button-font-size, 0.875em);font-weight:500;transition:background-color .2s ease}.tabworthy-times-picker__period-button--active{background-color:var(--tw-dates-hover-color);font-weight:600}.tabworthy-times-picker__period-button:disabled{cursor:not-allowed;opacity:.5}.tabworthy-times-picker__period-button:focus-visible{outline:var(--tw-dates-focus-outline-width) solid var(--tw-dates-focus-color)}.tabworthy-times-picker__period-button:hover:not(:disabled):not(.tabworthy-times-picker__period-button--tw-dates-active){background-color:var(--tw-dates-hover-color);opacity:.8}.tabworthy-times__picker-container .tabworthy-dates-calendar{border-bottom-right-radius:0;border-top-right-radius:0}@media(max-width: 768px){.tabworthy-times__picker-container{flex-direction:column}.tabworthy-times__picker-container .tabworthy-dates-calendar-wrapper{display:flex;flex-direction:column}.tabworthy-times__picker-container .tabworthy-dates-calendar-wrapper .tabworthy-dates-calendar{border-bottom-left-radius:0;border-top-right-radius:.375em}.tabworthy-times__picker-container .tabworthy-times__divider{display:block}.tabworthy-times__picker-container .tabworthy-times__time-section{border-bottom-left-radius:.375em;border-bottom-right-radius:.375em;border-top-left-radius:0;border-top-right-radius:0}.tabworthy-times__picker-container .tabworthy-times__time-section tabworthy-times-picker{padding:.75em !important}}:root{--tw-dates-text-color: #111;--tw-dates-secondary-color: #767676;--tw-dates-border-color: #949494;--tw-dates-bg-color: #fff;--tw-dates-disabled-color: #959595;--tw-dates-hover-color: #e5e7eb;--tw-dates-bg2-color: #f2f3f5;--tw-dates-focus-color: #0000ff;--tw-dates-error-color: #d4351c;--tw-dates-active-color: #0000ff;--tw-dates-placeholder-color: unset;--tw-dates-placeholder-opacity: 1;--tw-dates-focus-outline-width: 0.25em;--tw-dates-font-size: 1em;--tw-times-picker-label-font-size: 0.75em;--tw-times-picker-input-font-size: 1.25em;--tw-times-period-button-font-size: 0.875em;--tw-times-picker-separator-font-size: 1.5em}
|
|
@@ -50,6 +50,11 @@ export declare class TabworthyDates {
|
|
|
50
50
|
showQuickButtons: boolean;
|
|
51
51
|
disableFreeformInput: boolean;
|
|
52
52
|
inputClass: string;
|
|
53
|
+
/**
|
|
54
|
+
* Element to append the dropdown to. Use "body" to append to document.body,
|
|
55
|
+
* or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
56
|
+
*/
|
|
57
|
+
appendTo?: string | HTMLElement;
|
|
53
58
|
internalValue?: string | string[] | null;
|
|
54
59
|
errorState: boolean;
|
|
55
60
|
disabledState: boolean;
|
|
@@ -58,7 +63,7 @@ export declare class TabworthyDates {
|
|
|
58
63
|
componentReady: EventEmitter<void>;
|
|
59
64
|
private modalRef?;
|
|
60
65
|
private inputRef;
|
|
61
|
-
private
|
|
66
|
+
private inputContainerRef?;
|
|
62
67
|
private pickerRef?;
|
|
63
68
|
private chronoSupportedLocale;
|
|
64
69
|
private errorMessage;
|
|
@@ -1,18 +1,42 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
2
|
import "@a11y/focus-trap";
|
|
3
|
+
import { Placement } from "@popperjs/core";
|
|
3
4
|
/**
|
|
4
5
|
* @slot slot - The dialog content
|
|
5
6
|
*/
|
|
6
7
|
export declare class InclusiveDatesModal {
|
|
7
8
|
label: string;
|
|
8
9
|
inline?: boolean;
|
|
10
|
+
/** Preferred placement of the dropdown (Popper.js placement) */
|
|
11
|
+
placement: Placement;
|
|
12
|
+
/** Offset from the trigger element [skidding, distance] */
|
|
13
|
+
offset: [number, number];
|
|
14
|
+
/**
|
|
15
|
+
* Element to append the dropdown to. Use "body" to append to document.body,
|
|
16
|
+
* or pass a CSS selector or HTMLElement. When set, the dropdown will be
|
|
17
|
+
* portaled to escape overflow:hidden containers.
|
|
18
|
+
*/
|
|
19
|
+
appendTo?: string | HTMLElement;
|
|
9
20
|
closing: boolean;
|
|
10
21
|
showing: boolean;
|
|
22
|
+
positioned: boolean;
|
|
11
23
|
opened: EventEmitter;
|
|
12
24
|
closed: EventEmitter;
|
|
25
|
+
hostElement: HTMLElement;
|
|
13
26
|
private triggerElement;
|
|
14
27
|
private el;
|
|
28
|
+
private bodyRef;
|
|
29
|
+
private originalParent;
|
|
30
|
+
private originalNextSibling;
|
|
31
|
+
private isMovingPortal;
|
|
15
32
|
private undo;
|
|
33
|
+
private popperInstance;
|
|
34
|
+
watchShowing(newValue: boolean): void;
|
|
35
|
+
private getAppendToElement;
|
|
36
|
+
private setupPortal;
|
|
37
|
+
private cleanupPortal;
|
|
38
|
+
private createPopperInstance;
|
|
39
|
+
private destroyPopperInstance;
|
|
16
40
|
/**
|
|
17
41
|
* Open the dialog.
|
|
18
42
|
*/
|
|
@@ -21,8 +45,11 @@ export declare class InclusiveDatesModal {
|
|
|
21
45
|
* Close the dialog.
|
|
22
46
|
*/
|
|
23
47
|
close(): Promise<void>;
|
|
48
|
+
disconnectedCallback(): void;
|
|
24
49
|
getState(): Promise<boolean>;
|
|
25
50
|
setTriggerElement(element: HTMLElement): Promise<void>;
|
|
51
|
+
/** Force update the popper position */
|
|
52
|
+
updatePosition(): Promise<void>;
|
|
26
53
|
onKeyDown: (event: KeyboardEvent) => void;
|
|
27
54
|
handleClick(event: MouseEvent): void;
|
|
28
55
|
render(): any;
|
|
@@ -34,6 +34,11 @@ export declare class InclusiveTimes {
|
|
|
34
34
|
inputShouldFormat?: boolean | string;
|
|
35
35
|
disableFreeformInput: boolean;
|
|
36
36
|
inputClass: string;
|
|
37
|
+
/**
|
|
38
|
+
* Element to append the dropdown to. Use "body" to append to document.body,
|
|
39
|
+
* or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
40
|
+
*/
|
|
41
|
+
appendTo?: string | HTMLElement;
|
|
37
42
|
internalValue?: string | string[] | null;
|
|
38
43
|
selectedDate?: Date;
|
|
39
44
|
selectedHours: number;
|
|
@@ -45,7 +50,7 @@ export declare class InclusiveTimes {
|
|
|
45
50
|
componentReady: EventEmitter<void>;
|
|
46
51
|
private modalRef?;
|
|
47
52
|
private inputRef;
|
|
48
|
-
private
|
|
53
|
+
private inputContainerRef?;
|
|
49
54
|
private pickerRef?;
|
|
50
55
|
private errorMessage;
|
|
51
56
|
private shouldInputFormat;
|
|
@@ -9,16 +9,22 @@ import { DatesLabels } from "./components/tabworthy-dates/tabworthy-dates";
|
|
|
9
9
|
import { DatesCalendarLabels, YearChangedEventDetails } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
10
10
|
import { ChronoOptions, ChronoParsedDateString } from "../shared/utils/chrono-parser/chrono-parser.type";
|
|
11
11
|
import { DatesCalendarLabels as DatesCalendarLabels1, MonthChangedEventDetails, YearChangedEventDetails as YearChangedEventDetails1 } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
12
|
+
import { Placement } from "@popperjs/core";
|
|
12
13
|
import { TimesLabels } from "./components/tabworthy-times/tabworthy-times";
|
|
13
14
|
import { InclusivekTimesPickerLabels, TimeValue } from "./components/tabworthy-times-picker/tabworthy-times-picker";
|
|
14
15
|
export { DatesLabels } from "./components/tabworthy-dates/tabworthy-dates";
|
|
15
16
|
export { DatesCalendarLabels, YearChangedEventDetails } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
16
17
|
export { ChronoOptions, ChronoParsedDateString } from "../shared/utils/chrono-parser/chrono-parser.type";
|
|
17
18
|
export { DatesCalendarLabels as DatesCalendarLabels1, MonthChangedEventDetails, YearChangedEventDetails as YearChangedEventDetails1 } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
19
|
+
export { Placement } from "@popperjs/core";
|
|
18
20
|
export { TimesLabels } from "./components/tabworthy-times/tabworthy-times";
|
|
19
21
|
export { InclusivekTimesPickerLabels, TimeValue } from "./components/tabworthy-times-picker/tabworthy-times-picker";
|
|
20
22
|
export namespace Components {
|
|
21
23
|
interface TabworthyDates {
|
|
24
|
+
/**
|
|
25
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
26
|
+
*/
|
|
27
|
+
"appendTo"?: string | HTMLElement;
|
|
22
28
|
"calendarButtonContent"?: string;
|
|
23
29
|
"datesCalendarLabels"?: DatesCalendarLabels;
|
|
24
30
|
/**
|
|
@@ -207,6 +213,10 @@ export namespace Components {
|
|
|
207
213
|
"value"?: Date | Date[] | null;
|
|
208
214
|
}
|
|
209
215
|
interface TabworthyDatesModal {
|
|
216
|
+
/**
|
|
217
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. When set, the dropdown will be portaled to escape overflow:hidden containers.
|
|
218
|
+
*/
|
|
219
|
+
"appendTo"?: string | HTMLElement;
|
|
210
220
|
/**
|
|
211
221
|
* Close the dialog.
|
|
212
222
|
*/
|
|
@@ -217,13 +227,31 @@ export namespace Components {
|
|
|
217
227
|
*/
|
|
218
228
|
"inline"?: boolean;
|
|
219
229
|
"label": string;
|
|
230
|
+
/**
|
|
231
|
+
* Offset from the trigger element [skidding, distance]
|
|
232
|
+
* @default [0, 8]
|
|
233
|
+
*/
|
|
234
|
+
"offset": [number, number];
|
|
220
235
|
/**
|
|
221
236
|
* Open the dialog.
|
|
222
237
|
*/
|
|
223
238
|
"open": () => Promise<void>;
|
|
239
|
+
/**
|
|
240
|
+
* Preferred placement of the dropdown (Popper.js placement)
|
|
241
|
+
* @default "bottom-start"
|
|
242
|
+
*/
|
|
243
|
+
"placement": Placement;
|
|
224
244
|
"setTriggerElement": (element: HTMLElement) => Promise<void>;
|
|
245
|
+
/**
|
|
246
|
+
* Force update the popper position
|
|
247
|
+
*/
|
|
248
|
+
"updatePosition": () => Promise<void>;
|
|
225
249
|
}
|
|
226
250
|
interface TabworthyTimes {
|
|
251
|
+
/**
|
|
252
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
253
|
+
*/
|
|
254
|
+
"appendTo"?: string | HTMLElement;
|
|
227
255
|
"calendarButtonContent"?: string;
|
|
228
256
|
"clearValue": () => Promise<void>;
|
|
229
257
|
"datesCalendarLabels"?: DatesCalendarLabels;
|
|
@@ -477,6 +505,10 @@ declare namespace LocalJSX {
|
|
|
477
505
|
type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}` | `prop:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K | `prop:${K}`]?: never } | { [P in `prop:${K}`]: PropT } & { [P in K | `attr:${K}`]?: never };
|
|
478
506
|
|
|
479
507
|
interface TabworthyDates {
|
|
508
|
+
/**
|
|
509
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
510
|
+
*/
|
|
511
|
+
"appendTo"?: string | HTMLElement;
|
|
480
512
|
"calendarButtonContent"?: string;
|
|
481
513
|
"datesCalendarLabels"?: DatesCalendarLabels;
|
|
482
514
|
/**
|
|
@@ -670,15 +702,33 @@ declare namespace LocalJSX {
|
|
|
670
702
|
"value"?: Date | Date[] | null;
|
|
671
703
|
}
|
|
672
704
|
interface TabworthyDatesModal {
|
|
705
|
+
/**
|
|
706
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. When set, the dropdown will be portaled to escape overflow:hidden containers.
|
|
707
|
+
*/
|
|
708
|
+
"appendTo"?: string | HTMLElement;
|
|
673
709
|
/**
|
|
674
710
|
* @default false
|
|
675
711
|
*/
|
|
676
712
|
"inline"?: boolean;
|
|
677
713
|
"label": string;
|
|
714
|
+
/**
|
|
715
|
+
* Offset from the trigger element [skidding, distance]
|
|
716
|
+
* @default [0, 8]
|
|
717
|
+
*/
|
|
718
|
+
"offset"?: [number, number];
|
|
678
719
|
"onClosed"?: (event: TabworthyDatesModalCustomEvent<any>) => void;
|
|
679
720
|
"onOpened"?: (event: TabworthyDatesModalCustomEvent<any>) => void;
|
|
721
|
+
/**
|
|
722
|
+
* Preferred placement of the dropdown (Popper.js placement)
|
|
723
|
+
* @default "bottom-start"
|
|
724
|
+
*/
|
|
725
|
+
"placement"?: Placement;
|
|
680
726
|
}
|
|
681
727
|
interface TabworthyTimes {
|
|
728
|
+
/**
|
|
729
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
730
|
+
*/
|
|
731
|
+
"appendTo"?: string | HTMLElement;
|
|
682
732
|
"calendarButtonContent"?: string;
|
|
683
733
|
"datesCalendarLabels"?: DatesCalendarLabels;
|
|
684
734
|
/**
|
|
@@ -841,6 +891,7 @@ declare namespace LocalJSX {
|
|
|
841
891
|
"showQuickButtons": boolean;
|
|
842
892
|
"disableFreeformInput": boolean;
|
|
843
893
|
"inputClass": string;
|
|
894
|
+
"appendTo": string | HTMLElement;
|
|
844
895
|
}
|
|
845
896
|
interface TabworthyDatesCalendarAttributes {
|
|
846
897
|
"clearButtonContent": string;
|
|
@@ -869,6 +920,8 @@ declare namespace LocalJSX {
|
|
|
869
920
|
interface TabworthyDatesModalAttributes {
|
|
870
921
|
"label": string;
|
|
871
922
|
"inline": boolean;
|
|
923
|
+
"placement": Placement;
|
|
924
|
+
"appendTo": string | HTMLElement;
|
|
872
925
|
}
|
|
873
926
|
interface TabworthyTimesAttributes {
|
|
874
927
|
"id": string;
|
|
@@ -896,6 +949,7 @@ declare namespace LocalJSX {
|
|
|
896
949
|
"inputShouldFormat": string;
|
|
897
950
|
"disableFreeformInput": boolean;
|
|
898
951
|
"inputClass": string;
|
|
952
|
+
"appendTo": string | HTMLElement;
|
|
899
953
|
}
|
|
900
954
|
interface TabworthyTimesPickerAttributes {
|
|
901
955
|
"hours": number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tabworthy/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Small, accessible datepicker and datetimepicker Web Components with natural language date input.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@a11y/focus-trap": "^1.0.5",
|
|
69
|
+
"@popperjs/core": "^2.11.8",
|
|
69
70
|
"@react-aria/live-announcer": "^3.1.2",
|
|
70
71
|
"aria-hidden": "^1.2.2",
|
|
71
72
|
"chrono-node": "^2.5.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as e,c as i,h as n,d as s,t as a}from"./p-Kr35QPhi.js";function o(t,e,i,n=20,s=0){let a=[];if(s>=n)return a;const r=t=>{const a=t.assignedNodes().filter((t=>1===t.nodeType));return a.length>0?o(a[0].parentElement,e,i,n,s+1):[]},h=Array.from(t.children||[]);for(const t of h)e(t)||(i(t)&&a.push(t),null!=t.shadowRoot?a.push(...o(t.shadowRoot,e,i,n,s+1)):"SLOT"===t.tagName?a.push(...r(t)):a.push(...o(t,e,i,n,s+1)));return a}function r(t){return t.hasAttribute("hidden")||t.hasAttribute("aria-hidden")&&"false"!==t.getAttribute("aria-hidden")||"none"===t.style.display||"0"===t.style.opacity||"hidden"===t.style.visibility||"collapse"===t.style.visibility}function h(t){return"-1"!==t.getAttribute("tabindex")&&!r(t)&&!function(t){return t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")}(t)&&(t.hasAttribute("tabindex")||(t instanceof HTMLAnchorElement||t instanceof HTMLAreaElement)&&t.hasAttribute("href")||t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLIFrameElement)}const c=new Map,d=document.createElement("template");d.innerHTML='\n\t<div id="start"></div>\n\t<div id="backup"></div>\n\t<slot></slot>\n\t<div id="end"></div>\n';class u extends HTMLElement{constructor(){super(),this.debounceId=Math.random().toString(),this._focused=!1;const t=this.attachShadow({mode:"open"});t.appendChild(d.content.cloneNode(!0)),this.$backup=t.querySelector("#backup"),this.$start=t.querySelector("#start"),this.$end=t.querySelector("#end"),this.focusLastElement=this.focusLastElement.bind(this),this.focusFirstElement=this.focusFirstElement.bind(this),this.onFocusIn=this.onFocusIn.bind(this),this.onFocusOut=this.onFocusOut.bind(this)}static get observedAttributes(){return["inactive"]}get inactive(){return this.hasAttribute("inactive")}set inactive(t){t?this.setAttribute("inactive",""):this.removeAttribute("inactive")}get focused(){return this._focused}connectedCallback(){this.$start.addEventListener("focus",this.focusLastElement),this.$end.addEventListener("focus",this.focusFirstElement),this.addEventListener("focusin",this.onFocusIn),this.addEventListener("focusout",this.onFocusOut),this.render()}disconnectedCallback(){this.$start.removeEventListener("focus",this.focusLastElement),this.$end.removeEventListener("focus",this.focusFirstElement),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut)}attributeChangedCallback(){this.render()}focusFirstElement(){this.trapFocus()}focusLastElement(){this.trapFocus(!0)}getFocusableElements(){return o(this,r,h)}trapFocus(t){if(this.inactive)return;let e=this.getFocusableElements();e.length>0?(t?e[e.length-1].focus():e[0].focus(),this.$backup.setAttribute("tabindex","-1")):(this.$backup.setAttribute("tabindex","0"),this.$backup.focus())}onFocusIn(){this.updateFocused(!0)}onFocusOut(){this.updateFocused(!1)}updateFocused(t){!function(t,e,i){const n=c.get(i);null!=n&&window.clearTimeout(n),c.set(i,window.setTimeout((()=>{t(),c.delete(i)}),0))}((()=>{this.focused!==t&&(this._focused=t,this.render())}),0,this.debounceId)}render(){this.$start.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.$end.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.focused?this.setAttribute("focused",""):this.removeAttribute("focused")}}window.customElements.define("focus-trap",u);var f=new WeakMap,l=new WeakMap,b={},p=0,m=function(t){return t&&(t.host||m(t.parentNode))},v=function(t,e,i){void 0===i&&(i="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=function(t){return"undefined"==typeof document?null:(Array.isArray(t)?t[0]:t).ownerDocument.body}(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),function(t,e,i,n){var s=function(t,e){return e.map((function(e){if(t.contains(e))return e;var i=m(e);return i&&t.contains(i)?i:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)})).filter((function(t){return Boolean(t)}))}(e,Array.isArray(t)?t:[t]);b[i]||(b[i]=new WeakMap);var a=b[i],o=[],r=new Set,h=new Set(s),c=function(t){t&&!r.has(t)&&(r.add(t),c(t.parentNode))};s.forEach(c);var d=function(t){t&&!h.has(t)&&Array.prototype.forEach.call(t.children,(function(t){if(r.has(t))d(t);else{var e=t.getAttribute(n),s=null!==e&&"false"!==e,h=(f.get(t)||0)+1,c=(a.get(t)||0)+1;f.set(t,h),a.set(t,c),o.push(t),1===h&&s&&l.set(t,!0),1===c&&t.setAttribute(i,"true"),s||t.setAttribute(n,"true")}}))};return d(e),r.clear(),p++,function(){o.forEach((function(t){var e=f.get(t)-1,s=a.get(t)-1;f.set(t,e),a.set(t,s),e||(l.has(t)||t.removeAttribute(n),l.delete(t)),s||t.removeAttribute(i)})),--p||(f=new WeakMap,f=new WeakMap,l=new WeakMap,b={})}}(n,s,i,"aria-hidden")):function(){return null}};const y=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.opened=i(this,"opened",7),this.closed=i(this,"closed",7),this.inline=!1,this.closing=!1,this.showing=this.inline||!1,this.onKeyDown=t=>{"Escape"===t.code&&this.close()}}async open(){this.inline||(this.showing=!0,this.undo=v(this.el),this.opened.emit(void 0))}async close(){this.inline||(this.showing=!1,this.closed.emit(void 0),this.undo(),this.triggerElement&&this.triggerElement.focus())}async getState(){return this.showing}async setTriggerElement(t){this.triggerElement=t}handleClick(t){this.showing&&!this.el.contains(t.target)&&this.close()}render(){return n(s,{key:"e5e440df97f5b2f51f742892ca591aff3a3e51a9",showing:this.showing,ref:t=>t&&(this.el=t)},!this.inline&&this.showing&&n("div",{key:"f3b5f92b0f3b8eb54f665a14fcaa1616d59b182b",part:"body",onKeyDown:this.onKeyDown,role:"dialog",tabindex:-1,"aria-hidden":!this.showing,"aria-label":this.label,"aria-modal":this.showing},n("focus-trap",{key:"f94c02a8db391d671adc08ac1742dc6fabca72d3"},n("div",{key:"888259505b6a2416674523d6a6924272b676daad",part:"content"},n("slot",{key:"e4e141ecae238f68fdde53baca66f478ebb93f88"})))),this.inline&&n("div",{key:"f2e7fb2614274d5dc7d03f10a0ee760363438435",part:"content"},n("slot",{key:"f845ef9c46b146ac916c90bb2fcec1f357aee5ee"})))}static get style(){return":host::part(body){position:absolute;width:-moz-fit-content;width:fit-content;z-index:1200;margin-top:0.5rem}:host::part(backdrop){}:host::part(content){}"}},[257,"tabworthy-dates-modal",{label:[1],inline:[4],closing:[32],showing:[32],open:[64],close:[64],getState:[64],setTriggerElement:[64]},[[10,"click","handleClick"]]]);function w(){"undefined"!=typeof customElements&&["tabworthy-dates-modal"].forEach((t=>{"tabworthy-dates-modal"===t&&(customElements.get(a(t))||customElements.define(a(t),y))}))}export{y as I,w as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t,n=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.l.has(e)?n.l.get(e):o}}))},e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>n in t,l=(t,n)=>(0,console.error)(t,n),s=new Map,i="undefined"!=typeof window?window:{},r=i.HTMLElement||class{},c={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},f=(()=>{var t;let n=!1;try{null==(t=i.document)||t.addEventListener("e",null,Object.defineProperty({},"passive",{get(){n=!0}}))}catch(t){}return n})(),u=(()=>{try{return!!i.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!u&&(()=>!!i.document&&Object.getOwnPropertyDescriptor(i.document.adoptedStyleSheets,"length").writable)(),d=!1,p=[],h=[],v=(t,n)=>e=>{t.push(e),d||(d=!0,n&&4&c.i?y(m):c.raf(m))},b=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){l(t)}t.length=0},m=()=>{b(p),b(h),(d=p.length>0)&&c.raf(m)},y=t=>Promise.resolve(undefined).then(t),$=v(h,!0),g=t=>{const n=new URL(t,c.u);return n.origin!==i.location.origin?n.href:n.pathname},w=t=>c.u=t;function j(){const n=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(a?n.adoptedStyleSheets.push(t):n.adoptedStyleSheets=[...n.adoptedStyleSheets,t])}var O=t=>{const n=M(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&S(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!N(t,E(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&M(t,"childNodes").length&&O(t)}};function S(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||E(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...S(o.childNodes,n,e)]}return s}var N=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)E(l)!==n||!e&&l["s-sr"]||o.push(l);return o},k=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,E=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function M(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var _,A,C,x=new WeakMap,R=t=>"sc-"+t.p,F=t=>"object"==(t=typeof t)||"function"===t,L=(t,n,...e)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],f=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!F(o))&&(o=String(o)),i&&r?c[c.length-1].h+=o:c.push(i?D(null,o):o),r=i)};if(f(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,c,T);const u=D(t,null);return u.v=n,c.length>0&&(u.m=c),u.$=l,u.j=s,u},D=(t,n)=>({i:0,O:t,h:null!=n?n:null,S:null,m:null,v:null,$:null,j:null}),P={},T={forEach:(t,n)=>t.map(U).forEach(n),map:(t,n)=>t.map(U).map(n).map(W)},U=t=>({vattrs:t.v,vchildren:t.m,vkey:t.$,vname:t.j,vtag:t.O,vtext:t.h}),W=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),L(t.vtag,n,...t.vchildren||[])}const n=D(t.vtag,t.vtext);return n.v=t.vattrs,n.m=t.vchildren,n.$=t.vkey,n.j=t.vname,n},B=(t,n)=>null==t||F(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?String(t):t,H=(t,n,e)=>{const o=t;return{emit:t=>V(o,n,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:t})}},V=(t,n,e)=>{const o=c.ce(n,e);return t.dispatchEvent(o),o},q=(t,n,l,s,r,f)=>{if(l===s)return;let u=o(t,n),a=n.toLowerCase();if("class"===n){const n=t.classList,e=Y(l);let o=Y(s);n.remove(...e.filter((t=>t&&!o.includes(t)))),n.add(...o.filter((t=>t&&!e.includes(t))))}else if("key"===n);else if("ref"===n)s&&ht(s,t);else if(t.__lookupSetter__(n)||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const o=n.slice(5);let l;{const n=e(t);if(n&&n.o&&n.o.t){const t=n.o.t[o];t&&t[1]&&(l=t[1])}}return l||(l=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=s}catch(t){}return}{const e=F(s);if((u||e&&null!==s)&&!r)try{if(t.tagName.includes("-"))t[n]!==s&&(t[n]=s);else{const e=null==s?"":s;"list"===n?u=!1:null!=l&&t[n]===e||("function"==typeof t.__lookupSetter__(n)?t[n]=e:t.setAttribute(n,e))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(n)||t.removeAttribute(n):(!u||4&f||r)&&!e&&1===t.nodeType&&t.setAttribute(n,s=!0===s?"":s)}}else if(n="-"===n[2]?n.slice(3):o(i,a)?a.slice(2):a[2]+n.slice(3),l||s){const e=n.endsWith(I);n=n.replace(Z,""),l&&c.rel(t,n,l,e),s&&c.ael(t,n,s,e)}},z=/\s/,Y=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(z):[]),I="Capture",Z=new RegExp(I+"$"),G=(t,n,e)=>{const o=11===n.S.nodeType&&n.S.host?n.S.host:n.S,l=t&&t.v||{},s=n.v||{};for(const t of J(Object.keys(l)))t in s||q(o,t,l[t],void 0,e,n.i);for(const t of J(Object.keys(s)))q(o,t,l[t],s[t],e,n.i)};function J(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var K=!1,Q=!1,X=!1,tt=!1,nt=[],et=[],ot=(t,n,e)=>{var o;const l=n.m[e];let s,r,c,f=0;if(K||(X=!0,"slot"===l.O&&(l.i|=l.m?2:1)),null!=l.h)s=l.S=i.document.createTextNode(l.h);else if(1&l.i)s=l.S=i.document.createTextNode(""),G(null,l,tt);else{if(tt||(tt="svg"===l.O),!i.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.S=i.document.createElementNS(tt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!K&&2&l.i?"slot-fb":l.O),tt&&"foreignObject"===l.O&&(tt=!1),G(null,l,tt),null!=(u=_)&&void 0!==u&&s["s-si"]!==_&&s.classList.add(s["s-si"]=_),l.m){const n="template"===l.O?s.content:s;for(f=0;f<l.m.length;++f)r=ot(t,l,f),r&&n.appendChild(r)}"svg"===l.O?tt=!1:"foreignObject"===s.tagName&&(tt=!0)}var u;return s["s-hn"]=C,3&l.i&&(s["s-sr"]=!0,s["s-cr"]=A,s["s-sn"]=l.j||"",s["s-rf"]=null==(o=l.v)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===E(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(s),c=t&&t.m&&t.m[e],c&&c.O===l.O&&t.S&<(t.S),bt(A,s,n.S,null==t?void 0:t.S)),s},lt=t=>{c.i|=1;const n=t.closest(C.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(vt(n,t,null!=e?e:null),t["s-sh"]=void 0,X=!0)}c.i&=-2},st=(t,n)=>{c.i|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===C&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==C&&o["s-ol"]&&(vt(ft(o).parentNode,o,ft(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,X=!0),n&&st(o,n)}c.i&=-2},it=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot),"template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=ot(null,e,l),i&&(o[l].S=i,vt(r,i,ft(n))))},rt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.S;pt(n),t&&(Q=!0,t["s-ol"]?t["s-ol"].remove():st(t,!0),t.remove())}}},ct=(t,n,e=!1)=>t.O===n.O&&("slot"===t.O?t.j===n.j:e?(e&&!t.$&&n.$&&(t.$=n.$),!0):t.$===n.$),ft=t=>t&&t["s-ol"]||t,ut=(t,n,e=!1)=>{const o=n.S=t.S,l=t.m,s=n.m,i=n.O,r=n.h;let c;null==r?(tt="svg"===i||"foreignObject"!==i&&tt,"slot"!==i||K||t.j!==n.j&&(n.S["s-sn"]=n.j||"",lt(n.S.parentElement)),G(t,n,tt),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=n.length-1,d=n[0],p=n[a],h=o.length-1,v=o[0],b=o[h];const m="template"===e.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==v)v=o[++c];else if(null==b)b=o[--h];else if(ct(d,v,l))ut(d,v,l),d=n[++r],v=o[++c];else if(ct(p,b,l))ut(p,b,l),p=n[--a],b=o[--h];else if(ct(d,b,l))"slot"!==d.O&&"slot"!==b.O||st(d.S.parentNode,!1),ut(d,b,l),vt(m,d.S,p.S.nextSibling),d=n[++r],b=o[--h];else if(ct(p,v,l))"slot"!==d.O&&"slot"!==b.O||st(p.S.parentNode,!1),ut(p,v,l),vt(m,p.S,d.S),p=n[--a],v=o[++c];else{for(f=-1,u=r;u<=a;++u)if(n[u]&&null!==n[u].$&&n[u].$===v.$){f=u;break}f>=0?(i=n[f],i.O!==v.O?s=ot(n&&n[c],e,f):(ut(i,v,l),n[f]=void 0,s=i.S),v=o[++c]):(s=ot(n&&n[c],e,c),v=o[++c]),s&&vt(ft(d.S).parentNode,s,ft(d.S))}r>a?it(t,null==o[h+1]?null:o[h+1].S,e,o,c,h):c>h&&rt(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.h&&(o.textContent=""),it(o,null,n,s,0,s.length-1)):!e&&null!==l&&rt(l,0,l.length-1),tt&&"svg"===i&&(tt=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:t.h!==r&&(o.data=r)},at=[],dt=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(k(n,l)){let e=at.find((t=>t.N===n));Q=!0,n["s-sn"]=n["s-sn"]||l,e?(e.N["s-sh"]=t["s-hn"],e.k=t):(n["s-sh"]=t["s-hn"],at.push({k:t,N:n})),n["s-sr"]&&at.map((t=>{k(t.N,n["s-sn"])&&(e=at.find((t=>t.N===n)),e&&!t.k&&(t.k=e.k))}))}else at.some((t=>t.N===n))||at.push({N:n})}1===t.nodeType&&dt(t)}},pt=t=>{t.v&&t.v.ref&&nt.push((()=>t.v.ref(null))),t.m&&t.m.map(pt)},ht=(t,n)=>{et.push((()=>t(n)))},vt=(t,n,e,o)=>{if("string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])bt(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=E(t)||"";return{slotNode:S(M(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&l.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)};function bt(t,n,e,o){var l,s;let i;if(t&&"string"==typeof n["s-sn"]&&n["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=n["s-si"]||t.parentNode["s-sc"])){const t=n["s-sn"],r=n["s-hn"];if(null==(l=e.classList)||l.add(i+"-s"),o&&(null==(s=o.classList)?void 0:s.contains(i+"-s"))){let n=(o.__childNodes||o.childNodes)[0],e=!1;for(;n;){if(n["s-sn"]!==t&&n["s-hn"]===r&&n["s-sr"]){e=!0;break}n=n.nextSibling}e||o.classList.remove(i+"-s")}}}var mt=(t,n,e=!1)=>{var o,l,s,r,f;const u=t.$hostElement$,a=t.o,d=t.M||D(null,null);var p;const h=(p=n)&&p.O===P?n:L(null,null,n);if(C=u.tagName,a._&&(h.v=h.v||{},a._.forEach((([t,n])=>{h.v[n]=u[t]}))),e&&h.v)for(const t of Object.keys(h.v))u.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(h.v[t]=u[t]);if(h.O=null,h.i|=4,t.M=h,h.S=d.S=u.shadowRoot||u,_=u["s-sc"],K=!(!(1&a.i)||128&a.i),A=u["s-cr"],Q=!1,ut(d,h,e),c.i|=1,X){dt(h.S);for(const t of at){const n=t.N;if(!n["s-ol"]&&i.document){const t=i.document.createTextNode("");t["s-nr"]=n,vt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of at){const n=t.N,c=t.k;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),c){const t=c.parentNode;let o=c.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(vt(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=i.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,vt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(r=n["s-ih"])&&r)}n&&"function"==typeof c["s-rf"]&&c["s-rf"](c)}else 1===n.nodeType&&(n.hidden=!0)}}if(Q&&O(h.S),c.i&=-2,at.length=0,!K&&!(1&a.i)&&u["s-cr"]){const t=h.S.__childNodes||h.S.childNodes;for(const n of t)if(n["s-hn"]!==C&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(f=n.hidden)&&f),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=i.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],vt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}A=void 0,nt.forEach((t=>t())),nt.length=0,et.forEach((t=>t())),et.length=0},yt=(t,n)=>{if(n&&!t.A&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.A=()=>{n["s-p"].splice(e-1,1),o()})))}},$t=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);yt(t,t.C);const e=()=>gt(t,n);if(!n)return $(e);queueMicrotask((()=>{e()}))},gt=(t,n)=>{const e=t.$hostElement$,o=e;if(!o)throw new Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=Et(o,n?"componentWillLoad":"componentWillUpdate",void 0,e),l=wt(l,(()=>Et(o,"componentWillRender",void 0,e))),wt(l,(()=>Ot(t,o,n)))},wt=(t,n)=>jt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),jt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ot=async(t,n,e)=>{var o;const l=t.$hostElement$,r=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.i,l=((t,n)=>{var e,o,l;const r=R(n),f=s.get(r);if(!i.document)return r;if(t=11===t.nodeType?t:i.document,f)if("string"==typeof f){let l,s=x.get(t=t.head||t);if(s||x.set(t,s=new Set),!s.has(r)){l=i.document.createElement("style"),l.textContent=f;const d=null!=(e=c.R)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=i.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=d&&l.setAttribute("nonce",d),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(u){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(f),a?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=f+n.textContent:t.prepend(l)}else t.append(l);1&n.i&&t.insertBefore(l,null),4&n.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(r)}}else{let n=x.get(t);if(n||x.set(t,n=new Set),!n.has(r)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(f.constructor===e.CSSStyleSheet)o=f;else{o=new e.CSSStyleSheet;for(let t=0;t<f.cssRules.length;t++)o.insertRule(f.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(r)}}return r})(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);St(t,n,l,e),r&&(r.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>Nt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.i|=4,n.length=0)}},St=(t,n,e,o)=>{try{n=n.render(),t.i&=-17,t.i|=2,mt(t,n,o)}catch(n){l(n,t.$hostElement$)}return null},Nt=t=>{const n=t.$hostElement$,e=n,o=t.C;Et(e,"componentDidRender",void 0,n),64&t.i?Et(e,"componentDidUpdate",void 0,n):(t.i|=64,Mt(n),Et(e,"componentDidLoad",void 0,n),t.F(n),o||kt()),t.A&&(t.A(),t.A=void 0),512&t.i&&y((()=>$t(t,!1))),t.i&=-517},kt=()=>{y((()=>V(i,"appload",{detail:{namespace:"tabworthy-components"}})))},Et=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){l(t,o)}},Mt=t=>t.classList.add("hydrated"),_t=(t,n,o,s)=>{const i=e(t);if(!i)return;const r=t,c=i.l.get(n),f=i.i,u=r;o=B(o,s.t[n][0]);const a=Number.isNaN(c)&&Number.isNaN(o);if(o!==c&&!a){if(i.l.set(n,o),s.L){const t=s.L[n];t&&t.map((t=>{try{const[[e,l]]=Object.entries(t);(128&f||1&l)&&(u?u[e](o,c,n):i.D.push((()=>{i.P[e](o,c,n)})))}catch(t){l(t,r)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(o,c,n)&&!(16&f))return;16&f||$t(i,!1)}}},At=(t,n)=>{var o,l;const s=t.prototype;{t.watchers&&!n.L&&(n.L=t.watchers),t.deserializers&&!n.T&&(n.T=t.deserializers),t.serializers&&!n.U&&(n.U=t.serializers);const i=Object.entries(null!=(o=n.t)?o:{});i.map((([t,[o]])=>{if(31&o||32&o){const{get:l,set:i}=Object.getOwnPropertyDescriptor(s,t)||{};l&&(n.t[t][0]|=2048),i&&(n.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return l?l.apply(this):(n=t,e(this).l.get(n));var n},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(l){const s=e(this);if(s){if(i)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),i.apply(this,[B(l,o)]),void _t(this,t,l=32&o?this[t]:s.$hostElement$[t],n);_t(this,t,l,n)}}})}}));{const o=new Map;s.attributeChangedCallback=function(t,l,r){c.jmp((()=>{var c;const f=o.get(t),u=e(this);if(this.hasOwnProperty(f),s.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==r)return;if(null==f){const e=null==u?void 0:u.i;if(u&&e&&!(8&e)&&r!==l){const o=this,s=null==(c=n.L)?void 0:c[t];null==s||s.forEach((n=>{const[[s,i]]=Object.entries(n);null!=o[s]&&(128&e||1&i)&&o[s].call(o,r,l,t)}))}return}const a=i.find((([t])=>t===f));a&&4&a[1][0]&&(r=null!==r&&"false"!==r);const d=Object.getOwnPropertyDescriptor(s,f);r==this[f]||d.get&&!d.set||(this[f]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.L)?l:{}),...i.filter((([t,n])=>31&n[0])).map((([t,e])=>{var l;const s=e[1]||t;return o.set(s,t),512&e[0]&&(null==(l=n._)||l.push([t,s])),s}))]))}}return t},Ct=(t,o)=>{const r={i:o[0],p:o[1]};try{r.t=o[2],r.W=o[3],r.L=t.L,r.T=t.T,r.U=t.U,r._=[];const f=t.prototype.connectedCallback,a=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const o={i:0,$hostElement$:t,o:e,l:new Map,B:new Map};o.H=new Promise((t=>o.F=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&e.i&&n(t,o)})(this,r)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=e(this);if(!t)return;xt(this,t,r.W),this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.i)){const n=e(t);if(!n)return;const o=n.o,r=()=>{};if(1&n.i)xt(t,n,o.W),(null==n?void 0:n.P)||(null==n?void 0:n.H)&&n.H.then((()=>{}));else{n.i|=1,12&o.i&&(t=>{if(!i.document)return;const n=t["s-cr"]=i.document.createComment("");n["s-cn"]=!0,vt(t,n,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){yt(n,n.C=e);break}}o.t&&Object.entries(o.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.i)&&(n.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const n=R(e);if(!s.has(n)){const o=()=>{};((t,n,e)=>{let o=s.get(t);u&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,s.set(t,o)})(n,t,!!(1&e.i)),o()}}const l=n.C,i=()=>$t(n,!0);l&&l["s-rc"]?l["s-rc"].push(i):i()}catch(e){l(e,t),n.A&&(n.A(),n.A=void 0),n.F&&n.F(t)}})(t,n,o)}r()}})(this),f&&f.call(this)},disconnectedCallback(){(async t=>{if(!(1&c.i)){const n=e(t);(null==n?void 0:n.V)&&(n.V.map((t=>t())),n.V=void 0)}x.has(t)&&x.delete(t),t.shadowRoot&&x.has(t.shadowRoot)&&x.delete(t.shadowRoot)})(this),a&&a.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${r.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(this,r)}}),Object.defineProperty(t,"is",{value:r.p,configurable:!0}),At(t,r)}catch(n){return l(n),t}},xt=(t,n,e)=>{e&&i.document&&e.map((([e,o,l])=>{const s=Ft(i.document,t,e),r=Rt(n,l),f=Lt(e);c.ael(s,o,r,f),(n.V=n.V||[]).push((()=>c.rel(s,o,r,f)))}))},Rt=(t,n)=>e=>{try{t.$hostElement$[n](e)}catch(n){l(n,t.$hostElement$)}},Ft=(t,n,e)=>8&e?i:n,Lt=t=>f?{passive:!!(1&t),capture:!!(2&t)}:!!(2&t),Dt=t=>c.R=t,Pt=t=>Object.assign(c,t);function Tt(t,n){mt({o:{i:0,p:n.tagName},$hostElement$:n},t)}function Ut(t){return t}export{r as H,Dt as a,Pt as b,H as c,P as d,g,L as h,Ct as p,Tt as r,w as s,Ut as t}
|