@beweco/aurora-ui 0.6.35 → 0.6.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1734,6 +1734,7 @@ var countries = [
1734
1734
  { code: "+55", name: "Brazil", country: "BR" },
1735
1735
  { code: "+52", name: "Mexico", country: "MX" },
1736
1736
  { code: "+503", name: "El Salvador", country: "SV" },
1737
+ { code: "+507", name: "Panama", country: "PA" },
1737
1738
  { code: "+51", name: "Peru", country: "PE" },
1738
1739
  { code: "+56", name: "Chile", country: "CL" },
1739
1740
  { code: "+1", name: "United States", country: "US" },
@@ -1768,10 +1769,10 @@ var defaultTranslations$c = {
1768
1769
 
1769
1770
  /**
1770
1771
  * Países que no entran en la lista por defecto de moneda.
1771
- * El Salvador (y otros casos de dolarización sin código ISO propio) no deben duplicar "USD":
1772
+ * El Salvador, Panamá (y otros casos de dolarización sin código ISO propio) no deben duplicar "USD":
1772
1773
  * el dólar solo se lista con bandera de EE. UU. (país emisor ISO 4217).
1773
1774
  */
1774
- var EXCLUDED_FROM_DEFAULT_CURRENCY = new Set(["SV"]);
1775
+ var EXCLUDED_FROM_DEFAULT_CURRENCY = new Set(["SV", "PA"]);
1775
1776
  /**
1776
1777
  * Países de la lista telefónica que usan EUR pero se agrupan en una sola fila
1777
1778
  * con código `EU` y bandera de la Unión Europea (no se distingue país emisor).
@@ -1785,6 +1786,7 @@ var currencyByCountry = {
1785
1786
  MX: "MXN",
1786
1787
  PE: "PEN",
1787
1788
  CL: "CLP",
1789
+ PA: "USD",
1788
1790
  US: "USD",
1789
1791
  RU: "RUB",
1790
1792
  EG: "EGP",
@@ -4079,18 +4081,410 @@ var RowSteps = React.forwardRef(function (_a, ref) {
4079
4081
  });
4080
4082
  RowSteps.displayName = "RowSteps";
4081
4083
 
4084
+ /*
4085
+ * Copyright 2020 Adobe. All rights reserved.
4086
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4087
+ * you may not use this file except in compliance with the License. You may obtain a copy
4088
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
4089
+ *
4090
+ * Unless required by applicable law or agreed to in writing, software distributed under
4091
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4092
+ * OF ANY KIND, either express or implied. See the License for the specific language
4093
+ * governing permissions and limitations under the License.
4094
+ */ function $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {
4095
+ return amount - numerator * Math.floor(amount / numerator);
4096
+ }
4097
+
4098
+ /*
4099
+ * Copyright 2020 Adobe. All rights reserved.
4100
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4101
+ * you may not use this file except in compliance with the License. You may obtain a copy
4102
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
4103
+ *
4104
+ * Unless required by applicable law or agreed to in writing, software distributed under
4105
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4106
+ * OF ANY KIND, either express or implied. See the License for the specific language
4107
+ * governing permissions and limitations under the License.
4108
+ */ // Portions of the code in this file are based on code from ICU.
4109
+ // Original licensing can be found in the NOTICE file in the root directory of this source tree.
4110
+
4111
+
4112
+ const $3b62074eb05584b2$var$EPOCH = 1721426; // 001/01/03 Julian C.E.
4113
+ function $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) {
4114
+ year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year);
4115
+ let y1 = year - 1;
4116
+ let monthOffset = -2;
4117
+ if (month <= 2) monthOffset = 0;
4118
+ else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) monthOffset = -1;
4119
+ 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);
4120
+ }
4121
+ function $3b62074eb05584b2$export$553d7fa8e3805fc0(year) {
4122
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
4123
+ }
4124
+ function $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year) {
4125
+ return era === 'BC' ? 1 - year : year;
4126
+ }
4127
+ function $3b62074eb05584b2$export$4475b7e617eb123c(year) {
4128
+ let era = 'AD';
4129
+ if (year <= 0) {
4130
+ era = 'BC';
4131
+ year = 1 - year;
4132
+ }
4133
+ return [
4134
+ era,
4135
+ year
4136
+ ];
4137
+ }
4138
+ const $3b62074eb05584b2$var$daysInMonth = {
4139
+ standard: [
4140
+ 31,
4141
+ 28,
4142
+ 31,
4143
+ 30,
4144
+ 31,
4145
+ 30,
4146
+ 31,
4147
+ 31,
4148
+ 30,
4149
+ 31,
4150
+ 30,
4151
+ 31
4152
+ ],
4153
+ leapyear: [
4154
+ 31,
4155
+ 29,
4156
+ 31,
4157
+ 30,
4158
+ 31,
4159
+ 30,
4160
+ 31,
4161
+ 31,
4162
+ 30,
4163
+ 31,
4164
+ 30,
4165
+ 31
4166
+ ]
4167
+ };
4168
+ class $3b62074eb05584b2$export$80ee6245ec4f29ec {
4169
+ fromJulianDay(jd) {
4170
+ let jd0 = jd;
4171
+ let depoch = jd0 - $3b62074eb05584b2$var$EPOCH;
4172
+ let quadricent = Math.floor(depoch / 146097);
4173
+ let dqc = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(depoch, 146097);
4174
+ let cent = Math.floor(dqc / 36524);
4175
+ let dcent = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(dqc, 36524);
4176
+ let quad = Math.floor(dcent / 1461);
4177
+ let dquad = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(dcent, 1461);
4178
+ let yindex = Math.floor(dquad / 365);
4179
+ let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);
4180
+ let [era, year] = $3b62074eb05584b2$export$4475b7e617eb123c(extendedYear);
4181
+ let yearDay = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, 1, 1);
4182
+ let leapAdj = 2;
4183
+ if (jd0 < $3b62074eb05584b2$export$f297eb839006d339(era, year, 3, 1)) leapAdj = 0;
4184
+ else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) leapAdj = 1;
4185
+ let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
4186
+ let day = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, month, 1) + 1;
4187
+ return new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, month, day);
4188
+ }
4189
+ toJulianDay(date) {
4190
+ return $3b62074eb05584b2$export$f297eb839006d339(date.era, date.year, date.month, date.day);
4191
+ }
4192
+ getDaysInMonth(date) {
4193
+ return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 'leapyear' : 'standard'][date.month - 1];
4194
+ }
4195
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4196
+ getMonthsInYear(date) {
4197
+ return 12;
4198
+ }
4199
+ getDaysInYear(date) {
4200
+ return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
4201
+ }
4202
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4203
+ getYearsInEra(date) {
4204
+ return 9999;
4205
+ }
4206
+ getEras() {
4207
+ return [
4208
+ 'BC',
4209
+ 'AD'
4210
+ ];
4211
+ }
4212
+ isInverseEra(date) {
4213
+ return date.era === 'BC';
4214
+ }
4215
+ balanceDate(date) {
4216
+ if (date.year <= 0) {
4217
+ date.era = date.era === 'BC' ? 'AD' : 'BC';
4218
+ date.year = 1 - date.year;
4219
+ }
4220
+ }
4221
+ constructor(){
4222
+ this.identifier = 'gregory';
4223
+ }
4224
+ }
4225
+
4226
+ function $14e0f24ef4ac5c92$export$dbc69fd56b53d5e(a, b) {
4227
+ var _a_isEqual, _b_isEqual;
4228
+ var _a_isEqual1, _ref;
4229
+ return (_ref = (_a_isEqual1 = (_a_isEqual = a.isEqual) === null || _a_isEqual === void 0 ? void 0 : _a_isEqual.call(a, b)) !== null && _a_isEqual1 !== void 0 ? _a_isEqual1 : (_b_isEqual = b.isEqual) === null || _b_isEqual === void 0 ? void 0 : _b_isEqual.call(b, a)) !== null && _ref !== void 0 ? _ref : a.identifier === b.identifier;
4230
+ }
4231
+ function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a, b) {
4232
+ return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
4233
+ }
4082
4234
  function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) {
4083
4235
  return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b);
4084
4236
  }
4085
4237
  function $14e0f24ef4ac5c92$var$timeToMs(a) {
4086
4238
  return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
4087
4239
  }
4240
+ let $14e0f24ef4ac5c92$var$localTimeZone = null;
4241
+ function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
4242
+ // TODO: invalidate this somehow?
4243
+ if ($14e0f24ef4ac5c92$var$localTimeZone == null) $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
4244
+ return $14e0f24ef4ac5c92$var$localTimeZone;
4245
+ }
4246
+
4247
+ /*
4248
+ * Copyright 2020 Adobe. All rights reserved.
4249
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4250
+ * you may not use this file except in compliance with the License. You may obtain a copy
4251
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
4252
+ *
4253
+ * Unless required by applicable law or agreed to in writing, software distributed under
4254
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4255
+ * OF ANY KIND, either express or implied. See the License for the specific language
4256
+ * governing permissions and limitations under the License.
4257
+ */ // Portions of the code in this file are based on code from the TC39 Temporal proposal.
4258
+ // Original licensing can be found in the NOTICE file in the root directory of this source tree.
4259
+
4260
+
4261
+
4262
+
4263
+ function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
4264
+ date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
4265
+ let year = ($3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
4266
+ return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
4267
+ }
4268
+ function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
4269
+ // Note: Date.UTC() interprets one and two-digit years as being in the
4270
+ // 20th century, so don't use it
4271
+ let date = new Date();
4272
+ date.setUTCHours(hour, minute, second, millisecond);
4273
+ date.setUTCFullYear(year, month - 1, day);
4274
+ return date.getTime();
4275
+ }
4276
+ function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
4277
+ // Fast path for UTC.
4278
+ if (timeZone === 'UTC') return 0;
4279
+ // Fast path: for local timezone after 1970, use native Date.
4280
+ if (ms > 0 && timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -6e4;
4281
+ let { year: year, month: month, day: day, hour: hour, minute: minute, second: second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
4282
+ let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
4283
+ return utc - Math.floor(ms / 1000) * 1000;
4284
+ }
4285
+ const $11d87f3f76e88657$var$formattersByTimeZone = new Map();
4286
+ function $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) {
4287
+ let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);
4288
+ if (!formatter) {
4289
+ formatter = new Intl.DateTimeFormat('en-US', {
4290
+ timeZone: timeZone,
4291
+ hour12: false,
4292
+ era: 'short',
4293
+ year: 'numeric',
4294
+ month: 'numeric',
4295
+ day: 'numeric',
4296
+ hour: 'numeric',
4297
+ minute: 'numeric',
4298
+ second: 'numeric'
4299
+ });
4300
+ $11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter);
4301
+ }
4302
+ let parts = formatter.formatToParts(new Date(ms));
4303
+ let namedParts = {};
4304
+ for (let part of parts)if (part.type !== 'literal') namedParts[part.type] = part.value;
4305
+ return {
4306
+ // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
4307
+ year: namedParts.era === 'BC' || namedParts.era === 'B' ? -namedParts.year + 1 : +namedParts.year,
4308
+ month: +namedParts.month,
4309
+ day: +namedParts.day,
4310
+ hour: namedParts.hour === '24' ? 0 : +namedParts.hour,
4311
+ minute: +namedParts.minute,
4312
+ second: +namedParts.second
4313
+ };
4314
+ }
4315
+ const $11d87f3f76e88657$var$DAYMILLIS = 86400000;
4316
+ function $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) {
4317
+ let found = earlier === later ? [
4318
+ earlier
4319
+ ] : [
4320
+ earlier,
4321
+ later
4322
+ ];
4323
+ return found.filter((absolute)=>$11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute));
4324
+ }
4325
+ function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {
4326
+ let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone);
4327
+ 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;
4328
+ }
4329
+ function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = 'compatible') {
4330
+ let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);
4331
+ // Fast path: if the time zone is UTC, use native Date.
4332
+ if (timeZone === 'UTC') return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
4333
+ // Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date.
4334
+ if (timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === 'compatible') {
4335
+ dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
4336
+ // Don't use Date constructor here because two-digit years are interpreted in the 20th century.
4337
+ let date = new Date();
4338
+ let year = ($3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year);
4339
+ date.setFullYear(year, dateTime.month - 1, dateTime.day);
4340
+ date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
4341
+ return date.getTime();
4342
+ }
4343
+ let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
4344
+ let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
4345
+ let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
4346
+ let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
4347
+ if (valid.length === 1) return valid[0];
4348
+ if (valid.length > 1) switch(disambiguation){
4349
+ // 'compatible' means 'earlier' for "fall back" transitions
4350
+ case 'compatible':
4351
+ case 'earlier':
4352
+ return valid[0];
4353
+ case 'later':
4354
+ return valid[valid.length - 1];
4355
+ case 'reject':
4356
+ throw new RangeError('Multiple possible absolute times found');
4357
+ }
4358
+ switch(disambiguation){
4359
+ case 'earlier':
4360
+ return Math.min(ms - offsetBefore, ms - offsetAfter);
4361
+ // 'compatible' means 'later' for "spring forward" transitions
4362
+ case 'compatible':
4363
+ case 'later':
4364
+ return Math.max(ms - offsetBefore, ms - offsetAfter);
4365
+ case 'reject':
4366
+ throw new RangeError('No such absolute time found');
4367
+ }
4368
+ }
4369
+ function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = 'compatible') {
4370
+ return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
4371
+ }
4372
+ function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
4373
+ let hour = 0, minute = 0, second = 0, millisecond = 0;
4374
+ if ('timeZone' in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date);
4375
+ else if ('hour' in date && !time) return date;
4376
+ if (time) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = time);
4377
+ return new ($35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
4378
+ }
4379
+ function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
4380
+ if (($14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(date.calendar, calendar)) return date;
4381
+ let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
4382
+ let copy = date.copy();
4383
+ copy.calendar = calendar;
4384
+ copy.era = calendarDate.era;
4385
+ copy.year = calendarDate.year;
4386
+ copy.month = calendarDate.month;
4387
+ copy.day = calendarDate.day;
4388
+ ($735220c2d4774dd3$export$c4e2ecac49351ef2)(copy);
4389
+ return copy;
4390
+ }
4088
4391
 
4392
+ function $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {
4393
+ let mutableDate = date.copy();
4394
+ let days = 'hour' in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0;
4395
+ $735220c2d4774dd3$var$addYears(mutableDate, duration.years || 0);
4396
+ if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);
4397
+ mutableDate.month += duration.months || 0;
4398
+ $735220c2d4774dd3$var$balanceYearMonth(mutableDate);
4399
+ $735220c2d4774dd3$var$constrainMonthDay(mutableDate);
4400
+ mutableDate.day += (duration.weeks || 0) * 7;
4401
+ mutableDate.day += duration.days || 0;
4402
+ mutableDate.day += days;
4403
+ $735220c2d4774dd3$var$balanceDay(mutableDate);
4404
+ if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);
4405
+ // Constrain in case adding ended up with a date outside the valid range for the calendar system.
4406
+ // The behavior here is slightly different than when constraining in the `set` function in that
4407
+ // we adjust smaller fields to their minimum/maximum values rather than constraining each field
4408
+ // individually. This matches the general behavior of `add` vs `set` regarding how fields are balanced.
4409
+ if (mutableDate.year < 1) {
4410
+ mutableDate.year = 1;
4411
+ mutableDate.month = 1;
4412
+ mutableDate.day = 1;
4413
+ }
4414
+ let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
4415
+ if (mutableDate.year > maxYear) {
4416
+ var _mutableDate_calendar_isInverseEra, _mutableDate_calendar;
4417
+ 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);
4418
+ mutableDate.year = maxYear;
4419
+ mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
4420
+ mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
4421
+ }
4422
+ if (mutableDate.month < 1) {
4423
+ mutableDate.month = 1;
4424
+ mutableDate.day = 1;
4425
+ }
4426
+ let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
4427
+ if (mutableDate.month > maxMonth) {
4428
+ mutableDate.month = maxMonth;
4429
+ mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
4430
+ }
4431
+ mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
4432
+ return mutableDate;
4433
+ }
4434
+ function $735220c2d4774dd3$var$addYears(date, years) {
4435
+ var _date_calendar_isInverseEra, _date_calendar;
4436
+ 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;
4437
+ date.year += years;
4438
+ }
4439
+ function $735220c2d4774dd3$var$balanceYearMonth(date) {
4440
+ while(date.month < 1){
4441
+ $735220c2d4774dd3$var$addYears(date, -1);
4442
+ date.month += date.calendar.getMonthsInYear(date);
4443
+ }
4444
+ let monthsInYear = 0;
4445
+ while(date.month > (monthsInYear = date.calendar.getMonthsInYear(date))){
4446
+ date.month -= monthsInYear;
4447
+ $735220c2d4774dd3$var$addYears(date, 1);
4448
+ }
4449
+ }
4450
+ function $735220c2d4774dd3$var$balanceDay(date) {
4451
+ while(date.day < 1){
4452
+ date.month--;
4453
+ $735220c2d4774dd3$var$balanceYearMonth(date);
4454
+ date.day += date.calendar.getDaysInMonth(date);
4455
+ }
4456
+ while(date.day > date.calendar.getDaysInMonth(date)){
4457
+ date.day -= date.calendar.getDaysInMonth(date);
4458
+ date.month++;
4459
+ $735220c2d4774dd3$var$balanceYearMonth(date);
4460
+ }
4461
+ }
4462
+ function $735220c2d4774dd3$var$constrainMonthDay(date) {
4463
+ date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
4464
+ date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
4465
+ }
4466
+ function $735220c2d4774dd3$export$c4e2ecac49351ef2(date) {
4467
+ if (date.calendar.constrainDate) date.calendar.constrainDate(date);
4468
+ date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
4469
+ $735220c2d4774dd3$var$constrainMonthDay(date);
4470
+ }
4089
4471
  function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
4090
4472
  let inverseDuration = {};
4091
4473
  for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];
4092
4474
  return inverseDuration;
4093
4475
  }
4476
+ function $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date, duration) {
4477
+ return $735220c2d4774dd3$export$e16d8520af44a096(date, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
4478
+ }
4479
+ function $735220c2d4774dd3$export$adaa4cf7ef1b65be(date, fields) {
4480
+ let mutableDate = date.copy();
4481
+ if (fields.era != null) mutableDate.era = fields.era;
4482
+ if (fields.year != null) mutableDate.year = fields.year;
4483
+ if (fields.month != null) mutableDate.month = fields.month;
4484
+ if (fields.day != null) mutableDate.day = fields.day;
4485
+ $735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate);
4486
+ return mutableDate;
4487
+ }
4094
4488
  function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
4095
4489
  let mutableValue = value.copy();
4096
4490
  if (fields.hour != null) mutableValue.hour = fields.hour;
@@ -4137,6 +4531,43 @@ function $735220c2d4774dd3$export$7ed87b6bc2506470(time, duration) {
4137
4531
  function $735220c2d4774dd3$export$fe34d3a381cd7501(time, duration) {
4138
4532
  return $735220c2d4774dd3$export$7ed87b6bc2506470(time, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
4139
4533
  }
4534
+ function $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options) {
4535
+ let mutable = value.copy();
4536
+ switch(field){
4537
+ case 'era':
4538
+ {
4539
+ let eras = value.calendar.getEras();
4540
+ let eraIndex = eras.indexOf(value.era);
4541
+ if (eraIndex < 0) throw new Error('Invalid era: ' + value.era);
4542
+ eraIndex = $735220c2d4774dd3$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round);
4543
+ mutable.era = eras[eraIndex];
4544
+ // Constrain the year and other fields within the era, so the era doesn't change when we balance below.
4545
+ $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
4546
+ break;
4547
+ }
4548
+ case 'year':
4549
+ var _mutable_calendar_isInverseEra, _mutable_calendar;
4550
+ 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;
4551
+ // The year field should not cycle within the era as that can cause weird behavior affecting other fields.
4552
+ // We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back
4553
+ // we know we wrapped around after reaching 9999 (the maximum), so set the year back to 1.
4554
+ mutable.year = $735220c2d4774dd3$var$cycleValue(value.year, amount, -Infinity, 9999, options === null || options === void 0 ? void 0 : options.round);
4555
+ if (mutable.year === -Infinity) mutable.year = 1;
4556
+ if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);
4557
+ break;
4558
+ case 'month':
4559
+ mutable.month = $735220c2d4774dd3$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round);
4560
+ break;
4561
+ case 'day':
4562
+ mutable.day = $735220c2d4774dd3$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round);
4563
+ break;
4564
+ default:
4565
+ throw new Error('Unsupported field ' + field);
4566
+ }
4567
+ if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);
4568
+ $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);
4569
+ return mutable;
4570
+ }
4140
4571
  function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
4141
4572
  let mutable = value.copy();
4142
4573
  switch(field){
@@ -4183,9 +4614,33 @@ function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false
4183
4614
  return value;
4184
4615
  }
4185
4616
 
4617
+ const $fae977aafc393c5c$var$DATE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;
4618
+ function $fae977aafc393c5c$export$6b862160d295c8e(value) {
4619
+ let m = value.match($fae977aafc393c5c$var$DATE_RE);
4620
+ if (!m) throw new Error('Invalid ISO 8601 date string: ' + value);
4621
+ let date = new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)($fae977aafc393c5c$var$parseNumber(m[1], 0, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1);
4622
+ date.day = $fae977aafc393c5c$var$parseNumber(m[3], 1, date.calendar.getDaysInMonth(date));
4623
+ return date;
4624
+ }
4625
+ function $fae977aafc393c5c$var$parseNumber(value, min, max) {
4626
+ let val = Number(value);
4627
+ if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
4628
+ return val;
4629
+ }
4186
4630
  function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
4187
4631
  return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
4188
4632
  }
4633
+ function $fae977aafc393c5c$export$60dfd74aa96791bd(date) {
4634
+ let gregorianDate = ($11d87f3f76e88657$export$b4a036af3fc0b032)(date, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
4635
+ let year;
4636
+ if (gregorianDate.era === 'BC') year = gregorianDate.year === 1 ? '0000' : '-' + String(Math.abs(1 - gregorianDate.year)).padStart(6, '00');
4637
+ else year = String(gregorianDate.year).padStart(4, '0');
4638
+ return `${year}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`;
4639
+ }
4640
+ function $fae977aafc393c5c$export$4223de14708adc63(date) {
4641
+ // @ts-ignore
4642
+ return `${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`;
4643
+ }
4189
4644
 
4190
4645
  function _check_private_redeclaration(obj, privateCollection) {
4191
4646
  if (privateCollection.has(obj)) {
@@ -4198,6 +4653,89 @@ function _class_private_field_init(obj, privateMap, value) {
4198
4653
  privateMap.set(obj, value);
4199
4654
  }
4200
4655
 
4656
+ /*
4657
+ * Copyright 2020 Adobe. All rights reserved.
4658
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4659
+ * you may not use this file except in compliance with the License. You may obtain a copy
4660
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
4661
+ *
4662
+ * Unless required by applicable law or agreed to in writing, software distributed under
4663
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
4664
+ * OF ANY KIND, either express or implied. See the License for the specific language
4665
+ * governing permissions and limitations under the License.
4666
+ */
4667
+
4668
+
4669
+
4670
+
4671
+
4672
+ function $35ea8db9cb2ccb90$var$shiftArgs(args) {
4673
+ let calendar = typeof args[0] === 'object' ? args.shift() : new ($3b62074eb05584b2$export$80ee6245ec4f29ec)();
4674
+ let era;
4675
+ if (typeof args[0] === 'string') era = args.shift();
4676
+ else {
4677
+ let eras = calendar.getEras();
4678
+ era = eras[eras.length - 1];
4679
+ }
4680
+ let year = args.shift();
4681
+ let month = args.shift();
4682
+ let day = args.shift();
4683
+ return [
4684
+ calendar,
4685
+ era,
4686
+ year,
4687
+ month,
4688
+ day
4689
+ ];
4690
+ }
4691
+ var // This prevents TypeScript from allowing other types with the same fields to match.
4692
+ // i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
4693
+ // If that behavior is desired, use the AnyCalendarDate interface instead.
4694
+ // @ts-ignore
4695
+ $35ea8db9cb2ccb90$var$_type = /*#__PURE__*/ new WeakMap();
4696
+ class $35ea8db9cb2ccb90$export$99faa760c7908e4f {
4697
+ /** Returns a copy of this date. */ copy() {
4698
+ if (this.era) return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
4699
+ else return new $35ea8db9cb2ccb90$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
4700
+ }
4701
+ /** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {
4702
+ return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
4703
+ }
4704
+ /** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {
4705
+ return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
4706
+ }
4707
+ /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
4708
+ return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(this, fields);
4709
+ }
4710
+ /**
4711
+ * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
4712
+ * When the resulting value reaches the limits of the field, it wraps around.
4713
+ */ cycle(field, amount, options) {
4714
+ return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
4715
+ }
4716
+ /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */ toDate(timeZone) {
4717
+ return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone);
4718
+ }
4719
+ /** Converts the date to an ISO 8601 formatted string. */ toString() {
4720
+ return ($fae977aafc393c5c$export$60dfd74aa96791bd)(this);
4721
+ }
4722
+ /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
4723
+ return ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
4724
+ }
4725
+ constructor(...args){
4726
+ (_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type, {
4727
+ writable: true,
4728
+ value: void 0
4729
+ });
4730
+ let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
4731
+ this.calendar = calendar;
4732
+ this.era = era;
4733
+ this.year = year;
4734
+ this.month = month;
4735
+ this.day = day;
4736
+ ($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
4737
+ }
4738
+ }
4201
4739
  var // This prevents TypeScript from allowing other types with the same fields to match.
4202
4740
  // @ts-ignore
4203
4741
  $35ea8db9cb2ccb90$var$_type1 = /*#__PURE__*/ new WeakMap();
@@ -4238,6 +4776,66 @@ class $35ea8db9cb2ccb90$export$680ea196effce5f {
4238
4776
  ($735220c2d4774dd3$export$7555de1e070510cb)(this);
4239
4777
  }
4240
4778
  }
4779
+ var // This prevents TypeScript from allowing other types with the same fields to match.
4780
+ // @ts-ignore
4781
+ $35ea8db9cb2ccb90$var$_type2 = /*#__PURE__*/ new WeakMap();
4782
+ class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
4783
+ /** Returns a copy of this date. */ copy() {
4784
+ if (this.era) return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
4785
+ else return new $35ea8db9cb2ccb90$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
4786
+ }
4787
+ /** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {
4788
+ return ($735220c2d4774dd3$export$e16d8520af44a096)(this, duration);
4789
+ }
4790
+ /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {
4791
+ return ($735220c2d4774dd3$export$4e2d2ead65e5f7e3)(this, duration);
4792
+ }
4793
+ /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
4794
+ return ($735220c2d4774dd3$export$adaa4cf7ef1b65be)(($735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields), fields);
4795
+ }
4796
+ /**
4797
+ * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
4798
+ * When the resulting value reaches the limits of the field, it wraps around.
4799
+ */ cycle(field, amount, options) {
4800
+ switch(field){
4801
+ case 'era':
4802
+ case 'year':
4803
+ case 'month':
4804
+ case 'day':
4805
+ return ($735220c2d4774dd3$export$d52ced6badfb9a4c)(this, field, amount, options);
4806
+ default:
4807
+ return ($735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
4808
+ }
4809
+ }
4810
+ /** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {
4811
+ return ($11d87f3f76e88657$export$e67a095c620b86fe)(this, timeZone, disambiguation);
4812
+ }
4813
+ /** Converts the date to an ISO 8601 formatted string. */ toString() {
4814
+ return ($fae977aafc393c5c$export$4223de14708adc63)(this);
4815
+ }
4816
+ /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
4817
+ let res = ($14e0f24ef4ac5c92$export$68781ddf31c0090f)(this, b);
4818
+ if (res === 0) return ($14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, ($11d87f3f76e88657$export$b21e0b124e224484)(b));
4819
+ return res;
4820
+ }
4821
+ constructor(...args){
4822
+ (_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type2, {
4823
+ writable: true,
4824
+ value: void 0
4825
+ });
4826
+ let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
4827
+ this.calendar = calendar;
4828
+ this.era = era;
4829
+ this.year = year;
4830
+ this.month = month;
4831
+ this.day = day;
4832
+ this.hour = args.shift() || 0;
4833
+ this.minute = args.shift() || 0;
4834
+ this.second = args.shift() || 0;
4835
+ this.millisecond = args.shift() || 0;
4836
+ ($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
4837
+ }
4838
+ }
4241
4839
 
4242
4840
  var Switch = function (_a) {
4243
4841
  var id = _a.id, props = __rest(_a, ["id"]);
@@ -6548,7 +7146,35 @@ var DateFilter = function (_a) {
6548
7146
  }
6549
7147
  return exports.HolidayType.SingleDay;
6550
7148
  };
6551
- return (jsxRuntime.jsx(DateSelector, { initialType: getInitialType(), initialDate: undefined, initialDateRange: undefined, onChange: handleDateSelectorChange, className: "w-full" }));
7149
+ var getInitialDate = function () {
7150
+ if ((value === null || value === void 0 ? void 0 : value.type) === "singleDay" && value.date) {
7151
+ try {
7152
+ return $fae977aafc393c5c$export$6b862160d295c8e(value.date);
7153
+ }
7154
+ catch (_a) {
7155
+ return undefined;
7156
+ }
7157
+ }
7158
+ return undefined;
7159
+ };
7160
+ var getInitialDateRange = function () {
7161
+ var _a, _b;
7162
+ if ((value === null || value === void 0 ? void 0 : value.type) === "dateRange" &&
7163
+ ((_a = value.dateRange) === null || _a === void 0 ? void 0 : _a.start) &&
7164
+ ((_b = value.dateRange) === null || _b === void 0 ? void 0 : _b.end)) {
7165
+ try {
7166
+ return {
7167
+ start: $fae977aafc393c5c$export$6b862160d295c8e(value.dateRange.start),
7168
+ end: $fae977aafc393c5c$export$6b862160d295c8e(value.dateRange.end),
7169
+ };
7170
+ }
7171
+ catch (_c) {
7172
+ return undefined;
7173
+ }
7174
+ }
7175
+ return undefined;
7176
+ };
7177
+ return (jsxRuntime.jsx(DateSelector, { initialType: getInitialType(), initialDate: getInitialDate(), initialDateRange: getInitialDateRange(), onChange: handleDateSelectorChange, className: "w-full" }));
6552
7178
  };
6553
7179
  // =========================================================================
6554
7180
  // TEXT FILTER