@ionic/core 8.8.6-nightly.20260430 → 8.8.6-nightly.20260504
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/components/ion-datetime.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +30 -14
- package/dist/collection/components/datetime/datetime.js +30 -14
- package/dist/docs.json +1 -1
- package/dist/esm/ion-datetime_3.entry.js +30 -14
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-1ca9c36b.entry.js +4 -0
- package/dist/types/components/datetime/datetime.d.ts +7 -0
- package/hydrate/index.js +30 -14
- package/hydrate/index.mjs +30 -14
- package/package.json +1 -1
- package/dist/ionic/p-4c67ce4c.entry.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{j as e,f as t,p as a,H as i,e as n,w as o,h as r,d as s,t as d}from"./p-BJoMtgfR.js";import{startFocusVisible as l}from"./p-BmVRXR1y.js";import{r as h,g as c,e as p}from"./p-DgbT0exM.js";import{F as m}from"./p-Cq8cQ0NL.js";import{i as u}from"./p-C53feagD.js";import{c as b}from"./p-DiVJyqlX.js";import{c as y,f as g,g as f,h as x,a as v}from"./p-CO7fmmxt.js";import{b as w}from"./p-CDfQnFrd.js";import{i as k,a as j,g as C,b as O,c as P,d as D,e as z,v as V,f as T,h as $,j as E,k as A,l as S,m as B,n as W,o as R,p as I,q as M,r as F,s as L,w as H,t as q,u as Y,x as G,y as J,z as N,A as K,B as Q,C as U,D as X,E as Z,F as _,G as ee,H as te,I as ae,J as ie,K as ne,L as oe,M as re,N as se,O as de,P as le,Q as he,R as ce}from"./p-BS1TtEiJ.js";import{d as pe}from"./p-CoA-aqGF.js";import{d as me}from"./p-BTeL5HCK.js";import{d as ue}from"./p-B8b1Ukl9.js";import{d as be}from"./p-YLXPWgVj.js";import{d as ye}from"./p-B6HaBl3o.js";import{d as ge}from"./p-FBcnjE5W.js";import{d as fe}from"./p-BxwWvu-b.js";import{d as xe}from"./p-DHsZWn1l.js";import{d as ve}from"./p-fpbh6w3f.js";const we=(e,t,a,i)=>null===e.day||void 0!==i&&!i.includes(e.day)||!(!t||!k(e,t))||!(!a||!j(e,a)),ke=(e,t,a,i,n,o,r)=>{const s=void 0!==(Array.isArray(a)?a:[a]).find((e=>P(t,e))),d=P(t,i);return{disabled:we(t,n,o,r),isActive:s,isToday:d,ariaSelected:s?"true":null,ariaLabel:z(e,d,t),text:null!=t.day?D(e,t):null}},je=(e,{minParts:t,maxParts:a})=>!!((e,t,a)=>!!(t&&t.year>e)||!!(a&&a.year<e))(e.year,t,a)||!!(t&&k(e,t)||a&&j(e,a)),Ce=(e,a)=>{var i,n,o,r;((null===(i=null==a?void 0:a.date)||void 0===i?void 0:i.timeZone)||(null===(n=null==a?void 0:a.date)||void 0===n?void 0:n.timeZoneName)||(null===(o=null==a?void 0:a.time)||void 0===o?void 0:o.timeZone)||(null===(r=null==a?void 0:a.time)||void 0===r?void 0:r.timeZoneName))&&t('[ion-datetime] - "timeZone" and "timeZoneName" are not supported in "formatOptions".',e)},Oe=(e,a,i)=>{if(i)switch(a){case"date":case"month-year":case"month":case"year":void 0===i.date&&t(`[ion-datetime] - The '${a}' presentation requires a date object in formatOptions.`,e);break;case"time":void 0===i.time&&t("[ion-datetime] - The 'time' presentation requires a time object in formatOptions.",e);break;case"date-time":case"time-date":void 0===i.date&&void 0===i.time&&t(`[ion-datetime] - The '${a}' presentation requires either a date or time object (or both) in formatOptions.`,e)}},Pe=a(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.ionCancel=n(this,"ionCancel",7),this.ionChange=n(this,"ionChange",7),this.ionValueChange=n(this,"ionValueChange",7),this.ionFocus=n(this,"ionFocus",7),this.ionBlur=n(this,"ionBlur",7),this.ionStyle=n(this,"ionStyle",7),this.ionRender=n(this,"ionRender",7),this.inputId="ion-dt-"+De++,this.prevPresentation=null,this.showMonthAndYear=!1,this.activeParts=[],this.workingParts={month:5,day:28,year:2021,hour:13,minute:52,ampm:"pm",isAdjacentDay:!1},this.isTimePopoverOpen=!1,this.color="primary",this.name=this.inputId,this.disabled=!1,this.readonly=!1,this.showAdjacentDays=!1,this.presentation="date-time",this.cancelText="Cancel",this.doneText="Done",this.clearText="Clear",this.locale="default",this.firstDayOfWeek=0,this.multiple=!1,this.showDefaultTitle=!1,this.showDefaultButtons=!1,this.showClearButton=!1,this.showDefaultTimeLabel=!0,this.size="fixed",this.preferWheel=!1,this.warnIfIncorrectValueUsage=()=>{const{multiple:e,value:a}=this;!e&&Array.isArray(a)&&t(`[ion-datetime] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: [${a.map((e=>`'${e}'`)).join(", ")}]\n`,this.el)},this.setValue=e=>{this.value=e,this.ionChange.emit({value:e})},this.getActivePartsWithFallback=()=>{var e;const{defaultParts:t}=this;return null!==(e=this.getActivePart())&&void 0!==e?e:t},this.getActivePart=()=>{const{activeParts:e}=this;return Array.isArray(e)?e[0]:e},this.closeParentOverlay=e=>{const t=this.el.closest("ion-modal, ion-popover");t&&t.dismiss(void 0,e)},this.setWorkingParts=e=>{this.workingParts=Object.assign({},e)},this.setActiveParts=(e,t=!1)=>{if(this.readonly)return;const{multiple:a,minParts:i,maxParts:n,activeParts:o}=this,r=V(e,i,n);if(this.setWorkingParts(r),a){const e=Array.isArray(o)?o:[o];this.activeParts=t?e.filter((e=>!P(e,r))):[...e,r]}else this.activeParts=Object.assign({},r);null!==this.el.querySelector('[slot="buttons"]')||this.showDefaultButtons||this.confirm()},this.initializeKeyboardListeners=()=>{const e=this.calendarBodyRef;if(!e)return;const t=this.el.shadowRoot,a=e.querySelector(".calendar-month:nth-of-type(2)"),i=new MutationObserver((t=>{var i;!(null===(i=t[0].oldValue)||void 0===i?void 0:i.includes("ion-focused"))&&e.classList.contains("ion-focused")&&this.focusWorkingDay(a)}));i.observe(e,{attributeFilter:["class"],attributeOldValue:!0}),this.destroyKeyboardMO=()=>{null==i||i.disconnect()},e.addEventListener("keydown",(e=>{const i=t.activeElement;if(!i||!i.classList.contains("calendar-day"))return;const n=T(i);let o;switch(e.key){case"ArrowDown":e.preventDefault(),o=I(n);break;case"ArrowUp":e.preventDefault(),o=R(n);break;case"ArrowRight":e.preventDefault(),o=W(n);break;case"ArrowLeft":e.preventDefault(),o=B(n);break;case"Home":e.preventDefault(),o=S(n);break;case"End":e.preventDefault(),o=A(n);break;case"PageUp":e.preventDefault(),o=e.shiftKey?E(n):C(n);break;case"PageDown":e.preventDefault(),o=e.shiftKey?$(n):O(n);break;default:return}we(o,this.minParts,this.maxParts)||(this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),o)),requestAnimationFrame((()=>this.focusWorkingDay(a))))}))},this.focusWorkingDay=e=>{const{day:t,month:a,year:i}=this.workingParts,n=new Date(`${a}/1/${i}`).getDay();if(null===t)return;const o=e.querySelector(`.calendar-day-wrapper:nth-of-type(${(n>=this.firstDayOfWeek?n-this.firstDayOfWeek:7-(this.firstDayOfWeek-n))+t}) .calendar-day`);o&&o.focus()},this.processMinParts=()=>{const{min:e,defaultParts:t}=this;this.minParts=void 0!==e?M(e,t):void 0},this.processMaxParts=()=>{const{max:e,defaultParts:t}=this;this.maxParts=void 0!==e?F(e,t):void 0},this.initializeCalendarListener=()=>{const e=this.calendarBodyRef;if(!e)return;const t=e.querySelectorAll(".calendar-month"),a=t[0],i=t[1],n=t[2],r="ios"===w(this)&&"undefined"!=typeof navigator&&navigator.maxTouchPoints>1;o((()=>{e.scrollLeft=a.clientWidth*(u(this.el)?-1:1);const t=t=>{const i=e.getBoundingClientRect(),o=(u(this.el)?e.scrollLeft>=-2:e.scrollLeft<=2)?a:n,r=o.getBoundingClientRect();if(Math.abs(r.x-i.x)>2)return;const{forceRenderDate:s}=this;return void 0!==s?{month:s.month,year:s.year,day:s.day}:o===a?C(t):o===n?O(t):void 0},s=()=>{r&&(e.style.removeProperty("pointer-events"),l=!1);const a=t(this.workingParts);if(!a)return;const{month:n,day:s,year:d}=a;je({month:n,year:d,day:null},{minParts:Object.assign(Object.assign({},this.minParts),{day:null}),maxParts:Object.assign(Object.assign({},this.maxParts),{day:null})})||(e.style.setProperty("overflow","hidden"),o((()=>{var t;this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),{month:n,day:s,year:d})),e.scrollLeft=i.clientWidth*(u(this.el)?-1:1),e.style.removeProperty("overflow"),this.resolveForceDateScrolling&&this.resolveForceDateScrolling();const a=this.el.shadowRoot.activeElement;a&&a.classList.contains("calendar-day")&&(null===(t=a.closest(".calendar-body"))||void 0===t||t.focus())})))};let d,l=!1;const h=()=>{d&&clearTimeout(d),!l&&r&&(e.style.setProperty("pointer-events","none"),l=!0),d=setTimeout(s,50)};e.addEventListener("scroll",h),this.destroyCalendarListener=()=>{e.removeEventListener("scroll",h)}}))},this.destroyInteractionListeners=()=>{const{destroyCalendarListener:e,destroyKeyboardMO:t}=this;void 0!==e&&e(),void 0!==t&&t()},this.ensureReadyIfVisible=()=>{if(this.el.classList.contains("datetime-ready"))return;const e=this.el.getBoundingClientRect();0!==e.width&&0!==e.height&&(this.initializeListeners(),o((()=>{this.el.classList.add("datetime-ready")})))},this.loadTimeoutCleanup=()=>{this.loadTimeout&&(clearTimeout(this.loadTimeout),this.loadTimeout=void 0)},this.processValue=e=>{const t=null!=e&&""!==e&&(!Array.isArray(e)||e.length>0),a=t?L(e):this.defaultParts,{minParts:i,maxParts:n,workingParts:o,el:r}=this;if(this.warnIfIncorrectValueUsage(),!a)return;t&&H(a,i,n);const s=Y(Array.isArray(a)?a[a.length-1]:a,i,n),{month:d,day:l,year:h,hour:c,minute:p}=s,m=q(c);this.activeParts=t?Array.isArray(a)?[...a]:{month:d,day:l,year:h,hour:c,minute:p,ampm:m}:[];const u=void 0!==d&&d!==o.month||void 0!==h&&h!==o.year,b=r.classList.contains("datetime-ready"),{isGridStyle:y,showMonthAndYear:g}=this;y&&u&&b&&!g?this.animateToDate(s):this.setWorkingParts({month:d,day:l,year:h,hour:c,minute:p,ampm:m})},this.animateToDate=async e=>{const{workingParts:t}=this;this.forceRenderDate=e;const a=new Promise((e=>{this.resolveForceDateScrolling=e}));k(e,t)?this.prevMonth():this.nextMonth(),await a,this.resolveForceDateScrolling=void 0,this.forceRenderDate=void 0},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.hasValue=()=>null!=this.value,this.nextMonth=()=>{const e=this.calendarBodyRef;if(!e)return;const t=e.querySelector(".calendar-month:last-of-type");t&&e.scrollTo({top:0,left:2*t.offsetWidth*(u(this.el)?-1:1),behavior:"smooth"})},this.prevMonth=()=>{const e=this.calendarBodyRef;if(!e)return;const t=e.querySelector(".calendar-month:first-of-type");t&&e.scrollTo({top:0,left:2*t.offsetWidth*(u(this.el)?1:-1),behavior:"smooth"})},this.toggleMonthAndYearView=()=>{this.showMonthAndYear=!this.showMonthAndYear}}formatOptionsChanged(){const{el:e,formatOptions:t,presentation:a}=this;Oe(e,a,t),Ce(e,t)}disabledChanged(){this.emitStyle()}minChanged(){this.processMinParts()}maxChanged(){this.processMaxParts()}presentationChanged(){const{el:e,formatOptions:t,presentation:a}=this;Oe(e,a,t)}get isGridStyle(){const{presentation:e,preferWheel:t}=this;return("date"===e||"date-time"===e||"time-date"===e)&&!t}yearValuesChanged(){this.parsedYearValues=G(this.yearValues)}monthValuesChanged(){this.parsedMonthValues=G(this.monthValues)}dayValuesChanged(){this.parsedDayValues=G(this.dayValues)}hourValuesChanged(){this.parsedHourValues=G(this.hourValues)}minuteValuesChanged(){this.parsedMinuteValues=G(this.minuteValues)}async valueChanged(){const{value:e}=this;this.hasValue()&&this.processValue(e),this.emitStyle(),this.ionValueChange.emit({value:e})}async confirm(e=!1){const{isCalendarPicker:t,activeParts:a,preferWheel:i,workingParts:n}=this;void 0===a&&t||this.setValue(Array.isArray(a)&&0===a.length?i?J(n):void 0:J(a)),e&&this.closeParentOverlay(Ve)}async reset(e){this.processValue(e)}async cancel(e=!1){this.ionCancel.emit(),e&&this.closeParentOverlay(ze)}get isCalendarPicker(){const{presentation:e}=this;return"date"===e||"date-time"===e||"time-date"===e}connectedCallback(){this.clearFocusVisible=l(this.el).destroy,this.loadTimeout=setTimeout((()=>{this.ensureReadyIfVisible()}),100)}disconnectedCallback(){this.clearFocusVisible&&(this.clearFocusVisible(),this.clearFocusVisible=void 0),this.loadTimeoutCleanup()}initializeListeners(){this.initializeCalendarListener(),this.initializeKeyboardListeners()}componentDidLoad(){const{el:e,intersectionTrackerRef:t}=this,a=new IntersectionObserver((e=>{e[0].isIntersecting&&(this.initializeListeners(),o((()=>{this.el.classList.add("datetime-ready")})))}),{threshold:.01,root:e});h((()=>null==a?void 0:a.observe(t))),this.loadTimeoutCleanup(),this.loadTimeout=setTimeout((()=>{this.ensureReadyIfVisible()}),100);const i=new IntersectionObserver((e=>{e[0].isIntersecting||(this.destroyInteractionListeners(),this.showMonthAndYear=!1,o((()=>{this.el.classList.remove("datetime-ready")})))}),{threshold:0,root:e});h((()=>null==i?void 0:i.observe(t)));const n=c(this.el);n.addEventListener("ionFocus",(e=>e.stopPropagation())),n.addEventListener("ionBlur",(e=>e.stopPropagation()))}componentDidRender(){const{presentation:e,prevPresentation:t,calendarBodyRef:a,minParts:i,preferWheel:n,forceRenderDate:o}=this;if(void 0!==i&&!n&&["date-time","time-date","date"].includes(e)&&a){const e=a.querySelector(".calendar-month:nth-of-type(1)");e&&void 0===o&&(a.scrollLeft=e.clientWidth*(u(this.el)?-1:1))}null!==t?e!==t&&(this.prevPresentation=e,this.destroyInteractionListeners(),this.initializeListeners(),this.showMonthAndYear=!1,h((()=>{this.ionRender.emit()}))):this.prevPresentation=e}componentWillLoad(){const{el:e,formatOptions:a,highlightedDates:i,multiple:n,presentation:o,preferWheel:r}=this;n&&("date"!==o&&t('[ion-datetime] - Multiple date selection is only supported for presentation="date".',e),r&&t('[ion-datetime] - Multiple date selection is not supported with preferWheel="true".',e)),void 0!==i&&("date"!==o&&"date-time"!==o&&"time-date"!==o&&t("[ion-datetime] - The highlightedDates property is only supported with the date, date-time, and time-date presentations.",e),r&&t('[ion-datetime] - The highlightedDates property is not supported with preferWheel="true".',e)),a&&(Oe(e,o,a),Ce(e,a));const s=this.parsedHourValues=G(this.hourValues),d=this.parsedMinuteValues=G(this.minuteValues),l=this.parsedMonthValues=G(this.monthValues),h=this.parsedYearValues=G(this.yearValues),c=this.parsedDayValues=G(this.dayValues),p=this.todayParts=L(N());this.processMinParts(),this.processMaxParts(),this.defaultParts=K({refParts:p,monthValues:l,dayValues:c,yearValues:h,hourValues:s,minuteValues:d,minParts:this.minParts,maxParts:this.maxParts}),this.processValue(this.value),this.emitStyle()}emitStyle(){this.ionStyle.emit({interactive:!0,datetime:!0,"interactive-disabled":this.disabled})}renderFooter(){const{disabled:e,readonly:t,showDefaultButtons:a,showClearButton:i}=this,n=e||t;if(null===this.el.querySelector('[slot="buttons"]')&&!a&&!i)return;const o=()=>{this.reset(),this.setValue(void 0)};return r("div",{class:"datetime-footer"},r("div",{class:"datetime-buttons"},r("div",{class:{"datetime-action-buttons":!0,"has-clear-button":this.showClearButton}},r("slot",{name:"buttons"},r("ion-buttons",null,a&&r("ion-button",{id:"cancel-button",color:this.color,onClick:()=>this.cancel(!0),disabled:n},this.cancelText),r("div",{class:"datetime-action-buttons-container"},i&&r("ion-button",{id:"clear-button",color:this.color,onClick:()=>o(),disabled:n},this.clearText),a&&r("ion-button",{id:"confirm-button",color:this.color,onClick:()=>this.confirm(!0),disabled:n},this.doneText)))))))}renderWheelPicker(e=this.presentation){const t="time-date"===e?[this.renderTimePickerColumns(e),this.renderDatePickerColumns(e)]:[this.renderDatePickerColumns(e),this.renderTimePickerColumns(e)];return r("ion-picker",{class:m},t)}renderDatePickerColumns(e){return"date-time"===e||"time-date"===e?this.renderCombinedDatePickerColumn():this.renderIndividualDatePickerColumns(e)}renderCombinedDatePickerColumn(){const{defaultParts:t,disabled:a,workingParts:i,locale:n,minParts:o,maxParts:s,todayParts:d,isDateEnabled:l}=this,h=this.getActivePartsWithFallback(),c=Q(i),p=c[c.length-1];c[0].day=1,p.day=U(p.month,p.year);const m=void 0!==o&&j(o,c[0])?o:c[0],u=void 0!==s&&k(s,p)?s:p,b=X(n,d,m,u,this.parsedDayValues,this.parsedMonthValues);let y=b.items;const g=b.parts;l&&(y=y.map(((t,a)=>{const i=g[a];let n;try{n=!l(J(i))}catch(t){e("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",t)}return Object.assign(Object.assign({},t),{disabled:n})})));const f=null!==i.day?`${i.year}-${i.month}-${i.day}`:`${t.year}-${t.month}-${t.day}`;return r("ion-picker-column",{part:Te,"aria-label":"Select a date",class:"date-column",color:this.color,disabled:a,value:f,onIonChange:e=>{const{value:t}=e.detail,a=g.find((({month:e,day:a,year:i})=>t===`${i}-${e}-${a}`));this.setWorkingParts(Object.assign(Object.assign({},i),a)),this.setActiveParts(Object.assign(Object.assign({},h),a)),e.stopPropagation()}},y.map((e=>r("ion-picker-column-option",{part:e.value===f?`${$e} ${Ee}`:$e,key:e.value,disabled:e.disabled,value:e.value},e.text))))}renderIndividualDatePickerColumns(t){const{workingParts:a,isDateEnabled:i}=this,n="year"!==t&&"time"!==t?Z(this.locale,a,this.minParts,this.maxParts,this.parsedMonthValues):[];let o="date"===t?_(this.locale,a,this.minParts,this.maxParts,this.parsedDayValues):[];i&&(o=o.map((t=>{const{value:n}=t,o={month:a.month,day:"string"==typeof n?parseInt(n):n,year:a.year};let r;try{r=!i(J(o))}catch(t){e("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",t)}return Object.assign(Object.assign({},t),{disabled:r})})));const r="month"!==t&&"time"!==t?ee(this.locale,this.defaultParts,this.minParts,this.maxParts,this.parsedYearValues):[];let s=[];return s=te(this.locale,{month:"numeric",day:"numeric"})?[this.renderMonthPickerColumn(n),this.renderDayPickerColumn(o),this.renderYearPickerColumn(r)]:[this.renderDayPickerColumn(o),this.renderMonthPickerColumn(n),this.renderYearPickerColumn(r)],s}renderDayPickerColumn(e){var t;if(0===e.length)return[];const{disabled:a,workingParts:i}=this,n=this.getActivePartsWithFallback(),o=null!==(t=null!==i.day?i.day:this.defaultParts.day)&&void 0!==t?t:void 0;return r("ion-picker-column",{part:Te,"aria-label":"Select a day",class:"day-column",color:this.color,disabled:a,value:o,onIonChange:e=>{this.setWorkingParts(Object.assign(Object.assign({},i),{day:e.detail.value})),this.setActiveParts(Object.assign(Object.assign({},n),{day:e.detail.value})),e.stopPropagation()}},e.map((e=>r("ion-picker-column-option",{part:e.value===o?`${$e} ${Ee}`:$e,key:e.value,disabled:e.disabled,value:e.value},e.text))))}renderMonthPickerColumn(e){if(0===e.length)return[];const{disabled:t,workingParts:a}=this,i=this.getActivePartsWithFallback();return r("ion-picker-column",{part:Te,"aria-label":"Select a month",class:"month-column",color:this.color,disabled:t,value:a.month,onIonChange:e=>{this.setWorkingParts(Object.assign(Object.assign({},a),{month:e.detail.value})),this.setActiveParts(Object.assign(Object.assign({},i),{month:e.detail.value})),e.stopPropagation()}},e.map((e=>r("ion-picker-column-option",{part:e.value===a.month?`${$e} ${Ee}`:$e,key:e.value,disabled:e.disabled,value:e.value},e.text))))}renderYearPickerColumn(e){if(0===e.length)return[];const{disabled:t,workingParts:a}=this,i=this.getActivePartsWithFallback();return r("ion-picker-column",{part:Te,"aria-label":"Select a year",class:"year-column",color:this.color,disabled:t,value:a.year,onIonChange:e=>{this.setWorkingParts(Object.assign(Object.assign({},a),{year:e.detail.value})),this.setActiveParts(Object.assign(Object.assign({},i),{year:e.detail.value})),e.stopPropagation()}},e.map((e=>r("ion-picker-column-option",{part:e.value===a.year?`${$e} ${Ee}`:$e,key:e.value,disabled:e.disabled,value:e.value},e.text))))}renderTimePickerColumns(e){if(["date","month","month-year","year"].includes(e))return[];const t=void 0!==this.getActivePart(),{hoursData:a,minutesData:i,dayPeriodData:n}=ae(this.locale,this.workingParts,this.hourCycle,t?this.minParts:void 0,t?this.maxParts:void 0,this.parsedHourValues,this.parsedMinuteValues);return[this.renderHourPickerColumn(a),this.renderMinutePickerColumn(i),this.renderDayPeriodPickerColumn(n)]}renderHourPickerColumn(e){const{disabled:t,workingParts:a}=this;if(0===e.length)return[];const i=this.getActivePartsWithFallback();return r("ion-picker-column",{part:Te,"aria-label":"Select an hour",color:this.color,disabled:t,value:i.hour,numericInput:!0,onIonChange:e=>{this.setWorkingParts(Object.assign(Object.assign({},a),{hour:e.detail.value})),this.setActiveParts(Object.assign(Object.assign({},this.getActivePartsWithFallback()),{hour:e.detail.value})),e.stopPropagation()}},e.map((e=>r("ion-picker-column-option",{part:e.value===i.hour?`${$e} ${Ee}`:$e,key:e.value,disabled:e.disabled,value:e.value},e.text))))}renderMinutePickerColumn(e){const{disabled:t,workingParts:a}=this;if(0===e.length)return[];const i=this.getActivePartsWithFallback();return r("ion-picker-column",{part:Te,"aria-label":"Select a minute",color:this.color,disabled:t,value:i.minute,numericInput:!0,onIonChange:e=>{this.setWorkingParts(Object.assign(Object.assign({},a),{minute:e.detail.value})),this.setActiveParts(Object.assign(Object.assign({},this.getActivePartsWithFallback()),{minute:e.detail.value})),e.stopPropagation()}},e.map((e=>r("ion-picker-column-option",{part:e.value===i.minute?`${$e} ${Ee}`:$e,key:e.value,disabled:e.disabled,value:e.value},e.text))))}renderDayPeriodPickerColumn(e){const{disabled:t,workingParts:a}=this;if(0===e.length)return[];const i=this.getActivePartsWithFallback(),n=ie(this.locale);return r("ion-picker-column",{part:Te,"aria-label":"Select a day period",style:n?{order:"-1"}:{},color:this.color,disabled:t,value:i.ampm,onIonChange:e=>{const t=ce(a,e.detail.value);this.setWorkingParts(Object.assign(Object.assign({},a),{ampm:e.detail.value,hour:t})),this.setActiveParts(Object.assign(Object.assign({},this.getActivePartsWithFallback()),{ampm:e.detail.value,hour:t})),e.stopPropagation()}},e.map((e=>r("ion-picker-column-option",{part:e.value===i.ampm?`${$e} ${Ee}`:$e,key:e.value,disabled:e.disabled,value:e.value},e.text))))}renderWheelView(e){const{locale:t}=this,a=te(t)?"month-first":"year-first";return r("div",{class:{["wheel-order-"+a]:!0}},this.renderWheelPicker(e))}renderCalendarHeader(e){const{disabled:t}=this,a="ios"===e?y:g,i="ios"===e?f:x,n=t||((e,t,a)=>{const i=Object.assign(Object.assign({},C(this.workingParts)),{day:null});return je(i,{minParts:t,maxParts:a})})(0,this.minParts,this.maxParts),o=t||((e,t)=>{const a=Object.assign(Object.assign({},O(this.workingParts)),{day:null});return je(a,{maxParts:t})})(0,this.maxParts),s=this.el.getAttribute("dir")||void 0;return r("div",{class:"calendar-header",part:"calendar-header"},r("div",{class:"calendar-action-buttons"},r("div",{class:"calendar-month-year"},r("button",{class:{"calendar-month-year-toggle":!0,"ion-activatable":!0,"ion-focusable":!0},part:"month-year-button",disabled:t,"aria-label":this.showMonthAndYear?"Hide year picker":"Show year picker",onClick:()=>this.toggleMonthAndYearView()},r("span",{id:"toggle-wrapper"},oe(this.locale,this.workingParts),r("ion-icon",{"aria-hidden":"true",icon:this.showMonthAndYear?a:i,lazy:!1,flipRtl:!0})),"md"===e&&r("ion-ripple-effect",null))),r("div",{class:"calendar-next-prev"},r("ion-buttons",null,r("ion-button",{"aria-label":"Previous month",disabled:n,onClick:()=>this.prevMonth(),part:"navigation-button previous-button"},r("ion-icon",{dir:s,"aria-hidden":"true",slot:"icon-only",icon:v,lazy:!1,flipRtl:!0})),r("ion-button",{"aria-label":"Next month",disabled:o,onClick:()=>this.nextMonth(),part:"navigation-button next-button"},r("ion-icon",{dir:s,"aria-hidden":"true",slot:"icon-only",icon:f,lazy:!1,flipRtl:!0}))))),r("div",{class:"calendar-days-of-week","aria-hidden":"true",part:"calendar-days-of-week"},ne(this.locale,e,this.firstDayOfWeek%7).map((e=>r("div",{class:"day-of-week"},e)))))}renderMonth(t,a){const{disabled:i,readonly:n}=this,o=void 0===this.parsedYearValues||this.parsedYearValues.includes(a),s=void 0===this.parsedMonthValues||this.parsedMonthValues.includes(t),d=!o||!s,l=i||n,h=i||je({month:t,year:a,day:null},{minParts:Object.assign(Object.assign({},this.minParts),{day:null}),maxParts:Object.assign(Object.assign({},this.maxParts),{day:null})}),c=this.workingParts.month===t&&this.workingParts.year===a,p=this.getActivePartsWithFallback();return r("div",{"aria-hidden":c?null:"true",class:{"calendar-month":!0,"calendar-month-disabled":!c&&h}},r("div",{class:"calendar-month-grid"},re(t,a,this.firstDayOfWeek%7,this.showAdjacentDays).map(((i,n)=>{const{day:o,dayOfWeek:s,isAdjacentDay:h}=i,{el:c,highlightedDates:m,isDateEnabled:u,multiple:b,showAdjacentDays:y}=this;let g=t,f=a;y&&h&&null!==o&&(o>20?1===t?(f=a-1,g=12):g=t-1:o<15&&(12===t?(f=a+1,g=1):g=t+1));const x={month:g,day:o,year:f,isAdjacentDay:h},v=null===o,{isActive:w,isToday:k,ariaLabel:j,ariaSelected:C,disabled:O,text:P}=ke(this.locale,x,this.activeParts,this.todayParts,this.minParts,this.maxParts,this.parsedDayValues),D=J(x);let z=d||O;if(!z&&void 0!==u)try{z=!u(D)}catch(t){e("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",c,t)}const V=z&&l,T=z||l;let $,E;return void 0===m||w||null===o||h||($=((t,a,i)=>{if(Array.isArray(t)){const e=a.split("T")[0],i=t.find((t=>t.date===e));if(i)return{textColor:i.textColor,backgroundColor:i.backgroundColor,border:i.border}}else try{return t(a)}catch(t){e("[ion-datetime] - Exception thrown from provided `highlightedDates` callback. Please check your function and try again.",i,t)}})(m,D,c)),v||h?h&&(E="calendar-day"+(z?" disabled":"")):E=`calendar-day${w?" active":""}${k?" today":""}${z?" disabled":""}`,r("div",{class:"calendar-day-wrapper"},r("button",{ref:e=>{e&&(e.style.setProperty("color",""+($?$.textColor:""),"important"),e.style.setProperty("background-color",""+($?$.backgroundColor:""),"important"),e.style.setProperty("border",""+($?$.border:""),"important"))},tabindex:"-1","data-day":o,"data-month":g,"data-year":f,"data-index":n,"data-day-of-week":s,disabled:T,class:{"calendar-day-padding":v,"calendar-day":!0,"calendar-day-active":w,"calendar-day-constrained":V,"calendar-day-today":k,"calendar-day-adjacent-day":h},part:E,"aria-hidden":v?"true":null,"aria-selected":C,"aria-label":j,onClick:()=>{v||(h?(this.el.blur(),this.activeParts=Object.assign(Object.assign({},p),x),this.animateToDate(x),this.confirm()):(this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),x)),b?this.setActiveParts(x,w):this.setActiveParts(Object.assign(Object.assign({},p),x))))}},P))}))))}renderCalendarBody(){return r("div",{class:"calendar-body ion-focusable",ref:e=>this.calendarBodyRef=e,tabindex:"0"},Q(this.workingParts,this.forceRenderDate).map((({month:e,year:t})=>this.renderMonth(e,t))))}renderCalendar(e){return r("div",{class:"datetime-calendar",key:"datetime-calendar"},this.renderCalendarHeader(e),this.renderCalendarBody())}renderTimeLabel(){if(null!==this.el.querySelector('[slot="time-label"]')||this.showDefaultTimeLabel)return r("slot",{name:"time-label"},"Time")}renderTimeOverlay(){const{disabled:e,hourCycle:t,isTimePopoverOpen:a,locale:i,formatOptions:n}=this,o=se(i,t),s=this.getActivePartsWithFallback();return[r("div",{class:"time-header"},this.renderTimeLabel()),r("button",{class:{"time-body":!0,"time-body-active":a},part:"time-button"+(a?" active":""),"aria-expanded":"false","aria-haspopup":"true",disabled:e,onClick:async e=>{const{popoverRef:t}=this;t&&(this.isTimePopoverOpen=!0,t.present(new CustomEvent("ionShadowTarget",{detail:{ionShadowTarget:e.target}})),await t.onWillDismiss(),this.isTimePopoverOpen=!1)}},de(i,s,o,null==n?void 0:n.time)),r("ion-popover",{alignment:"center",translucent:!0,overlayIndex:1,arrow:!1,onWillPresent:e=>{e.target.querySelectorAll("ion-picker-column").forEach((e=>e.scrollActiveItemIntoView()))},style:{"--offset-y":"-10px","--min-width":"fit-content"},keyboardEvents:!0,ref:e=>this.popoverRef=e},this.renderWheelPicker("time"))]}getHeaderSelectedDateText(){var t;const{activeParts:a,formatOptions:i,multiple:n,titleSelectedDatesFormatter:o}=this;let r;if(n&&Array.isArray(a)&&1!==a.length){if(r=a.length+" days",void 0!==o)try{r=o(J(a))}catch(t){e("[ion-datetime] - Exception in provided `titleSelectedDatesFormatter`:",t)}}else r=le(this.locale,this.getActivePartsWithFallback(),null!==(t=null==i?void 0:i.date)&&void 0!==t?t:{weekday:"short",month:"short",day:"numeric"});return r}renderHeader(e=!0){if(null!==this.el.querySelector('[slot="title"]')||this.showDefaultTitle)return r("div",{class:"datetime-header",part:"datetime-header"},r("div",{class:"datetime-title",part:"datetime-title"},r("slot",{name:"title"},"Select Date")),e&&r("div",{class:"datetime-selected-date",part:"datetime-selected-date"},this.getHeaderSelectedDateText()))}renderTime(){const{presentation:e}=this;return r("div",{class:"datetime-time"},"time"===e?this.renderWheelPicker():this.renderTimeOverlay())}renderCalendarViewMonthYearPicker(){return r("div",{class:"datetime-year"},this.renderWheelView("month-year"))}renderDatetime(e){const{presentation:t,preferWheel:a}=this;if(a&&("date"===t||"date-time"===t||"time-date"===t))return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];switch(t){case"date-time":return[this.renderHeader(),this.renderCalendar(e),this.renderCalendarViewMonthYearPicker(),this.renderTime(),this.renderFooter()];case"time-date":return[this.renderHeader(),this.renderTime(),this.renderCalendar(e),this.renderCalendarViewMonthYearPicker(),this.renderFooter()];case"time":return[this.renderHeader(!1),this.renderTime(),this.renderFooter()];case"month":case"month-year":case"year":return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];default:return[this.renderHeader(),this.renderCalendar(e),this.renderCalendarViewMonthYearPicker(),this.renderFooter()]}}render(){const{name:e,value:t,disabled:a,el:i,color:n,readonly:o,showMonthAndYear:d,preferWheel:l,presentation:h,size:c,isGridStyle:m}=this,u=w(this),y="year"===h||"month"===h||"month-year"===h,g=d||y,f=d&&!y,x=("date"===h||"date-time"===h||"time-date"===h)&&l;return p(!0,i,e,he(t),a),r(s,{key:"59e0811aa273e88dfb8e4b703e6824088a457380","aria-disabled":a?"true":null,onFocus:this.onFocus,onBlur:this.onBlur,class:Object.assign({},b(n,{[u]:!0,"datetime-readonly":o,"datetime-disabled":a,"show-month-and-year":g,"month-year-picker-open":f,["datetime-presentation-"+h]:!0,["datetime-size-"+c]:!0,"datetime-prefer-wheel":x,"datetime-grid":m}))},r("div",{key:"3753ff3dde3085070916c3de83687a219a49e553",class:"intersection-tracker",ref:e=>this.intersectionTrackerRef=e}),this.renderDatetime(u))}get el(){return this}static get watchers(){return{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}}static get style(){return{ios:':host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-height:44px;font-size:min(1rem, 25.6px);font-weight:600}.calendar-month-year-toggle.ion-focused::after{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:10px}:host .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{-ms-flex-align:stretch;align-items:stretch;height:100%}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3));font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2);font-size:min(1.375rem, 35.2px)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}',md:':host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;min-height:48px;background:transparent;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}'}}},[289,"ion-datetime",{color:[1],name:[1],disabled:[4],formatOptions:[16],readonly:[4],isDateEnabled:[16],showAdjacentDays:[4,"show-adjacent-days"],min:[1025],max:[1025],presentation:[1],cancelText:[1,"cancel-text"],doneText:[1,"done-text"],clearText:[1,"clear-text"],yearValues:[8,"year-values"],monthValues:[8,"month-values"],dayValues:[8,"day-values"],hourValues:[8,"hour-values"],minuteValues:[8,"minute-values"],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],titleSelectedDatesFormatter:[16],multiple:[4],highlightedDates:[16],value:[1025],showDefaultTitle:[4,"show-default-title"],showDefaultButtons:[4,"show-default-buttons"],showClearButton:[4,"show-clear-button"],showDefaultTimeLabel:[4,"show-default-time-label"],hourCycle:[1,"hour-cycle"],size:[1],preferWheel:[4,"prefer-wheel"],showMonthAndYear:[32],activeParts:[32],workingParts:[32],isTimePopoverOpen:[32],forceRenderDate:[32],confirm:[64],reset:[64],cancel:[64]},void 0,{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}]);let De=0;const ze="datetime-cancel",Ve="datetime-confirm",Te="wheel",$e="wheel-item",Ee="active",Ae=Pe,Se=function(){"undefined"!=typeof customElements&&["ion-datetime","ion-backdrop","ion-button","ion-buttons","ion-icon","ion-picker","ion-picker-column","ion-picker-column-option","ion-popover","ion-ripple-effect"].forEach((e=>{switch(e){case"ion-datetime":customElements.get(d(e))||customElements.define(d(e),Pe);break;case"ion-backdrop":customElements.get(d(e))||pe();break;case"ion-button":customElements.get(d(e))||me();break;case"ion-buttons":customElements.get(d(e))||ue();break;case"ion-icon":customElements.get(d(e))||be();break;case"ion-picker":customElements.get(d(e))||ye();break;case"ion-picker-column":customElements.get(d(e))||ge();break;case"ion-picker-column-option":customElements.get(d(e))||fe();break;case"ion-popover":customElements.get(d(e))||xe();break;case"ion-ripple-effect":customElements.get(d(e))||ve()}}))};export{Ae as IonDatetime,Se as defineCustomElement}
|
|
4
|
+
import{j as t,f as e,p as a,H as i,e as n,w as o,h as s,d as r,t as d}from"./p-BJoMtgfR.js";import{startFocusVisible as l}from"./p-BmVRXR1y.js";import{r as h,g as c,e as p}from"./p-DgbT0exM.js";import{F as m}from"./p-Cq8cQ0NL.js";import{i as u}from"./p-C53feagD.js";import{c as b}from"./p-DiVJyqlX.js";import{c as y,f as g,g as f,h as x,a as v}from"./p-CO7fmmxt.js";import{b as w}from"./p-CDfQnFrd.js";import{i as k,a as j,g as C,b as O,c as P,d as D,e as z,v as V,f as T,h as $,j as E,k as A,l as S,m as B,n as W,o as R,p as I,q as M,r as F,s as L,w as H,t as q,u as Y,x as G,y as J,z as N,A as K,B as Q,C as U,D as X,E as Z,F as _,G as tt,H as et,I as at,J as it,K as nt,L as ot,M as st,N as rt,O as dt,P as lt,Q as ht,R as ct}from"./p-BS1TtEiJ.js";import{d as pt}from"./p-CoA-aqGF.js";import{d as mt}from"./p-BTeL5HCK.js";import{d as ut}from"./p-B8b1Ukl9.js";import{d as bt}from"./p-YLXPWgVj.js";import{d as yt}from"./p-B6HaBl3o.js";import{d as gt}from"./p-FBcnjE5W.js";import{d as ft}from"./p-BxwWvu-b.js";import{d as xt}from"./p-DHsZWn1l.js";import{d as vt}from"./p-fpbh6w3f.js";const wt=(t,e,a,i)=>null===t.day||void 0!==i&&!i.includes(t.day)||!(!e||!k(t,e))||!(!a||!j(t,a)),kt=(t,e,a,i,n,o,s)=>{const r=void 0!==(Array.isArray(a)?a:[a]).find((t=>P(e,t))),d=P(e,i);return{disabled:wt(e,n,o,s),isActive:r,isToday:d,ariaSelected:r?"true":null,ariaLabel:z(t,d,e),text:null!=e.day?D(t,e):null}},jt=(t,{minParts:e,maxParts:a})=>!!((t,e,a)=>!!(e&&e.year>t)||!!(a&&a.year<t))(t.year,e,a)||!!(e&&k(t,e)||a&&j(t,a)),Ct=(t,a)=>{var i,n,o,s;((null===(i=null==a?void 0:a.date)||void 0===i?void 0:i.timeZone)||(null===(n=null==a?void 0:a.date)||void 0===n?void 0:n.timeZoneName)||(null===(o=null==a?void 0:a.time)||void 0===o?void 0:o.timeZone)||(null===(s=null==a?void 0:a.time)||void 0===s?void 0:s.timeZoneName))&&e('[ion-datetime] - "timeZone" and "timeZoneName" are not supported in "formatOptions".',t)},Ot=(t,a,i)=>{if(i)switch(a){case"date":case"month-year":case"month":case"year":void 0===i.date&&e(`[ion-datetime] - The '${a}' presentation requires a date object in formatOptions.`,t);break;case"time":void 0===i.time&&e("[ion-datetime] - The 'time' presentation requires a time object in formatOptions.",t);break;case"date-time":case"time-date":void 0===i.date&&void 0===i.time&&e(`[ion-datetime] - The '${a}' presentation requires either a date or time object (or both) in formatOptions.`,t)}},Pt=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionCancel=n(this,"ionCancel",7),this.ionChange=n(this,"ionChange",7),this.ionValueChange=n(this,"ionValueChange",7),this.ionFocus=n(this,"ionFocus",7),this.ionBlur=n(this,"ionBlur",7),this.ionStyle=n(this,"ionStyle",7),this.ionRender=n(this,"ionRender",7),this.inputId="ion-dt-"+Dt++,this.hasBeenIntersecting=!1,this.prevPresentation=null,this.showMonthAndYear=!1,this.activeParts=[],this.workingParts={month:5,day:28,year:2021,hour:13,minute:52,ampm:"pm",isAdjacentDay:!1},this.isTimePopoverOpen=!1,this.color="primary",this.name=this.inputId,this.disabled=!1,this.readonly=!1,this.showAdjacentDays=!1,this.presentation="date-time",this.cancelText="Cancel",this.doneText="Done",this.clearText="Clear",this.locale="default",this.firstDayOfWeek=0,this.multiple=!1,this.showDefaultTitle=!1,this.showDefaultButtons=!1,this.showClearButton=!1,this.showDefaultTimeLabel=!0,this.size="fixed",this.preferWheel=!1,this.warnIfIncorrectValueUsage=()=>{const{multiple:t,value:a}=this;!t&&Array.isArray(a)&&e(`[ion-datetime] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: [${a.map((t=>`'${t}'`)).join(", ")}]\n`,this.el)},this.setValue=t=>{this.value=t,this.ionChange.emit({value:t})},this.getActivePartsWithFallback=()=>{var t;const{defaultParts:e}=this;return null!==(t=this.getActivePart())&&void 0!==t?t:e},this.getActivePart=()=>{const{activeParts:t}=this;return Array.isArray(t)?t[0]:t},this.closeParentOverlay=t=>{const e=this.el.closest("ion-modal, ion-popover");e&&e.dismiss(void 0,t)},this.setWorkingParts=t=>{this.workingParts=Object.assign({},t)},this.setActiveParts=(t,e=!1)=>{if(this.readonly)return;const{multiple:a,minParts:i,maxParts:n,activeParts:o}=this,s=V(t,i,n);if(this.setWorkingParts(s),a){const t=Array.isArray(o)?o:[o];this.activeParts=e?t.filter((t=>!P(t,s))):[...t,s]}else this.activeParts=Object.assign({},s);null!==this.el.querySelector('[slot="buttons"]')||this.showDefaultButtons||this.confirm()},this.initializeKeyboardListeners=()=>{const t=this.calendarBodyRef;if(!t)return;const e=this.el.shadowRoot,a=t.querySelector(".calendar-month:nth-of-type(2)"),i=new MutationObserver((e=>{var i;!(null===(i=e[0].oldValue)||void 0===i?void 0:i.includes("ion-focused"))&&t.classList.contains("ion-focused")&&this.focusWorkingDay(a)}));i.observe(t,{attributeFilter:["class"],attributeOldValue:!0}),this.destroyKeyboardMO=()=>{null==i||i.disconnect()},t.addEventListener("keydown",(t=>{const i=e.activeElement;if(!i||!i.classList.contains("calendar-day"))return;const n=T(i);let o;switch(t.key){case"ArrowDown":t.preventDefault(),o=I(n);break;case"ArrowUp":t.preventDefault(),o=R(n);break;case"ArrowRight":t.preventDefault(),o=W(n);break;case"ArrowLeft":t.preventDefault(),o=B(n);break;case"Home":t.preventDefault(),o=S(n);break;case"End":t.preventDefault(),o=A(n);break;case"PageUp":t.preventDefault(),o=t.shiftKey?E(n):C(n);break;case"PageDown":t.preventDefault(),o=t.shiftKey?$(n):O(n);break;default:return}wt(o,this.minParts,this.maxParts)||(this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),o)),requestAnimationFrame((()=>this.focusWorkingDay(a))))}))},this.focusWorkingDay=t=>{const{day:e,month:a,year:i}=this.workingParts,n=new Date(`${a}/1/${i}`).getDay();if(null===e)return;const o=t.querySelector(`.calendar-day-wrapper:nth-of-type(${(n>=this.firstDayOfWeek?n-this.firstDayOfWeek:7-(this.firstDayOfWeek-n))+e}) .calendar-day`);o&&o.focus()},this.processMinParts=()=>{const{min:t,defaultParts:e}=this;this.minParts=void 0!==t?M(t,e):void 0},this.processMaxParts=()=>{const{max:t,defaultParts:e}=this;this.maxParts=void 0!==t?F(t,e):void 0},this.initializeCalendarListener=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelectorAll(".calendar-month"),a=e[0],i=e[1],n=e[2],s="ios"===w(this)&&"undefined"!=typeof navigator&&navigator.maxTouchPoints>1;o((()=>{t.scrollLeft=a.clientWidth*(u(this.el)?-1:1);const e=e=>{const i=t.getBoundingClientRect(),o=(u(this.el)?t.scrollLeft>=-2:t.scrollLeft<=2)?a:n,s=o.getBoundingClientRect();if(Math.abs(s.x-i.x)>2)return;const{forceRenderDate:r}=this;return void 0!==r?{month:r.month,year:r.year,day:r.day}:o===a?C(e):o===n?O(e):void 0},r=()=>{s&&(t.style.removeProperty("pointer-events"),l=!1);const a=e(this.workingParts);if(!a)return;const{month:n,day:r,year:d}=a;jt({month:n,year:d,day:null},{minParts:Object.assign(Object.assign({},this.minParts),{day:null}),maxParts:Object.assign(Object.assign({},this.maxParts),{day:null})})||(t.style.setProperty("overflow","hidden"),o((()=>{var e;this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),{month:n,day:r,year:d})),t.scrollLeft=i.clientWidth*(u(this.el)?-1:1),t.style.removeProperty("overflow"),this.resolveForceDateScrolling&&this.resolveForceDateScrolling();const a=this.el.shadowRoot.activeElement;a&&a.classList.contains("calendar-day")&&(null===(e=a.closest(".calendar-body"))||void 0===e||e.focus())})))};let d,l=!1;const h=()=>{d&&clearTimeout(d),!l&&s&&(t.style.setProperty("pointer-events","none"),l=!0),d=setTimeout(r,50)};t.addEventListener("scroll",h),this.destroyCalendarListener=()=>{t.removeEventListener("scroll",h)}}))},this.destroyInteractionListeners=()=>{const{destroyCalendarListener:t,destroyKeyboardMO:e}=this;void 0!==t&&t(),void 0!==e&&e()},this.ensureReadyIfVisible=()=>{if(this.el.classList.contains("datetime-ready"))return;const t=this.el.getBoundingClientRect();0!==t.width&&0!==t.height&&this.markReady()},this.markReady=()=>{this.el.classList.contains("datetime-ready")||(this.initializeListeners(),o((()=>{this.el.classList.add("datetime-ready")})))},this.loadTimeoutCleanup=()=>{this.loadTimeout&&(clearTimeout(this.loadTimeout),this.loadTimeout=void 0)},this.processValue=t=>{const e=null!=t&&""!==t&&(!Array.isArray(t)||t.length>0),a=e?L(t):this.defaultParts,{minParts:i,maxParts:n,workingParts:o,el:s}=this;if(this.warnIfIncorrectValueUsage(),!a)return;e&&H(a,i,n);const r=Y(Array.isArray(a)?a[a.length-1]:a,i,n),{month:d,day:l,year:h,hour:c,minute:p}=r,m=q(c);this.activeParts=e?Array.isArray(a)?[...a]:{month:d,day:l,year:h,hour:c,minute:p,ampm:m}:[];const u=void 0!==d&&d!==o.month||void 0!==h&&h!==o.year,b=s.classList.contains("datetime-ready"),{isGridStyle:y,showMonthAndYear:g}=this;y&&u&&b&&!g?this.animateToDate(r):this.setWorkingParts({month:d,day:l,year:h,hour:c,minute:p,ampm:m})},this.animateToDate=async t=>{const{workingParts:e}=this;this.forceRenderDate=t;const a=new Promise((t=>{this.resolveForceDateScrolling=t}));k(t,e)?this.prevMonth():this.nextMonth(),await a,this.resolveForceDateScrolling=void 0,this.forceRenderDate=void 0},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.hasValue=()=>null!=this.value,this.nextMonth=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelector(".calendar-month:last-of-type");e&&t.scrollTo({top:0,left:2*e.offsetWidth*(u(this.el)?-1:1),behavior:"smooth"})},this.prevMonth=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelector(".calendar-month:first-of-type");e&&t.scrollTo({top:0,left:2*e.offsetWidth*(u(this.el)?1:-1),behavior:"smooth"})},this.toggleMonthAndYearView=()=>{this.showMonthAndYear=!this.showMonthAndYear}}formatOptionsChanged(){const{el:t,formatOptions:e,presentation:a}=this;Ot(t,a,e),Ct(t,e)}disabledChanged(){this.emitStyle()}minChanged(){this.processMinParts()}maxChanged(){this.processMaxParts()}presentationChanged(){const{el:t,formatOptions:e,presentation:a}=this;Ot(t,a,e)}get isGridStyle(){const{presentation:t,preferWheel:e}=this;return("date"===t||"date-time"===t||"time-date"===t)&&!e}yearValuesChanged(){this.parsedYearValues=G(this.yearValues)}monthValuesChanged(){this.parsedMonthValues=G(this.monthValues)}dayValuesChanged(){this.parsedDayValues=G(this.dayValues)}hourValuesChanged(){this.parsedHourValues=G(this.hourValues)}minuteValuesChanged(){this.parsedMinuteValues=G(this.minuteValues)}async valueChanged(){const{value:t}=this;this.hasValue()&&this.processValue(t),this.emitStyle(),this.ionValueChange.emit({value:t})}async confirm(t=!1){const{isCalendarPicker:e,activeParts:a,preferWheel:i,workingParts:n}=this;void 0===a&&e||this.setValue(Array.isArray(a)&&0===a.length?i?J(n):void 0:J(a)),t&&this.closeParentOverlay(Vt)}async reset(t){this.processValue(t)}async cancel(t=!1){this.ionCancel.emit(),t&&this.closeParentOverlay(zt)}get isCalendarPicker(){const{presentation:t}=this;return"date"===t||"date-time"===t||"time-date"===t}connectedCallback(){this.clearFocusVisible=l(this.el).destroy,this.loadTimeout=setTimeout((()=>{this.ensureReadyIfVisible()}),100)}disconnectedCallback(){this.clearFocusVisible&&(this.clearFocusVisible(),this.clearFocusVisible=void 0),this.loadTimeoutCleanup(),this.hasBeenIntersecting=!1}initializeListeners(){this.initializeCalendarListener(),this.initializeKeyboardListeners()}componentDidLoad(){const{el:t,intersectionTrackerRef:e}=this,a=new IntersectionObserver((t=>{t[0].isIntersecting&&(this.hasBeenIntersecting=!0,this.markReady())}),{threshold:.01,root:t});h((()=>null==a?void 0:a.observe(e))),this.loadTimeoutCleanup(),this.loadTimeout=setTimeout((()=>{this.ensureReadyIfVisible()}),100);const i=new IntersectionObserver((t=>{t[0].isIntersecting||this.hasBeenIntersecting&&(this.hasBeenIntersecting=!1,this.destroyInteractionListeners(),this.showMonthAndYear=!1,o((()=>{this.el.classList.remove("datetime-ready")})))}),{threshold:0,root:t});h((()=>null==i?void 0:i.observe(e)));const n=c(this.el);n.addEventListener("ionFocus",(t=>t.stopPropagation())),n.addEventListener("ionBlur",(t=>t.stopPropagation()))}componentDidRender(){const{presentation:t,prevPresentation:e,calendarBodyRef:a,minParts:i,preferWheel:n,forceRenderDate:o}=this;if(void 0!==i&&!n&&["date-time","time-date","date"].includes(t)&&a){const t=a.querySelector(".calendar-month:nth-of-type(1)");t&&void 0===o&&(a.scrollLeft=t.clientWidth*(u(this.el)?-1:1))}null!==e?t!==e&&(this.prevPresentation=t,this.destroyInteractionListeners(),this.initializeListeners(),this.showMonthAndYear=!1,h((()=>{this.ionRender.emit()}))):this.prevPresentation=t}componentWillLoad(){const{el:t,formatOptions:a,highlightedDates:i,multiple:n,presentation:o,preferWheel:s}=this;n&&("date"!==o&&e('[ion-datetime] - Multiple date selection is only supported for presentation="date".',t),s&&e('[ion-datetime] - Multiple date selection is not supported with preferWheel="true".',t)),void 0!==i&&("date"!==o&&"date-time"!==o&&"time-date"!==o&&e("[ion-datetime] - The highlightedDates property is only supported with the date, date-time, and time-date presentations.",t),s&&e('[ion-datetime] - The highlightedDates property is not supported with preferWheel="true".',t)),a&&(Ot(t,o,a),Ct(t,a));const r=this.parsedHourValues=G(this.hourValues),d=this.parsedMinuteValues=G(this.minuteValues),l=this.parsedMonthValues=G(this.monthValues),h=this.parsedYearValues=G(this.yearValues),c=this.parsedDayValues=G(this.dayValues),p=this.todayParts=L(N());this.processMinParts(),this.processMaxParts(),this.defaultParts=K({refParts:p,monthValues:l,dayValues:c,yearValues:h,hourValues:r,minuteValues:d,minParts:this.minParts,maxParts:this.maxParts}),this.processValue(this.value),this.emitStyle()}emitStyle(){this.ionStyle.emit({interactive:!0,datetime:!0,"interactive-disabled":this.disabled})}renderFooter(){const{disabled:t,readonly:e,showDefaultButtons:a,showClearButton:i}=this,n=t||e;if(null===this.el.querySelector('[slot="buttons"]')&&!a&&!i)return;const o=()=>{this.reset(),this.setValue(void 0)};return s("div",{class:"datetime-footer"},s("div",{class:"datetime-buttons"},s("div",{class:{"datetime-action-buttons":!0,"has-clear-button":this.showClearButton}},s("slot",{name:"buttons"},s("ion-buttons",null,a&&s("ion-button",{id:"cancel-button",color:this.color,onClick:()=>this.cancel(!0),disabled:n},this.cancelText),s("div",{class:"datetime-action-buttons-container"},i&&s("ion-button",{id:"clear-button",color:this.color,onClick:()=>o(),disabled:n},this.clearText),a&&s("ion-button",{id:"confirm-button",color:this.color,onClick:()=>this.confirm(!0),disabled:n},this.doneText)))))))}renderWheelPicker(t=this.presentation){const e="time-date"===t?[this.renderTimePickerColumns(t),this.renderDatePickerColumns(t)]:[this.renderDatePickerColumns(t),this.renderTimePickerColumns(t)];return s("ion-picker",{class:m},e)}renderDatePickerColumns(t){return"date-time"===t||"time-date"===t?this.renderCombinedDatePickerColumn():this.renderIndividualDatePickerColumns(t)}renderCombinedDatePickerColumn(){const{defaultParts:e,disabled:a,workingParts:i,locale:n,minParts:o,maxParts:r,todayParts:d,isDateEnabled:l}=this,h=this.getActivePartsWithFallback(),c=Q(i),p=c[c.length-1];c[0].day=1,p.day=U(p.month,p.year);const m=void 0!==o&&j(o,c[0])?o:c[0],u=void 0!==r&&k(r,p)?r:p,b=X(n,d,m,u,this.parsedDayValues,this.parsedMonthValues);let y=b.items;const g=b.parts;l&&(y=y.map(((e,a)=>{const i=g[a];let n;try{n=!l(J(i))}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",e)}return Object.assign(Object.assign({},e),{disabled:n})})));const f=null!==i.day?`${i.year}-${i.month}-${i.day}`:`${e.year}-${e.month}-${e.day}`;return s("ion-picker-column",{part:Tt,"aria-label":"Select a date",class:"date-column",color:this.color,disabled:a,value:f,onIonChange:t=>{const{value:e}=t.detail,a=g.find((({month:t,day:a,year:i})=>e===`${i}-${t}-${a}`));this.setWorkingParts(Object.assign(Object.assign({},i),a)),this.setActiveParts(Object.assign(Object.assign({},h),a)),t.stopPropagation()}},y.map((t=>s("ion-picker-column-option",{part:t.value===f?`${$t} ${Et}`:$t,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderIndividualDatePickerColumns(e){const{workingParts:a,isDateEnabled:i}=this,n="year"!==e&&"time"!==e?Z(this.locale,a,this.minParts,this.maxParts,this.parsedMonthValues):[];let o="date"===e?_(this.locale,a,this.minParts,this.maxParts,this.parsedDayValues):[];i&&(o=o.map((e=>{const{value:n}=e,o={month:a.month,day:"string"==typeof n?parseInt(n):n,year:a.year};let s;try{s=!i(J(o))}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",e)}return Object.assign(Object.assign({},e),{disabled:s})})));const s="month"!==e&&"time"!==e?tt(this.locale,this.defaultParts,this.minParts,this.maxParts,this.parsedYearValues):[];let r=[];return r=et(this.locale,{month:"numeric",day:"numeric"})?[this.renderMonthPickerColumn(n),this.renderDayPickerColumn(o),this.renderYearPickerColumn(s)]:[this.renderDayPickerColumn(o),this.renderMonthPickerColumn(n),this.renderYearPickerColumn(s)],r}renderDayPickerColumn(t){var e;if(0===t.length)return[];const{disabled:a,workingParts:i}=this,n=this.getActivePartsWithFallback(),o=null!==(e=null!==i.day?i.day:this.defaultParts.day)&&void 0!==e?e:void 0;return s("ion-picker-column",{part:Tt,"aria-label":"Select a day",class:"day-column",color:this.color,disabled:a,value:o,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},i),{day:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},n),{day:t.detail.value})),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{part:t.value===o?`${$t} ${Et}`:$t,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderMonthPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this,i=this.getActivePartsWithFallback();return s("ion-picker-column",{part:Tt,"aria-label":"Select a month",class:"month-column",color:this.color,disabled:e,value:a.month,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},a),{month:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},i),{month:t.detail.value})),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{part:t.value===a.month?`${$t} ${Et}`:$t,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderYearPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this,i=this.getActivePartsWithFallback();return s("ion-picker-column",{part:Tt,"aria-label":"Select a year",class:"year-column",color:this.color,disabled:e,value:a.year,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},a),{year:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},i),{year:t.detail.value})),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{part:t.value===a.year?`${$t} ${Et}`:$t,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderTimePickerColumns(t){if(["date","month","month-year","year"].includes(t))return[];const e=void 0!==this.getActivePart(),{hoursData:a,minutesData:i,dayPeriodData:n}=at(this.locale,this.workingParts,this.hourCycle,e?this.minParts:void 0,e?this.maxParts:void 0,this.parsedHourValues,this.parsedMinuteValues);return[this.renderHourPickerColumn(a),this.renderMinutePickerColumn(i),this.renderDayPeriodPickerColumn(n)]}renderHourPickerColumn(t){const{disabled:e,workingParts:a}=this;if(0===t.length)return[];const i=this.getActivePartsWithFallback();return s("ion-picker-column",{part:Tt,"aria-label":"Select an hour",color:this.color,disabled:e,value:i.hour,numericInput:!0,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},a),{hour:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},this.getActivePartsWithFallback()),{hour:t.detail.value})),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{part:t.value===i.hour?`${$t} ${Et}`:$t,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderMinutePickerColumn(t){const{disabled:e,workingParts:a}=this;if(0===t.length)return[];const i=this.getActivePartsWithFallback();return s("ion-picker-column",{part:Tt,"aria-label":"Select a minute",color:this.color,disabled:e,value:i.minute,numericInput:!0,onIonChange:t=>{this.setWorkingParts(Object.assign(Object.assign({},a),{minute:t.detail.value})),this.setActiveParts(Object.assign(Object.assign({},this.getActivePartsWithFallback()),{minute:t.detail.value})),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{part:t.value===i.minute?`${$t} ${Et}`:$t,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderDayPeriodPickerColumn(t){const{disabled:e,workingParts:a}=this;if(0===t.length)return[];const i=this.getActivePartsWithFallback(),n=it(this.locale);return s("ion-picker-column",{part:Tt,"aria-label":"Select a day period",style:n?{order:"-1"}:{},color:this.color,disabled:e,value:i.ampm,onIonChange:t=>{const e=ct(a,t.detail.value);this.setWorkingParts(Object.assign(Object.assign({},a),{ampm:t.detail.value,hour:e})),this.setActiveParts(Object.assign(Object.assign({},this.getActivePartsWithFallback()),{ampm:t.detail.value,hour:e})),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{part:t.value===i.ampm?`${$t} ${Et}`:$t,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderWheelView(t){const{locale:e}=this,a=et(e)?"month-first":"year-first";return s("div",{class:{["wheel-order-"+a]:!0}},this.renderWheelPicker(t))}renderCalendarHeader(t){const{disabled:e}=this,a="ios"===t?y:g,i="ios"===t?f:x,n=e||((t,e,a)=>{const i=Object.assign(Object.assign({},C(this.workingParts)),{day:null});return jt(i,{minParts:e,maxParts:a})})(0,this.minParts,this.maxParts),o=e||((t,e)=>{const a=Object.assign(Object.assign({},O(this.workingParts)),{day:null});return jt(a,{maxParts:e})})(0,this.maxParts),r=this.el.getAttribute("dir")||void 0;return s("div",{class:"calendar-header",part:"calendar-header"},s("div",{class:"calendar-action-buttons"},s("div",{class:"calendar-month-year"},s("button",{class:{"calendar-month-year-toggle":!0,"ion-activatable":!0,"ion-focusable":!0},part:"month-year-button",disabled:e,"aria-label":this.showMonthAndYear?"Hide year picker":"Show year picker",onClick:()=>this.toggleMonthAndYearView()},s("span",{id:"toggle-wrapper"},ot(this.locale,this.workingParts),s("ion-icon",{"aria-hidden":"true",icon:this.showMonthAndYear?a:i,lazy:!1,flipRtl:!0})),"md"===t&&s("ion-ripple-effect",null))),s("div",{class:"calendar-next-prev"},s("ion-buttons",null,s("ion-button",{"aria-label":"Previous month",disabled:n,onClick:()=>this.prevMonth(),part:"navigation-button previous-button"},s("ion-icon",{dir:r,"aria-hidden":"true",slot:"icon-only",icon:v,lazy:!1,flipRtl:!0})),s("ion-button",{"aria-label":"Next month",disabled:o,onClick:()=>this.nextMonth(),part:"navigation-button next-button"},s("ion-icon",{dir:r,"aria-hidden":"true",slot:"icon-only",icon:f,lazy:!1,flipRtl:!0}))))),s("div",{class:"calendar-days-of-week","aria-hidden":"true",part:"calendar-days-of-week"},nt(this.locale,t,this.firstDayOfWeek%7).map((t=>s("div",{class:"day-of-week"},t)))))}renderMonth(e,a){const{disabled:i,readonly:n}=this,o=void 0===this.parsedYearValues||this.parsedYearValues.includes(a),r=void 0===this.parsedMonthValues||this.parsedMonthValues.includes(e),d=!o||!r,l=i||n,h=i||jt({month:e,year:a,day:null},{minParts:Object.assign(Object.assign({},this.minParts),{day:null}),maxParts:Object.assign(Object.assign({},this.maxParts),{day:null})}),c=this.workingParts.month===e&&this.workingParts.year===a,p=this.getActivePartsWithFallback();return s("div",{"aria-hidden":c?null:"true",class:{"calendar-month":!0,"calendar-month-disabled":!c&&h}},s("div",{class:"calendar-month-grid"},st(e,a,this.firstDayOfWeek%7,this.showAdjacentDays).map(((i,n)=>{const{day:o,dayOfWeek:r,isAdjacentDay:h}=i,{el:c,highlightedDates:m,isDateEnabled:u,multiple:b,showAdjacentDays:y}=this;let g=e,f=a;y&&h&&null!==o&&(o>20?1===e?(f=a-1,g=12):g=e-1:o<15&&(12===e?(f=a+1,g=1):g=e+1));const x={month:g,day:o,year:f,isAdjacentDay:h},v=null===o,{isActive:w,isToday:k,ariaLabel:j,ariaSelected:C,disabled:O,text:P}=kt(this.locale,x,this.activeParts,this.todayParts,this.minParts,this.maxParts,this.parsedDayValues),D=J(x);let z=d||O;if(!z&&void 0!==u)try{z=!u(D)}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",c,e)}const V=z&&l,T=z||l;let $,E;return void 0===m||w||null===o||h||($=((e,a,i)=>{if(Array.isArray(e)){const t=a.split("T")[0],i=e.find((e=>e.date===t));if(i)return{textColor:i.textColor,backgroundColor:i.backgroundColor,border:i.border}}else try{return e(a)}catch(e){t("[ion-datetime] - Exception thrown from provided `highlightedDates` callback. Please check your function and try again.",i,e)}})(m,D,c)),v||h?h&&(E="calendar-day"+(z?" disabled":"")):E=`calendar-day${w?" active":""}${k?" today":""}${z?" disabled":""}`,s("div",{class:"calendar-day-wrapper"},s("button",{ref:t=>{t&&(t.style.setProperty("color",""+($?$.textColor:""),"important"),t.style.setProperty("background-color",""+($?$.backgroundColor:""),"important"),t.style.setProperty("border",""+($?$.border:""),"important"))},tabindex:"-1","data-day":o,"data-month":g,"data-year":f,"data-index":n,"data-day-of-week":r,disabled:T,class:{"calendar-day-padding":v,"calendar-day":!0,"calendar-day-active":w,"calendar-day-constrained":V,"calendar-day-today":k,"calendar-day-adjacent-day":h},part:E,"aria-hidden":v?"true":null,"aria-selected":C,"aria-label":j,onClick:()=>{v||(h?(this.el.blur(),this.activeParts=Object.assign(Object.assign({},p),x),this.animateToDate(x),this.confirm()):(this.setWorkingParts(Object.assign(Object.assign({},this.workingParts),x)),b?this.setActiveParts(x,w):this.setActiveParts(Object.assign(Object.assign({},p),x))))}},P))}))))}renderCalendarBody(){return s("div",{class:"calendar-body ion-focusable",ref:t=>this.calendarBodyRef=t,tabindex:"0"},Q(this.workingParts,this.forceRenderDate).map((({month:t,year:e})=>this.renderMonth(t,e))))}renderCalendar(t){return s("div",{class:"datetime-calendar",key:"datetime-calendar"},this.renderCalendarHeader(t),this.renderCalendarBody())}renderTimeLabel(){if(null!==this.el.querySelector('[slot="time-label"]')||this.showDefaultTimeLabel)return s("slot",{name:"time-label"},"Time")}renderTimeOverlay(){const{disabled:t,hourCycle:e,isTimePopoverOpen:a,locale:i,formatOptions:n}=this,o=rt(i,e),r=this.getActivePartsWithFallback();return[s("div",{class:"time-header"},this.renderTimeLabel()),s("button",{class:{"time-body":!0,"time-body-active":a},part:"time-button"+(a?" active":""),"aria-expanded":"false","aria-haspopup":"true",disabled:t,onClick:async t=>{const{popoverRef:e}=this;e&&(this.isTimePopoverOpen=!0,e.present(new CustomEvent("ionShadowTarget",{detail:{ionShadowTarget:t.target}})),await e.onWillDismiss(),this.isTimePopoverOpen=!1)}},dt(i,r,o,null==n?void 0:n.time)),s("ion-popover",{alignment:"center",translucent:!0,overlayIndex:1,arrow:!1,onWillPresent:t=>{t.target.querySelectorAll("ion-picker-column").forEach((t=>t.scrollActiveItemIntoView()))},style:{"--offset-y":"-10px","--min-width":"fit-content"},keyboardEvents:!0,ref:t=>this.popoverRef=t},this.renderWheelPicker("time"))]}getHeaderSelectedDateText(){var e;const{activeParts:a,formatOptions:i,multiple:n,titleSelectedDatesFormatter:o}=this;let s;if(n&&Array.isArray(a)&&1!==a.length){if(s=a.length+" days",void 0!==o)try{s=o(J(a))}catch(e){t("[ion-datetime] - Exception in provided `titleSelectedDatesFormatter`:",e)}}else s=lt(this.locale,this.getActivePartsWithFallback(),null!==(e=null==i?void 0:i.date)&&void 0!==e?e:{weekday:"short",month:"short",day:"numeric"});return s}renderHeader(t=!0){if(null!==this.el.querySelector('[slot="title"]')||this.showDefaultTitle)return s("div",{class:"datetime-header",part:"datetime-header"},s("div",{class:"datetime-title",part:"datetime-title"},s("slot",{name:"title"},"Select Date")),t&&s("div",{class:"datetime-selected-date",part:"datetime-selected-date"},this.getHeaderSelectedDateText()))}renderTime(){const{presentation:t}=this;return s("div",{class:"datetime-time"},"time"===t?this.renderWheelPicker():this.renderTimeOverlay())}renderCalendarViewMonthYearPicker(){return s("div",{class:"datetime-year"},this.renderWheelView("month-year"))}renderDatetime(t){const{presentation:e,preferWheel:a}=this;if(a&&("date"===e||"date-time"===e||"time-date"===e))return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];switch(e){case"date-time":return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderTime(),this.renderFooter()];case"time-date":return[this.renderHeader(),this.renderTime(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()];case"time":return[this.renderHeader(!1),this.renderTime(),this.renderFooter()];case"month":case"month-year":case"year":return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];default:return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()]}}render(){const{name:t,value:e,disabled:a,el:i,color:n,readonly:o,showMonthAndYear:d,preferWheel:l,presentation:h,size:c,isGridStyle:m}=this,u=w(this),y="year"===h||"month"===h||"month-year"===h,g=d||y,f=d&&!y,x=("date"===h||"date-time"===h||"time-date"===h)&&l;return p(!0,i,t,ht(e),a),s(r,{key:"323c8c2327088f00934b8c93c3306538cb9b5677","aria-disabled":a?"true":null,onFocus:this.onFocus,onBlur:this.onBlur,class:Object.assign({},b(n,{[u]:!0,"datetime-readonly":o,"datetime-disabled":a,"show-month-and-year":g,"month-year-picker-open":f,["datetime-presentation-"+h]:!0,["datetime-size-"+c]:!0,"datetime-prefer-wheel":x,"datetime-grid":m}))},s("div",{key:"1e0855c8909bc3f1e48a21ad68159fa782060691",class:"intersection-tracker",ref:t=>this.intersectionTrackerRef=t}),this.renderDatetime(u))}get el(){return this}static get watchers(){return{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}}static get style(){return{ios:':host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-height:44px;font-size:min(1rem, 25.6px);font-weight:600}.calendar-month-year-toggle.ion-focused::after{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:10px}:host .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{-ms-flex-align:stretch;align-items:stretch;height:100%}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3));font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2);font-size:min(1.375rem, 35.2px)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}',md:':host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;min-height:48px;background:transparent;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}'}}},[289,"ion-datetime",{color:[1],name:[1],disabled:[4],formatOptions:[16],readonly:[4],isDateEnabled:[16],showAdjacentDays:[4,"show-adjacent-days"],min:[1025],max:[1025],presentation:[1],cancelText:[1,"cancel-text"],doneText:[1,"done-text"],clearText:[1,"clear-text"],yearValues:[8,"year-values"],monthValues:[8,"month-values"],dayValues:[8,"day-values"],hourValues:[8,"hour-values"],minuteValues:[8,"minute-values"],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],titleSelectedDatesFormatter:[16],multiple:[4],highlightedDates:[16],value:[1025],showDefaultTitle:[4,"show-default-title"],showDefaultButtons:[4,"show-default-buttons"],showClearButton:[4,"show-clear-button"],showDefaultTimeLabel:[4,"show-default-time-label"],hourCycle:[1,"hour-cycle"],size:[1],preferWheel:[4,"prefer-wheel"],showMonthAndYear:[32],activeParts:[32],workingParts:[32],isTimePopoverOpen:[32],forceRenderDate:[32],confirm:[64],reset:[64],cancel:[64]},void 0,{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}]);let Dt=0;const zt="datetime-cancel",Vt="datetime-confirm",Tt="wheel",$t="wheel-item",Et="active",At=Pt,St=function(){"undefined"!=typeof customElements&&["ion-datetime","ion-backdrop","ion-button","ion-buttons","ion-icon","ion-picker","ion-picker-column","ion-picker-column-option","ion-popover","ion-ripple-effect"].forEach((t=>{switch(t){case"ion-datetime":customElements.get(d(t))||customElements.define(d(t),Pt);break;case"ion-backdrop":customElements.get(d(t))||pt();break;case"ion-button":customElements.get(d(t))||mt();break;case"ion-buttons":customElements.get(d(t))||ut();break;case"ion-icon":customElements.get(d(t))||bt();break;case"ion-picker":customElements.get(d(t))||yt();break;case"ion-picker-column":customElements.get(d(t))||gt();break;case"ion-picker-column-option":customElements.get(d(t))||ft();break;case"ion-popover":customElements.get(d(t))||xt();break;case"ion-ripple-effect":customElements.get(d(t))||vt()}}))};export{At as IonDatetime,St as defineCustomElement}
|
|
@@ -246,6 +246,12 @@ const Datetime = class {
|
|
|
246
246
|
this.ionStyle = index.createEvent(this, "ionStyle", 7);
|
|
247
247
|
this.ionRender = index.createEvent(this, "ionRender", 7);
|
|
248
248
|
this.inputId = `ion-dt-${datetimeIds++}`;
|
|
249
|
+
/**
|
|
250
|
+
* Set true only by `visibleCallback`. Lets `hiddenCallback` ignore the
|
|
251
|
+
* synthetic "not intersecting" entry IntersectionObserver fires on
|
|
252
|
+
* `observe()` when the host mounts offscreen.
|
|
253
|
+
*/
|
|
254
|
+
this.hasBeenIntersecting = false;
|
|
249
255
|
this.prevPresentation = null;
|
|
250
256
|
this.showMonthAndYear = false;
|
|
251
257
|
this.activeParts = [];
|
|
@@ -808,7 +814,21 @@ const Datetime = class {
|
|
|
808
814
|
if (rect.width === 0 || rect.height === 0) {
|
|
809
815
|
return;
|
|
810
816
|
}
|
|
817
|
+
this.markReady();
|
|
818
|
+
};
|
|
819
|
+
this.markReady = () => {
|
|
820
|
+
if (this.el.classList.contains('datetime-ready')) {
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
811
823
|
this.initializeListeners();
|
|
824
|
+
/**
|
|
825
|
+
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
826
|
+
* can properly scroll contents into view. As a result
|
|
827
|
+
* we hide the scrollable content until after that frame
|
|
828
|
+
* so users do not see the content quickly shifting. The downside
|
|
829
|
+
* is that the content will pop into view a frame after. Maybe there
|
|
830
|
+
* is a better way to handle this?
|
|
831
|
+
*/
|
|
812
832
|
index.writeTask(() => {
|
|
813
833
|
this.el.classList.add('datetime-ready');
|
|
814
834
|
});
|
|
@@ -1101,6 +1121,7 @@ const Datetime = class {
|
|
|
1101
1121
|
this.clearFocusVisible = undefined;
|
|
1102
1122
|
}
|
|
1103
1123
|
this.loadTimeoutCleanup();
|
|
1124
|
+
this.hasBeenIntersecting = false;
|
|
1104
1125
|
}
|
|
1105
1126
|
initializeListeners() {
|
|
1106
1127
|
this.initializeCalendarListener();
|
|
@@ -1120,18 +1141,8 @@ const Datetime = class {
|
|
|
1120
1141
|
if (!ev.isIntersecting) {
|
|
1121
1142
|
return;
|
|
1122
1143
|
}
|
|
1123
|
-
this.
|
|
1124
|
-
|
|
1125
|
-
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
1126
|
-
* can properly scroll contents into view. As a result
|
|
1127
|
-
* we hide the scrollable content until after that frame
|
|
1128
|
-
* so users do not see the content quickly shifting. The downside
|
|
1129
|
-
* is that the content will pop into view a frame after. Maybe there
|
|
1130
|
-
* is a better way to handle this?
|
|
1131
|
-
*/
|
|
1132
|
-
index.writeTask(() => {
|
|
1133
|
-
this.el.classList.add('datetime-ready');
|
|
1134
|
-
});
|
|
1144
|
+
this.hasBeenIntersecting = true;
|
|
1145
|
+
this.markReady();
|
|
1135
1146
|
};
|
|
1136
1147
|
const visibleIO = new IntersectionObserver(visibleCallback, { threshold: 0.01, root: el });
|
|
1137
1148
|
/**
|
|
@@ -1167,6 +1178,11 @@ const Datetime = class {
|
|
|
1167
1178
|
if (ev.isIntersecting) {
|
|
1168
1179
|
return;
|
|
1169
1180
|
}
|
|
1181
|
+
// Ignore the initial "not intersecting" entry IntersectionObserver fires on observe().
|
|
1182
|
+
if (!this.hasBeenIntersecting) {
|
|
1183
|
+
return;
|
|
1184
|
+
}
|
|
1185
|
+
this.hasBeenIntersecting = false;
|
|
1170
1186
|
this.destroyInteractionListeners();
|
|
1171
1187
|
/**
|
|
1172
1188
|
* When datetime is hidden, we need to make sure that
|
|
@@ -1910,7 +1926,7 @@ const Datetime = class {
|
|
|
1910
1926
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1911
1927
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1912
1928
|
helpers.renderHiddenInput(true, el, name, data.formatValue(value), disabled);
|
|
1913
|
-
return (index.h(index.Host, { key: '
|
|
1929
|
+
return (index.h(index.Host, { key: '323c8c2327088f00934b8c93c3306538cb9b5677', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, theme.createColorClasses(color, {
|
|
1914
1930
|
[mode]: true,
|
|
1915
1931
|
['datetime-readonly']: readonly,
|
|
1916
1932
|
['datetime-disabled']: disabled,
|
|
@@ -1920,7 +1936,7 @@ const Datetime = class {
|
|
|
1920
1936
|
[`datetime-size-${size}`]: true,
|
|
1921
1937
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1922
1938
|
[`datetime-grid`]: isGridStyle,
|
|
1923
|
-
})) }, index.h("div", { key: '
|
|
1939
|
+
})) }, index.h("div", { key: '1e0855c8909bc3f1e48a21ad68159fa782060691', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1924
1940
|
}
|
|
1925
1941
|
get el() { return index.getElement(this); }
|
|
1926
1942
|
static get watchers() { return {
|
|
@@ -55,6 +55,12 @@ import { checkForPresentationFormatMismatch, warnIfTimeZoneProvided } from "./ut
|
|
|
55
55
|
export class Datetime {
|
|
56
56
|
constructor() {
|
|
57
57
|
this.inputId = `ion-dt-${datetimeIds++}`;
|
|
58
|
+
/**
|
|
59
|
+
* Set true only by `visibleCallback`. Lets `hiddenCallback` ignore the
|
|
60
|
+
* synthetic "not intersecting" entry IntersectionObserver fires on
|
|
61
|
+
* `observe()` when the host mounts offscreen.
|
|
62
|
+
*/
|
|
63
|
+
this.hasBeenIntersecting = false;
|
|
58
64
|
this.prevPresentation = null;
|
|
59
65
|
this.showMonthAndYear = false;
|
|
60
66
|
this.activeParts = [];
|
|
@@ -617,7 +623,21 @@ export class Datetime {
|
|
|
617
623
|
if (rect.width === 0 || rect.height === 0) {
|
|
618
624
|
return;
|
|
619
625
|
}
|
|
626
|
+
this.markReady();
|
|
627
|
+
};
|
|
628
|
+
this.markReady = () => {
|
|
629
|
+
if (this.el.classList.contains('datetime-ready')) {
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
620
632
|
this.initializeListeners();
|
|
633
|
+
/**
|
|
634
|
+
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
635
|
+
* can properly scroll contents into view. As a result
|
|
636
|
+
* we hide the scrollable content until after that frame
|
|
637
|
+
* so users do not see the content quickly shifting. The downside
|
|
638
|
+
* is that the content will pop into view a frame after. Maybe there
|
|
639
|
+
* is a better way to handle this?
|
|
640
|
+
*/
|
|
621
641
|
writeTask(() => {
|
|
622
642
|
this.el.classList.add('datetime-ready');
|
|
623
643
|
});
|
|
@@ -910,6 +930,7 @@ export class Datetime {
|
|
|
910
930
|
this.clearFocusVisible = undefined;
|
|
911
931
|
}
|
|
912
932
|
this.loadTimeoutCleanup();
|
|
933
|
+
this.hasBeenIntersecting = false;
|
|
913
934
|
}
|
|
914
935
|
initializeListeners() {
|
|
915
936
|
this.initializeCalendarListener();
|
|
@@ -929,18 +950,8 @@ export class Datetime {
|
|
|
929
950
|
if (!ev.isIntersecting) {
|
|
930
951
|
return;
|
|
931
952
|
}
|
|
932
|
-
this.
|
|
933
|
-
|
|
934
|
-
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
935
|
-
* can properly scroll contents into view. As a result
|
|
936
|
-
* we hide the scrollable content until after that frame
|
|
937
|
-
* so users do not see the content quickly shifting. The downside
|
|
938
|
-
* is that the content will pop into view a frame after. Maybe there
|
|
939
|
-
* is a better way to handle this?
|
|
940
|
-
*/
|
|
941
|
-
writeTask(() => {
|
|
942
|
-
this.el.classList.add('datetime-ready');
|
|
943
|
-
});
|
|
953
|
+
this.hasBeenIntersecting = true;
|
|
954
|
+
this.markReady();
|
|
944
955
|
};
|
|
945
956
|
const visibleIO = new IntersectionObserver(visibleCallback, { threshold: 0.01, root: el });
|
|
946
957
|
/**
|
|
@@ -976,6 +987,11 @@ export class Datetime {
|
|
|
976
987
|
if (ev.isIntersecting) {
|
|
977
988
|
return;
|
|
978
989
|
}
|
|
990
|
+
// Ignore the initial "not intersecting" entry IntersectionObserver fires on observe().
|
|
991
|
+
if (!this.hasBeenIntersecting) {
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
this.hasBeenIntersecting = false;
|
|
979
995
|
this.destroyInteractionListeners();
|
|
980
996
|
/**
|
|
981
997
|
* When datetime is hidden, we need to make sure that
|
|
@@ -1719,7 +1735,7 @@ export class Datetime {
|
|
|
1719
1735
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1720
1736
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1721
1737
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1722
|
-
return (h(Host, { key: '
|
|
1738
|
+
return (h(Host, { key: '323c8c2327088f00934b8c93c3306538cb9b5677', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1723
1739
|
[mode]: true,
|
|
1724
1740
|
['datetime-readonly']: readonly,
|
|
1725
1741
|
['datetime-disabled']: disabled,
|
|
@@ -1729,7 +1745,7 @@ export class Datetime {
|
|
|
1729
1745
|
[`datetime-size-${size}`]: true,
|
|
1730
1746
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1731
1747
|
[`datetime-grid`]: isGridStyle,
|
|
1732
|
-
})) }, h("div", { key: '
|
|
1748
|
+
})) }, h("div", { key: '1e0855c8909bc3f1e48a21ad68159fa782060691', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1733
1749
|
}
|
|
1734
1750
|
static get is() { return "ion-datetime"; }
|
|
1735
1751
|
static get encapsulation() { return "shadow"; }
|
package/dist/docs.json
CHANGED
|
@@ -244,6 +244,12 @@ const Datetime = class {
|
|
|
244
244
|
this.ionStyle = createEvent(this, "ionStyle", 7);
|
|
245
245
|
this.ionRender = createEvent(this, "ionRender", 7);
|
|
246
246
|
this.inputId = `ion-dt-${datetimeIds++}`;
|
|
247
|
+
/**
|
|
248
|
+
* Set true only by `visibleCallback`. Lets `hiddenCallback` ignore the
|
|
249
|
+
* synthetic "not intersecting" entry IntersectionObserver fires on
|
|
250
|
+
* `observe()` when the host mounts offscreen.
|
|
251
|
+
*/
|
|
252
|
+
this.hasBeenIntersecting = false;
|
|
247
253
|
this.prevPresentation = null;
|
|
248
254
|
this.showMonthAndYear = false;
|
|
249
255
|
this.activeParts = [];
|
|
@@ -806,7 +812,21 @@ const Datetime = class {
|
|
|
806
812
|
if (rect.width === 0 || rect.height === 0) {
|
|
807
813
|
return;
|
|
808
814
|
}
|
|
815
|
+
this.markReady();
|
|
816
|
+
};
|
|
817
|
+
this.markReady = () => {
|
|
818
|
+
if (this.el.classList.contains('datetime-ready')) {
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
809
821
|
this.initializeListeners();
|
|
822
|
+
/**
|
|
823
|
+
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
824
|
+
* can properly scroll contents into view. As a result
|
|
825
|
+
* we hide the scrollable content until after that frame
|
|
826
|
+
* so users do not see the content quickly shifting. The downside
|
|
827
|
+
* is that the content will pop into view a frame after. Maybe there
|
|
828
|
+
* is a better way to handle this?
|
|
829
|
+
*/
|
|
810
830
|
writeTask(() => {
|
|
811
831
|
this.el.classList.add('datetime-ready');
|
|
812
832
|
});
|
|
@@ -1099,6 +1119,7 @@ const Datetime = class {
|
|
|
1099
1119
|
this.clearFocusVisible = undefined;
|
|
1100
1120
|
}
|
|
1101
1121
|
this.loadTimeoutCleanup();
|
|
1122
|
+
this.hasBeenIntersecting = false;
|
|
1102
1123
|
}
|
|
1103
1124
|
initializeListeners() {
|
|
1104
1125
|
this.initializeCalendarListener();
|
|
@@ -1118,18 +1139,8 @@ const Datetime = class {
|
|
|
1118
1139
|
if (!ev.isIntersecting) {
|
|
1119
1140
|
return;
|
|
1120
1141
|
}
|
|
1121
|
-
this.
|
|
1122
|
-
|
|
1123
|
-
* TODO FW-2793: Datetime needs a frame to ensure that it
|
|
1124
|
-
* can properly scroll contents into view. As a result
|
|
1125
|
-
* we hide the scrollable content until after that frame
|
|
1126
|
-
* so users do not see the content quickly shifting. The downside
|
|
1127
|
-
* is that the content will pop into view a frame after. Maybe there
|
|
1128
|
-
* is a better way to handle this?
|
|
1129
|
-
*/
|
|
1130
|
-
writeTask(() => {
|
|
1131
|
-
this.el.classList.add('datetime-ready');
|
|
1132
|
-
});
|
|
1142
|
+
this.hasBeenIntersecting = true;
|
|
1143
|
+
this.markReady();
|
|
1133
1144
|
};
|
|
1134
1145
|
const visibleIO = new IntersectionObserver(visibleCallback, { threshold: 0.01, root: el });
|
|
1135
1146
|
/**
|
|
@@ -1165,6 +1176,11 @@ const Datetime = class {
|
|
|
1165
1176
|
if (ev.isIntersecting) {
|
|
1166
1177
|
return;
|
|
1167
1178
|
}
|
|
1179
|
+
// Ignore the initial "not intersecting" entry IntersectionObserver fires on observe().
|
|
1180
|
+
if (!this.hasBeenIntersecting) {
|
|
1181
|
+
return;
|
|
1182
|
+
}
|
|
1183
|
+
this.hasBeenIntersecting = false;
|
|
1168
1184
|
this.destroyInteractionListeners();
|
|
1169
1185
|
/**
|
|
1170
1186
|
* When datetime is hidden, we need to make sure that
|
|
@@ -1908,7 +1924,7 @@ const Datetime = class {
|
|
|
1908
1924
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1909
1925
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1910
1926
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1911
|
-
return (h(Host, { key: '
|
|
1927
|
+
return (h(Host, { key: '323c8c2327088f00934b8c93c3306538cb9b5677', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1912
1928
|
[mode]: true,
|
|
1913
1929
|
['datetime-readonly']: readonly,
|
|
1914
1930
|
['datetime-disabled']: disabled,
|
|
@@ -1918,7 +1934,7 @@ const Datetime = class {
|
|
|
1918
1934
|
[`datetime-size-${size}`]: true,
|
|
1919
1935
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1920
1936
|
[`datetime-grid`]: isGridStyle,
|
|
1921
|
-
})) }, h("div", { key: '
|
|
1937
|
+
})) }, h("div", { key: '1e0855c8909bc3f1e48a21ad68159fa782060691', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1922
1938
|
}
|
|
1923
1939
|
get el() { return getElement(this); }
|
|
1924
1940
|
static get watchers() { return {
|