@react-stately/datepicker 3.1.0 → 3.2.1

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/main.js CHANGED
@@ -12,75 +12,104 @@ $parcel$export(module.exports, "useDatePickerState", () => $aaab7a647e17e1fd$exp
12
12
  $parcel$export(module.exports, "useDateFieldState", () => $596a1f0f523d6752$export$60e84778edff6d26);
13
13
  $parcel$export(module.exports, "useDateRangePickerState", () => $7072d26f58deb33b$export$e50a61c1de9f574);
14
14
  $parcel$export(module.exports, "useTimeFieldState", () => $2654e87be0231a69$export$fd53cef0cc796101);
15
-
16
-
15
+ /*
16
+ * Copyright 2020 Adobe. All rights reserved.
17
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
+ * you may not use this file except in compliance with the License. You may obtain a copy
19
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
+ *
21
+ * Unless required by applicable law or agreed to in writing, software distributed under
22
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
+ * OF ANY KIND, either express or implied. See the License for the specific language
24
+ * governing permissions and limitations under the License.
25
+ */ /*
26
+ * Copyright 2020 Adobe. All rights reserved.
27
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
28
+ * you may not use this file except in compliance with the License. You may obtain a copy
29
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
30
+ *
31
+ * Unless required by applicable law or agreed to in writing, software distributed under
32
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
33
+ * OF ANY KIND, either express or implied. See the License for the specific language
34
+ * governing permissions and limitations under the License.
35
+ */
36
+ /*
37
+ * Copyright 2020 Adobe. All rights reserved.
38
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
39
+ * you may not use this file except in compliance with the License. You may obtain a copy
40
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
41
+ *
42
+ * Unless required by applicable law or agreed to in writing, software distributed under
43
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
44
+ * OF ANY KIND, either express or implied. See the License for the specific language
45
+ * governing permissions and limitations under the License.
46
+ */
17
47
 
18
48
  function $50d5d6a623389320$export$eac50920cf2fd59a(value, minValue, maxValue) {
19
49
  return value != null && (minValue != null && value.compare(minValue) < 0 || maxValue != null && value.compare(maxValue) > 0);
20
50
  }
21
51
  const $50d5d6a623389320$var$DEFAULT_FIELD_OPTIONS = {
22
- year: 'numeric',
23
- month: 'numeric',
24
- day: 'numeric',
25
- hour: 'numeric',
26
- minute: '2-digit',
27
- second: '2-digit'
52
+ year: "numeric",
53
+ month: "numeric",
54
+ day: "numeric",
55
+ hour: "numeric",
56
+ minute: "2-digit",
57
+ second: "2-digit"
28
58
  };
29
59
  function $50d5d6a623389320$export$7e319ea407e63bc0(fieldOptions, options) {
30
60
  fieldOptions = {
31
61
  ...$50d5d6a623389320$var$DEFAULT_FIELD_OPTIONS,
32
62
  ...fieldOptions
33
63
  };
34
- let granularity = options.granularity || 'minute';
64
+ let granularity = options.granularity || "minute";
35
65
  let keys = Object.keys(fieldOptions);
36
- var _maxGranularity;
37
- let startIdx = keys.indexOf((_maxGranularity = options.maxGranularity) !== null && _maxGranularity !== void 0 ? _maxGranularity : 'year');
66
+ var _options_maxGranularity;
67
+ let startIdx = keys.indexOf((_options_maxGranularity = options.maxGranularity) !== null && _options_maxGranularity !== void 0 ? _options_maxGranularity : "year");
38
68
  if (startIdx < 0) startIdx = 0;
39
69
  let endIdx = keys.indexOf(granularity);
40
70
  if (endIdx < 0) endIdx = 2;
41
- if (startIdx > endIdx) throw new Error('maxGranularity must be greater than granularity');
42
- let opts1 = keys.slice(startIdx, endIdx + 1).reduce((opts, key)=>{
71
+ if (startIdx > endIdx) throw new Error("maxGranularity must be greater than granularity");
72
+ let opts = keys.slice(startIdx, endIdx + 1).reduce((opts, key)=>{
43
73
  opts[key] = fieldOptions[key];
44
74
  return opts;
45
- }, {
46
- });
47
- if (options.hourCycle != null) opts1.hour12 = options.hourCycle === 12;
48
- opts1.timeZone = options.timeZone || 'UTC';
49
- let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';
50
- if (hasTime && options.timeZone && !options.hideTimeZone) opts1.timeZoneName = 'short';
51
- if (options.showEra && startIdx === 0) opts1.era = 'short';
52
- return opts1;
75
+ }, {});
76
+ if (options.hourCycle != null) opts.hour12 = options.hourCycle === 12;
77
+ opts.timeZone = options.timeZone || "UTC";
78
+ let hasTime = granularity === "hour" || granularity === "minute" || granularity === "second";
79
+ if (hasTime && options.timeZone && !options.hideTimeZone) opts.timeZoneName = "short";
80
+ if (options.showEra && startIdx === 0) opts.era = "short";
81
+ return opts;
53
82
  }
54
83
  function $50d5d6a623389320$export$c5221a78ef73c5e9(placeholderValue) {
55
- if (placeholderValue && 'hour' in placeholderValue) return placeholderValue;
56
- return new $h2qOe$internationalizeddate.Time();
84
+ if (placeholderValue && "hour" in placeholderValue) return placeholderValue;
85
+ return new (0, $h2qOe$internationalizeddate.Time)();
57
86
  }
58
87
  function $50d5d6a623389320$export$61a490a80c552550(value, calendar) {
59
88
  if (value === null) return null;
60
89
  if (!value) return undefined;
61
- return $h2qOe$internationalizeddate.toCalendar(value, calendar);
90
+ return (0, $h2qOe$internationalizeddate.toCalendar)(value, calendar);
62
91
  }
63
92
  function $50d5d6a623389320$export$66aa2b09de4b1ea5(placeholderValue, granularity, calendar, timeZone) {
64
93
  if (placeholderValue) return $50d5d6a623389320$export$61a490a80c552550(placeholderValue, calendar);
65
- let date = $h2qOe$internationalizeddate.toCalendar($h2qOe$internationalizeddate.now(timeZone).set({
94
+ let date = (0, $h2qOe$internationalizeddate.toCalendar)((0, $h2qOe$internationalizeddate.now)(timeZone).set({
66
95
  hour: 0,
67
96
  minute: 0,
68
97
  second: 0,
69
98
  millisecond: 0
70
99
  }), calendar);
71
- if (granularity === 'year' || granularity === 'month' || granularity === 'day') return $h2qOe$internationalizeddate.toCalendarDate(date);
72
- if (!timeZone) return $h2qOe$internationalizeddate.toCalendarDateTime(date);
100
+ if (granularity === "year" || granularity === "month" || granularity === "day") return (0, $h2qOe$internationalizeddate.toCalendarDate)(date);
101
+ if (!timeZone) return (0, $h2qOe$internationalizeddate.toCalendarDateTime)(date);
73
102
  return date;
74
103
  }
75
104
  function $50d5d6a623389320$export$2440da353cedad43(v, granularity) {
76
105
  // Compute default granularity and time zone from the value. If the value becomes null, keep the last values.
77
- let lastValue = $h2qOe$react.useRef(v);
106
+ let lastValue = (0, $h2qOe$react.useRef)(v);
78
107
  if (v) lastValue.current = v;
79
108
  v = lastValue.current;
80
- let defaultTimeZone = v && 'timeZone' in v ? v.timeZone : undefined;
81
- granularity = granularity || (v && 'minute' in v ? 'minute' : 'day');
109
+ let defaultTimeZone = v && "timeZone" in v ? v.timeZone : undefined;
110
+ granularity = granularity || (v && "minute" in v ? "minute" : "day");
82
111
  // props.granularity must actually exist in the value if one is provided.
83
- if (v && !(granularity in v)) throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());
112
+ if (v && !(granularity in v)) throw new Error("Invalid granularity " + granularity + " for value " + v.toString());
84
113
  return [
85
114
  granularity,
86
115
  defaultTimeZone
@@ -93,31 +122,31 @@ function $50d5d6a623389320$export$2440da353cedad43(v, granularity) {
93
122
 
94
123
 
95
124
  function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
96
- var ref;
97
- let overlayState = $h2qOe$reactstatelyoverlays.useOverlayTriggerState(props);
98
- let [value, setValue] = $h2qOe$reactstatelyutils.useControlledState(props.value, props.defaultValue || null, props.onChange);
125
+ var _props_isDateUnavailable;
126
+ let overlayState = (0, $h2qOe$reactstatelyoverlays.useOverlayTriggerState)(props);
127
+ let [value, setValue] = (0, $h2qOe$reactstatelyutils.useControlledState)(props.value, props.defaultValue || null, props.onChange);
99
128
  let v = value || props.placeholderValue;
100
- let [granularity, defaultTimeZone] = $50d5d6a623389320$export$2440da353cedad43(v, props.granularity);
101
- let dateValue = value != null ? value.toDate(defaultTimeZone !== null && defaultTimeZone !== void 0 ? defaultTimeZone : 'UTC') : null;
102
- let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';
103
- var _shouldCloseOnSelect;
104
- let shouldCloseOnSelect = (_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _shouldCloseOnSelect !== void 0 ? _shouldCloseOnSelect : true;
105
- let [selectedDate, setSelectedDate] = $h2qOe$react.useState(null);
106
- let [selectedTime, setSelectedTime] = $h2qOe$react.useState(null);
129
+ let [granularity, defaultTimeZone] = (0, $50d5d6a623389320$export$2440da353cedad43)(v, props.granularity);
130
+ let dateValue = value != null ? value.toDate(defaultTimeZone !== null && defaultTimeZone !== void 0 ? defaultTimeZone : "UTC") : null;
131
+ let hasTime = granularity === "hour" || granularity === "minute" || granularity === "second";
132
+ var _props_shouldCloseOnSelect;
133
+ let shouldCloseOnSelect = (_props_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _props_shouldCloseOnSelect !== void 0 ? _props_shouldCloseOnSelect : true;
134
+ let [selectedDate, setSelectedDate] = (0, $h2qOe$react.useState)(null);
135
+ let [selectedTime, setSelectedTime] = (0, $h2qOe$react.useState)(null);
107
136
  if (value) {
108
137
  selectedDate = value;
109
- if ('hour' in value) selectedTime = value;
138
+ if ("hour" in value) selectedTime = value;
110
139
  }
111
140
  // props.granularity must actually exist in the value if one is provided.
112
- if (v && !(granularity in v)) throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());
141
+ if (v && !(granularity in v)) throw new Error("Invalid granularity " + granularity + " for value " + v.toString());
113
142
  let commitValue = (date, time)=>{
114
- setValue('timeZone' in time ? time.set($h2qOe$internationalizeddate.toCalendarDate(date)) : $h2qOe$internationalizeddate.toCalendarDateTime(date, time));
143
+ setValue("timeZone" in time ? time.set((0, $h2qOe$internationalizeddate.toCalendarDate)(date)) : (0, $h2qOe$internationalizeddate.toCalendarDateTime)(date, time));
115
144
  };
116
145
  // Intercept setValue to make sure the Time section is not changed by date selection in Calendar
117
146
  let selectDate = (newValue)=>{
118
- let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;
147
+ let shouldClose = typeof shouldCloseOnSelect === "function" ? shouldCloseOnSelect() : shouldCloseOnSelect;
119
148
  if (hasTime) {
120
- if (selectedTime || shouldClose) commitValue(newValue, selectedTime || $50d5d6a623389320$export$c5221a78ef73c5e9(props.placeholderValue));
149
+ if (selectedTime || shouldClose) commitValue(newValue, selectedTime || (0, $50d5d6a623389320$export$c5221a78ef73c5e9)(props.placeholderValue));
121
150
  else setSelectedDate(newValue);
122
151
  } else setValue(newValue);
123
152
  if (shouldClose) overlayState.setOpen(false);
@@ -126,7 +155,7 @@ function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
126
155
  if (selectedDate) commitValue(selectedDate, newValue);
127
156
  else setSelectedTime(newValue);
128
157
  };
129
- let validationState = props.validationState || ($50d5d6a623389320$export$eac50920cf2fd59a(value, props.minValue, props.maxValue) ? 'invalid' : null) || (value && ((ref = props.isDateUnavailable) === null || ref === void 0 ? void 0 : ref.call(props, value)) ? 'invalid' : null);
158
+ let validationState = props.validationState || ((0, $50d5d6a623389320$export$eac50920cf2fd59a)(value, props.minValue, props.maxValue) ? "invalid" : null) || (value && ((_props_isDateUnavailable = props.isDateUnavailable) === null || _props_isDateUnavailable === void 0 ? void 0 : _props_isDateUnavailable.call(props, value)) ? "invalid" : null);
130
159
  return {
131
160
  value: value,
132
161
  setValue: setValue,
@@ -141,415 +170,435 @@ function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
141
170
  // Commit the selected date when the calendar is closed. Use a placeholder time if one wasn't set.
142
171
  // If only the time was set and not the date, don't commit. The state will be preserved until
143
172
  // the user opens the popover again.
144
- if (!isOpen && !value && selectedDate && hasTime) commitValue(selectedDate, selectedTime || $50d5d6a623389320$export$c5221a78ef73c5e9(props.placeholderValue));
173
+ if (!isOpen && !value && selectedDate && hasTime) commitValue(selectedDate, selectedTime || (0, $50d5d6a623389320$export$c5221a78ef73c5e9)(props.placeholderValue));
145
174
  overlayState.setOpen(isOpen);
146
175
  },
147
176
  validationState: validationState,
148
177
  formatValue (locale, fieldOptions) {
149
- if (!dateValue) return '';
150
- let formatOptions = $50d5d6a623389320$export$7e319ea407e63bc0(fieldOptions, {
178
+ if (!dateValue) return "";
179
+ let formatOptions = (0, $50d5d6a623389320$export$7e319ea407e63bc0)(fieldOptions, {
151
180
  granularity: granularity,
152
181
  timeZone: defaultTimeZone,
153
182
  hideTimeZone: props.hideTimeZone,
154
183
  hourCycle: props.hourCycle,
155
- showEra: value.calendar.identifier === 'gregory' && value.era === 'BC'
184
+ showEra: value.calendar.identifier === "gregory" && value.era === "BC"
156
185
  });
157
- let formatter = new $h2qOe$internationalizeddate.DateFormatter(locale, formatOptions);
186
+ let formatter = new (0, $h2qOe$internationalizeddate.DateFormatter)(locale, formatOptions);
158
187
  return formatter.format(dateValue);
159
188
  }
160
189
  };
161
190
  }
162
191
 
163
192
 
193
+ /*
194
+ * Copyright 2020 Adobe. All rights reserved.
195
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
196
+ * you may not use this file except in compliance with the License. You may obtain a copy
197
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
198
+ *
199
+ * Unless required by applicable law or agreed to in writing, software distributed under
200
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
201
+ * OF ANY KIND, either express or implied. See the License for the specific language
202
+ * governing permissions and limitations under the License.
203
+ */
164
204
 
165
-
166
-
205
+ /*
206
+ * Copyright 2020 Adobe. All rights reserved.
207
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
208
+ * you may not use this file except in compliance with the License. You may obtain a copy
209
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
210
+ *
211
+ * Unless required by applicable law or agreed to in writing, software distributed under
212
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
213
+ * OF ANY KIND, either express or implied. See the License for the specific language
214
+ * governing permissions and limitations under the License.
215
+ */
167
216
  // These placeholders are based on the strings used by the <input type="date">
168
217
  // implementations in Chrome and Firefox. Additional languages are supported
169
218
  // here than React Spectrum's typical translations.
170
- const $e1e8ada727fae1a1$var$placeholders = new $h2qOe$internationalizedstring.LocalizedStringDictionary({
219
+ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstring.LocalizedStringDictionary)({
171
220
  ach: {
172
- year: 'mwaka',
173
- month: 'dwe',
174
- day: 'nino'
221
+ year: "mwaka",
222
+ month: "dwe",
223
+ day: "nino"
175
224
  },
176
225
  af: {
177
- year: 'jjjj',
178
- month: 'mm',
179
- day: 'dd'
226
+ year: "jjjj",
227
+ month: "mm",
228
+ day: "dd"
180
229
  },
181
230
  am: {
182
- year: 'ዓዓዓዓ',
183
- month: 'ሚሜ',
184
- day: 'ቀቀ'
231
+ year: "ዓዓዓዓ",
232
+ month: "ሚሜ",
233
+ day: "ቀቀ"
185
234
  },
186
235
  an: {
187
- year: 'aaaa',
188
- month: 'mm',
189
- day: 'dd'
236
+ year: "aaaa",
237
+ month: "mm",
238
+ day: "dd"
190
239
  },
191
240
  ar: {
192
- year: 'سنة',
193
- month: 'شهر',
194
- day: 'يوم'
241
+ year: "سنة",
242
+ month: "شهر",
243
+ day: "يوم"
195
244
  },
196
245
  ast: {
197
- year: 'aaaa',
198
- month: 'mm',
199
- day: 'dd'
246
+ year: "aaaa",
247
+ month: "mm",
248
+ day: "dd"
200
249
  },
201
250
  az: {
202
- year: 'iiii',
203
- month: 'aa',
204
- day: 'gg'
251
+ year: "iiii",
252
+ month: "aa",
253
+ day: "gg"
205
254
  },
206
255
  be: {
207
- year: 'гггг',
208
- month: 'мм',
209
- day: 'дд'
256
+ year: "гггг",
257
+ month: "мм",
258
+ day: "дд"
210
259
  },
211
260
  bg: {
212
- year: 'гггг',
213
- month: 'мм',
214
- day: 'дд'
261
+ year: "гггг",
262
+ month: "мм",
263
+ day: "дд"
215
264
  },
216
265
  bn: {
217
- year: 'yyyy',
218
- month: 'মিমি',
219
- day: 'dd'
266
+ year: "yyyy",
267
+ month: "মিমি",
268
+ day: "dd"
220
269
  },
221
270
  br: {
222
- year: 'bbbb',
223
- month: 'mm',
224
- day: 'dd'
271
+ year: "bbbb",
272
+ month: "mm",
273
+ day: "dd"
225
274
  },
226
275
  bs: {
227
- year: 'gggg',
228
- month: 'mm',
229
- day: 'dd'
276
+ year: "gggg",
277
+ month: "mm",
278
+ day: "dd"
230
279
  },
231
280
  ca: {
232
- year: 'aaaa',
233
- month: 'mm',
234
- day: 'dd'
281
+ year: "aaaa",
282
+ month: "mm",
283
+ day: "dd"
235
284
  },
236
285
  cak: {
237
- year: 'jjjj',
238
- month: 'ii',
286
+ year: "jjjj",
287
+ month: "ii",
239
288
  day: "q'q'"
240
289
  },
241
290
  ckb: {
242
- year: 'ساڵ',
243
- month: 'مانگ',
244
- day: 'ڕۆژ'
291
+ year: "ساڵ",
292
+ month: "مانگ",
293
+ day: "ڕۆژ"
245
294
  },
246
295
  cs: {
247
- year: 'rrrr',
248
- month: 'mm',
249
- day: 'dd'
296
+ year: "rrrr",
297
+ month: "mm",
298
+ day: "dd"
250
299
  },
251
300
  cy: {
252
- year: 'bbbb',
253
- month: 'mm',
254
- day: 'dd'
301
+ year: "bbbb",
302
+ month: "mm",
303
+ day: "dd"
255
304
  },
256
305
  da: {
257
- year: 'åååå',
258
- month: 'mm',
259
- day: 'dd'
306
+ year: "\xe5\xe5\xe5\xe5",
307
+ month: "mm",
308
+ day: "dd"
260
309
  },
261
310
  de: {
262
- year: 'jjjj',
263
- month: 'mm',
264
- day: 'tt'
311
+ year: "jjjj",
312
+ month: "mm",
313
+ day: "tt"
265
314
  },
266
315
  dsb: {
267
- year: 'llll',
268
- month: 'mm',
269
- day: 'źź'
316
+ year: "llll",
317
+ month: "mm",
318
+ day: "źź"
270
319
  },
271
320
  el: {
272
- year: 'εεεε',
273
- month: 'μμ',
274
- day: 'ηη'
321
+ year: "εεεε",
322
+ month: "μμ",
323
+ day: "ηη"
275
324
  },
276
325
  en: {
277
- year: 'yyyy',
278
- month: 'mm',
279
- day: 'dd'
326
+ year: "yyyy",
327
+ month: "mm",
328
+ day: "dd"
280
329
  },
281
330
  eo: {
282
- year: 'jjjj',
283
- month: 'mm',
284
- day: 'tt'
331
+ year: "jjjj",
332
+ month: "mm",
333
+ day: "tt"
285
334
  },
286
335
  es: {
287
- year: 'aaaa',
288
- month: 'mm',
289
- day: 'dd'
336
+ year: "aaaa",
337
+ month: "mm",
338
+ day: "dd"
290
339
  },
291
340
  et: {
292
- year: 'aaaa',
293
- month: 'kk',
294
- day: 'pp'
341
+ year: "aaaa",
342
+ month: "kk",
343
+ day: "pp"
295
344
  },
296
345
  eu: {
297
- year: 'uuuu',
298
- month: 'hh',
299
- day: 'ee'
346
+ year: "uuuu",
347
+ month: "hh",
348
+ day: "ee"
300
349
  },
301
350
  fa: {
302
- year: 'سال',
303
- month: 'ماه',
304
- day: 'روز'
351
+ year: "سال",
352
+ month: "ماه",
353
+ day: "روز"
305
354
  },
306
355
  ff: {
307
- year: 'hhhh',
308
- month: 'll',
309
- day: 'ññ'
356
+ year: "hhhh",
357
+ month: "ll",
358
+ day: "\xf1\xf1"
310
359
  },
311
360
  fi: {
312
- year: 'vvvv',
313
- month: 'kk',
314
- day: 'pp'
361
+ year: "vvvv",
362
+ month: "kk",
363
+ day: "pp"
315
364
  },
316
365
  fr: {
317
- year: 'aaaa',
318
- month: 'mm',
319
- day: 'jj'
366
+ year: "aaaa",
367
+ month: "mm",
368
+ day: "jj"
320
369
  },
321
370
  fy: {
322
- year: 'jjjj',
323
- month: 'mm',
324
- day: 'dd'
371
+ year: "jjjj",
372
+ month: "mm",
373
+ day: "dd"
325
374
  },
326
375
  ga: {
327
- year: 'bbbb',
328
- month: 'mm',
329
- day: 'll'
376
+ year: "bbbb",
377
+ month: "mm",
378
+ day: "ll"
330
379
  },
331
380
  gd: {
332
- year: 'bbbb',
333
- month: 'mm',
334
- day: 'll'
381
+ year: "bbbb",
382
+ month: "mm",
383
+ day: "ll"
335
384
  },
336
385
  gl: {
337
- year: 'aaaa',
338
- month: 'mm',
339
- day: 'dd'
386
+ year: "aaaa",
387
+ month: "mm",
388
+ day: "dd"
340
389
  },
341
390
  he: {
342
- year: 'שנה',
343
- month: 'חודש',
344
- day: 'יום'
391
+ year: "שנה",
392
+ month: "חודש",
393
+ day: "יום"
345
394
  },
346
395
  hr: {
347
- year: 'gggg',
348
- month: 'mm',
349
- day: 'dd'
396
+ year: "gggg",
397
+ month: "mm",
398
+ day: "dd"
350
399
  },
351
400
  hsb: {
352
- year: 'llll',
353
- month: 'mm',
354
- day: 'dd'
401
+ year: "llll",
402
+ month: "mm",
403
+ day: "dd"
355
404
  },
356
405
  hu: {
357
- year: 'éééé',
358
- month: 'hh',
359
- day: 'nn'
406
+ year: "\xe9\xe9\xe9\xe9",
407
+ month: "hh",
408
+ day: "nn"
360
409
  },
361
410
  ia: {
362
- year: 'aaaa',
363
- month: 'mm',
364
- day: 'dd'
411
+ year: "aaaa",
412
+ month: "mm",
413
+ day: "dd"
365
414
  },
366
415
  id: {
367
- year: 'tttt',
368
- month: 'bb',
369
- day: 'hh'
416
+ year: "tttt",
417
+ month: "bb",
418
+ day: "hh"
370
419
  },
371
420
  it: {
372
- year: 'aaaa',
373
- month: 'mm',
374
- day: 'gg'
421
+ year: "aaaa",
422
+ month: "mm",
423
+ day: "gg"
375
424
  },
376
425
  ja: {
377
- year: '',
378
- month: '',
379
- day: ''
426
+ year: "",
427
+ month: "",
428
+ day: ""
380
429
  },
381
430
  ka: {
382
- year: 'წწწწ',
383
- month: 'თთ',
384
- day: 'რრ'
431
+ year: "წწწწ",
432
+ month: "თთ",
433
+ day: "რრ"
385
434
  },
386
435
  kk: {
387
- year: 'жжжж',
388
- month: 'аа',
389
- day: 'кк'
436
+ year: "жжжж",
437
+ month: "аа",
438
+ day: "кк"
390
439
  },
391
440
  kn: {
392
- year: 'ವವವವ',
393
- month: 'ಮಿಮೀ',
394
- day: 'ದಿದಿ'
441
+ year: "ವವವವ",
442
+ month: "ಮಿಮೀ",
443
+ day: "ದಿದಿ"
395
444
  },
396
445
  ko: {
397
- year: '연도',
398
- month: '',
399
- day: ''
446
+ year: "연도",
447
+ month: "",
448
+ day: ""
400
449
  },
401
450
  lb: {
402
- year: 'jjjj',
403
- month: 'mm',
404
- day: 'dd'
451
+ year: "jjjj",
452
+ month: "mm",
453
+ day: "dd"
405
454
  },
406
455
  lo: {
407
- year: 'ປປປປ',
408
- month: 'ດດ',
409
- day: 'ວວ'
456
+ year: "ປປປປ",
457
+ month: "ດດ",
458
+ day: "ວວ"
410
459
  },
411
460
  lt: {
412
- year: 'mmmm',
413
- month: 'mm',
414
- day: 'dd'
461
+ year: "mmmm",
462
+ month: "mm",
463
+ day: "dd"
415
464
  },
416
465
  lv: {
417
- year: 'gggg',
418
- month: 'mm',
419
- day: 'dd'
466
+ year: "gggg",
467
+ month: "mm",
468
+ day: "dd"
420
469
  },
421
470
  meh: {
422
- year: 'aaaa',
423
- month: 'mm',
424
- day: 'dd'
471
+ year: "aaaa",
472
+ month: "mm",
473
+ day: "dd"
425
474
  },
426
475
  ml: {
427
- year: 'വർഷം',
428
- month: 'മാസം',
429
- day: 'തീയതി'
476
+ year: "വർഷം",
477
+ month: "മാസം",
478
+ day: "തീയതി"
430
479
  },
431
480
  ms: {
432
- year: 'tttt',
433
- month: 'mm',
434
- day: 'hh'
481
+ year: "tttt",
482
+ month: "mm",
483
+ day: "hh"
435
484
  },
436
485
  nl: {
437
- year: 'jjjj',
438
- month: 'mm',
439
- day: 'dd'
486
+ year: "jjjj",
487
+ month: "mm",
488
+ day: "dd"
440
489
  },
441
490
  nn: {
442
- year: 'åååå',
443
- month: 'mm',
444
- day: 'dd'
491
+ year: "\xe5\xe5\xe5\xe5",
492
+ month: "mm",
493
+ day: "dd"
445
494
  },
446
495
  no: {
447
- year: 'åååå',
448
- month: 'mm',
449
- day: 'dd'
496
+ year: "\xe5\xe5\xe5\xe5",
497
+ month: "mm",
498
+ day: "dd"
450
499
  },
451
500
  oc: {
452
- year: 'aaaa',
453
- month: 'mm',
454
- day: 'jj'
501
+ year: "aaaa",
502
+ month: "mm",
503
+ day: "jj"
455
504
  },
456
505
  pl: {
457
- year: 'rrrr',
458
- month: 'mm',
459
- day: 'dd'
506
+ year: "rrrr",
507
+ month: "mm",
508
+ day: "dd"
460
509
  },
461
510
  pt: {
462
- year: 'aaaa',
463
- month: 'mm',
464
- day: 'dd'
511
+ year: "aaaa",
512
+ month: "mm",
513
+ day: "dd"
465
514
  },
466
515
  rm: {
467
- year: 'oooo',
468
- month: 'mm',
469
- day: 'dd'
516
+ year: "oooo",
517
+ month: "mm",
518
+ day: "dd"
470
519
  },
471
520
  ro: {
472
- year: 'aaaa',
473
- month: 'll',
474
- day: 'zz'
521
+ year: "aaaa",
522
+ month: "ll",
523
+ day: "zz"
475
524
  },
476
525
  ru: {
477
- year: 'гггг',
478
- month: 'мм',
479
- day: 'дд'
526
+ year: "гггг",
527
+ month: "мм",
528
+ day: "дд"
480
529
  },
481
530
  sc: {
482
- year: 'aaaa',
483
- month: 'mm',
484
- day: 'dd'
531
+ year: "aaaa",
532
+ month: "mm",
533
+ day: "dd"
485
534
  },
486
535
  scn: {
487
- year: 'aaaa',
488
- month: 'mm',
489
- day: 'jj'
536
+ year: "aaaa",
537
+ month: "mm",
538
+ day: "jj"
490
539
  },
491
540
  sk: {
492
- year: 'rrrr',
493
- month: 'mm',
494
- day: 'dd'
541
+ year: "rrrr",
542
+ month: "mm",
543
+ day: "dd"
495
544
  },
496
545
  sl: {
497
- year: 'llll',
498
- month: 'mm',
499
- day: 'dd'
546
+ year: "llll",
547
+ month: "mm",
548
+ day: "dd"
500
549
  },
501
550
  sr: {
502
- year: 'гггг',
503
- month: 'мм',
504
- day: 'дд'
551
+ year: "гггг",
552
+ month: "мм",
553
+ day: "дд"
505
554
  },
506
555
  sv: {
507
- year: 'åååå',
508
- month: 'mm',
509
- day: 'dd'
556
+ year: "\xe5\xe5\xe5\xe5",
557
+ month: "mm",
558
+ day: "dd"
510
559
  },
511
560
  szl: {
512
- year: 'rrrr',
513
- month: 'mm',
514
- day: 'dd'
561
+ year: "rrrr",
562
+ month: "mm",
563
+ day: "dd"
515
564
  },
516
565
  tg: {
517
- year: 'сссс',
518
- month: 'мм',
519
- day: 'рр'
566
+ year: "сссс",
567
+ month: "мм",
568
+ day: "рр"
520
569
  },
521
570
  th: {
522
- year: 'ปปปป',
523
- month: 'ดด',
524
- day: 'วว'
571
+ year: "ปปปป",
572
+ month: "ดด",
573
+ day: "วว"
525
574
  },
526
575
  tr: {
527
- year: 'yyyy',
528
- month: 'aa',
529
- day: 'gg'
576
+ year: "yyyy",
577
+ month: "aa",
578
+ day: "gg"
530
579
  },
531
580
  uk: {
532
- year: 'рррр',
533
- month: 'мм',
534
- day: 'дд'
535
- },
536
- 'zh-CN': {
537
- year: '',
538
- month: '',
539
- day: ''
540
- },
541
- 'zh-TW': {
542
- year: '',
543
- month: '',
544
- day: ''
581
+ year: "рррр",
582
+ month: "мм",
583
+ day: "дд"
584
+ },
585
+ "zh-CN": {
586
+ year: "",
587
+ month: "",
588
+ day: ""
589
+ },
590
+ "zh-TW": {
591
+ year: "",
592
+ month: "",
593
+ day: ""
545
594
  }
546
- }, 'en');
595
+ }, "en");
547
596
  function $e1e8ada727fae1a1$export$d3f5c5e0a5023fa0(field, value, locale) {
548
597
  // Use the actual placeholder value for the era and day period fields.
549
- if (field === 'era' || field === 'dayPeriod') return value;
550
- if (field === 'year' || field === 'month' || field === 'day') return $e1e8ada727fae1a1$var$placeholders.getStringForLocale(field, locale);
598
+ if (field === "era" || field === "dayPeriod") return value;
599
+ if (field === "year" || field === "month" || field === "day") return $e1e8ada727fae1a1$var$placeholders.getStringForLocale(field, locale);
551
600
  // For time fields (e.g. hour, minute, etc.), use two dashes as the placeholder.
552
- return '––';
601
+ return "––";
553
602
  }
554
603
 
555
604
 
@@ -575,48 +624,43 @@ const $596a1f0f523d6752$var$PAGE_STEP = {
575
624
  };
576
625
  // Node seems to convert everything to lowercase...
577
626
  const $596a1f0f523d6752$var$TYPE_MAPPING = {
578
- dayperiod: 'dayPeriod'
627
+ dayperiod: "dayPeriod"
579
628
  };
580
629
  function $596a1f0f523d6752$export$60e84778edff6d26(props) {
581
630
  let { locale: locale , createCalendar: createCalendar , hideTimeZone: hideTimeZone , isDisabled: isDisabled , isReadOnly: isReadOnly , isRequired: isRequired } = props;
582
- let v1 = props.value || props.defaultValue || props.placeholderValue;
583
- let [granularity, defaultTimeZone] = $50d5d6a623389320$export$2440da353cedad43(v1, props.granularity);
584
- let timeZone = defaultTimeZone || 'UTC';
631
+ let v = props.value || props.defaultValue || props.placeholderValue;
632
+ let [granularity, defaultTimeZone] = (0, $50d5d6a623389320$export$2440da353cedad43)(v, props.granularity);
633
+ let timeZone = defaultTimeZone || "UTC";
585
634
  // props.granularity must actually exist in the value if one is provided.
586
- if (v1 && !(granularity in v1)) throw new Error('Invalid granularity ' + granularity + ' for value ' + v1.toString());
587
- let defaultFormatter = $h2qOe$react.useMemo(()=>new $h2qOe$internationalizeddate.DateFormatter(locale)
588
- , [
635
+ if (v && !(granularity in v)) throw new Error("Invalid granularity " + granularity + " for value " + v.toString());
636
+ let defaultFormatter = (0, $h2qOe$react.useMemo)(()=>new (0, $h2qOe$internationalizeddate.DateFormatter)(locale), [
589
637
  locale
590
638
  ]);
591
- let calendar = $h2qOe$react.useMemo(()=>createCalendar(defaultFormatter.resolvedOptions().calendar)
592
- , [
639
+ let calendar = (0, $h2qOe$react.useMemo)(()=>createCalendar(defaultFormatter.resolvedOptions().calendar), [
593
640
  createCalendar,
594
641
  defaultFormatter
595
642
  ]);
596
- let [value1, setDate] = $h2qOe$reactstatelyutils.useControlledState(props.value, props.defaultValue, props.onChange);
597
- let calendarValue = $h2qOe$react.useMemo(()=>$50d5d6a623389320$export$61a490a80c552550(value1, calendar)
598
- , [
599
- value1,
643
+ let [value, setDate] = (0, $h2qOe$reactstatelyutils.useControlledState)(props.value, props.defaultValue, props.onChange);
644
+ let calendarValue = (0, $h2qOe$react.useMemo)(()=>(0, $50d5d6a623389320$export$61a490a80c552550)(value, calendar), [
645
+ value,
600
646
  calendar
601
647
  ]);
602
648
  // We keep track of the placeholder date separately in state so that onChange is not called
603
649
  // until all segments are set. If the value === null (not undefined), then assume the component
604
650
  // is controlled, so use the placeholder as the value until all segments are entered so it doesn't
605
651
  // change from uncontrolled to controlled and emit a warning.
606
- let [placeholderDate, setPlaceholderDate] = $h2qOe$react.useState(()=>$50d5d6a623389320$export$66aa2b09de4b1ea5(props.placeholderValue, granularity, calendar, defaultTimeZone)
607
- );
652
+ let [placeholderDate, setPlaceholderDate] = (0, $h2qOe$react.useState)(()=>(0, $50d5d6a623389320$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
608
653
  let val = calendarValue || placeholderDate;
609
- let showEra = calendar.identifier === 'gregory' && val.era === 'BC';
610
- var _maxGranularity;
611
- let formatOpts = $h2qOe$react.useMemo(()=>({
654
+ let showEra = calendar.identifier === "gregory" && val.era === "BC";
655
+ var _props_maxGranularity;
656
+ let formatOpts = (0, $h2qOe$react.useMemo)(()=>({
612
657
  granularity: granularity,
613
- maxGranularity: (_maxGranularity = props.maxGranularity) !== null && _maxGranularity !== void 0 ? _maxGranularity : 'year',
658
+ maxGranularity: (_props_maxGranularity = props.maxGranularity) !== null && _props_maxGranularity !== void 0 ? _props_maxGranularity : "year",
614
659
  timeZone: defaultTimeZone,
615
660
  hideTimeZone: hideTimeZone,
616
661
  hourCycle: props.hourCycle,
617
662
  showEra: showEra
618
- })
619
- , [
663
+ }), [
620
664
  props.maxGranularity,
621
665
  granularity,
622
666
  props.hourCycle,
@@ -624,41 +668,30 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
624
668
  hideTimeZone,
625
669
  showEra
626
670
  ]);
627
- let opts = $h2qOe$react.useMemo(()=>$50d5d6a623389320$export$7e319ea407e63bc0({
628
- }, formatOpts)
629
- , [
671
+ let opts = (0, $h2qOe$react.useMemo)(()=>(0, $50d5d6a623389320$export$7e319ea407e63bc0)({}, formatOpts), [
630
672
  formatOpts
631
673
  ]);
632
- let dateFormatter = $h2qOe$react.useMemo(()=>new $h2qOe$internationalizeddate.DateFormatter(locale, opts)
633
- , [
674
+ let dateFormatter = (0, $h2qOe$react.useMemo)(()=>new (0, $h2qOe$internationalizeddate.DateFormatter)(locale, opts), [
634
675
  locale,
635
676
  opts
636
677
  ]);
637
- let resolvedOptions = $h2qOe$react.useMemo(()=>dateFormatter.resolvedOptions()
638
- , [
678
+ let resolvedOptions = (0, $h2qOe$react.useMemo)(()=>dateFormatter.resolvedOptions(), [
639
679
  dateFormatter
640
680
  ]);
641
681
  // Determine how many editable segments there are for validation purposes.
642
682
  // The result is cached for performance.
643
- let allSegments = $h2qOe$react.useMemo(()=>dateFormatter.formatToParts(new Date()).filter((seg)=>$596a1f0f523d6752$var$EDITABLE_SEGMENTS[seg.type]
644
- ).reduce((p, seg)=>(p[seg.type] = true, p)
645
- , {
646
- })
647
- , [
683
+ let allSegments = (0, $h2qOe$react.useMemo)(()=>dateFormatter.formatToParts(new Date()).filter((seg)=>$596a1f0f523d6752$var$EDITABLE_SEGMENTS[seg.type]).reduce((p, seg)=>(p[seg.type] = true, p), {}), [
648
684
  dateFormatter
649
685
  ]);
650
- let [validSegments, setValidSegments] = $h2qOe$react.useState(()=>props.value || props.defaultValue ? {
686
+ let [validSegments, setValidSegments] = (0, $h2qOe$react.useState)(()=>props.value || props.defaultValue ? {
651
687
  ...allSegments
652
- } : {
653
- }
654
- );
688
+ } : {});
655
689
  // Reset placeholder when calendar changes
656
- let lastCalendarIdentifier = $h2qOe$react.useRef(calendar.identifier);
657
- $h2qOe$react.useEffect(()=>{
690
+ let lastCalendarIdentifier = (0, $h2qOe$react.useRef)(calendar.identifier);
691
+ (0, $h2qOe$react.useEffect)(()=>{
658
692
  if (calendar.identifier !== lastCalendarIdentifier.current) {
659
693
  lastCalendarIdentifier.current = calendar.identifier;
660
- setPlaceholderDate((placeholder)=>Object.keys(validSegments).length > 0 ? $h2qOe$internationalizeddate.toCalendar(placeholder, calendar) : $50d5d6a623389320$export$66aa2b09de4b1ea5(props.placeholderValue, granularity, calendar, defaultTimeZone)
661
- );
694
+ setPlaceholderDate((placeholder)=>Object.keys(validSegments).length > 0 ? (0, $h2qOe$internationalizeddate.toCalendar)(placeholder, calendar) : (0, $50d5d6a623389320$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
662
695
  }
663
696
  }, [
664
697
  calendar,
@@ -668,18 +701,17 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
668
701
  props.placeholderValue
669
702
  ]);
670
703
  // If there is a value prop, and some segments were previously placeholders, mark them all as valid.
671
- if (value1 && Object.keys(validSegments).length < Object.keys(allSegments).length) {
704
+ if (value && Object.keys(validSegments).length < Object.keys(allSegments).length) {
672
705
  validSegments = {
673
706
  ...allSegments
674
707
  };
675
708
  setValidSegments(validSegments);
676
709
  }
677
710
  // If the value is set to null and all segments are valid, reset the placeholder.
678
- if (value1 == null && Object.keys(validSegments).length === Object.keys(allSegments).length) {
679
- validSegments = {
680
- };
711
+ if (value == null && Object.keys(validSegments).length === Object.keys(allSegments).length) {
712
+ validSegments = {};
681
713
  setValidSegments(validSegments);
682
- setPlaceholderDate($50d5d6a623389320$export$66aa2b09de4b1ea5(props.placeholderValue, granularity, calendar, defaultTimeZone));
714
+ setPlaceholderDate((0, $50d5d6a623389320$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
683
715
  }
684
716
  // If all segments are valid, use the date from state, otherwise use the placeholder date.
685
717
  let displayValue = calendarValue && Object.keys(validSegments).length >= Object.keys(allSegments).length ? calendarValue : placeholderDate;
@@ -688,20 +720,19 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
688
720
  if (Object.keys(validSegments).length >= Object.keys(allSegments).length) {
689
721
  // The display calendar should not have any effect on the emitted value.
690
722
  // Emit dates in the same calendar as the original value, if any, otherwise gregorian.
691
- newValue = $h2qOe$internationalizeddate.toCalendar(newValue, (v1 === null || v1 === void 0 ? void 0 : v1.calendar) || new $h2qOe$internationalizeddate.GregorianCalendar());
723
+ newValue = (0, $h2qOe$internationalizeddate.toCalendar)(newValue, (v === null || v === void 0 ? void 0 : v.calendar) || new (0, $h2qOe$internationalizeddate.GregorianCalendar)());
692
724
  setDate(newValue);
693
725
  } else setPlaceholderDate(newValue);
694
726
  };
695
- let dateValue = $h2qOe$react.useMemo(()=>displayValue.toDate(timeZone)
696
- , [
727
+ let dateValue = (0, $h2qOe$react.useMemo)(()=>displayValue.toDate(timeZone), [
697
728
  displayValue,
698
729
  timeZone
699
730
  ]);
700
- let segments = $h2qOe$react.useMemo(()=>dateFormatter.formatToParts(dateValue).map((segment)=>{
731
+ let segments = (0, $h2qOe$react.useMemo)(()=>dateFormatter.formatToParts(dateValue).map((segment)=>{
701
732
  let isEditable = $596a1f0f523d6752$var$EDITABLE_SEGMENTS[segment.type];
702
- if (segment.type === 'era' && calendar.getEras().length === 1) isEditable = false;
733
+ if (segment.type === "era" && calendar.getEras().length === 1) isEditable = false;
703
734
  let isPlaceholder = $596a1f0f523d6752$var$EDITABLE_SEGMENTS[segment.type] && !validSegments[segment.type];
704
- let placeholder = $596a1f0f523d6752$var$EDITABLE_SEGMENTS[segment.type] ? $e1e8ada727fae1a1$export$d3f5c5e0a5023fa0(segment.type, segment.value, locale) : null;
735
+ let placeholder = $596a1f0f523d6752$var$EDITABLE_SEGMENTS[segment.type] ? (0, $e1e8ada727fae1a1$export$d3f5c5e0a5023fa0)(segment.type, segment.value, locale) : null;
705
736
  return {
706
737
  type: $596a1f0f523d6752$var$TYPE_MAPPING[segment.type] || segment.type,
707
738
  text: isPlaceholder ? placeholder : segment.value,
@@ -710,8 +741,7 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
710
741
  placeholder: placeholder,
711
742
  isEditable: isEditable
712
743
  };
713
- })
714
- , [
744
+ }), [
715
745
  dateValue,
716
746
  validSegments,
717
747
  dateFormatter,
@@ -735,7 +765,7 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
735
765
  }
736
766
  let markValid = (part)=>{
737
767
  validSegments[part] = true;
738
- if (part === 'year' && allSegments.era) validSegments.era = true;
768
+ if (part === "year" && allSegments.era) validSegments.era = true;
739
769
  setValidSegments({
740
770
  ...validSegments
741
771
  });
@@ -746,8 +776,8 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
746
776
  if (Object.keys(validSegments).length >= Object.keys(allSegments).length) setValue(displayValue);
747
777
  } else setValue($596a1f0f523d6752$var$addSegment(displayValue, type, amount, resolvedOptions));
748
778
  };
749
- let validationState = props.validationState || ($50d5d6a623389320$export$eac50920cf2fd59a(calendarValue, props.minValue, props.maxValue) ? 'invalid' : null);
750
- var _maxGranularity1;
779
+ let validationState = props.validationState || ((0, $50d5d6a623389320$export$eac50920cf2fd59a)(calendarValue, props.minValue, props.maxValue) ? "invalid" : null);
780
+ var _props_maxGranularity1;
751
781
  return {
752
782
  value: calendarValue,
753
783
  dateValue: dateValue,
@@ -757,7 +787,7 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
757
787
  dateFormatter: dateFormatter,
758
788
  validationState: validationState,
759
789
  granularity: granularity,
760
- maxGranularity: (_maxGranularity1 = props.maxGranularity) !== null && _maxGranularity1 !== void 0 ? _maxGranularity1 : 'year',
790
+ maxGranularity: (_props_maxGranularity1 = props.maxGranularity) !== null && _props_maxGranularity1 !== void 0 ? _props_maxGranularity1 : "year",
761
791
  isDisabled: isDisabled,
762
792
  isReadOnly: isReadOnly,
763
793
  isRequired: isRequired,
@@ -795,10 +825,10 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
795
825
  setValidSegments({
796
826
  ...validSegments
797
827
  });
798
- let placeholder = $50d5d6a623389320$export$66aa2b09de4b1ea5(props.placeholderValue, granularity, calendar, defaultTimeZone);
828
+ let placeholder = (0, $50d5d6a623389320$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone);
799
829
  let value = displayValue;
800
830
  // Reset day period to default without changing the hour.
801
- if (part === 'dayPeriod' && 'hour' in displayValue && 'hour' in placeholder) {
831
+ if (part === "dayPeriod" && "hour" in displayValue && "hour" in placeholder) {
802
832
  let isPM = displayValue.hour >= 12;
803
833
  let shouldBePM = placeholder.hour >= 12;
804
834
  if (isPM && !shouldBePM) value = displayValue.set({
@@ -814,16 +844,16 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
814
844
  setValue(value);
815
845
  },
816
846
  formatValue (fieldOptions) {
817
- if (!calendarValue) return '';
818
- let formatOptions = $50d5d6a623389320$export$7e319ea407e63bc0(fieldOptions, formatOpts);
819
- let formatter = new $h2qOe$internationalizeddate.DateFormatter(locale, formatOptions);
847
+ if (!calendarValue) return "";
848
+ let formatOptions = (0, $50d5d6a623389320$export$7e319ea407e63bc0)(fieldOptions, formatOpts);
849
+ let formatter = new (0, $h2qOe$internationalizeddate.DateFormatter)(locale, formatOptions);
820
850
  return formatter.format(dateValue);
821
851
  }
822
852
  };
823
853
  }
824
854
  function $596a1f0f523d6752$var$getSegmentLimits(date, type, options) {
825
855
  switch(type){
826
- case 'era':
856
+ case "era":
827
857
  {
828
858
  let eras = date.calendar.getEras();
829
859
  return {
@@ -832,33 +862,33 @@ function $596a1f0f523d6752$var$getSegmentLimits(date, type, options) {
832
862
  maxValue: eras.length - 1
833
863
  };
834
864
  }
835
- case 'year':
865
+ case "year":
836
866
  return {
837
867
  value: date.year,
838
868
  minValue: 1,
839
869
  maxValue: date.calendar.getYearsInEra(date)
840
870
  };
841
- case 'month':
871
+ case "month":
842
872
  return {
843
873
  value: date.month,
844
- minValue: $h2qOe$internationalizeddate.getMinimumMonthInYear(date),
874
+ minValue: (0, $h2qOe$internationalizeddate.getMinimumMonthInYear)(date),
845
875
  maxValue: date.calendar.getMonthsInYear(date)
846
876
  };
847
- case 'day':
877
+ case "day":
848
878
  return {
849
879
  value: date.day,
850
- minValue: $h2qOe$internationalizeddate.getMinimumDayInMonth(date),
880
+ minValue: (0, $h2qOe$internationalizeddate.getMinimumDayInMonth)(date),
851
881
  maxValue: date.calendar.getDaysInMonth(date)
852
882
  };
853
883
  }
854
- if ('hour' in date) switch(type){
855
- case 'dayPeriod':
884
+ if ("hour" in date) switch(type){
885
+ case "dayPeriod":
856
886
  return {
857
887
  value: date.hour >= 12 ? 12 : 0,
858
888
  minValue: 0,
859
889
  maxValue: 12
860
890
  };
861
- case 'hour':
891
+ case "hour":
862
892
  if (options.hour12) {
863
893
  let isPM = date.hour >= 12;
864
894
  return {
@@ -872,34 +902,33 @@ function $596a1f0f523d6752$var$getSegmentLimits(date, type, options) {
872
902
  minValue: 0,
873
903
  maxValue: 23
874
904
  };
875
- case 'minute':
905
+ case "minute":
876
906
  return {
877
907
  value: date.minute,
878
908
  minValue: 0,
879
909
  maxValue: 59
880
910
  };
881
- case 'second':
911
+ case "second":
882
912
  return {
883
913
  value: date.second,
884
914
  minValue: 0,
885
915
  maxValue: 59
886
916
  };
887
917
  }
888
- return {
889
- };
918
+ return {};
890
919
  }
891
920
  function $596a1f0f523d6752$var$addSegment(value, part, amount, options) {
892
921
  switch(part){
893
- case 'era':
894
- case 'year':
895
- case 'month':
896
- case 'day':
922
+ case "era":
923
+ case "year":
924
+ case "month":
925
+ case "day":
897
926
  return value.cycle(part, amount, {
898
- round: part === 'year'
927
+ round: part === "year"
899
928
  });
900
929
  }
901
- if ('hour' in value) switch(part){
902
- case 'dayPeriod':
930
+ if ("hour" in value) switch(part){
931
+ case "dayPeriod":
903
932
  {
904
933
  let hours = value.hour;
905
934
  let isPM = hours >= 12;
@@ -907,27 +936,27 @@ function $596a1f0f523d6752$var$addSegment(value, part, amount, options) {
907
936
  hour: isPM ? hours - 12 : hours + 12
908
937
  });
909
938
  }
910
- case 'hour':
911
- case 'minute':
912
- case 'second':
939
+ case "hour":
940
+ case "minute":
941
+ case "second":
913
942
  return value.cycle(part, amount, {
914
- round: part !== 'hour',
943
+ round: part !== "hour",
915
944
  hourCycle: options.hour12 ? 12 : 24
916
945
  });
917
946
  }
918
947
  }
919
948
  function $596a1f0f523d6752$var$setSegment(value, part, segmentValue, options) {
920
949
  switch(part){
921
- case 'day':
922
- case 'month':
923
- case 'year':
924
- case 'era':
950
+ case "day":
951
+ case "month":
952
+ case "year":
953
+ case "era":
925
954
  return value.set({
926
955
  [part]: segmentValue
927
956
  });
928
957
  }
929
- if ('hour' in value) switch(part){
930
- case 'dayPeriod':
958
+ if ("hour" in value) switch(part){
959
+ case "dayPeriod":
931
960
  {
932
961
  let hours = value.hour;
933
962
  let wasPM = hours >= 12;
@@ -937,17 +966,17 @@ function $596a1f0f523d6752$var$setSegment(value, part, segmentValue, options) {
937
966
  hour: wasPM ? hours - 12 : hours + 12
938
967
  });
939
968
  }
940
- case 'hour':
969
+ case "hour":
941
970
  // In 12 hour time, ensure that AM/PM does not change
942
971
  if (options.hour12) {
943
- let hours = value.hour;
944
- let wasPM = hours >= 12;
945
- if (!wasPM && segmentValue === 12) segmentValue = 0;
946
- if (wasPM && segmentValue < 12) segmentValue += 12;
972
+ let hours1 = value.hour;
973
+ let wasPM1 = hours1 >= 12;
974
+ if (!wasPM1 && segmentValue === 12) segmentValue = 0;
975
+ if (wasPM1 && segmentValue < 12) segmentValue += 12;
947
976
  }
948
977
  // fallthrough
949
- case 'minute':
950
- case 'second':
978
+ case "minute":
979
+ case "second":
951
980
  return value.set({
952
981
  [part]: segmentValue
953
982
  });
@@ -955,20 +984,29 @@ function $596a1f0f523d6752$var$setSegment(value, part, segmentValue, options) {
955
984
  }
956
985
 
957
986
 
958
-
987
+ /*
988
+ * Copyright 2020 Adobe. All rights reserved.
989
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
990
+ * you may not use this file except in compliance with the License. You may obtain a copy
991
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
992
+ *
993
+ * Unless required by applicable law or agreed to in writing, software distributed under
994
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
995
+ * OF ANY KIND, either express or implied. See the License for the specific language
996
+ * governing permissions and limitations under the License.
997
+ */
959
998
 
960
999
 
961
1000
 
962
1001
 
963
1002
  function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
964
- var ref, ref1;
965
- let overlayState = $h2qOe$reactstatelyoverlays.useOverlayTriggerState(props);
966
- let [controlledValue, setControlledValue] = $h2qOe$reactstatelyutils.useControlledState(props.value, props.defaultValue || null, props.onChange);
967
- let [placeholderValue, setPlaceholderValue] = $h2qOe$react.useState(()=>controlledValue || {
1003
+ var _props_isDateUnavailable, _props_isDateUnavailable1;
1004
+ let overlayState = (0, $h2qOe$reactstatelyoverlays.useOverlayTriggerState)(props);
1005
+ let [controlledValue, setControlledValue] = (0, $h2qOe$reactstatelyutils.useControlledState)(props.value, props.defaultValue || null, props.onChange);
1006
+ let [placeholderValue, setPlaceholderValue] = (0, $h2qOe$react.useState)(()=>controlledValue || {
968
1007
  start: null,
969
1008
  end: null
970
- }
971
- );
1009
+ });
972
1010
  // Reset the placeholder if the value prop is set to null.
973
1011
  if (controlledValue == null && placeholderValue.start && placeholderValue.end) {
974
1012
  placeholderValue = {
@@ -977,36 +1015,36 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
977
1015
  };
978
1016
  setPlaceholderValue(placeholderValue);
979
1017
  }
980
- let value1 = controlledValue || placeholderValue;
1018
+ let value = controlledValue || placeholderValue;
981
1019
  let setValue = (value)=>{
982
1020
  setPlaceholderValue(value);
983
1021
  if ((value === null || value === void 0 ? void 0 : value.start) && value.end) setControlledValue(value);
984
1022
  else setControlledValue(null);
985
1023
  };
986
- let v = (value1 === null || value1 === void 0 ? void 0 : value1.start) || (value1 === null || value1 === void 0 ? void 0 : value1.end) || props.placeholderValue;
987
- let [granularity] = $50d5d6a623389320$export$2440da353cedad43(v, props.granularity);
988
- let hasTime = granularity === 'hour' || granularity === 'minute' || granularity === 'second';
989
- var _shouldCloseOnSelect;
990
- let shouldCloseOnSelect = (_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _shouldCloseOnSelect !== void 0 ? _shouldCloseOnSelect : true;
991
- let [dateRange1, setSelectedDateRange] = $h2qOe$react.useState(null);
992
- let [timeRange1, setSelectedTimeRange] = $h2qOe$react.useState(null);
993
- if (value1 && value1.start && value1.end) {
994
- dateRange1 = value1;
995
- if ('hour' in value1.start) timeRange1 = value1;
1024
+ let v = (value === null || value === void 0 ? void 0 : value.start) || (value === null || value === void 0 ? void 0 : value.end) || props.placeholderValue;
1025
+ let [granularity] = (0, $50d5d6a623389320$export$2440da353cedad43)(v, props.granularity);
1026
+ let hasTime = granularity === "hour" || granularity === "minute" || granularity === "second";
1027
+ var _props_shouldCloseOnSelect;
1028
+ let shouldCloseOnSelect = (_props_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _props_shouldCloseOnSelect !== void 0 ? _props_shouldCloseOnSelect : true;
1029
+ let [dateRange, setSelectedDateRange] = (0, $h2qOe$react.useState)(null);
1030
+ let [timeRange, setSelectedTimeRange] = (0, $h2qOe$react.useState)(null);
1031
+ if (value && value.start && value.end) {
1032
+ dateRange = value;
1033
+ if ("hour" in value.start) timeRange = value;
996
1034
  }
997
1035
  let commitValue = (dateRange, timeRange)=>{
998
1036
  setValue({
999
- start: 'timeZone' in timeRange.start ? timeRange.start.set($h2qOe$internationalizeddate.toCalendarDate(dateRange.start)) : $h2qOe$internationalizeddate.toCalendarDateTime(dateRange.start, timeRange.start),
1000
- end: 'timeZone' in timeRange.end ? timeRange.end.set($h2qOe$internationalizeddate.toCalendarDate(dateRange.end)) : $h2qOe$internationalizeddate.toCalendarDateTime(dateRange.end, timeRange.end)
1037
+ start: "timeZone" in timeRange.start ? timeRange.start.set((0, $h2qOe$internationalizeddate.toCalendarDate)(dateRange.start)) : (0, $h2qOe$internationalizeddate.toCalendarDateTime)(dateRange.start, timeRange.start),
1038
+ end: "timeZone" in timeRange.end ? timeRange.end.set((0, $h2qOe$internationalizeddate.toCalendarDate)(dateRange.end)) : (0, $h2qOe$internationalizeddate.toCalendarDateTime)(dateRange.end, timeRange.end)
1001
1039
  });
1002
1040
  };
1003
1041
  // Intercept setValue to make sure the Time section is not changed by date selection in Calendar
1004
1042
  let setDateRange = (range)=>{
1005
- let shouldClose = typeof shouldCloseOnSelect === 'function' ? shouldCloseOnSelect() : shouldCloseOnSelect;
1043
+ let shouldClose = typeof shouldCloseOnSelect === "function" ? shouldCloseOnSelect() : shouldCloseOnSelect;
1006
1044
  if (hasTime) {
1007
- if (shouldClose || range.start && range.end && (timeRange1 === null || timeRange1 === void 0 ? void 0 : timeRange1.start) && (timeRange1 === null || timeRange1 === void 0 ? void 0 : timeRange1.end)) commitValue(range, {
1008
- start: (timeRange1 === null || timeRange1 === void 0 ? void 0 : timeRange1.start) || $50d5d6a623389320$export$c5221a78ef73c5e9(props.placeholderValue),
1009
- end: (timeRange1 === null || timeRange1 === void 0 ? void 0 : timeRange1.end) || $50d5d6a623389320$export$c5221a78ef73c5e9(props.placeholderValue)
1045
+ if (shouldClose || range.start && range.end && (timeRange === null || timeRange === void 0 ? void 0 : timeRange.start) && (timeRange === null || timeRange === void 0 ? void 0 : timeRange.end)) commitValue(range, {
1046
+ start: (timeRange === null || timeRange === void 0 ? void 0 : timeRange.start) || (0, $50d5d6a623389320$export$c5221a78ef73c5e9)(props.placeholderValue),
1047
+ end: (timeRange === null || timeRange === void 0 ? void 0 : timeRange.end) || (0, $50d5d6a623389320$export$c5221a78ef73c5e9)(props.placeholderValue)
1010
1048
  });
1011
1049
  else setSelectedDateRange(range);
1012
1050
  } else if (range.start && range.end) setValue(range);
@@ -1014,32 +1052,32 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
1014
1052
  if (shouldClose) overlayState.setOpen(false);
1015
1053
  };
1016
1054
  let setTimeRange = (range)=>{
1017
- if ((dateRange1 === null || dateRange1 === void 0 ? void 0 : dateRange1.start) && (dateRange1 === null || dateRange1 === void 0 ? void 0 : dateRange1.end) && range.start && range.end) commitValue(dateRange1, range);
1055
+ if ((dateRange === null || dateRange === void 0 ? void 0 : dateRange.start) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange.end) && range.start && range.end) commitValue(dateRange, range);
1018
1056
  else setSelectedTimeRange(range);
1019
1057
  };
1020
- let validationState = props.validationState || (value1 != null && ($50d5d6a623389320$export$eac50920cf2fd59a(value1.start, props.minValue, props.maxValue) || $50d5d6a623389320$export$eac50920cf2fd59a(value1.end, props.minValue, props.maxValue) || value1.end != null && value1.start != null && value1.end.compare(value1.start) < 0 || (value1 === null || value1 === void 0 ? void 0 : value1.start) && ((ref = props.isDateUnavailable) === null || ref === void 0 ? void 0 : ref.call(props, value1.start)) || (value1 === null || value1 === void 0 ? void 0 : value1.end) && ((ref1 = props.isDateUnavailable) === null || ref1 === void 0 ? void 0 : ref1.call(props, value1.end))) ? 'invalid' : null);
1058
+ let validationState = props.validationState || (value != null && ((0, $50d5d6a623389320$export$eac50920cf2fd59a)(value.start, props.minValue, props.maxValue) || (0, $50d5d6a623389320$export$eac50920cf2fd59a)(value.end, props.minValue, props.maxValue) || value.end != null && value.start != null && value.end.compare(value.start) < 0 || (value === null || value === void 0 ? void 0 : value.start) && ((_props_isDateUnavailable = props.isDateUnavailable) === null || _props_isDateUnavailable === void 0 ? void 0 : _props_isDateUnavailable.call(props, value.start)) || (value === null || value === void 0 ? void 0 : value.end) && ((_props_isDateUnavailable1 = props.isDateUnavailable) === null || _props_isDateUnavailable1 === void 0 ? void 0 : _props_isDateUnavailable1.call(props, value.end))) ? "invalid" : null);
1021
1059
  return {
1022
- value: value1,
1060
+ value: value,
1023
1061
  setValue: setValue,
1024
- dateRange: dateRange1,
1025
- timeRange: timeRange1,
1062
+ dateRange: dateRange,
1063
+ timeRange: timeRange,
1026
1064
  granularity: granularity,
1027
1065
  hasTime: hasTime,
1028
1066
  setDate (part, date) {
1029
1067
  setDateRange({
1030
- ...dateRange1,
1068
+ ...dateRange,
1031
1069
  [part]: date
1032
1070
  });
1033
1071
  },
1034
1072
  setTime (part, time) {
1035
1073
  setTimeRange({
1036
- ...timeRange1,
1074
+ ...timeRange,
1037
1075
  [part]: time
1038
1076
  });
1039
1077
  },
1040
1078
  setDateTime (part, dateTime) {
1041
1079
  setValue({
1042
- ...value1,
1080
+ ...value,
1043
1081
  [part]: dateTime
1044
1082
  });
1045
1083
  },
@@ -1050,31 +1088,31 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
1050
1088
  // Commit the selected date range when the calendar is closed. Use a placeholder time if one wasn't set.
1051
1089
  // If only the time range was set and not the date range, don't commit. The state will be preserved until
1052
1090
  // the user opens the popover again.
1053
- if (!isOpen && !((value1 === null || value1 === void 0 ? void 0 : value1.start) && (value1 === null || value1 === void 0 ? void 0 : value1.end)) && (dateRange1 === null || dateRange1 === void 0 ? void 0 : dateRange1.start) && (dateRange1 === null || dateRange1 === void 0 ? void 0 : dateRange1.end) && hasTime) commitValue(dateRange1, {
1054
- start: (timeRange1 === null || timeRange1 === void 0 ? void 0 : timeRange1.start) || $50d5d6a623389320$export$c5221a78ef73c5e9(props.placeholderValue),
1055
- end: (timeRange1 === null || timeRange1 === void 0 ? void 0 : timeRange1.end) || $50d5d6a623389320$export$c5221a78ef73c5e9(props.placeholderValue)
1091
+ if (!isOpen && !((value === null || value === void 0 ? void 0 : value.start) && (value === null || value === void 0 ? void 0 : value.end)) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange.start) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange.end) && hasTime) commitValue(dateRange, {
1092
+ start: (timeRange === null || timeRange === void 0 ? void 0 : timeRange.start) || (0, $50d5d6a623389320$export$c5221a78ef73c5e9)(props.placeholderValue),
1093
+ end: (timeRange === null || timeRange === void 0 ? void 0 : timeRange.end) || (0, $50d5d6a623389320$export$c5221a78ef73c5e9)(props.placeholderValue)
1056
1094
  });
1057
1095
  overlayState.setOpen(isOpen);
1058
1096
  },
1059
1097
  validationState: validationState,
1060
1098
  formatValue (locale, fieldOptions) {
1061
- if (!value1 || !value1.start || !value1.end) return null;
1062
- let startTimeZone = 'timeZone' in value1.start ? value1.start.timeZone : undefined;
1063
- let startGranularity = props.granularity || (value1.start && 'minute' in value1.start ? 'minute' : 'day');
1064
- let endTimeZone = 'timeZone' in value1.end ? value1.end.timeZone : undefined;
1065
- let endGranularity = props.granularity || (value1.end && 'minute' in value1.end ? 'minute' : 'day');
1066
- let startOptions = $50d5d6a623389320$export$7e319ea407e63bc0(fieldOptions, {
1099
+ if (!value || !value.start || !value.end) return null;
1100
+ let startTimeZone = "timeZone" in value.start ? value.start.timeZone : undefined;
1101
+ let startGranularity = props.granularity || (value.start && "minute" in value.start ? "minute" : "day");
1102
+ let endTimeZone = "timeZone" in value.end ? value.end.timeZone : undefined;
1103
+ let endGranularity = props.granularity || (value.end && "minute" in value.end ? "minute" : "day");
1104
+ let startOptions = (0, $50d5d6a623389320$export$7e319ea407e63bc0)(fieldOptions, {
1067
1105
  granularity: startGranularity,
1068
1106
  timeZone: startTimeZone,
1069
1107
  hideTimeZone: props.hideTimeZone,
1070
1108
  hourCycle: props.hourCycle,
1071
- showEra: value1.start.calendar.identifier === 'gregory' && value1.start.era === 'BC' || value1.end.calendar.identifier === 'gregory' && value1.end.era === 'BC'
1109
+ showEra: value.start.calendar.identifier === "gregory" && value.start.era === "BC" || value.end.calendar.identifier === "gregory" && value.end.era === "BC"
1072
1110
  });
1073
- let startDate = value1.start.toDate(startTimeZone || 'UTC');
1074
- let endDate = value1.end.toDate(endTimeZone || 'UTC');
1075
- let startFormatter = new $h2qOe$internationalizeddate.DateFormatter(locale, startOptions);
1111
+ let startDate = value.start.toDate(startTimeZone || "UTC");
1112
+ let endDate = value.end.toDate(endTimeZone || "UTC");
1113
+ let startFormatter = new (0, $h2qOe$internationalizeddate.DateFormatter)(locale, startOptions);
1076
1114
  let endFormatter;
1077
- if (startTimeZone === endTimeZone && startGranularity === endGranularity && value1.start.compare(value1.end) !== 0) {
1115
+ if (startTimeZone === endTimeZone && startGranularity === endGranularity && value.start.compare(value.end) !== 0) {
1078
1116
  // Use formatRange, as it results in shorter output when some of the fields
1079
1117
  // are shared between the start and end dates (e.g. the same month).
1080
1118
  // Formatting will fail if the end date is before the start date. Fall back below when that happens.
@@ -1085,12 +1123,12 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
1085
1123
  let separatorIndex = -1;
1086
1124
  for(let i = 0; i < parts.length; i++){
1087
1125
  let part = parts[i];
1088
- if (part.source === 'shared' && part.type === 'literal') separatorIndex = i;
1089
- else if (part.source === 'endRange') break;
1126
+ if (part.source === "shared" && part.type === "literal") separatorIndex = i;
1127
+ else if (part.source === "endRange") break;
1090
1128
  }
1091
1129
  // Now we can combine the parts into start and end strings.
1092
- let start = '';
1093
- let end = '';
1130
+ let start = "";
1131
+ let end = "";
1094
1132
  for(let i1 = 0; i1 < parts.length; i1++){
1095
1133
  if (i1 < separatorIndex) start += parts[i1].value;
1096
1134
  else if (i1 > separatorIndex) end += parts[i1].value;
@@ -1104,13 +1142,13 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
1104
1142
  }
1105
1143
  endFormatter = startFormatter;
1106
1144
  } else {
1107
- let endOptions = $50d5d6a623389320$export$7e319ea407e63bc0(fieldOptions, {
1145
+ let endOptions = (0, $50d5d6a623389320$export$7e319ea407e63bc0)(fieldOptions, {
1108
1146
  granularity: endGranularity,
1109
1147
  timeZone: endTimeZone,
1110
1148
  hideTimeZone: props.hideTimeZone,
1111
1149
  hourCycle: props.hourCycle
1112
1150
  });
1113
- endFormatter = new $h2qOe$internationalizeddate.DateFormatter(locale, endOptions);
1151
+ endFormatter = new (0, $h2qOe$internationalizeddate.DateFormatter)(locale, endOptions);
1114
1152
  }
1115
1153
  return {
1116
1154
  start: startFormatter.format(startDate),
@@ -1121,54 +1159,60 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
1121
1159
  }
1122
1160
 
1123
1161
 
1124
-
1162
+ /*
1163
+ * Copyright 2020 Adobe. All rights reserved.
1164
+ * This file is licensed to you under the Apache License, Version 2.0 (the 'License');
1165
+ * you may not use this file except in compliance with the License. You may obtain a copy
1166
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1167
+ *
1168
+ * Unless required by applicable law or agreed to in writing, software distributed under
1169
+ * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1170
+ * OF ANY KIND, either express or implied. See the License for the specific language
1171
+ * governing permissions and limitations under the License.
1172
+ */
1125
1173
 
1126
1174
 
1127
1175
 
1128
1176
  function $2654e87be0231a69$export$fd53cef0cc796101(props) {
1129
- let { placeholderValue: placeholderValue = new $h2qOe$internationalizeddate.Time() , minValue: minValue , maxValue: maxValue , granularity: granularity } = props;
1130
- let [value, setValue] = $h2qOe$reactstatelyutils.useControlledState(props.value, props.defaultValue, props.onChange);
1177
+ let { placeholderValue: placeholderValue = new (0, $h2qOe$internationalizeddate.Time)() , minValue: minValue , maxValue: maxValue , granularity: granularity } = props;
1178
+ let [value, setValue] = (0, $h2qOe$reactstatelyutils.useControlledState)(props.value, props.defaultValue, props.onChange);
1131
1179
  let v = value || placeholderValue;
1132
- let day = v && 'day' in v ? v : undefined;
1133
- let placeholderDate = $h2qOe$react.useMemo(()=>$2654e87be0231a69$var$convertValue(placeholderValue)
1134
- , [
1180
+ let day = v && "day" in v ? v : undefined;
1181
+ let placeholderDate = (0, $h2qOe$react.useMemo)(()=>$2654e87be0231a69$var$convertValue(placeholderValue), [
1135
1182
  placeholderValue
1136
1183
  ]);
1137
- let minDate = $h2qOe$react.useMemo(()=>$2654e87be0231a69$var$convertValue(minValue, day)
1138
- , [
1184
+ let minDate = (0, $h2qOe$react.useMemo)(()=>$2654e87be0231a69$var$convertValue(minValue, day), [
1139
1185
  minValue,
1140
1186
  day
1141
1187
  ]);
1142
- let maxDate = $h2qOe$react.useMemo(()=>$2654e87be0231a69$var$convertValue(maxValue, day)
1143
- , [
1188
+ let maxDate = (0, $h2qOe$react.useMemo)(()=>$2654e87be0231a69$var$convertValue(maxValue, day), [
1144
1189
  maxValue,
1145
1190
  day
1146
1191
  ]);
1147
- let dateTime = $h2qOe$react.useMemo(()=>value == null ? null : $2654e87be0231a69$var$convertValue(value)
1148
- , [
1192
+ let dateTime = (0, $h2qOe$react.useMemo)(()=>value == null ? null : $2654e87be0231a69$var$convertValue(value), [
1149
1193
  value
1150
1194
  ]);
1151
1195
  let onChange = (newValue)=>{
1152
- setValue(v && 'day' in v ? newValue : newValue && $h2qOe$internationalizeddate.toTime(newValue));
1196
+ setValue(v && "day" in v ? newValue : newValue && (0, $h2qOe$internationalizeddate.toTime)(newValue));
1153
1197
  };
1154
- return $596a1f0f523d6752$export$60e84778edff6d26({
1198
+ return (0, $596a1f0f523d6752$export$60e84778edff6d26)({
1155
1199
  ...props,
1156
1200
  value: dateTime,
1157
1201
  defaultValue: undefined,
1158
1202
  minValue: minDate,
1159
1203
  maxValue: maxDate,
1160
1204
  onChange: onChange,
1161
- granularity: granularity || 'minute',
1162
- maxGranularity: 'hour',
1205
+ granularity: granularity || "minute",
1206
+ maxGranularity: "hour",
1163
1207
  placeholderValue: placeholderDate,
1164
1208
  // Calendar should not matter for time fields.
1165
- createCalendar: ()=>new $h2qOe$internationalizeddate.GregorianCalendar()
1209
+ createCalendar: ()=>new (0, $h2qOe$internationalizeddate.GregorianCalendar)()
1166
1210
  });
1167
1211
  }
1168
- function $2654e87be0231a69$var$convertValue(value, date = $h2qOe$internationalizeddate.today($h2qOe$internationalizeddate.getLocalTimeZone())) {
1212
+ function $2654e87be0231a69$var$convertValue(value, date = (0, $h2qOe$internationalizeddate.today)((0, $h2qOe$internationalizeddate.getLocalTimeZone)())) {
1169
1213
  if (!value) return null;
1170
- if ('day' in value) return value;
1171
- return $h2qOe$internationalizeddate.toCalendarDateTime(date, value);
1214
+ if ("day" in value) return value;
1215
+ return (0, $h2qOe$internationalizeddate.toCalendarDateTime)(date, value);
1172
1216
  }
1173
1217
 
1174
1218