import {_ as $cUVuN$_} from "@swc/helpers/_/_class_private_field_init"; /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ // Portions of the code in this file are based on code from the TC39 Temporal proposal. // Original licensing can be found in the NOTICE file in the root directory of this source tree. /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ // Portions of the code in this file are based on code from ICU. // Original licensing can be found in the NOTICE file in the root directory of this source tree. /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) { return amount - numerator * Math.floor(amount / numerator); } function $2b4dce13dd5a17fa$export$784d13d8ee351f07(date) { if (date.era) return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(date.calendar, date.era, date.year, date.month, date.day); else return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(date.calendar, date.year, date.month, date.day); } function $2b4dce13dd5a17fa$export$27fa0172ae2644b3(date) { if (date.era) return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond); else return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.year, date.month, date.day, date.hour, date.minute, date.second); } const $3b62074eb05584b2$var$EPOCH = 1721426; // 001/01/03 Julian C.E. function $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) { year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year); let y1 = year - 1; let monthOffset = -2; if (month <= 2) monthOffset = 0; else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) monthOffset = -1; return $3b62074eb05584b2$var$EPOCH - 1 + 365 * y1 + Math.floor(y1 / 4) - Math.floor(y1 / 100) + Math.floor(y1 / 400) + Math.floor((367 * month - 362) / 12 + monthOffset + day); } function $3b62074eb05584b2$export$553d7fa8e3805fc0(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year) { return era === "BC" ? 1 - year : year; } function $3b62074eb05584b2$export$4475b7e617eb123c(year) { let era = "AD"; if (year <= 0) { era = "BC"; year = 1 - year; } return [ era, year ]; } const $3b62074eb05584b2$var$daysInMonth = { standard: [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ], leapyear: [ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ] }; class $3b62074eb05584b2$export$80ee6245ec4f29ec { fromJulianDay(jd) { let jd0 = jd; let depoch = jd0 - $3b62074eb05584b2$var$EPOCH; let quadricent = Math.floor(depoch / 146097); let dqc = (0, $2b4dce13dd5a17fa$export$842a2cf37af977e1)(depoch, 146097); let cent = Math.floor(dqc / 36524); let dcent = (0, $2b4dce13dd5a17fa$export$842a2cf37af977e1)(dqc, 36524); let quad = Math.floor(dcent / 1461); let dquad = (0, $2b4dce13dd5a17fa$export$842a2cf37af977e1)(dcent, 1461); let yindex = Math.floor(dquad / 365); let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0); let [era, year] = $3b62074eb05584b2$export$4475b7e617eb123c(extendedYear); let yearDay = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, 1, 1); let leapAdj = 2; if (jd0 < $3b62074eb05584b2$export$f297eb839006d339(era, year, 3, 1)) leapAdj = 0; else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) leapAdj = 1; let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367); let day = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, month, 1) + 1; return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, month, day); } toJulianDay(date) { return $3b62074eb05584b2$export$f297eb839006d339(date.era, date.year, date.month, date.day); } getDaysInMonth(date) { return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? "leapyear" : "standard"][date.month - 1]; } // eslint-disable-next-line @typescript-eslint/no-unused-vars getMonthsInYear(date) { return 12; } getDaysInYear(date) { return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365; } // eslint-disable-next-line @typescript-eslint/no-unused-vars getYearsInEra(date) { return 9999; } getEras() { return [ "BC", "AD" ]; } isInverseEra(date) { return date.era === "BC"; } balanceDate(date) { if (date.year <= 0) { date.era = date.era === "BC" ? "AD" : "BC"; date.year = 1 - date.year; } } constructor(){ this.identifier = "gregory"; } } /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ // Data from https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/weekData.json // Locales starting on Sunday have been removed for compression. const $2fe286d2fb449abb$export$7a5acbd77d414bd9 = { "001": 1, AD: 1, AE: 6, AF: 6, AI: 1, AL: 1, AM: 1, AN: 1, AR: 1, AT: 1, AU: 1, AX: 1, AZ: 1, BA: 1, BE: 1, BG: 1, BH: 6, BM: 1, BN: 1, BY: 1, CH: 1, CL: 1, CM: 1, CN: 1, CR: 1, CY: 1, CZ: 1, DE: 1, DJ: 6, DK: 1, DZ: 6, EC: 1, EE: 1, EG: 6, ES: 1, FI: 1, FJ: 1, FO: 1, FR: 1, GB: 1, GE: 1, GF: 1, GP: 1, GR: 1, HR: 1, HU: 1, IE: 1, IQ: 6, IR: 6, IS: 1, IT: 1, JO: 6, KG: 1, KW: 6, KZ: 1, LB: 1, LI: 1, LK: 1, LT: 1, LU: 1, LV: 1, LY: 6, MC: 1, MD: 1, ME: 1, MK: 1, MN: 1, MQ: 1, MV: 5, MY: 1, NL: 1, NO: 1, NZ: 1, OM: 6, PL: 1, QA: 6, RE: 1, RO: 1, RS: 1, RU: 1, SD: 6, SE: 1, SI: 1, SK: 1, SM: 1, SY: 6, TJ: 1, TM: 1, TR: 1, UA: 1, UY: 1, UZ: 1, VA: 1, VN: 1, XK: 1 }; function $14e0f24ef4ac5c92$export$ea39ec197993aef0(a, b) { b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar); return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day; } function $14e0f24ef4ac5c92$export$a18c89cbd24170ff(a, b) { b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar); // In the Japanese calendar, months can span multiple eras/years, so only compare the first of the month. a = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(a); b = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(b); return a.era === b.era && a.year === b.year && a.month === b.month; } function $14e0f24ef4ac5c92$export$5841f9eb9773f25f(a, b) { b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar); a = $14e0f24ef4ac5c92$export$f91e89d3d0406102(a); b = $14e0f24ef4ac5c92$export$f91e89d3d0406102(b); return a.era === b.era && a.year === b.year; } function $14e0f24ef4ac5c92$export$91b62ebf2ba703ee(a, b) { return a.calendar.identifier === b.calendar.identifier && a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day; } function $14e0f24ef4ac5c92$export$5a8da0c44a3afdf2(a, b) { a = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(a); b = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(b); return a.calendar.identifier === b.calendar.identifier && a.era === b.era && a.year === b.year && a.month === b.month; } function $14e0f24ef4ac5c92$export$ea840f5a6dda8147(a, b) { a = $14e0f24ef4ac5c92$export$f91e89d3d0406102(a); b = $14e0f24ef4ac5c92$export$f91e89d3d0406102(b); return a.calendar.identifier === b.calendar.identifier && a.era === b.era && a.year === b.year; } function $14e0f24ef4ac5c92$export$629b0a497aa65267(date, timeZone) { return $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone)); } function $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date, locale) { let julian = date.calendar.toJulianDay(date); // If julian is negative, then julian % 7 will be negative, so we adjust // accordingly. Julian day 0 is Monday. let dayOfWeek = Math.ceil(julian + 1 - $14e0f24ef4ac5c92$var$getWeekStart(locale)) % 7; if (dayOfWeek < 0) dayOfWeek += 7; return dayOfWeek; } function $14e0f24ef4ac5c92$export$461939dd4422153(timeZone) { return (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(Date.now(), timeZone); } function $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone) { return (0, $11d87f3f76e88657$export$93522d1a439f3617)($14e0f24ef4ac5c92$export$461939dd4422153(timeZone)); } function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a, b) { return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b); } function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) { return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b); } function $14e0f24ef4ac5c92$var$timeToMs(a) { return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond; } function $14e0f24ef4ac5c92$export$126c91c941de7e(a, timeZone) { let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(a, timeZone); let tomorrow = a.add({ days: 1 }); let tomorrowMs = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(tomorrow, timeZone); return (tomorrowMs - ms) / 3600000; } let $14e0f24ef4ac5c92$var$localTimeZone = null; function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() { // TODO: invalidate this somehow? if ($14e0f24ef4ac5c92$var$localTimeZone == null) $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone; return $14e0f24ef4ac5c92$var$localTimeZone; } function $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date) { // Use `subtract` instead of `set` so we don't get constrained in an era. return date.subtract({ days: date.day - 1 }); } function $14e0f24ef4ac5c92$export$a2258d9c4118825c(date) { return date.add({ days: date.calendar.getDaysInMonth(date) - date.day }); } function $14e0f24ef4ac5c92$export$f91e89d3d0406102(date) { return $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date.subtract({ months: date.month - 1 })); } function $14e0f24ef4ac5c92$export$8b7aa55c66d5569e(date) { return $14e0f24ef4ac5c92$export$a2258d9c4118825c(date.add({ months: date.calendar.getMonthsInYear(date) - date.month })); } function $14e0f24ef4ac5c92$export$5412ac11713b72ad(date) { if (date.calendar.getMinimumMonthInYear) return date.calendar.getMinimumMonthInYear(date); return 1; } function $14e0f24ef4ac5c92$export$b2f4953d301981d5(date) { if (date.calendar.getMinimumDayInMonth) return date.calendar.getMinimumDayInMonth(date); return 1; } function $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(date, locale) { let dayOfWeek = $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date, locale); return date.subtract({ days: dayOfWeek }); } function $14e0f24ef4ac5c92$export$ef8b6d9133084f4e(date, locale) { return $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(date, locale).add({ days: 6 }); } const $14e0f24ef4ac5c92$var$cachedRegions = new Map(); function $14e0f24ef4ac5c92$var$getRegion(locale) { // If the Intl.Locale API is available, use it to get the region for the locale. // @ts-ignore if (Intl.Locale) { // Constructing an Intl.Locale is expensive, so cache the result. let region = $14e0f24ef4ac5c92$var$cachedRegions.get(locale); if (!region) { // @ts-ignore region = new Intl.Locale(locale).maximize().region; if (region) $14e0f24ef4ac5c92$var$cachedRegions.set(locale, region); } return region; } // If not, just try splitting the string. // If the second part of the locale string is 'u', // then this is a unicode extension, so ignore it. // Otherwise, it should be the region. let part = locale.split("-")[1]; return part === "u" ? undefined : part; } function $14e0f24ef4ac5c92$var$getWeekStart(locale) { // TODO: use Intl.Locale for this once browsers support the weekInfo property // https://github.com/tc39/proposal-intl-locale-info let region = $14e0f24ef4ac5c92$var$getRegion(locale); return region ? (0, $2fe286d2fb449abb$export$7a5acbd77d414bd9)[region] || 0 : 0; } function $14e0f24ef4ac5c92$export$ccc1b2479e7dd654(date, locale) { let days = date.calendar.getDaysInMonth(date); return Math.ceil(($14e0f24ef4ac5c92$export$2061056d06d7cdf7($14e0f24ef4ac5c92$export$a5a3b454ada2268e(date), locale) + days) / 7); } function $14e0f24ef4ac5c92$export$5c333a116e949cdd(a, b) { if (a && b) return a.compare(b) <= 0 ? a : b; return a || b; } function $14e0f24ef4ac5c92$export$a75f2bff57811055(a, b) { if (a && b) return a.compare(b) >= 0 ? a : b; return a || b; } const $14e0f24ef4ac5c92$var$WEEKEND_DATA = { AF: [ 4, 5 ], AE: [ 5, 6 ], BH: [ 5, 6 ], DZ: [ 5, 6 ], EG: [ 5, 6 ], IL: [ 5, 6 ], IQ: [ 5, 6 ], IR: [ 5, 5 ], JO: [ 5, 6 ], KW: [ 5, 6 ], LY: [ 5, 6 ], OM: [ 5, 6 ], QA: [ 5, 6 ], SA: [ 5, 6 ], SD: [ 5, 6 ], SY: [ 5, 6 ], YE: [ 5, 6 ] }; function $14e0f24ef4ac5c92$export$618d60ea299da42(date, locale) { let julian = date.calendar.toJulianDay(date); // If julian is negative, then julian % 7 will be negative, so we adjust // accordingly. Julian day 0 is Monday. let dayOfWeek = Math.ceil(julian + 1) % 7; if (dayOfWeek < 0) dayOfWeek += 7; let region = $14e0f24ef4ac5c92$var$getRegion(locale); // Use Intl.Locale for this once weekInfo is supported. // https://github.com/tc39/proposal-intl-locale-info let [start, end] = $14e0f24ef4ac5c92$var$WEEKEND_DATA[region] || [ 6, 0 ]; return dayOfWeek === start || dayOfWeek === end; } function $14e0f24ef4ac5c92$export$ee9d87258e1d19ed(date, locale) { return !$14e0f24ef4ac5c92$export$618d60ea299da42(date, locale); } function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) { date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)()); let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year); return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond); } function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) { // Note: Date.UTC() interprets one and two-digit years as being in the // 20th century, so don't use it let date = new Date(); date.setUTCHours(hour, minute, second, millisecond); date.setUTCFullYear(year, month - 1, day); return date.getTime(); } function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) { // Fast path for UTC. if (timeZone === "UTC") return 0; // Fast path: for local timezone after 1970, use native Date. if (ms > 0 && timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -60000; let { year: year, month: month, day: day, hour: hour, minute: minute, second: second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone); let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0); return utc - Math.floor(ms / 1000) * 1000; } const $11d87f3f76e88657$var$formattersByTimeZone = new Map(); function $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) { let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone); if (!formatter) { formatter = new Intl.DateTimeFormat("en-US", { timeZone: timeZone, hour12: false, era: "short", year: "numeric", month: "numeric", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" }); $11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter); } let parts = formatter.formatToParts(new Date(ms)); let namedParts = {}; for (let part of parts)if (part.type !== "literal") namedParts[part.type] = part.value; return { // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253 year: namedParts.era === "BC" || namedParts.era === "B" ? -namedParts.year + 1 : +namedParts.year, month: +namedParts.month, day: +namedParts.day, hour: namedParts.hour === "24" ? 0 : +namedParts.hour, minute: +namedParts.minute, second: +namedParts.second }; } const $11d87f3f76e88657$var$DAYMILLIS = 86400000; function $11d87f3f76e88657$export$136f38efe7caf549(date, timeZone) { let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date); let earlier = ms - $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone); let later = ms - $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone); return $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later); } function $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) { let found = earlier === later ? [ earlier ] : [ earlier, later ]; return found.filter((absolute)=>$11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute)); } function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) { let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone); return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second; } function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") { let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date); // Fast path: if the time zone is UTC, use native Date. if (timeZone === "UTC") return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime); // Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date. if (timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === "compatible") { dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)()); // Don't use Date constructor here because two-digit years are interpreted in the 20th century. let date = new Date(); let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year); date.setFullYear(year, dateTime.month - 1, dateTime.day); date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond); return date.getTime(); } let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime); let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone); let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone); let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter); if (valid.length === 1) return valid[0]; if (valid.length > 1) switch(disambiguation){ // 'compatible' means 'earlier' for "fall back" transitions case "compatible": case "earlier": return valid[0]; case "later": return valid[valid.length - 1]; case "reject": throw new RangeError("Multiple possible absolute times found"); } switch(disambiguation){ case "earlier": return Math.min(ms - offsetBefore, ms - offsetAfter); // 'compatible' means 'later' for "spring forward" transitions case "compatible": case "later": return Math.max(ms - offsetBefore, ms - offsetAfter); case "reject": throw new RangeError("No such absolute time found"); } } function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = "compatible") { return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation)); } function $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone) { let offset = $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone); let date = new Date(ms + offset); let year = date.getUTCFullYear(); let month = date.getUTCMonth() + 1; let day = date.getUTCDate(); let hour = date.getUTCHours(); let minute = date.getUTCMinutes(); let second = date.getUTCSeconds(); let millisecond = date.getUTCMilliseconds(); return new (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)(year, month, day, timeZone, offset, hour, minute, second, millisecond); } function $11d87f3f76e88657$export$e57ff100d91bd4b9(date, timeZone) { return $11d87f3f76e88657$export$1b96692a1ba042ac(date.getTime(), timeZone); } function $11d87f3f76e88657$export$d7f92bcd3596b086(date) { return $11d87f3f76e88657$export$e57ff100d91bd4b9(date, (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)()); } function $11d87f3f76e88657$export$93522d1a439f3617(dateTime) { return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day); } function $11d87f3f76e88657$export$6f4d78149f3f53ac(date) { return { era: date.era, year: date.year, month: date.month, day: date.day }; } function $11d87f3f76e88657$export$4d0393e732857be5(date) { return { hour: date.hour, minute: date.minute, second: date.second, millisecond: date.millisecond }; } function $11d87f3f76e88657$export$b21e0b124e224484(date, time) { let hour = 0, minute = 0, second = 0, millisecond = 0; if ("timeZone" in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date); else if ("hour" in date && !time) return date; if (time) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = time); return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond); } function $11d87f3f76e88657$export$d33f79e3ffc3dc83(dateTime) { return new (0, $35ea8db9cb2ccb90$export$680ea196effce5f)(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond); } function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) { if (date.calendar.identifier === calendar.identifier) return date; let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date)); let copy = date.copy(); copy.calendar = calendar; copy.era = calendarDate.era; copy.year = calendarDate.year; copy.month = calendarDate.month; copy.day = calendarDate.day; (0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(copy); return copy; } function $11d87f3f76e88657$export$84c95a83c799e074(date, timeZone, disambiguation) { if (date instanceof (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)) { if (date.timeZone === timeZone) return date; return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone); } let ms = $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation); return $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone); } function $11d87f3f76e88657$export$83aac07b4c37b25(date) { let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset; return new Date(ms); } function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) { let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset; return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar); } function $11d87f3f76e88657$export$d9b67bc93c097491(date) { return $11d87f3f76e88657$export$538b00033cc11c75(date, (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)()); } const $735220c2d4774dd3$var$ONE_HOUR = 3600000; function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) { let mutableDate = date.copy(); let days = "hour" in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0; $735220c2d4774dd3$var$addYears(mutableDate, duration.years || 0); if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date); mutableDate.month += duration.months || 0; $735220c2d4774dd3$var$balanceYearMonth(mutableDate); $735220c2d4774dd3$var$constrainMonthDay(mutableDate); mutableDate.day += (duration.weeks || 0) * 7; mutableDate.day += duration.days || 0; mutableDate.day += days; $735220c2d4774dd3$var$balanceDay(mutableDate); if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate); // Constrain in case adding ended up with a date outside the valid range for the calendar system. // The behavior here is slightly different than when constraining in the `set` function in that // we adjust smaller fields to their minimum/maximum values rather than constraining each field // individually. This matches the general behavior of `add` vs `set` regarding how fields are balanced. if (mutableDate.year < 1) { mutableDate.year = 1; mutableDate.month = 1; mutableDate.day = 1; } let maxYear = mutableDate.calendar.getYearsInEra(mutableDate); if (mutableDate.year > maxYear) { var _mutableDate_calendar_isInverseEra, _mutableDate_calendar; let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate); mutableDate.year = maxYear; mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate); mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate); } if (mutableDate.month < 1) { mutableDate.month = 1; mutableDate.day = 1; } let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate); if (mutableDate.month > maxMonth) { mutableDate.month = maxMonth; mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate); } mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day)); return mutableDate; } function $735220c2d4774dd3$var$addYears(date, years) { var _date_calendar_isInverseEra, _date_calendar; if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date)) years = -years; date.year += years; } function $735220c2d4774dd3$var$balanceYearMonth(date) { while(date.month < 1){ $735220c2d4774dd3$var$addYears(date, -1); date.month += date.calendar.getMonthsInYear(date); } let monthsInYear = 0; while(date.month > (monthsInYear = date.calendar.getMonthsInYear(date))){ date.month -= monthsInYear; $735220c2d4774dd3$var$addYears(date, 1); } } function $735220c2d4774dd3$var$balanceDay(date) { while(date.day < 1){ date.month--; $735220c2d4774dd3$var$balanceYearMonth(date); date.day += date.calendar.getDaysInMonth(date); } while(date.day > date.calendar.getDaysInMonth(date)){ date.day -= date.calendar.getDaysInMonth(date); date.month++; $735220c2d4774dd3$var$balanceYearMonth(date); } } function $735220c2d4774dd3$var$constrainMonthDay(date) { date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month)); date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day)); } function $735220c2d4774dd3$export$c4e2ecac49351ef2(date) { if (date.calendar.constrainDate) date.calendar.constrainDate(date); date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year)); $735220c2d4774dd3$var$constrainMonthDay(date); } function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) { let inverseDuration = {}; for(let key in duration)if (typeof duration[key] === "number") inverseDuration[key] = -duration[key]; return inverseDuration; } function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date, duration) { return $735220c2d4774dd3$export$e16d8520af44a096(date, $735220c2d4774dd3$export$3e2544e88a25bff8(duration)); } function $735220c2d4774dd3$export$adaa4cf7ef1b65be(date, fields) { let mutableDate = date.copy(); if (fields.era != null) mutableDate.era = fields.era; if (fields.year != null) mutableDate.year = fields.year; if (fields.month != null) mutableDate.month = fields.month; if (fields.day != null) mutableDate.day = fields.day; $735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate); return mutableDate; } function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) { let mutableValue = value.copy(); if (fields.hour != null) mutableValue.hour = fields.hour; if (fields.minute != null) mutableValue.minute = fields.minute; if (fields.second != null) mutableValue.second = fields.second; if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond; $735220c2d4774dd3$export$7555de1e070510cb(mutableValue); return mutableValue; } function $735220c2d4774dd3$var$balanceTime(time) { time.second += Math.floor(time.millisecond / 1000); time.millisecond = $735220c2d4774dd3$var$nonNegativeMod(time.millisecond, 1000); time.minute += Math.floor(time.second / 60); time.second = $735220c2d4774dd3$var$nonNegativeMod(time.second, 60); time.hour += Math.floor(time.minute / 60); time.minute = $735220c2d4774dd3$var$nonNegativeMod(time.minute, 60); let days = Math.floor(time.hour / 24); time.hour = $735220c2d4774dd3$var$nonNegativeMod(time.hour, 24); return days; } function $735220c2d4774dd3$export$7555de1e070510cb(time) { time.millisecond = Math.max(0, Math.min(time.millisecond, 1000)); time.second = Math.max(0, Math.min(time.second, 59)); time.minute = Math.max(0, Math.min(time.minute, 59)); time.hour = Math.max(0, Math.min(time.hour, 23)); } function $735220c2d4774dd3$var$nonNegativeMod(a, b) { let result = a % b; if (result < 0) result += b; return result; } function $735220c2d4774dd3$var$addTimeFields(time, duration) { time.hour += duration.hours || 0; time.minute += duration.minutes || 0; time.second += duration.seconds || 0; time.millisecond += duration.milliseconds || 0; return $735220c2d4774dd3$var$balanceTime(time); } function $735220c2d4774dd3$export$7ed87b6bc2506470(time, duration) { let res = time.copy(); $735220c2d4774dd3$var$addTimeFields(res, duration); return res; } function $735220c2d4774dd3$export$fe34d3a381cd7501(time, duration) { return $735220c2d4774dd3$export$7ed87b6bc2506470(time, $735220c2d4774dd3$export$3e2544e88a25bff8(duration)); } function $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options) { let mutable = value.copy(); switch(field){ case "era": { let eras = value.calendar.getEras(); let eraIndex = eras.indexOf(value.era); if (eraIndex < 0) throw new Error("Invalid era: " + value.era); eraIndex = $735220c2d4774dd3$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round); mutable.era = eras[eraIndex]; // Constrain the year and other fields within the era, so the era doesn't change when we balance below. $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable); break; } case "year": var _mutable_calendar_isInverseEra, _mutable_calendar; if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount; // The year field should not cycle within the era as that can cause weird behavior affecting other fields. // We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back // we know we wrapped around after reaching 9999 (the maximum), so set the year back to 1. mutable.year = $735220c2d4774dd3$var$cycleValue(value.year, amount, -Infinity, 9999, options === null || options === void 0 ? void 0 : options.round); if (mutable.year === -Infinity) mutable.year = 1; if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value); break; case "month": mutable.month = $735220c2d4774dd3$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round); break; case "day": mutable.day = $735220c2d4774dd3$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round); break; default: throw new Error("Unsupported field " + field); } if (value.calendar.balanceDate) value.calendar.balanceDate(mutable); $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable); return mutable; } function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) { let mutable = value.copy(); switch(field){ case "hour": { let hours = value.hour; let min = 0; let max = 23; if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) { let isPM = hours >= 12; min = isPM ? 12 : 0; max = isPM ? 23 : 11; } mutable.hour = $735220c2d4774dd3$var$cycleValue(hours, amount, min, max, options === null || options === void 0 ? void 0 : options.round); break; } case "minute": mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round); break; case "second": mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round); break; case "millisecond": mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round); break; default: throw new Error("Unsupported field " + field); } return mutable; } function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false) { if (round) { value += Math.sign(amount); if (value < min) value = max; let div = Math.abs(amount); if (amount > 0) value = Math.ceil(value / div) * div; else value = Math.floor(value / div) * div; if (value > max) value = min; } else { value += amount; if (value < min) value = max - (min - value - 1); else if (value > max) value = min + (value - max - 1); } return value; } function $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) { let ms; if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) { let res = $735220c2d4774dd3$export$e16d8520af44a096((0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime), { years: duration.years, months: duration.months, weeks: duration.weeks, days: duration.days }); // Changing the date may change the timezone offset, so we need to recompute // using the 'compatible' disambiguation. ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone); } else // Otherwise, preserve the offset of the original date. ms = (0, $11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset; // Perform time manipulation in milliseconds rather than on the original time fields to account for DST. // For example, adding one hour during a DST transition may result in the hour field staying the same or // skipping an hour. This results in the offset field changing value instead of the specified field. ms += duration.milliseconds || 0; ms += (duration.seconds || 0) * 1000; ms += (duration.minutes || 0) * 60000; ms += (duration.hours || 0) * 3600000; let res = (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone); return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(res, dateTime.calendar); } function $735220c2d4774dd3$export$6814caac34ca03c7(dateTime, duration) { return $735220c2d4774dd3$export$96b1d28349274637(dateTime, $735220c2d4774dd3$export$3e2544e88a25bff8(duration)); } function $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, options) { // For date fields, we want the time to remain consistent and the UTC offset to potentially change to account for DST changes. // For time fields, we want the time to change by the amount given. This may result in the hour field staying the same, but the UTC // offset changing in the case of a backward DST transition, or skipping an hour in the case of a forward DST transition. switch(field){ case "hour": { let min = 0; let max = 23; if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) { let isPM = dateTime.hour >= 12; min = isPM ? 12 : 0; max = isPM ? 23 : 11; } // The minimum and maximum hour may be affected by daylight saving time. // For example, it might jump forward at midnight, and skip 1am. // Or it might end at midnight and repeat the 11pm hour. To handle this, we get // the possible absolute times for the min and max, and find the maximum range // that is within the current day. let plainDateTime = (0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime); let minDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, { hour: min }), new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)()); let minAbsolute = [ (0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, "earlier"), (0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, "later") ].filter((ms)=>(0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === minDate.day)[0]; let maxDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, { hour: max }), new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)()); let maxAbsolute = [ (0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, "earlier"), (0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, "later") ].filter((ms)=>(0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === maxDate.day).pop(); // Since hours may repeat, we need to operate on the absolute time in milliseconds. // This is done in hours from the Unix epoch so that cycleValue works correctly, // and then converted back to milliseconds. let ms = (0, $11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset; let hours = Math.floor(ms / $735220c2d4774dd3$var$ONE_HOUR); let remainder = ms % $735220c2d4774dd3$var$ONE_HOUR; ms = $735220c2d4774dd3$var$cycleValue(hours, amount, Math.floor(minAbsolute / $735220c2d4774dd3$var$ONE_HOUR), Math.floor(maxAbsolute / $735220c2d4774dd3$var$ONE_HOUR), options === null || options === void 0 ? void 0 : options.round) * $735220c2d4774dd3$var$ONE_HOUR + remainder; // Now compute the new timezone offset, and convert the absolute time back to local time. return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar); } case "minute": case "second": case "millisecond": // @ts-ignore return $735220c2d4774dd3$export$dd02b3e0007dfe28(dateTime, field, amount, options); case "era": case "year": case "month": case "day": { let res = $735220c2d4774dd3$export$d52ced6badfb9a4c((0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime), field, amount, options); let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone); return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar); } default: throw new Error("Unsupported field " + field); } } function $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime, fields, disambiguation) { // Set the date/time fields, and recompute the UTC offset to account for DST changes. // We also need to validate by converting back to a local time in case hours are skipped during forward DST transitions. let plainDateTime = (0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime); let res = $735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(plainDateTime, fields), fields); // If the resulting plain date time values are equal, return the original time. // We don't want to change the offset when setting the time to the same value. if (res.compare(plainDateTime) === 0) return dateTime; let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone, disambiguation); return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar); } /* * Copyright 2020 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ const $fae977aafc393c5c$var$TIME_RE = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/; const $fae977aafc393c5c$var$DATE_RE = /^(\d{4})-(\d{2})-(\d{2})$/; const $fae977aafc393c5c$var$DATE_TIME_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/; const $fae977aafc393c5c$var$ZONED_DATE_TIME_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?)?\[(.*?)\]$/; const $fae977aafc393c5c$var$ABSOLUTE_RE = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/; const $fae977aafc393c5c$var$DATE_TIME_DURATION_RE = /^((?-)|\+)?P((?\d*)Y)?((?\d*)M)?((?\d*)W)?((?\d*)D)?((?