Files
WrenchBoardIonic2023/.angular/cache/14.2.0/babel-webpack/91405e0c02bbcfdedb40b56591afd697.json
T
CHIEFSOFT\ameye cea49e295a first commit
2023-05-12 22:30:08 -04:00

1 line
314 KiB
JSON

{"ast":null,"code":"import _asyncToGenerator from \"D:/MobileDev/WRB/WrenchBoard2023a/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n\n/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, e as createEvent, c as writeTask, h, H as Host, i as getElement } from './index-1a99aeb7.js';\nimport { c as chevronBack, o as chevronForward, l as chevronDown, p as caretUpSharp, q as caretDownSharp } from './index-45ecc7ca.js';\nimport { b as getIonMode } from './ionic-global-04e268e7.js';\nimport { startFocusVisible } from './focus-visible-5ad6825d.js';\nimport { r as raf, e as renderHiddenInput, g as getElementRoot, l as clamp } from './helpers-4d272360.js';\nimport { p as printIonWarning, b as printIonError } from './index-c4b11676.js';\nimport { i as isRTL } from './dir-e8b767a8.js';\nimport { c as createColorClasses, g as getClassMap } from './theme-7670341c.js';\nimport { g as generateDayAriaLabel, i as isBefore, a as isAfter, b as isSameDay, c as getPreviousMonth, d as getNextMonth, p as parseDate, e as getToday, f as getPartsFromCalendarDay, h as getEndOfWeek, j as getStartOfWeek, k as getPreviousDay, l as getNextDay, m as getPreviousWeek, n as getNextWeek, w as warnIfValueOutOfBounds, o as convertToArrayOfNumbers, q as convertDataToISO, r as getCombinedDateColumnData, s as getMonthColumnData, t as getDayColumnData, u as getYearColumnData, v as isMonthFirstLocale, x as getTimeColumnsData, y as isLocaleDayPeriodRTL, z as getDaysOfWeek, A as getMonthAndYear, B as getDaysOfMonth, C as generateMonths, D as is24Hour, E as getLocalizedTime, F as getMonthAndDay, G as formatValue, H as getNextYear, I as getPreviousYear, J as clampDate, K as parseAmPm, L as calculateHourFromAMPM } from './parse-26477881.js';\nimport { B as BACKDROP, i as isCancel, e as prepareOverlay, d as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-f469834d.js';\nimport { c as createAnimation } from './animation-36c1d77d.js';\nimport { b as hapticSelectionChanged, h as hapticSelectionEnd, a as hapticSelectionStart } from './haptic-683b3b3c.js';\nimport './hardware-back-button-490df115.js';\n\nconst isYearDisabled = (refYear, minParts, maxParts) => {\n if (minParts && minParts.year > refYear) {\n return true;\n }\n\n if (maxParts && maxParts.year < refYear) {\n return true;\n }\n\n return false;\n};\n/**\n * Returns true if a given day should\n * not be interactive according to its value,\n * or the max/min dates.\n */\n\n\nconst isDayDisabled = (refParts, minParts, maxParts, dayValues) => {\n /**\n * If this is a filler date (i.e. padding)\n * then the date is disabled.\n */\n if (refParts.day === null) {\n return true;\n }\n /**\n * If user passed in a list of acceptable day values\n * check to make sure that the date we are looking\n * at is in this array.\n */\n\n\n if (dayValues !== undefined && !dayValues.includes(refParts.day)) {\n return true;\n }\n /**\n * Given a min date, perform the following\n * checks. If any of them are true, then the\n * day should be disabled:\n * 1. Is the current year < the min allowed year?\n * 2. Is the current year === min allowed year,\n * but the current month < the min allowed month?\n * 3. Is the current year === min allowed year, the\n * current month === min allow month, but the current\n * day < the min allowed day?\n */\n\n\n if (minParts && isBefore(refParts, minParts)) {\n return true;\n }\n /**\n * Given a max date, perform the following\n * checks. If any of them are true, then the\n * day should be disabled:\n * 1. Is the current year > the max allowed year?\n * 2. Is the current year === max allowed year,\n * but the current month > the max allowed month?\n * 3. Is the current year === max allowed year, the\n * current month === max allow month, but the current\n * day > the max allowed day?\n */\n\n\n if (maxParts && isAfter(refParts, maxParts)) {\n return true;\n }\n /**\n * If none of these checks\n * passed then the date should\n * be interactive.\n */\n\n\n return false;\n};\n/**\n * Given a locale, a date, the selected date(s), and today's date,\n * generate the state for a given calendar day button.\n */\n\n\nconst getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues) => {\n /**\n * activeParts signals what day(s) are currently selected in the datetime.\n * If multiple=\"true\", this will be an array, but the logic in this util\n * is the same whether we have one selected day or many because we're only\n * calculating the state for one button. So, we treat a single activeParts value\n * the same as an array of length one.\n */\n const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];\n /**\n * The day button is active if it is selected, or in other words, if refParts\n * matches at least one selected date.\n */\n\n const isActive = activePartsArray.find(parts => isSameDay(refParts, parts)) !== undefined;\n const isToday = isSameDay(refParts, todayParts);\n const disabled = isDayDisabled(refParts, minParts, maxParts, dayValues);\n /**\n * Note that we always return one object regardless of whether activeParts\n * was an array, since we pare down to one value for isActive.\n */\n\n return {\n disabled,\n isActive,\n isToday,\n ariaSelected: isActive ? 'true' : null,\n ariaLabel: generateDayAriaLabel(locale, isToday, refParts)\n };\n};\n/**\n * Returns `true` if the month is disabled given the\n * current date value and min/max date constraints.\n */\n\n\nconst isMonthDisabled = (refParts, {\n minParts,\n maxParts\n}) => {\n // If the year is disabled then the month is disabled.\n if (isYearDisabled(refParts.year, minParts, maxParts)) {\n return true;\n } // If the date value is before the min date, then the month is disabled.\n // If the date value is after the max date, then the month is disabled.\n\n\n if (minParts && isBefore(refParts, minParts) || maxParts && isAfter(refParts, maxParts)) {\n return true;\n }\n\n return false;\n};\n/**\n * Given a working date, an optional minimum date range,\n * and an optional maximum date range; determine if the\n * previous navigation button is disabled.\n */\n\n\nconst isPrevMonthDisabled = (refParts, minParts, maxParts) => {\n const prevMonth = Object.assign(Object.assign({}, getPreviousMonth(refParts)), {\n day: null\n });\n return isMonthDisabled(prevMonth, {\n minParts,\n maxParts\n });\n};\n/**\n * Given a working date and a maximum date range,\n * determine if the next navigation button is disabled.\n */\n\n\nconst isNextMonthDisabled = (refParts, maxParts) => {\n const nextMonth = Object.assign(Object.assign({}, getNextMonth(refParts)), {\n day: null\n });\n return isMonthDisabled(nextMonth, {\n maxParts\n });\n};\n\nconst datetimeIosCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}: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}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){: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{left:-99999px;position:absolute;visibility:hidden;pointer-events:none}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){: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-readonly),:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled){opacity:0.4}: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}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .calendar-action-buttons ion-item ion-icon{padding-left:4px;padding-right:0;padding-top:0;padding-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-action-buttons ion-item ion-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}: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{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);height:100%}:host .calendar-day{padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;margin-left:0px;margin-right: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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{margin-left:unset;margin-right:unset;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px}}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}:host .calendar-day:after{border-radius:32px;padding-left:4px;padding-right:4px;padding-top:4px;padding-bottom:4px;position:absolute;top:50%;left:50%;width:32px;height:32px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\\\" \\\";z-index:-1}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day:after{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}: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;padding-left:12px;padding-right:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-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}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .time-body{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-light, #ffffff);--background-rgb:var(--ion-color-light-rgb);--title-color:var(--ion-color-step-600, #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{padding-left:16px;padding-right:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, #cccccc)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-header{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host .datetime-header .datetime-title{color:var(--title-color);font-size:14px}:host .calendar-action-buttons ion-item{--padding-start:16px;--background-hover:transparent;--background-activated:transparent;font-size:16px;font-weight:600}:host .calendar-action-buttons ion-item ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}: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{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, #b3b3b3);font-size:12px;font-weight:600;line-height:24px;text-transform:uppercase}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-days-of-week{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}:host .calendar-body .calendar-month .calendar-month-grid{padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;height:calc(100% - 16px)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-body .calendar-month .calendar-month-grid{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}:host .calendar-day{font-size:20px}:host .calendar-day:after{opacity:0.2}:host .calendar-day:focus:after{background:var(--ion-color-base)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-active:after{background:var(--ion-color-base)}:host .calendar-day.calendar-day-today.calendar-day-active{color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-today.calendar-day-active:after{background:var(--ion-color-base);opacity:1}:host .datetime-time{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:16px;font-size:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-time{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, #cccccc)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-buttons{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}: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%}\";\nconst datetimeMdCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}: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}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){: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{left:-99999px;position:absolute;visibility:hidden;pointer-events:none}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){: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-readonly),:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled){opacity:0.4}: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}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .calendar-action-buttons ion-item ion-icon{padding-left:4px;padding-right:0;padding-top:0;padding-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-action-buttons ion-item ion-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}: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{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);height:100%}:host .calendar-day{padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;margin-left:0px;margin-right: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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{margin-left:unset;margin-right:unset;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px}}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}:host .calendar-day:after{border-radius:32px;padding-left:4px;padding-right:4px;padding-top:4px;padding-bottom:4px;position:absolute;top:50%;left:50%;width:32px;height:32px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\\\" \\\";z-index:-1}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day:after{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}: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;padding-left:12px;padding-right:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-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}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .time-body{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-step-100, #ffffff);--title-color:var(--ion-color-contrast)}:host .datetime-header{padding-left:20px;padding-right:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-header{padding-left:unset;padding-right:unset;-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px}}:host .datetime-header .datetime-title{font-size:12px;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:34px}:host .datetime-calendar .calendar-action-buttons ion-item{--padding-start:20px}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{color:var(--ion-color-step-650, #595959)}:host .calendar-days-of-week{padding-left:10px;padding-right:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, gray);font-size:14px;line-height:36px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-days-of-week{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}:host .calendar-body .calendar-month .calendar-month-grid{padding-left:10px;padding-right:10px;padding-top:3px;padding-bottom:0px;grid-template-rows:repeat(6, 1fr)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-body .calendar-month .calendar-month-grid{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}:host .calendar-day{padding-left:0px;padding-right:0;padding-top:13px;padding-bottom:13px;font-size:14px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-day:focus:after{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 .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-today:after{border:1px solid var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-active:after{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .datetime-time{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-time{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host .time-header{color:var(--ion-color-step-650, #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{padding-left:10px;padding-right: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}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-buttons{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}:host .datetime-view-buttons ion-button{color:var(--ion-color-step-800, #333333)}\";\nconst Datetime = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionCancel = createEvent(this, \"ionCancel\", 7);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionRender = createEvent(this, \"ionRender\", 7);\n this.inputId = `ion-dt-${datetimeIds++}`;\n /**\n * Whether to highlight the active day with a solid circle (as opposed\n * to the outline circle around today). If you don't specify an initial\n * value for the datetime, it doesn't automatically init to a default to\n * avoid unwanted change events firing. If the solid circle were still\n * shown then, it would look like a date had already been selected, which\n * is misleading UX.\n */\n\n this.highlightActiveParts = false;\n this.todayParts = parseDate(getToday());\n this.prevPresentation = null;\n this.showMonthAndYear = false;\n this.activeParts = {\n month: 5,\n day: 28,\n year: 2021,\n hour: 13,\n minute: 52,\n ampm: 'pm'\n };\n this.workingParts = {\n month: 5,\n day: 28,\n year: 2021,\n hour: 13,\n minute: 52,\n ampm: 'pm'\n };\n this.isPresented = false;\n this.isTimePopoverOpen = false;\n /**\n * The color to use from your application's color palette.\n * Default options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\n * For more information on colors, see [theming](/docs/theming/basics).\n */\n\n this.color = 'primary';\n /**\n * The name of the control, which is submitted with the form data.\n */\n\n this.name = this.inputId;\n /**\n * If `true`, the user cannot interact with the datetime.\n */\n\n this.disabled = false;\n /**\n * If `true`, the datetime appears normal but is not interactive.\n */\n\n this.readonly = false;\n /**\n * Which values you want to select. `'date'` will show\n * a calendar picker to select the month, day, and year. `'time'`\n * will show a time picker to select the hour, minute, and (optionally)\n * AM/PM. `'date-time'` will show the date picker first and time picker second.\n * `'time-date'` will show the time picker first and date picker second.\n */\n\n this.presentation = 'date-time';\n /**\n * The text to display on the picker's cancel button.\n */\n\n this.cancelText = 'Cancel';\n /**\n * The text to display on the picker's \"Done\" button.\n */\n\n this.doneText = 'Done';\n /**\n * The text to display on the picker's \"Clear\" button.\n */\n\n this.clearText = 'Clear';\n /**\n * The locale to use for `ion-datetime`. This\n * impacts month and day name formatting.\n * The `'default'` value refers to the default\n * locale set by your device.\n */\n\n this.locale = 'default';\n /**\n * The first day of the week to use for `ion-datetime`. The\n * default value is `0` and represents Sunday.\n */\n\n this.firstDayOfWeek = 0;\n /**\n * If `true`, multiple dates can be selected at once. Only\n * applies to `presentation=\"date\"` and `preferWheel=\"false\"`.\n */\n\n this.multiple = false;\n /**\n * If `true`, a header will be shown above the calendar\n * picker. On `ios` mode this will include the\n * slotted title, and on `md` mode this will include\n * the slotted title and the selected date.\n */\n\n this.showDefaultTitle = false;\n /**\n * If `true`, the default \"Cancel\" and \"OK\" buttons\n * will be rendered at the bottom of the `ion-datetime`\n * component. Developers can also use the `button` slot\n * if they want to customize these buttons. If custom\n * buttons are set in the `button` slot then the\n * default buttons will not be rendered.\n */\n\n this.showDefaultButtons = false;\n /**\n * If `true`, a \"Clear\" button will be rendered alongside\n * the default \"Cancel\" and \"OK\" buttons at the bottom of the `ion-datetime`\n * component. Developers can also use the `button` slot\n * if they want to customize these buttons. If custom\n * buttons are set in the `button` slot then the\n * default buttons will not be rendered.\n */\n\n this.showClearButton = false;\n /**\n * If `true`, the default \"Time\" label will be rendered\n * for the time selector of the `ion-datetime` component.\n * Developers can also use the `time-label` slot\n * if they want to customize this label. If a custom\n * label is set in the `time-label` slot then the\n * default label will not be rendered.\n */\n\n this.showDefaultTimeLabel = true;\n /**\n * If `cover`, the `ion-datetime` will expand to cover the full width of its container.\n * If `fixed`, the `ion-datetime` will have a fixed width.\n */\n\n this.size = 'fixed';\n /**\n * If `true`, a wheel picker will be rendered instead of a calendar grid\n * where possible. If `false`, a calendar grid will be rendered instead of\n * a wheel picker where possible.\n *\n * A wheel picker can be rendered instead of a grid when `presentation` is\n * one of the following values: `'date'`, `'date-time'`, or `'time-date'`.\n *\n * A wheel picker will always be rendered regardless of\n * the `preferWheel` value when `presentation` is one of the following values:\n * `'time'`, `'month'`, `'month-year'`, or `'year'`.\n */\n\n this.preferWheel = false;\n\n this.closeParentOverlay = () => {\n const popoverOrModal = this.el.closest('ion-modal, ion-popover');\n\n if (popoverOrModal) {\n popoverOrModal.dismiss();\n }\n };\n\n this.setWorkingParts = parts => {\n this.workingParts = Object.assign({}, parts);\n };\n\n this.setActiveParts = (parts, removeDate = false) => {\n const {\n multiple,\n activePartsClone,\n highlightActiveParts\n } = this;\n\n if (multiple) {\n /**\n * We read from activePartsClone here because valueChanged() only updates that,\n * so it's the more reliable source of truth. If we read from activeParts, then\n * if you click July 1, manually set the value to July 2, and then click July 3,\n * the new value would be [July 1, July 3], ignoring the value set.\n *\n * We can then pass the new value to activeParts (rather than activePartsClone)\n * since the clone will be updated automatically by activePartsChanged().\n */\n const activePartsArray = Array.isArray(activePartsClone) ? activePartsClone : [activePartsClone];\n\n if (removeDate) {\n this.activeParts = activePartsArray.filter(p => !isSameDay(p, parts));\n } else if (highlightActiveParts) {\n this.activeParts = [...activePartsArray, parts];\n } else {\n /**\n * If highlightActiveParts is false, that means we just have a\n * default value of today in activeParts; we need to replace that\n * rather than adding to it since it's just a placeholder.\n */\n this.activeParts = [parts];\n }\n } else {\n this.activeParts = Object.assign({}, parts);\n }\n /**\n * Now that the user has interacted somehow to select something, we can\n * show the solid highlight. This needs to be done after checking it above,\n * but before the confirm call below.\n *\n * Note that for datetimes with confirm/cancel buttons, the value\n * isn't updated until you call confirm(). We need to bring the\n * solid circle back on day click for UX reasons, rather than only\n * show the circle if `value` is truthy.\n */\n\n\n this.highlightActiveParts = true;\n const hasSlottedButtons = this.el.querySelector('[slot=\"buttons\"]') !== null;\n\n if (hasSlottedButtons || this.showDefaultButtons) {\n return;\n }\n\n this.confirm();\n };\n /**\n * Stencil sometimes sets calendarBodyRef to null on rerender, even though\n * the element is present. Query for it manually as a fallback.\n *\n * TODO(FW-901) Remove when issue is resolved: https://github.com/ionic-team/stencil/issues/3253\n */\n\n\n this.getCalendarBodyEl = () => {\n var _a;\n\n return this.calendarBodyRef || ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.calendar-body'));\n };\n\n this.initializeKeyboardListeners = () => {\n const calendarBodyRef = this.getCalendarBodyEl();\n\n if (!calendarBodyRef) {\n return;\n }\n\n const root = this.el.shadowRoot;\n /**\n * Get a reference to the month\n * element we are currently viewing.\n */\n\n const currentMonth = calendarBodyRef.querySelector('.calendar-month:nth-of-type(2)');\n /**\n * When focusing the calendar body, we want to pass focus\n * to the working day, but other days should\n * only be accessible using the arrow keys. Pressing\n * Tab should jump between bodies of selectable content.\n */\n\n const checkCalendarBodyFocus = ev => {\n var _a;\n\n const record = ev[0];\n /**\n * If calendar body was already focused\n * when this fired or if the calendar body\n * if not currently focused, we should not re-focus\n * the inner day.\n */\n\n if (((_a = record.oldValue) === null || _a === void 0 ? void 0 : _a.includes('ion-focused')) || !calendarBodyRef.classList.contains('ion-focused')) {\n return;\n }\n\n this.focusWorkingDay(currentMonth);\n };\n\n const mo = new MutationObserver(checkCalendarBodyFocus);\n mo.observe(calendarBodyRef, {\n attributeFilter: ['class'],\n attributeOldValue: true\n });\n\n this.destroyKeyboardMO = () => {\n mo === null || mo === void 0 ? void 0 : mo.disconnect();\n };\n /**\n * We must use keydown not keyup as we want\n * to prevent scrolling when using the arrow keys.\n */\n\n\n calendarBodyRef.addEventListener('keydown', ev => {\n const activeElement = root.activeElement;\n\n if (!activeElement || !activeElement.classList.contains('calendar-day')) {\n return;\n }\n\n const parts = getPartsFromCalendarDay(activeElement);\n let partsToFocus;\n\n switch (ev.key) {\n case 'ArrowDown':\n ev.preventDefault();\n partsToFocus = getNextWeek(parts);\n break;\n\n case 'ArrowUp':\n ev.preventDefault();\n partsToFocus = getPreviousWeek(parts);\n break;\n\n case 'ArrowRight':\n ev.preventDefault();\n partsToFocus = getNextDay(parts);\n break;\n\n case 'ArrowLeft':\n ev.preventDefault();\n partsToFocus = getPreviousDay(parts);\n break;\n\n case 'Home':\n ev.preventDefault();\n partsToFocus = getStartOfWeek(parts);\n break;\n\n case 'End':\n ev.preventDefault();\n partsToFocus = getEndOfWeek(parts);\n break;\n\n case 'PageUp':\n ev.preventDefault();\n partsToFocus = ev.shiftKey ? getPreviousYear(parts) : getPreviousMonth(parts);\n break;\n\n case 'PageDown':\n ev.preventDefault();\n partsToFocus = ev.shiftKey ? getNextYear(parts) : getNextMonth(parts);\n break;\n\n /**\n * Do not preventDefault here\n * as we do not want to override other\n * browser defaults such as pressing Enter/Space\n * to select a day.\n */\n\n default:\n return;\n }\n /**\n * If the day we want to move focus to is\n * disabled, do not do anything.\n */\n\n\n if (isDayDisabled(partsToFocus, this.minParts, this.maxParts)) {\n return;\n }\n\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), partsToFocus));\n /**\n * Give view a chance to re-render\n * then move focus to the new working day\n */\n\n requestAnimationFrame(() => this.focusWorkingDay(currentMonth));\n });\n };\n\n this.focusWorkingDay = currentMonth => {\n /**\n * Get the number of padding days so\n * we know how much to offset our next selector by\n * to grab the correct calenday-day element.\n */\n const padding = currentMonth.querySelectorAll('.calendar-day-padding');\n const {\n day\n } = this.workingParts;\n\n if (day === null) {\n return;\n }\n /**\n * Get the calendar day element\n * and focus it.\n */\n\n\n const dayEl = currentMonth.querySelector(`.calendar-day:nth-of-type(${padding.length + day})`);\n\n if (dayEl) {\n dayEl.focus();\n }\n };\n\n this.processMinParts = () => {\n if (this.min === undefined) {\n this.minParts = undefined;\n return;\n }\n\n const {\n month,\n day,\n year,\n hour,\n minute\n } = parseDate(this.min);\n this.minParts = {\n month,\n day,\n year,\n hour,\n minute\n };\n };\n\n this.processMaxParts = () => {\n if (this.max === undefined) {\n this.maxParts = undefined;\n return;\n }\n\n const {\n month,\n day,\n year,\n hour,\n minute\n } = parseDate(this.max);\n this.maxParts = {\n month,\n day,\n year,\n hour,\n minute\n };\n };\n\n this.initializeCalendarListener = () => {\n const calendarBodyRef = this.getCalendarBodyEl();\n\n if (!calendarBodyRef) {\n return;\n }\n /**\n * For performance reasons, we only render 3\n * months at a time: The current month, the previous\n * month, and the next month. We have a scroll listener\n * on the calendar body to append/prepend new months.\n *\n * We can do this because Stencil is smart enough to not\n * re-create the .calendar-month containers, but rather\n * update the content within those containers.\n *\n * As an added bonus, WebKit has some troubles with\n * scroll-snap-stop: always, so not rendering all of\n * the months in a row allows us to mostly sidestep\n * that issue.\n */\n\n\n const months = calendarBodyRef.querySelectorAll('.calendar-month');\n const startMonth = months[0];\n const workingMonth = months[1];\n const endMonth = months[2];\n const mode = getIonMode(this);\n const needsiOSRubberBandFix = mode === 'ios' && typeof navigator !== 'undefined' && navigator.maxTouchPoints > 1;\n /**\n * Before setting up the scroll listener,\n * scroll the middle month into view.\n * scrollIntoView() will scroll entire page\n * if element is not in viewport. Use scrollLeft instead.\n */\n\n writeTask(() => {\n calendarBodyRef.scrollLeft = startMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n\n const getChangedMonth = parts => {\n const box = calendarBodyRef.getBoundingClientRect();\n const root = this.el.shadowRoot;\n /**\n * Get the element that is in the center of the calendar body.\n * This will be an element inside of the active month.\n */\n\n const elementAtCenter = root.elementFromPoint(box.x + box.width / 2, box.y + box.height / 2);\n /**\n * If there is no element then the\n * component may be re-rendering on a slow device.\n */\n\n if (!elementAtCenter) return;\n const month = elementAtCenter.closest('.calendar-month');\n if (!month) return;\n /**\n * The edge of the month must be lined up with\n * the edge of the calendar body in order for\n * the component to update. Otherwise, it\n * may be the case that the user has paused their\n * swipe or the browser has not finished snapping yet.\n * Rather than check if the x values are equal,\n * we give it a tolerance of 2px to account for\n * sub pixel rendering.\n */\n\n const monthBox = month.getBoundingClientRect();\n if (Math.abs(monthBox.x - box.x) > 2) return;\n /**\n * From here, we can determine if the start\n * month or the end month was scrolled into view.\n * If no month was changed, then we can return from\n * the scroll callback early.\n */\n\n if (month === startMonth) {\n return getPreviousMonth(parts);\n } else if (month === endMonth) {\n return getNextMonth(parts);\n } else {\n return;\n }\n };\n\n const updateActiveMonth = () => {\n if (needsiOSRubberBandFix) {\n calendarBodyRef.style.removeProperty('pointer-events');\n appliediOSRubberBandFix = false;\n }\n /**\n * If the month did not change\n * then we can return early.\n */\n\n\n const newDate = getChangedMonth(this.workingParts);\n if (!newDate) return;\n const {\n month,\n day,\n year\n } = newDate;\n\n if (isMonthDisabled({\n month,\n year,\n day: null\n }, {\n minParts: Object.assign(Object.assign({}, this.minParts), {\n day: null\n }),\n maxParts: Object.assign(Object.assign({}, this.maxParts), {\n day: null\n })\n })) {\n return;\n }\n /**\n * Prevent scrolling for other browsers\n * to give the DOM time to update and the container\n * time to properly snap.\n */\n\n\n calendarBodyRef.style.setProperty('overflow', 'hidden');\n /**\n * Use a writeTask here to ensure\n * that the state is updated and the\n * correct month is scrolled into view\n * in the same frame. This is not\n * typically a problem on newer devices\n * but older/slower device may have a flicker\n * if we did not do this.\n */\n\n writeTask(() => {\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), {\n month,\n day: day,\n year\n }));\n calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n calendarBodyRef.style.removeProperty('overflow');\n });\n };\n /**\n * When the container finishes scrolling we\n * need to update the DOM with the selected month.\n */\n\n\n let scrollTimeout;\n /**\n * We do not want to attempt to set pointer-events\n * multiple times within a single swipe gesture as\n * that adds unnecessary work to the main thread.\n */\n\n let appliediOSRubberBandFix = false;\n\n const scrollCallback = () => {\n if (scrollTimeout) {\n clearTimeout(scrollTimeout);\n }\n /**\n * On iOS it is possible to quickly rubber band\n * the scroll area before the scroll timeout has fired.\n * This results in users reaching the end of the scrollable\n * container before the DOM has updated.\n * By setting `pointer-events: none` we can ensure that\n * subsequent swipes do not happen while the container\n * is snapping.\n */\n\n\n if (!appliediOSRubberBandFix && needsiOSRubberBandFix) {\n calendarBodyRef.style.setProperty('pointer-events', 'none');\n appliediOSRubberBandFix = true;\n } // Wait ~3 frames\n\n\n scrollTimeout = setTimeout(updateActiveMonth, 50);\n };\n\n calendarBodyRef.addEventListener('scroll', scrollCallback);\n\n this.destroyCalendarListener = () => {\n calendarBodyRef.removeEventListener('scroll', scrollCallback);\n };\n });\n };\n /**\n * Clean up all listeners except for the overlay\n * listener. This is so that we can re-create the listeners\n * if the datetime has been hidden/presented by a modal or popover.\n */\n\n\n this.destroyInteractionListeners = () => {\n const {\n destroyCalendarListener,\n destroyKeyboardMO\n } = this;\n\n if (destroyCalendarListener !== undefined) {\n destroyCalendarListener();\n }\n\n if (destroyKeyboardMO !== undefined) {\n destroyKeyboardMO();\n }\n };\n\n this.processValue = value => {\n this.highlightActiveParts = !!value;\n let valueToProcess = parseDate(value || getToday());\n const {\n minParts,\n maxParts,\n multiple\n } = this;\n\n if (!multiple && Array.isArray(value)) {\n this.value = value[0];\n valueToProcess = valueToProcess[0];\n }\n\n warnIfValueOutOfBounds(valueToProcess, minParts, maxParts);\n /**\n * If there are multiple values, pick an arbitrary one to clamp to. This way,\n * if the values are across months, we always show at least one of them. Note\n * that the values don't necessarily have to be in order.\n */\n\n const singleValue = Array.isArray(valueToProcess) ? valueToProcess[0] : valueToProcess;\n const {\n month,\n day,\n year,\n hour,\n minute,\n tzOffset\n } = clampDate(singleValue, minParts, maxParts);\n const ampm = parseAmPm(hour);\n this.setWorkingParts({\n month,\n day,\n year,\n hour,\n minute,\n tzOffset,\n ampm\n });\n\n if (Array.isArray(valueToProcess)) {\n this.activeParts = [...valueToProcess];\n } else {\n this.activeParts = {\n month,\n day,\n year,\n hour,\n minute,\n tzOffset,\n ampm\n };\n }\n };\n\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n\n this.hasValue = () => {\n return this.value != null && this.value !== '';\n };\n\n this.nextMonth = () => {\n const calendarBodyRef = this.getCalendarBodyEl();\n\n if (!calendarBodyRef) {\n return;\n }\n\n const nextMonth = calendarBodyRef.querySelector('.calendar-month:last-of-type');\n\n if (!nextMonth) {\n return;\n }\n\n const left = nextMonth.offsetWidth * 2;\n calendarBodyRef.scrollTo({\n top: 0,\n left: left * (isRTL(this.el) ? -1 : 1),\n behavior: 'smooth'\n });\n };\n\n this.prevMonth = () => {\n const calendarBodyRef = this.getCalendarBodyEl();\n\n if (!calendarBodyRef) {\n return;\n }\n\n const prevMonth = calendarBodyRef.querySelector('.calendar-month:first-of-type');\n\n if (!prevMonth) {\n return;\n }\n\n calendarBodyRef.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n };\n\n this.toggleMonthAndYearView = () => {\n this.showMonthAndYear = !this.showMonthAndYear;\n };\n }\n\n disabledChanged() {\n this.emitStyle();\n }\n\n minChanged() {\n this.processMinParts();\n }\n\n maxChanged() {\n this.processMaxParts();\n }\n\n yearValuesChanged() {\n this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);\n }\n\n monthValuesChanged() {\n this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues);\n }\n\n dayValuesChanged() {\n this.parsedDayValues = convertToArrayOfNumbers(this.dayValues);\n }\n\n hourValuesChanged() {\n this.parsedHourValues = convertToArrayOfNumbers(this.hourValues);\n }\n\n minuteValuesChanged() {\n this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues);\n }\n\n activePartsChanged() {\n this.activePartsClone = this.activeParts;\n }\n /**\n * Update the datetime value when the value changes\n */\n\n\n valueChanged() {\n const {\n value,\n minParts,\n maxParts,\n workingParts,\n multiple\n } = this;\n\n if (this.hasValue()) {\n if (!multiple && Array.isArray(value)) {\n this.value = value[0];\n return; // setting this.value will trigger re-run of this function\n }\n /**\n * Clones the value of the `activeParts` to the private clone, to update\n * the date display on the current render cycle without causing another render.\n *\n * This allows us to update the current value's date/time display without\n * refocusing or shifting the user's display (leaves the user in place).\n */\n\n\n const valueDateParts = parseDate(value);\n\n if (valueDateParts) {\n warnIfValueOutOfBounds(valueDateParts, minParts, maxParts);\n\n if (Array.isArray(valueDateParts)) {\n this.activePartsClone = [...valueDateParts];\n } else {\n const {\n month,\n day,\n year,\n hour,\n minute\n } = valueDateParts;\n const ampm = hour != null ? hour >= 12 ? 'pm' : 'am' : undefined;\n this.activePartsClone = Object.assign(Object.assign({}, this.activeParts), {\n month,\n day,\n year,\n hour,\n minute,\n ampm\n });\n /**\n * The working parts am/pm value must be updated when the value changes, to\n * ensure the time picker hour column values are generated correctly.\n *\n * Note that we don't need to do this if valueDateParts is an array, since\n * multiple=\"true\" does not apply to time pickers.\n */\n\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n ampm\n }));\n }\n } else {\n printIonWarning(`Unable to parse date string: ${value}. Please provide a valid ISO 8601 datetime string.`);\n }\n }\n\n this.emitStyle();\n this.ionChange.emit({\n value\n });\n }\n /**\n * Confirms the selected datetime value, updates the\n * `value` property, and optionally closes the popover\n * or modal that the datetime was presented in.\n */\n\n\n confirm(closeOverlay = false) {\n var _this = this;\n\n return _asyncToGenerator(function* () {\n const {\n highlightActiveParts,\n isCalendarPicker,\n activeParts\n } = _this;\n /**\n * We only update the value if the presentation is not a calendar picker,\n * or if `highlightActiveParts` is true; indicating that the user\n * has selected a date from the calendar picker.\n *\n * Otherwise \"today\" would accidentally be set as the value.\n */\n\n if (highlightActiveParts || !isCalendarPicker) {\n const activePartsIsArray = Array.isArray(activeParts);\n\n if (activePartsIsArray && activeParts.length === 0) {\n _this.value = undefined;\n } else {\n /**\n * Prevent convertDataToISO from doing any\n * kind of transformation based on timezone\n * This cancels out any change it attempts to make\n *\n * Important: Take the timezone offset based on\n * the date that is currently selected, otherwise\n * there can be 1 hr difference when dealing w/ DST\n */\n if (activePartsIsArray) {\n const dates = convertDataToISO(activeParts).map(str => new Date(str));\n\n for (let i = 0; i < dates.length; i++) {\n activeParts[i].tzOffset = dates[i].getTimezoneOffset() * -1;\n }\n } else {\n const date = new Date(convertDataToISO(activeParts));\n activeParts.tzOffset = date.getTimezoneOffset() * -1;\n }\n\n _this.value = convertDataToISO(activeParts);\n }\n }\n\n if (closeOverlay) {\n _this.closeParentOverlay();\n }\n })();\n }\n /**\n * Resets the internal state of the datetime but does not update the value.\n * Passing a valid ISO-8601 string will reset the state of the component to the provided date.\n * If no value is provided, the internal state will be reset to the clamped value of the min, max and today.\n */\n\n\n reset(startDate) {\n var _this2 = this;\n\n return _asyncToGenerator(function* () {\n _this2.processValue(startDate);\n })();\n }\n /**\n * Emits the ionCancel event and\n * optionally closes the popover\n * or modal that the datetime was\n * presented in.\n */\n\n\n cancel(closeOverlay = false) {\n var _this3 = this;\n\n return _asyncToGenerator(function* () {\n _this3.ionCancel.emit();\n\n if (closeOverlay) {\n _this3.closeParentOverlay();\n }\n })();\n }\n\n get isCalendarPicker() {\n const {\n presentation\n } = this;\n return presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n }\n\n connectedCallback() {\n this.clearFocusVisible = startFocusVisible(this.el).destroy;\n }\n\n disconnectedCallback() {\n if (this.clearFocusVisible) {\n this.clearFocusVisible();\n this.clearFocusVisible = undefined;\n }\n }\n\n initializeListeners() {\n this.initializeCalendarListener();\n this.initializeKeyboardListeners();\n }\n\n componentDidLoad() {\n /**\n * If a scrollable element is hidden using `display: none`,\n * it will not have a scroll height meaning we cannot scroll elements\n * into view. As a result, we will need to wait for the datetime to become\n * visible if used inside of a modal or a popover otherwise the scrollable\n * areas will not have the correct values snapped into place.\n */\n const visibleCallback = entries => {\n const ev = entries[0];\n\n if (!ev.isIntersecting) {\n return;\n }\n\n this.initializeListeners();\n /**\n * TODO: Datetime needs a frame to ensure that it\n * can properly scroll contents into view. As a result\n * we hide the scrollable content until after that frame\n * so users do not see the content quickly shifting. The downside\n * is that the content will pop into view a frame after. Maybe there\n * is a better way to handle this?\n */\n\n writeTask(() => {\n this.el.classList.add('datetime-ready');\n });\n };\n\n const visibleIO = new IntersectionObserver(visibleCallback, {\n threshold: 0.01\n });\n /**\n * Use raf to avoid a race condition between the component loading and\n * its display animation starting (such as when shown in a modal). This\n * could cause the datetime to start at a visibility of 0, erroneously\n * triggering the `hiddenIO` observer below.\n */\n\n raf(() => visibleIO === null || visibleIO === void 0 ? void 0 : visibleIO.observe(this.el));\n /**\n * We need to clean up listeners when the datetime is hidden\n * in a popover/modal so that we can properly scroll containers\n * back into view if they are re-presented. When the datetime is hidden\n * the scroll areas have scroll widths/heights of 0px, so any snapping\n * we did originally has been lost.\n */\n\n const hiddenCallback = entries => {\n const ev = entries[0];\n\n if (ev.isIntersecting) {\n return;\n }\n\n this.destroyInteractionListeners();\n /**\n * When datetime is hidden, we need to make sure that\n * the month/year picker is closed. Otherwise,\n * it will be open when the datetime re-appears\n * and the scroll area of the calendar grid will be 0.\n * As a result, the wrong month will be shown.\n */\n\n this.showMonthAndYear = false;\n writeTask(() => {\n this.el.classList.remove('datetime-ready');\n });\n };\n\n const hiddenIO = new IntersectionObserver(hiddenCallback, {\n threshold: 0\n });\n raf(() => hiddenIO === null || hiddenIO === void 0 ? void 0 : hiddenIO.observe(this.el));\n /**\n * Datetime uses Ionic components that emit\n * ionFocus and ionBlur. These events are\n * composed meaning they will cross\n * the shadow dom boundary. We need to\n * stop propagation on these events otherwise\n * developers will see 2 ionFocus or 2 ionBlur\n * events at a time.\n */\n\n const root = getElementRoot(this.el);\n root.addEventListener('ionFocus', ev => ev.stopPropagation());\n root.addEventListener('ionBlur', ev => ev.stopPropagation());\n }\n /**\n * When the presentation is changed, all calendar content is recreated,\n * so we need to re-init behavior with the new elements.\n */\n\n\n componentDidRender() {\n const {\n presentation,\n prevPresentation\n } = this;\n\n if (prevPresentation === null) {\n this.prevPresentation = presentation;\n return;\n }\n\n if (presentation === prevPresentation) {\n return;\n }\n\n this.prevPresentation = presentation;\n this.destroyInteractionListeners();\n this.initializeListeners();\n /**\n * The month/year picker from the date interface\n * should be closed as it is not available in non-date\n * interfaces.\n */\n\n this.showMonthAndYear = false;\n raf(() => {\n this.ionRender.emit();\n });\n }\n\n componentWillLoad() {\n const {\n el,\n multiple,\n presentation,\n preferWheel\n } = this;\n\n if (multiple) {\n if (presentation !== 'date') {\n printIonWarning('Multiple date selection is only supported for presentation=\"date\".', el);\n }\n\n if (preferWheel) {\n printIonWarning('Multiple date selection is not supported with preferWheel=\"true\".', el);\n }\n }\n\n this.processMinParts();\n this.processMaxParts();\n this.processValue(this.value);\n this.parsedHourValues = convertToArrayOfNumbers(this.hourValues);\n this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues);\n this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues);\n this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);\n this.parsedDayValues = convertToArrayOfNumbers(this.dayValues);\n this.emitStyle();\n }\n\n emitStyle() {\n this.ionStyle.emit({\n interactive: true,\n datetime: true,\n 'interactive-disabled': this.disabled\n });\n }\n /**\n * Universal render methods\n * These are pieces of datetime that\n * are rendered independently of presentation.\n */\n\n\n renderFooter() {\n const {\n showDefaultButtons,\n showClearButton\n } = this;\n const hasSlottedButtons = this.el.querySelector('[slot=\"buttons\"]') !== null;\n\n if (!hasSlottedButtons && !showDefaultButtons && !showClearButton) {\n return;\n }\n\n const clearButtonClick = () => {\n this.reset();\n this.value = undefined;\n };\n /**\n * By default we render two buttons:\n * Cancel - Dismisses the datetime and\n * does not update the `value` prop.\n * OK - Dismisses the datetime and\n * updates the `value` prop.\n */\n\n\n return h(\"div\", {\n class: \"datetime-footer\"\n }, h(\"div\", {\n class: \"datetime-buttons\"\n }, h(\"div\", {\n class: {\n ['datetime-action-buttons']: true,\n ['has-clear-button']: this.showClearButton\n }\n }, h(\"slot\", {\n name: \"buttons\"\n }, h(\"ion-buttons\", null, showDefaultButtons && h(\"ion-button\", {\n id: \"cancel-button\",\n color: this.color,\n onClick: () => this.cancel(true)\n }, this.cancelText), h(\"div\", null, showClearButton && h(\"ion-button\", {\n id: \"clear-button\",\n color: this.color,\n onClick: () => clearButtonClick()\n }, this.clearText), showDefaultButtons && h(\"ion-button\", {\n id: \"confirm-button\",\n color: this.color,\n onClick: () => this.confirm(true)\n }, this.doneText)))))));\n }\n /**\n * Wheel picker render methods\n */\n\n\n renderWheelPicker(forcePresentation = this.presentation) {\n /**\n * If presentation=\"time-date\" we switch the\n * order of the render array here instead of\n * manually reordering each date/time picker\n * column with CSS. This allows for additional\n * flexibility if we need to render subsets\n * of the date/time data or do additional ordering\n * within the child render functions.\n */\n const renderArray = forcePresentation === 'time-date' ? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)] : [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];\n return h(\"ion-picker-internal\", null, renderArray);\n }\n\n renderDatePickerColumns(forcePresentation) {\n return forcePresentation === 'date-time' || forcePresentation === 'time-date' ? this.renderCombinedDatePickerColumn() : this.renderIndividualDatePickerColumns(forcePresentation);\n }\n\n renderCombinedDatePickerColumn() {\n const {\n activeParts,\n workingParts,\n locale,\n minParts,\n maxParts,\n todayParts,\n isDateEnabled\n } = this;\n /**\n * By default, generate a range of 3 months:\n * Previous month, current month, and next month\n */\n\n const monthsToRender = generateMonths(workingParts);\n /**\n * generateMonths returns the day data as well,\n * but we do not want the day value to act as a max/min\n * on the data we are going to generate.\n */\n\n for (let i = 0; i <= monthsToRender.length - 1; i++) {\n monthsToRender[i].day = null;\n }\n /**\n * If developers have provided their own\n * min/max values, use that instead. Otherwise,\n * fallback to the default range of 3 months.\n */\n\n\n const min = minParts || monthsToRender[0];\n const max = maxParts || monthsToRender[monthsToRender.length - 1];\n const result = getCombinedDateColumnData(locale, workingParts, todayParts, min, max, this.parsedDayValues, this.parsedMonthValues);\n let items = result.items;\n const parts = result.parts;\n\n if (isDateEnabled) {\n items = items.map((itemObject, index) => {\n const referenceParts = parts[index];\n let disabled;\n\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n disabled = !isDateEnabled(convertDataToISO(referenceParts));\n } catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n\n return Object.assign(Object.assign({}, itemObject), {\n disabled\n });\n });\n }\n /**\n * If we have selected a day already, then default the column\n * to that value. Otherwise, default it to today.\n */\n\n\n const todayString = workingParts.day ? `${workingParts.year}-${workingParts.month}-${workingParts.day}` : `${todayParts.year}-${todayParts.month}-${todayParts.day}`;\n return h(\"ion-picker-column-internal\", {\n class: \"date-column\",\n color: this.color,\n items: items,\n value: todayString,\n onIonChange: ev => {\n // TODO(FW-1823) Remove this when iOS 14 support is dropped.\n // Due to a Safari 14 issue we need to destroy\n // the scroll listener before we update state\n // and trigger a re-render.\n if (this.destroyCalendarListener) {\n this.destroyCalendarListener();\n }\n\n const {\n value\n } = ev.detail;\n const findPart = parts.find(({\n month,\n day,\n year\n }) => value === `${year}-${month}-${day}`);\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), findPart));\n\n if (!Array.isArray(activeParts)) {\n this.setActiveParts(Object.assign(Object.assign({}, activeParts), findPart));\n } // We can re-attach the scroll listener after\n // the working parts have been updated.\n\n\n this.initializeCalendarListener();\n ev.stopPropagation();\n }\n });\n }\n\n renderIndividualDatePickerColumns(forcePresentation) {\n const {\n workingParts,\n isDateEnabled\n } = this;\n const shouldRenderMonths = forcePresentation !== 'year' && forcePresentation !== 'time';\n const months = shouldRenderMonths ? getMonthColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedMonthValues) : [];\n const shouldRenderDays = forcePresentation === 'date';\n let days = shouldRenderDays ? getDayColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedDayValues) : [];\n\n if (isDateEnabled) {\n days = days.map(dayObject => {\n const {\n value\n } = dayObject;\n const valueNum = typeof value === 'string' ? parseInt(value) : value;\n const referenceParts = {\n month: workingParts.month,\n day: valueNum,\n year: workingParts.year\n };\n let disabled;\n\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n disabled = !isDateEnabled(convertDataToISO(referenceParts));\n } catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n\n return Object.assign(Object.assign({}, dayObject), {\n disabled\n });\n });\n }\n\n const shouldRenderYears = forcePresentation !== 'month' && forcePresentation !== 'time';\n const years = shouldRenderYears ? getYearColumnData(this.todayParts, this.minParts, this.maxParts, this.parsedYearValues) : [];\n /**\n * Certain locales show the day before the month.\n */\n\n const showMonthFirst = isMonthFirstLocale(this.locale, {\n month: 'numeric',\n day: 'numeric'\n });\n let renderArray = [];\n\n if (showMonthFirst) {\n renderArray = [this.renderMonthPickerColumn(months), this.renderDayPickerColumn(days), this.renderYearPickerColumn(years)];\n } else {\n renderArray = [this.renderDayPickerColumn(days), this.renderMonthPickerColumn(months), this.renderYearPickerColumn(years)];\n }\n\n return renderArray;\n }\n\n renderDayPickerColumn(days) {\n var _a;\n\n if (days.length === 0) {\n return [];\n }\n\n const {\n activeParts,\n workingParts\n } = this;\n return h(\"ion-picker-column-internal\", {\n class: \"day-column\",\n color: this.color,\n items: days,\n value: (_a = workingParts.day || this.todayParts.day) !== null && _a !== void 0 ? _a : undefined,\n onIonChange: ev => {\n // TODO(FW-1823) Remove this when iOS 14 support is dropped.\n // Due to a Safari 14 issue we need to destroy\n // the scroll listener before we update state\n // and trigger a re-render.\n if (this.destroyCalendarListener) {\n this.destroyCalendarListener();\n }\n\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n day: ev.detail.value\n }));\n\n if (!Array.isArray(activeParts)) {\n this.setActiveParts(Object.assign(Object.assign({}, activeParts), {\n day: ev.detail.value\n }));\n } // We can re-attach the scroll listener after\n // the working parts have been updated.\n\n\n this.initializeCalendarListener();\n ev.stopPropagation();\n }\n });\n }\n\n renderMonthPickerColumn(months) {\n if (months.length === 0) {\n return [];\n }\n\n const {\n activeParts,\n workingParts\n } = this;\n return h(\"ion-picker-column-internal\", {\n class: \"month-column\",\n color: this.color,\n items: months,\n value: workingParts.month,\n onIonChange: ev => {\n // TODO(FW-1823) Remove this when iOS 14 support is dropped.\n // Due to a Safari 14 issue we need to destroy\n // the scroll listener before we update state\n // and trigger a re-render.\n if (this.destroyCalendarListener) {\n this.destroyCalendarListener();\n }\n\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n month: ev.detail.value\n }));\n\n if (!Array.isArray(activeParts)) {\n this.setActiveParts(Object.assign(Object.assign({}, activeParts), {\n month: ev.detail.value\n }));\n } // We can re-attach the scroll listener after\n // the working parts have been updated.\n\n\n this.initializeCalendarListener();\n ev.stopPropagation();\n }\n });\n }\n\n renderYearPickerColumn(years) {\n if (years.length === 0) {\n return [];\n }\n\n const {\n activeParts,\n workingParts\n } = this;\n return h(\"ion-picker-column-internal\", {\n class: \"year-column\",\n color: this.color,\n items: years,\n value: workingParts.year,\n onIonChange: ev => {\n // TODO(FW-1823) Remove this when iOS 14 support is dropped.\n // Due to a Safari 14 issue we need to destroy\n // the scroll listener before we update state\n // and trigger a re-render.\n if (this.destroyCalendarListener) {\n this.destroyCalendarListener();\n }\n\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n year: ev.detail.value\n }));\n\n if (!Array.isArray(activeParts)) {\n this.setActiveParts(Object.assign(Object.assign({}, activeParts), {\n year: ev.detail.value\n }));\n } // We can re-attach the scroll listener after\n // the working parts have been updated.\n\n\n this.initializeCalendarListener();\n ev.stopPropagation();\n }\n });\n }\n\n renderTimePickerColumns(forcePresentation) {\n if (['date', 'month', 'month-year', 'year'].includes(forcePresentation)) {\n return [];\n }\n\n const {\n hoursData,\n minutesData,\n dayPeriodData\n } = getTimeColumnsData(this.locale, this.workingParts, this.hourCycle, this.value ? this.minParts : undefined, this.value ? this.maxParts : undefined, this.parsedHourValues, this.parsedMinuteValues);\n return [this.renderHourPickerColumn(hoursData), this.renderMinutePickerColumn(minutesData), this.renderDayPeriodPickerColumn(dayPeriodData)];\n }\n\n renderHourPickerColumn(hoursData) {\n const {\n workingParts,\n activePartsClone\n } = this;\n if (hoursData.length === 0) return [];\n return h(\"ion-picker-column-internal\", {\n color: this.color,\n value: activePartsClone.hour,\n items: hoursData,\n numericInput: true,\n onIonChange: ev => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n hour: ev.detail.value\n }));\n\n if (!Array.isArray(activePartsClone)) {\n this.setActiveParts(Object.assign(Object.assign({}, activePartsClone), {\n hour: ev.detail.value\n }));\n }\n\n ev.stopPropagation();\n }\n });\n }\n\n renderMinutePickerColumn(minutesData) {\n const {\n workingParts,\n activePartsClone\n } = this;\n if (minutesData.length === 0) return [];\n return h(\"ion-picker-column-internal\", {\n color: this.color,\n value: activePartsClone.minute,\n items: minutesData,\n numericInput: true,\n onIonChange: ev => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n minute: ev.detail.value\n }));\n\n if (!Array.isArray(activePartsClone)) {\n this.setActiveParts(Object.assign(Object.assign({}, activePartsClone), {\n minute: ev.detail.value\n }));\n }\n\n ev.stopPropagation();\n }\n });\n }\n\n renderDayPeriodPickerColumn(dayPeriodData) {\n const {\n workingParts,\n activePartsClone\n } = this;\n\n if (dayPeriodData.length === 0) {\n return [];\n }\n\n const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);\n return h(\"ion-picker-column-internal\", {\n style: isDayPeriodRTL ? {\n order: '-1'\n } : {},\n color: this.color,\n value: activePartsClone.ampm,\n items: dayPeriodData,\n onIonChange: ev => {\n const hour = calculateHourFromAMPM(workingParts, ev.detail.value);\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), {\n ampm: ev.detail.value,\n hour\n }));\n\n if (!Array.isArray(activePartsClone)) {\n this.setActiveParts(Object.assign(Object.assign({}, activePartsClone), {\n ampm: ev.detail.value,\n hour\n }));\n }\n\n ev.stopPropagation();\n }\n });\n }\n\n renderWheelView(forcePresentation) {\n const {\n locale\n } = this;\n const showMonthFirst = isMonthFirstLocale(locale);\n const columnOrder = showMonthFirst ? 'month-first' : 'year-first';\n return h(\"div\", {\n class: {\n [`wheel-order-${columnOrder}`]: true\n }\n }, this.renderWheelPicker(forcePresentation));\n }\n /**\n * Grid Render Methods\n */\n\n\n renderCalendarHeader(mode) {\n const expandedIcon = mode === 'ios' ? chevronDown : caretUpSharp;\n const collapsedIcon = mode === 'ios' ? chevronForward : caretDownSharp;\n const prevMonthDisabled = isPrevMonthDisabled(this.workingParts, this.minParts, this.maxParts);\n const nextMonthDisabled = isNextMonthDisabled(this.workingParts, this.maxParts);\n return h(\"div\", {\n class: \"calendar-header\"\n }, h(\"div\", {\n class: \"calendar-action-buttons\"\n }, h(\"div\", {\n class: \"calendar-month-year\"\n }, h(\"ion-item\", {\n button: true,\n detail: false,\n lines: \"none\",\n onClick: () => this.toggleMonthAndYearView()\n }, h(\"ion-label\", null, getMonthAndYear(this.locale, this.workingParts), ' ', h(\"ion-icon\", {\n icon: this.showMonthAndYear ? expandedIcon : collapsedIcon,\n lazy: false\n })))), h(\"div\", {\n class: \"calendar-next-prev\"\n }, h(\"ion-buttons\", null, h(\"ion-button\", {\n disabled: prevMonthDisabled,\n onClick: () => this.prevMonth()\n }, h(\"ion-icon\", {\n slot: \"icon-only\",\n icon: chevronBack,\n lazy: false,\n flipRtl: true\n })), h(\"ion-button\", {\n disabled: nextMonthDisabled,\n onClick: () => this.nextMonth()\n }, h(\"ion-icon\", {\n slot: \"icon-only\",\n icon: chevronForward,\n lazy: false,\n flipRtl: true\n }))))), h(\"div\", {\n class: \"calendar-days-of-week\"\n }, getDaysOfWeek(this.locale, mode, this.firstDayOfWeek % 7).map(d => {\n return h(\"div\", {\n class: \"day-of-week\"\n }, d);\n })));\n }\n\n renderMonth(month, year) {\n const {\n highlightActiveParts\n } = this;\n const yearAllowed = this.parsedYearValues === undefined || this.parsedYearValues.includes(year);\n const monthAllowed = this.parsedMonthValues === undefined || this.parsedMonthValues.includes(month);\n const isCalMonthDisabled = !yearAllowed || !monthAllowed;\n const swipeDisabled = isMonthDisabled({\n month,\n year,\n day: null\n }, {\n // The day is not used when checking if a month is disabled.\n // Users should be able to access the min or max month, even if the\n // min/max date is out of bounds (e.g. min is set to Feb 15, Feb should not be disabled).\n minParts: Object.assign(Object.assign({}, this.minParts), {\n day: null\n }),\n maxParts: Object.assign(Object.assign({}, this.maxParts), {\n day: null\n })\n }); // The working month should never have swipe disabled.\n // Otherwise the CSS scroll snap will not work and the user\n // can free-scroll the calendar.\n\n const isWorkingMonth = this.workingParts.month === month && this.workingParts.year === year;\n return h(\"div\", {\n class: {\n 'calendar-month': true,\n // Prevents scroll snap swipe gestures for months outside of the min/max bounds\n 'calendar-month-disabled': !isWorkingMonth && swipeDisabled\n }\n }, h(\"div\", {\n class: \"calendar-month-grid\"\n }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7).map((dateObject, index) => {\n const {\n day,\n dayOfWeek\n } = dateObject;\n const {\n isDateEnabled,\n multiple\n } = this;\n const referenceParts = {\n month,\n day,\n year\n };\n const {\n isActive,\n isToday,\n ariaLabel,\n ariaSelected,\n disabled\n } = getCalendarDayState(this.locale, referenceParts, this.activePartsClone, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);\n let isCalDayDisabled = isCalMonthDisabled || disabled;\n\n if (!isCalDayDisabled && isDateEnabled !== undefined) {\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n isCalDayDisabled = !isDateEnabled(convertDataToISO(referenceParts));\n } catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n }\n\n return h(\"button\", {\n tabindex: \"-1\",\n \"data-day\": day,\n \"data-month\": month,\n \"data-year\": year,\n \"data-index\": index,\n \"data-day-of-week\": dayOfWeek,\n disabled: isCalDayDisabled,\n class: {\n 'calendar-day-padding': day === null,\n 'calendar-day': true,\n 'calendar-day-active': isActive && highlightActiveParts,\n 'calendar-day-today': isToday\n },\n \"aria-selected\": ariaSelected,\n \"aria-label\": ariaLabel,\n onClick: () => {\n if (day === null) {\n return;\n }\n\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), {\n month,\n day,\n year\n })); // multiple only needs date info, so we can wipe out other fields like time\n\n if (multiple) {\n this.setActiveParts({\n month,\n day,\n year\n }, isActive && highlightActiveParts);\n } else {\n this.setActiveParts(Object.assign(Object.assign({}, this.activeParts), {\n month,\n day,\n year\n }));\n }\n }\n }, day);\n })));\n }\n\n renderCalendarBody() {\n return h(\"div\", {\n class: \"calendar-body ion-focusable\",\n ref: el => this.calendarBodyRef = el,\n tabindex: \"0\"\n }, generateMonths(this.workingParts).map(({\n month,\n year\n }) => {\n return this.renderMonth(month, year);\n }));\n }\n\n renderCalendar(mode) {\n return h(\"div\", {\n class: \"datetime-calendar\"\n }, this.renderCalendarHeader(mode), this.renderCalendarBody());\n }\n\n renderTimeLabel() {\n const hasSlottedTimeLabel = this.el.querySelector('[slot=\"time-label\"]') !== null;\n\n if (!hasSlottedTimeLabel && !this.showDefaultTimeLabel) {\n return;\n }\n\n return h(\"slot\", {\n name: \"time-label\"\n }, \"Time\");\n }\n\n renderTimeOverlay() {\n var _this4 = this;\n\n const use24Hour = is24Hour(this.locale, this.hourCycle);\n return [h(\"div\", {\n class: \"time-header\"\n }, this.renderTimeLabel()), h(\"button\", {\n class: {\n 'time-body': true,\n 'time-body-active': this.isTimePopoverOpen\n },\n \"aria-expanded\": \"false\",\n \"aria-haspopup\": \"true\",\n onClick: function () {\n var _ref = _asyncToGenerator(function* (ev) {\n const {\n popoverRef\n } = _this4;\n\n if (popoverRef) {\n _this4.isTimePopoverOpen = true;\n popoverRef.present(new CustomEvent('ionShadowTarget', {\n detail: {\n ionShadowTarget: ev.target\n }\n }));\n yield popoverRef.onWillDismiss();\n _this4.isTimePopoverOpen = false;\n }\n });\n\n return function onClick(_x) {\n return _ref.apply(this, arguments);\n };\n }()\n }, getLocalizedTime(this.locale, this.activePartsClone, use24Hour)), h(\"ion-popover\", {\n alignment: \"center\",\n translucent: true,\n overlayIndex: 1,\n arrow: false,\n onWillPresent: ev => {\n /**\n * Intersection Observers do not consistently fire between Blink and Webkit\n * when toggling the visibility of the popover and trying to scroll the picker\n * column to the correct time value.\n *\n * This will correctly scroll the element position to the correct time value,\n * before the popover is fully presented.\n */\n const cols = ev.target.querySelectorAll('ion-picker-column-internal'); // TODO (FW-615): Potentially remove this when intersection observers are fixed in picker column\n\n cols.forEach(col => col.scrollActiveItemIntoView());\n },\n style: {\n '--offset-y': '-10px',\n '--min-width': 'fit-content'\n },\n // Allow native browser keyboard events to support up/down/home/end key\n // navigation within the time picker.\n keyboardEvents: true,\n ref: el => this.popoverRef = el\n }, this.renderWheelPicker('time'))];\n }\n\n renderCalendarViewHeader(mode) {\n const hasSlottedTitle = this.el.querySelector('[slot=\"title\"]') !== null;\n\n if (!hasSlottedTitle && !this.showDefaultTitle) {\n return;\n }\n\n return h(\"div\", {\n class: \"datetime-header\"\n }, h(\"div\", {\n class: \"datetime-title\"\n }, h(\"slot\", {\n name: \"title\"\n }, \"Select Date\")), mode === 'md' && !this.multiple && h(\"div\", {\n class: \"datetime-selected-date\"\n }, getMonthAndDay(this.locale, this.activeParts)));\n }\n /**\n * Render time picker inside of datetime.\n * Do not pass color prop to segment on\n * iOS mode. MD segment has been customized and\n * should take on the color prop, but iOS\n * should just be the default segment.\n */\n\n\n renderTime() {\n const {\n presentation\n } = this;\n const timeOnlyPresentation = presentation === 'time';\n return h(\"div\", {\n class: \"datetime-time\"\n }, timeOnlyPresentation ? this.renderWheelPicker() : this.renderTimeOverlay());\n }\n /**\n * Renders the month/year picker that is\n * displayed on the calendar grid.\n * The .datetime-year class has additional\n * styles that let us show/hide the\n * picker when the user clicks on the\n * toggle in the calendar header.\n */\n\n\n renderCalendarViewMonthYearPicker() {\n return h(\"div\", {\n class: \"datetime-year\"\n }, this.renderWheelView('month-year'));\n }\n /**\n * Render entry point\n * All presentation types are rendered from here.\n */\n\n\n renderDatetime(mode) {\n const {\n presentation,\n preferWheel\n } = this;\n /**\n * Certain presentation types have separate grid and wheel displays.\n * If preferWheel is true then we should show a wheel picker instead.\n */\n\n const hasWheelVariant = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n\n if (preferWheel && hasWheelVariant) {\n return [this.renderWheelView(), this.renderFooter()];\n }\n\n switch (presentation) {\n case 'date-time':\n return [this.renderCalendarViewHeader(mode), this.renderCalendar(mode), this.renderCalendarViewMonthYearPicker(), this.renderTime(), this.renderFooter()];\n\n case 'time-date':\n return [this.renderCalendarViewHeader(mode), this.renderTime(), this.renderCalendar(mode), this.renderCalendarViewMonthYearPicker(), this.renderFooter()];\n\n case 'time':\n return [this.renderTime(), this.renderFooter()];\n\n case 'month':\n case 'month-year':\n case 'year':\n return [this.renderWheelView(), this.renderFooter()];\n\n default:\n return [this.renderCalendarViewHeader(mode), this.renderCalendar(mode), this.renderCalendarViewMonthYearPicker(), this.renderFooter()];\n }\n }\n\n render() {\n const {\n name,\n value,\n disabled,\n el,\n color,\n isPresented,\n readonly,\n showMonthAndYear,\n preferWheel,\n presentation,\n size\n } = this;\n const mode = getIonMode(this);\n const isMonthAndYearPresentation = presentation === 'year' || presentation === 'month' || presentation === 'month-year';\n const shouldShowMonthAndYear = showMonthAndYear || isMonthAndYearPresentation;\n const monthYearPickerOpen = showMonthAndYear && !isMonthAndYearPresentation;\n const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n const hasWheelVariant = hasDatePresentation && preferWheel;\n const hasGrid = hasDatePresentation && !preferWheel;\n renderHiddenInput(true, el, name, formatValue(value), disabled);\n return h(Host, {\n \"aria-disabled\": disabled ? 'true' : null,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n class: Object.assign({}, createColorClasses(color, {\n [mode]: true,\n ['datetime-presented']: isPresented,\n ['datetime-readonly']: readonly,\n ['datetime-disabled']: disabled,\n 'show-month-and-year': shouldShowMonthAndYear,\n 'month-year-picker-open': monthYearPickerOpen,\n [`datetime-presentation-${presentation}`]: true,\n [`datetime-size-${size}`]: true,\n [`datetime-prefer-wheel`]: hasWheelVariant,\n [`datetime-grid`]: hasGrid\n }))\n }, this.renderDatetime(mode));\n }\n\n get el() {\n return getElement(this);\n }\n\n static get watchers() {\n return {\n \"disabled\": [\"disabledChanged\"],\n \"min\": [\"minChanged\"],\n \"max\": [\"maxChanged\"],\n \"yearValues\": [\"yearValuesChanged\"],\n \"monthValues\": [\"monthValuesChanged\"],\n \"dayValues\": [\"dayValuesChanged\"],\n \"hourValues\": [\"hourValuesChanged\"],\n \"minuteValues\": [\"minuteValuesChanged\"],\n \"activeParts\": [\"activePartsChanged\"],\n \"value\": [\"valueChanged\"]\n };\n }\n\n};\nlet datetimeIds = 0;\nDatetime.style = {\n ios: datetimeIosCss,\n md: datetimeMdCss\n};\n/**\n * iOS Picker Enter Animation\n */\n\nconst iosEnterAnimation = baseEl => {\n const baseAnimation = createAnimation();\n const backdropAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({\n 'pointer-events': 'none'\n }).afterClearStyles(['pointer-events']);\n wrapperAnimation.addElement(baseEl.querySelector('.picker-wrapper')).fromTo('transform', 'translateY(100%)', 'translateY(0%)');\n return baseAnimation.addElement(baseEl).easing('cubic-bezier(.36,.66,.04,1)').duration(400).addAnimation([backdropAnimation, wrapperAnimation]);\n};\n/**\n * iOS Picker Leave Animation\n */\n\n\nconst iosLeaveAnimation = baseEl => {\n const baseAnimation = createAnimation();\n const backdropAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0.01);\n wrapperAnimation.addElement(baseEl.querySelector('.picker-wrapper')).fromTo('transform', 'translateY(0%)', 'translateY(100%)');\n return baseAnimation.addElement(baseEl).easing('cubic-bezier(.36,.66,.04,1)').duration(400).addAnimation([backdropAnimation, wrapperAnimation]);\n};\n\nconst pickerIosCss = \".sc-ion-picker-ios-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}[dir=rtl].sc-ion-picker-ios-h,[dir=rtl] .sc-ion-picker-ios-h{left:unset;right:unset;right:0}.overlay-hidden.sc-ion-picker-ios-h{display:none}.picker-wrapper.sc-ion-picker-ios{border-radius:var(--border-radius);left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-wrapper.sc-ion-picker-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.picker-toolbar.sc-ion-picker-ios{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-ios{border:0;font-family:inherit}.picker-button.sc-ion-picker-ios:active,.picker-button.sc-ion-picker-ios:focus{outline:none}.picker-columns.sc-ion-picker-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;direction:ltr;overflow:hidden}.picker-above-highlight.sc-ion-picker-ios,.picker-below-highlight.sc-ion-picker-ios{display:none;pointer-events:none}.sc-ion-picker-ios-h{--background:var(--ion-background-color, #fff);--border-width:1px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-ios{display:-ms-flexbox;display:flex;height:44px;border-bottom:0.55px solid var(--border-color)}.picker-toolbar-button.sc-ion-picker-ios{-ms-flex:1;flex:1;text-align:end}.picker-toolbar-button.sc-ion-picker-ios:last-child .picker-button.sc-ion-picker-ios{font-weight:600}.picker-toolbar-button.sc-ion-picker-ios:first-child{font-weight:normal;text-align:start}.picker-button.sc-ion-picker-ios,.picker-button.ion-activated.sc-ion-picker-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:1em;padding-right:1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-button.sc-ion-picker-ios,.picker-button.ion-activated.sc-ion-picker-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:1em;padding-inline-start:1em;-webkit-padding-end:1em;padding-inline-end:1em}}.picker-columns.sc-ion-picker-ios{height:215px;-webkit-perspective:1000px;perspective:1000px}.picker-above-highlight.sc-ion-picker-ios{left:0;top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:81px;border-bottom:1px solid var(--border-color);background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to bottom, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:10}[dir=rtl].sc-ion-picker-ios .picker-above-highlight.sc-ion-picker-ios,[dir=rtl].sc-ion-picker-ios-h .picker-above-highlight.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-above-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}.picker-below-highlight.sc-ion-picker-ios{left:0;top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:119px;border-top:1px solid var(--border-color);background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to top, var(--background, var(--ion-background-color, #fff)) 30%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:11}[dir=rtl].sc-ion-picker-ios .picker-below-highlight.sc-ion-picker-ios,[dir=rtl].sc-ion-picker-ios-h .picker-below-highlight.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-below-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}\";\nconst pickerMdCss = \".sc-ion-picker-md-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}[dir=rtl].sc-ion-picker-md-h,[dir=rtl] .sc-ion-picker-md-h{left:unset;right:unset;right:0}.overlay-hidden.sc-ion-picker-md-h{display:none}.picker-wrapper.sc-ion-picker-md{border-radius:var(--border-radius);left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-wrapper.sc-ion-picker-md{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.picker-toolbar.sc-ion-picker-md{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-md{border:0;font-family:inherit}.picker-button.sc-ion-picker-md:active,.picker-button.sc-ion-picker-md:focus{outline:none}.picker-columns.sc-ion-picker-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;direction:ltr;overflow:hidden}.picker-above-highlight.sc-ion-picker-md,.picker-below-highlight.sc-ion-picker-md{display:none;pointer-events:none}.sc-ion-picker-md-h{--background:var(--ion-background-color, #fff);--border-width:0.55px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-md{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;height:44px}.picker-button.sc-ion-picker-md,.picker-button.ion-activated.sc-ion-picker-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:1.1em;padding-right:1.1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:14px;font-weight:500;text-transform:uppercase;-webkit-box-shadow:none;box-shadow:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-button.sc-ion-picker-md,.picker-button.ion-activated.sc-ion-picker-md{padding-left:unset;padding-right:unset;-webkit-padding-start:1.1em;padding-inline-start:1.1em;-webkit-padding-end:1.1em;padding-inline-end:1.1em}}.picker-columns.sc-ion-picker-md{height:216px;-webkit-perspective:1800px;perspective:1800px}.picker-above-highlight.sc-ion-picker-md{left:0;top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:81px;border-bottom:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to bottom, var(--ion-background-color, #fff) 20%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:10}[dir=rtl].sc-ion-picker-md .picker-above-highlight.sc-ion-picker-md,[dir=rtl].sc-ion-picker-md-h .picker-above-highlight.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-above-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}.picker-below-highlight.sc-ion-picker-md{left:0;top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:119px;border-top:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to top, var(--ion-background-color, #fff) 30%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:11}[dir=rtl].sc-ion-picker-md .picker-below-highlight.sc-ion-picker-md,[dir=rtl].sc-ion-picker-md-h .picker-below-highlight.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-below-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}\";\nconst Picker = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.didPresent = createEvent(this, \"ionPickerDidPresent\", 7);\n this.willPresent = createEvent(this, \"ionPickerWillPresent\", 7);\n this.willDismiss = createEvent(this, \"ionPickerWillDismiss\", 7);\n this.didDismiss = createEvent(this, \"ionPickerDidDismiss\", 7);\n this.presented = false;\n /**\n * If `true`, the keyboard will be automatically dismissed when the overlay is presented.\n */\n\n this.keyboardClose = true;\n /**\n * Array of buttons to be displayed at the top of the picker.\n */\n\n this.buttons = [];\n /**\n * Array of columns to be displayed in the picker.\n */\n\n this.columns = [];\n /**\n * Number of milliseconds to wait before dismissing the picker.\n */\n\n this.duration = 0;\n /**\n * If `true`, a backdrop will be displayed behind the picker.\n */\n\n this.showBackdrop = true;\n /**\n * If `true`, the picker will be dismissed when the backdrop is clicked.\n */\n\n this.backdropDismiss = true;\n /**\n * If `true`, the picker will animate.\n */\n\n this.animated = true;\n\n this.onBackdropTap = () => {\n this.dismiss(undefined, BACKDROP);\n };\n\n this.dispatchCancelHandler = ev => {\n const role = ev.detail.role;\n\n if (isCancel(role)) {\n const cancelButton = this.buttons.find(b => b.role === 'cancel');\n this.callButtonHandler(cancelButton);\n }\n };\n }\n\n connectedCallback() {\n prepareOverlay(this.el);\n }\n /**\n * Present the picker overlay after it has been created.\n */\n\n\n present() {\n var _this5 = this;\n\n return _asyncToGenerator(function* () {\n yield present(_this5, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);\n\n if (_this5.duration > 0) {\n _this5.durationTimeout = setTimeout(() => _this5.dismiss(), _this5.duration);\n }\n })();\n }\n /**\n * Dismiss the picker overlay after it has been presented.\n *\n * @param data Any data to emit in the dismiss events.\n * @param role The role of the element that is dismissing the picker.\n * This can be useful in a button handler for determining which button was\n * clicked to dismiss the picker.\n * Some examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n */\n\n\n dismiss(data, role) {\n if (this.durationTimeout) {\n clearTimeout(this.durationTimeout);\n }\n\n return dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);\n }\n /**\n * Returns a promise that resolves when the picker did dismiss.\n */\n\n\n onDidDismiss() {\n return eventMethod(this.el, 'ionPickerDidDismiss');\n }\n /**\n * Returns a promise that resolves when the picker will dismiss.\n */\n\n\n onWillDismiss() {\n return eventMethod(this.el, 'ionPickerWillDismiss');\n }\n /**\n * Get the column that matches the specified name.\n *\n * @param name The name of the column.\n */\n\n\n getColumn(name) {\n return Promise.resolve(this.columns.find(column => column.name === name));\n }\n\n buttonClick(button) {\n var _this6 = this;\n\n return _asyncToGenerator(function* () {\n const role = button.role;\n\n if (isCancel(role)) {\n return _this6.dismiss(undefined, role);\n }\n\n const shouldDismiss = yield _this6.callButtonHandler(button);\n\n if (shouldDismiss) {\n return _this6.dismiss(_this6.getSelected(), button.role);\n }\n\n return Promise.resolve();\n })();\n }\n\n callButtonHandler(button) {\n var _this7 = this;\n\n return _asyncToGenerator(function* () {\n if (button) {\n // a handler has been provided, execute it\n // pass the handler the values from the inputs\n const rtn = yield safeCall(button.handler, _this7.getSelected());\n\n if (rtn === false) {\n // if the return value of the handler is false then do not dismiss\n return false;\n }\n }\n\n return true;\n })();\n }\n\n getSelected() {\n const selected = {};\n this.columns.forEach((col, index) => {\n const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;\n selected[col.name] = {\n text: selectedColumn ? selectedColumn.text : undefined,\n value: selectedColumn ? selectedColumn.value : undefined,\n columnIndex: index\n };\n });\n return selected;\n }\n\n render() {\n const {\n htmlAttributes\n } = this;\n const mode = getIonMode(this);\n return h(Host, Object.assign({\n \"aria-modal\": \"true\",\n tabindex: \"-1\"\n }, htmlAttributes, {\n style: {\n zIndex: `${20000 + this.overlayIndex}`\n },\n class: Object.assign({\n [mode]: true,\n // Used internally for styling\n [`picker-${mode}`]: true,\n 'overlay-hidden': true\n }, getClassMap(this.cssClass)),\n onIonBackdropTap: this.onBackdropTap,\n onIonPickerWillDismiss: this.dispatchCancelHandler\n }), h(\"ion-backdrop\", {\n visible: this.showBackdrop,\n tappable: this.backdropDismiss\n }), h(\"div\", {\n tabindex: \"0\"\n }), h(\"div\", {\n class: \"picker-wrapper ion-overlay-wrapper\",\n role: \"dialog\"\n }, h(\"div\", {\n class: \"picker-toolbar\"\n }, this.buttons.map(b => h(\"div\", {\n class: buttonWrapperClass(b)\n }, h(\"button\", {\n type: \"button\",\n onClick: () => this.buttonClick(b),\n class: buttonClass(b)\n }, b.text)))), h(\"div\", {\n class: \"picker-columns\"\n }, h(\"div\", {\n class: \"picker-above-highlight\"\n }), this.presented && this.columns.map(c => h(\"ion-picker-column\", {\n col: c\n })), h(\"div\", {\n class: \"picker-below-highlight\"\n }))), h(\"div\", {\n tabindex: \"0\"\n }));\n }\n\n get el() {\n return getElement(this);\n }\n\n};\n\nconst buttonWrapperClass = button => {\n return {\n [`picker-toolbar-${button.role}`]: button.role !== undefined,\n 'picker-toolbar-button': true\n };\n};\n\nconst buttonClass = button => {\n return Object.assign({\n 'picker-button': true,\n 'ion-activatable': true\n }, getClassMap(button.cssClass));\n};\n\nPicker.style = {\n ios: pickerIosCss,\n md: pickerMdCss\n};\nconst pickerColumnIosCss = \".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{left:0;top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}[dir=rtl] .picker-opt,:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{padding-left:4px;padding-right:4px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-col{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:20px;line-height:42px;pointer-events:none}.picker-opt{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-transform-origin:center center;transform-origin:center center;height:46px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:20px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}[dir=rtl] .picker-opt,:host-context([dir=rtl]) .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}\";\nconst pickerColumnMdCss = \".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{left:0;top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}[dir=rtl] .picker-opt,:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-col{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:22px;line-height:42px;pointer-events:none}.picker-opt{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;height:43px;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:22px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}.picker-prefix,.picker-suffix,.picker-opt.picker-opt-selected{color:var(--ion-color-primary, #3880ff)}\";\nconst PickerColumnCmp = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionPickerColChange = createEvent(this, \"ionPickerColChange\", 7);\n this.optHeight = 0;\n this.rotateFactor = 0;\n this.scaleFactor = 1;\n this.velocity = 0;\n this.y = 0;\n this.noAnimate = true;\n }\n\n colChanged() {\n this.refresh();\n }\n\n connectedCallback() {\n var _this8 = this;\n\n return _asyncToGenerator(function* () {\n let pickerRotateFactor = 0;\n let pickerScaleFactor = 0.81;\n const mode = getIonMode(_this8);\n\n if (mode === 'ios') {\n pickerRotateFactor = -0.46;\n pickerScaleFactor = 1;\n }\n\n _this8.rotateFactor = pickerRotateFactor;\n _this8.scaleFactor = pickerScaleFactor;\n _this8.gesture = (yield import('./index-3f1a7d95.js')).createGesture({\n el: _this8.el,\n gestureName: 'picker-swipe',\n gesturePriority: 100,\n threshold: 0,\n passive: false,\n onStart: ev => _this8.onStart(ev),\n onMove: ev => _this8.onMove(ev),\n onEnd: ev => _this8.onEnd(ev)\n });\n\n _this8.gesture.enable();\n\n _this8.tmrId = setTimeout(() => {\n _this8.noAnimate = false;\n\n _this8.refresh(true);\n }, 250);\n })();\n }\n\n componentDidLoad() {\n const colEl = this.optsEl;\n\n if (colEl) {\n // DOM READ\n // We perfom a DOM read over a rendered item, this needs to happen after the first render\n this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;\n }\n\n this.refresh();\n }\n\n disconnectedCallback() {\n cancelAnimationFrame(this.rafId);\n clearTimeout(this.tmrId);\n\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n }\n\n emitColChange() {\n this.ionPickerColChange.emit(this.col);\n }\n\n setSelected(selectedIndex, duration) {\n // if there is a selected index, then figure out it's y position\n // if there isn't a selected index, then just use the top y position\n const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;\n this.velocity = 0; // set what y position we're at\n\n cancelAnimationFrame(this.rafId);\n this.update(y, duration, true);\n this.emitColChange();\n }\n\n update(y, duration, saveY) {\n if (!this.optsEl) {\n return;\n } // ensure we've got a good round number :)\n\n\n let translateY = 0;\n let translateZ = 0;\n const {\n col,\n rotateFactor\n } = this;\n const selectedIndex = col.selectedIndex = this.indexForY(-y);\n const durationStr = duration === 0 ? '' : duration + 'ms';\n const scaleStr = `scale(${this.scaleFactor})`;\n const children = this.optsEl.children;\n\n for (let i = 0; i < children.length; i++) {\n const button = children[i];\n const opt = col.options[i];\n const optOffset = i * this.optHeight + y;\n let transform = '';\n\n if (rotateFactor !== 0) {\n const rotateX = optOffset * rotateFactor;\n\n if (Math.abs(rotateX) <= 90) {\n translateY = 0;\n translateZ = 90;\n transform = `rotateX(${rotateX}deg) `;\n } else {\n translateY = -9999;\n }\n } else {\n translateZ = 0;\n translateY = optOffset;\n }\n\n const selected = selectedIndex === i;\n transform += `translate3d(0px,${translateY}px,${translateZ}px) `;\n\n if (this.scaleFactor !== 1 && !selected) {\n transform += scaleStr;\n } // Update transition duration\n\n\n if (this.noAnimate) {\n opt.duration = 0;\n button.style.transitionDuration = '';\n } else if (duration !== opt.duration) {\n opt.duration = duration;\n button.style.transitionDuration = durationStr;\n } // Update transform\n\n\n if (transform !== opt.transform) {\n opt.transform = transform;\n }\n\n button.style.transform = transform; // Update selected item\n\n if (selected !== opt.selected) {\n opt.selected = selected;\n\n if (selected) {\n button.classList.add(PICKER_OPT_SELECTED);\n } else {\n button.classList.remove(PICKER_OPT_SELECTED);\n }\n }\n }\n\n this.col.prevSelected = selectedIndex;\n\n if (saveY) {\n this.y = y;\n }\n\n if (this.lastIndex !== selectedIndex) {\n // have not set a last index yet\n hapticSelectionChanged();\n this.lastIndex = selectedIndex;\n }\n }\n\n decelerate() {\n if (this.velocity !== 0) {\n // still decelerating\n this.velocity *= DECELERATION_FRICTION; // do not let it go slower than a velocity of 1\n\n this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);\n let y = this.y + this.velocity;\n\n if (y > this.minY) {\n // whoops, it's trying to scroll up farther than the options we have!\n y = this.minY;\n this.velocity = 0;\n } else if (y < this.maxY) {\n // gahh, it's trying to scroll down farther than we can!\n y = this.maxY;\n this.velocity = 0;\n }\n\n this.update(y, 0, true);\n const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;\n\n if (notLockedIn) {\n // isn't locked in yet, keep decelerating until it is\n this.rafId = requestAnimationFrame(() => this.decelerate());\n } else {\n this.velocity = 0;\n this.emitColChange();\n hapticSelectionEnd();\n }\n } else if (this.y % this.optHeight !== 0) {\n // needs to still get locked into a position so options line up\n const currentPos = Math.abs(this.y % this.optHeight); // create a velocity in the direction it needs to scroll\n\n this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;\n this.decelerate();\n }\n }\n\n indexForY(y) {\n return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);\n } // TODO should this check disabled?\n\n\n onStart(detail) {\n // We have to prevent default in order to block scrolling under the picker\n // but we DO NOT have to stop propagation, since we still want\n // some \"click\" events to capture\n if (detail.event.cancelable) {\n detail.event.preventDefault();\n }\n\n detail.event.stopPropagation();\n hapticSelectionStart(); // reset everything\n\n cancelAnimationFrame(this.rafId);\n const options = this.col.options;\n let minY = options.length - 1;\n let maxY = 0;\n\n for (let i = 0; i < options.length; i++) {\n if (!options[i].disabled) {\n minY = Math.min(minY, i);\n maxY = Math.max(maxY, i);\n }\n }\n\n this.minY = -(minY * this.optHeight);\n this.maxY = -(maxY * this.optHeight);\n }\n\n onMove(detail) {\n if (detail.event.cancelable) {\n detail.event.preventDefault();\n }\n\n detail.event.stopPropagation(); // update the scroll position relative to pointer start position\n\n let y = this.y + detail.deltaY;\n\n if (y > this.minY) {\n // scrolling up higher than scroll area\n y = Math.pow(y, 0.8);\n this.bounceFrom = y;\n } else if (y < this.maxY) {\n // scrolling down below scroll area\n y += Math.pow(this.maxY - y, 0.9);\n this.bounceFrom = y;\n } else {\n this.bounceFrom = 0;\n }\n\n this.update(y, 0, false);\n }\n\n onEnd(detail) {\n if (this.bounceFrom > 0) {\n // bounce back up\n this.update(this.minY, 100, true);\n this.emitColChange();\n return;\n } else if (this.bounceFrom < 0) {\n // bounce back down\n this.update(this.maxY, 100, true);\n this.emitColChange();\n return;\n }\n\n this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);\n\n if (this.velocity === 0 && detail.deltaY === 0) {\n const opt = detail.event.target.closest('.picker-opt');\n\n if (opt === null || opt === void 0 ? void 0 : opt.hasAttribute('opt-index')) {\n this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);\n }\n } else {\n this.y += detail.deltaY;\n\n if (Math.abs(detail.velocityY) < 0.05) {\n const isScrollingUp = detail.deltaY > 0;\n const optHeightFraction = Math.abs(this.y) % this.optHeight / this.optHeight;\n\n if (isScrollingUp && optHeightFraction > 0.5) {\n this.velocity = Math.abs(this.velocity) * -1;\n } else if (!isScrollingUp && optHeightFraction <= 0.5) {\n this.velocity = Math.abs(this.velocity);\n }\n }\n\n this.decelerate();\n }\n }\n\n refresh(forceRefresh) {\n let min = this.col.options.length - 1;\n let max = 0;\n const options = this.col.options;\n\n for (let i = 0; i < options.length; i++) {\n if (!options[i].disabled) {\n min = Math.min(min, i);\n max = Math.max(max, i);\n }\n }\n /**\n * Only update selected value if column has a\n * velocity of 0. If it does not, then the\n * column is animating might land on\n * a value different than the value at\n * selectedIndex\n */\n\n\n if (this.velocity !== 0) {\n return;\n }\n\n const selectedIndex = clamp(min, this.col.selectedIndex || 0, max);\n\n if (this.col.prevSelected !== selectedIndex || forceRefresh) {\n const y = selectedIndex * this.optHeight * -1;\n this.velocity = 0;\n this.update(y, TRANSITION_DURATION, true);\n }\n }\n\n render() {\n const col = this.col;\n const Button = 'button';\n const mode = getIonMode(this);\n return h(Host, {\n class: {\n [mode]: true,\n 'picker-col': true,\n 'picker-opts-left': this.col.align === 'left',\n 'picker-opts-right': this.col.align === 'right'\n },\n style: {\n 'max-width': this.col.columnWidth\n }\n }, col.prefix && h(\"div\", {\n class: \"picker-prefix\",\n style: {\n width: col.prefixWidth\n }\n }, col.prefix), h(\"div\", {\n class: \"picker-opts\",\n style: {\n maxWidth: col.optionsWidth\n },\n ref: el => this.optsEl = el\n }, col.options.map((o, index) => h(Button, {\n type: \"button\",\n class: {\n 'picker-opt': true,\n 'picker-opt-disabled': !!o.disabled\n },\n \"opt-index\": index\n }, o.text))), col.suffix && h(\"div\", {\n class: \"picker-suffix\",\n style: {\n width: col.suffixWidth\n }\n }, col.suffix));\n }\n\n get el() {\n return getElement(this);\n }\n\n static get watchers() {\n return {\n \"col\": [\"colChanged\"]\n };\n }\n\n};\nconst PICKER_OPT_SELECTED = 'picker-opt-selected';\nconst DECELERATION_FRICTION = 0.97;\nconst MAX_PICKER_SPEED = 90;\nconst TRANSITION_DURATION = 150;\nPickerColumnCmp.style = {\n ios: pickerColumnIosCss,\n md: pickerColumnMdCss\n};\nexport { Datetime as ion_datetime, Picker as ion_picker, PickerColumnCmp as ion_picker_column };","map":{"version":3,"names":["r","registerInstance","e","createEvent","c","writeTask","h","H","Host","i","getElement","chevronBack","o","chevronForward","l","chevronDown","p","caretUpSharp","q","caretDownSharp","b","getIonMode","startFocusVisible","raf","renderHiddenInput","g","getElementRoot","clamp","printIonWarning","printIonError","isRTL","createColorClasses","getClassMap","generateDayAriaLabel","isBefore","a","isAfter","isSameDay","getPreviousMonth","d","getNextMonth","parseDate","getToday","f","getPartsFromCalendarDay","getEndOfWeek","j","getStartOfWeek","k","getPreviousDay","getNextDay","m","getPreviousWeek","n","getNextWeek","w","warnIfValueOutOfBounds","convertToArrayOfNumbers","convertDataToISO","getCombinedDateColumnData","s","getMonthColumnData","t","getDayColumnData","u","getYearColumnData","v","isMonthFirstLocale","x","getTimeColumnsData","y","isLocaleDayPeriodRTL","z","getDaysOfWeek","A","getMonthAndYear","B","getDaysOfMonth","C","generateMonths","D","is24Hour","E","getLocalizedTime","F","getMonthAndDay","G","formatValue","getNextYear","I","getPreviousYear","J","clampDate","K","parseAmPm","L","calculateHourFromAMPM","BACKDROP","isCancel","prepareOverlay","present","dismiss","eventMethod","safeCall","createAnimation","hapticSelectionChanged","hapticSelectionEnd","hapticSelectionStart","isYearDisabled","refYear","minParts","maxParts","year","isDayDisabled","refParts","dayValues","day","undefined","includes","getCalendarDayState","locale","activeParts","todayParts","activePartsArray","Array","isArray","isActive","find","parts","isToday","disabled","ariaSelected","ariaLabel","isMonthDisabled","isPrevMonthDisabled","prevMonth","Object","assign","isNextMonthDisabled","nextMonth","datetimeIosCss","datetimeMdCss","Datetime","constructor","hostRef","ionCancel","ionChange","ionFocus","ionBlur","ionStyle","ionRender","inputId","datetimeIds","highlightActiveParts","prevPresentation","showMonthAndYear","month","hour","minute","ampm","workingParts","isPresented","isTimePopoverOpen","color","name","readonly","presentation","cancelText","doneText","clearText","firstDayOfWeek","multiple","showDefaultTitle","showDefaultButtons","showClearButton","showDefaultTimeLabel","size","preferWheel","closeParentOverlay","popoverOrModal","el","closest","setWorkingParts","setActiveParts","removeDate","activePartsClone","filter","hasSlottedButtons","querySelector","confirm","getCalendarBodyEl","_a","calendarBodyRef","shadowRoot","initializeKeyboardListeners","root","currentMonth","checkCalendarBodyFocus","ev","record","oldValue","classList","contains","focusWorkingDay","mo","MutationObserver","observe","attributeFilter","attributeOldValue","destroyKeyboardMO","disconnect","addEventListener","activeElement","partsToFocus","key","preventDefault","shiftKey","requestAnimationFrame","padding","querySelectorAll","dayEl","length","focus","processMinParts","min","processMaxParts","max","initializeCalendarListener","months","startMonth","workingMonth","endMonth","mode","needsiOSRubberBandFix","navigator","maxTouchPoints","scrollLeft","clientWidth","getChangedMonth","box","getBoundingClientRect","elementAtCenter","elementFromPoint","width","height","monthBox","Math","abs","updateActiveMonth","style","removeProperty","appliediOSRubberBandFix","newDate","setProperty","scrollTimeout","scrollCallback","clearTimeout","setTimeout","destroyCalendarListener","removeEventListener","destroyInteractionListeners","processValue","value","valueToProcess","singleValue","tzOffset","onFocus","emit","onBlur","hasValue","left","offsetWidth","scrollTo","top","behavior","toggleMonthAndYearView","disabledChanged","emitStyle","minChanged","maxChanged","yearValuesChanged","parsedYearValues","yearValues","monthValuesChanged","parsedMonthValues","monthValues","dayValuesChanged","parsedDayValues","hourValuesChanged","parsedHourValues","hourValues","minuteValuesChanged","parsedMinuteValues","minuteValues","activePartsChanged","valueChanged","valueDateParts","closeOverlay","isCalendarPicker","activePartsIsArray","dates","map","str","Date","getTimezoneOffset","date","reset","startDate","cancel","connectedCallback","clearFocusVisible","destroy","disconnectedCallback","initializeListeners","componentDidLoad","visibleCallback","entries","isIntersecting","add","visibleIO","IntersectionObserver","threshold","hiddenCallback","remove","hiddenIO","stopPropagation","componentDidRender","componentWillLoad","interactive","datetime","renderFooter","clearButtonClick","class","id","onClick","renderWheelPicker","forcePresentation","renderArray","renderTimePickerColumns","renderDatePickerColumns","renderCombinedDatePickerColumn","renderIndividualDatePickerColumns","isDateEnabled","monthsToRender","result","items","itemObject","index","referenceParts","todayString","onIonChange","detail","findPart","shouldRenderMonths","shouldRenderDays","days","dayObject","valueNum","parseInt","shouldRenderYears","years","showMonthFirst","renderMonthPickerColumn","renderDayPickerColumn","renderYearPickerColumn","hoursData","minutesData","dayPeriodData","hourCycle","renderHourPickerColumn","renderMinutePickerColumn","renderDayPeriodPickerColumn","numericInput","isDayPeriodRTL","order","renderWheelView","columnOrder","renderCalendarHeader","expandedIcon","collapsedIcon","prevMonthDisabled","nextMonthDisabled","button","lines","icon","lazy","slot","flipRtl","renderMonth","yearAllowed","monthAllowed","isCalMonthDisabled","swipeDisabled","isWorkingMonth","dateObject","dayOfWeek","isCalDayDisabled","tabindex","renderCalendarBody","ref","renderCalendar","renderTimeLabel","hasSlottedTimeLabel","renderTimeOverlay","use24Hour","popoverRef","CustomEvent","ionShadowTarget","target","onWillDismiss","alignment","translucent","overlayIndex","arrow","onWillPresent","cols","forEach","col","scrollActiveItemIntoView","keyboardEvents","renderCalendarViewHeader","hasSlottedTitle","renderTime","timeOnlyPresentation","renderCalendarViewMonthYearPicker","renderDatetime","hasWheelVariant","render","isMonthAndYearPresentation","shouldShowMonthAndYear","monthYearPickerOpen","hasDatePresentation","hasGrid","watchers","ios","md","iosEnterAnimation","baseEl","baseAnimation","backdropAnimation","wrapperAnimation","addElement","fromTo","beforeStyles","afterClearStyles","easing","duration","addAnimation","iosLeaveAnimation","pickerIosCss","pickerMdCss","Picker","didPresent","willPresent","willDismiss","didDismiss","presented","keyboardClose","buttons","columns","showBackdrop","backdropDismiss","animated","onBackdropTap","dispatchCancelHandler","role","cancelButton","callButtonHandler","durationTimeout","data","onDidDismiss","getColumn","Promise","resolve","column","buttonClick","shouldDismiss","getSelected","rtn","handler","selected","selectedColumn","selectedIndex","options","text","columnIndex","htmlAttributes","zIndex","cssClass","onIonBackdropTap","onIonPickerWillDismiss","visible","tappable","buttonWrapperClass","type","buttonClass","pickerColumnIosCss","pickerColumnMdCss","PickerColumnCmp","ionPickerColChange","optHeight","rotateFactor","scaleFactor","velocity","noAnimate","colChanged","refresh","pickerRotateFactor","pickerScaleFactor","gesture","createGesture","gestureName","gesturePriority","passive","onStart","onMove","onEnd","enable","tmrId","colEl","optsEl","firstElementChild","clientHeight","cancelAnimationFrame","rafId","emitColChange","setSelected","update","saveY","translateY","translateZ","indexForY","durationStr","scaleStr","children","opt","optOffset","transform","rotateX","transitionDuration","PICKER_OPT_SELECTED","prevSelected","lastIndex","decelerate","DECELERATION_FRICTION","minY","maxY","notLockedIn","round","currentPos","event","cancelable","deltaY","pow","bounceFrom","MAX_PICKER_SPEED","velocityY","hasAttribute","getAttribute","TRANSITION_DURATION","isScrollingUp","optHeightFraction","forceRefresh","Button","align","columnWidth","prefix","prefixWidth","maxWidth","optionsWidth","suffix","suffixWidth","ion_datetime","ion_picker","ion_picker_column"],"sources":["D:/MobileDev/WRB/WrenchBoard2023a/node_modules/@ionic/core/dist/esm/ion-datetime_3.entry.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, e as createEvent, c as writeTask, h, H as Host, i as getElement } from './index-1a99aeb7.js';\nimport { c as chevronBack, o as chevronForward, l as chevronDown, p as caretUpSharp, q as caretDownSharp } from './index-45ecc7ca.js';\nimport { b as getIonMode } from './ionic-global-04e268e7.js';\nimport { startFocusVisible } from './focus-visible-5ad6825d.js';\nimport { r as raf, e as renderHiddenInput, g as getElementRoot, l as clamp } from './helpers-4d272360.js';\nimport { p as printIonWarning, b as printIonError } from './index-c4b11676.js';\nimport { i as isRTL } from './dir-e8b767a8.js';\nimport { c as createColorClasses, g as getClassMap } from './theme-7670341c.js';\nimport { g as generateDayAriaLabel, i as isBefore, a as isAfter, b as isSameDay, c as getPreviousMonth, d as getNextMonth, p as parseDate, e as getToday, f as getPartsFromCalendarDay, h as getEndOfWeek, j as getStartOfWeek, k as getPreviousDay, l as getNextDay, m as getPreviousWeek, n as getNextWeek, w as warnIfValueOutOfBounds, o as convertToArrayOfNumbers, q as convertDataToISO, r as getCombinedDateColumnData, s as getMonthColumnData, t as getDayColumnData, u as getYearColumnData, v as isMonthFirstLocale, x as getTimeColumnsData, y as isLocaleDayPeriodRTL, z as getDaysOfWeek, A as getMonthAndYear, B as getDaysOfMonth, C as generateMonths, D as is24Hour, E as getLocalizedTime, F as getMonthAndDay, G as formatValue, H as getNextYear, I as getPreviousYear, J as clampDate, K as parseAmPm, L as calculateHourFromAMPM } from './parse-26477881.js';\nimport { B as BACKDROP, i as isCancel, e as prepareOverlay, d as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-f469834d.js';\nimport { c as createAnimation } from './animation-36c1d77d.js';\nimport { b as hapticSelectionChanged, h as hapticSelectionEnd, a as hapticSelectionStart } from './haptic-683b3b3c.js';\nimport './hardware-back-button-490df115.js';\n\nconst isYearDisabled = (refYear, minParts, maxParts) => {\n if (minParts && minParts.year > refYear) {\n return true;\n }\n if (maxParts && maxParts.year < refYear) {\n return true;\n }\n return false;\n};\n/**\n * Returns true if a given day should\n * not be interactive according to its value,\n * or the max/min dates.\n */\nconst isDayDisabled = (refParts, minParts, maxParts, dayValues) => {\n /**\n * If this is a filler date (i.e. padding)\n * then the date is disabled.\n */\n if (refParts.day === null) {\n return true;\n }\n /**\n * If user passed in a list of acceptable day values\n * check to make sure that the date we are looking\n * at is in this array.\n */\n if (dayValues !== undefined && !dayValues.includes(refParts.day)) {\n return true;\n }\n /**\n * Given a min date, perform the following\n * checks. If any of them are true, then the\n * day should be disabled:\n * 1. Is the current year < the min allowed year?\n * 2. Is the current year === min allowed year,\n * but the current month < the min allowed month?\n * 3. Is the current year === min allowed year, the\n * current month === min allow month, but the current\n * day < the min allowed day?\n */\n if (minParts && isBefore(refParts, minParts)) {\n return true;\n }\n /**\n * Given a max date, perform the following\n * checks. If any of them are true, then the\n * day should be disabled:\n * 1. Is the current year > the max allowed year?\n * 2. Is the current year === max allowed year,\n * but the current month > the max allowed month?\n * 3. Is the current year === max allowed year, the\n * current month === max allow month, but the current\n * day > the max allowed day?\n */\n if (maxParts && isAfter(refParts, maxParts)) {\n return true;\n }\n /**\n * If none of these checks\n * passed then the date should\n * be interactive.\n */\n return false;\n};\n/**\n * Given a locale, a date, the selected date(s), and today's date,\n * generate the state for a given calendar day button.\n */\nconst getCalendarDayState = (locale, refParts, activeParts, todayParts, minParts, maxParts, dayValues) => {\n /**\n * activeParts signals what day(s) are currently selected in the datetime.\n * If multiple=\"true\", this will be an array, but the logic in this util\n * is the same whether we have one selected day or many because we're only\n * calculating the state for one button. So, we treat a single activeParts value\n * the same as an array of length one.\n */\n const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];\n /**\n * The day button is active if it is selected, or in other words, if refParts\n * matches at least one selected date.\n */\n const isActive = activePartsArray.find((parts) => isSameDay(refParts, parts)) !== undefined;\n const isToday = isSameDay(refParts, todayParts);\n const disabled = isDayDisabled(refParts, minParts, maxParts, dayValues);\n /**\n * Note that we always return one object regardless of whether activeParts\n * was an array, since we pare down to one value for isActive.\n */\n return {\n disabled,\n isActive,\n isToday,\n ariaSelected: isActive ? 'true' : null,\n ariaLabel: generateDayAriaLabel(locale, isToday, refParts),\n };\n};\n/**\n * Returns `true` if the month is disabled given the\n * current date value and min/max date constraints.\n */\nconst isMonthDisabled = (refParts, { minParts, maxParts, }) => {\n // If the year is disabled then the month is disabled.\n if (isYearDisabled(refParts.year, minParts, maxParts)) {\n return true;\n }\n // If the date value is before the min date, then the month is disabled.\n // If the date value is after the max date, then the month is disabled.\n if ((minParts && isBefore(refParts, minParts)) || (maxParts && isAfter(refParts, maxParts))) {\n return true;\n }\n return false;\n};\n/**\n * Given a working date, an optional minimum date range,\n * and an optional maximum date range; determine if the\n * previous navigation button is disabled.\n */\nconst isPrevMonthDisabled = (refParts, minParts, maxParts) => {\n const prevMonth = Object.assign(Object.assign({}, getPreviousMonth(refParts)), { day: null });\n return isMonthDisabled(prevMonth, {\n minParts,\n maxParts,\n });\n};\n/**\n * Given a working date and a maximum date range,\n * determine if the next navigation button is disabled.\n */\nconst isNextMonthDisabled = (refParts, maxParts) => {\n const nextMonth = Object.assign(Object.assign({}, getNextMonth(refParts)), { day: null });\n return isMonthDisabled(nextMonth, {\n maxParts,\n });\n};\n\nconst datetimeIosCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}: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}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){: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{left:-99999px;position:absolute;visibility:hidden;pointer-events:none}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){: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-readonly),:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled){opacity:0.4}: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}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .calendar-action-buttons ion-item ion-icon{padding-left:4px;padding-right:0;padding-top:0;padding-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-action-buttons ion-item ion-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}: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{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);height:100%}:host .calendar-day{padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;margin-left:0px;margin-right: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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{margin-left:unset;margin-right:unset;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px}}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}:host .calendar-day:after{border-radius:32px;padding-left:4px;padding-right:4px;padding-top:4px;padding-bottom:4px;position:absolute;top:50%;left:50%;width:32px;height:32px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\\\" \\\";z-index:-1}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day:after{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}: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;padding-left:12px;padding-right:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-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}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .time-body{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-light, #ffffff);--background-rgb:var(--ion-color-light-rgb);--title-color:var(--ion-color-step-600, #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{padding-left:16px;padding-right:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, #cccccc)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-header{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host .datetime-header .datetime-title{color:var(--title-color);font-size:14px}:host .calendar-action-buttons ion-item{--padding-start:16px;--background-hover:transparent;--background-activated:transparent;font-size:16px;font-weight:600}:host .calendar-action-buttons ion-item ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}: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{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, #b3b3b3);font-size:12px;font-weight:600;line-height:24px;text-transform:uppercase}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-days-of-week{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}:host .calendar-body .calendar-month .calendar-month-grid{padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;height:calc(100% - 16px)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-body .calendar-month .calendar-month-grid{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}:host .calendar-day{font-size:20px}:host .calendar-day:after{opacity:0.2}:host .calendar-day:focus:after{background:var(--ion-color-base)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-active:after{background:var(--ion-color-base)}:host .calendar-day.calendar-day-today.calendar-day-active{color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-today.calendar-day-active:after{background:var(--ion-color-base);opacity:1}:host .datetime-time{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:16px;font-size:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-time{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, #cccccc)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-buttons{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}: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%}\";\n\nconst datetimeMdCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}: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}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){: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{left:-99999px;position:absolute;visibility:hidden;pointer-events:none}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){: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-readonly),:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled){opacity:0.4}: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}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .calendar-action-buttons ion-item ion-icon{padding-left:4px;padding-right:0;padding-top:0;padding-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-action-buttons ion-item ion-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}: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{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);height:100%}:host .calendar-day{padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;margin-left:0px;margin-right: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;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{margin-left:unset;margin-right:unset;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px}}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}:host .calendar-day:after{border-radius:32px;padding-left:4px;padding-right:4px;padding-top:4px;padding-bottom:4px;position:absolute;top:50%;left:50%;width:32px;height:32px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\\\" \\\";z-index:-1}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day:after{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}: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;padding-left:12px;padding-right:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-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}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .time-body{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-step-100, #ffffff);--title-color:var(--ion-color-contrast)}:host .datetime-header{padding-left:20px;padding-right:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-header{padding-left:unset;padding-right:unset;-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px}}:host .datetime-header .datetime-title{font-size:12px;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:34px}:host .datetime-calendar .calendar-action-buttons ion-item{--padding-start:20px}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{color:var(--ion-color-step-650, #595959)}:host .calendar-days-of-week{padding-left:10px;padding-right:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, gray);font-size:14px;line-height:36px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-days-of-week{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}:host .calendar-body .calendar-month .calendar-month-grid{padding-left:10px;padding-right:10px;padding-top:3px;padding-bottom:0px;grid-template-rows:repeat(6, 1fr)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-body .calendar-month .calendar-month-grid{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}:host .calendar-day{padding-left:0px;padding-right:0;padding-top:13px;padding-bottom:13px;font-size:14px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-day:focus:after{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 .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-today:after{border:1px solid var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-active:after{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .datetime-time{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-time{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host .time-header{color:var(--ion-color-step-650, #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{padding-left:10px;padding-right: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}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .datetime-buttons{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}:host .datetime-view-buttons ion-button{color:var(--ion-color-step-800, #333333)}\";\n\nconst Datetime = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionCancel = createEvent(this, \"ionCancel\", 7);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionRender = createEvent(this, \"ionRender\", 7);\n this.inputId = `ion-dt-${datetimeIds++}`;\n /**\n * Whether to highlight the active day with a solid circle (as opposed\n * to the outline circle around today). If you don't specify an initial\n * value for the datetime, it doesn't automatically init to a default to\n * avoid unwanted change events firing. If the solid circle were still\n * shown then, it would look like a date had already been selected, which\n * is misleading UX.\n */\n this.highlightActiveParts = false;\n this.todayParts = parseDate(getToday());\n this.prevPresentation = null;\n this.showMonthAndYear = false;\n this.activeParts = {\n month: 5,\n day: 28,\n year: 2021,\n hour: 13,\n minute: 52,\n ampm: 'pm',\n };\n this.workingParts = {\n month: 5,\n day: 28,\n year: 2021,\n hour: 13,\n minute: 52,\n ampm: 'pm',\n };\n this.isPresented = false;\n this.isTimePopoverOpen = false;\n /**\n * The color to use from your application's color palette.\n * Default options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\n * For more information on colors, see [theming](/docs/theming/basics).\n */\n this.color = 'primary';\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n /**\n * If `true`, the user cannot interact with the datetime.\n */\n this.disabled = false;\n /**\n * If `true`, the datetime appears normal but is not interactive.\n */\n this.readonly = false;\n /**\n * Which values you want to select. `'date'` will show\n * a calendar picker to select the month, day, and year. `'time'`\n * will show a time picker to select the hour, minute, and (optionally)\n * AM/PM. `'date-time'` will show the date picker first and time picker second.\n * `'time-date'` will show the time picker first and date picker second.\n */\n this.presentation = 'date-time';\n /**\n * The text to display on the picker's cancel button.\n */\n this.cancelText = 'Cancel';\n /**\n * The text to display on the picker's \"Done\" button.\n */\n this.doneText = 'Done';\n /**\n * The text to display on the picker's \"Clear\" button.\n */\n this.clearText = 'Clear';\n /**\n * The locale to use for `ion-datetime`. This\n * impacts month and day name formatting.\n * The `'default'` value refers to the default\n * locale set by your device.\n */\n this.locale = 'default';\n /**\n * The first day of the week to use for `ion-datetime`. The\n * default value is `0` and represents Sunday.\n */\n this.firstDayOfWeek = 0;\n /**\n * If `true`, multiple dates can be selected at once. Only\n * applies to `presentation=\"date\"` and `preferWheel=\"false\"`.\n */\n this.multiple = false;\n /**\n * If `true`, a header will be shown above the calendar\n * picker. On `ios` mode this will include the\n * slotted title, and on `md` mode this will include\n * the slotted title and the selected date.\n */\n this.showDefaultTitle = false;\n /**\n * If `true`, the default \"Cancel\" and \"OK\" buttons\n * will be rendered at the bottom of the `ion-datetime`\n * component. Developers can also use the `button` slot\n * if they want to customize these buttons. If custom\n * buttons are set in the `button` slot then the\n * default buttons will not be rendered.\n */\n this.showDefaultButtons = false;\n /**\n * If `true`, a \"Clear\" button will be rendered alongside\n * the default \"Cancel\" and \"OK\" buttons at the bottom of the `ion-datetime`\n * component. Developers can also use the `button` slot\n * if they want to customize these buttons. If custom\n * buttons are set in the `button` slot then the\n * default buttons will not be rendered.\n */\n this.showClearButton = false;\n /**\n * If `true`, the default \"Time\" label will be rendered\n * for the time selector of the `ion-datetime` component.\n * Developers can also use the `time-label` slot\n * if they want to customize this label. If a custom\n * label is set in the `time-label` slot then the\n * default label will not be rendered.\n */\n this.showDefaultTimeLabel = true;\n /**\n * If `cover`, the `ion-datetime` will expand to cover the full width of its container.\n * If `fixed`, the `ion-datetime` will have a fixed width.\n */\n this.size = 'fixed';\n /**\n * If `true`, a wheel picker will be rendered instead of a calendar grid\n * where possible. If `false`, a calendar grid will be rendered instead of\n * a wheel picker where possible.\n *\n * A wheel picker can be rendered instead of a grid when `presentation` is\n * one of the following values: `'date'`, `'date-time'`, or `'time-date'`.\n *\n * A wheel picker will always be rendered regardless of\n * the `preferWheel` value when `presentation` is one of the following values:\n * `'time'`, `'month'`, `'month-year'`, or `'year'`.\n */\n this.preferWheel = false;\n this.closeParentOverlay = () => {\n const popoverOrModal = this.el.closest('ion-modal, ion-popover');\n if (popoverOrModal) {\n popoverOrModal.dismiss();\n }\n };\n this.setWorkingParts = (parts) => {\n this.workingParts = Object.assign({}, parts);\n };\n this.setActiveParts = (parts, removeDate = false) => {\n const { multiple, activePartsClone, highlightActiveParts } = this;\n if (multiple) {\n /**\n * We read from activePartsClone here because valueChanged() only updates that,\n * so it's the more reliable source of truth. If we read from activeParts, then\n * if you click July 1, manually set the value to July 2, and then click July 3,\n * the new value would be [July 1, July 3], ignoring the value set.\n *\n * We can then pass the new value to activeParts (rather than activePartsClone)\n * since the clone will be updated automatically by activePartsChanged().\n */\n const activePartsArray = Array.isArray(activePartsClone) ? activePartsClone : [activePartsClone];\n if (removeDate) {\n this.activeParts = activePartsArray.filter((p) => !isSameDay(p, parts));\n }\n else if (highlightActiveParts) {\n this.activeParts = [...activePartsArray, parts];\n }\n else {\n /**\n * If highlightActiveParts is false, that means we just have a\n * default value of today in activeParts; we need to replace that\n * rather than adding to it since it's just a placeholder.\n */\n this.activeParts = [parts];\n }\n }\n else {\n this.activeParts = Object.assign({}, parts);\n }\n /**\n * Now that the user has interacted somehow to select something, we can\n * show the solid highlight. This needs to be done after checking it above,\n * but before the confirm call below.\n *\n * Note that for datetimes with confirm/cancel buttons, the value\n * isn't updated until you call confirm(). We need to bring the\n * solid circle back on day click for UX reasons, rather than only\n * show the circle if `value` is truthy.\n */\n this.highlightActiveParts = true;\n const hasSlottedButtons = this.el.querySelector('[slot=\"buttons\"]') !== null;\n if (hasSlottedButtons || this.showDefaultButtons) {\n return;\n }\n this.confirm();\n };\n /**\n * Stencil sometimes sets calendarBodyRef to null on rerender, even though\n * the element is present. Query for it manually as a fallback.\n *\n * TODO(FW-901) Remove when issue is resolved: https://github.com/ionic-team/stencil/issues/3253\n */\n this.getCalendarBodyEl = () => {\n var _a;\n return this.calendarBodyRef || ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.calendar-body'));\n };\n this.initializeKeyboardListeners = () => {\n const calendarBodyRef = this.getCalendarBodyEl();\n if (!calendarBodyRef) {\n return;\n }\n const root = this.el.shadowRoot;\n /**\n * Get a reference to the month\n * element we are currently viewing.\n */\n const currentMonth = calendarBodyRef.querySelector('.calendar-month:nth-of-type(2)');\n /**\n * When focusing the calendar body, we want to pass focus\n * to the working day, but other days should\n * only be accessible using the arrow keys. Pressing\n * Tab should jump between bodies of selectable content.\n */\n const checkCalendarBodyFocus = (ev) => {\n var _a;\n const record = ev[0];\n /**\n * If calendar body was already focused\n * when this fired or if the calendar body\n * if not currently focused, we should not re-focus\n * the inner day.\n */\n if (((_a = record.oldValue) === null || _a === void 0 ? void 0 : _a.includes('ion-focused')) || !calendarBodyRef.classList.contains('ion-focused')) {\n return;\n }\n this.focusWorkingDay(currentMonth);\n };\n const mo = new MutationObserver(checkCalendarBodyFocus);\n mo.observe(calendarBodyRef, { attributeFilter: ['class'], attributeOldValue: true });\n this.destroyKeyboardMO = () => {\n mo === null || mo === void 0 ? void 0 : mo.disconnect();\n };\n /**\n * We must use keydown not keyup as we want\n * to prevent scrolling when using the arrow keys.\n */\n calendarBodyRef.addEventListener('keydown', (ev) => {\n const activeElement = root.activeElement;\n if (!activeElement || !activeElement.classList.contains('calendar-day')) {\n return;\n }\n const parts = getPartsFromCalendarDay(activeElement);\n let partsToFocus;\n switch (ev.key) {\n case 'ArrowDown':\n ev.preventDefault();\n partsToFocus = getNextWeek(parts);\n break;\n case 'ArrowUp':\n ev.preventDefault();\n partsToFocus = getPreviousWeek(parts);\n break;\n case 'ArrowRight':\n ev.preventDefault();\n partsToFocus = getNextDay(parts);\n break;\n case 'ArrowLeft':\n ev.preventDefault();\n partsToFocus = getPreviousDay(parts);\n break;\n case 'Home':\n ev.preventDefault();\n partsToFocus = getStartOfWeek(parts);\n break;\n case 'End':\n ev.preventDefault();\n partsToFocus = getEndOfWeek(parts);\n break;\n case 'PageUp':\n ev.preventDefault();\n partsToFocus = ev.shiftKey ? getPreviousYear(parts) : getPreviousMonth(parts);\n break;\n case 'PageDown':\n ev.preventDefault();\n partsToFocus = ev.shiftKey ? getNextYear(parts) : getNextMonth(parts);\n break;\n /**\n * Do not preventDefault here\n * as we do not want to override other\n * browser defaults such as pressing Enter/Space\n * to select a day.\n */\n default:\n return;\n }\n /**\n * If the day we want to move focus to is\n * disabled, do not do anything.\n */\n if (isDayDisabled(partsToFocus, this.minParts, this.maxParts)) {\n return;\n }\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), partsToFocus));\n /**\n * Give view a chance to re-render\n * then move focus to the new working day\n */\n requestAnimationFrame(() => this.focusWorkingDay(currentMonth));\n });\n };\n this.focusWorkingDay = (currentMonth) => {\n /**\n * Get the number of padding days so\n * we know how much to offset our next selector by\n * to grab the correct calenday-day element.\n */\n const padding = currentMonth.querySelectorAll('.calendar-day-padding');\n const { day } = this.workingParts;\n if (day === null) {\n return;\n }\n /**\n * Get the calendar day element\n * and focus it.\n */\n const dayEl = currentMonth.querySelector(`.calendar-day:nth-of-type(${padding.length + day})`);\n if (dayEl) {\n dayEl.focus();\n }\n };\n this.processMinParts = () => {\n if (this.min === undefined) {\n this.minParts = undefined;\n return;\n }\n const { month, day, year, hour, minute } = parseDate(this.min);\n this.minParts = {\n month,\n day,\n year,\n hour,\n minute,\n };\n };\n this.processMaxParts = () => {\n if (this.max === undefined) {\n this.maxParts = undefined;\n return;\n }\n const { month, day, year, hour, minute } = parseDate(this.max);\n this.maxParts = {\n month,\n day,\n year,\n hour,\n minute,\n };\n };\n this.initializeCalendarListener = () => {\n const calendarBodyRef = this.getCalendarBodyEl();\n if (!calendarBodyRef) {\n return;\n }\n /**\n * For performance reasons, we only render 3\n * months at a time: The current month, the previous\n * month, and the next month. We have a scroll listener\n * on the calendar body to append/prepend new months.\n *\n * We can do this because Stencil is smart enough to not\n * re-create the .calendar-month containers, but rather\n * update the content within those containers.\n *\n * As an added bonus, WebKit has some troubles with\n * scroll-snap-stop: always, so not rendering all of\n * the months in a row allows us to mostly sidestep\n * that issue.\n */\n const months = calendarBodyRef.querySelectorAll('.calendar-month');\n const startMonth = months[0];\n const workingMonth = months[1];\n const endMonth = months[2];\n const mode = getIonMode(this);\n const needsiOSRubberBandFix = mode === 'ios' && typeof navigator !== 'undefined' && navigator.maxTouchPoints > 1;\n /**\n * Before setting up the scroll listener,\n * scroll the middle month into view.\n * scrollIntoView() will scroll entire page\n * if element is not in viewport. Use scrollLeft instead.\n */\n writeTask(() => {\n calendarBodyRef.scrollLeft = startMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n const getChangedMonth = (parts) => {\n const box = calendarBodyRef.getBoundingClientRect();\n const root = this.el.shadowRoot;\n /**\n * Get the element that is in the center of the calendar body.\n * This will be an element inside of the active month.\n */\n const elementAtCenter = root.elementFromPoint(box.x + box.width / 2, box.y + box.height / 2);\n /**\n * If there is no element then the\n * component may be re-rendering on a slow device.\n */\n if (!elementAtCenter)\n return;\n const month = elementAtCenter.closest('.calendar-month');\n if (!month)\n return;\n /**\n * The edge of the month must be lined up with\n * the edge of the calendar body in order for\n * the component to update. Otherwise, it\n * may be the case that the user has paused their\n * swipe or the browser has not finished snapping yet.\n * Rather than check if the x values are equal,\n * we give it a tolerance of 2px to account for\n * sub pixel rendering.\n */\n const monthBox = month.getBoundingClientRect();\n if (Math.abs(monthBox.x - box.x) > 2)\n return;\n /**\n * From here, we can determine if the start\n * month or the end month was scrolled into view.\n * If no month was changed, then we can return from\n * the scroll callback early.\n */\n if (month === startMonth) {\n return getPreviousMonth(parts);\n }\n else if (month === endMonth) {\n return getNextMonth(parts);\n }\n else {\n return;\n }\n };\n const updateActiveMonth = () => {\n if (needsiOSRubberBandFix) {\n calendarBodyRef.style.removeProperty('pointer-events');\n appliediOSRubberBandFix = false;\n }\n /**\n * If the month did not change\n * then we can return early.\n */\n const newDate = getChangedMonth(this.workingParts);\n if (!newDate)\n return;\n const { month, day, year } = newDate;\n if (isMonthDisabled({ month, year, day: null }, {\n minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),\n maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),\n })) {\n return;\n }\n /**\n * Prevent scrolling for other browsers\n * to give the DOM time to update and the container\n * time to properly snap.\n */\n calendarBodyRef.style.setProperty('overflow', 'hidden');\n /**\n * Use a writeTask here to ensure\n * that the state is updated and the\n * correct month is scrolled into view\n * in the same frame. This is not\n * typically a problem on newer devices\n * but older/slower device may have a flicker\n * if we did not do this.\n */\n writeTask(() => {\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), { month, day: day, year }));\n calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);\n calendarBodyRef.style.removeProperty('overflow');\n });\n };\n /**\n * When the container finishes scrolling we\n * need to update the DOM with the selected month.\n */\n let scrollTimeout;\n /**\n * We do not want to attempt to set pointer-events\n * multiple times within a single swipe gesture as\n * that adds unnecessary work to the main thread.\n */\n let appliediOSRubberBandFix = false;\n const scrollCallback = () => {\n if (scrollTimeout) {\n clearTimeout(scrollTimeout);\n }\n /**\n * On iOS it is possible to quickly rubber band\n * the scroll area before the scroll timeout has fired.\n * This results in users reaching the end of the scrollable\n * container before the DOM has updated.\n * By setting `pointer-events: none` we can ensure that\n * subsequent swipes do not happen while the container\n * is snapping.\n */\n if (!appliediOSRubberBandFix && needsiOSRubberBandFix) {\n calendarBodyRef.style.setProperty('pointer-events', 'none');\n appliediOSRubberBandFix = true;\n }\n // Wait ~3 frames\n scrollTimeout = setTimeout(updateActiveMonth, 50);\n };\n calendarBodyRef.addEventListener('scroll', scrollCallback);\n this.destroyCalendarListener = () => {\n calendarBodyRef.removeEventListener('scroll', scrollCallback);\n };\n });\n };\n /**\n * Clean up all listeners except for the overlay\n * listener. This is so that we can re-create the listeners\n * if the datetime has been hidden/presented by a modal or popover.\n */\n this.destroyInteractionListeners = () => {\n const { destroyCalendarListener, destroyKeyboardMO } = this;\n if (destroyCalendarListener !== undefined) {\n destroyCalendarListener();\n }\n if (destroyKeyboardMO !== undefined) {\n destroyKeyboardMO();\n }\n };\n this.processValue = (value) => {\n this.highlightActiveParts = !!value;\n let valueToProcess = parseDate(value || getToday());\n const { minParts, maxParts, multiple } = this;\n if (!multiple && Array.isArray(value)) {\n this.value = value[0];\n valueToProcess = valueToProcess[0];\n }\n warnIfValueOutOfBounds(valueToProcess, minParts, maxParts);\n /**\n * If there are multiple values, pick an arbitrary one to clamp to. This way,\n * if the values are across months, we always show at least one of them. Note\n * that the values don't necessarily have to be in order.\n */\n const singleValue = Array.isArray(valueToProcess) ? valueToProcess[0] : valueToProcess;\n const { month, day, year, hour, minute, tzOffset } = clampDate(singleValue, minParts, maxParts);\n const ampm = parseAmPm(hour);\n this.setWorkingParts({\n month,\n day,\n year,\n hour,\n minute,\n tzOffset,\n ampm,\n });\n if (Array.isArray(valueToProcess)) {\n this.activeParts = [...valueToProcess];\n }\n else {\n this.activeParts = {\n month,\n day,\n year,\n hour,\n minute,\n tzOffset,\n ampm,\n };\n }\n };\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n this.hasValue = () => {\n return this.value != null && this.value !== '';\n };\n this.nextMonth = () => {\n const calendarBodyRef = this.getCalendarBodyEl();\n if (!calendarBodyRef) {\n return;\n }\n const nextMonth = calendarBodyRef.querySelector('.calendar-month:last-of-type');\n if (!nextMonth) {\n return;\n }\n const left = nextMonth.offsetWidth * 2;\n calendarBodyRef.scrollTo({\n top: 0,\n left: left * (isRTL(this.el) ? -1 : 1),\n behavior: 'smooth',\n });\n };\n this.prevMonth = () => {\n const calendarBodyRef = this.getCalendarBodyEl();\n if (!calendarBodyRef) {\n return;\n }\n const prevMonth = calendarBodyRef.querySelector('.calendar-month:first-of-type');\n if (!prevMonth) {\n return;\n }\n calendarBodyRef.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth',\n });\n };\n this.toggleMonthAndYearView = () => {\n this.showMonthAndYear = !this.showMonthAndYear;\n };\n }\n disabledChanged() {\n this.emitStyle();\n }\n minChanged() {\n this.processMinParts();\n }\n maxChanged() {\n this.processMaxParts();\n }\n yearValuesChanged() {\n this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);\n }\n monthValuesChanged() {\n this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues);\n }\n dayValuesChanged() {\n this.parsedDayValues = convertToArrayOfNumbers(this.dayValues);\n }\n hourValuesChanged() {\n this.parsedHourValues = convertToArrayOfNumbers(this.hourValues);\n }\n minuteValuesChanged() {\n this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues);\n }\n activePartsChanged() {\n this.activePartsClone = this.activeParts;\n }\n /**\n * Update the datetime value when the value changes\n */\n valueChanged() {\n const { value, minParts, maxParts, workingParts, multiple } = this;\n if (this.hasValue()) {\n if (!multiple && Array.isArray(value)) {\n this.value = value[0];\n return; // setting this.value will trigger re-run of this function\n }\n /**\n * Clones the value of the `activeParts` to the private clone, to update\n * the date display on the current render cycle without causing another render.\n *\n * This allows us to update the current value's date/time display without\n * refocusing or shifting the user's display (leaves the user in place).\n */\n const valueDateParts = parseDate(value);\n if (valueDateParts) {\n warnIfValueOutOfBounds(valueDateParts, minParts, maxParts);\n if (Array.isArray(valueDateParts)) {\n this.activePartsClone = [...valueDateParts];\n }\n else {\n const { month, day, year, hour, minute } = valueDateParts;\n const ampm = hour != null ? (hour >= 12 ? 'pm' : 'am') : undefined;\n this.activePartsClone = Object.assign(Object.assign({}, this.activeParts), { month,\n day,\n year,\n hour,\n minute,\n ampm });\n /**\n * The working parts am/pm value must be updated when the value changes, to\n * ensure the time picker hour column values are generated correctly.\n *\n * Note that we don't need to do this if valueDateParts is an array, since\n * multiple=\"true\" does not apply to time pickers.\n */\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm }));\n }\n }\n else {\n printIonWarning(`Unable to parse date string: ${value}. Please provide a valid ISO 8601 datetime string.`);\n }\n }\n this.emitStyle();\n this.ionChange.emit({ value });\n }\n /**\n * Confirms the selected datetime value, updates the\n * `value` property, and optionally closes the popover\n * or modal that the datetime was presented in.\n */\n async confirm(closeOverlay = false) {\n const { highlightActiveParts, isCalendarPicker, activeParts } = this;\n /**\n * We only update the value if the presentation is not a calendar picker,\n * or if `highlightActiveParts` is true; indicating that the user\n * has selected a date from the calendar picker.\n *\n * Otherwise \"today\" would accidentally be set as the value.\n */\n if (highlightActiveParts || !isCalendarPicker) {\n const activePartsIsArray = Array.isArray(activeParts);\n if (activePartsIsArray && activeParts.length === 0) {\n this.value = undefined;\n }\n else {\n /**\n * Prevent convertDataToISO from doing any\n * kind of transformation based on timezone\n * This cancels out any change it attempts to make\n *\n * Important: Take the timezone offset based on\n * the date that is currently selected, otherwise\n * there can be 1 hr difference when dealing w/ DST\n */\n if (activePartsIsArray) {\n const dates = convertDataToISO(activeParts).map((str) => new Date(str));\n for (let i = 0; i < dates.length; i++) {\n activeParts[i].tzOffset = dates[i].getTimezoneOffset() * -1;\n }\n }\n else {\n const date = new Date(convertDataToISO(activeParts));\n activeParts.tzOffset = date.getTimezoneOffset() * -1;\n }\n this.value = convertDataToISO(activeParts);\n }\n }\n if (closeOverlay) {\n this.closeParentOverlay();\n }\n }\n /**\n * Resets the internal state of the datetime but does not update the value.\n * Passing a valid ISO-8601 string will reset the state of the component to the provided date.\n * If no value is provided, the internal state will be reset to the clamped value of the min, max and today.\n */\n async reset(startDate) {\n this.processValue(startDate);\n }\n /**\n * Emits the ionCancel event and\n * optionally closes the popover\n * or modal that the datetime was\n * presented in.\n */\n async cancel(closeOverlay = false) {\n this.ionCancel.emit();\n if (closeOverlay) {\n this.closeParentOverlay();\n }\n }\n get isCalendarPicker() {\n const { presentation } = this;\n return presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n }\n connectedCallback() {\n this.clearFocusVisible = startFocusVisible(this.el).destroy;\n }\n disconnectedCallback() {\n if (this.clearFocusVisible) {\n this.clearFocusVisible();\n this.clearFocusVisible = undefined;\n }\n }\n initializeListeners() {\n this.initializeCalendarListener();\n this.initializeKeyboardListeners();\n }\n componentDidLoad() {\n /**\n * If a scrollable element is hidden using `display: none`,\n * it will not have a scroll height meaning we cannot scroll elements\n * into view. As a result, we will need to wait for the datetime to become\n * visible if used inside of a modal or a popover otherwise the scrollable\n * areas will not have the correct values snapped into place.\n */\n const visibleCallback = (entries) => {\n const ev = entries[0];\n if (!ev.isIntersecting) {\n return;\n }\n this.initializeListeners();\n /**\n * TODO: Datetime needs a frame to ensure that it\n * can properly scroll contents into view. As a result\n * we hide the scrollable content until after that frame\n * so users do not see the content quickly shifting. The downside\n * is that the content will pop into view a frame after. Maybe there\n * is a better way to handle this?\n */\n writeTask(() => {\n this.el.classList.add('datetime-ready');\n });\n };\n const visibleIO = new IntersectionObserver(visibleCallback, { threshold: 0.01 });\n /**\n * Use raf to avoid a race condition between the component loading and\n * its display animation starting (such as when shown in a modal). This\n * could cause the datetime to start at a visibility of 0, erroneously\n * triggering the `hiddenIO` observer below.\n */\n raf(() => visibleIO === null || visibleIO === void 0 ? void 0 : visibleIO.observe(this.el));\n /**\n * We need to clean up listeners when the datetime is hidden\n * in a popover/modal so that we can properly scroll containers\n * back into view if they are re-presented. When the datetime is hidden\n * the scroll areas have scroll widths/heights of 0px, so any snapping\n * we did originally has been lost.\n */\n const hiddenCallback = (entries) => {\n const ev = entries[0];\n if (ev.isIntersecting) {\n return;\n }\n this.destroyInteractionListeners();\n /**\n * When datetime is hidden, we need to make sure that\n * the month/year picker is closed. Otherwise,\n * it will be open when the datetime re-appears\n * and the scroll area of the calendar grid will be 0.\n * As a result, the wrong month will be shown.\n */\n this.showMonthAndYear = false;\n writeTask(() => {\n this.el.classList.remove('datetime-ready');\n });\n };\n const hiddenIO = new IntersectionObserver(hiddenCallback, { threshold: 0 });\n raf(() => hiddenIO === null || hiddenIO === void 0 ? void 0 : hiddenIO.observe(this.el));\n /**\n * Datetime uses Ionic components that emit\n * ionFocus and ionBlur. These events are\n * composed meaning they will cross\n * the shadow dom boundary. We need to\n * stop propagation on these events otherwise\n * developers will see 2 ionFocus or 2 ionBlur\n * events at a time.\n */\n const root = getElementRoot(this.el);\n root.addEventListener('ionFocus', (ev) => ev.stopPropagation());\n root.addEventListener('ionBlur', (ev) => ev.stopPropagation());\n }\n /**\n * When the presentation is changed, all calendar content is recreated,\n * so we need to re-init behavior with the new elements.\n */\n componentDidRender() {\n const { presentation, prevPresentation } = this;\n if (prevPresentation === null) {\n this.prevPresentation = presentation;\n return;\n }\n if (presentation === prevPresentation) {\n return;\n }\n this.prevPresentation = presentation;\n this.destroyInteractionListeners();\n this.initializeListeners();\n /**\n * The month/year picker from the date interface\n * should be closed as it is not available in non-date\n * interfaces.\n */\n this.showMonthAndYear = false;\n raf(() => {\n this.ionRender.emit();\n });\n }\n componentWillLoad() {\n const { el, multiple, presentation, preferWheel } = this;\n if (multiple) {\n if (presentation !== 'date') {\n printIonWarning('Multiple date selection is only supported for presentation=\"date\".', el);\n }\n if (preferWheel) {\n printIonWarning('Multiple date selection is not supported with preferWheel=\"true\".', el);\n }\n }\n this.processMinParts();\n this.processMaxParts();\n this.processValue(this.value);\n this.parsedHourValues = convertToArrayOfNumbers(this.hourValues);\n this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues);\n this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues);\n this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);\n this.parsedDayValues = convertToArrayOfNumbers(this.dayValues);\n this.emitStyle();\n }\n emitStyle() {\n this.ionStyle.emit({\n interactive: true,\n datetime: true,\n 'interactive-disabled': this.disabled,\n });\n }\n /**\n * Universal render methods\n * These are pieces of datetime that\n * are rendered independently of presentation.\n */\n renderFooter() {\n const { showDefaultButtons, showClearButton } = this;\n const hasSlottedButtons = this.el.querySelector('[slot=\"buttons\"]') !== null;\n if (!hasSlottedButtons && !showDefaultButtons && !showClearButton) {\n return;\n }\n const clearButtonClick = () => {\n this.reset();\n this.value = undefined;\n };\n /**\n * By default we render two buttons:\n * Cancel - Dismisses the datetime and\n * does not update the `value` prop.\n * OK - Dismisses the datetime and\n * updates the `value` prop.\n */\n return (h(\"div\", { class: \"datetime-footer\" }, h(\"div\", { class: \"datetime-buttons\" }, h(\"div\", { class: {\n ['datetime-action-buttons']: true,\n ['has-clear-button']: this.showClearButton,\n } }, h(\"slot\", { name: \"buttons\" }, h(\"ion-buttons\", null, showDefaultButtons && (h(\"ion-button\", { id: \"cancel-button\", color: this.color, onClick: () => this.cancel(true) }, this.cancelText)), h(\"div\", null, showClearButton && (h(\"ion-button\", { id: \"clear-button\", color: this.color, onClick: () => clearButtonClick() }, this.clearText)), showDefaultButtons && (h(\"ion-button\", { id: \"confirm-button\", color: this.color, onClick: () => this.confirm(true) }, this.doneText)))))))));\n }\n /**\n * Wheel picker render methods\n */\n renderWheelPicker(forcePresentation = this.presentation) {\n /**\n * If presentation=\"time-date\" we switch the\n * order of the render array here instead of\n * manually reordering each date/time picker\n * column with CSS. This allows for additional\n * flexibility if we need to render subsets\n * of the date/time data or do additional ordering\n * within the child render functions.\n */\n const renderArray = forcePresentation === 'time-date'\n ? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)]\n : [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];\n return h(\"ion-picker-internal\", null, renderArray);\n }\n renderDatePickerColumns(forcePresentation) {\n return forcePresentation === 'date-time' || forcePresentation === 'time-date'\n ? this.renderCombinedDatePickerColumn()\n : this.renderIndividualDatePickerColumns(forcePresentation);\n }\n renderCombinedDatePickerColumn() {\n const { activeParts, workingParts, locale, minParts, maxParts, todayParts, isDateEnabled } = this;\n /**\n * By default, generate a range of 3 months:\n * Previous month, current month, and next month\n */\n const monthsToRender = generateMonths(workingParts);\n /**\n * generateMonths returns the day data as well,\n * but we do not want the day value to act as a max/min\n * on the data we are going to generate.\n */\n for (let i = 0; i <= monthsToRender.length - 1; i++) {\n monthsToRender[i].day = null;\n }\n /**\n * If developers have provided their own\n * min/max values, use that instead. Otherwise,\n * fallback to the default range of 3 months.\n */\n const min = minParts || monthsToRender[0];\n const max = maxParts || monthsToRender[monthsToRender.length - 1];\n const result = getCombinedDateColumnData(locale, workingParts, todayParts, min, max, this.parsedDayValues, this.parsedMonthValues);\n let items = result.items;\n const parts = result.parts;\n if (isDateEnabled) {\n items = items.map((itemObject, index) => {\n const referenceParts = parts[index];\n let disabled;\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n disabled = !isDateEnabled(convertDataToISO(referenceParts));\n }\n catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n return Object.assign(Object.assign({}, itemObject), { disabled });\n });\n }\n /**\n * If we have selected a day already, then default the column\n * to that value. Otherwise, default it to today.\n */\n const todayString = workingParts.day\n ? `${workingParts.year}-${workingParts.month}-${workingParts.day}`\n : `${todayParts.year}-${todayParts.month}-${todayParts.day}`;\n return (h(\"ion-picker-column-internal\", { class: \"date-column\", color: this.color, items: items, value: todayString, onIonChange: (ev) => {\n // TODO(FW-1823) Remove this when iOS 14 support is dropped.\n // Due to a Safari 14 issue we need to destroy\n // the scroll listener before we update state\n // and trigger a re-render.\n if (this.destroyCalendarListener) {\n this.destroyCalendarListener();\n }\n const { value } = ev.detail;\n const findPart = parts.find(({ month, day, year }) => value === `${year}-${month}-${day}`);\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), findPart));\n if (!Array.isArray(activeParts)) {\n this.setActiveParts(Object.assign(Object.assign({}, activeParts), findPart));\n }\n // We can re-attach the scroll listener after\n // the working parts have been updated.\n this.initializeCalendarListener();\n ev.stopPropagation();\n } }));\n }\n renderIndividualDatePickerColumns(forcePresentation) {\n const { workingParts, isDateEnabled } = this;\n const shouldRenderMonths = forcePresentation !== 'year' && forcePresentation !== 'time';\n const months = shouldRenderMonths\n ? getMonthColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedMonthValues)\n : [];\n const shouldRenderDays = forcePresentation === 'date';\n let days = shouldRenderDays\n ? getDayColumnData(this.locale, workingParts, this.minParts, this.maxParts, this.parsedDayValues)\n : [];\n if (isDateEnabled) {\n days = days.map((dayObject) => {\n const { value } = dayObject;\n const valueNum = typeof value === 'string' ? parseInt(value) : value;\n const referenceParts = {\n month: workingParts.month,\n day: valueNum,\n year: workingParts.year,\n };\n let disabled;\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n disabled = !isDateEnabled(convertDataToISO(referenceParts));\n }\n catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n return Object.assign(Object.assign({}, dayObject), { disabled });\n });\n }\n const shouldRenderYears = forcePresentation !== 'month' && forcePresentation !== 'time';\n const years = shouldRenderYears\n ? getYearColumnData(this.todayParts, this.minParts, this.maxParts, this.parsedYearValues)\n : [];\n /**\n * Certain locales show the day before the month.\n */\n const showMonthFirst = isMonthFirstLocale(this.locale, { month: 'numeric', day: 'numeric' });\n let renderArray = [];\n if (showMonthFirst) {\n renderArray = [\n this.renderMonthPickerColumn(months),\n this.renderDayPickerColumn(days),\n this.renderYearPickerColumn(years),\n ];\n }\n else {\n renderArray = [\n this.renderDayPickerColumn(days),\n this.renderMonthPickerColumn(months),\n this.renderYearPickerColumn(years),\n ];\n }\n return renderArray;\n }\n renderDayPickerColumn(days) {\n var _a;\n if (days.length === 0) {\n return [];\n }\n const { activeParts, workingParts } = this;\n return (h(\"ion-picker-column-internal\", { class: \"day-column\", color: this.color, items: days, value: (_a = (workingParts.day || this.todayParts.day)) !== null && _a !== void 0 ? _a : undefined, onIonChange: (ev) => {\n // TODO(FW-1823) Remove this when iOS 14 support is dropped.\n // Due to a Safari 14 issue we need to destroy\n // the scroll listener before we update state\n // and trigger a re-render.\n if (this.destroyCalendarListener) {\n this.destroyCalendarListener();\n }\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { day: ev.detail.value }));\n if (!Array.isArray(activeParts)) {\n this.setActiveParts(Object.assign(Object.assign({}, activeParts), { day: ev.detail.value }));\n }\n // We can re-attach the scroll listener after\n // the working parts have been updated.\n this.initializeCalendarListener();\n ev.stopPropagation();\n } }));\n }\n renderMonthPickerColumn(months) {\n if (months.length === 0) {\n return [];\n }\n const { activeParts, workingParts } = this;\n return (h(\"ion-picker-column-internal\", { class: \"month-column\", color: this.color, items: months, value: workingParts.month, onIonChange: (ev) => {\n // TODO(FW-1823) Remove this when iOS 14 support is dropped.\n // Due to a Safari 14 issue we need to destroy\n // the scroll listener before we update state\n // and trigger a re-render.\n if (this.destroyCalendarListener) {\n this.destroyCalendarListener();\n }\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { month: ev.detail.value }));\n if (!Array.isArray(activeParts)) {\n this.setActiveParts(Object.assign(Object.assign({}, activeParts), { month: ev.detail.value }));\n }\n // We can re-attach the scroll listener after\n // the working parts have been updated.\n this.initializeCalendarListener();\n ev.stopPropagation();\n } }));\n }\n renderYearPickerColumn(years) {\n if (years.length === 0) {\n return [];\n }\n const { activeParts, workingParts } = this;\n return (h(\"ion-picker-column-internal\", { class: \"year-column\", color: this.color, items: years, value: workingParts.year, onIonChange: (ev) => {\n // TODO(FW-1823) Remove this when iOS 14 support is dropped.\n // Due to a Safari 14 issue we need to destroy\n // the scroll listener before we update state\n // and trigger a re-render.\n if (this.destroyCalendarListener) {\n this.destroyCalendarListener();\n }\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { year: ev.detail.value }));\n if (!Array.isArray(activeParts)) {\n this.setActiveParts(Object.assign(Object.assign({}, activeParts), { year: ev.detail.value }));\n }\n // We can re-attach the scroll listener after\n // the working parts have been updated.\n this.initializeCalendarListener();\n ev.stopPropagation();\n } }));\n }\n renderTimePickerColumns(forcePresentation) {\n if (['date', 'month', 'month-year', 'year'].includes(forcePresentation)) {\n return [];\n }\n const { hoursData, minutesData, dayPeriodData } = getTimeColumnsData(this.locale, this.workingParts, this.hourCycle, this.value ? this.minParts : undefined, this.value ? this.maxParts : undefined, this.parsedHourValues, this.parsedMinuteValues);\n return [\n this.renderHourPickerColumn(hoursData),\n this.renderMinutePickerColumn(minutesData),\n this.renderDayPeriodPickerColumn(dayPeriodData),\n ];\n }\n renderHourPickerColumn(hoursData) {\n const { workingParts, activePartsClone } = this;\n if (hoursData.length === 0)\n return [];\n return (h(\"ion-picker-column-internal\", { color: this.color, value: activePartsClone.hour, items: hoursData, numericInput: true, onIonChange: (ev) => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { hour: ev.detail.value }));\n if (!Array.isArray(activePartsClone)) {\n this.setActiveParts(Object.assign(Object.assign({}, activePartsClone), { hour: ev.detail.value }));\n }\n ev.stopPropagation();\n } }));\n }\n renderMinutePickerColumn(minutesData) {\n const { workingParts, activePartsClone } = this;\n if (minutesData.length === 0)\n return [];\n return (h(\"ion-picker-column-internal\", { color: this.color, value: activePartsClone.minute, items: minutesData, numericInput: true, onIonChange: (ev) => {\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { minute: ev.detail.value }));\n if (!Array.isArray(activePartsClone)) {\n this.setActiveParts(Object.assign(Object.assign({}, activePartsClone), { minute: ev.detail.value }));\n }\n ev.stopPropagation();\n } }));\n }\n renderDayPeriodPickerColumn(dayPeriodData) {\n const { workingParts, activePartsClone } = this;\n if (dayPeriodData.length === 0) {\n return [];\n }\n const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);\n return (h(\"ion-picker-column-internal\", { style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, value: activePartsClone.ampm, items: dayPeriodData, onIonChange: (ev) => {\n const hour = calculateHourFromAMPM(workingParts, ev.detail.value);\n this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm: ev.detail.value, hour }));\n if (!Array.isArray(activePartsClone)) {\n this.setActiveParts(Object.assign(Object.assign({}, activePartsClone), { ampm: ev.detail.value, hour }));\n }\n ev.stopPropagation();\n } }));\n }\n renderWheelView(forcePresentation) {\n const { locale } = this;\n const showMonthFirst = isMonthFirstLocale(locale);\n const columnOrder = showMonthFirst ? 'month-first' : 'year-first';\n return (h(\"div\", { class: {\n [`wheel-order-${columnOrder}`]: true,\n } }, this.renderWheelPicker(forcePresentation)));\n }\n /**\n * Grid Render Methods\n */\n renderCalendarHeader(mode) {\n const expandedIcon = mode === 'ios' ? chevronDown : caretUpSharp;\n const collapsedIcon = mode === 'ios' ? chevronForward : caretDownSharp;\n const prevMonthDisabled = isPrevMonthDisabled(this.workingParts, this.minParts, this.maxParts);\n const nextMonthDisabled = isNextMonthDisabled(this.workingParts, this.maxParts);\n return (h(\"div\", { class: \"calendar-header\" }, h(\"div\", { class: \"calendar-action-buttons\" }, h(\"div\", { class: \"calendar-month-year\" }, h(\"ion-item\", { button: true, detail: false, lines: \"none\", onClick: () => this.toggleMonthAndYearView() }, h(\"ion-label\", null, getMonthAndYear(this.locale, this.workingParts), ' ', h(\"ion-icon\", { icon: this.showMonthAndYear ? expandedIcon : collapsedIcon, lazy: false })))), h(\"div\", { class: \"calendar-next-prev\" }, h(\"ion-buttons\", null, h(\"ion-button\", { disabled: prevMonthDisabled, onClick: () => this.prevMonth() }, h(\"ion-icon\", { slot: \"icon-only\", icon: chevronBack, lazy: false, flipRtl: true })), h(\"ion-button\", { disabled: nextMonthDisabled, onClick: () => this.nextMonth() }, h(\"ion-icon\", { slot: \"icon-only\", icon: chevronForward, lazy: false, flipRtl: true }))))), h(\"div\", { class: \"calendar-days-of-week\" }, getDaysOfWeek(this.locale, mode, this.firstDayOfWeek % 7).map((d) => {\n return h(\"div\", { class: \"day-of-week\" }, d);\n }))));\n }\n renderMonth(month, year) {\n const { highlightActiveParts } = this;\n const yearAllowed = this.parsedYearValues === undefined || this.parsedYearValues.includes(year);\n const monthAllowed = this.parsedMonthValues === undefined || this.parsedMonthValues.includes(month);\n const isCalMonthDisabled = !yearAllowed || !monthAllowed;\n const swipeDisabled = isMonthDisabled({\n month,\n year,\n day: null,\n }, {\n // The day is not used when checking if a month is disabled.\n // Users should be able to access the min or max month, even if the\n // min/max date is out of bounds (e.g. min is set to Feb 15, Feb should not be disabled).\n minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),\n maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),\n });\n // The working month should never have swipe disabled.\n // Otherwise the CSS scroll snap will not work and the user\n // can free-scroll the calendar.\n const isWorkingMonth = this.workingParts.month === month && this.workingParts.year === year;\n return (h(\"div\", { class: {\n 'calendar-month': true,\n // Prevents scroll snap swipe gestures for months outside of the min/max bounds\n 'calendar-month-disabled': !isWorkingMonth && swipeDisabled,\n } }, h(\"div\", { class: \"calendar-month-grid\" }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7).map((dateObject, index) => {\n const { day, dayOfWeek } = dateObject;\n const { isDateEnabled, multiple } = this;\n const referenceParts = { month, day, year };\n const { isActive, isToday, ariaLabel, ariaSelected, disabled } = getCalendarDayState(this.locale, referenceParts, this.activePartsClone, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);\n let isCalDayDisabled = isCalMonthDisabled || disabled;\n if (!isCalDayDisabled && isDateEnabled !== undefined) {\n try {\n /**\n * The `isDateEnabled` implementation is try-catch wrapped\n * to prevent exceptions in the user's function from\n * interrupting the calendar rendering.\n */\n isCalDayDisabled = !isDateEnabled(convertDataToISO(referenceParts));\n }\n catch (e) {\n printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);\n }\n }\n return (h(\"button\", { tabindex: \"-1\", \"data-day\": day, \"data-month\": month, \"data-year\": year, \"data-index\": index, \"data-day-of-week\": dayOfWeek, disabled: isCalDayDisabled, class: {\n 'calendar-day-padding': day === null,\n 'calendar-day': true,\n 'calendar-day-active': isActive && highlightActiveParts,\n 'calendar-day-today': isToday,\n }, \"aria-selected\": ariaSelected, \"aria-label\": ariaLabel, onClick: () => {\n if (day === null) {\n return;\n }\n this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), { month,\n day,\n year }));\n // multiple only needs date info, so we can wipe out other fields like time\n if (multiple) {\n this.setActiveParts({\n month,\n day,\n year,\n }, isActive && highlightActiveParts);\n }\n else {\n this.setActiveParts(Object.assign(Object.assign({}, this.activeParts), { month,\n day,\n year }));\n }\n } }, day));\n }))));\n }\n renderCalendarBody() {\n return (h(\"div\", { class: \"calendar-body ion-focusable\", ref: (el) => (this.calendarBodyRef = el), tabindex: \"0\" }, generateMonths(this.workingParts).map(({ month, year }) => {\n return this.renderMonth(month, year);\n })));\n }\n renderCalendar(mode) {\n return (h(\"div\", { class: \"datetime-calendar\" }, this.renderCalendarHeader(mode), this.renderCalendarBody()));\n }\n renderTimeLabel() {\n const hasSlottedTimeLabel = this.el.querySelector('[slot=\"time-label\"]') !== null;\n if (!hasSlottedTimeLabel && !this.showDefaultTimeLabel) {\n return;\n }\n return h(\"slot\", { name: \"time-label\" }, \"Time\");\n }\n renderTimeOverlay() {\n const use24Hour = is24Hour(this.locale, this.hourCycle);\n return [\n h(\"div\", { class: \"time-header\" }, this.renderTimeLabel()),\n h(\"button\", { class: {\n 'time-body': true,\n 'time-body-active': this.isTimePopoverOpen,\n }, \"aria-expanded\": \"false\", \"aria-haspopup\": \"true\", onClick: async (ev) => {\n const { popoverRef } = this;\n if (popoverRef) {\n this.isTimePopoverOpen = true;\n popoverRef.present(new CustomEvent('ionShadowTarget', {\n detail: {\n ionShadowTarget: ev.target,\n },\n }));\n await popoverRef.onWillDismiss();\n this.isTimePopoverOpen = false;\n }\n } }, getLocalizedTime(this.locale, this.activePartsClone, use24Hour)),\n h(\"ion-popover\", { alignment: \"center\", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {\n /**\n * Intersection Observers do not consistently fire between Blink and Webkit\n * when toggling the visibility of the popover and trying to scroll the picker\n * column to the correct time value.\n *\n * This will correctly scroll the element position to the correct time value,\n * before the popover is fully presented.\n */\n const cols = ev.target.querySelectorAll('ion-picker-column-internal');\n // TODO (FW-615): Potentially remove this when intersection observers are fixed in picker column\n cols.forEach((col) => col.scrollActiveItemIntoView());\n }, style: {\n '--offset-y': '-10px',\n '--min-width': 'fit-content',\n },\n // Allow native browser keyboard events to support up/down/home/end key\n // navigation within the time picker.\n keyboardEvents: true, ref: (el) => (this.popoverRef = el) }, this.renderWheelPicker('time')),\n ];\n }\n renderCalendarViewHeader(mode) {\n const hasSlottedTitle = this.el.querySelector('[slot=\"title\"]') !== null;\n if (!hasSlottedTitle && !this.showDefaultTitle) {\n return;\n }\n return (h(\"div\", { class: \"datetime-header\" }, h(\"div\", { class: \"datetime-title\" }, h(\"slot\", { name: \"title\" }, \"Select Date\")), mode === 'md' && !this.multiple && (h(\"div\", { class: \"datetime-selected-date\" }, getMonthAndDay(this.locale, this.activeParts)))));\n }\n /**\n * Render time picker inside of datetime.\n * Do not pass color prop to segment on\n * iOS mode. MD segment has been customized and\n * should take on the color prop, but iOS\n * should just be the default segment.\n */\n renderTime() {\n const { presentation } = this;\n const timeOnlyPresentation = presentation === 'time';\n return (h(\"div\", { class: \"datetime-time\" }, timeOnlyPresentation ? this.renderWheelPicker() : this.renderTimeOverlay()));\n }\n /**\n * Renders the month/year picker that is\n * displayed on the calendar grid.\n * The .datetime-year class has additional\n * styles that let us show/hide the\n * picker when the user clicks on the\n * toggle in the calendar header.\n */\n renderCalendarViewMonthYearPicker() {\n return h(\"div\", { class: \"datetime-year\" }, this.renderWheelView('month-year'));\n }\n /**\n * Render entry point\n * All presentation types are rendered from here.\n */\n renderDatetime(mode) {\n const { presentation, preferWheel } = this;\n /**\n * Certain presentation types have separate grid and wheel displays.\n * If preferWheel is true then we should show a wheel picker instead.\n */\n const hasWheelVariant = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n if (preferWheel && hasWheelVariant) {\n return [this.renderWheelView(), this.renderFooter()];\n }\n switch (presentation) {\n case 'date-time':\n return [\n this.renderCalendarViewHeader(mode),\n this.renderCalendar(mode),\n this.renderCalendarViewMonthYearPicker(),\n this.renderTime(),\n this.renderFooter(),\n ];\n case 'time-date':\n return [\n this.renderCalendarViewHeader(mode),\n this.renderTime(),\n this.renderCalendar(mode),\n this.renderCalendarViewMonthYearPicker(),\n this.renderFooter(),\n ];\n case 'time':\n return [this.renderTime(), this.renderFooter()];\n case 'month':\n case 'month-year':\n case 'year':\n return [this.renderWheelView(), this.renderFooter()];\n default:\n return [\n this.renderCalendarViewHeader(mode),\n this.renderCalendar(mode),\n this.renderCalendarViewMonthYearPicker(),\n this.renderFooter(),\n ];\n }\n }\n render() {\n const { name, value, disabled, el, color, isPresented, readonly, showMonthAndYear, preferWheel, presentation, size, } = this;\n const mode = getIonMode(this);\n const isMonthAndYearPresentation = presentation === 'year' || presentation === 'month' || presentation === 'month-year';\n const shouldShowMonthAndYear = showMonthAndYear || isMonthAndYearPresentation;\n const monthYearPickerOpen = showMonthAndYear && !isMonthAndYearPresentation;\n const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';\n const hasWheelVariant = hasDatePresentation && preferWheel;\n const hasGrid = hasDatePresentation && !preferWheel;\n renderHiddenInput(true, el, name, formatValue(value), disabled);\n return (h(Host, { \"aria-disabled\": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {\n [mode]: true,\n ['datetime-presented']: isPresented,\n ['datetime-readonly']: readonly,\n ['datetime-disabled']: disabled,\n 'show-month-and-year': shouldShowMonthAndYear,\n 'month-year-picker-open': monthYearPickerOpen,\n [`datetime-presentation-${presentation}`]: true,\n [`datetime-size-${size}`]: true,\n [`datetime-prefer-wheel`]: hasWheelVariant,\n [`datetime-grid`]: hasGrid,\n })) }, this.renderDatetime(mode)));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"disabled\": [\"disabledChanged\"],\n \"min\": [\"minChanged\"],\n \"max\": [\"maxChanged\"],\n \"yearValues\": [\"yearValuesChanged\"],\n \"monthValues\": [\"monthValuesChanged\"],\n \"dayValues\": [\"dayValuesChanged\"],\n \"hourValues\": [\"hourValuesChanged\"],\n \"minuteValues\": [\"minuteValuesChanged\"],\n \"activeParts\": [\"activePartsChanged\"],\n \"value\": [\"valueChanged\"]\n }; }\n};\nlet datetimeIds = 0;\nDatetime.style = {\n ios: datetimeIosCss,\n md: datetimeMdCss\n};\n\n/**\n * iOS Picker Enter Animation\n */\nconst iosEnterAnimation = (baseEl) => {\n const baseAnimation = createAnimation();\n const backdropAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n backdropAnimation\n .addElement(baseEl.querySelector('ion-backdrop'))\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')\n .beforeStyles({\n 'pointer-events': 'none',\n })\n .afterClearStyles(['pointer-events']);\n wrapperAnimation\n .addElement(baseEl.querySelector('.picker-wrapper'))\n .fromTo('transform', 'translateY(100%)', 'translateY(0%)');\n return baseAnimation\n .addElement(baseEl)\n .easing('cubic-bezier(.36,.66,.04,1)')\n .duration(400)\n .addAnimation([backdropAnimation, wrapperAnimation]);\n};\n\n/**\n * iOS Picker Leave Animation\n */\nconst iosLeaveAnimation = (baseEl) => {\n const baseAnimation = createAnimation();\n const backdropAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n backdropAnimation\n .addElement(baseEl.querySelector('ion-backdrop'))\n .fromTo('opacity', 'var(--backdrop-opacity)', 0.01);\n wrapperAnimation\n .addElement(baseEl.querySelector('.picker-wrapper'))\n .fromTo('transform', 'translateY(0%)', 'translateY(100%)');\n return baseAnimation\n .addElement(baseEl)\n .easing('cubic-bezier(.36,.66,.04,1)')\n .duration(400)\n .addAnimation([backdropAnimation, wrapperAnimation]);\n};\n\nconst pickerIosCss = \".sc-ion-picker-ios-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}[dir=rtl].sc-ion-picker-ios-h,[dir=rtl] .sc-ion-picker-ios-h{left:unset;right:unset;right:0}.overlay-hidden.sc-ion-picker-ios-h{display:none}.picker-wrapper.sc-ion-picker-ios{border-radius:var(--border-radius);left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-wrapper.sc-ion-picker-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.picker-toolbar.sc-ion-picker-ios{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-ios{border:0;font-family:inherit}.picker-button.sc-ion-picker-ios:active,.picker-button.sc-ion-picker-ios:focus{outline:none}.picker-columns.sc-ion-picker-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;direction:ltr;overflow:hidden}.picker-above-highlight.sc-ion-picker-ios,.picker-below-highlight.sc-ion-picker-ios{display:none;pointer-events:none}.sc-ion-picker-ios-h{--background:var(--ion-background-color, #fff);--border-width:1px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-ios{display:-ms-flexbox;display:flex;height:44px;border-bottom:0.55px solid var(--border-color)}.picker-toolbar-button.sc-ion-picker-ios{-ms-flex:1;flex:1;text-align:end}.picker-toolbar-button.sc-ion-picker-ios:last-child .picker-button.sc-ion-picker-ios{font-weight:600}.picker-toolbar-button.sc-ion-picker-ios:first-child{font-weight:normal;text-align:start}.picker-button.sc-ion-picker-ios,.picker-button.ion-activated.sc-ion-picker-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:1em;padding-right:1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-button.sc-ion-picker-ios,.picker-button.ion-activated.sc-ion-picker-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:1em;padding-inline-start:1em;-webkit-padding-end:1em;padding-inline-end:1em}}.picker-columns.sc-ion-picker-ios{height:215px;-webkit-perspective:1000px;perspective:1000px}.picker-above-highlight.sc-ion-picker-ios{left:0;top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:81px;border-bottom:1px solid var(--border-color);background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to bottom, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:10}[dir=rtl].sc-ion-picker-ios .picker-above-highlight.sc-ion-picker-ios,[dir=rtl].sc-ion-picker-ios-h .picker-above-highlight.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-above-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}.picker-below-highlight.sc-ion-picker-ios{left:0;top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:119px;border-top:1px solid var(--border-color);background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to top, var(--background, var(--ion-background-color, #fff)) 30%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:11}[dir=rtl].sc-ion-picker-ios .picker-below-highlight.sc-ion-picker-ios,[dir=rtl].sc-ion-picker-ios-h .picker-below-highlight.sc-ion-picker-ios,[dir=rtl] .sc-ion-picker-ios-h .picker-below-highlight.sc-ion-picker-ios{left:unset;right:unset;right:0}\";\n\nconst pickerMdCss = \".sc-ion-picker-md-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}[dir=rtl].sc-ion-picker-md-h,[dir=rtl] .sc-ion-picker-md-h{left:unset;right:unset;right:0}.overlay-hidden.sc-ion-picker-md-h{display:none}.picker-wrapper.sc-ion-picker-md{border-radius:var(--border-radius);left:0;right:0;bottom:0;margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-wrapper.sc-ion-picker-md{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.picker-toolbar.sc-ion-picker-md{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-md{border:0;font-family:inherit}.picker-button.sc-ion-picker-md:active,.picker-button.sc-ion-picker-md:focus{outline:none}.picker-columns.sc-ion-picker-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;direction:ltr;overflow:hidden}.picker-above-highlight.sc-ion-picker-md,.picker-below-highlight.sc-ion-picker-md{display:none;pointer-events:none}.sc-ion-picker-md-h{--background:var(--ion-background-color, #fff);--border-width:0.55px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-md{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;height:44px}.picker-button.sc-ion-picker-md,.picker-button.ion-activated.sc-ion-picker-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:1.1em;padding-right:1.1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #3880ff);font-size:14px;font-weight:500;text-transform:uppercase;-webkit-box-shadow:none;box-shadow:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-button.sc-ion-picker-md,.picker-button.ion-activated.sc-ion-picker-md{padding-left:unset;padding-right:unset;-webkit-padding-start:1.1em;padding-inline-start:1.1em;-webkit-padding-end:1.1em;padding-inline-end:1.1em}}.picker-columns.sc-ion-picker-md{height:216px;-webkit-perspective:1800px;perspective:1800px}.picker-above-highlight.sc-ion-picker-md{left:0;top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:81px;border-bottom:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to bottom, var(--ion-background-color, #fff) 20%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:10}[dir=rtl].sc-ion-picker-md .picker-above-highlight.sc-ion-picker-md,[dir=rtl].sc-ion-picker-md-h .picker-above-highlight.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-above-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}.picker-below-highlight.sc-ion-picker-md{left:0;top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:119px;border-top:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to top, var(--ion-background-color, #fff) 30%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:11}[dir=rtl].sc-ion-picker-md .picker-below-highlight.sc-ion-picker-md,[dir=rtl].sc-ion-picker-md-h .picker-below-highlight.sc-ion-picker-md,[dir=rtl] .sc-ion-picker-md-h .picker-below-highlight.sc-ion-picker-md{left:unset;right:unset;right:0}\";\n\nconst Picker = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.didPresent = createEvent(this, \"ionPickerDidPresent\", 7);\n this.willPresent = createEvent(this, \"ionPickerWillPresent\", 7);\n this.willDismiss = createEvent(this, \"ionPickerWillDismiss\", 7);\n this.didDismiss = createEvent(this, \"ionPickerDidDismiss\", 7);\n this.presented = false;\n /**\n * If `true`, the keyboard will be automatically dismissed when the overlay is presented.\n */\n this.keyboardClose = true;\n /**\n * Array of buttons to be displayed at the top of the picker.\n */\n this.buttons = [];\n /**\n * Array of columns to be displayed in the picker.\n */\n this.columns = [];\n /**\n * Number of milliseconds to wait before dismissing the picker.\n */\n this.duration = 0;\n /**\n * If `true`, a backdrop will be displayed behind the picker.\n */\n this.showBackdrop = true;\n /**\n * If `true`, the picker will be dismissed when the backdrop is clicked.\n */\n this.backdropDismiss = true;\n /**\n * If `true`, the picker will animate.\n */\n this.animated = true;\n this.onBackdropTap = () => {\n this.dismiss(undefined, BACKDROP);\n };\n this.dispatchCancelHandler = (ev) => {\n const role = ev.detail.role;\n if (isCancel(role)) {\n const cancelButton = this.buttons.find((b) => b.role === 'cancel');\n this.callButtonHandler(cancelButton);\n }\n };\n }\n connectedCallback() {\n prepareOverlay(this.el);\n }\n /**\n * Present the picker overlay after it has been created.\n */\n async present() {\n await present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);\n if (this.duration > 0) {\n this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);\n }\n }\n /**\n * Dismiss the picker overlay after it has been presented.\n *\n * @param data Any data to emit in the dismiss events.\n * @param role The role of the element that is dismissing the picker.\n * This can be useful in a button handler for determining which button was\n * clicked to dismiss the picker.\n * Some examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n */\n dismiss(data, role) {\n if (this.durationTimeout) {\n clearTimeout(this.durationTimeout);\n }\n return dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);\n }\n /**\n * Returns a promise that resolves when the picker did dismiss.\n */\n onDidDismiss() {\n return eventMethod(this.el, 'ionPickerDidDismiss');\n }\n /**\n * Returns a promise that resolves when the picker will dismiss.\n */\n onWillDismiss() {\n return eventMethod(this.el, 'ionPickerWillDismiss');\n }\n /**\n * Get the column that matches the specified name.\n *\n * @param name The name of the column.\n */\n getColumn(name) {\n return Promise.resolve(this.columns.find((column) => column.name === name));\n }\n async buttonClick(button) {\n const role = button.role;\n if (isCancel(role)) {\n return this.dismiss(undefined, role);\n }\n const shouldDismiss = await this.callButtonHandler(button);\n if (shouldDismiss) {\n return this.dismiss(this.getSelected(), button.role);\n }\n return Promise.resolve();\n }\n async callButtonHandler(button) {\n if (button) {\n // a handler has been provided, execute it\n // pass the handler the values from the inputs\n const rtn = await safeCall(button.handler, this.getSelected());\n if (rtn === false) {\n // if the return value of the handler is false then do not dismiss\n return false;\n }\n }\n return true;\n }\n getSelected() {\n const selected = {};\n this.columns.forEach((col, index) => {\n const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;\n selected[col.name] = {\n text: selectedColumn ? selectedColumn.text : undefined,\n value: selectedColumn ? selectedColumn.value : undefined,\n columnIndex: index,\n };\n });\n return selected;\n }\n render() {\n const { htmlAttributes } = this;\n const mode = getIonMode(this);\n return (h(Host, Object.assign({ \"aria-modal\": \"true\", tabindex: \"-1\" }, htmlAttributes, { style: {\n zIndex: `${20000 + this.overlayIndex}`,\n }, class: Object.assign({ [mode]: true,\n // Used internally for styling\n [`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h(\"ion-backdrop\", { visible: this.showBackdrop, tappable: this.backdropDismiss }), h(\"div\", { tabindex: \"0\" }), h(\"div\", { class: \"picker-wrapper ion-overlay-wrapper\", role: \"dialog\" }, h(\"div\", { class: \"picker-toolbar\" }, this.buttons.map((b) => (h(\"div\", { class: buttonWrapperClass(b) }, h(\"button\", { type: \"button\", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h(\"div\", { class: \"picker-columns\" }, h(\"div\", { class: \"picker-above-highlight\" }), this.presented && this.columns.map((c) => h(\"ion-picker-column\", { col: c })), h(\"div\", { class: \"picker-below-highlight\" }))), h(\"div\", { tabindex: \"0\" })));\n }\n get el() { return getElement(this); }\n};\nconst buttonWrapperClass = (button) => {\n return {\n [`picker-toolbar-${button.role}`]: button.role !== undefined,\n 'picker-toolbar-button': true,\n };\n};\nconst buttonClass = (button) => {\n return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));\n};\nPicker.style = {\n ios: pickerIosCss,\n md: pickerMdCss\n};\n\nconst pickerColumnIosCss = \".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{left:0;top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}[dir=rtl] .picker-opt,:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{padding-left:4px;padding-right:4px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-col{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:20px;line-height:42px;pointer-events:none}.picker-opt{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-transform-origin:center center;transform-origin:center center;height:46px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:20px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}[dir=rtl] .picker-opt,:host-context([dir=rtl]) .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}\";\n\nconst pickerColumnMdCss = \".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{left:0;top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}[dir=rtl] .picker-opt,:host-context([dir=rtl]) .picker-opt{left:unset;right:unset;right:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.picker-col{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:22px;line-height:42px;pointer-events:none}.picker-opt{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;height:43px;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:22px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}.picker-prefix,.picker-suffix,.picker-opt.picker-opt-selected{color:var(--ion-color-primary, #3880ff)}\";\n\nconst PickerColumnCmp = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionPickerColChange = createEvent(this, \"ionPickerColChange\", 7);\n this.optHeight = 0;\n this.rotateFactor = 0;\n this.scaleFactor = 1;\n this.velocity = 0;\n this.y = 0;\n this.noAnimate = true;\n }\n colChanged() {\n this.refresh();\n }\n async connectedCallback() {\n let pickerRotateFactor = 0;\n let pickerScaleFactor = 0.81;\n const mode = getIonMode(this);\n if (mode === 'ios') {\n pickerRotateFactor = -0.46;\n pickerScaleFactor = 1;\n }\n this.rotateFactor = pickerRotateFactor;\n this.scaleFactor = pickerScaleFactor;\n this.gesture = (await import('./index-3f1a7d95.js')).createGesture({\n el: this.el,\n gestureName: 'picker-swipe',\n gesturePriority: 100,\n threshold: 0,\n passive: false,\n onStart: (ev) => this.onStart(ev),\n onMove: (ev) => this.onMove(ev),\n onEnd: (ev) => this.onEnd(ev),\n });\n this.gesture.enable();\n this.tmrId = setTimeout(() => {\n this.noAnimate = false;\n this.refresh(true);\n }, 250);\n }\n componentDidLoad() {\n const colEl = this.optsEl;\n if (colEl) {\n // DOM READ\n // We perfom a DOM read over a rendered item, this needs to happen after the first render\n this.optHeight = colEl.firstElementChild ? colEl.firstElementChild.clientHeight : 0;\n }\n this.refresh();\n }\n disconnectedCallback() {\n cancelAnimationFrame(this.rafId);\n clearTimeout(this.tmrId);\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n }\n emitColChange() {\n this.ionPickerColChange.emit(this.col);\n }\n setSelected(selectedIndex, duration) {\n // if there is a selected index, then figure out it's y position\n // if there isn't a selected index, then just use the top y position\n const y = selectedIndex > -1 ? -(selectedIndex * this.optHeight) : 0;\n this.velocity = 0;\n // set what y position we're at\n cancelAnimationFrame(this.rafId);\n this.update(y, duration, true);\n this.emitColChange();\n }\n update(y, duration, saveY) {\n if (!this.optsEl) {\n return;\n }\n // ensure we've got a good round number :)\n let translateY = 0;\n let translateZ = 0;\n const { col, rotateFactor } = this;\n const selectedIndex = (col.selectedIndex = this.indexForY(-y));\n const durationStr = duration === 0 ? '' : duration + 'ms';\n const scaleStr = `scale(${this.scaleFactor})`;\n const children = this.optsEl.children;\n for (let i = 0; i < children.length; i++) {\n const button = children[i];\n const opt = col.options[i];\n const optOffset = i * this.optHeight + y;\n let transform = '';\n if (rotateFactor !== 0) {\n const rotateX = optOffset * rotateFactor;\n if (Math.abs(rotateX) <= 90) {\n translateY = 0;\n translateZ = 90;\n transform = `rotateX(${rotateX}deg) `;\n }\n else {\n translateY = -9999;\n }\n }\n else {\n translateZ = 0;\n translateY = optOffset;\n }\n const selected = selectedIndex === i;\n transform += `translate3d(0px,${translateY}px,${translateZ}px) `;\n if (this.scaleFactor !== 1 && !selected) {\n transform += scaleStr;\n }\n // Update transition duration\n if (this.noAnimate) {\n opt.duration = 0;\n button.style.transitionDuration = '';\n }\n else if (duration !== opt.duration) {\n opt.duration = duration;\n button.style.transitionDuration = durationStr;\n }\n // Update transform\n if (transform !== opt.transform) {\n opt.transform = transform;\n }\n button.style.transform = transform;\n // Update selected item\n if (selected !== opt.selected) {\n opt.selected = selected;\n if (selected) {\n button.classList.add(PICKER_OPT_SELECTED);\n }\n else {\n button.classList.remove(PICKER_OPT_SELECTED);\n }\n }\n }\n this.col.prevSelected = selectedIndex;\n if (saveY) {\n this.y = y;\n }\n if (this.lastIndex !== selectedIndex) {\n // have not set a last index yet\n hapticSelectionChanged();\n this.lastIndex = selectedIndex;\n }\n }\n decelerate() {\n if (this.velocity !== 0) {\n // still decelerating\n this.velocity *= DECELERATION_FRICTION;\n // do not let it go slower than a velocity of 1\n this.velocity = this.velocity > 0 ? Math.max(this.velocity, 1) : Math.min(this.velocity, -1);\n let y = this.y + this.velocity;\n if (y > this.minY) {\n // whoops, it's trying to scroll up farther than the options we have!\n y = this.minY;\n this.velocity = 0;\n }\n else if (y < this.maxY) {\n // gahh, it's trying to scroll down farther than we can!\n y = this.maxY;\n this.velocity = 0;\n }\n this.update(y, 0, true);\n const notLockedIn = Math.round(y) % this.optHeight !== 0 || Math.abs(this.velocity) > 1;\n if (notLockedIn) {\n // isn't locked in yet, keep decelerating until it is\n this.rafId = requestAnimationFrame(() => this.decelerate());\n }\n else {\n this.velocity = 0;\n this.emitColChange();\n hapticSelectionEnd();\n }\n }\n else if (this.y % this.optHeight !== 0) {\n // needs to still get locked into a position so options line up\n const currentPos = Math.abs(this.y % this.optHeight);\n // create a velocity in the direction it needs to scroll\n this.velocity = currentPos > this.optHeight / 2 ? 1 : -1;\n this.decelerate();\n }\n }\n indexForY(y) {\n return Math.min(Math.max(Math.abs(Math.round(y / this.optHeight)), 0), this.col.options.length - 1);\n }\n // TODO should this check disabled?\n onStart(detail) {\n // We have to prevent default in order to block scrolling under the picker\n // but we DO NOT have to stop propagation, since we still want\n // some \"click\" events to capture\n if (detail.event.cancelable) {\n detail.event.preventDefault();\n }\n detail.event.stopPropagation();\n hapticSelectionStart();\n // reset everything\n cancelAnimationFrame(this.rafId);\n const options = this.col.options;\n let minY = options.length - 1;\n let maxY = 0;\n for (let i = 0; i < options.length; i++) {\n if (!options[i].disabled) {\n minY = Math.min(minY, i);\n maxY = Math.max(maxY, i);\n }\n }\n this.minY = -(minY * this.optHeight);\n this.maxY = -(maxY * this.optHeight);\n }\n onMove(detail) {\n if (detail.event.cancelable) {\n detail.event.preventDefault();\n }\n detail.event.stopPropagation();\n // update the scroll position relative to pointer start position\n let y = this.y + detail.deltaY;\n if (y > this.minY) {\n // scrolling up higher than scroll area\n y = Math.pow(y, 0.8);\n this.bounceFrom = y;\n }\n else if (y < this.maxY) {\n // scrolling down below scroll area\n y += Math.pow(this.maxY - y, 0.9);\n this.bounceFrom = y;\n }\n else {\n this.bounceFrom = 0;\n }\n this.update(y, 0, false);\n }\n onEnd(detail) {\n if (this.bounceFrom > 0) {\n // bounce back up\n this.update(this.minY, 100, true);\n this.emitColChange();\n return;\n }\n else if (this.bounceFrom < 0) {\n // bounce back down\n this.update(this.maxY, 100, true);\n this.emitColChange();\n return;\n }\n this.velocity = clamp(-MAX_PICKER_SPEED, detail.velocityY * 23, MAX_PICKER_SPEED);\n if (this.velocity === 0 && detail.deltaY === 0) {\n const opt = detail.event.target.closest('.picker-opt');\n if (opt === null || opt === void 0 ? void 0 : opt.hasAttribute('opt-index')) {\n this.setSelected(parseInt(opt.getAttribute('opt-index'), 10), TRANSITION_DURATION);\n }\n }\n else {\n this.y += detail.deltaY;\n if (Math.abs(detail.velocityY) < 0.05) {\n const isScrollingUp = detail.deltaY > 0;\n const optHeightFraction = (Math.abs(this.y) % this.optHeight) / this.optHeight;\n if (isScrollingUp && optHeightFraction > 0.5) {\n this.velocity = Math.abs(this.velocity) * -1;\n }\n else if (!isScrollingUp && optHeightFraction <= 0.5) {\n this.velocity = Math.abs(this.velocity);\n }\n }\n this.decelerate();\n }\n }\n refresh(forceRefresh) {\n let min = this.col.options.length - 1;\n let max = 0;\n const options = this.col.options;\n for (let i = 0; i < options.length; i++) {\n if (!options[i].disabled) {\n min = Math.min(min, i);\n max = Math.max(max, i);\n }\n }\n /**\n * Only update selected value if column has a\n * velocity of 0. If it does not, then the\n * column is animating might land on\n * a value different than the value at\n * selectedIndex\n */\n if (this.velocity !== 0) {\n return;\n }\n const selectedIndex = clamp(min, this.col.selectedIndex || 0, max);\n if (this.col.prevSelected !== selectedIndex || forceRefresh) {\n const y = selectedIndex * this.optHeight * -1;\n this.velocity = 0;\n this.update(y, TRANSITION_DURATION, true);\n }\n }\n render() {\n const col = this.col;\n const Button = 'button';\n const mode = getIonMode(this);\n return (h(Host, { class: {\n [mode]: true,\n 'picker-col': true,\n 'picker-opts-left': this.col.align === 'left',\n 'picker-opts-right': this.col.align === 'right',\n }, style: {\n 'max-width': this.col.columnWidth,\n } }, col.prefix && (h(\"div\", { class: \"picker-prefix\", style: { width: col.prefixWidth } }, col.prefix)), h(\"div\", { class: \"picker-opts\", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (h(Button, { type: \"button\", class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, \"opt-index\": index }, o.text)))), col.suffix && (h(\"div\", { class: \"picker-suffix\", style: { width: col.suffixWidth } }, col.suffix))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"col\": [\"colChanged\"]\n }; }\n};\nconst PICKER_OPT_SELECTED = 'picker-opt-selected';\nconst DECELERATION_FRICTION = 0.97;\nconst MAX_PICKER_SPEED = 90;\nconst TRANSITION_DURATION = 150;\nPickerColumnCmp.style = {\n ios: pickerColumnIosCss,\n md: pickerColumnMdCss\n};\n\nexport { Datetime as ion_datetime, Picker as ion_picker, PickerColumnCmp as ion_picker_column };\n"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,CAAC,IAAIC,gBAAd,EAAgCC,CAAC,IAAIC,WAArC,EAAkDC,CAAC,IAAIC,SAAvD,EAAkEC,CAAlE,EAAqEC,CAAC,IAAIC,IAA1E,EAAgFC,CAAC,IAAIC,UAArF,QAAuG,qBAAvG;AACA,SAASN,CAAC,IAAIO,WAAd,EAA2BC,CAAC,IAAIC,cAAhC,EAAgDC,CAAC,IAAIC,WAArD,EAAkEC,CAAC,IAAIC,YAAvE,EAAqFC,CAAC,IAAIC,cAA1F,QAAgH,qBAAhH;AACA,SAASC,CAAC,IAAIC,UAAd,QAAgC,4BAAhC;AACA,SAASC,iBAAT,QAAkC,6BAAlC;AACA,SAAStB,CAAC,IAAIuB,GAAd,EAAmBrB,CAAC,IAAIsB,iBAAxB,EAA2CC,CAAC,IAAIC,cAAhD,EAAgEZ,CAAC,IAAIa,KAArE,QAAkF,uBAAlF;AACA,SAASX,CAAC,IAAIY,eAAd,EAA+BR,CAAC,IAAIS,aAApC,QAAyD,qBAAzD;AACA,SAASpB,CAAC,IAAIqB,KAAd,QAA2B,mBAA3B;AACA,SAAS1B,CAAC,IAAI2B,kBAAd,EAAkCN,CAAC,IAAIO,WAAvC,QAA0D,qBAA1D;AACA,SAASP,CAAC,IAAIQ,oBAAd,EAAoCxB,CAAC,IAAIyB,QAAzC,EAAmDC,CAAC,IAAIC,OAAxD,EAAiEhB,CAAC,IAAIiB,SAAtE,EAAiFjC,CAAC,IAAIkC,gBAAtF,EAAwGC,CAAC,IAAIC,YAA7G,EAA2HxB,CAAC,IAAIyB,SAAhI,EAA2IvC,CAAC,IAAIwC,QAAhJ,EAA0JC,CAAC,IAAIC,uBAA/J,EAAwLtC,CAAC,IAAIuC,YAA7L,EAA2MC,CAAC,IAAIC,cAAhN,EAAgOC,C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