1;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c5bfaef8-9c33-44b1-b0f6-533c855f8a52",e._sentryDebugIdIdentifier="sentry-dbid-c5bfaef8-9c33-44b1-b0f6-533c855f8a52")}catch(e){}}(); 2 3 var _global = 4 typeof window !== 'undefined' ? 5 window : 6 typeof global !== 'undefined' ? 7 global : 8 typeof globalThis !== 'undefined' ? 9 globalThis : 10 typeof self !== 'undefined' ? 11 self : 12 {}; 13 14 _global.SENTRY_RELEASE={id:"bf8ecb3987fc28ef4f4fa70826513d8bf936c9ad"}; 15"use strict"; 16(self["webpackChunk_xapp_oc_studio"] = self["webpackChunk_xapp_oc_studio"] || []).push([["vendors-node_modules_date-fns_milliseconds_cjs-node_modules_date-fns_millisecondsToHours_cjs--091218"],{ 17 18/***/ "../../node_modules/date-fns/milliseconds.cjs" 19/*!****************************************************!*\ 20 !*** ../../node_modules/date-fns/milliseconds.cjs ***! 21 \****************************************************/ 22(__unused_webpack_module, exports, __webpack_require__) { 23 24 25exports.milliseconds = milliseconds; 26var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 27 28/** 29 * @name milliseconds 30 * @category Millisecond Helpers 31 * @summary 32 * Returns the number of milliseconds in the specified, years, months, weeks, days, hours, minutes and seconds. 33 * 34 * @description 35 * Returns the number of milliseconds in the specified, years, months, weeks, days, hours, minutes and seconds. 36 * 37 * One years equals 365.2425 days according to the formula: 38 * 39 * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400. 40 * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days 41 * 42 * One month is a year divided by 12. 43 * 44 * @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be added. 45 * 46 * @returns The milliseconds 47 * 48 * @example 49 * // 1 year in milliseconds 50 * milliseconds({ years: 1 }) 51 * //=> 31556952000 52 * 53 * // 3 months in milliseconds 54 * milliseconds({ months: 3 }) 55 * //=> 7889238000 56 */ 57function milliseconds({ years, months, weeks, days, hours, minutes, seconds }) { 58 let totalDays = 0; 59 60 if (years) totalDays += years * _index.daysInYear; 61 if (months) totalDays += months * (_index.daysInYear / 12); 62 if (weeks) totalDays += weeks * 7; 63 if (days) totalDays += days; 64 65 let totalSeconds = totalDays * 24 * 60 * 60; 66 67 if (hours) totalSeconds += hours * 60 * 60; 68 if (minutes) totalSeconds += minutes * 60; 69 if (seconds) totalSeconds += seconds; 70 71 return Math.trunc(totalSeconds * 1000); 72} 73 74 75/***/ }, 76 77/***/ "../../node_modules/date-fns/millisecondsToHours.cjs" 78/*!***********************************************************!*\ 79 !*** ../../node_modules/date-fns/millisecondsToHours.cjs ***! 80 \***********************************************************/ 81(__unused_webpack_module, exports, __webpack_require__) { 82 83 84exports.millisecondsToHours = millisecondsToHours; 85var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 86 87/** 88 * @name millisecondsToHours 89 * @category Conversion Helpers 90 * @summary Convert milliseconds to hours. 91 * 92 * @description 93 * Convert a number of milliseconds to a full number of hours. 94 * 95 * @param milliseconds - The number of milliseconds to be converted 96 * 97 * @returns The number of milliseconds converted in hours 98 * 99 * @example 100 * // Convert 7200000 milliseconds to hours: 101 * const result = millisecondsToHours(7200000) 102 * //=> 2 103 * 104 * @example 105 * // It uses floor rounding: 106 * const result = millisecondsToHours(7199999) 107 * //=> 1 108 */ 109function millisecondsToHours(milliseconds) { 110 const hours = milliseconds / _index.millisecondsInHour; 111 return Math.trunc(hours); 112} 113 114 115/***/ }, 116 117/***/ "../../node_modules/date-fns/millisecondsToMinutes.cjs" 118/*!*************************************************************!*\ 119 !*** ../../node_modules/date-fns/millisecondsToMinutes.cjs ***! 120 \*************************************************************/ 121(__unused_webpack_module, exports, __webpack_require__) { 122 123 124exports.millisecondsToMinutes = millisecondsToMinutes; 125var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 126 127/** 128 * @name millisecondsToMinutes 129 * @category Conversion Helpers 130 * @summary Convert milliseconds to minutes. 131 * 132 * @description 133 * Convert a number of milliseconds to a full number of minutes. 134 * 135 * @param milliseconds - The number of milliseconds to be converted 136 * 137 * @returns The number of milliseconds converted in minutes 138 * 139 * @example 140 * // Convert 60000 milliseconds to minutes: 141 * const result = millisecondsToMinutes(60000) 142 * //=> 1 143 * 144 * @example 145 * // It uses floor rounding: 146 * const result = millisecondsToMinutes(119999) 147 * //=> 1 148 */ 149function millisecondsToMinutes(milliseconds) { 150 const minutes = milliseconds / _index.millisecondsInMinute; 151 return Math.trunc(minutes); 152} 153 154 155/***/ }, 156 157/***/ "../../node_modules/date-fns/millisecondsToSeconds.cjs" 158/*!*************************************************************!*\ 159 !*** ../../node_modules/date-fns/millisecondsToSeconds.cjs ***! 160 \*************************************************************/ 161(__unused_webpack_module, exports, __webpack_require__) { 162 163 164exports.millisecondsToSeconds = millisecondsToSeconds; 165var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 166 167/** 168 * @name millisecondsToSeconds 169 * @category Conversion Helpers 170 * @summary Convert milliseconds to seconds. 171 * 172 * @description 173 * Convert a number of milliseconds to a full number of seconds. 174 * 175 * @param milliseconds - The number of milliseconds to be converted 176 * 177 * @returns The number of milliseconds converted in seconds 178 * 179 * @example 180 * // Convert 1000 milliseconds to seconds: 181 * const result = millisecondsToSeconds(1000) 182 * //=> 1 183 * 184 * @example 185 * // It uses floor rounding: 186 * const result = millisecondsToSeconds(1999) 187 * //=> 1 188 */ 189function millisecondsToSeconds(milliseconds) { 190 const seconds = milliseconds / _index.millisecondsInSecond; 191 return Math.trunc(seconds); 192} 193 194 195/***/ }, 196 197/***/ "../../node_modules/date-fns/min.cjs" 198/*!*******************************************!*\ 199 !*** ../../node_modules/date-fns/min.cjs ***! 200 \*******************************************/ 201(__unused_webpack_module, exports, __webpack_require__) { 202 203 204exports.min = min; 205var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 206var _index2 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 207 208/** 209 * The {@link min} function options. 210 */ 211 212/** 213 * @name min 214 * @category Common Helpers 215 * @summary Returns the earliest of the given dates. 216 * 217 * @description 218 * Returns the earliest of the given dates. 219 * 220 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 221 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 222 * 223 * @param dates - The dates to compare 224 * 225 * @returns The earliest of the dates 226 * 227 * @example 228 * // Which of these dates is the earliest? 229 * const result = min([ 230 * new Date(1989, 6, 10), 231 * new Date(1987, 1, 11), 232 * new Date(1995, 6, 2), 233 * new Date(1990, 0, 1) 234 * ]) 235 * //=> Wed Feb 11 1987 00:00:00 236 */ 237function min(dates, options) { 238 let result; 239 let context = options?.in; 240
vendor: 16,384 bytes, lines 241-779
241 dates.forEach((date) => { 242 // Use the first date object as the context function 243 if (!context && typeof date === "object") 244 context = _index.constructFrom.bind(null, date); 245 246 const date_ = (0, _index2.toDate)(date, context); 247 if (!result || result > date_ || isNaN(+date_)) result = date_; 248 }); 249 250 return (0, _index.constructFrom)(context, result || NaN); 251} 252 253 254/***/ }, 255 256/***/ "../../node_modules/date-fns/minutesToHours.cjs" 257/*!******************************************************!*\ 258 !*** ../../node_modules/date-fns/minutesToHours.cjs ***! 259 \******************************************************/ 260(__unused_webpack_module, exports, __webpack_require__) { 261 262 263exports.minutesToHours = minutesToHours; 264var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 265 266/** 267 * @name minutesToHours 268 * @category Conversion Helpers 269 * @summary Convert minutes to hours. 270 * 271 * @description 272 * Convert a number of minutes to a full number of hours. 273 * 274 * @param minutes - The number of minutes to be converted 275 * 276 * @returns The number of minutes converted in hours 277 * 278 * @example 279 * // Convert 140 minutes to hours: 280 * const result = minutesToHours(120) 281 * //=> 2 282 * 283 * @example 284 * // It uses floor rounding: 285 * const result = minutesToHours(179) 286 * //=> 2 287 */ 288function minutesToHours(minutes) { 289 const hours = minutes / _index.minutesInHour; 290 return Math.trunc(hours); 291} 292 293 294/***/ }, 295 296/***/ "../../node_modules/date-fns/minutesToMilliseconds.cjs" 297/*!*************************************************************!*\ 298 !*** ../../node_modules/date-fns/minutesToMilliseconds.cjs ***! 299 \*************************************************************/ 300(__unused_webpack_module, exports, __webpack_require__) { 301 302 303exports.minutesToMilliseconds = minutesToMilliseconds; 304var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 305 306/** 307 * @name minutesToMilliseconds 308 * @category Conversion Helpers 309 * @summary Convert minutes to milliseconds. 310 * 311 * @description 312 * Convert a number of minutes to a full number of milliseconds. 313 * 314 * @param minutes - The number of minutes to be converted 315 * 316 * @returns The number of minutes converted in milliseconds 317 * 318 * @example 319 * // Convert 2 minutes to milliseconds 320 * const result = minutesToMilliseconds(2) 321 * //=> 120000 322 */ 323function minutesToMilliseconds(minutes) { 324 return Math.trunc(minutes * _index.millisecondsInMinute); 325} 326 327 328/***/ }, 329 330/***/ "../../node_modules/date-fns/minutesToSeconds.cjs" 331/*!********************************************************!*\ 332 !*** ../../node_modules/date-fns/minutesToSeconds.cjs ***! 333 \********************************************************/ 334(__unused_webpack_module, exports, __webpack_require__) { 335 336 337exports.minutesToSeconds = minutesToSeconds; 338var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 339 340/** 341 * @name minutesToSeconds 342 * @category Conversion Helpers 343 * @summary Convert minutes to seconds. 344 * 345 * @description 346 * Convert a number of minutes to a full number of seconds. 347 * 348 * @param minutes - The number of minutes to be converted 349 * 350 * @returns The number of minutes converted in seconds 351 * 352 * @example 353 * // Convert 2 minutes to seconds 354 * const result = minutesToSeconds(2) 355 * //=> 120 356 */ 357function minutesToSeconds(minutes) { 358 return Math.trunc(minutes * _index.secondsInMinute); 359} 360 361 362/***/ }, 363 364/***/ "../../node_modules/date-fns/monthsToQuarters.cjs" 365/*!********************************************************!*\ 366 !*** ../../node_modules/date-fns/monthsToQuarters.cjs ***! 367 \********************************************************/ 368(__unused_webpack_module, exports, __webpack_require__) { 369 370 371exports.monthsToQuarters = monthsToQuarters; 372var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 373 374/** 375 * @name monthsToQuarters 376 * @category Conversion Helpers 377 * @summary Convert number of months to quarters. 378 * 379 * @description 380 * Convert a number of months to a full number of quarters. 381 * 382 * @param months - The number of months to be converted. 383 * 384 * @returns The number of months converted in quarters 385 * 386 * @example 387 * // Convert 6 months to quarters: 388 * const result = monthsToQuarters(6) 389 * //=> 2 390 * 391 * @example 392 * // It uses floor rounding: 393 * const result = monthsToQuarters(7) 394 * //=> 2 395 */ 396function monthsToQuarters(months) { 397 const quarters = months / _index.monthsInQuarter; 398 return Math.trunc(quarters); 399} 400 401 402/***/ }, 403 404/***/ "../../node_modules/date-fns/monthsToYears.cjs" 405/*!*****************************************************!*\ 406 !*** ../../node_modules/date-fns/monthsToYears.cjs ***! 407 \*****************************************************/ 408(__unused_webpack_module, exports, __webpack_require__) { 409 410 411exports.monthsToYears = monthsToYears; 412var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 413 414/** 415 * @name monthsToYears 416 * @category Conversion Helpers 417 * @summary Convert number of months to years. 418 * 419 * @description 420 * Convert a number of months to a full number of years. 421 * 422 * @param months - The number of months to be converted 423 * 424 * @returns The number of months converted in years 425 * 426 * @example 427 * // Convert 36 months to years: 428 * const result = monthsToYears(36) 429 * //=> 3 430 * 431 * // It uses floor rounding: 432 * const result = monthsToYears(40) 433 * //=> 3 434 */ 435function monthsToYears(months) { 436 const years = months / _index.monthsInYear; 437 return Math.trunc(years); 438} 439 440 441/***/ }, 442 443/***/ "../../node_modules/date-fns/nextDay.cjs" 444/*!***********************************************!*\ 445 !*** ../../node_modules/date-fns/nextDay.cjs ***! 446 \***********************************************/ 447(__unused_webpack_module, exports, __webpack_require__) { 448 449 450exports.nextDay = nextDay; 451var _index = __webpack_require__(/*! ./addDays.cjs */ "../../node_modules/date-fns/addDays.cjs"); 452var _index2 = __webpack_require__(/*! ./getDay.cjs */ "../../node_modules/date-fns/getDay.cjs"); 453 454/** 455 * The {@link nextDay} function options. 456 */ 457 458/** 459 * @name nextDay 460 * @category Weekday Helpers 461 * @summary When is the next day of the week? 0-6 the day of the week, 0 represents Sunday. 462 * 463 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 464 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 465 * 466 * @param date - The date to check 467 * @param day - Day of the week 468 * @param options - An object with options 469 * 470 * @returns The date is the next day of the week 471 * 472 * @example 473 * // When is the next Monday after Mar, 20, 2020? 474 * const result = nextDay(new Date(2020, 2, 20), 1) 475 * //=> Mon Mar 23 2020 00:00:00 476 * 477 * @example 478 * // When is the next Tuesday after Mar, 21, 2020? 479 * const result = nextDay(new Date(2020, 2, 21), 2) 480 * //=> Tue Mar 24 2020 00:00:00 481 */ 482function nextDay(date, day, options) { 483 let delta = day - (0, _index2.getDay)(date, options); 484 if (delta <= 0) delta += 7; 485 486 return (0, _index.addDays)(date, delta, options); 487} 488 489 490/***/ }, 491 492/***/ "../../node_modules/date-fns/nextFriday.cjs" 493/*!**************************************************!*\ 494 !*** ../../node_modules/date-fns/nextFriday.cjs ***! 495 \**************************************************/ 496(__unused_webpack_module, exports, __webpack_require__) { 497 498 499exports.nextFriday = nextFriday; 500var _index = __webpack_require__(/*! ./nextDay.cjs */ "../../node_modules/date-fns/nextDay.cjs"); 501 502/** 503 * The {@link nextFriday} function options. 504 */ 505 506/** 507 * @name nextFriday 508 * @category Weekday Helpers 509 * @summary When is the next Friday? 510 * 511 * @description 512 * When is the next Friday? 513 * 514 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 515 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 516 * 517 * @param date - The date to start counting from 518 * @param options - An object with options 519 * 520 * @returns The next Friday 521 * 522 * @example 523 * // When is the next Friday after Mar, 22, 2020? 524 * const result = nextFriday(new Date(2020, 2, 22)) 525 * //=> Fri Mar 27 2020 00:00:00 526 */ 527function nextFriday(date, options) { 528 return (0, _index.nextDay)(date, 5, options); 529} 530 531 532/***/ }, 533 534/***/ "../../node_modules/date-fns/nextMonday.cjs" 535/*!**************************************************!*\ 536 !*** ../../node_modules/date-fns/nextMonday.cjs ***! 537 \**************************************************/ 538(__unused_webpack_module, exports, __webpack_require__) { 539 540 541exports.nextMonday = nextMonday; 542var _index = __webpack_require__(/*! ./nextDay.cjs */ "../../node_modules/date-fns/nextDay.cjs"); 543 544/** 545 * The {@link nextMonday} function options. 546 */ 547 548/** 549 * @name nextMonday 550 * @category Weekday Helpers 551 * @summary When is the next Monday? 552 * 553 * @description 554 * When is the next Monday? 555 * 556 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 557 * @typeParam ResultDate - The result `Date` type, returned from the context function if passed, or inferred from the arguments. 558 * 559 * @param date - The date to start counting from 560 * @param options - An object with options 561 * 562 * @returns The next Monday 563 * 564 * @example 565 * // When is the next Monday after Mar, 22, 2020? 566 * const result = nextMonday(new Date(2020, 2, 22)) 567 * //=> Mon Mar 23 2020 00:00:00 568 */ 569function nextMonday(date, options) { 570 return (0, _index.nextDay)(date, 1, options); 571} 572 573 574/***/ }, 575 576/***/ "../../node_modules/date-fns/nextSaturday.cjs" 577/*!****************************************************!*\ 578 !*** ../../node_modules/date-fns/nextSaturday.cjs ***! 579 \****************************************************/ 580(__unused_webpack_module, exports, __webpack_require__) { 581 582 583exports.nextSaturday = nextSaturday; 584var _index = __webpack_require__(/*! ./nextDay.cjs */ "../../node_modules/date-fns/nextDay.cjs"); 585 586/** 587 * The {@link nextSaturday} function options. 588 */ 589 590/** 591 * @name nextSaturday 592 * @category Weekday Helpers 593 * @summary When is the next Saturday? 594 * 595 * @description 596 * When is the next Saturday? 597 * 598 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 599 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 600 * 601 * @param date - The date to start counting from 602 * @param options - An object with options 603 * 604 * @returns The next Saturday 605 * 606 * @example 607 * // When is the next Saturday after Mar, 22, 2020? 608 * const result = nextSaturday(new Date(2020, 2, 22)) 609 * //=> Sat Mar 28 2020 00:00:00 610 */ 611function nextSaturday(date, options) { 612 return (0, _index.nextDay)(date, 6, options); 613} 614 615 616/***/ }, 617 618/***/ "../../node_modules/date-fns/nextSunday.cjs" 619/*!**************************************************!*\ 620 !*** ../../node_modules/date-fns/nextSunday.cjs ***! 621 \**************************************************/ 622(__unused_webpack_module, exports, __webpack_require__) { 623 624 625exports.nextSunday = nextSunday; 626var _index = __webpack_require__(/*! ./nextDay.cjs */ "../../node_modules/date-fns/nextDay.cjs"); 627 628/** 629 * The {@link nextSunday} function options. 630 */ 631 632/** 633 * @name nextSunday 634 * @category Weekday Helpers 635 * @summary When is the next Sunday? 636 * 637 * @description 638 * When is the next Sunday? 639 * 640 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 641 * @typeParam ResultDate - The result `Date` type, it is the type returned if a context is provided. 642 * 643 * @param date - The date to start counting from 644 * @param options - An object with options 645 * 646 * @returns The next Sunday 647 * 648 * @example 649 * // When is the next Sunday after March 22, 2020? 650 * const result = nextSunday(new Date(2020, 2, 22)) 651 * //=> Sun Mar 29 2020 00:00:00 652 */ 653function nextSunday(date, options) { 654 return (0, _index.nextDay)(date, 0, options); 655} 656 657 658/***/ }, 659 660/***/ "../../node_modules/date-fns/nextThursday.cjs" 661/*!****************************************************!*\ 662 !*** ../../node_modules/date-fns/nextThursday.cjs ***! 663 \****************************************************/ 664(__unused_webpack_module, exports, __webpack_require__) { 665 666 667exports.nextThursday = nextThursday; 668var _index = __webpack_require__(/*! ./nextDay.cjs */ "../../node_modules/date-fns/nextDay.cjs"); 669 670/** 671 * The {@link nextThursday} function options. 672 */ 673 674/** 675 * @name nextThursday 676 * @category Weekday Helpers 677 * @summary When is the next Thursday? 678 * 679 * @description 680 * When is the next Thursday? 681 * 682 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 683 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 684 * 685 * @param date - The date to start counting from 686 * @param options - An object with options 687 * 688 * @returns The next Thursday 689 * 690 * @example 691 * // When is the next Thursday after Mar, 22, 2020? 692 * const result = nextThursday(new Date(2020, 2, 22)) 693 * //=> Thur Mar 26 2020 00:00:00 694 */ 695function nextThursday(date, options) { 696 return (0, _index.nextDay)(date, 4, options); 697} 698 699 700/***/ }, 701 702/***/ "../../node_modules/date-fns/nextTuesday.cjs" 703/*!***************************************************!*\ 704 !*** ../../node_modules/date-fns/nextTuesday.cjs ***! 705 \***************************************************/ 706(__unused_webpack_module, exports, __webpack_require__) { 707 708 709exports.nextTuesday = nextTuesday; 710var _index = __webpack_require__(/*! ./nextDay.cjs */ "../../node_modules/date-fns/nextDay.cjs"); 711 712/** 713 * The {@link nextTuesday} function options. 714 */ 715 716/** 717 * @name nextTuesday 718 * @category Weekday Helpers 719 * @summary When is the next Tuesday? 720 * 721 * @description 722 * When is the next Tuesday? 723 * 724 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 725 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 726 * 727 * @param date - The date to start counting from 728 * @param options - An object with options 729 * 730 * @returns The next Tuesday 731 * 732 * @example 733 * // When is the next Tuesday after Mar, 22, 2020? 734 * const result = nextTuesday(new Date(2020, 2, 22)) 735 * //=> Tue Mar 24 2020 00:00:00 736 */ 737function nextTuesday(date, options) { 738 return (0, _index.nextDay)(date, 2, options); 739} 740 741 742/***/ }, 743 744/***/ "../../node_modules/date-fns/nextWednesday.cjs" 745/*!*****************************************************!*\ 746 !*** ../../node_modules/date-fns/nextWednesday.cjs ***! 747 \*****************************************************/ 748(__unused_webpack_module, exports, __webpack_require__) { 749 750 751exports.nextWednesday = nextWednesday; 752var _index = __webpack_require__(/*! ./nextDay.cjs */ "../../node_modules/date-fns/nextDay.cjs"); 753 754/** 755 * The {@link nextWednesday} function options. 756 */ 757 758/** 759 * @name nextWednesday 760 * @category Weekday Helpers 761 * @summary When is the next Wednesday? 762 * 763 * @description 764 * When is the next Wednesday? 765 * 766 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 767 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 768 * 769 * @param date - The date to start counting from 770 * @param options - An object with options 771 * 772 * @returns The next Wednesday 773 * 774 * @example 775 * // When is the next Wednesday after Mar, 22, 2020? 776 * const result = nextWednesday(new Date(2020, 2, 22)) 777 * //=> Wed Mar 25 2020 00:00:00 778 */ 779function nextWed
779nesday(date, options) { 780 return (0, _index.nextDay)(date, 3, options); 781} 782 783 784/***/ }, 785 786/***/ "../../node_modules/date-fns/parse.cjs" 787/*!*********************************************!*\ 788 !*** ../../node_modules/date-fns/parse.cjs ***! 789 \*********************************************/ 790(__unused_webpack_module, exports, __webpack_require__) { 791 792 793Object.defineProperty(exports, "longFormatters", ({ 794 enumerable: true, 795 get: function () { 796 return _index2.longFormatters; 797 }, 798})); 799exports.parse = parse; 800Object.defineProperty(exports, "parsers", ({ 801 enumerable: true, 802 get: function () { 803 return _index7.parsers; 804 }, 805})); 806var _index = __webpack_require__(/*! ./_lib/defaultLocale.cjs */ "../../node_modules/date-fns/_lib/defaultLocale.cjs"); 807var _index2 = __webpack_require__(/*! ./_lib/format/longFormatters.cjs */ "../../node_modules/date-fns/_lib/format/longFormatters.cjs"); 808var _index3 = __webpack_require__(/*! ./_lib/protectedTokens.cjs */ "../../node_modules/date-fns/_lib/protectedTokens.cjs"); 809 810var _index4 = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 811var _index5 = __webpack_require__(/*! ./getDefaultOptions.cjs */ "../../node_modules/date-fns/getDefaultOptions.cjs"); 812var _index6 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 813 814var _Setter = __webpack_require__(/*! ./parse/_lib/Setter.cjs */ "../../node_modules/date-fns/parse/_lib/Setter.cjs"); 815var _index7 = __webpack_require__(/*! ./parse/_lib/parsers.cjs */ "../../node_modules/date-fns/parse/_lib/parsers.cjs"); 816 817// Rexports of internal for libraries to use. 818// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874
vendor: 19,971 bytes, lines 818-1084
818 819 820/** 821 * The {@link parse} function options. 822 */ 823 824// This RegExp consists of three parts separated by `|`: 825// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token 826// (one of the certain letters followed by `o`) 827// - (\w)\1* matches any sequences of the same letter 828// - '' matches two quote characters in a row 829// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('), 830// except a single quote symbol, which ends the sequence. 831// Two quote characters do not end the sequence. 832// If there is no matching single quote 833// then the sequence will continue until the end of the string. 834// - . matches any single character unmatched by previous parts of the RegExps 835const formattingTokensRegExp = 836 /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; 837 838// This RegExp catches symbols escaped by quotes, and also 839// sequences of symbols P, p, and the combinations like `PPPPPPPppppp` 840const longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g; 841 842const escapedStringRegExp = /^'([^]*?)'?$/; 843const doubleQuoteRegExp = /''/g; 844 845const notWhitespaceRegExp = /\S/; 846const unescapedLatinCharacterRegExp = /[a-zA-Z]/; 847 848/** 849 * @name parse 850 * @category Common Helpers 851 * @summary Parse the date. 852 * 853 * @description 854 * Return the date parsed from string using the given format string. 855 * 856 * > â ï¸ Please note that the `format` tokens differ from Moment.js and other libraries. 857 * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 858 * 859 * The characters in the format string wrapped between two single quotes characters (') are escaped. 860 * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. 861 * 862 * Format of the format string is based on Unicode Technical Standard #35: 863 * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table 864 * with a few additions (see note 5 below the table). 865 * 866 * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited 867 * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception: 868 * 869 * ```javascript 870 * parse('23 AM', 'HH a', new Date()) 871 * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time 872 * ``` 873 * 874 * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true 875 * 876 * Accepted format string patterns: 877 * | Unit |Prior| Pattern | Result examples | Notes | 878 * |---------------------------------|-----|---------|-----------------------------------|-------| 879 * | Era | 140 | G..GGG | AD, BC | | 880 * | | | GGGG | Anno Domini, Before Christ | 2 | 881 * | | | GGGGG | A, B | | 882 * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 | 883 * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 | 884 * | | | yy | 44, 01, 00, 17 | 4 | 885 * | | | yyy | 044, 001, 123, 999 | 4 | 886 * | | | yyyy | 0044, 0001, 1900, 2017 | 4 | 887 * | | | yyyyy | ... | 2,4 | 888 * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 | 889 * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 | 890 * | | | YY | 44, 01, 00, 17 | 4,6 | 891 * | | | YYY | 044, 001, 123, 999 | 4 | 892 * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 | 893 * | | | YYYYY | ... | 2,4 | 894 * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 | 895 * | | | RR | -43, 01, 00, 17 | 4,5 | 896 * | | | RRR | -043, 001, 123, 999, -999 | 4,5 | 897 * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 | 898 * | | | RRRRR | ... | 2,4,5 | 899 * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 | 900 * | | | uu | -43, 01, 99, -99 | 4 | 901 * | | | uuu | -043, 001, 123, 999, -999 | 4 | 902 * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 | 903 * | | | uuuuu | ... | 2,4 | 904 * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | | 905 * | | | Qo | 1st, 2nd, 3rd, 4th | 5 | 906 * | | | QQ | 01, 02, 03, 04 | | 907 * | | | QQQ | Q1, Q2, Q3, Q4 | | 908 * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 | 909 * | | | QQQQQ | 1, 2, 3, 4 | 4 | 910 * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | | 911 * | | | qo | 1st, 2nd, 3rd, 4th | 5 | 912 * | | | qq | 01, 02, 03, 04 | | 913 * | | | qqq | Q1, Q2, Q3, Q4 | | 914 * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 | 915 * | | | qqqqq | 1, 2, 3, 4 | 3 | 916 * | Month (formatting) | 110 | M | 1, 2, ..., 12 | | 917 * | | | Mo | 1st, 2nd, ..., 12th | 5 | 918 * | | | MM | 01, 02, ..., 12 | | 919 * | | | MMM | Jan, Feb, ..., Dec | | 920 * | | | MMMM | January, February, ..., December | 2 | 921 * | | | MMMMM | J, F, ..., D | | 922 * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | | 923 * | | | Lo | 1st, 2nd, ..., 12th | 5 | 924 * | | | LL | 01, 02, ..., 12 | | 925 * | | | LLL | Jan, Feb, ..., Dec | | 926 * | | | LLLL | January, February, ..., December | 2 | 927 * | | | LLLLL | J, F, ..., D | | 928 * | Local week of year | 100 | w | 1, 2, ..., 53 | | 929 * | | | wo | 1st, 2nd, ..., 53th | 5 | 930 * | | | ww | 01, 02, ..., 53 | | 931 * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 | 932 * | | | Io | 1st, 2nd, ..., 53th | 5 | 933 * | | | II | 01, 02, ..., 53 | 5 | 934 * | Day of month | 90 | d | 1, 2, ..., 31 | | 935 * | | | do | 1st, 2nd, ..., 31st | 5 | 936 * | | | dd | 01, 02, ..., 31 | | 937 * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 | 938 * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 | 939 * | | | DD | 01, 02, ..., 365, 366 | 7 | 940 * | | | DDD | 001, 002, ..., 365, 366 | | 941 * | | | DDDD | ... | 2 | 942 * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | | 943 * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 | 944 * | | | EEEEE | M, T, W, T, F, S, S | | 945 * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | | 946 * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 | 947 * | | | io | 1st, 2nd, ..., 7th | 5 | 948 * | | | ii | 01, 02, ..., 07 | 5 | 949 * | | | iii | Mon, Tue, Wed, ..., Sun | 5 | 950 * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 | 951 * | | | iiiii | M, T, W, T, F, S, S | 5 | 952 * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 | 953 * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | | 954 * | | | eo | 2nd, 3rd, ..., 1st | 5 | 955 * | | | ee | 02, 03, ..., 01 | | 956 * | | | eee | Mon, Tue, Wed, ..., Sun | | 957 * | | | eeee | Monday, Tuesday, ..., Sunday | 2 | 958 * | | | eeeee | M, T, W, T, F, S, S | | 959 * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | | 960 * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | | 961 * | | | co | 2nd, 3rd, ..., 1st | 5 | 962 * | | | cc | 02, 03, ..., 01 | | 963 * | | | ccc | Mon, Tue, Wed, ..., Sun | | 964 * | | | cccc | Monday, Tuesday, ..., Sunday | 2 | 965 * | | | ccccc | M, T, W, T, F, S, S | | 966 * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | | 967 * | AM, PM | 80 | a..aaa | AM, PM | | 968 * | | | aaaa | a.m., p.m. | 2 | 969 * | | | aaaaa | a, p | | 970 * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | | 971 * | | | bbbb | a.m., p.m., noon, midnight | 2 | 972 * | | | bbbbb | a, p, n, mi | | 973 * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | | 974 * | | | BBBB | at night, in the morning, ... | 2 | 975 * | | | BBBBB | at night, in the morning, ... | | 976 * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | | 977 * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 | 978 * | | | hh | 01, 02, ..., 11, 12 | | 979 * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | | 980 * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 | 981 * | | | HH | 00, 01, 02, ..., 23 | | 982 * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | | 983 * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 | 984 * | | | KK | 01, 02, ..., 11, 00 | | 985 * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | | 986 * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 | 987 * | | | kk | 24, 01, 02, ..., 23 | | 988 * | Minute | 60 | m | 0, 1, ..., 59 | | 989 * | | | mo | 0th, 1st, ..., 59th | 5 | 990 * | | | mm | 00, 01, ..., 59 | | 991 * | Second | 50 | s | 0, 1, ..., 59 | | 992 * | | | so | 0th, 1st, ..., 59th | 5 | 993 * | | | ss | 00, 01, ..., 59 | | 994 * | Seconds timestamp | 40 | t | 512969520 | | 995 * | | | tt | ... | 2 | 996 * | Fraction of second | 30 | S | 0, 1, ..., 9 | | 997 * | | | SS | 00, 01, ..., 99 | | 998 * | | | SSS | 000, 001, ..., 999 | | 999 * | | | SSSS | ... | 2 | 1000 * | Milliseconds timestamp | 20 | T | 512969520900 | | 1001 * | | | TT | ... | 2 | 1002 * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | | 1003 * | | | XX | -0800, +0530, Z | | 1004 * | | | XXX | -08:00, +05:30, Z | | 1005 * | | | XXXX | -0800, +0530, Z, +123456 | 2 | 1006 * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | | 1007 * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | | 1008 * | | | xx | -0800, +0530, +0000 | | 1009 * | | | xxx | -08:00, +05:30, +00:00 | 2 | 1010 * | | | xxxx | -0800, +0530, +0000, +123456 | | 1011 * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | | 1012 * | Long localized date | NA | P | 05/29/1453 | 5,8 | 1013 * | | | PP | May 29, 1453 | | 1014 * | | | PPP | May 29th, 1453 | | 1015 * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 | 1016 * | Long localized time | NA | p | 12:00 AM | 5,8 | 1017 * | | | pp | 12:00:00 AM | | 1018 * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | | 1019 * | | | PPpp | May 29, 1453, 12:00:00 AM | | 1020 * | | | PPPpp | May 29th, 1453 at ... | | 1021 * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 | 1022 * Notes: 1023 * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale 1024 * are the same as "stand-alone" units, but are different in some languages. 1025 * "Formatting" units are declined according to the rules of the language 1026 * in the context of a date. "Stand-alone" units are always nominative singular. 1027 * In `format` function, they will produce different result: 1028 * 1029 * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'` 1030 * 1031 * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'` 1032 * 1033 * `parse` will try to match both formatting and stand-alone units interchangeably. 1034 * 1035 * 2. Any sequence of the identical letters is a pattern, unless it is escaped by 1036 * the single quote characters (see below). 1037 * If the sequence is longer than listed in table: 1038 * - for numerical units (`yyyyyyyy`) `parse` will try to match a number 1039 * as wide as the sequence 1040 * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit. 1041 * These variations are marked with "2" in the last column of the table. 1042 * 1043 * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales. 1044 * These tokens represent the shortest form of the quarter. 1045 * 1046 * 4. The main difference between `y` and `u` patterns are B.C. years: 1047 * 1048 * | Year | `y` | `u` | 1049 * |------|-----|-----| 1050 * | AC 1 | 1 | 1 | 1051 * | BC 1 | 1 | 0 | 1052 * | BC 2 | 2 | -1 | 1053 * 1054 * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`: 1055 * 1056 * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00` 1057 * 1058 * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00` 1059 * 1060 * while `uu` will just assign the year as is: 1061 * 1062 * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00` 1063 * 1064 * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00` 1065 * 1066 * The same difference is true for local and ISO week-numbering years (`Y` and `R`), 1067 * except local week-numbering years are dependent on `options.weekStartsOn` 1068 * and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear) 1069 * and [setWeekYear](https://date-fns.org/docs/setWeekYear)). 1070 * 1071 * 5. These patterns are not in the Unicode Technical Standard #35: 1072 * - `i`: ISO day of week 1073 * - `I`: ISO week of year 1074 * - `R`: ISO week-numbering year 1075 * - `o`: ordinal number modifier 1076 * - `P`: long localized date 1077 * - `p`: long localized time 1078 * 1079 * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years. 1080 * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 1081 * 1082 * 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month. 1083 * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 1084 *
vendor: 8,579 bytes, lines 1085-1315
1085 * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based 1086 * on the given locale. 1087 * 1088 * using `en-US` locale: `P` => `MM/dd/yyyy` 1089 * using `en-US` locale: `p` => `hh:mm a` 1090 * using `pt-BR` locale: `P` => `dd/MM/yyyy` 1091 * using `pt-BR` locale: `p` => `HH:mm` 1092 * 1093 * Values will be assigned to the date in the descending order of its unit's priority. 1094 * Units of an equal priority overwrite each other in the order of appearance. 1095 * 1096 * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year), 1097 * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing. 1098 * 1099 * `referenceDate` must be passed for correct work of the function. 1100 * If you're not sure which `referenceDate` to supply, create a new instance of Date: 1101 * `parse('02/11/2014', 'MM/dd/yyyy', new Date())` 1102 * In this case parsing will be done in the context of the current date. 1103 * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`, 1104 * then `Invalid Date` will be returned. 1105 * 1106 * The result may vary by locale. 1107 * 1108 * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned. 1109 * 1110 * If parsing failed, `Invalid Date` will be returned. 1111 * Invalid Date is a Date, whose time value is NaN. 1112 * Time value of Date: http://es5.github.io/#x15.9.1.1 1113 * 1114 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 1115 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 1116 * 1117 * @param dateStr - The string to parse 1118 * @param formatStr - The string of tokens 1119 * @param referenceDate - defines values missing from the parsed dateString 1120 * @param options - An object with options. 1121 * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 1122 * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 1123 * 1124 * @returns The parsed date 1125 * 1126 * @throws `options.locale` must contain `match` property 1127 * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 1128 * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 1129 * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 1130 * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md 1131 * @throws format string contains an unescaped latin alphabet character 1132 * 1133 * @example 1134 * // Parse 11 February 2014 from middle-endian format: 1135 * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date()) 1136 * //=> Tue Feb 11 2014 00:00:00 1137 * 1138 * @example 1139 * // Parse 28th of February in Esperanto locale in the context of 2010 year: 1140 * import eo from 'date-fns/locale/eo' 1141 * var result = parse('28-a de februaro', "do 'de' MMMM", new Date(2010, 0, 1), { 1142 * locale: eo 1143 * }) 1144 * //=> Sun Feb 28 2010 00:00:00 1145 */ 1146function parse(dateStr, formatStr, referenceDate, options) { 1147 const invalidDate = () => 1148 (0, _index4.constructFrom)(options?.in || referenceDate, NaN); 1149 const defaultOptions = (0, _index5.getDefaultOptions)(); 1150 const locale = 1151 options?.locale ?? defaultOptions.locale ?? _index.defaultLocale; 1152 1153 const firstWeekContainsDate = 1154 options?.firstWeekContainsDate ?? 1155 options?.locale?.options?.firstWeekContainsDate ?? 1156 defaultOptions.firstWeekContainsDate ?? 1157 defaultOptions.locale?.options?.firstWeekContainsDate ?? 1158 1; 1159 1160 const weekStartsOn = 1161 options?.weekStartsOn ?? 1162 options?.locale?.options?.weekStartsOn ?? 1163 defaultOptions.weekStartsOn ?? 1164 defaultOptions.locale?.options?.weekStartsOn ?? 1165 0; 1166 1167 if (!formatStr) 1168 return dateStr 1169 ? invalidDate() 1170 : (0, _index6.toDate)(referenceDate, options?.in); 1171 1172 const subFnOptions = { 1173 firstWeekContainsDate, 1174 weekStartsOn, 1175 locale, 1176 }; 1177 1178 // If timezone isn't specified, it will try to use the context or 1179 // the reference date and fallback to the system time zone. 1180 const setters = [new _Setter.DateTimezoneSetter(options?.in, referenceDate)]; 1181 1182 const tokens = formatStr 1183 .match(longFormattingTokensRegExp) 1184 .map((substring) => { 1185 const firstCharacter = substring[0]; 1186 if (firstCharacter in _index2.longFormatters) { 1187 const longFormatter = _index2.longFormatters[firstCharacter]; 1188 return longFormatter(substring, locale.formatLong); 1189 } 1190 return substring; 1191 }) 1192 .join("") 1193 .match(formattingTokensRegExp); 1194 1195 const usedTokens = []; 1196 1197 for (let token of tokens) { 1198 if ( 1199 !options?.useAdditionalWeekYearTokens && 1200 (0, _index3.isProtectedWeekYearToken)(token) 1201 ) { 1202 (0, _index3.warnOrThrowProtectedError)(token, formatStr, dateStr); 1203 } 1204 if ( 1205 !options?.useAdditionalDayOfYearTokens && 1206 (0, _index3.isProtectedDayOfYearToken)(token) 1207 ) { 1208 (0, _index3.warnOrThrowProtectedError)(token, formatStr, dateStr); 1209 } 1210 1211 const firstCharacter = token[0]; 1212 const parser = _index7.parsers[firstCharacter]; 1213 if (parser) { 1214 const { incompatibleTokens } = parser; 1215 if (Array.isArray(incompatibleTokens)) { 1216 const incompatibleToken = usedTokens.find( 1217 (usedToken) => 1218 incompatibleTokens.includes(usedToken.token) || 1219 usedToken.token === firstCharacter, 1220 ); 1221 if (incompatibleToken) { 1222 throw new RangeError( 1223 `The format string mustn't contain \`${incompatibleToken.fullToken}\` and \`${token}\` at the same time`, 1224 ); 1225 } 1226 } else if (parser.incompatibleTokens === "*" && usedTokens.length > 0) { 1227 throw new RangeError( 1228 `The format string mustn't contain \`${token}\` and any other token at the same time`, 1229 ); 1230 } 1231 1232 usedTokens.push({ token: firstCharacter, fullToken: token }); 1233 1234 const parseResult = parser.run( 1235 dateStr, 1236 token, 1237 locale.match, 1238 subFnOptions, 1239 ); 1240 1241 if (!parseResult) { 1242 return invalidDate(); 1243 } 1244 1245 setters.push(parseResult.setter); 1246 1247 dateStr = parseResult.rest; 1248 } else { 1249 if (firstCharacter.match(unescapedLatinCharacterRegExp)) { 1250 throw new RangeError( 1251 "Format string contains an unescaped latin alphabet character `" + 1252 firstCharacter + 1253 "`", 1254 ); 1255 } 1256 1257 // Replace two single quote characters with one single quote character 1258 if (token === "''") { 1259 token = "'"; 1260 } else if (firstCharacter === "'") { 1261 token = cleanEscapedString(token); 1262 } 1263 1264 // Cut token from string, or, if string doesn't match the token, return Invalid Date 1265 if (dateStr.indexOf(token) === 0) { 1266 dateStr = dateStr.slice(token.length); 1267 } else { 1268 return invalidDate(); 1269 } 1270 } 1271 } 1272 1273 // Check if the remaining input contains something other than whitespace 1274 if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) { 1275 return invalidDate(); 1276 } 1277 1278 const uniquePrioritySetters = setters 1279 .map((setter) => setter.priority) 1280 .sort((a, b) => b - a) 1281 .filter((priority, index, array) => array.indexOf(priority) === index) 1282 .map((priority) => 1283 setters 1284 .filter((setter) => setter.priority === priority) 1285 .sort((a, b) => b.subPriority - a.subPriority), 1286 ) 1287 .map((setterArray) => setterArray[0]); 1288 1289 let date = (0, _index6.toDate)(referenceDate, options?.in); 1290 1291 if (isNaN(+date)) return invalidDate(); 1292 1293 const flags = {}; 1294 for (const setter of uniquePrioritySetters) { 1295 if (!setter.validate(date, subFnOptions)) { 1296 return invalidDate(); 1297 } 1298 1299 const result = setter.set(date, flags, subFnOptions); 1300 // Result is tuple (date, flags) 1301 if (Array.isArray(result)) { 1302 date = result[0]; 1303 Object.assign(flags, result[1]); 1304 // Result is date 1305 } else { 1306 date = result; 1307 } 1308 } 1309 1310 return date; 1311} 1312 1313function cleanEscapedString(input) { 1314 return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'"); 1315}
1316 1317 1318/***/ }, 1319 1320/***/ "../../node_modules/date-fns/parse/_lib/Parser.cjs" 1321/*!*********************************************************!*\ 1322 !*** ../../node_modules/date-fns/parse/_lib/Parser.cjs ***! 1323 \*********************************************************/ 1324(__unused_webpack_module, exports, __webpack_require__) { 1325 1326 1327exports.Parser = void 0; 1328var _Setter = __webpack_require__(/*! ./Setter.cjs */ "../../node_modules/date-fns/parse/_lib/Setter.cjs"); 1329 1330class Parser { 1331 run(dateString, token, match, options) { 1332 const result = this.parse(dateString, token, match, options); 1333 if (!result) { 1334 return null; 1335 } 1336 1337 return { 1338 setter: new _Setter.ValueSetter( 1339 result.value, 1340 this.validate, 1341 this.set, 1342 this.priority, 1343 this.subPriority, 1344 ), 1345 rest: result.rest, 1346 }; 1347 } 1348 1349 validate(_utcDate, _value, _options) { 1350 return true; 1351 } 1352} 1353exports.Parser = Parser; 1354 1355 1356/***/ }, 1357 1358/***/ "../../node_modules/date-fns/parse/_lib/Setter.cjs" 1359/*!*********************************************************!*\ 1360 !*** ../../node_modules/date-fns/parse/_lib/Setter.cjs ***! 1361 \*********************************************************/ 1362(__unused_webpack_module, exports, __webpack_require__) { 1363 1364 1365exports.ValueSetter = exports.Setter = exports.DateTimezoneSetter = void 0; 1366var _index = __webpack_require__(/*! ../../constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 1367var _index2 = __webpack_require__(/*! ../../transpose.cjs */ "../../node_modules/date-fns/transpose.cjs"); 1368 1369const TIMEZONE_UNIT_PRIORITY = 10; 1370 1371class Setter { 1372 subPriority = 0; 1373 1374 validate(_utcDate, _options) { 1375 return true; 1376 } 1377} 1378exports.Setter = Setter; 1379 1380class ValueSetter extends Setter {
vendor: 81,658 bytes, lines 1381-4017
1381 constructor( 1382 value, 1383 1384 validateValue, 1385 1386 setValue, 1387 1388 priority, 1389 subPriority, 1390 ) { 1391 super(); 1392 this.value = value; 1393 this.validateValue = validateValue; 1394 this.setValue = setValue; 1395 this.priority = priority; 1396 if (subPriority) { 1397 this.subPriority = subPriority; 1398 } 1399 } 1400 1401 validate(date, options) { 1402 return this.validateValue(date, this.value, options); 1403 } 1404 1405 set(date, flags, options) { 1406 return this.setValue(date, flags, this.value, options); 1407 } 1408} 1409exports.ValueSetter = ValueSetter; 1410 1411class DateTimezoneSetter extends Setter { 1412 priority = TIMEZONE_UNIT_PRIORITY; 1413 subPriority = -1; 1414 1415 constructor(context, reference) { 1416 super(); 1417 this.context = 1418 context || ((date) => (0, _index.constructFrom)(reference, date)); 1419 } 1420 1421 set(date, flags) { 1422 if (flags.timestampIsSet) return date; 1423 return (0, _index.constructFrom)( 1424 date, 1425 (0, _index2.transpose)(date, this.context), 1426 ); 1427 } 1428} 1429exports.DateTimezoneSetter = DateTimezoneSetter; 1430 1431 1432/***/ }, 1433 1434/***/ "../../node_modules/date-fns/parse/_lib/constants.cjs" 1435/*!************************************************************!*\ 1436 !*** ../../node_modules/date-fns/parse/_lib/constants.cjs ***! 1437 \************************************************************/ 1438(__unused_webpack_module, exports) { 1439 1440 1441exports.timezonePatterns = exports.numericPatterns = void 0; 1442const numericPatterns = (exports.numericPatterns = { 1443 month: /^(1[0-2]|0?\d)/, // 0 to 12 1444 date: /^(3[0-1]|[0-2]?\d)/, // 0 to 31 1445 dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/, // 0 to 366 1446 week: /^(5[0-3]|[0-4]?\d)/, // 0 to 53 1447 hour23h: /^(2[0-3]|[0-1]?\d)/, // 0 to 23 1448 hour24h: /^(2[0-4]|[0-1]?\d)/, // 0 to 24 1449 hour11h: /^(1[0-1]|0?\d)/, // 0 to 11 1450 hour12h: /^(1[0-2]|0?\d)/, // 0 to 12 1451 minute: /^[0-5]?\d/, // 0 to 59 1452 second: /^[0-5]?\d/, // 0 to 59 1453 1454 singleDigit: /^\d/, // 0 to 9 1455 twoDigits: /^\d{1,2}/, // 0 to 99 1456 threeDigits: /^\d{1,3}/, // 0 to 999 1457 fourDigits: /^\d{1,4}/, // 0 to 9999 1458 1459 anyDigitsSigned: /^-?\d+/, 1460 singleDigitSigned: /^-?\d/, // 0 to 9, -0 to -9 1461 twoDigitsSigned: /^-?\d{1,2}/, // 0 to 99, -0 to -99 1462 threeDigitsSigned: /^-?\d{1,3}/, // 0 to 999, -0 to -999 1463 fourDigitsSigned: /^-?\d{1,4}/, // 0 to 9999, -0 to -9999 1464}); 1465 1466const timezonePatterns = (exports.timezonePatterns = { 1467 basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/, 1468 basic: /^([+-])(\d{2})(\d{2})|Z/, 1469 basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/, 1470 extended: /^([+-])(\d{2}):(\d{2})|Z/, 1471 extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/, 1472}); 1473 1474 1475/***/ }, 1476 1477/***/ "../../node_modules/date-fns/parse/_lib/parsers.cjs" 1478/*!**********************************************************!*\ 1479 !*** ../../node_modules/date-fns/parse/_lib/parsers.cjs ***! 1480 \**********************************************************/ 1481(__unused_webpack_module, exports, __webpack_require__) { 1482 1483 1484exports.parsers = void 0; 1485var _EraParser = __webpack_require__(/*! ./parsers/EraParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/EraParser.cjs"); 1486var _YearParser = __webpack_require__(/*! ./parsers/YearParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/YearParser.cjs"); 1487var _LocalWeekYearParser = __webpack_require__(/*! ./parsers/LocalWeekYearParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.cjs"); 1488var _ISOWeekYearParser = __webpack_require__(/*! ./parsers/ISOWeekYearParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.cjs"); 1489var _ExtendedYearParser = __webpack_require__(/*! ./parsers/ExtendedYearParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.cjs"); 1490var _QuarterParser = __webpack_require__(/*! ./parsers/QuarterParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/QuarterParser.cjs"); 1491var _StandAloneQuarterParser = __webpack_require__(/*! ./parsers/StandAloneQuarterParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.cjs"); 1492var _MonthParser = __webpack_require__(/*! ./parsers/MonthParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/MonthParser.cjs"); 1493var _StandAloneMonthParser = __webpack_require__(/*! ./parsers/StandAloneMonthParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.cjs"); 1494var _LocalWeekParser = __webpack_require__(/*! ./parsers/LocalWeekParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.cjs"); 1495var _ISOWeekParser = __webpack_require__(/*! ./parsers/ISOWeekParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.cjs"); 1496var _DateParser = __webpack_require__(/*! ./parsers/DateParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/DateParser.cjs"); 1497var _DayOfYearParser = __webpack_require__(/*! ./parsers/DayOfYearParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.cjs"); 1498var _DayParser = __webpack_require__(/*! ./parsers/DayParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/DayParser.cjs"); 1499var _LocalDayParser = __webpack_require__(/*! ./parsers/LocalDayParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/LocalDayParser.cjs"); 1500var _StandAloneLocalDayParser = __webpack_require__(/*! ./parsers/StandAloneLocalDayParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.cjs"); 1501var _ISODayParser = __webpack_require__(/*! ./parsers/ISODayParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/ISODayParser.cjs"); 1502var _AMPMParser = __webpack_require__(/*! ./parsers/AMPMParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/AMPMParser.cjs"); 1503var _AMPMMidnightParser = __webpack_require__(/*! ./parsers/AMPMMidnightParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.cjs"); 1504var _DayPeriodParser = __webpack_require__(/*! ./parsers/DayPeriodParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.cjs"); 1505var _Hour1to12Parser = __webpack_require__(/*! ./parsers/Hour1to12Parser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.cjs"); 1506var _Hour0to23Parser = __webpack_require__(/*! ./parsers/Hour0to23Parser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.cjs"); 1507var _Hour0To11Parser = __webpack_require__(/*! ./parsers/Hour0To11Parser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.cjs"); 1508var _Hour1To24Parser = __webpack_require__(/*! ./parsers/Hour1To24Parser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.cjs"); 1509var _MinuteParser = __webpack_require__(/*! ./parsers/MinuteParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/MinuteParser.cjs"); 1510var _SecondParser = __webpack_require__(/*! ./parsers/SecondParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/SecondParser.cjs"); 1511var _FractionOfSecondParser = __webpack_require__(/*! ./parsers/FractionOfSecondParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.cjs"); 1512var _ISOTimezoneWithZParser = __webpack_require__(/*! ./parsers/ISOTimezoneWithZParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.cjs"); 1513var _ISOTimezoneParser = __webpack_require__(/*! ./parsers/ISOTimezoneParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.cjs"); 1514var _TimestampSecondsParser = __webpack_require__(/*! ./parsers/TimestampSecondsParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.cjs"); 1515var _TimestampMillisecondsParser = __webpack_require__(/*! ./parsers/TimestampMillisecondsParser.cjs */ "../../node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.cjs"); 1516 1517/* 1518 * | | Unit | | Unit | 1519 * |-----|--------------------------------|-----|--------------------------------| 1520 * | a | AM, PM | A* | Milliseconds in day | 1521 * | b | AM, PM, noon, midnight | B | Flexible day period | 1522 * | c | Stand-alone local day of week | C* | Localized hour w/ day period | 1523 * | d | Day of month | D | Day of year | 1524 * | e | Local day of week | E | Day of week | 1525 * | f | | F* | Day of week in month | 1526 * | g* | Modified Julian day | G | Era | 1527 * | h | Hour [1-12] | H | Hour [0-23] | 1528 * | i! | ISO day of week | I! | ISO week of year | 1529 * | j* | Localized hour w/ day period | J* | Localized hour w/o day period | 1530 * | k | Hour [1-24] | K | Hour [0-11] | 1531 * | l* | (deprecated) | L | Stand-alone month | 1532 * | m | Minute | M | Month | 1533 * | n | | N | | 1534 * | o! | Ordinal number modifier | O* | Timezone (GMT) | 1535 * | p | | P | | 1536 * | q | Stand-alone quarter | Q | Quarter | 1537 * | r* | Related Gregorian year | R! | ISO week-numbering year | 1538 * | s | Second | S | Fraction of second | 1539 * | t! | Seconds timestamp | T! | Milliseconds timestamp | 1540 * | u | Extended year | U* | Cyclic year | 1541 * | v* | Timezone (generic non-locat.) | V* | Timezone (location) | 1542 * | w | Local week of year | W* | Week of month | 1543 * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) | 1544 * | y | Year (abs) | Y | Local week-numbering year | 1545 * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) | 1546 * 1547 * Letters marked by * are not implemented but reserved by Unicode standard. 1548 * 1549 * Letters marked by ! are non-standard, but implemented by date-fns: 1550 * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs) 1551 * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days, 1552 * i.e. 7 for Sunday, 1 for Monday, etc. 1553 * - `I` is ISO week of year, as opposed to `w` which is local week of year. 1554 * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year. 1555 * `R` is supposed to be used in conjunction with `I` and `i` 1556 * for universal ISO week-numbering date, whereas 1557 * `Y` is supposed to be used in conjunction with `w` and `e` 1558 * for week-numbering date specific to the locale. 1559 */ 1560const parsers = (exports.parsers = { 1561 G: new _EraParser.EraParser(), 1562 y: new _YearParser.YearParser(), 1563 Y: new _LocalWeekYearParser.LocalWeekYearParser(), 1564 R: new _ISOWeekYearParser.ISOWeekYearParser(), 1565 u: new _ExtendedYearParser.ExtendedYearParser(), 1566 Q: new _QuarterParser.QuarterParser(), 1567 q: new _StandAloneQuarterParser.StandAloneQuarterParser(), 1568 M: new _MonthParser.MonthParser(), 1569 L: new _StandAloneMonthParser.StandAloneMonthParser(), 1570 w: new _LocalWeekParser.LocalWeekParser(), 1571 I: new _ISOWeekParser.ISOWeekParser(), 1572 d: new _DateParser.DateParser(), 1573 D: new _DayOfYearParser.DayOfYearParser(), 1574 E: new _DayParser.DayParser(), 1575 e: new _LocalDayParser.LocalDayParser(), 1576 c: new _StandAloneLocalDayParser.StandAloneLocalDayParser(), 1577 i: new _ISODayParser.ISODayParser(), 1578 a: new _AMPMParser.AMPMParser(), 1579 b: new _AMPMMidnightParser.AMPMMidnightParser(), 1580 B: new _DayPeriodParser.DayPeriodParser(), 1581 h: new _Hour1to12Parser.Hour1to12Parser(), 1582 H: new _Hour0to23Parser.Hour0to23Parser(), 1583 K: new _Hour0To11Parser.Hour0To11Parser(), 1584 k: new _Hour1To24Parser.Hour1To24Parser(), 1585 m: new _MinuteParser.MinuteParser(), 1586 s: new _SecondParser.SecondParser(), 1587 S: new _FractionOfSecondParser.FractionOfSecondParser(), 1588 X: new _ISOTimezoneWithZParser.ISOTimezoneWithZParser(), 1589 x: new _ISOTimezoneParser.ISOTimezoneParser(), 1590 t: new _TimestampSecondsParser.TimestampSecondsParser(), 1591 T: new _TimestampMillisecondsParser.TimestampMillisecondsParser(), 1592}); 1593 1594 1595/***/ }, 1596 1597/***/ "../../node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.cjs" 1598/*!*****************************************************************************!*\ 1599 !*** ../../node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.cjs ***! 1600 \*****************************************************************************/ 1601(__unused_webpack_module, exports, __webpack_require__) { 1602 1603 1604exports.AMPMMidnightParser = void 0; 1605var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 1606 1607var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 1608 1609class AMPMMidnightParser extends _Parser.Parser { 1610 priority = 80; 1611 1612 parse(dateString, token, match) { 1613 switch (token) { 1614 case "b": 1615 case "bb": 1616 case "bbb": 1617 return ( 1618 match.dayPeriod(dateString, { 1619 width: "abbreviated", 1620 context: "formatting", 1621 }) || 1622 match.dayPeriod(dateString, { 1623 width: "narrow", 1624 context: "formatting", 1625 }) 1626 ); 1627 1628 case "bbbbb": 1629 return match.dayPeriod(dateString, { 1630 width: "narrow", 1631 context: "formatting", 1632 }); 1633 case "bbbb": 1634 default: 1635 return ( 1636 match.dayPeriod(dateString, { 1637 width: "wide", 1638 context: "formatting", 1639 }) || 1640 match.dayPeriod(dateString, { 1641 width: "abbreviated", 1642 context: "formatting", 1643 }) || 1644 match.dayPeriod(dateString, { 1645 width: "narrow", 1646 context: "formatting", 1647 }) 1648 ); 1649 } 1650 } 1651 1652 set(date, _flags, value) { 1653 date.setHours((0, _utils.dayPeriodEnumToHours)(value), 0, 0, 0); 1654 return date; 1655 } 1656 1657 incompatibleTokens = ["a", "B", "H", "k", "t", "T"]; 1658} 1659exports.AMPMMidnightParser = AMPMMidnightParser; 1660 1661 1662/***/ }, 1663 1664/***/ "../../node_modules/date-fns/parse/_lib/parsers/AMPMParser.cjs" 1665/*!*********************************************************************!*\ 1666 !*** ../../node_modules/date-fns/parse/_lib/parsers/AMPMParser.cjs ***! 1667 \*********************************************************************/ 1668(__unused_webpack_module, exports, __webpack_require__) { 1669 1670 1671exports.AMPMParser = void 0; 1672var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 1673 1674var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 1675 1676class AMPMParser extends _Parser.Parser { 1677 priority = 80; 1678 1679 parse(dateString, token, match) { 1680 switch (token) { 1681 case "a": 1682 case "aa": 1683 case "aaa": 1684 return ( 1685 match.dayPeriod(dateString, { 1686 width: "abbreviated", 1687 context: "formatting", 1688 }) || 1689 match.dayPeriod(dateString, { 1690 width: "narrow", 1691 context: "formatting", 1692 }) 1693 ); 1694 1695 case "aaaaa": 1696 return match.dayPeriod(dateString, { 1697 width: "narrow", 1698 context: "formatting", 1699 }); 1700 case "aaaa": 1701 default: 1702 return ( 1703 match.dayPeriod(dateString, { 1704 width: "wide", 1705 context: "formatting", 1706 }) || 1707 match.dayPeriod(dateString, { 1708 width: "abbreviated", 1709 context: "formatting", 1710 }) || 1711 match.dayPeriod(dateString, { 1712 width: "narrow", 1713 context: "formatting", 1714 }) 1715 ); 1716 } 1717 } 1718 1719 set(date, _flags, value) { 1720 date.setHours((0, _utils.dayPeriodEnumToHours)(value), 0, 0, 0); 1721 return date; 1722 } 1723 1724 incompatibleTokens = ["b", "B", "H", "k", "t", "T"]; 1725} 1726exports.AMPMParser = AMPMParser; 1727 1728 1729/***/ }, 1730 1731/***/ "../../node_modules/date-fns/parse/_lib/parsers/DateParser.cjs" 1732/*!*********************************************************************!*\ 1733 !*** ../../node_modules/date-fns/parse/_lib/parsers/DateParser.cjs ***! 1734 \*********************************************************************/ 1735(__unused_webpack_module, exports, __webpack_require__) { 1736 1737 1738exports.DateParser = void 0; 1739var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 1740var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 1741 1742var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 1743 1744const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; 1745const DAYS_IN_MONTH_LEAP_YEAR = [ 1746 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 1747]; 1748 1749// Day of the month 1750class DateParser extends _Parser.Parser { 1751 priority = 90; 1752 subPriority = 1; 1753 1754 parse(dateString, token, match) { 1755 switch (token) { 1756 case "d": 1757 return (0, _utils.parseNumericPattern)( 1758 _constants.numericPatterns.date, 1759 dateString, 1760 ); 1761 case "do": 1762 return match.ordinalNumber(dateString, { unit: "date" }); 1763 default: 1764 return (0, _utils.parseNDigits)(token.length, dateString); 1765 } 1766 } 1767 1768 validate(date, value) { 1769 const year = date.getFullYear(); 1770 const isLeapYear = (0, _utils.isLeapYearIndex)(year); 1771 const month = date.getMonth(); 1772 if (isLeapYear) { 1773 return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month]; 1774 } else { 1775 return value >= 1 && value <= DAYS_IN_MONTH[month]; 1776 } 1777 } 1778 1779 set(date, _flags, value) { 1780 date.setDate(value); 1781 date.setHours(0, 0, 0, 0); 1782 return date; 1783 } 1784 1785 incompatibleTokens = [ 1786 "Y", 1787 "R", 1788 "q", 1789 "Q", 1790 "w", 1791 "I", 1792 "D", 1793 "i", 1794 "e", 1795 "c", 1796 "t", 1797 "T", 1798 ]; 1799} 1800exports.DateParser = DateParser; 1801 1802 1803/***/ }, 1804 1805/***/ "../../node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.cjs" 1806/*!**************************************************************************!*\ 1807 !*** ../../node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.cjs ***! 1808 \**************************************************************************/ 1809(__unused_webpack_module, exports, __webpack_require__) { 1810 1811 1812exports.DayOfYearParser = void 0; 1813var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 1814var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 1815 1816var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 1817 1818class DayOfYearParser extends _Parser.Parser { 1819 priority = 90; 1820 1821 subpriority = 1; 1822 1823 parse(dateString, token, match) { 1824 switch (token) { 1825 case "D": 1826 case "DD": 1827 return (0, _utils.parseNumericPattern)( 1828 _constants.numericPatterns.dayOfYear, 1829 dateString, 1830 ); 1831 case "Do": 1832 return match.ordinalNumber(dateString, { unit: "date" }); 1833 default: 1834 return (0, _utils.parseNDigits)(token.length, dateString); 1835 } 1836 } 1837 1838 validate(date, value) { 1839 const year = date.getFullYear(); 1840 const isLeapYear = (0, _utils.isLeapYearIndex)(year); 1841 if (isLeapYear) { 1842 return value >= 1 && value <= 366; 1843 } else { 1844 return value >= 1 && value <= 365; 1845 } 1846 } 1847 1848 set(date, _flags, value) { 1849 date.setMonth(0, value); 1850 date.setHours(0, 0, 0, 0); 1851 return date; 1852 } 1853 1854 incompatibleTokens = [ 1855 "Y", 1856 "R", 1857 "q", 1858 "Q", 1859 "M", 1860 "L", 1861 "w", 1862 "I", 1863 "d", 1864 "E", 1865 "i", 1866 "e", 1867 "c", 1868 "t", 1869 "T", 1870 ]; 1871} 1872exports.DayOfYearParser = DayOfYearParser; 1873 1874 1875/***/ }, 1876 1877/***/ "../../node_modules/date-fns/parse/_lib/parsers/DayParser.cjs" 1878/*!********************************************************************!*\ 1879 !*** ../../node_modules/date-fns/parse/_lib/parsers/DayParser.cjs ***! 1880 \********************************************************************/ 1881(__unused_webpack_module, exports, __webpack_require__) { 1882 1883 1884exports.DayParser = void 0; 1885var _index = __webpack_require__(/*! ../../../setDay.cjs */ "../../node_modules/date-fns/setDay.cjs"); 1886var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 1887 1888// Day of week 1889class DayParser extends _Parser.Parser { 1890 priority = 90; 1891 1892 parse(dateString, token, match) { 1893 switch (token) { 1894 // Tue 1895 case "E": 1896 case "EE": 1897 case "EEE": 1898 return ( 1899 match.day(dateString, { 1900 width: "abbreviated", 1901 context: "formatting", 1902 }) || 1903 match.day(dateString, { width: "short", context: "formatting" }) || 1904 match.day(dateString, { width: "narrow", context: "formatting" }) 1905 ); 1906 1907 // T 1908 case "EEEEE": 1909 return match.day(dateString, { 1910 width: "narrow", 1911 context: "formatting", 1912 }); 1913 // Tu 1914 case "EEEEEE": 1915 return ( 1916 match.day(dateString, { width: "short", context: "formatting" }) || 1917 match.day(dateString, { width: "narrow", context: "formatting" }) 1918 ); 1919 1920 // Tuesday 1921 case "EEEE": 1922 default: 1923 return ( 1924 match.day(dateString, { width: "wide", context: "formatting" }) || 1925 match.day(dateString, { 1926 width: "abbreviated", 1927 context: "formatting", 1928 }) || 1929 match.day(dateString, { width: "short", context: "formatting" }) || 1930 match.day(dateString, { width: "narrow", context: "formatting" }) 1931 ); 1932 } 1933 } 1934 1935 validate(_date, value) { 1936 return value >= 0 && value <= 6; 1937 } 1938 1939 set(date, _flags, value, options) { 1940 date = (0, _index.setDay)(date, value, options); 1941 date.setHours(0, 0, 0, 0); 1942 return date; 1943 } 1944 1945 incompatibleTokens = ["D", "i", "e", "c", "t", "T"]; 1946} 1947exports.DayParser = DayParser; 1948 1949 1950/***/ }, 1951 1952/***/ "../../node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.cjs" 1953/*!**************************************************************************!*\ 1954 !*** ../../node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.cjs ***! 1955 \**************************************************************************/ 1956(__unused_webpack_module, exports, __webpack_require__) { 1957 1958 1959exports.DayPeriodParser = void 0; 1960var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 1961 1962var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 1963 1964// in the morning, in the afternoon, in the evening, at night 1965class DayPeriodParser extends _Parser.Parser { 1966 priority = 80; 1967 1968 parse(dateString, token, match) { 1969 switch (token) { 1970 case "B": 1971 case "BB": 1972 case "BBB": 1973 return ( 1974 match.dayPeriod(dateString, { 1975 width: "abbreviated", 1976 context: "formatting", 1977 }) || 1978 match.dayPeriod(dateString, { 1979 width: "narrow", 1980 context: "formatting", 1981 }) 1982 ); 1983 1984 case "BBBBB": 1985 return match.dayPeriod(dateString, { 1986 width: "narrow", 1987 context: "formatting", 1988 }); 1989 case "BBBB": 1990 default: 1991 return ( 1992 match.dayPeriod(dateString, { 1993 width: "wide", 1994 context: "formatting", 1995 }) || 1996 match.dayPeriod(dateString, { 1997 width: "abbreviated", 1998 context: "formatting", 1999 }) || 2000 match.dayPeriod(dateString, { 2001 width: "narrow", 2002 context: "formatting", 2003 }) 2004 ); 2005 } 2006 } 2007 2008 set(date, _flags, value) { 2009 date.setHours((0, _utils.dayPeriodEnumToHours)(value), 0, 0, 0); 2010 return date; 2011 } 2012 2013 incompatibleTokens = ["a", "b", "t", "T"]; 2014} 2015exports.DayPeriodParser = DayPeriodParser; 2016 2017 2018/***/ }, 2019 2020/***/ "../../node_modules/date-fns/parse/_lib/parsers/EraParser.cjs" 2021/*!********************************************************************!*\ 2022 !*** ../../node_modules/date-fns/parse/_lib/parsers/EraParser.cjs ***! 2023 \********************************************************************/ 2024(__unused_webpack_module, exports, __webpack_require__) { 2025 2026 2027exports.EraParser = void 0; 2028 2029var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2030 2031class EraParser extends _Parser.Parser { 2032 priority = 140; 2033 2034 parse(dateString, token, match) { 2035 switch (token) { 2036 // AD, BC 2037 case "G": 2038 case "GG": 2039 case "GGG": 2040 return ( 2041 match.era(dateString, { width: "abbreviated" }) || 2042 match.era(dateString, { width: "narrow" }) 2043 ); 2044 2045 // A, B 2046 case "GGGGG": 2047 return match.era(dateString, { width: "narrow" }); 2048 // Anno Domini, Before Christ 2049 case "GGGG": 2050 default: 2051 return ( 2052 match.era(dateString, { width: "wide" }) || 2053 match.era(dateString, { width: "abbreviated" }) || 2054 match.era(dateString, { width: "narrow" }) 2055 ); 2056 } 2057 } 2058 2059 set(date, flags, value) { 2060 flags.era = value; 2061 date.setFullYear(value, 0, 1); 2062 date.setHours(0, 0, 0, 0); 2063 return date; 2064 } 2065 2066 incompatibleTokens = ["R", "u", "t", "T"]; 2067} 2068exports.EraParser = EraParser; 2069 2070 2071/***/ }, 2072 2073/***/ "../../node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.cjs" 2074/*!*****************************************************************************!*\ 2075 !*** ../../node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.cjs ***! 2076 \*****************************************************************************/ 2077(__unused_webpack_module, exports, __webpack_require__) { 2078 2079 2080exports.ExtendedYearParser = void 0; 2081var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2082 2083var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2084 2085class ExtendedYearParser extends _Parser.Parser { 2086 priority = 130; 2087 2088 parse(dateString, token) { 2089 if (token === "u") { 2090 return (0, _utils.parseNDigitsSigned)(4, dateString); 2091 } 2092 2093 return (0, _utils.parseNDigitsSigned)(token.length, dateString); 2094 } 2095 2096 set(date, _flags, value) { 2097 date.setFullYear(value, 0, 1); 2098 date.setHours(0, 0, 0, 0); 2099 return date; 2100 } 2101 2102 incompatibleTokens = ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]; 2103} 2104exports.ExtendedYearParser = ExtendedYearParser; 2105 2106 2107/***/ }, 2108 2109/***/ "../../node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.cjs" 2110/*!*********************************************************************************!*\ 2111 !*** ../../node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.cjs ***! 2112 \*********************************************************************************/ 2113(__unused_webpack_module, exports, __webpack_require__) { 2114 2115 2116exports.FractionOfSecondParser = void 0; 2117var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2118 2119var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2120 2121class FractionOfSecondParser extends _Parser.Parser { 2122 priority = 30; 2123 2124 parse(dateString, token) { 2125 const valueCallback = (value) => 2126 Math.trunc(value * Math.pow(10, -token.length + 3)); 2127 return (0, _utils.mapValue)( 2128 (0, _utils.parseNDigits)(token.length, dateString), 2129 valueCallback, 2130 ); 2131 } 2132 2133 set(date, _flags, value) { 2134 date.setMilliseconds(value); 2135 return date; 2136 } 2137 2138 incompatibleTokens = ["t", "T"]; 2139} 2140exports.FractionOfSecondParser = FractionOfSecondParser; 2141 2142 2143/***/ }, 2144 2145/***/ "../../node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.cjs" 2146/*!**************************************************************************!*\ 2147 !*** ../../node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.cjs ***! 2148 \**************************************************************************/ 2149(__unused_webpack_module, exports, __webpack_require__) { 2150 2151 2152exports.Hour0To11Parser = void 0; 2153var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 2154var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2155 2156var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2157 2158class Hour0To11Parser extends _Parser.Parser { 2159 priority = 70; 2160 2161 parse(dateString, token, match) { 2162 switch (token) { 2163 case "K": 2164 return (0, _utils.parseNumericPattern)( 2165 _constants.numericPatterns.hour11h, 2166 dateString, 2167 ); 2168 case "Ko": 2169 return match.ordinalNumber(dateString, { unit: "hour" }); 2170 default: 2171 return (0, _utils.parseNDigits)(token.length, dateString); 2172 } 2173 } 2174 2175 validate(_date, value) { 2176 return value >= 0 && value <= 11; 2177 } 2178 2179 set(date, _flags, value) { 2180 const isPM = date.getHours() >= 12; 2181 if (isPM && value < 12) { 2182 date.setHours(value + 12, 0, 0, 0); 2183 } else { 2184 date.setHours(value, 0, 0, 0); 2185 } 2186 return date; 2187 } 2188 2189 incompatibleTokens = ["h", "H", "k", "t", "T"]; 2190} 2191exports.Hour0To11Parser = Hour0To11Parser; 2192 2193 2194/***/ }, 2195 2196/***/ "../../node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.cjs" 2197/*!**************************************************************************!*\ 2198 !*** ../../node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.cjs ***! 2199 \**************************************************************************/ 2200(__unused_webpack_module, exports, __webpack_require__) { 2201 2202 2203exports.Hour0to23Parser = void 0; 2204var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 2205var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2206 2207var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2208 2209class Hour0to23Parser extends _Parser.Parser { 2210 priority = 70; 2211 2212 parse(dateString, token, match) { 2213 switch (token) { 2214 case "H": 2215 return (0, _utils.parseNumericPattern)( 2216 _constants.numericPatterns.hour23h, 2217 dateString, 2218 ); 2219 case "Ho": 2220 return match.ordinalNumber(dateString, { unit: "hour" }); 2221 default: 2222 return (0, _utils.parseNDigits)(token.length, dateString); 2223 } 2224 } 2225 2226 validate(_date, value) { 2227 return value >= 0 && value <= 23; 2228 } 2229 2230 set(date, _flags, value) { 2231 date.setHours(value, 0, 0, 0); 2232 return date; 2233 } 2234 2235 incompatibleTokens = ["a", "b", "h", "K", "k", "t", "T"]; 2236} 2237exports.Hour0to23Parser = Hour0to23Parser; 2238 2239 2240/***/ }, 2241 2242/***/ "../../node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.cjs" 2243/*!**************************************************************************!*\ 2244 !*** ../../node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.cjs ***! 2245 \**************************************************************************/ 2246(__unused_webpack_module, exports, __webpack_require__) { 2247 2248 2249exports.Hour1To24Parser = void 0; 2250var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 2251var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2252 2253var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2254 2255class Hour1To24Parser extends _Parser.Parser { 2256 priority = 70; 2257 2258 parse(dateString, token, match) { 2259 switch (token) { 2260 case "k": 2261 return (0, _utils.parseNumericPattern)( 2262 _constants.numericPatterns.hour24h, 2263 dateString, 2264 ); 2265 case "ko": 2266 return match.ordinalNumber(dateString, { unit: "hour" }); 2267 default: 2268 return (0, _utils.parseNDigits)(token.length, dateString); 2269 } 2270 } 2271 2272 validate(_date, value) { 2273 return value >= 1 && value <= 24; 2274 } 2275 2276 set(date, _flags, value) { 2277 const hours = value <= 24 ? value % 24 : value; 2278 date.setHours(hours, 0, 0, 0); 2279 return date; 2280 } 2281 2282 incompatibleTokens = ["a", "b", "h", "H", "K", "t", "T"]; 2283} 2284exports.Hour1To24Parser = Hour1To24Parser; 2285 2286 2287/***/ }, 2288 2289/***/ "../../node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.cjs" 2290/*!**************************************************************************!*\ 2291 !*** ../../node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.cjs ***! 2292 \**************************************************************************/ 2293(__unused_webpack_module, exports, __webpack_require__) { 2294 2295 2296exports.Hour1to12Parser = void 0; 2297var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 2298var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2299 2300var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2301 2302class Hour1to12Parser extends _Parser.Parser { 2303 priority = 70; 2304 2305 parse(dateString, token, match) { 2306 switch (token) { 2307 case "h": 2308 return (0, _utils.parseNumericPattern)( 2309 _constants.numericPatterns.hour12h, 2310 dateString, 2311 ); 2312 case "ho": 2313 return match.ordinalNumber(dateString, { unit: "hour" }); 2314 default: 2315 return (0, _utils.parseNDigits)(token.length, dateString); 2316 } 2317 } 2318 2319 validate(_date, value) { 2320 return value >= 1 && value <= 12; 2321 } 2322 2323 set(date, _flags, value) { 2324 const isPM = date.getHours() >= 12; 2325 if (isPM && value < 12) { 2326 date.setHours(value + 12, 0, 0, 0); 2327 } else if (!isPM && value === 12) { 2328 date.setHours(0, 0, 0, 0); 2329 } else { 2330 date.setHours(value, 0, 0, 0); 2331 } 2332 return date; 2333 } 2334 2335 incompatibleTokens = ["H", "K", "k", "t", "T"]; 2336} 2337exports.Hour1to12Parser = Hour1to12Parser; 2338 2339 2340/***/ }, 2341 2342/***/ "../../node_modules/date-fns/parse/_lib/parsers/ISODayParser.cjs" 2343/*!***********************************************************************!*\ 2344 !*** ../../node_modules/date-fns/parse/_lib/parsers/ISODayParser.cjs ***! 2345 \***********************************************************************/ 2346(__unused_webpack_module, exports, __webpack_require__) { 2347 2348 2349exports.ISODayParser = void 0; 2350var _index = __webpack_require__(/*! ../../../setISODay.cjs */ "../../node_modules/date-fns/setISODay.cjs"); 2351var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2352 2353var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2354 2355// ISO day of week 2356class ISODayParser extends _Parser.Parser { 2357 priority = 90; 2358 2359 parse(dateString, token, match) { 2360 const valueCallback = (value) => { 2361 if (value === 0) { 2362 return 7; 2363 } 2364 return value; 2365 }; 2366 2367 switch (token) { 2368 // 2 2369 case "i": 2370 case "ii": // 02 2371 return (0, _utils.parseNDigits)(token.length, dateString); 2372 // 2nd 2373 case "io": 2374 return match.ordinalNumber(dateString, { unit: "day" }); 2375 // Tue 2376 case "iii": 2377 return (0, _utils.mapValue)( 2378 match.day(dateString, { 2379 width: "abbreviated", 2380 context: "formatting", 2381 }) || 2382 match.day(dateString, { 2383 width: "short", 2384 context: "formatting", 2385 }) || 2386 match.day(dateString, { 2387 width: "narrow", 2388 context: "formatting", 2389 }), 2390 valueCallback, 2391 ); 2392 // T 2393 case "iiiii": 2394 return (0, _utils.mapValue)( 2395 match.day(dateString, { 2396 width: "narrow", 2397 context: "formatting", 2398 }), 2399 valueCallback, 2400 ); 2401 // Tu 2402 case "iiiiii": 2403 return (0, _utils.mapValue)( 2404 match.day(dateString, { 2405 width: "short", 2406 context: "formatting", 2407 }) || 2408 match.day(dateString, { 2409 width: "narrow", 2410 context: "formatting", 2411 }), 2412 valueCallback, 2413 ); 2414 // Tuesday 2415 case "iiii": 2416 default: 2417 return (0, _utils.mapValue)( 2418 match.day(dateString, { 2419 width: "wide", 2420 context: "formatting", 2421 }) || 2422 match.day(dateString, { 2423 width: "abbreviated", 2424 context: "formatting", 2425 }) || 2426 match.day(dateString, { 2427 width: "short", 2428 context: "formatting", 2429 }) || 2430 match.day(dateString, { 2431 width: "narrow", 2432 context: "formatting", 2433 }), 2434 valueCallback, 2435 ); 2436 } 2437 } 2438 2439 validate(_date, value) { 2440 return value >= 1 && value <= 7; 2441 } 2442 2443 set(date, _flags, value) { 2444 date = (0, _index.setISODay)(date, value); 2445 date.setHours(0, 0, 0, 0); 2446 return date; 2447 } 2448 2449 incompatibleTokens = [ 2450 "y", 2451 "Y", 2452 "u", 2453 "q", 2454 "Q", 2455 "M", 2456 "L", 2457 "w", 2458 "d", 2459 "D", 2460 "E", 2461 "e", 2462 "c", 2463 "t", 2464 "T", 2465 ]; 2466} 2467exports.ISODayParser = ISODayParser; 2468 2469 2470/***/ }, 2471 2472/***/ "../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.cjs" 2473/*!****************************************************************************!*\ 2474 !*** ../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.cjs ***! 2475 \****************************************************************************/ 2476(__unused_webpack_module, exports, __webpack_require__) { 2477 2478 2479exports.ISOTimezoneParser = void 0; 2480var _index = __webpack_require__(/*! ../../../constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 2481var _index2 = __webpack_require__(/*! ../../../_lib/getTimezoneOffsetInMilliseconds.cjs */ "../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs"); 2482var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 2483var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2484 2485var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2486 2487// Timezone (ISO-8601) 2488class ISOTimezoneParser extends _Parser.Parser { 2489 priority = 10; 2490 2491 parse(dateString, token) { 2492 switch (token) { 2493 case "x": 2494 return (0, _utils.parseTimezonePattern)( 2495 _constants.timezonePatterns.basicOptionalMinutes, 2496 dateString, 2497 ); 2498 case "xx": 2499 return (0, _utils.parseTimezonePattern)( 2500 _constants.timezonePatterns.basic, 2501 dateString, 2502 ); 2503 case "xxxx": 2504 return (0, _utils.parseTimezonePattern)( 2505 _constants.timezonePatterns.basicOptionalSeconds, 2506 dateString, 2507 ); 2508 case "xxxxx": 2509 return (0, _utils.parseTimezonePattern)( 2510 _constants.timezonePatterns.extendedOptionalSeconds, 2511 dateString, 2512 ); 2513 case "xxx": 2514 default: 2515 return (0, _utils.parseTimezonePattern)( 2516 _constants.timezonePatterns.extended, 2517 dateString, 2518 ); 2519 } 2520 } 2521 2522 set(date, flags, value) { 2523 if (flags.timestampIsSet) return date; 2524 return (0, _index.constructFrom)( 2525 date, 2526 date.getTime() - 2527 (0, _index2.getTimezoneOffsetInMilliseconds)(date) - 2528 value, 2529 ); 2530 } 2531 2532 incompatibleTokens = ["t", "T", "X"]; 2533} 2534exports.ISOTimezoneParser = ISOTimezoneParser; 2535 2536 2537/***/ }, 2538 2539/***/ "../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.cjs" 2540/*!*********************************************************************************!*\ 2541 !*** ../../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.cjs ***! 2542 \*********************************************************************************/ 2543(__unused_webpack_module, exports, __webpack_require__) { 2544 2545 2546exports.ISOTimezoneWithZParser = void 0; 2547var _index = __webpack_require__(/*! ../../../constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 2548var _index2 = __webpack_require__(/*! ../../../_lib/getTimezoneOffsetInMilliseconds.cjs */ "../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.cjs"); 2549var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 2550var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2551 2552var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2553 2554// Timezone (ISO-8601. +00:00 is `'Z'`) 2555class ISOTimezoneWithZParser extends _Parser.Parser { 2556 priority = 10; 2557 2558 parse(dateString, token) { 2559 switch (token) { 2560 case "X": 2561 return (0, _utils.parseTimezonePattern)( 2562 _constants.timezonePatterns.basicOptionalMinutes, 2563 dateString, 2564 ); 2565 case "XX": 2566 return (0, _utils.parseTimezonePattern)( 2567 _constants.timezonePatterns.basic, 2568 dateString, 2569 ); 2570 case "XXXX": 2571 return (0, _utils.parseTimezonePattern)( 2572 _constants.timezonePatterns.basicOptionalSeconds, 2573 dateString, 2574 ); 2575 case "XXXXX": 2576 return (0, _utils.parseTimezonePattern)( 2577 _constants.timezonePatterns.extendedOptionalSeconds, 2578 dateString, 2579 ); 2580 case "XXX": 2581 default: 2582 return (0, _utils.parseTimezonePattern)( 2583 _constants.timezonePatterns.extended, 2584 dateString, 2585 ); 2586 } 2587 } 2588 2589 set(date, flags, value) { 2590 if (flags.timestampIsSet) return date; 2591 return (0, _index.constructFrom)( 2592 date, 2593 date.getTime() - 2594 (0, _index2.getTimezoneOffsetInMilliseconds)(date) - 2595 value, 2596 ); 2597 } 2598 2599 incompatibleTokens = ["t", "T", "x"]; 2600} 2601exports.ISOTimezoneWithZParser = ISOTimezoneWithZParser; 2602 2603 2604/***/ }, 2605 2606/***/ "../../node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.cjs" 2607/*!************************************************************************!*\ 2608 !*** ../../node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.cjs ***! 2609 \************************************************************************/ 2610(__unused_webpack_module, exports, __webpack_require__) { 2611 2612 2613exports.ISOWeekParser = void 0; 2614var _index = __webpack_require__(/*! ../../../setISOWeek.cjs */ "../../node_modules/date-fns/setISOWeek.cjs"); 2615var _index2 = __webpack_require__(/*! ../../../startOfISOWeek.cjs */ "../../node_modules/date-fns/startOfISOWeek.cjs"); 2616var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 2617var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2618 2619var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2620 2621// ISO week of year 2622class ISOWeekParser extends _Parser.Parser { 2623 priority = 100; 2624 2625 parse(dateString, token, match) { 2626 switch (token) { 2627 case "I": 2628 return (0, _utils.parseNumericPattern)( 2629 _constants.numericPatterns.week, 2630 dateString, 2631 ); 2632 case "Io": 2633 return match.ordinalNumber(dateString, { unit: "week" }); 2634 default: 2635 return (0, _utils.parseNDigits)(token.length, dateString); 2636 } 2637 } 2638 2639 validate(_date, value) { 2640 return value >= 1 && value <= 53; 2641 } 2642 2643 set(date, _flags, value) { 2644 return (0, _index2.startOfISOWeek)((0, _index.setISOWeek)(date, value)); 2645 } 2646 2647 incompatibleTokens = [ 2648 "y", 2649 "Y", 2650 "u", 2651 "q", 2652 "Q", 2653 "M", 2654 "L", 2655 "w", 2656 "d", 2657 "D", 2658 "e", 2659 "c", 2660 "t", 2661 "T", 2662 ]; 2663} 2664exports.ISOWeekParser = ISOWeekParser; 2665 2666 2667/***/ }, 2668 2669/***/ "../../node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.cjs" 2670/*!****************************************************************************!*\ 2671 !*** ../../node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.cjs ***! 2672 \****************************************************************************/ 2673(__unused_webpack_module, exports, __webpack_require__) { 2674 2675 2676exports.ISOWeekYearParser = void 0; 2677var _index = __webpack_require__(/*! ../../../startOfISOWeek.cjs */ "../../node_modules/date-fns/startOfISOWeek.cjs"); 2678var _index2 = __webpack_require__(/*! ../../../constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 2679var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2680 2681var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2682 2683// ISO week-numbering year 2684class ISOWeekYearParser extends _Parser.Parser { 2685 priority = 130; 2686 2687 parse(dateString, token) { 2688 if (token === "R") { 2689 return (0, _utils.parseNDigitsSigned)(4, dateString); 2690 } 2691 2692 return (0, _utils.parseNDigitsSigned)(token.length, dateString); 2693 } 2694 2695 set(date, _flags, value) { 2696 const firstWeekOfYear = (0, _index2.constructFrom)(date, 0); 2697 firstWeekOfYear.setFullYear(value, 0, 4); 2698 firstWeekOfYear.setHours(0, 0, 0, 0); 2699 return (0, _index.startOfISOWeek)(firstWeekOfYear); 2700 } 2701 2702 incompatibleTokens = [ 2703 "G", 2704 "y", 2705 "Y", 2706 "u", 2707 "Q", 2708 "q", 2709 "M", 2710 "L", 2711 "w", 2712 "d", 2713 "D", 2714 "e", 2715 "c", 2716 "t", 2717 "T", 2718 ]; 2719} 2720exports.ISOWeekYearParser = ISOWeekYearParser; 2721 2722 2723/***/ }, 2724 2725/***/ "../../node_modules/date-fns/parse/_lib/parsers/LocalDayParser.cjs" 2726/*!*************************************************************************!*\ 2727 !*** ../../node_modules/date-fns/parse/_lib/parsers/LocalDayParser.cjs ***! 2728 \*************************************************************************/ 2729(__unused_webpack_module, exports, __webpack_require__) { 2730 2731 2732exports.LocalDayParser = void 0; 2733var _index = __webpack_require__(/*! ../../../setDay.cjs */ "../../node_modules/date-fns/setDay.cjs"); 2734var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2735 2736var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2737 2738// Local day of week 2739class LocalDayParser extends _Parser.Parser { 2740 priority = 90; 2741 parse(dateString, token, match, options) { 2742 const valueCallback = (value) => { 2743 // We want here floor instead of trunc, so we get -7 for value 0 instead of 0 2744 const wholeWeekDays = Math.floor((value - 1) / 7) * 7; 2745 return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays; 2746 }; 2747 2748 switch (token) { 2749 // 3 2750 case "e": 2751 case "ee": // 03 2752 return (0, _utils.mapValue)( 2753 (0, _utils.parseNDigits)(token.length, dateString), 2754 valueCallback, 2755 ); 2756 // 3rd 2757 case "eo": 2758 return (0, _utils.mapValue)( 2759 match.ordinalNumber(dateString, { 2760 unit: "day", 2761 }), 2762 valueCallback, 2763 ); 2764 // Tue 2765 case "eee": 2766 return ( 2767 match.day(dateString, { 2768 width: "abbreviated", 2769 context: "formatting", 2770 }) || 2771 match.day(dateString, { width: "short", context: "formatting" }) || 2772 match.day(dateString, { width: "narrow", context: "formatting" }) 2773 ); 2774 2775 // T 2776 case "eeeee": 2777 return match.day(dateString, { 2778 width: "narrow", 2779 context: "formatting", 2780 }); 2781 // Tu 2782 case "eeeeee": 2783 return ( 2784 match.day(dateString, { width: "short", context: "formatting" }) || 2785 match.day(dateString, { width: "narrow", context: "formatting" }) 2786 ); 2787 2788 // Tuesday 2789 case "eeee": 2790 default: 2791 return ( 2792 match.day(dateString, { width: "wide", context: "formatting" }) || 2793 match.day(dateString, { 2794 width: "abbreviated", 2795 context: "formatting", 2796 }) || 2797 match.day(dateString, { width: "short", context: "formatting" }) || 2798 match.day(dateString, { width: "narrow", context: "formatting" }) 2799 ); 2800 } 2801 } 2802 2803 validate(_date, value) { 2804 return value >= 0 && value <= 6; 2805 } 2806 2807 set(date, _flags, value, options) { 2808 date = (0, _index.setDay)(date, value, options); 2809 date.setHours(0, 0, 0, 0); 2810 return date; 2811 } 2812 2813 incompatibleTokens = [ 2814 "y", 2815 "R", 2816 "u", 2817 "q", 2818 "Q", 2819 "M", 2820 "L", 2821 "I", 2822 "d", 2823 "D", 2824 "E", 2825 "i", 2826 "c", 2827 "t", 2828 "T", 2829 ]; 2830} 2831exports.LocalDayParser = LocalDayParser; 2832 2833 2834/***/ }, 2835 2836/***/ "../../node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.cjs" 2837/*!**************************************************************************!*\ 2838 !*** ../../node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.cjs ***! 2839 \**************************************************************************/ 2840(__unused_webpack_module, exports, __webpack_require__) { 2841 2842 2843exports.LocalWeekParser = void 0; 2844var _index = __webpack_require__(/*! ../../../setWeek.cjs */ "../../node_modules/date-fns/setWeek.cjs"); 2845var _index2 = __webpack_require__(/*! ../../../startOfWeek.cjs */ "../../node_modules/date-fns/startOfWeek.cjs"); 2846var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 2847var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2848 2849var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2850 2851// Local week of year 2852class LocalWeekParser extends _Parser.Parser { 2853 priority = 100; 2854 2855 parse(dateString, token, match) { 2856 switch (token) { 2857 case "w": 2858 return (0, _utils.parseNumericPattern)( 2859 _constants.numericPatterns.week, 2860 dateString, 2861 ); 2862 case "wo": 2863 return match.ordinalNumber(dateString, { unit: "week" }); 2864 default: 2865 return (0, _utils.parseNDigits)(token.length, dateString); 2866 } 2867 } 2868 2869 validate(_date, value) { 2870 return value >= 1 && value <= 53; 2871 } 2872 2873 set(date, _flags, value, options) { 2874 return (0, _index2.startOfWeek)( 2875 (0, _index.setWeek)(date, value, options), 2876 options, 2877 ); 2878 } 2879 2880 incompatibleTokens = [ 2881 "y", 2882 "R", 2883 "u", 2884 "q", 2885 "Q", 2886 "M", 2887 "L", 2888 "I", 2889 "d", 2890 "D", 2891 "i", 2892 "t", 2893 "T", 2894 ]; 2895} 2896exports.LocalWeekParser = LocalWeekParser; 2897 2898 2899/***/ }, 2900 2901/***/ "../../node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.cjs" 2902/*!******************************************************************************!*\ 2903 !*** ../../node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.cjs ***! 2904 \******************************************************************************/ 2905(__unused_webpack_module, exports, __webpack_require__) { 2906 2907 2908exports.LocalWeekYearParser = void 0; 2909var _index = __webpack_require__(/*! ../../../getWeekYear.cjs */ "../../node_modules/date-fns/getWeekYear.cjs"); 2910 2911var _index2 = __webpack_require__(/*! ../../../startOfWeek.cjs */ "../../node_modules/date-fns/startOfWeek.cjs"); 2912var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 2913 2914var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 2915 2916// Local week-numbering year 2917class LocalWeekYearParser extends _Parser.Parser { 2918 priority = 130; 2919 2920 parse(dateString, token, match) { 2921 const valueCallback = (year) => ({ 2922 year, 2923 isTwoDigitYear: token === "YY", 2924 }); 2925 2926 switch (token) { 2927 case "Y": 2928 return (0, _utils.mapValue)( 2929 (0, _utils.parseNDigits)(4, dateString), 2930 valueCallback, 2931 ); 2932 case "Yo": 2933 return (0, _utils.mapValue)( 2934 match.ordinalNumber(dateString, { 2935 unit: "year", 2936 }), 2937 valueCallback, 2938 ); 2939 default: 2940 return (0, _utils.mapValue)( 2941 (0, _utils.parseNDigits)(token.length, dateString), 2942 valueCallback, 2943 ); 2944 } 2945 } 2946 2947 validate(_date, value) { 2948 return value.isTwoDigitYear || value.year > 0; 2949 } 2950 2951 set(date, flags, value, options) { 2952 const currentYear = (0, _index.getWeekYear)(date, options); 2953 2954 if (value.isTwoDigitYear) { 2955 const normalizedTwoDigitYear = (0, _utils.normalizeTwoDigitYear)( 2956 value.year, 2957 currentYear, 2958 ); 2959 date.setFullYear( 2960 normalizedTwoDigitYear, 2961 0, 2962 options.firstWeekContainsDate, 2963 ); 2964 date.setHours(0, 0, 0, 0); 2965 return (0, _index2.startOfWeek)(date, options); 2966 } 2967 2968 const year = 2969 !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year; 2970 date.setFullYear(year, 0, options.firstWeekContainsDate); 2971 date.setHours(0, 0, 0, 0); 2972 return (0, _index2.startOfWeek)(date, options); 2973 } 2974 2975 incompatibleTokens = [ 2976 "y", 2977 "R", 2978 "u", 2979 "Q", 2980 "q", 2981 "M", 2982 "L", 2983 "I", 2984 "d", 2985 "D", 2986 "i", 2987 "t", 2988 "T", 2989 ]; 2990} 2991exports.LocalWeekYearParser = LocalWeekYearParser; 2992 2993 2994/***/ }, 2995 2996/***/ "../../node_modules/date-fns/parse/_lib/parsers/MinuteParser.cjs" 2997/*!***********************************************************************!*\ 2998 !*** ../../node_modules/date-fns/parse/_lib/parsers/MinuteParser.cjs ***! 2999 \***********************************************************************/ 3000(__unused_webpack_module, exports, __webpack_require__) { 3001 3002 3003exports.MinuteParser = void 0; 3004var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 3005var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3006 3007var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3008 3009class MinuteParser extends _Parser.Parser { 3010 priority = 60; 3011 3012 parse(dateString, token, match) { 3013 switch (token) { 3014 case "m": 3015 return (0, _utils.parseNumericPattern)( 3016 _constants.numericPatterns.minute, 3017 dateString, 3018 ); 3019 case "mo": 3020 return match.ordinalNumber(dateString, { unit: "minute" }); 3021 default: 3022 return (0, _utils.parseNDigits)(token.length, dateString); 3023 } 3024 } 3025 3026 validate(_date, value) { 3027 return value >= 0 && value <= 59; 3028 } 3029 3030 set(date, _flags, value) { 3031 date.setMinutes(value, 0, 0); 3032 return date; 3033 } 3034 3035 incompatibleTokens = ["t", "T"]; 3036} 3037exports.MinuteParser = MinuteParser; 3038 3039 3040/***/ }, 3041 3042/***/ "../../node_modules/date-fns/parse/_lib/parsers/MonthParser.cjs" 3043/*!**********************************************************************!*\ 3044 !*** ../../node_modules/date-fns/parse/_lib/parsers/MonthParser.cjs ***! 3045 \**********************************************************************/ 3046(__unused_webpack_module, exports, __webpack_require__) { 3047 3048 3049exports.MonthParser = void 0; 3050var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 3051var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3052 3053var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3054 3055class MonthParser extends _Parser.Parser { 3056 incompatibleTokens = [ 3057 "Y", 3058 "R", 3059 "q", 3060 "Q", 3061 "L", 3062 "w", 3063 "I", 3064 "D", 3065 "i", 3066 "e", 3067 "c", 3068 "t", 3069 "T", 3070 ]; 3071 3072 priority = 110; 3073 3074 parse(dateString, token, match) { 3075 const valueCallback = (value) => value - 1; 3076 3077 switch (token) { 3078 // 1, 2, ..., 12 3079 case "M": 3080 return (0, _utils.mapValue)( 3081 (0, _utils.parseNumericPattern)( 3082 _constants.numericPatterns.month, 3083 dateString, 3084 ), 3085 valueCallback, 3086 ); 3087 // 01, 02, ..., 12 3088 case "MM": 3089 return (0, _utils.mapValue)( 3090 (0, _utils.parseNDigits)(2, dateString), 3091 valueCallback, 3092 ); 3093 // 1st, 2nd, ..., 12th 3094 case "Mo": 3095 return (0, _utils.mapValue)( 3096 match.ordinalNumber(dateString, { 3097 unit: "month", 3098 }), 3099 valueCallback, 3100 ); 3101 // Jan, Feb, ..., Dec 3102 case "MMM": 3103 return ( 3104 match.month(dateString, { 3105 width: "abbreviated", 3106 context: "formatting", 3107 }) || 3108 match.month(dateString, { width: "narrow", context: "formatting" }) 3109 ); 3110 3111 // J, F, ..., D 3112 case "MMMMM": 3113 return match.month(dateString, { 3114 width: "narrow", 3115 context: "formatting", 3116 }); 3117 // January, February, ..., December 3118 case "MMMM": 3119 default: 3120 return ( 3121 match.month(dateString, { width: "wide", context: "formatting" }) || 3122 match.month(dateString, { 3123 width: "abbreviated", 3124 context: "formatting", 3125 }) || 3126 match.month(dateString, { width: "narrow", context: "formatting" }) 3127 ); 3128 } 3129 } 3130 3131 validate(_date, value) { 3132 return value >= 0 && value <= 11; 3133 } 3134 3135 set(date, _flags, value) { 3136 date.setMonth(value, 1); 3137 date.setHours(0, 0, 0, 0); 3138 return date; 3139 } 3140} 3141exports.MonthParser = MonthParser; 3142 3143 3144/***/ }, 3145 3146/***/ "../../node_modules/date-fns/parse/_lib/parsers/QuarterParser.cjs" 3147/*!************************************************************************!*\ 3148 !*** ../../node_modules/date-fns/parse/_lib/parsers/QuarterParser.cjs ***! 3149 \************************************************************************/ 3150(__unused_webpack_module, exports, __webpack_require__) { 3151 3152 3153exports.QuarterParser = void 0; 3154var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3155 3156var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3157 3158class QuarterParser extends _Parser.Parser { 3159 priority = 120; 3160 3161 parse(dateString, token, match) { 3162 switch (token) { 3163 // 1, 2, 3, 4 3164 case "Q": 3165 case "QQ": // 01, 02, 03, 04 3166 return (0, _utils.parseNDigits)(token.length, dateString); 3167 // 1st, 2nd, 3rd, 4th 3168 case "Qo": 3169 return match.ordinalNumber(dateString, { unit: "quarter" }); 3170 // Q1, Q2, Q3, Q4 3171 case "QQQ": 3172 return ( 3173 match.quarter(dateString, { 3174 width: "abbreviated", 3175 context: "formatting", 3176 }) || 3177 match.quarter(dateString, { 3178 width: "narrow", 3179 context: "formatting", 3180 }) 3181 ); 3182 3183 // 1, 2, 3, 4 (narrow quarter; could be not numerical) 3184 case "QQQQQ": 3185 return match.quarter(dateString, { 3186 width: "narrow", 3187 context: "formatting", 3188 }); 3189 // 1st quarter, 2nd quarter, ... 3190 case "QQQQ": 3191 default: 3192 return ( 3193 match.quarter(dateString, { 3194 width: "wide", 3195 context: "formatting", 3196 }) || 3197 match.quarter(dateString, { 3198 width: "abbreviated", 3199 context: "formatting", 3200 }) || 3201 match.quarter(dateString, { 3202 width: "narrow", 3203 context: "formatting", 3204 }) 3205 ); 3206 } 3207 } 3208 3209 validate(_date, value) { 3210 return value >= 1 && value <= 4; 3211 } 3212 3213 set(date, _flags, value) { 3214 date.setMonth((value - 1) * 3, 1); 3215 date.setHours(0, 0, 0, 0); 3216 return date; 3217 } 3218 3219 incompatibleTokens = [ 3220 "Y", 3221 "R", 3222 "q", 3223 "M", 3224 "L", 3225 "w", 3226 "I", 3227 "d", 3228 "D", 3229 "i", 3230 "e", 3231 "c", 3232 "t", 3233 "T", 3234 ]; 3235} 3236exports.QuarterParser = QuarterParser; 3237 3238 3239/***/ }, 3240 3241/***/ "../../node_modules/date-fns/parse/_lib/parsers/SecondParser.cjs" 3242/*!***********************************************************************!*\ 3243 !*** ../../node_modules/date-fns/parse/_lib/parsers/SecondParser.cjs ***! 3244 \***********************************************************************/ 3245(__unused_webpack_module, exports, __webpack_require__) { 3246 3247 3248exports.SecondParser = void 0; 3249var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 3250var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3251 3252var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3253 3254class SecondParser extends _Parser.Parser { 3255 priority = 50; 3256 3257 parse(dateString, token, match) { 3258 switch (token) { 3259 case "s": 3260 return (0, _utils.parseNumericPattern)( 3261 _constants.numericPatterns.second, 3262 dateString, 3263 ); 3264 case "so": 3265 return match.ordinalNumber(dateString, { unit: "second" }); 3266 default: 3267 return (0, _utils.parseNDigits)(token.length, dateString); 3268 } 3269 } 3270 3271 validate(_date, value) { 3272 return value >= 0 && value <= 59; 3273 } 3274 3275 set(date, _flags, value) { 3276 date.setSeconds(value, 0); 3277 return date; 3278 } 3279 3280 incompatibleTokens = ["t", "T"]; 3281} 3282exports.SecondParser = SecondParser; 3283 3284 3285/***/ }, 3286 3287/***/ "../../node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.cjs" 3288/*!***********************************************************************************!*\ 3289 !*** ../../node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.cjs ***! 3290 \***********************************************************************************/ 3291(__unused_webpack_module, exports, __webpack_require__) { 3292 3293 3294exports.StandAloneLocalDayParser = void 0; 3295var _index = __webpack_require__(/*! ../../../setDay.cjs */ "../../node_modules/date-fns/setDay.cjs"); 3296var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3297 3298var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3299 3300// Stand-alone local day of week 3301class StandAloneLocalDayParser extends _Parser.Parser { 3302 priority = 90; 3303 3304 parse(dateString, token, match, options) { 3305 const valueCallback = (value) => { 3306 // We want here floor instead of trunc, so we get -7 for value 0 instead of 0 3307 const wholeWeekDays = Math.floor((value - 1) / 7) * 7; 3308 return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays; 3309 }; 3310 3311 switch (token) { 3312 // 3 3313 case "c": 3314 case "cc": // 03 3315 return (0, _utils.mapValue)( 3316 (0, _utils.parseNDigits)(token.length, dateString), 3317 valueCallback, 3318 ); 3319 // 3rd 3320 case "co": 3321 return (0, _utils.mapValue)( 3322 match.ordinalNumber(dateString, { 3323 unit: "day", 3324 }), 3325 valueCallback, 3326 ); 3327 // Tue 3328 case "ccc": 3329 return ( 3330 match.day(dateString, { 3331 width: "abbreviated", 3332 context: "standalone", 3333 }) || 3334 match.day(dateString, { width: "short", context: "standalone" }) || 3335 match.day(dateString, { width: "narrow", context: "standalone" }) 3336 ); 3337 3338 // T 3339 case "ccccc": 3340 return match.day(dateString, { 3341 width: "narrow", 3342 context: "standalone", 3343 }); 3344 // Tu 3345 case "cccccc": 3346 return ( 3347 match.day(dateString, { width: "short", context: "standalone" }) || 3348 match.day(dateString, { width: "narrow", context: "standalone" }) 3349 ); 3350 3351 // Tuesday 3352 case "cccc": 3353 default: 3354 return ( 3355 match.day(dateString, { width: "wide", context: "standalone" }) || 3356 match.day(dateString, { 3357 width: "abbreviated", 3358 context: "standalone", 3359 }) || 3360 match.day(dateString, { width: "short", context: "standalone" }) || 3361 match.day(dateString, { width: "narrow", context: "standalone" }) 3362 ); 3363 } 3364 } 3365 3366 validate(_date, value) { 3367 return value >= 0 && value <= 6; 3368 } 3369 3370 set(date, _flags, value, options) { 3371 date = (0, _index.setDay)(date, value, options); 3372 date.setHours(0, 0, 0, 0); 3373 return date; 3374 } 3375 3376 incompatibleTokens = [ 3377 "y", 3378 "R", 3379 "u", 3380 "q", 3381 "Q", 3382 "M", 3383 "L", 3384 "I", 3385 "d", 3386 "D", 3387 "E", 3388 "i", 3389 "e", 3390 "t", 3391 "T", 3392 ]; 3393} 3394exports.StandAloneLocalDayParser = StandAloneLocalDayParser; 3395 3396 3397/***/ }, 3398 3399/***/ "../../node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.cjs" 3400/*!********************************************************************************!*\ 3401 !*** ../../node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.cjs ***! 3402 \********************************************************************************/ 3403(__unused_webpack_module, exports, __webpack_require__) { 3404 3405 3406exports.StandAloneMonthParser = void 0; 3407var _constants = __webpack_require__(/*! ../constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 3408var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3409 3410var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3411 3412class StandAloneMonthParser extends _Parser.Parser { 3413 priority = 110; 3414 3415 parse(dateString, token, match) { 3416 const valueCallback = (value) => value - 1; 3417 3418 switch (token) { 3419 // 1, 2, ..., 12 3420 case "L": 3421 return (0, _utils.mapValue)( 3422 (0, _utils.parseNumericPattern)( 3423 _constants.numericPatterns.month, 3424 dateString, 3425 ), 3426 valueCallback, 3427 ); 3428 // 01, 02, ..., 12 3429 case "LL": 3430 return (0, _utils.mapValue)( 3431 (0, _utils.parseNDigits)(2, dateString), 3432 valueCallback, 3433 ); 3434 // 1st, 2nd, ..., 12th 3435 case "Lo": 3436 return (0, _utils.mapValue)( 3437 match.ordinalNumber(dateString, { 3438 unit: "month", 3439 }), 3440 valueCallback, 3441 ); 3442 // Jan, Feb, ..., Dec 3443 case "LLL": 3444 return ( 3445 match.month(dateString, { 3446 width: "abbreviated", 3447 context: "standalone", 3448 }) || 3449 match.month(dateString, { width: "narrow", context: "standalone" }) 3450 ); 3451 3452 // J, F, ..., D 3453 case "LLLLL": 3454 return match.month(dateString, { 3455 width: "narrow", 3456 context: "standalone", 3457 }); 3458 // January, February, ..., December 3459 case "LLLL": 3460 default: 3461 return ( 3462 match.month(dateString, { width: "wide", context: "standalone" }) || 3463 match.month(dateString, { 3464 width: "abbreviated", 3465 context: "standalone", 3466 }) || 3467 match.month(dateString, { width: "narrow", context: "standalone" }) 3468 ); 3469 } 3470 } 3471 3472 validate(_date, value) { 3473 return value >= 0 && value <= 11; 3474 } 3475 3476 set(date, _flags, value) { 3477 date.setMonth(value, 1); 3478 date.setHours(0, 0, 0, 0); 3479 return date; 3480 } 3481 3482 incompatibleTokens = [ 3483 "Y", 3484 "R", 3485 "q", 3486 "Q", 3487 "M", 3488 "w", 3489 "I", 3490 "D", 3491 "i", 3492 "e", 3493 "c", 3494 "t", 3495 "T", 3496 ]; 3497} 3498exports.StandAloneMonthParser = StandAloneMonthParser; 3499 3500 3501/***/ }, 3502 3503/***/ "../../node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.cjs" 3504/*!**********************************************************************************!*\ 3505 !*** ../../node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.cjs ***! 3506 \**********************************************************************************/ 3507(__unused_webpack_module, exports, __webpack_require__) { 3508 3509 3510exports.StandAloneQuarterParser = void 0; 3511var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3512 3513var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3514 3515class StandAloneQuarterParser extends _Parser.Parser { 3516 priority = 120; 3517 3518 parse(dateString, token, match) { 3519 switch (token) { 3520 // 1, 2, 3, 4 3521 case "q": 3522 case "qq": // 01, 02, 03, 04 3523 return (0, _utils.parseNDigits)(token.length, dateString); 3524 // 1st, 2nd, 3rd, 4th 3525 case "qo": 3526 return match.ordinalNumber(dateString, { unit: "quarter" }); 3527 // Q1, Q2, Q3, Q4 3528 case "qqq": 3529 return ( 3530 match.quarter(dateString, { 3531 width: "abbreviated", 3532 context: "standalone", 3533 }) || 3534 match.quarter(dateString, { 3535 width: "narrow", 3536 context: "standalone", 3537 }) 3538 ); 3539 3540 // 1, 2, 3, 4 (narrow quarter; could be not numerical) 3541 case "qqqqq": 3542 return match.quarter(dateString, { 3543 width: "narrow", 3544 context: "standalone", 3545 }); 3546 // 1st quarter, 2nd quarter, ... 3547 case "qqqq": 3548 default: 3549 return ( 3550 match.quarter(dateString, { 3551 width: "wide", 3552 context: "standalone", 3553 }) || 3554 match.quarter(dateString, { 3555 width: "abbreviated", 3556 context: "standalone", 3557 }) || 3558 match.quarter(dateString, { 3559 width: "narrow", 3560 context: "standalone", 3561 }) 3562 ); 3563 } 3564 } 3565 3566 validate(_date, value) { 3567 return value >= 1 && value <= 4; 3568 } 3569 3570 set(date, _flags, value) { 3571 date.setMonth((value - 1) * 3, 1); 3572 date.setHours(0, 0, 0, 0); 3573 return date; 3574 } 3575 3576 incompatibleTokens = [ 3577 "Y", 3578 "R", 3579 "Q", 3580 "M", 3581 "L", 3582 "w", 3583 "I", 3584 "d", 3585 "D", 3586 "i", 3587 "e", 3588 "c", 3589 "t", 3590 "T", 3591 ]; 3592} 3593exports.StandAloneQuarterParser = StandAloneQuarterParser; 3594 3595 3596/***/ }, 3597 3598/***/ "../../node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.cjs" 3599/*!**************************************************************************************!*\ 3600 !*** ../../node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.cjs ***! 3601 \**************************************************************************************/ 3602(__unused_webpack_module, exports, __webpack_require__) { 3603 3604 3605exports.TimestampMillisecondsParser = void 0; 3606var _index = __webpack_require__(/*! ../../../constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 3607var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3608 3609var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3610 3611class TimestampMillisecondsParser extends _Parser.Parser { 3612 priority = 20; 3613 3614 parse(dateString) { 3615 return (0, _utils.parseAnyDigitsSigned)(dateString); 3616 } 3617 3618 set(date, _flags, value) { 3619 return [(0, _index.constructFrom)(date, value), { timestampIsSet: true }]; 3620 } 3621 3622 incompatibleTokens = "*"; 3623} 3624exports.TimestampMillisecondsParser = TimestampMillisecondsParser; 3625 3626 3627/***/ }, 3628 3629/***/ "../../node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.cjs" 3630/*!*********************************************************************************!*\ 3631 !*** ../../node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.cjs ***! 3632 \*********************************************************************************/ 3633(__unused_webpack_module, exports, __webpack_require__) { 3634 3635 3636exports.TimestampSecondsParser = void 0; 3637var _index = __webpack_require__(/*! ../../../constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 3638var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3639 3640var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3641 3642class TimestampSecondsParser extends _Parser.Parser { 3643 priority = 40; 3644 3645 parse(dateString) { 3646 return (0, _utils.parseAnyDigitsSigned)(dateString); 3647 } 3648 3649 set(date, _flags, value) { 3650 return [ 3651 (0, _index.constructFrom)(date, value * 1000), 3652 { timestampIsSet: true }, 3653 ]; 3654 } 3655 3656 incompatibleTokens = "*"; 3657} 3658exports.TimestampSecondsParser = TimestampSecondsParser; 3659 3660 3661/***/ }, 3662 3663/***/ "../../node_modules/date-fns/parse/_lib/parsers/YearParser.cjs" 3664/*!*********************************************************************!*\ 3665 !*** ../../node_modules/date-fns/parse/_lib/parsers/YearParser.cjs ***! 3666 \*********************************************************************/ 3667(__unused_webpack_module, exports, __webpack_require__) { 3668 3669 3670exports.YearParser = void 0; 3671var _Parser = __webpack_require__(/*! ../Parser.cjs */ "../../node_modules/date-fns/parse/_lib/Parser.cjs"); 3672 3673var _utils = __webpack_require__(/*! ../utils.cjs */ "../../node_modules/date-fns/parse/_lib/utils.cjs"); 3674 3675// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns 3676// | Year | y | yy | yyy | yyyy | yyyyy | 3677// |----------|-------|----|-------|-------|-------| 3678// | AD 1 | 1 | 01 | 001 | 0001 | 00001 | 3679// | AD 12 | 12 | 12 | 012 | 0012 | 00012 | 3680// | AD 123 | 123 | 23 | 123 | 0123 | 00123 | 3681// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 | 3682// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 | 3683class YearParser extends _Parser.Parser { 3684 priority = 130; 3685 incompatibleTokens = ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]; 3686 3687 parse(dateString, token, match) { 3688 const valueCallback = (year) => ({ 3689 year, 3690 isTwoDigitYear: token === "yy", 3691 }); 3692 3693 switch (token) { 3694 case "y": 3695 return (0, _utils.mapValue)( 3696 (0, _utils.parseNDigits)(4, dateString), 3697 valueCallback, 3698 ); 3699 case "yo": 3700 return (0, _utils.mapValue)( 3701 match.ordinalNumber(dateString, { 3702 unit: "year", 3703 }), 3704 valueCallback, 3705 ); 3706 default: 3707 return (0, _utils.mapValue)( 3708 (0, _utils.parseNDigits)(token.length, dateString), 3709 valueCallback, 3710 ); 3711 } 3712 } 3713 3714 validate(_date, value) { 3715 return value.isTwoDigitYear || value.year > 0; 3716 } 3717 3718 set(date, flags, value) { 3719 const currentYear = date.getFullYear(); 3720 3721 if (value.isTwoDigitYear) { 3722 const normalizedTwoDigitYear = (0, _utils.normalizeTwoDigitYear)( 3723 value.year, 3724 currentYear, 3725 ); 3726 date.setFullYear(normalizedTwoDigitYear, 0, 1); 3727 date.setHours(0, 0, 0, 0); 3728 return date; 3729 } 3730 3731 const year = 3732 !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year; 3733 date.setFullYear(year, 0, 1); 3734 date.setHours(0, 0, 0, 0); 3735 return date; 3736 } 3737} 3738exports.YearParser = YearParser; 3739 3740 3741/***/ }, 3742 3743/***/ "../../node_modules/date-fns/parse/_lib/utils.cjs" 3744/*!********************************************************!*\ 3745 !*** ../../node_modules/date-fns/parse/_lib/utils.cjs ***! 3746 \********************************************************/ 3747(__unused_webpack_module, exports, __webpack_require__) { 3748 3749 3750exports.dayPeriodEnumToHours = dayPeriodEnumToHours; 3751exports.isLeapYearIndex = isLeapYearIndex; 3752exports.mapValue = mapValue; 3753exports.normalizeTwoDigitYear = normalizeTwoDigitYear; 3754exports.parseAnyDigitsSigned = parseAnyDigitsSigned; 3755exports.parseNDigits = parseNDigits; 3756exports.parseNDigitsSigned = parseNDigitsSigned; 3757exports.parseNumericPattern = parseNumericPattern; 3758exports.parseTimezonePattern = parseTimezonePattern; 3759var _index = __webpack_require__(/*! ../../constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 3760 3761var _constants = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/parse/_lib/constants.cjs"); 3762 3763function mapValue(parseFnResult, mapFn) { 3764 if (!parseFnResult) { 3765 return parseFnResult; 3766 } 3767 3768 return { 3769 value: mapFn(parseFnResult.value), 3770 rest: parseFnResult.rest, 3771 }; 3772} 3773 3774function parseNumericPattern(pattern, dateString) { 3775 const matchResult = dateString.match(pattern); 3776 3777 if (!matchResult) { 3778 return null; 3779 } 3780 3781 return { 3782 value: parseInt(matchResult[0], 10), 3783 rest: dateString.slice(matchResult[0].length), 3784 }; 3785} 3786 3787function parseTimezonePattern(pattern, dateString) { 3788 const matchResult = dateString.match(pattern); 3789 3790 if (!matchResult) { 3791 return null; 3792 } 3793 3794 // Input is 'Z' 3795 if (matchResult[0] === "Z") { 3796 return { 3797 value: 0, 3798 rest: dateString.slice(1), 3799 }; 3800 } 3801 3802 const sign = matchResult[1] === "+" ? 1 : -1; 3803 const hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0; 3804 const minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0; 3805 const seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0; 3806 3807 return { 3808 value: 3809 sign * 3810 (hours * _index.millisecondsInHour + 3811 minutes * _index.millisecondsInMinute + 3812 seconds * _index.millisecondsInSecond), 3813 rest: dateString.slice(matchResult[0].length), 3814 }; 3815} 3816 3817function parseAnyDigitsSigned(dateString) { 3818 return parseNumericPattern( 3819 _constants.numericPatterns.anyDigitsSigned, 3820 dateString, 3821 ); 3822} 3823 3824function parseNDigits(n, dateString) { 3825 switch (n) { 3826 case 1: 3827 return parseNumericPattern( 3828 _constants.numericPatterns.singleDigit, 3829 dateString, 3830 ); 3831 case 2: 3832 return parseNumericPattern( 3833 _constants.numericPatterns.twoDigits, 3834 dateString, 3835 ); 3836 case 3: 3837 return parseNumericPattern( 3838 _constants.numericPatterns.threeDigits, 3839 dateString, 3840 ); 3841 case 4: 3842 return parseNumericPattern( 3843 _constants.numericPatterns.fourDigits, 3844 dateString, 3845 ); 3846 default: 3847 return parseNumericPattern(new RegExp("^\\d{1," + n + "}"), dateString); 3848 } 3849} 3850 3851function parseNDigitsSigned(n, dateString) { 3852 switch (n) { 3853 case 1: 3854 return parseNumericPattern( 3855 _constants.numericPatterns.singleDigitSigned, 3856 dateString, 3857 ); 3858 case 2: 3859 return parseNumericPattern( 3860 _constants.numericPatterns.twoDigitsSigned, 3861 dateString, 3862 ); 3863 case 3: 3864 return parseNumericPattern( 3865 _constants.numericPatterns.threeDigitsSigned, 3866 dateString, 3867 ); 3868 case 4: 3869 return parseNumericPattern( 3870 _constants.numericPatterns.fourDigitsSigned, 3871 dateString, 3872 ); 3873 default: 3874 return parseNumericPattern(new RegExp("^-?\\d{1," + n + "}"), dateString); 3875 } 3876} 3877 3878function dayPeriodEnumToHours(dayPeriod) { 3879 switch (dayPeriod) { 3880 case "morning": 3881 return 4; 3882 case "evening": 3883 return 17; 3884 case "pm": 3885 case "noon": 3886 case "afternoon": 3887 return 12; 3888 case "am": 3889 case "midnight": 3890 case "night": 3891 default: 3892 return 0; 3893 } 3894} 3895 3896function normalizeTwoDigitYear(twoDigitYear, currentYear) { 3897 const isCommonEra = currentYear > 0; 3898 // Absolute number of the current year: 3899 // 1 -> 1 AC 3900 // 0 -> 1 BC 3901 // -1 -> 2 BC 3902 const absCurrentYear = isCommonEra ? currentYear : 1 - currentYear; 3903 3904 let result; 3905 if (absCurrentYear <= 50) { 3906 result = twoDigitYear || 100; 3907 } else { 3908 const rangeEnd = absCurrentYear + 50; 3909 const rangeEndCentury = Math.trunc(rangeEnd / 100) * 100; 3910 const isPreviousCentury = twoDigitYear >= rangeEnd % 100; 3911 result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0); 3912 } 3913 3914 return isCommonEra ? result : 1 - result; 3915} 3916 3917function isLeapYearIndex(year) { 3918 return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0); 3919} 3920 3921 3922/***/ }, 3923 3924/***/ "../../node_modules/date-fns/parseISO.cjs" 3925/*!************************************************!*\ 3926 !*** ../../node_modules/date-fns/parseISO.cjs ***! 3927 \************************************************/ 3928(__unused_webpack_module, exports, __webpack_require__) { 3929 3930 3931exports.parseISO = parseISO; 3932var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 3933 3934var _index2 = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 3935var _index3 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 3936 3937/** 3938 * The {@link parseISO} function options. 3939 */ 3940 3941/** 3942 * @name parseISO 3943 * @category Common Helpers 3944 * @summary Parse ISO string 3945 * 3946 * @description 3947 * Parse the given string in ISO 8601 format and return an instance of Date. 3948 * 3949 * Function accepts complete ISO 8601 formats as well as partial implementations. 3950 * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601 3951 * 3952 * If the argument isn't a string, the function cannot parse the string or 3953 * the values are invalid, it returns Invalid Date. 3954 * 3955 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 3956 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 3957 * 3958 * @param argument - The value to convert 3959 * @param options - An object with options 3960 * 3961 * @returns The parsed date in the local time zone 3962 * 3963 * @example 3964 * // Convert string '2014-02-11T11:30:30' to date: 3965 * const result = parseISO('2014-02-11T11:30:30') 3966 * //=> Tue Feb 11 2014 11:30:30 3967 * 3968 * @example 3969 * // Convert string '+02014101' to date, 3970 * // if the additional number of digits in the extended year format is 1: 3971 * const result = parseISO('+02014101', { additionalDigits: 1 }) 3972 * //=> Fri Apr 11 2014 00:00:00 3973 */ 3974function parseISO(argument, options) { 3975 const invalidDate = () => (0, _index2.constructFrom)(options?.in, NaN); 3976 3977 const additionalDigits = options?.additionalDigits ?? 2; 3978 const dateStrings = splitDateString(argument); 3979 3980 let date; 3981 if (dateStrings.date) { 3982 const parseYearResult = parseYear(dateStrings.date, additionalDigits); 3983 date = parseDate(parseYearResult.restDateString, parseYearResult.year); 3984 } 3985 3986 if (!date || isNaN(+date)) return invalidDate(); 3987 3988 const timestamp = +date; 3989 let time = 0; 3990 let offset; 3991 3992 if (dateStrings.time) { 3993 time = parseTime(dateStrings.time); 3994 if (isNaN(time)) return invalidDate(); 3995 } 3996 3997 if (dateStrings.timezone) { 3998 offset = parseTimezone(dateStrings.timezone); 3999 if (isNaN(offset)) return invalidDate(); 4000 } else { 4001 const tmpDate = new Date(timestamp + time); 4002 const result = (0, _index3.toDate)(0, options?.in); 4003 result.setFullYear( 4004 tmpDate.getUTCFullYear(), 4005 tmpDate.getUTCMonth(), 4006 tmpDate.getUTCDate(), 4007 ); 4008 result.setHours( 4009 tmpDate.getUTCHours(), 4010 tmpDate.getUTCMinutes(), 4011 tmpDate.getUTCSeconds(), 4012 tmpDate.getUTCMilliseconds(), 4013 ); 4014 return result; 4015 } 4016 4017 return (0, _index3.toDate)(timestamp + time + offset, options?.in
vendor: 1,132 bytes, lines 4017-4059
4017); 4018} 4019 4020const patterns = { 4021 dateTimeDelimiter: /[T ]/, 4022 timeZoneDelimiter: /[Z ]/i, 4023 timezone: /([Z+-].*)$/, 4024}; 4025 4026const dateRegex = 4027 /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/; 4028const timeRegex = 4029 /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/; 4030const timezoneRegex = /^([+-])(\d{2})(?::?(\d{2}))?$/; 4031 4032function splitDateString(dateString) { 4033 const dateStrings = {}; 4034 const array = dateString.split(patterns.dateTimeDelimiter); 4035 let timeString; 4036 4037 // The regex match should only return at maximum two array elements. 4038 // [date], [time], or [date, time]. 4039 if (array.length > 2) { 4040 return dateStrings; 4041 } 4042 4043 if (/:/.test(array[0])) { 4044 timeString = array[0]; 4045 } else { 4046 dateStrings.date = array[0]; 4047 timeString = array[1]; 4048 if (patterns.timeZoneDelimiter.test(dateStrings.date)) { 4049 dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0]; 4050 timeString = dateString.substr( 4051 dateStrings.date.length, 4052 dateString.length, 4053 ); 4054 } 4055 } 4056 4057 if (timeString) { 4058 const token = patterns.timezone.exec(timeString); 4059 if (token) {
vendor: 2,228 bytes, lines 4060-4143
4060 dateStrings.time = timeString.replace(token[1], ""); 4061 dateStrings.timezone = token[1]; 4062 } else { 4063 dateStrings.time = timeString; 4064 } 4065 } 4066 4067 return dateStrings; 4068} 4069 4070function parseYear(dateString, additionalDigits) { 4071 const regex = new RegExp( 4072 "^(?:(\\d{4}|[+-]\\d{" + 4073 (4 + additionalDigits) + 4074 "})|(\\d{2}|[+-]\\d{" + 4075 (2 + additionalDigits) + 4076 "})$)", 4077 ); 4078 4079 const captures = dateString.match(regex); 4080 // Invalid ISO-formatted year 4081 if (!captures) return { year: NaN, restDateString: "" }; 4082 4083 const year = captures[1] ? parseInt(captures[1]) : null; 4084 const century = captures[2] ? parseInt(captures[2]) : null; 4085 4086 // either year or century is null, not both 4087 return { 4088 year: century === null ? year : century * 100, 4089 restDateString: dateString.slice((captures[1] || captures[2]).length), 4090 }; 4091} 4092 4093function parseDate(dateString, year) { 4094 // Invalid ISO-formatted year 4095 if (year === null) return new Date(NaN); 4096 4097 const captures = dateString.match(dateRegex); 4098 // Invalid ISO-formatted string 4099 if (!captures) return new Date(NaN); 4100 4101 const isWeekDate = !!captures[4]; 4102 const dayOfYear = parseDateUnit(captures[1]); 4103 const month = parseDateUnit(captures[2]) - 1; 4104 const day = parseDateUnit(captures[3]); 4105 const week = parseDateUnit(captures[4]); 4106 const dayOfWeek = parseDateUnit(captures[5]) - 1; 4107 4108 if (isWeekDate) { 4109 if (!validateWeekDate(year, week, dayOfWeek)) { 4110 return new Date(NaN); 4111 } 4112 return dayOfISOWeekYear(year, week, dayOfWeek); 4113 } else { 4114 const date = new Date(0); 4115 if ( 4116 !validateDate(year, month, day) || 4117 !validateDayOfYearDate(year, dayOfYear) 4118 ) { 4119 return new Date(NaN); 4120 } 4121 date.setUTCFullYear(year, month, Math.max(dayOfYear, day)); 4122 return date; 4123 } 4124} 4125 4126function parseDateUnit(value) { 4127 return value ? parseInt(value) : 1; 4128} 4129 4130function parseTime(timeString) { 4131 const captures = timeString.match(timeRegex); 4132 if (!captures) return NaN; // Invalid ISO-formatted time 4133 4134 const hours = parseTimeUnit(captures[1]); 4135 const minutes = parseTimeUnit(captures[2]); 4136 const seconds = parseTimeUnit(captures[3]); 4137 4138 if (!validateTime(hours, minutes, seconds)) { 4139 return NaN; 4140 } 4141 4142 return ( 4143 hours *
vendor: 15,330 bytes, lines 4143-4612
4143_index.millisecondsInHour + 4144 minutes * _index.millisecondsInMinute + 4145 seconds * 1000 4146 ); 4147} 4148 4149function parseTimeUnit(value) { 4150 return (value && parseFloat(value.replace(",", "."))) || 0; 4151} 4152 4153function parseTimezone(timezoneString) { 4154 if (timezoneString === "Z") return 0; 4155 4156 const captures = timezoneString.match(timezoneRegex); 4157 if (!captures) return 0; 4158 4159 const sign = captures[1] === "+" ? -1 : 1; 4160 const hours = parseInt(captures[2]); 4161 const minutes = (captures[3] && parseInt(captures[3])) || 0; 4162 4163 if (!validateTimezone(hours, minutes)) { 4164 return NaN; 4165 } 4166 4167 return ( 4168 sign * 4169 (hours * _index.millisecondsInHour + minutes * _index.millisecondsInMinute) 4170 ); 4171} 4172 4173function dayOfISOWeekYear(isoWeekYear, week, day) { 4174 const date = new Date(0); 4175 date.setUTCFullYear(isoWeekYear, 0, 4); 4176 const fourthOfJanuaryDay = date.getUTCDay() || 7; 4177 const diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay; 4178 date.setUTCDate(date.getUTCDate() + diff); 4179 return date; 4180} 4181 4182// Validation functions 4183 4184// February is null to handle the leap year (using ||) 4185const daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; 4186 4187function isLeapYearIndex(year) { 4188 return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0); 4189} 4190 4191function validateDate(year, month, date) { 4192 return ( 4193 month >= 0 && 4194 month <= 11 && 4195 date >= 1 && 4196 date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28)) 4197 ); 4198} 4199 4200function validateDayOfYearDate(year, dayOfYear) { 4201 return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365); 4202} 4203 4204function validateWeekDate(_year, week, day) { 4205 return week >= 1 && week <= 53 && day >= 0 && day <= 6; 4206} 4207 4208function validateTime(hours, minutes, seconds) { 4209 if (hours === 24) { 4210 return minutes === 0 && seconds === 0; 4211 } 4212 4213 return ( 4214 seconds >= 0 && 4215 seconds < 60 && 4216 minutes >= 0 && 4217 minutes < 60 && 4218 hours >= 0 && 4219 hours < 25 4220 ); 4221} 4222 4223function validateTimezone(_hours, minutes) { 4224 return minutes >= 0 && minutes <= 59; 4225} 4226 4227 4228/***/ }, 4229 4230/***/ "../../node_modules/date-fns/parseJSON.cjs" 4231/*!*************************************************!*\ 4232 !*** ../../node_modules/date-fns/parseJSON.cjs ***! 4233 \*************************************************/ 4234(__unused_webpack_module, exports, __webpack_require__) { 4235 4236 4237exports.parseJSON = parseJSON; 4238var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 4239 4240/** 4241 * The {@link parseJSON} function options. 4242 */ 4243 4244/** 4245 * Converts a complete ISO date string in UTC time, the typical format for transmitting 4246 * a date in JSON, to a JavaScript `Date` instance. 4247 * 4248 * This is a minimal implementation for converting dates retrieved from a JSON API to 4249 * a `Date` instance which can be used with other functions in the `date-fns` library. 4250 * The following formats are supported: 4251 * 4252 * - `2000-03-15T05:20:10.123Z`: The output of `.toISOString()` and `JSON.stringify(new Date())` 4253 * - `2000-03-15T05:20:10Z`: Without milliseconds 4254 * - `2000-03-15T05:20:10+00:00`: With a zero offset, the default JSON encoded format in some other languages 4255 * - `2000-03-15T05:20:10+05:45`: With a positive or negative offset, the default JSON encoded format in some other languages 4256 * - `2000-03-15T05:20:10+0000`: With a zero offset without a colon 4257 * - `2000-03-15T05:20:10`: Without a trailing 'Z' symbol 4258 * - `2000-03-15T05:20:10.1234567`: Up to 7 digits in milliseconds field. Only first 3 are taken into account since JS does not allow fractional milliseconds 4259 * - `2000-03-15 05:20:10`: With a space instead of a 'T' separator for APIs returning a SQL date without reformatting 4260 * 4261 * For convenience and ease of use these other input types are also supported 4262 * via [toDate](https://date-fns.org/docs/toDate): 4263 * 4264 * - A `Date` instance will be cloned 4265 * - A `number` will be treated as a timestamp 4266 * 4267 * Any other input type or invalid date strings will return an `Invalid Date`. 4268 * 4269 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4270 * 4271 * @param dateStr - A fully formed ISO8601 date string to convert 4272 * @param options - An object with options 4273 * 4274 * @returns The parsed date in the local time zone 4275 */ 4276function parseJSON(dateStr, options) { 4277 const parts = dateStr.match( 4278 /(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/, 4279 ); 4280 4281 if (!parts) return (0, _index.toDate)(NaN, options?.in); 4282 4283 return (0, _index.toDate)( 4284 Date.UTC( 4285 +parts[1], 4286 +parts[2] - 1, 4287 +parts[3], 4288 +parts[4] - (+parts[9] || 0) * (parts[8] == "-" ? -1 : 1), 4289 +parts[5] - (+parts[10] || 0) * (parts[8] == "-" ? -1 : 1), 4290 +parts[6], 4291 +((parts[7] || "0") + "00").substring(0, 3), 4292 ), 4293 options?.in, 4294 ); 4295} 4296 4297 4298/***/ }, 4299 4300/***/ "../../node_modules/date-fns/previousDay.cjs" 4301/*!***************************************************!*\ 4302 !*** ../../node_modules/date-fns/previousDay.cjs ***! 4303 \***************************************************/ 4304(__unused_webpack_module, exports, __webpack_require__) { 4305 4306 4307exports.previousDay = previousDay; 4308var _index = __webpack_require__(/*! ./getDay.cjs */ "../../node_modules/date-fns/getDay.cjs"); 4309var _index2 = __webpack_require__(/*! ./subDays.cjs */ "../../node_modules/date-fns/subDays.cjs"); 4310 4311/** 4312 * The {@link previousDay} function options. 4313 */ 4314 4315/** 4316 * @name previousDay 4317 * @category Weekday Helpers 4318 * @summary When is the previous day of the week? 4319 * 4320 * @description 4321 * When is the previous day of the week? 0-6 the day of the week, 0 represents Sunday. 4322 * 4323 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 4324 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4325 * 4326 * @param date - The date to check 4327 * @param day - The day of the week 4328 * @param options - An object with options 4329 * 4330 * @returns The date is the previous day of week 4331 * 4332 * @example 4333 * // When is the previous Monday before Mar, 20, 2020? 4334 * const result = previousDay(new Date(2020, 2, 20), 1) 4335 * //=> Mon Mar 16 2020 00:00:00 4336 * 4337 * @example 4338 * // When is the previous Tuesday before Mar, 21, 2020? 4339 * const result = previousDay(new Date(2020, 2, 21), 2) 4340 * //=> Tue Mar 17 2020 00:00:00 4341 */ 4342function previousDay(date, day, options) { 4343 let delta = (0, _index.getDay)(date, options) - day; 4344 if (delta <= 0) delta += 7; 4345 4346 return (0, _index2.subDays)(date, delta, options); 4347} 4348 4349 4350/***/ }, 4351 4352/***/ "../../node_modules/date-fns/previousFriday.cjs" 4353/*!******************************************************!*\ 4354 !*** ../../node_modules/date-fns/previousFriday.cjs ***! 4355 \******************************************************/ 4356(__unused_webpack_module, exports, __webpack_require__) { 4357 4358 4359exports.previousFriday = previousFriday; 4360var _index = __webpack_require__(/*! ./previousDay.cjs */ "../../node_modules/date-fns/previousDay.cjs"); 4361 4362/** 4363 * The {@link previousFriday} function options. 4364 */ 4365 4366/** 4367 * @name previousFriday 4368 * @category Weekday Helpers 4369 * @summary When is the previous Friday? 4370 * 4371 * @description 4372 * When is the previous Friday? 4373 * 4374 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [UTCDate](https://github.com/date-fns/utc). 4375 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4376 * 4377 * @param date - The date to start counting from 4378 * @param options - The options 4379 * 4380 * @returns The previous Friday 4381 * 4382 * @example 4383 * // When is the previous Friday before Jun, 19, 2021? 4384 * const result = previousFriday(new Date(2021, 5, 19)) 4385 * //=> Fri June 18 2021 00:00:00 4386 */ 4387function previousFriday(date, options) { 4388 return (0, _index.previousDay)(date, 5, options); 4389} 4390 4391 4392/***/ }, 4393 4394/***/ "../../node_modules/date-fns/previousMonday.cjs" 4395/*!******************************************************!*\ 4396 !*** ../../node_modules/date-fns/previousMonday.cjs ***! 4397 \******************************************************/ 4398(__unused_webpack_module, exports, __webpack_require__) { 4399 4400 4401exports.previousMonday = previousMonday; 4402var _index = __webpack_require__(/*! ./previousDay.cjs */ "../../node_modules/date-fns/previousDay.cjs"); 4403 4404/** 4405 * The {@link previousMonday} function options. 4406 */ 4407 4408/** 4409 * @name previousMonday 4410 * @category Weekday Helpers 4411 * @summary When is the previous Monday? 4412 * 4413 * @description 4414 * When is the previous Monday? 4415 * 4416 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 4417 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4418 * 4419 * @param date - The date to start counting from 4420 * @param options - An object with options 4421 * 4422 * @returns The previous Monday 4423 * 4424 * @example 4425 * // When is the previous Monday before Jun, 18, 2021? 4426 * const result = previousMonday(new Date(2021, 5, 18)) 4427 * //=> Mon June 14 2021 00:00:00 4428 */ 4429function previousMonday(date, options) { 4430 return (0, _index.previousDay)(date, 1, options); 4431} 4432 4433 4434/***/ }, 4435 4436/***/ "../../node_modules/date-fns/previousSaturday.cjs" 4437/*!********************************************************!*\ 4438 !*** ../../node_modules/date-fns/previousSaturday.cjs ***! 4439 \********************************************************/ 4440(__unused_webpack_module, exports, __webpack_require__) { 4441 4442 4443exports.previousSaturday = previousSaturday; 4444var _index = __webpack_require__(/*! ./previousDay.cjs */ "../../node_modules/date-fns/previousDay.cjs"); 4445 4446/** 4447 * The {@link previousSaturday} function options. 4448 */ 4449 4450/** 4451 * @name previousSaturday 4452 * @category Weekday Helpers 4453 * @summary When is the previous Saturday? 4454 * 4455 * @description 4456 * When is the previous Saturday? 4457 * 4458 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 4459 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4460 * 4461 * @param date - The date to start counting from 4462 * @param options - The options 4463 * 4464 * @returns The previous Saturday 4465 * 4466 * @example 4467 * // When is the previous Saturday before Jun, 20, 2021? 4468 * const result = previousSaturday(new Date(2021, 5, 20)) 4469 * //=> Sat June 19 2021 00:00:00 4470 */ 4471function previousSaturday(date, options) { 4472 return (0, _index.previousDay)(date, 6, options); 4473} 4474 4475 4476/***/ }, 4477 4478/***/ "../../node_modules/date-fns/previousSunday.cjs" 4479/*!******************************************************!*\ 4480 !*** ../../node_modules/date-fns/previousSunday.cjs ***! 4481 \******************************************************/ 4482(__unused_webpack_module, exports, __webpack_require__) { 4483 4484 4485exports.previousSunday = previousSunday; 4486var _index = __webpack_require__(/*! ./previousDay.cjs */ "../../node_modules/date-fns/previousDay.cjs"); 4487 4488/** 4489 * The {@link previousSunday} function options. 4490 */ 4491 4492/** 4493 * @name previousSunday 4494 * @category Weekday Helpers 4495 * @summary When is the previous Sunday? 4496 * 4497 * @description 4498 * When is the previous Sunday? 4499 * 4500 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 4501 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4502 * 4503 * @param date - The date to start counting from 4504 * @param options - The options 4505 * 4506 * @returns The previous Sunday 4507 * 4508 * @example 4509 * // When is the previous Sunday before Jun, 21, 2021? 4510 * const result = previousSunday(new Date(2021, 5, 21)) 4511 * //=> Sun June 20 2021 00:00:00 4512 */ 4513function previousSunday(date, options) { 4514 return (0, _index.previousDay)(date, 0, options); 4515} 4516 4517 4518/***/ }, 4519 4520/***/ "../../node_modules/date-fns/previousThursday.cjs" 4521/*!********************************************************!*\ 4522 !*** ../../node_modules/date-fns/previousThursday.cjs ***! 4523 \********************************************************/ 4524(__unused_webpack_module, exports, __webpack_require__) { 4525 4526 4527exports.previousThursday = previousThursday; 4528var _index = __webpack_require__(/*! ./previousDay.cjs */ "../../node_modules/date-fns/previousDay.cjs"); 4529 4530/** 4531 * The {@link previousThursday} function options. 4532 */ 4533 4534/** 4535 * @name previousThursday 4536 * @category Weekday Helpers 4537 * @summary When is the previous Thursday? 4538 * 4539 * @description 4540 * When is the previous Thursday? 4541 * 4542 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 4543 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4544 * 4545 * @param date - The date to start counting from 4546 * @param options - An object with options 4547 * 4548 * @returns The previous Thursday 4549 * 4550 * @example 4551 * // When is the previous Thursday before Jun, 18, 2021? 4552 * const result = previousThursday(new Date(2021, 5, 18)) 4553 * //=> Thu June 17 2021 00:00:00 4554 */ 4555function previousThursday(date, options) { 4556 return (0, _index.previousDay)(date, 4, options); 4557} 4558 4559 4560/***/ }, 4561 4562/***/ "../../node_modules/date-fns/previousTuesday.cjs" 4563/*!*******************************************************!*\ 4564 !*** ../../node_modules/date-fns/previousTuesday.cjs ***! 4565 \*******************************************************/ 4566(__unused_webpack_module, exports, __webpack_require__) { 4567 4568 4569exports.previousTuesday = previousTuesday; 4570var _index = __webpack_require__(/*! ./previousDay.cjs */ "../../node_modules/date-fns/previousDay.cjs"); 4571 4572/** 4573 * The {@link previousTuesday} function options. 4574 */ 4575 4576/** 4577 * @name previousTuesday 4578 * @category Weekday Helpers 4579 * @summary When is the previous Tuesday? 4580 * 4581 * @description 4582 * When is the previous Tuesday? 4583 * 4584 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 4585 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4586 * 4587 * @param date - The date to start counting from 4588 * @param options - An object with options 4589 * 4590 * @returns The previous Tuesday 4591 * 4592 * @example 4593 * // When is the previous Tuesday before Jun, 18, 2021? 4594 * const result = previousTuesday(new Date(2021, 5, 18)) 4595 * //=> Tue June 15 2021 00:00:00 4596 */ 4597function previousTuesday(date, options) { 4598 return (0, _index.previousDay)(date, 2, options); 4599} 4600 4601 4602/***/ }, 4603 4604/***/ "../../node_modules/date-fns/previousWednesday.cjs" 4605/*!*********************************************************!*\ 4606 !*** ../../node_modules/date-fns/previousWednesday.cjs ***! 4607 \*********************************************************/ 4608(__unused_webpack_module, exports, __webpack_require__) { 4609 4610 4611exports.previousWednesday = previousWednesday; 4612var _index = __web
4612pack_require__(/*! ./previousDay.cjs */ "../../node_modules/date-fns/previousDay.cjs"); 4613 4614/** 4615 * The {@link previousWednesday} function options. 4616 */ 4617 4618/** 4619 * @name previousWednesday 4620 * @category Weekday Helpers 4621 * @summary When is the previous Wednesday? 4622 * 4623 * @description 4624 * When is the previous Wednesday? 4625 * 4626 * @typeParam DateType - The Date type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [UTCDate](https://github.com/date-fns/utc). 4627 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4628 * 4629 * @param date - The date to start counting from 4630 * @param options - An object with options 4631 * 4632 * @returns The previous Wednesday 4633 * 4634 * @example 4635 * // When is the previous Wednesday before Jun, 18, 2021? 4636 * const result = previousWednesday(new Date(2021, 5, 18)) 4637 * //=> Wed June 16 2021 00:00:00 4638 */ 4639function previousWednesday(date, options) { 4640 return (0, _index.previousDay)(date, 3, options); 4641} 4642 4643 4644/***/ }, 4645 4646/***/ "../../node_modules/date-fns/quartersToMonths.cjs" 4647/*!********************************************************!*\ 4648 !*** ../../node_modules/date-fns/quartersToMonths.cjs ***! 4649 \********************************************************/ 4650(__unused_webpack_module, exports, __webpack_require__) { 4651 4652 4653exports.quartersToMonths = quartersToMonths; 4654var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 4655 4656/** 4657 * @name quartersToMonths 4658 * @category Conversion Helpers 4659 * @summary Convert number of quarters to months. 4660 * 4661 * @description 4662 * Convert a number of quarters to a full number of months. 4663 * 4664 * @param quarters - The number of quarters to be converted 4665 * 4666 * @returns The number of quarters converted in months 4667 * 4668 * @example 4669 * // Convert 2 quarters to months 4670 * const result = quartersToMonths(2) 4671 * //=> 6 4672 */ 4673function quartersToMonths(quarters) { 4674 return Math.trunc(quarters * _index.monthsInQuarter); 4675} 4676 4677 4678/***/ }, 4679 4680/***/ "../../node_modules/date-fns/quartersToYears.cjs" 4681/*!*******************************************************!*\ 4682 !*** ../../node_modules/date-fns/quartersToYears.cjs ***! 4683 \*******************************************************/ 4684(__unused_webpack_module, exports, __webpack_require__) { 4685 4686 4687exports.quartersToYears = quartersToYears; 4688var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 4689 4690/** 4691 * @name quartersToYears 4692 * @category Conversion Helpers 4693 * @summary Convert number of quarters to years. 4694 * 4695 * @description 4696 * Convert a number of quarters to a full number of years. 4697 * 4698 * @param quarters - The number of quarters to be converted 4699 * 4700 * @returns The number of quarters converted in years 4701 * 4702 * @example 4703 * // Convert 8 quarters to years 4704 * const result = quartersToYears(8) 4705 * //=> 2 4706 * 4707 * @example 4708 * // It uses floor rounding: 4709 * const result = quartersToYears(11) 4710 * //=> 2 4711 */ 4712function quartersToYears(quarters) { 4713 const years = quarters / _index.quartersInYear; 4714 return Math.trunc(years); 4715} 4716 4717 4718/***/ }, 4719 4720/***/ "../../node_modules/date-fns/roundToNearestHours.cjs" 4721/*!***********************************************************!*\ 4722 !*** ../../node_modules/date-fns/roundToNearestHours.cjs ***! 4723 \***********************************************************/ 4724(__unused_webpack_module, exports, __webpack_require__) { 4725 4726 4727exports.roundToNearestHours = roundToNearestHours; 4728var _index = __webpack_require__(/*! ./_lib/getRoundingMethod.cjs */ "../../node_modules/date-fns/_lib/getRoundingMethod.cjs"); 4729var _index2 = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 4730var _index3 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 4731 4732/** 4733 * The {@link roundToNearestHours} function options. 4734 */ 4735 4736/** 4737 * @name roundToNearestHours 4738 * @category Hour Helpers 4739 * @summary Rounds the given date to the nearest hour 4740 * 4741 * @description 4742 * Rounds the given date to the nearest hour (or number of hours). 4743 * Rounds up when the given date is exactly between the nearest roun
4743d hours. 4744 * 4745 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 4746 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4747 * 4748 * @param date - The date to round 4749 * @param options - An object with options. 4750 * 4751 * @returns The new date rounded to the closest hour 4752 * 4753 * @example 4754 * // Round 10 July 2014 12:34:56 to nearest hour: 4755 * const result = roundToNearestHours(new Date(2014, 6, 10, 12, 34, 56)) 4756 * //=> Thu Jul 10 2014 13:00:00 4757 * 4758 * @example 4759 * // Round 10 July 2014 12:34:56 to nearest half hour: 4760 * const result = roundToNearestHours(new Date(2014, 6, 10, 12, 34, 56), { nearestTo: 6 }) 4761 * //=> Thu Jul 10 2014 12:00:00 4762 * 4763 * @example 4764 * // Round 10 July 2014 12:34:56 to nearest half hour: 4765 * const result = roundToNearestHours(new Date(2014, 6, 10, 12, 34, 56), { nearestTo: 8 }) 4766 * //=> Thu Jul 10 2014 16:00:00 4767 * 4768 * @example 4769 * // Floor (rounds down) 10 July 2014 12:34:56 to nearest hour: 4770 * const result = roundToNearestHours(new Date(2014, 6, 10, 1, 23, 45), { roundingMethod: 'ceil' }) 4771 * //=> Thu Jul 10 2014 02:00:00 4772 * 4773 * @example 4774 * // Ceil (rounds up) 10 July 2014 12:34:56 to nearest quarter hour: 4775 * const result = roundToNearestHours(new Date(2014, 6, 10, 12, 34, 56), { roundingMethod: 'floor', nearestTo: 8 }) 4776 * //=> Thu Jul 10 2014 08:00:00 4777 */ 4778function roundToNearestHours(date, options) { 4779 const nearestTo = options?.nearestTo ?? 1; 4780 4781 if (nearestTo < 1 || nearestTo > 12) 4782 return (0, _index2.constructFrom)(options?.in || date, NaN); 4783 4784 const date_ = (0, _index3.toDate)(date, options?.in); 4785 const fractionalMinutes = date_.getMinutes() / 60; 4786 const fractionalSeconds = date_.getSeconds() / 60 / 60; 4787 const fractionalMilliseconds = date_.getMilliseconds() / 1000 / 60 / 60; 4788 const hours = 4789 date_.getHours() + 4790 fractionalMinutes + 4791 fractionalSeconds + 4792 fractionalMilliseconds; 4793 4794 const method = options?.roundingMethod ?? "round"; 4795 const roundingMethod = (0, _index.getRoundingMethod)(method); 4796 4797 const roundedHours = roundingMethod(hours / nearestTo) * nearestTo; 4798 4799 date_.setHours(roundedHours, 0, 0, 0); 4800 return date_; 4801} 4802 4803 4804/***/ }, 4805 4806/***/ "../../node_modules/date-fns/roundToNearestMinutes.cjs" 4807/*!*************************************************************!*\ 4808 !*** ../../node_modules/date-fns/roundToNearestMinutes.cjs ***! 4809 \*************************************************************/ 4810(__unused_webpack_module, exports, __webpack_require__) { 4811 4812 4813exports.roundToNearestMinutes = roundToNearestMinutes; 4814var _index = __webpack_require__(/*! ./_lib/getRoundingMethod.cjs */ "../../node_modules/date-fns/_lib/getRoundingMethod.cjs"); 4815var _index2 = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 4816var _index3 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 4817 4818/** 4819 * The {@link roundToNearestMinutes} function options. 4820 */ 4821 4822/** 4823 * @name roundToNearestMinutes 4824 * @category Minute Helpers 4825 * @summary Rounds the given date to the nearest minute 4826 * 4827 * @description 4828 * Rounds the given date to the nearest minute (or number of minutes). 4829 * Rounds up when the given date is exactly between the nearest roun
4829d minutes. 4830 * 4831 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 4832 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 4833 * 4834 * @param date - The date to round 4835 * @param options - An object with options. 4836 * 4837 * @returns The new date rounded to the closest minute 4838 * 4839 * @example 4840 * // Round 10 July 2014 12:12:34 to nearest minute: 4841 * const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34)) 4842 * //=> Thu Jul 10 2014 12:13:00 4843 * 4844 * @example 4845 * // Round 10 July 2014 12:12:34 to nearest quarter hour: 4846 * const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { nearestTo: 15 }) 4847 * //=> Thu Jul 10 2014 12:15:00 4848 * 4849 * @example 4850 * // Floor (rounds down) 10 July 2014 12:12:34 to nearest minute: 4851 * const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { roundingMethod: 'floor' }) 4852 * //=> Thu Jul 10 2014 12:12:00 4853 * 4854 * @example 4855 * // Ceil (rounds up) 10 July 2014 12:12:34 to nearest half hour: 4856 * const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { roundingMethod: 'ceil', nearestTo: 30 }) 4857 * //=> Thu Jul 10 2014 12:30:00 4858 */ 4859function roundToNearestMinutes(date, options) { 4860 const nearestTo = options?.nearestTo ?? 1; 4861 4862 if (nearestTo < 1 || nearestTo > 30) 4863 return (0, _index2.constructFrom)(date, NaN); 4864 4865 const date_ = (0, _index3.toDate)(date, options?.in); 4866 const fractionalSeconds = date_.getSeconds() / 60; 4867 const fractionalMilliseconds = date_.getMilliseconds() / 1000 / 60; 4868 const minutes = 4869 date_.getMinutes() + fractionalSeconds + fractionalMilliseconds; 4870 4871 const method = options?.roundingMethod ?? "round"; 4872 const roundingMethod = (0, _index.getRoundingMethod)(method); 4873 4874 const roundedMinutes = roundingMethod(minutes / nearestTo) * nearestTo; 4875 4876 date_.setMinutes(roundedMinutes, 0, 0); 4877 return date_; 4878} 4879 4880 4881/***/ }, 4882 4883/***/ "../../node_modules/date-fns/secondsToHours.cjs" 4884/*!******************************************************!*\ 4885 !*** ../../node_modules/date-fns/secondsToHours.cjs ***! 4886 \******************************************************/ 4887(__unused_webpack_module, exports, __webpack_require__) { 4888 4889 4890exports.secondsToHours = secondsToHours; 4891var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 4892 4893/** 4894 * @name secondsToHours 4895 * @category Conversion Helpers 4896 * @summary Convert seconds to hours. 4897 * 4898 * @description 4899 * Convert a number of seconds to a full number of hours. 4900 * 4901 * @param seconds - The number of seconds to be converted 4902 * 4903 * @returns The number of seconds converted in hours 4904 * 4905 * @example 4906 * // Convert 7200 seconds into hours 4907 * const result = secondsToHours(7200) 4908 * //=> 2 4909 * 4910 * @example 4911 * // It uses floor rounding: 4912 * const result = secondsToHours(7199) 4913 * //=> 1 4914 */ 4915function secondsToHours(seconds) { 4916 const hours = seconds / _index.secondsInHour; 4917 return Math.trunc(hours); 4918} 4919 4920 4921/***/ }, 4922 4923/***/ "../../node_modules/date-fns/secondsToMilliseconds.cjs" 4924/*!*************************************************************!*\ 4925 !*** ../../node_modules/date-fns/secondsToMilliseconds.cjs ***! 4926 \*************************************************************/ 4927(__unused_webpack_module, exports, __webpack_require__) { 4928 4929 4930exports.secondsToMilliseconds = secondsToMilliseconds; 4931var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 4932 4933/** 4934 * @name secondsToMilliseconds 4935 * @category Conversion Helpers 4936 * @summary Convert seconds to milliseconds. 4937 * 4938 * @description 4939 * Convert a number of seconds to a full number of milliseconds. 4940 * 4941 * @param seconds - The number of seconds to be converted 4942 * 4943 * @returns The number of seconds converted in milliseconds 4944 * 4945 * @example 4946 * // Convert 2 seconds into milliseconds 4947 * const result = secondsToMilliseconds(2) 4948 * //=> 2000 4949 */ 4950function secondsToMilliseconds(seconds) { 4951 return seconds * _index.millisecondsInSecond; 4952} 4953 4954 4955/***/ }, 4956 4957/***/ "../../node_modules/date-fns/secondsToMinutes.cjs" 4958/*!********************************************************!*\ 4959 !*** ../../node_modules/date-fns/secondsToMinutes.cjs ***! 4960 \********************************************************/ 4961(__unused_webpack_module, exports, __webpack_require__) { 4962 4963 4964exports.secondsToMinutes = secondsToMinutes; 4965var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 4966 4967/** 4968 * @name secondsToMinutes 4969 * @category Conversion Helpers 4970 * @summary Convert seconds to minutes. 4971 * 4972 * @description 4973 * Convert a number of seconds to a full number of minutes. 4974 * 4975 * @param seconds - The number of seconds to be converted 4976 * 4977 * @returns The number of seconds converted in minutes 4978 * 4979 * @example
4980 * // Convert 120 seconds into minutes 4981 * const result = secondsToMinutes(120) 4982 * //=> 2 4983 * 4984 * @example 4985 * // It uses floor rounding: 4986 * const result = secondsToMinutes(119) 4987 * //=> 1 4988 */ 4989function secondsToMinutes(seconds) { 4990 const minutes = seconds / _index.secondsInMinute; 4991 return Math.trunc(minutes); 4992} 4993 4994 4995/***/ }, 4996 4997/***/ "../../node_modules/date-fns/set.cjs" 4998/*!*******************************************!*\ 4999 !*** ../../node_modules/date-fns/set.cjs ***! 5000 \*******************************************/ 5001(__unused_webpack_module, exports, __webpack_require__) { 5002 5003 5004exports.set = set; 5005var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 5006var _index2 = __webpack_require__(/*! ./setMonth.cjs */ "../../node_modules/date-fns/setMonth.cjs"); 5007var _index3 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5008 5009/** 5010 * The {@link set} function options. 5011 */ 5012 5013/** 5014 * @name set 5015 * @category Common Helpers 5016 * @summary Set date values to a given date. 5017 * 5018 * @description 5019 * Set date values to a given date. 5020 * 5021 * Sets time values to date from object `values`. 5022 * A value is not set if it is undefined or null or doesn't exist in `values`. 5023 * 5024 * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts 5025 * to use native `Date#setX` methods. If you use this function, you may not want to include the 5026 * other `setX` functions that date-fns provides if you are concerned about the bundle size. 5027 * 5028 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5029 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5030 * 5031 * @param date - The date to be changed 5032 * @param values - The date values to be set 5033 * @param options - The options 5034 * 5035 * @returns The new date with options set 5036 * 5037 * @example 5038 * // Transform 1 September 2014 into 20 October 2015 in a single line: 5039 * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 }) 5040 * //=> Tue Oct 20 2015 00:00:00 5041 * 5042 * @example 5043 * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00: 5044 * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 }) 5045 * //=> Mon Sep 01 2014 12:23:45 5046 */ 5047function set(date, values, options) { 5048 let _date = (0, _index3.toDate)(date, options?.in); 5049 5050 // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date 5051 if (isNaN(+_date)) return (0, _index.constructFrom)(options?.in || date, NaN); 5052 5053 if (values.year != null) _date.setFullYear(values.year); 5054 if (values.month != null) _date = (0, _index2.setMonth)(_date, values.month); 5055 if (values.date != null) _date.setDate(values.date); 5056 if (values.hours != null) _date.setHours(values.hours); 5057 if (values.minutes != null) _date.setMinutes(values.minutes); 5058 if (values.seconds != null) _date.setSeconds(values.seconds); 5059 if (values.milliseconds != null) _date.setMilliseconds(values.milliseconds); 5060 5061 return _date; 5062} 5063 5064 5065/***/ }, 5066 5067/***/ "../../node_modules/date-fns/setDate.cjs" 5068/*!***********************************************!*\ 5069 !*** ../../node_modules/date-fns/setDate.cjs ***! 5070 \***********************************************/ 5071(__unused_webpack_module, exports, __webpack_require__) { 5072 5073 5074exports.setDate = setDate; 5075var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5076 5077/** 5078 * The {@link setDate} function options. 5079 */ 5080 5081/** 5082 * @name setDate 5083 * @category Day Helpers 5084 * @summary Set the day of the month to the given date. 5085 * 5086 * @description 5087 * Set the day of the month to the given date. 5088 * 5089 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc). 5090 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5091 * 5092 * @param date - The date to be changed 5093 * @param dayOfMonth - The day of the month of the new date 5094 * @param options - The options 5095 *
vendor: 16,384 bytes, lines 5096-5575
5096 * @returns The new date with the day of the month set 5097 * 5098 * @example 5099 * // Set the 30th day of the month to 1 September 2014: 5100 * const result = setDate(new Date(2014, 8, 1), 30) 5101 * //=> Tue Sep 30 2014 00:00:00 5102 */ 5103function setDate(date, dayOfMonth, options) { 5104 const _date = (0, _index.toDate)(date, options?.in); 5105 _date.setDate(dayOfMonth); 5106 return _date; 5107} 5108 5109 5110/***/ }, 5111 5112/***/ "../../node_modules/date-fns/setDay.cjs" 5113/*!**********************************************!*\ 5114 !*** ../../node_modules/date-fns/setDay.cjs ***! 5115 \**********************************************/ 5116(__unused_webpack_module, exports, __webpack_require__) { 5117 5118 5119exports.setDay = setDay; 5120var _index = __webpack_require__(/*! ./_lib/defaultOptions.cjs */ "../../node_modules/date-fns/_lib/defaultOptions.cjs"); 5121var _index2 = __webpack_require__(/*! ./addDays.cjs */ "../../node_modules/date-fns/addDays.cjs"); 5122var _index3 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5123 5124/** 5125 * The {@link setDay} function options. 5126 */ 5127 5128/** 5129 * @name setDay 5130 * @category Weekday Helpers 5131 * @summary Set the day of the week to the given date. 5132 * 5133 * @description 5134 * Set the day of the week to the given date. 5135 * 5136 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5137 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5138 * 5139 * @param date - The date to be changed 5140 * @param day - The day of the week of the new date 5141 * @param options - An object with options. 5142 * 5143 * @returns The new date with the day of the week set 5144 * 5145 * @example 5146 * // Set week day to Sunday, with the default weekStartsOn of Sunday: 5147 * const result = setDay(new Date(2014, 8, 1), 0) 5148 * //=> Sun Aug 31 2014 00:00:00 5149 * 5150 * @example 5151 * // Set week day to Sunday, with a weekStartsOn of Monday: 5152 * const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 }) 5153 * //=> Sun Sep 07 2014 00:00:00 5154 */ 5155function setDay(date, day, options) { 5156 const defaultOptions = (0, _index.getDefaultOptions)(); 5157 const weekStartsOn = 5158 options?.weekStartsOn ?? 5159 options?.locale?.options?.weekStartsOn ?? 5160 defaultOptions.weekStartsOn ?? 5161 defaultOptions.locale?.options?.weekStartsOn ?? 5162 0; 5163 5164 const date_ = (0, _index3.toDate)(date, options?.in); 5165 const currentDay = date_.getDay(); 5166 5167 const remainder = day % 7; 5168 const dayIndex = (remainder + 7) % 7; 5169 5170 const delta = 7 - weekStartsOn; 5171 const diff = 5172 day < 0 || day > 6 5173 ? day - ((currentDay + delta) % 7) 5174 : ((dayIndex + delta) % 7) - ((currentDay + delta) % 7); 5175 return (0, _index2.addDays)(date_, diff, options); 5176} 5177 5178 5179/***/ }, 5180 5181/***/ "../../node_modules/date-fns/setDayOfYear.cjs" 5182/*!****************************************************!*\ 5183 !*** ../../node_modules/date-fns/setDayOfYear.cjs ***! 5184 \****************************************************/ 5185(__unused_webpack_module, exports, __webpack_require__) { 5186 5187 5188exports.setDayOfYear = setDayOfYear; 5189var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5190 5191/** 5192 * The {@link setDayOfYear} function options. 5193 */ 5194 5195/** 5196 * @name setDayOfYear 5197 * @category Day Helpers 5198 * @summary Set the day of the year to the given date. 5199 * 5200 * @description 5201 * Set the day of the year to the given date. 5202 * 5203 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5204 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5205 * 5206 * @param date - The date to be changed 5207 * @param dayOfYear - The day of the year of the new date 5208 * @param options - An object with options 5209 * 5210 * @returns The new date with the day of the year set 5211 * 5212 * @example 5213 * // Set the 2nd day of the year to 2 July 2014: 5214 * const result = setDayOfYear(new Date(2014, 6, 2), 2) 5215 * //=> Thu Jan 02 2014 00:00:00 5216 */ 5217function setDayOfYear(date, dayOfYear, options) { 5218 const date_ = (0, _index.toDate)(date, options?.in); 5219 date_.setMonth(0); 5220 date_.setDate(dayOfYear); 5221 return date_; 5222} 5223 5224 5225/***/ }, 5226 5227/***/ "../../node_modules/date-fns/setDefaultOptions.cjs" 5228/*!*********************************************************!*\ 5229 !*** ../../node_modules/date-fns/setDefaultOptions.cjs ***! 5230 \*********************************************************/ 5231(__unused_webpack_module, exports, __webpack_require__) { 5232 5233 5234exports.setDefaultOptions = setDefaultOptions; 5235var _index = __webpack_require__(/*! ./_lib/defaultOptions.cjs */ "../../node_modules/date-fns/_lib/defaultOptions.cjs"); 5236 5237/** 5238 * @name setDefaultOptions 5239 * @category Common Helpers 5240 * @summary Set default options including locale. 5241 * @pure false 5242 * 5243 * @description 5244 * Sets the defaults for 5245 * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate` 5246 * arguments for all functions. 5247 * 5248 * @param options - An object with options 5249 * 5250 * @example 5251 * // Set global locale: 5252 * import { es } from 'date-fns/locale' 5253 * setDefaultOptions({ locale: es }) 5254 * const result = format(new Date(2014, 8, 2), 'PPPP') 5255 * //=> 'martes, 2 de septiembre de 2014' 5256 * 5257 * @example 5258 * // Start of the week for 2 September 2014: 5259 * const result = startOfWeek(new Date(2014, 8, 2)) 5260 * //=> Sun Aug 31 2014 00:00:00 5261 * 5262 * @example 5263 * // Start of the week for 2 September 2014, 5264 * // when we set that week starts on Monday by default: 5265 * setDefaultOptions({ weekStartsOn: 1 }) 5266 * const result = startOfWeek(new Date(2014, 8, 2)) 5267 * //=> Mon Sep 01 2014 00:00:00 5268 * 5269 * @example 5270 * // Manually set options take priority over default options: 5271 * setDefaultOptions({ weekStartsOn: 1 }) 5272 * const result = startOfWeek(new Date(2014, 8, 2), { weekStartsOn: 0 }) 5273 * //=> Sun Aug 31 2014 00:00:00 5274 * 5275 * @example 5276 * // Remove the option by setting it to `undefined`: 5277 * setDefaultOptions({ weekStartsOn: 1 }) 5278 * setDefaultOptions({ weekStartsOn: undefined }) 5279 * const result = startOfWeek(new Date(2014, 8, 2)) 5280 * //=> Sun Aug 31 2014 00:00:00 5281 */ 5282function setDefaultOptions(options) { 5283 const result = {}; 5284 const defaultOptions = (0, _index.getDefaultOptions)(); 5285 5286 for (const property in defaultOptions) { 5287 if (Object.prototype.hasOwnProperty.call(defaultOptions, property)) { 5288 // [TODO] I challenge you to fix the type 5289 result[property] = defaultOptions[property]; 5290 } 5291 } 5292 5293 for (const property in options) { 5294 if (Object.prototype.hasOwnProperty.call(options, property)) { 5295 if (options[property] === undefined) { 5296 // [TODO] I challenge you to fix the type 5297 delete result[property]; 5298 } else { 5299 // [TODO] I challenge you to fix the type 5300 result[property] = options[property]; 5301 } 5302 } 5303 } 5304 5305 (0, _index.setDefaultOptions)(result); 5306} 5307 5308 5309/***/ }, 5310 5311/***/ "../../node_modules/date-fns/setHours.cjs" 5312/*!************************************************!*\ 5313 !*** ../../node_modules/date-fns/setHours.cjs ***! 5314 \************************************************/ 5315(__unused_webpack_module, exports, __webpack_require__) { 5316 5317 5318exports.setHours = setHours; 5319var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5320 5321/** 5322 * The {@link setHours} function options. 5323 */ 5324 5325/** 5326 * @name setHours 5327 * @category Hour Helpers 5328 * @summary Set the hours to the given date. 5329 * 5330 * @description 5331 * Set the hours to the given date. 5332 * 5333 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5334 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5335 * 5336 * @param date - The date to be changed 5337 * @param hours - The hours of the new date 5338 * @param options - An object with options 5339 * 5340 * @returns The new date with the hours set 5341 * 5342 * @example 5343 * // Set 4 hours to 1 September 2014 11:30:00: 5344 * const result = setHours(new Date(2014, 8, 1, 11, 30), 4) 5345 * //=> Mon Sep 01 2014 04:30:00 5346 */ 5347function setHours(date, hours, options) { 5348 const _date = (0, _index.toDate)(date, options?.in); 5349 _date.setHours(hours); 5350 return _date; 5351} 5352 5353 5354/***/ }, 5355 5356/***/ "../../node_modules/date-fns/setISODay.cjs" 5357/*!*************************************************!*\ 5358 !*** ../../node_modules/date-fns/setISODay.cjs ***! 5359 \*************************************************/ 5360(__unused_webpack_module, exports, __webpack_require__) { 5361 5362 5363exports.setISODay = setISODay; 5364var _index = __webpack_require__(/*! ./addDays.cjs */ "../../node_modules/date-fns/addDays.cjs"); 5365var _index2 = __webpack_require__(/*! ./getISODay.cjs */ "../../node_modules/date-fns/getISODay.cjs"); 5366var _index3 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5367 5368/** 5369 * The {@link setISODay} function options. 5370 */ 5371 5372/** 5373 * @name setISODay 5374 * @category Weekday Helpers 5375 * @summary Set the day of the ISO week to the given date. 5376 * 5377 * @description 5378 * Set the day of the ISO week to the given date. 5379 * ISO week starts with Monday. 5380 * 7 is the index of Sunday, 1 is the index of Monday, etc. 5381 * 5382 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5383 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5384 * 5385 * @param date - The date to be changed 5386 * @param day - The day of the ISO week of the new date 5387 * @param options - An object with options 5388 * 5389 * @returns The new date with the day of the ISO week set 5390 * 5391 * @example 5392 * // Set Sunday to 1 September 2014: 5393 * const result = setISODay(new Date(2014, 8, 1), 7) 5394 * //=> Sun Sep 07 2014 00:00:00 5395 */ 5396function setISODay(date, day, options) { 5397 const date_ = (0, _index3.toDate)(date, options?.in); 5398 const currentDay = (0, _index2.getISODay)(date_, options); 5399 const diff = day - currentDay; 5400 return (0, _index.addDays)(date_, diff, options); 5401} 5402 5403 5404/***/ }, 5405 5406/***/ "../../node_modules/date-fns/setISOWeek.cjs" 5407/*!**************************************************!*\ 5408 !*** ../../node_modules/date-fns/setISOWeek.cjs ***! 5409 \**************************************************/ 5410(__unused_webpack_module, exports, __webpack_require__) { 5411 5412 5413exports.setISOWeek = setISOWeek; 5414var _index = __webpack_require__(/*! ./getISOWeek.cjs */ "../../node_modules/date-fns/getISOWeek.cjs"); 5415var _index2 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5416 5417/** 5418 * The {@link setISOWeek} function options. 5419 */ 5420 5421/** 5422 * @name setISOWeek 5423 * @category ISO Week Helpers 5424 * @summary Set the ISO week to the given date. 5425 * 5426 * @description 5427 * Set the ISO week to the given date, saving the weekday number. 5428 * 5429 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 5430 * 5431 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5432 * @typeParam ResultDate - The `Date` type of the context function. 5433 * 5434 * @param date - The date to be changed 5435 * @param week - The ISO week of the new date 5436 * @param options - An object with options 5437 * 5438 * @returns The new date with the ISO week set 5439 * 5440 * @example 5441 * // Set the 53rd ISO week to 7 August 2004: 5442 * const result = setISOWeek(new Date(2004, 7, 7), 53) 5443 * //=> Sat Jan 01 2005 00:00:00 5444 */ 5445function setISOWeek(date, week, options) { 5446 const _date = (0, _index2.toDate)(date, options?.in); 5447 const diff = (0, _index.getISOWeek)(_date, options) - week; 5448 _date.setDate(_date.getDate() - diff * 7); 5449 return _date; 5450} 5451 5452 5453/***/ }, 5454 5455/***/ "../../node_modules/date-fns/setISOWeekYear.cjs" 5456/*!******************************************************!*\ 5457 !*** ../../node_modules/date-fns/setISOWeekYear.cjs ***! 5458 \******************************************************/ 5459(__unused_webpack_module, exports, __webpack_require__) { 5460 5461 5462exports.setISOWeekYear = setISOWeekYear; 5463var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 5464var _index2 = __webpack_require__(/*! ./differenceInCalendarDays.cjs */ "../../node_modules/date-fns/differenceInCalendarDays.cjs"); 5465var _index3 = __webpack_require__(/*! ./startOfISOWeekYear.cjs */ "../../node_modules/date-fns/startOfISOWeekYear.cjs"); 5466var _index4 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5467 5468/** 5469 * The {@link setISOWeekYear} function options. 5470 */ 5471 5472/** 5473 * @name setISOWeekYear 5474 * @category ISO Week-Numbering Year Helpers 5475 * @summary Set the ISO week-numbering year to the given date. 5476 * 5477 * @description 5478 * Set the ISO week-numbering year to the given date, 5479 * saving the week number and the weekday number. 5480 * 5481 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 5482 * 5483 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc). 5484 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5485 * 5486 * @param date - The date to be changed 5487 * @param weekYear - The ISO week-numbering year of the new date 5488 * @param options - An object with options 5489 * 5490 * @returns The new date with the ISO week-numbering year set 5491 * 5492 * @example 5493 * // Set ISO week-numbering year 2007 to 29 December 2008: 5494 * const result = setISOWeekYear(new Date(2008, 11, 29), 2007) 5495 * //=> Mon Jan 01 2007 00:00:00 5496 */ 5497function setISOWeekYear(date, weekYear, options) { 5498 let _date = (0, _index4.toDate)(date, options?.in); 5499 const diff = (0, _index2.differenceInCalendarDays)( 5500 _date, 5501 (0, _index3.startOfISOWeekYear)(_date, options), 5502 ); 5503 const fourthOfJanuary = (0, _index.constructFrom)(options?.in || date, 0); 5504 fourthOfJanuary.setFullYear(weekYear, 0, 4); 5505 fourthOfJanuary.setHours(0, 0, 0, 0); 5506 _date = (0, _index3.startOfISOWeekYear)(fourthOfJanuary); 5507 _date.setDate(_date.getDate() + diff); 5508 return _date; 5509} 5510 5511 5512/***/ }, 5513 5514/***/ "../../node_modules/date-fns/setMilliseconds.cjs" 5515/*!*******************************************************!*\ 5516 !*** ../../node_modules/date-fns/setMilliseconds.cjs ***! 5517 \*******************************************************/ 5518(__unused_webpack_module, exports, __webpack_require__) { 5519 5520 5521exports.setMilliseconds = setMilliseconds; 5522var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5523 5524/** 5525 * The {@link setMilliseconds} function options. 5526 */ 5527 5528/** 5529 * @name setMilliseconds 5530 * @category Millisecond Helpers 5531 * @summary Set the milliseconds to the given date. 5532 * 5533 * @description 5534 * Set the milliseconds to the given date. 5535 * 5536 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5537 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5538 * 5539 * @param date - The date to be changed 5540 * @param milliseconds - The milliseconds of the new date 5541 * @param options - The options 5542 * 5543 * @returns The new date with the milliseconds set 5544 * 5545 * @example 5546 * // Set 300 milliseconds to 1 September 2014 11:30:40.500: 5547 * const result = setMilliseconds(new Date(2014, 8, 1, 11, 30, 40, 500), 300) 5548 * //=> Mon Sep 01 2014 11:30:40.300 5549 */ 5550function setMilliseconds(date, milliseconds, options) { 5551 const _date = (0, _index.toDate)(date, options?.in); 5552 _date.setMilliseconds(milliseconds); 5553 return _date; 5554} 5555 5556 5557/***/ }, 5558 5559/***/ "../../node_modules/date-fns/setMinutes.cjs" 5560/*!**************************************************!*\ 5561 !*** ../../node_modules/date-fns/setMinutes.cjs ***! 5562 \**************************************************/ 5563(__unused_webpack_module, exports, __webpack_require__) { 5564 5565 5566exports.setMinutes = setMinutes; 5567var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5568 5569/** 5570 * The {@link setMinutes} function options. 5571 */ 5572 5573/** 5574 * @name setMinutes 5575 * @category Minut
5575e Helpers 5576 * @summary Set the minutes to the given date. 5577 * 5578 * @description 5579 * Set the minutes to the given date. 5580 * 5581 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc). 5582 * @typeParam ResultDate - The result `Date` type, returned from the context function, or inferred from the arguments. 5583 * 5584 * @param date - The date to be changed 5585 * @param minutes - The minutes of the new date 5586 * @param options - An object with options 5587 * 5588 * @returns The new date with the minutes set 5589 * 5590 * @example 5591 * // Set 45 minutes to 1 September 2014 11:30:40: 5592 * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45) 5593 * //=> Mon Sep 01 2014 11:45:40 5594 */ 5595function setMinutes(date, minutes, options) { 5596 const date_ = (0, _index.toDate)(date, options?.in); 5597 date_.setMinutes(minutes); 5598 return date_; 5599} 5600 5601 5602/***/ }, 5603 5604/***/ "../../node_modules/date-fns/setMonth.cjs" 5605/*!************************************************!*\ 5606 !*** ../../node_modules/date-fns/setMonth.cjs ***! 5607 \************************************************/ 5608(__unused_webpack_module, exports, __webpack_require__) { 5609 5610 5611exports.setMonth = setMonth; 5612var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 5613var _index2 = __webpack_require__(/*! ./getDaysInMonth.cjs */ "../../node_modules/date-fns/getDaysInMonth.cjs"); 5614var _index3 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5615 5616/** 5617 * The {@link setMonth} function options. 5618 */ 5619 5620/** 5621 * @name setMonth 5622 * @category Month Helpers 5623 * @summary Set the month to the given date. 5624 * 5625 * @description 5626 * Set the month to the given date. 5627 * 5628 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5629 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5630 * 5631 * @param date - The date to be changed 5632 * @param month - The month index to set (0-11) 5633 * @param options - The options 5634 * 5635 * @returns The new date with the month set 5636 * 5637 * @example 5638 * // Set February to 1 September 2014: 5639 * const result = setMonth(new Date(2014, 8, 1), 1) 5640 * //=> Sat Feb 01 2014 00:00:00 5641 */ 5642function setMonth(date, month, options) { 5643 const _date = (0, _index3.toDate)(date, options?.in); 5644 const year = _date.getFullYear(); 5645 const day = _date.getDate(); 5646 5647 const midMonth = (0, _index.constructFrom)(options?.in || date, 0); 5648 midMonth.setFullYear(year, month, 15); 5649 midMonth.setHours(0, 0, 0, 0); 5650 const daysInMonth = (0, _index2.getDaysInMonth)(midMonth); 5651 5652 // Set the earlier date, allows to wrap Jan 31 to Feb 28 5653 _date.setMonth(month, Math.min(day, daysInMonth)); 5654 return _date; 5655} 5656 5657 5658/***/ }, 5659 5660/***/ "../../node_modules/date-fns/setQuarter.cjs" 5661/*!**************************************************!*\ 5662 !*** ../../node_modules/date-fns/setQuarter.cjs ***! 5663 \**************************************************/ 5664(__unused_webpack_module, exports, __webpack_require__) { 5665 5666 5667exports.setQuarter = setQuarter; 5668var _index = __webpack_require__(/*! ./setMonth.cjs */ "../../node_modules/date-fns/setMonth.cjs"); 5669var _index2 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5670 5671/** 5672 * The {@link setQuarter} function options. 5673 */ 5674 5675/** 5676 * @name setQuarter 5677 * @category Quarter Helpers 5678 * @summary Set the year quarter to the given date. 5679 * 5680 * @description 5681 * Set the year quarter to the given date. 5682 * 5683 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5684 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5685 * 5686 * @param date - The date to be changed 5687 * @param quarter - The quarter of the new date 5688 * @param options - The options 5689 * 5690 * @returns The new date with the quarter set 5691 * 5692 * @example 5693 * // Set the 2nd quarter to 2 July 2014: 5694 * const result = setQuarter(new Date(2014, 6, 2), 2) 5695 * //=> Wed Apr 02 2014 00:00:00 5696 */ 5697function setQuarter(date, quarter, options) { 5698 const date_ = (0, _index2.toDate)(date, options?.in); 5699 const oldQuarter = Math.trunc(date_.getMonth() / 3) + 1; 5700 const diff = quarter - oldQuarter; 5701 return (0, _index.setMonth)(date_, date_.getMonth() + diff * 3); 5702} 5703 5704 5705/***/ }, 5706 5707/***/ "../../node_modules/date-fns/setSeconds.cjs" 5708/*!**************************************************!*\ 5709 !*** ../../node_modules/date-fns/setSeconds.cjs ***! 5710 \**************************************************/ 5711(__unused_webpack_module, exports, __webpack_require__) { 5712 5713 5714exports.setSeconds = setSeconds; 5715var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5716 5717/** 5718 * The {@link setSeconds} function options. 5719 */ 5720 5721/** 5722 * @name setSeconds 5723 * @category Second Helpers 5724 * @summary Set the seconds to the given date, with context support. 5725 * 5726 * @description 5727 * Set the seconds to the given date, with an optional context for time zone specification. 5728 * 5729 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5730 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5731 * 5732 * @param date - The date to be changed 5733 * @param seconds - The seconds of the new date 5734 * @param options - An object with options 5735 * 5736 * @returns The new date with the seconds set 5737 * 5738 * @example 5739 * // Set 45 seconds to 1 September 2014 11:30:40: 5740 * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45) 5741 * //=> Mon Sep 01 2014 11:30:45 5742 */ 5743function setSeconds(date, seconds, options) { 5744 const _date = (0, _index.toDate)(date, options?.in); 5745 _date.setSeconds(seconds); 5746 return _date; 5747} 5748 5749 5750/***/ }, 5751 5752/***/ "../../node_modules/date-fns/setWeek.cjs" 5753/*!***********************************************!*\ 5754 !*** ../../node_modules/date-fns/setWeek.cjs ***! 5755 \***********************************************/ 5756(__unused_webpack_module, exports, __webpack_require__) { 5757 5758 5759exports.setWeek = setWeek; 5760var _index = __webpack_require__(/*! ./getWeek.cjs */ "../../node_modules/date-fns/getWeek.cjs"); 5761var _index2 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5762 5763/** 5764 * The {@link setWeek} function options. 5765 */ 5766 5767/** 5768 * @name setWeek 5769 * @category Week Helpers 5770 * @summary Set the local week to the given date. 5771 * 5772 * @description 5773 * Set the local week to the given date, saving the weekday number. 5774 * The exact calculation depends on the values of 5775 * `options.weekStartsOn` (which is the index of the first day of the week) 5776 * and `options.firstWeekContainsDate` (which is the day of January, which is always in 5777 * the first week of the week-numbering year) 5778 * 5779 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system 5780 * 5781 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5782 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5783 * 5784 * @param date - The date to be changed 5785 * @param week - The week of the new date 5786 * @param options - An object with options 5787 * 5788 * @returns The new date with the local week set 5789 * 5790 * @example 5791 * // Set the 1st week to 2 January 2005 with default options: 5792 * const result = setWeek(new Date(2005, 0, 2), 1) 5793 * //=> Sun Dec 26 2004 00:00:00 5794 * 5795 * @example 5796 * // Set the 1st week to 2 January 2005, 5797 * // if Monday is the first day of the week,
vendor: 16,384 bytes, lines 5798-6254
5798 * // and the first week of the year always contains 4 January: 5799 * const result = setWeek(new Date(2005, 0, 2), 1, { 5800 * weekStartsOn: 1, 5801 * firstWeekContainsDate: 4 5802 * }) 5803 * //=> Sun Jan 4 2004 00:00:00 5804 */ 5805function setWeek(date, week, options) { 5806 const date_ = (0, _index2.toDate)(date, options?.in); 5807 const diff = (0, _index.getWeek)(date_, options) - week; 5808 date_.setDate(date_.getDate() - diff * 7); 5809 return (0, _index2.toDate)(date_, options?.in); 5810} 5811 5812 5813/***/ }, 5814 5815/***/ "../../node_modules/date-fns/setWeekYear.cjs" 5816/*!***************************************************!*\ 5817 !*** ../../node_modules/date-fns/setWeekYear.cjs ***! 5818 \***************************************************/ 5819(__unused_webpack_module, exports, __webpack_require__) { 5820 5821 5822exports.setWeekYear = setWeekYear; 5823var _index = __webpack_require__(/*! ./_lib/defaultOptions.cjs */ "../../node_modules/date-fns/_lib/defaultOptions.cjs"); 5824var _index2 = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 5825var _index3 = __webpack_require__(/*! ./differenceInCalendarDays.cjs */ "../../node_modules/date-fns/differenceInCalendarDays.cjs"); 5826var _index4 = __webpack_require__(/*! ./startOfWeekYear.cjs */ "../../node_modules/date-fns/startOfWeekYear.cjs"); 5827var _index5 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5828 5829/** 5830 * The {@link setWeekYear} function options. 5831 */ 5832 5833/** 5834 * @name setWeekYear 5835 * @category Week-Numbering Year Helpers 5836 * @summary Set the local week-numbering year to the given date. 5837 * 5838 * @description 5839 * Set the local week-numbering year to the given date, 5840 * saving the week number and the weekday number. 5841 * The exact calculation depends on the values of 5842 * `options.weekStartsOn` (which is the index of the first day of the week) 5843 * and `options.firstWeekContainsDate` (which is the day of January, which is always in 5844 * the first week of the week-numbering year) 5845 * 5846 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system 5847 * 5848 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5849 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5850 * 5851 * @param date - The date to be changed 5852 * @param weekYear - The local week-numbering year of the new date 5853 * @param options - An object with options 5854 * 5855 * @returns The new date with the local week-numbering year set 5856 * 5857 * @example 5858 * // Set the local week-numbering year 2004 to 2 January 2010 with default options: 5859 * const result = setWeekYear(new Date(2010, 0, 2), 2004) 5860 * //=> Sat Jan 03 2004 00:00:00 5861 * 5862 * @example 5863 * // Set the local week-numbering year 2004 to 2 January 2010, 5864 * // if Monday is the first day of week 5865 * // and 4 January is always in the first week of the year: 5866 * const result = setWeekYear(new Date(2010, 0, 2), 2004, { 5867 * weekStartsOn: 1, 5868 * firstWeekContainsDate: 4 5869 * }) 5870 * //=> Sat Jan 01 2005 00:00:00 5871 */ 5872function setWeekYear(date, weekYear, options) { 5873 const defaultOptions = (0, _index.getDefaultOptions)(); 5874 const firstWeekContainsDate = 5875 options?.firstWeekContainsDate ?? 5876 options?.locale?.options?.firstWeekContainsDate ?? 5877 defaultOptions.firstWeekContainsDate ?? 5878 defaultOptions.locale?.options?.firstWeekContainsDate ?? 5879 1; 5880 5881 const diff = (0, _index3.differenceInCalendarDays)( 5882 (0, _index5.toDate)(date, options?.in), 5883 (0, _index4.startOfWeekYear)(date, options), 5884 options, 5885 ); 5886 5887 const firstWeek = (0, _index2.constructFrom)(options?.in || date, 0); 5888 firstWeek.setFullYear(weekYear, 0, firstWeekContainsDate); 5889 firstWeek.setHours(0, 0, 0, 0); 5890 5891 const date_ = (0, _index4.startOfWeekYear)(firstWeek, options); 5892 date_.setDate(date_.getDate() + diff); 5893 return date_; 5894} 5895 5896 5897/***/ }, 5898 5899/***/ "../../node_modules/date-fns/setYear.cjs" 5900/*!***********************************************!*\ 5901 !*** ../../node_modules/date-fns/setYear.cjs ***! 5902 \***********************************************/ 5903(__unused_webpack_module, exports, __webpack_require__) { 5904 5905 5906exports.setYear = setYear; 5907var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 5908var _index2 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5909 5910/** 5911 * The {@link setYear} function options. 5912 */ 5913 5914/** 5915 * @name setYear 5916 * @category Year Helpers 5917 * @summary Set the year to the given date. 5918 * 5919 * @description 5920 * Set the year to the given date. 5921 * 5922 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5923 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5924 * 5925 * @param date - The date to be changed 5926 * @param year - The year of the new date 5927 * @param options - An object with options. 5928 * 5929 * @returns The new date with the year set 5930 * 5931 * @example 5932 * // Set year 2013 to 1 September 2014: 5933 * const result = setYear(new Date(2014, 8, 1), 2013) 5934 * //=> Sun Sep 01 2013 00:00:00 5935 */ 5936function setYear(date, year, options) { 5937 const date_ = (0, _index2.toDate)(date, options?.in); 5938 5939 // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date 5940 if (isNaN(+date_)) return (0, _index.constructFrom)(options?.in || date, NaN); 5941 5942 date_.setFullYear(year); 5943 return date_; 5944} 5945 5946 5947/***/ }, 5948 5949/***/ "../../node_modules/date-fns/startOfDay.cjs" 5950/*!**************************************************!*\ 5951 !*** ../../node_modules/date-fns/startOfDay.cjs ***! 5952 \**************************************************/ 5953(__unused_webpack_module, exports, __webpack_require__) { 5954 5955 5956exports.startOfDay = startOfDay; 5957var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 5958 5959/** 5960 * The {@link startOfDay} function options. 5961 */ 5962 5963/** 5964 * @name startOfDay 5965 * @category Day Helpers 5966 * @summary Return the start of a day for the given date. 5967 * 5968 * @description 5969 * Return the start of a day for the given date. 5970 * The result will be in the local timezone. 5971 * 5972 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 5973 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 5974 * 5975 * @param date - The original date 5976 * @param options - The options 5977 * 5978 * @returns The start of a day 5979 * 5980 * @example 5981 * // The start of a day for 2 September 2014 11:55:00: 5982 * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0)) 5983 * //=> Tue Sep 02 2014 00:00:00 5984 */ 5985function startOfDay(date, options) { 5986 const _date = (0, _index.toDate)(date, options?.in); 5987 _date.setHours(0, 0, 0, 0); 5988 return _date; 5989} 5990 5991 5992/***/ }, 5993 5994/***/ "../../node_modules/date-fns/startOfDecade.cjs" 5995/*!*****************************************************!*\ 5996 !*** ../../node_modules/date-fns/startOfDecade.cjs ***! 5997 \*****************************************************/ 5998(__unused_webpack_module, exports, __webpack_require__) { 5999 6000 6001exports.startOfDecade = startOfDecade; 6002var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 6003 6004/** 6005 * The {@link startOfDecade} options. 6006 */ 6007 6008/** 6009 * @name startOfDecade 6010 * @category Decade Helpers 6011 * @summary Return the start of a decade for the given date. 6012 * 6013 * @description 6014 * Return the start of a decade for the given date. 6015 * 6016 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6017 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6018 * 6019 * @param date - The original date 6020 * @param options - An object with options 6021 * 6022 * @returns The start of a decade 6023 * 6024 * @example 6025 * // The start of a decade for 21 October 2015 00:00:00: 6026 * const result = startOfDecade(new Date(2015, 9, 21, 00, 00, 00)) 6027 * //=> Jan 01 2010 00:00:00 6028 */ 6029function startOfDecade(date, options) { 6030 // TODO: Switch to more technical definition in of decades that start with 1 6031 // end with 0. I.e. 2001-2010 instead of current 2000-2009. It's a breaking 6032 // change, so it can only be done in 4.0. 6033 const _date = (0, _index.toDate)(date, options?.in); 6034 const year = _date.getFullYear(); 6035 const decade = Math.floor(year / 10) * 10; 6036 _date.setFullYear(decade, 0, 1); 6037 _date.setHours(0, 0, 0, 0); 6038 return _date; 6039} 6040 6041 6042/***/ }, 6043 6044/***/ "../../node_modules/date-fns/startOfHour.cjs" 6045/*!***************************************************!*\ 6046 !*** ../../node_modules/date-fns/startOfHour.cjs ***! 6047 \***************************************************/ 6048(__unused_webpack_module, exports, __webpack_require__) { 6049 6050 6051exports.startOfHour = startOfHour; 6052var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 6053 6054/** 6055 * The {@link startOfHour} function options. 6056 */ 6057 6058/** 6059 * @name startOfHour 6060 * @category Hour Helpers 6061 * @summary Return the start of an hour for the given date. 6062 * 6063 * @description 6064 * Return the start of an hour for the given date. 6065 * The result will be in the local timezone. 6066 * 6067 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6068 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6069 * 6070 * @param date - The original date 6071 * @param options - An object with options 6072 * 6073 * @returns The start of an hour 6074 * 6075 * @example 6076 * // The start of an hour for 2 September 2014 11:55:00: 6077 * const result = startOfHour(new Date(2014, 8, 2, 11, 55)) 6078 * //=> Tue Sep 02 2014 11:00:00 6079 */ 6080function startOfHour(date, options) { 6081 const _date = (0, _index.toDate)(date, options?.in); 6082 _date.setMinutes(0, 0, 0); 6083 return _date; 6084} 6085 6086 6087/***/ }, 6088 6089/***/ "../../node_modules/date-fns/startOfISOWeek.cjs" 6090/*!******************************************************!*\ 6091 !*** ../../node_modules/date-fns/startOfISOWeek.cjs ***! 6092 \******************************************************/ 6093(__unused_webpack_module, exports, __webpack_require__) { 6094 6095 6096exports.startOfISOWeek = startOfISOWeek; 6097var _index = __webpack_require__(/*! ./startOfWeek.cjs */ "../../node_modules/date-fns/startOfWeek.cjs"); 6098 6099/** 6100 * The {@link startOfISOWeek} function options. 6101 */ 6102 6103/** 6104 * @name startOfISOWeek 6105 * @category ISO Week Helpers 6106 * @summary Return the start of an ISO week for the given date. 6107 * 6108 * @description 6109 * Return the start of an ISO week for the given date. 6110 * The result will be in the local timezone. 6111 * 6112 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 6113 * 6114 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6115 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6116 * 6117 * @param date - The original date 6118 * @param options - An object with options 6119 * 6120 * @returns The start of an ISO week 6121 * 6122 * @example 6123 * // The start of an ISO week for 2 September 2014 11:55:00: 6124 * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) 6125 * //=> Mon Sep 01 2014 00:00:00 6126 */ 6127function startOfISOWeek(date, options) { 6128 return (0, _index.startOfWeek)(date, { ...options, weekStartsOn: 1 }); 6129} 6130 6131 6132/***/ }, 6133 6134/***/ "../../node_modules/date-fns/startOfISOWeekYear.cjs" 6135/*!**********************************************************!*\ 6136 !*** ../../node_modules/date-fns/startOfISOWeekYear.cjs ***! 6137 \**********************************************************/ 6138(__unused_webpack_module, exports, __webpack_require__) { 6139 6140 6141exports.startOfISOWeekYear = startOfISOWeekYear; 6142var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 6143var _index2 = __webpack_require__(/*! ./getISOWeekYear.cjs */ "../../node_modules/date-fns/getISOWeekYear.cjs"); 6144var _index3 = __webpack_require__(/*! ./startOfISOWeek.cjs */ "../../node_modules/date-fns/startOfISOWeek.cjs"); 6145 6146/** 6147 * The {@link startOfISOWeekYear} function options. 6148 */ 6149 6150/** 6151 * @name startOfISOWeekYear 6152 * @category ISO Week-Numbering Year Helpers 6153 * @summary Return the start of an ISO week-numbering year for the given date. 6154 * 6155 * @description 6156 * Return the start of an ISO week-numbering year, 6157 * which always starts 3 days before the year's first Thursday. 6158 * The result will be in the local timezone. 6159 * 6160 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 6161 * 6162 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6163 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6164 * 6165 * @param date - The original date 6166 * @param options - An object with options 6167 * 6168 * @returns The start of an ISO week-numbering year 6169 * 6170 * @example 6171 * // The start of an ISO week-numbering year for 2 July 2005: 6172 * const result = startOfISOWeekYear(new Date(2005, 6, 2)) 6173 * //=> Mon Jan 03 2005 00:00:00 6174 */ 6175function startOfISOWeekYear(date, options) { 6176 const year = (0, _index2.getISOWeekYear)(date, options); 6177 const fourthOfJanuary = (0, _index.constructFrom)(options?.in || date, 0); 6178 fourthOfJanuary.setFullYear(year, 0, 4); 6179 fourthOfJanuary.setHours(0, 0, 0, 0); 6180 return (0, _index3.startOfISOWeek)(fourthOfJanuary); 6181} 6182 6183 6184/***/ }, 6185 6186/***/ "../../node_modules/date-fns/startOfMinute.cjs" 6187/*!*****************************************************!*\ 6188 !*** ../../node_modules/date-fns/startOfMinute.cjs ***! 6189 \*****************************************************/ 6190(__unused_webpack_module, exports, __webpack_require__) { 6191 6192 6193exports.startOfMinute = startOfMinute; 6194var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 6195 6196/** 6197 * The {@link startOfMinute} function options. 6198 */ 6199 6200/** 6201 * @name startOfMinute 6202 * @category Minute Helpers 6203 * @summary Return the start of a minute for the given date. 6204 * 6205 * @description 6206 * Return the start of a minute for the given date. 6207 * The result will be in the local timezone. 6208 * 6209 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6210 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6211 * 6212 * @param date - The original date 6213 * @param options - An object with options 6214 * 6215 * @returns The start of a minute 6216 * 6217 * @example 6218 * // The start of a minute for 1 December 2014 22:15:45.400: 6219 * const result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400)) 6220 * //=> Mon Dec 01 2014 22:15:00 6221 */ 6222function startOfMinute(date, options) { 6223 const date_ = (0, _index.toDate)(date, options?.in); 6224 date_.setSeconds(0, 0); 6225 return date_; 6226} 6227 6228 6229/***/ }, 6230 6231/***/ "../../node_modules/date-fns/startOfMonth.cjs" 6232/*!****************************************************!*\ 6233 !*** ../../node_modules/date-fns/startOfMonth.cjs ***! 6234 \****************************************************/ 6235(__unused_webpack_module, exports, __webpack_require__) { 6236 6237 6238exports.startOfMonth = startOfMonth; 6239var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 6240 6241/** 6242 * The {@link startOfMonth} function options. 6243 */ 6244 6245/** 6246 * @name startOfMonth 6247 * @category Month Helpers 6248 * @summary Return the start of a month for the given date. 6249 * 6250 * @description 6251 * Return the start of a month for the given date. The result will be in the local timezone. 6252 * 6253 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. 6254 * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc)
6254. 6255 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, 6256 * or inferred from the arguments. 6257 * 6258 * @param date - The original date 6259 * @param options - An object with options 6260 * 6261 * @returns The start of a month 6262 * 6263 * @example 6264 * // The start of a month for 2 September 2014 11:55:00: 6265 * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0)) 6266 * //=> Mon Sep 01 2014 00:00:00 6267 */ 6268function startOfMonth(date, options) { 6269 const _date = (0, _index.toDate)(date, options?.in); 6270 _date.setDate(1); 6271 _date.setHours(0, 0, 0, 0); 6272 return _date; 6273} 6274 6275 6276/***/ }, 6277 6278/***/ "../../node_modules/date-fns/startOfQuarter.cjs" 6279/*!******************************************************!*\ 6280 !*** ../../node_modules/date-fns/startOfQuarter.cjs ***! 6281 \******************************************************/ 6282(__unused_webpack_module, exports, __webpack_require__) { 6283 6284 6285exports.startOfQuarter = startOfQuarter; 6286var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 6287 6288/** 6289 * The {@link startOfQuarter} function options. 6290 */ 6291 6292/** 6293 * @name startOfQuarter 6294 * @category Quarter Helpers 6295 * @summary Return the start of a year quarter for the given date. 6296 * 6297 * @description 6298 * Return the start of a year quarter for the given date. 6299 * The result will be in the local timezone. 6300 * 6301 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6302 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6303 * 6304 * @param date - The original date 6305 * @param options - The options 6306 * 6307 * @returns The start of a quarter 6308 * 6309 * @example 6310 * // The start of a quarter for 2 September 2014 11:55:00: 6311 * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0)) 6312 * //=> Tue Jul 01 2014 00:00:00 6313 */ 6314function startOfQuarter(date, options) { 6315 const _date = (0, _index.toDate)(date, options?.in); 6316 const currentMonth = _date.getMonth();
6317 const month = currentMonth - (currentMonth % 3); 6318 _date.setMonth(month, 1); 6319 _date.setHours(0, 0, 0, 0); 6320 return _date; 6321} 6322 6323 6324/***/ }, 6325 6326/***/ "../../node_modules/date-fns/startOfSecond.cjs" 6327/*!*****************************************************!*\ 6328 !*** ../../node_modules/date-fns/startOfSecond.cjs ***! 6329 \*****************************************************/ 6330(__unused_webpack_module, exports, __webpack_require__) { 6331 6332 6333exports.startOfSecond = startOfSecond; 6334var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 6335 6336/** 6337 * The {@link startOfSecond} function options. 6338 */ 6339 6340/** 6341 * @name startOfSecond 6342 * @category Second Helpers 6343 * @summary Return the start of a second for the given date. 6344 * 6345 * @description 6346 * Return the start of a second for the given date. 6347 * The result will be in the local timezone. 6348 * 6349 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6350 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6351 * 6352 * @param date - The original date 6353 * @param options - The options 6354 * 6355 * @returns The start of a second 6356 * 6357 * @example 6358 * // The start of a second for 1 December 2014 22:15:45.400: 6359 * const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400)) 6360 * //=> Mon Dec 01 2014 22:15:45.000 6361 */ 6362function startOfSecond(date, options) { 6363 const date_ = (0, _index.toDate)(date, options?.in); 6364 date_.setMilliseconds(0); 6365 return date_; 6366} 6367 6368 6369/***/ }, 6370 6371/***/ "../../node_modules/date-fns/startOfToday.cjs" 6372/*!****************************************************!*\ 6373 !*** ../../node_modules/date-fns/startOfToday.cjs ***! 6374 \****************************************************/ 6375(__unused_webpack_module, exports, __webpack_require__) { 6376 6377 6378exports.startOfToday = startOfToday; 6379var _index = __webpack_require__(/*! ./startOfDay.cjs */ "../../node_modules/date-fns/startOfDay.cjs"); 6380 6381/** 6382 * The {@link startOfToday} function options. 6383 */ 6384 6385/** 6386 * @name startOfToday 6387 * @category Day Helpers 6388 * @summary Return the start of today. 6389 * @pure false 6390 * 6391 * @description 6392 * Return the start of today. 6393 * 6394 * @typeParam ContextDate - The `Date` type of the context function. 6395 * 6396 * @param options - An object with options 6397 * 6398 * @returns The start of today 6399 * 6400 * @example 6401 * // If today is 6 October 2014: 6402 * const result = startOfToday() 6403 * //=> Mon Oct 6 2014 00:00:00 6404 */ 6405function startOfToday(options) { 6406 return (0, _index.startOfDay)(Date.now(), options); 6407} 6408 6409 6410/***/ }, 6411 6412/***/ "../../node_modules/date-fns/startOfTomorrow.cjs" 6413/*!*******************************************************!*\ 6414 !*** ../../node_modules/date-fns/startOfTomorrow.cjs ***! 6415 \*******************************************************/ 6416(__unused_webpack_module, exports, __webpack_require__) { 6417 6418 6419exports.startOfTomorrow = startOfTomorrow; 6420var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 6421var _index2 = __webpack_require__(/*! ./constructNow.cjs */ "../../node_modules/date-fns/constructNow.cjs"); 6422 6423/** 6424 * The {@link startOfTomorrow} function options. 6425 */ 6426 6427/** 6428 * @name startOfTomorrow 6429 * @category Day Helpers 6430 * @summary Return the start of tomorrow. 6431 * @pure false 6432 * 6433 * @typeParam ContextDate - The `Date` type of the context function. 6434 * 6435 * @param options - An object with options 6436 * 6437 * @returns The start of tomorrow 6438 * 6439 * @description 6440 * Return the start of tomorrow. 6441 * 6442 * @example 6443 * // If today is 6 October 2014: 6444 * const result = startOfTomorrow() 6445 * //=> Tue Oct 7 2014 00:00:00 6446 */ 6447function startOfTomorrow(options) { 6448 const now = (0, _index2.constructNow)(options?.in); 6449 const year = now.getFullYear();
vendor: 24,332 bytes, lines 6450-7155
6450 const month = now.getMonth(); 6451 const day = now.getDate(); 6452 6453 const date = (0, _index.constructFrom)(options?.in, 0); 6454 date.setFullYear(year, month, day + 1); 6455 date.setHours(0, 0, 0, 0); 6456 return date; 6457} 6458 6459 6460/***/ }, 6461 6462/***/ "../../node_modules/date-fns/startOfWeek.cjs" 6463/*!***************************************************!*\ 6464 !*** ../../node_modules/date-fns/startOfWeek.cjs ***! 6465 \***************************************************/ 6466(__unused_webpack_module, exports, __webpack_require__) { 6467 6468 6469exports.startOfWeek = startOfWeek; 6470var _index = __webpack_require__(/*! ./_lib/defaultOptions.cjs */ "../../node_modules/date-fns/_lib/defaultOptions.cjs"); 6471var _index2 = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 6472 6473/** 6474 * The {@link startOfWeek} function options. 6475 */ 6476 6477/** 6478 * @name startOfWeek 6479 * @category Week Helpers 6480 * @summary Return the start of a week for the given date. 6481 * 6482 * @description 6483 * Return the start of a week for the given date. 6484 * The result will be in the local timezone. 6485 * 6486 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6487 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6488 * 6489 * @param date - The original date 6490 * @param options - An object with options 6491 * 6492 * @returns The start of a week 6493 * 6494 * @example 6495 * // The start of a week for 2 September 2014 11:55:00: 6496 * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0)) 6497 * //=> Sun Aug 31 2014 00:00:00 6498 * 6499 * @example 6500 * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00: 6501 * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 }) 6502 * //=> Mon Sep 01 2014 00:00:00 6503 */ 6504function startOfWeek(date, options) { 6505 const defaultOptions = (0, _index.getDefaultOptions)(); 6506 const weekStartsOn = 6507 options?.weekStartsOn ?? 6508 options?.locale?.options?.weekStartsOn ?? 6509 defaultOptions.weekStartsOn ?? 6510 defaultOptions.locale?.options?.weekStartsOn ?? 6511 0; 6512 6513 const _date = (0, _index2.toDate)(date, options?.in); 6514 const day = _date.getDay(); 6515 const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; 6516 6517 _date.setDate(_date.getDate() - diff); 6518 _date.setHours(0, 0, 0, 0); 6519 return _date; 6520} 6521 6522 6523/***/ }, 6524 6525/***/ "../../node_modules/date-fns/startOfWeekYear.cjs" 6526/*!*******************************************************!*\ 6527 !*** ../../node_modules/date-fns/startOfWeekYear.cjs ***! 6528 \*******************************************************/ 6529(__unused_webpack_module, exports, __webpack_require__) { 6530 6531 6532exports.startOfWeekYear = startOfWeekYear; 6533var _index = __webpack_require__(/*! ./_lib/defaultOptions.cjs */ "../../node_modules/date-fns/_lib/defaultOptions.cjs"); 6534var _index2 = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 6535var _index3 = __webpack_require__(/*! ./getWeekYear.cjs */ "../../node_modules/date-fns/getWeekYear.cjs"); 6536var _index4 = __webpack_require__(/*! ./startOfWeek.cjs */ "../../node_modules/date-fns/startOfWeek.cjs"); 6537 6538/** 6539 * The {@link startOfWeekYear} function options. 6540 */ 6541 6542/** 6543 * @name startOfWeekYear 6544 * @category Week-Numbering Year Helpers 6545 * @summary Return the start of a local week-numbering year for the given date. 6546 * 6547 * @description 6548 * Return the start of a local week-numbering year. 6549 * The exact calculation depends on the values of 6550 * `options.weekStartsOn` (which is the index of the first day of the week) 6551 * and `options.firstWeekContainsDate` (which is the day of January, which is always in 6552 * the first week of the week-numbering year) 6553 * 6554 * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system 6555 * 6556 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6557 * @typeParam ResultDate - The result `Date` type. 6558 * 6559 * @param date - The original date 6560 * @param options - An object with options 6561 * 6562 * @returns The start of a week-numbering year 6563 * 6564 * @example 6565 * // The start of an a week-numbering year for 2 July 2005 with default settings: 6566 * const result = startOfWeekYear(new Date(2005, 6, 2)) 6567 * //=> Sun Dec 26 2004 00:00:00 6568 * 6569 * @example 6570 * // The start of a week-numbering year for 2 July 2005 6571 * // if Monday is the first day of week 6572 * // and 4 January is always in the first week of the year: 6573 * const result = startOfWeekYear(new Date(2005, 6, 2), { 6574 * weekStartsOn: 1, 6575 * firstWeekContainsDate: 4 6576 * }) 6577 * //=> Mon Jan 03 2005 00:00:00 6578 */ 6579function startOfWeekYear(date, options) { 6580 const defaultOptions = (0, _index.getDefaultOptions)(); 6581 const firstWeekContainsDate = 6582 options?.firstWeekContainsDate ?? 6583 options?.locale?.options?.firstWeekContainsDate ?? 6584 defaultOptions.firstWeekContainsDate ?? 6585 defaultOptions.locale?.options?.firstWeekContainsDate ?? 6586 1; 6587 6588 const year = (0, _index3.getWeekYear)(date, options); 6589 const firstWeek = (0, _index2.constructFrom)(options?.in || date, 0); 6590 firstWeek.setFullYear(year, 0, firstWeekContainsDate); 6591 firstWeek.setHours(0, 0, 0, 0); 6592 const _date = (0, _index4.startOfWeek)(firstWeek, options); 6593 return _date; 6594} 6595 6596 6597/***/ }, 6598 6599/***/ "../../node_modules/date-fns/startOfYear.cjs" 6600/*!***************************************************!*\ 6601 !*** ../../node_modules/date-fns/startOfYear.cjs ***! 6602 \***************************************************/ 6603(__unused_webpack_module, exports, __webpack_require__) { 6604 6605 6606exports.startOfYear = startOfYear; 6607var _index = __webpack_require__(/*! ./toDate.cjs */ "../../node_modules/date-fns/toDate.cjs"); 6608 6609/** 6610 * The {@link startOfYear} function options. 6611 */ 6612 6613/** 6614 * @name startOfYear 6615 * @category Year Helpers 6616 * @summary Return the start of a year for the given date. 6617 * 6618 * @description 6619 * Return the start of a year for the given date. 6620 * The result will be in the local timezone. 6621 * 6622 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6623 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6624 * 6625 * @param date - The original date 6626 * @param options - The options 6627 * 6628 * @returns The start of a year 6629 * 6630 * @example 6631 * // The start of a year for 2 September 2014 11:55:00: 6632 * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00)) 6633 * //=> Wed Jan 01 2014 00:00:00 6634 */ 6635function startOfYear(date, options) { 6636 const date_ = (0, _index.toDate)(date, options?.in); 6637 date_.setFullYear(date_.getFullYear(), 0, 1); 6638 date_.setHours(0, 0, 0, 0); 6639 return date_; 6640} 6641 6642 6643/***/ }, 6644 6645/***/ "../../node_modules/date-fns/startOfYesterday.cjs" 6646/*!********************************************************!*\ 6647 !*** ../../node_modules/date-fns/startOfYesterday.cjs ***! 6648 \********************************************************/ 6649(__unused_webpack_module, exports, __webpack_require__) { 6650 6651 6652exports.startOfYesterday = startOfYesterday; 6653var _index = __webpack_require__(/*! ./constructNow.cjs */ "../../node_modules/date-fns/constructNow.cjs"); 6654 6655/** 6656 * The {@link startOfYesterday} function options. 6657 */ 6658 6659/** 6660 * @name startOfYesterday 6661 * @category Day Helpers 6662 * @summary Return the start of yesterday. 6663 * @pure false 6664 * 6665 * @typeParam ContextDate - The `Date` type of the context function. 6666 * 6667 * @param options - An object with options 6668 * 6669 * @description 6670 * Return the start of yesterday. 6671 * 6672 * @returns The start of yesterday 6673 * 6674 * @example 6675 * // If today is 6 October 2014: 6676 * const result = startOfYesterday() 6677 * //=> Sun Oct 5 2014 00:00:00 6678 */ 6679function startOfYesterday(options) { 6680 const now = (0, _index.constructNow)(options?.in); 6681 const year = now.getFullYear(); 6682 const month = now.getMonth(); 6683 const day = now.getDate(); 6684 6685 const date = (0, _index.constructNow)(options?.in); 6686 date.setFullYear(year, month, day - 1); 6687 date.setHours(0, 0, 0, 0); 6688 return date; 6689} 6690 6691 6692/***/ }, 6693 6694/***/ "../../node_modules/date-fns/sub.cjs" 6695/*!*******************************************!*\ 6696 !*** ../../node_modules/date-fns/sub.cjs ***! 6697 \*******************************************/ 6698(__unused_webpack_module, exports, __webpack_require__) { 6699 6700 6701exports.sub = sub; 6702var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 6703var _index2 = __webpack_require__(/*! ./subDays.cjs */ "../../node_modules/date-fns/subDays.cjs"); 6704var _index3 = __webpack_require__(/*! ./subMonths.cjs */ "../../node_modules/date-fns/subMonths.cjs"); 6705 6706/** 6707 * The {@link sub} function options. 6708 */ 6709 6710/** 6711 * @name sub 6712 * @category Common Helpers 6713 * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date. 6714 * 6715 * @description 6716 * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date. 6717 * 6718 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6719 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6720 * 6721 * @param date - The date to be changed 6722 * @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted 6723 * @param options - An object with options 6724 * 6725 * | Key | Description | 6726 * |---------|------------------------------------| 6727 * | years | Amount of years to be subtracted | 6728 * | months | Amount of months to be subtracted | 6729 * | weeks | Amount of weeks to be subtracted | 6730 * | days | Amount of days to be subtracted | 6731 * | hours | Amount of hours to be subtracted | 6732 * | minutes | Amount of minutes to be subtracted | 6733 * | seconds | Amount of seconds to be subtracted | 6734 * 6735 * All values default to 0 6736 * 6737 * @returns The new date with the seconds subtracted 6738 * 6739 * @example 6740 * // Subtract the following duration from 15 June 2017 15:29:20 6741 * const result = sub(new Date(2017, 5, 15, 15, 29, 20), { 6742 * years: 2, 6743 * months: 9, 6744 * weeks: 1, 6745 * days: 7, 6746 * hours: 5, 6747 * minutes: 9, 6748 * seconds: 30 6749 * }) 6750 * //=> Mon Sep 1 2014 10:19:50 6751 */ 6752function sub(date, duration, options) { 6753 const { 6754 years = 0, 6755 months = 0, 6756 weeks = 0, 6757 days = 0, 6758 hours = 0, 6759 minutes = 0, 6760 seconds = 0, 6761 } = duration; 6762 6763 const withoutMonths = (0, _index3.subMonths)( 6764 date, 6765 months + years * 12, 6766 options, 6767 ); 6768 const withoutDays = (0, _index2.subDays)( 6769 withoutMonths, 6770 days + weeks * 7, 6771 options, 6772 ); 6773 6774 const minutesToSub = minutes + hours * 60; 6775 const secondsToSub = seconds + minutesToSub * 60; 6776 const msToSub = secondsToSub * 1000; 6777 6778 return (0, _index.constructFrom)(options?.in || date, +withoutDays - msToSub); 6779} 6780 6781 6782/***/ }, 6783 6784/***/ "../../node_modules/date-fns/subBusinessDays.cjs" 6785/*!*******************************************************!*\ 6786 !*** ../../node_modules/date-fns/subBusinessDays.cjs ***! 6787 \*******************************************************/ 6788(__unused_webpack_module, exports, __webpack_require__) { 6789 6790 6791exports.subBusinessDays = subBusinessDays; 6792var _index = __webpack_require__(/*! ./addBusinessDays.cjs */ "../../node_modules/date-fns/addBusinessDays.cjs"); 6793 6794/** 6795 * The {@link subBusinessDays} function options. 6796 */ 6797 6798/** 6799 * @name subBusinessDays 6800 * @category Day Helpers 6801 * @summary Subtract the specified number of business days (mon - fri) from the given date. 6802 * 6803 * @description 6804 * Subtract the specified number of business days (mon - fri) from the given date, ignoring weekends. 6805 * 6806 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6807 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6808 * 6809 * @param date - The date to be changed 6810 * @param amount - The amount of business days to be subtracted. 6811 * @param options - An object with options 6812 * 6813 * @returns The new date with the business days subtracted 6814 * 6815 * @example 6816 * // Subtract 10 business days from 1 September 2014: 6817 * const result = subBusinessDays(new Date(2014, 8, 1), 10) 6818 * //=> Mon Aug 18 2014 00:00:00 (skipped weekend days) 6819 */ 6820function subBusinessDays(date, amount, options) { 6821 return (0, _index.addBusinessDays)(date, -amount, options); 6822} 6823 6824 6825/***/ }, 6826 6827/***/ "../../node_modules/date-fns/subDays.cjs" 6828/*!***********************************************!*\ 6829 !*** ../../node_modules/date-fns/subDays.cjs ***! 6830 \***********************************************/ 6831(__unused_webpack_module, exports, __webpack_require__) { 6832 6833 6834exports.subDays = subDays; 6835var _index = __webpack_require__(/*! ./addDays.cjs */ "../../node_modules/date-fns/addDays.cjs"); 6836 6837/** 6838 * The {@link subDays} function options. 6839 */ 6840 6841/** 6842 * @name subDays 6843 * @category Day Helpers 6844 * @summary Subtract the specified number of days from the given date. 6845 * 6846 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6847 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6848 * 6849 * @param date - The date to be changed 6850 * @param amount - The amount of days to be subtracted. 6851 * @param options - An object with options 6852 * 6853 * @returns The new date with the days subtracted 6854 * 6855 * @example 6856 * // Subtract 10 days from 1 September 2014: 6857 * const result = subDays(new Date(2014, 8, 1), 10) 6858 * //=> Fri Aug 22 2014 00:00:00 6859 */ 6860function subDays(date, amount, options) { 6861 return (0, _index.addDays)(date, -amount, options); 6862} 6863 6864 6865/***/ }, 6866 6867/***/ "../../node_modules/date-fns/subHours.cjs" 6868/*!************************************************!*\ 6869 !*** ../../node_modules/date-fns/subHours.cjs ***! 6870 \************************************************/ 6871(__unused_webpack_module, exports, __webpack_require__) { 6872 6873 6874exports.subHours = subHours; 6875var _index = __webpack_require__(/*! ./addHours.cjs */ "../../node_modules/date-fns/addHours.cjs"); 6876 6877/** 6878 * The {@link subHours} function options. 6879 */ 6880 6881/** 6882 * @name subHours 6883 * @category Hour Helpers 6884 * @summary Subtract the specified number of hours from the given date. 6885 * 6886 * @description 6887 * Subtract the specified number of hours from the given date. 6888 * 6889 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6890 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6891 * 6892 * @param date - The date to be changed 6893 * @param amount - The amount of hours to be subtracted. 6894 * @param options - The options 6895 * 6896 * @returns The new date with the hours subtracted 6897 * 6898 * @example 6899 * // Subtract 2 hours from 11 July 2014 01:00:00: 6900 * const result = subHours(new Date(2014, 6, 11, 1, 0), 2) 6901 * //=> Thu Jul 10 2014 23:00:00 6902 */ 6903function subHours(date, amount, options) { 6904 return (0, _index.addHours)(date, -amount, options); 6905} 6906 6907 6908/***/ }, 6909 6910/***/ "../../node_modules/date-fns/subISOWeekYears.cjs" 6911/*!*******************************************************!*\ 6912 !*** ../../node_modules/date-fns/subISOWeekYears.cjs ***! 6913 \*******************************************************/ 6914(__unused_webpack_module, exports, __webpack_require__) { 6915 6916 6917exports.subISOWeekYears = subISOWeekYears; 6918var _index = __webpack_require__(/*! ./addISOWeekYears.cjs */ "../../node_modules/date-fns/addISOWeekYears.cjs"); 6919 6920/** 6921 * The {@link subISOWeekYears} function options. 6922 */ 6923 6924/** 6925 * @name subISOWeekYears 6926 * @category ISO Week-Numbering Year Helpers 6927 * @summary Subtract the specified number of ISO week-numbering years from the given date. 6928 * 6929 * @description 6930 * Subtract the specified number of ISO week-numbering years from the given date. 6931 * 6932 * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date 6933 * 6934 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6935 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6936 * 6937 * @param date - The date to be changed 6938 * @param amount - The amount of ISO week-numbering years to be subtracted. 6939 * @param options - The options 6940 * 6941 * @returns The new date with the ISO week-numbering years subtracted 6942 * 6943 * @example 6944 * // Subtract 5 ISO week-numbering years from 1 September 2014: 6945 * const result = subISOWeekYears(new Date(2014, 8, 1), 5) 6946 * //=> Mon Aug 31 2009 00:00:00 6947 */ 6948function subISOWeekYears(date, amount, options) { 6949 return (0, _index.addISOWeekYears)(date, -amount, options); 6950} 6951 6952 6953/***/ }, 6954 6955/***/ "../../node_modules/date-fns/subMilliseconds.cjs" 6956/*!*******************************************************!*\ 6957 !*** ../../node_modules/date-fns/subMilliseconds.cjs ***! 6958 \*******************************************************/ 6959(__unused_webpack_module, exports, __webpack_require__) { 6960 6961 6962exports.subMilliseconds = subMilliseconds; 6963var _index = __webpack_require__(/*! ./addMilliseconds.cjs */ "../../node_modules/date-fns/addMilliseconds.cjs"); 6964 6965/** 6966 * The {@link subMilliseconds} function options. 6967 */ 6968 6969/** 6970 * Subtract the specified number of milliseconds from the given date. 6971 * 6972 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 6973 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 6974 * 6975 * @param date - The date to be changed 6976 * @param amount - The amount of milliseconds to be subtracted. 6977 * @param options - An object with options 6978 * 6979 * @returns The new date with the milliseconds subtracted 6980 */ 6981function subMilliseconds(date, amount, options) { 6982 return (0, _index.addMilliseconds)(date, -amount, options); 6983} 6984 6985 6986/***/ }, 6987 6988/***/ "../../node_modules/date-fns/subMinutes.cjs" 6989/*!**************************************************!*\ 6990 !*** ../../node_modules/date-fns/subMinutes.cjs ***! 6991 \**************************************************/ 6992(__unused_webpack_module, exports, __webpack_require__) { 6993 6994 6995exports.subMinutes = subMinutes; 6996var _index = __webpack_require__(/*! ./addMinutes.cjs */ "../../node_modules/date-fns/addMinutes.cjs"); 6997 6998/** 6999 * The {@link subMinutes} function options. 7000 */ 7001 7002/** 7003 * @name subMinutes 7004 * @category Minute Helpers 7005 * @summary Subtract the specified number of minutes from the given date. 7006 * 7007 * @description 7008 * Subtract the specified number of minutes from the given date. 7009 * 7010 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 7011 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 7012 * 7013 * @param date - The date to be changed 7014 * @param amount - The amount of minutes to be subtracted. 7015 * @param options - An object with options 7016 * 7017 * @returns The new date with the minutes subtracted 7018 * 7019 * @example 7020 * // Subtract 30 minutes from 10 July 2014 12:00:00: 7021 * const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30) 7022 * //=> Thu Jul 10 2014 11:30:00 7023 */ 7024function subMinutes(date, amount, options) { 7025 return (0, _index.addMinutes)(date, -amount, options); 7026} 7027 7028 7029/***/ }, 7030 7031/***/ "../../node_modules/date-fns/subMonths.cjs" 7032/*!*************************************************!*\ 7033 !*** ../../node_modules/date-fns/subMonths.cjs ***! 7034 \*************************************************/ 7035(__unused_webpack_module, exports, __webpack_require__) { 7036 7037 7038exports.subMonths = subMonths; 7039var _index = __webpack_require__(/*! ./addMonths.cjs */ "../../node_modules/date-fns/addMonths.cjs"); 7040 7041/** 7042 * The subMonths function options. 7043 */ 7044 7045/** 7046 * @name subMonths 7047 * @category Month Helpers 7048 * @summary Subtract the specified number of months from the given date. 7049 * 7050 * @description 7051 * Subtract the specified number of months from the given date. 7052 * 7053 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 7054 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 7055 * 7056 * @param date - The date to be changed 7057 * @param amount - The amount of months to be subtracted. 7058 * @param options - An object with options 7059 * 7060 * @returns The new date with the months subtracted 7061 * 7062 * @example 7063 * // Subtract 5 months from 1 February 2015: 7064 * const result = subMonths(new Date(2015, 1, 1), 5) 7065 * //=> Mon Sep 01 2014 00:00:00 7066 */ 7067function subMonths(date, amount, options) { 7068 return (0, _index.addMonths)(date, -amount, options); 7069} 7070 7071 7072/***/ }, 7073 7074/***/ "../../node_modules/date-fns/subQuarters.cjs" 7075/*!***************************************************!*\ 7076 !*** ../../node_modules/date-fns/subQuarters.cjs ***! 7077 \***************************************************/ 7078(__unused_webpack_module, exports, __webpack_require__) { 7079 7080 7081exports.subQuarters = subQuarters; 7082var _index = __webpack_require__(/*! ./addQuarters.cjs */ "../../node_modules/date-fns/addQuarters.cjs"); 7083 7084/** 7085 * The {@link subQuarters} function options. 7086 */ 7087 7088/** 7089 * @name subQuarters 7090 * @category Quarter Helpers 7091 * @summary Subtract the specified number of year quarters from the given date. 7092 * 7093 * @description 7094 * Subtract the specified number of year quarters from the given date. 7095 * 7096 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 7097 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 7098 * 7099 * @param date - The date to be changed 7100 * @param amount - The amount of quarters to be subtracted. 7101 * @param options - An object with options 7102 * 7103 * @returns The new date with the quarters subtracted 7104 * 7105 * @example 7106 * // Subtract 3 quarters from 1 September 2014: 7107 * const result = subQuarters(new Date(2014, 8, 1), 3) 7108 * //=> Sun Dec 01 2013 00:00:00 7109 */ 7110function subQuarters(date, amount, options) { 7111 return (0, _index.addQuarters)(date, -amount, options); 7112} 7113 7114 7115/***/ }, 7116 7117/***/ "../../node_modules/date-fns/subSeconds.cjs" 7118/*!**************************************************!*\ 7119 !*** ../../node_modules/date-fns/subSeconds.cjs ***! 7120 \**************************************************/ 7121(__unused_webpack_module, exports, __webpack_require__) { 7122 7123 7124exports.subSeconds = subSeconds; 7125var _index = __webpack_require__(/*! ./addSeconds.cjs */ "../../node_modules/date-fns/addSeconds.cjs"); 7126 7127/** 7128 * The {@link subSeconds} function options. 7129 */ 7130 7131/** 7132 * Subtract the specified number of seconds from the given date. 7133 * 7134 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 7135 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 7136 * 7137 * @param date - The date to be changed 7138 * @param amount - The amount of seconds to be subtracted. 7139 * @param options - The options 7140 * 7141 * @returns The new date with the seconds subtracted 7142 * 7143 * @example 7144 * // Subtract 30 seconds from 10 July 2014 12:45:00: 7145 * const result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30) 7146 * //=> Thu Jul 10 2014 12:44:30 7147 */ 7148function subSeconds(date, amount, options) { 7149 return (0, _index.addSeconds)(date, -amount, options); 7150} 7151 7152 7153/***/ }, 7154 7155/***/ "../../node_modules/date-fns/subW
7155eeks.cjs" 7156/*!************************************************!*\ 7157 !*** ../../node_modules/date-fns/subWeeks.cjs ***! 7158 \************************************************/ 7159(__unused_webpack_module, exports, __webpack_require__) { 7160 7161 7162exports.subWeeks = subWeeks; 7163var _index = __webpack_require__(/*! ./addWeeks.cjs */ "../../node_modules/date-fns/addWeeks.cjs"); 7164 7165/** 7166 * The {@link subWeeks} function options. 7167 */ 7168 7169/** 7170 * @name subWeeks 7171 * @category Week Helpers 7172 * @summary Subtract the specified number of weeks from the given date. 7173 * 7174 * @description 7175 * Subtract the specified number of weeks from the given date. 7176 * 7177 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 7178 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 7179 * 7180 * @param date - The date to be changed 7181 * @param amount - The amount of weeks to be subtracted. 7182 * @param options - An object with options 7183 * 7184 * @returns The new date with the weeks subtracted 7185 * 7186 * @example 7187 * // Subtract 4 weeks from 1 September 2014: 7188 * const result = subWeeks(new Date(2014, 8, 1), 4) 7189 * //=> Mon Aug 04 2014 00:00:00 7190 */ 7191function subWeeks(date, amount, options) { 7192 return (0, _index.addWeeks)(date, -amount, options); 7193} 7194 7195 7196/***/ }, 7197 7198/***/ "../../node_modules/date-fns/subYears.cjs" 7199/*!************************************************!*\ 7200 !*** ../../node_modules/date-fns/subYears.cjs ***! 7201 \************************************************/ 7202(__unused_webpack_module, exports, __webpack_require__) { 7203 7204 7205exports.subYears = subYears; 7206var _index = __webpack_require__(/*! ./addYears.cjs */ "../../node_modules/date-fns/addYears.cjs"); 7207 7208/** 7209 * The {@link subYears} function options. 7210 */ 7211 7212/** 7213 * @name subYears 7214 * @category Year Helpers 7215 * @summary Subtract the specified number of years from the given date. 7216 * 7217 * @description 7218 * Subtract the specified number of years from the given date. 7219 * 7220 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 7221 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 7222 * 7223 * @param date - The date to be changed 7224 * @param amount - The amount of years to be subtracted. 7225 * @param options - An object with options 7226 * 7227 * @returns The new date with the years subtracted 7228 * 7229 * @example 7230 * // Subtract 5 years from 1 September 2014: 7231 * const result = subYears(new Date(2014, 8, 1), 5) 7232 * //=> Tue Sep 01 2009 00:00:00 7233 */ 7234function subYears(date, amount, options) { 7235 return (0, _index.addYears)(date, -amount, options); 7236} 7237 7238 7239/***/ }, 7240 7241/***/ "../../node_modules/date-fns/toDate.cjs" 7242/*!**********************************************!*\ 7243 !*** ../../node_modules/date-fns/toDate.cjs ***! 7244 \**********************************************/ 7245(__unused_webpack_module, exports, __webpack_require__) { 7246 7247 7248exports.toDate = toDate; 7249var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 7250 7251/** 7252 * @name toDate 7253 * @category Common Helpers 7254 * @summary Convert the given argument to an instance of Date. 7255 * 7256 * @description 7257 * Convert the given argument to an instance of Date. 7258 * 7259 * If the argument is an instance of Date, the function returns its clone. 7260 * 7261 * If the argument is a number, it is treated as a timestamp. 7262 * 7263 * If the argument is none of the above, the function returns Invalid Date. 7264 * 7265 * Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]` 7266 * enabling to transfer extra properties from the reference date to the new date. 7267 * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz) 7268 * that accept a time zone as a constructor argument. 7269 * 7270 * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`. 7271 * 7272 * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc). 7273 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments. 7274 * 7275 * @param argument - The value to convert 7276 * 7277 * @returns The parsed date in the local time zone 7278 * 7279 * @example 7280 * // Clone the date: 7281 * const result = toDate(new Date(2014, 1, 11, 11, 30, 30)) 7282 * //=> Tue Feb 11 2014 11:30:30 7283 * 7284 * @example 7285 * // Convert the timestamp to date: 7286 * const result = toDate(1392098430000) 7287 * //=> Tue Feb 11 2014 11:30:30 7288 */ 7289function toDate(argument, context) { 7290 // [TODO] Get rid of `toDate` or `constructFrom`? 7291 return (0, _index.constructFrom)(context || argument, argument); 7292} 7293 7294 7295/***/ }, 7296 7297/***/ "../../node_modules/date-fns/transpose.cjs" 7298/*!*************************************************!*\ 7299 !*** ../../node_modules/date-fns/transpose.cjs ***! 7300 \*************************************************/ 7301(__unused_webpack_module, exports, __webpack_require__) { 7302 7303 7304exports.transpose = transpose; 7305var _index = __webpack_require__(/*! ./constructFrom.cjs */ "../../node_modules/date-fns/constructFrom.cjs"); 7306 7307/** 7308 * @name transpose 7309 * @category Generic Helpers 7310 * @summary Transpose the date to the given constructor. 7311 * 7312 * @description 7313 * The function transposes the date to the given constructor. It helps you 7314 * to transpose the date in the system time zone to say `UTCDate` or any other 7315 * date extension. 7316 * 7317 * @typeParam InputDate - The input `Date` type derived from the passed argument. 7318 * @typeParam ResultDate - The result `Date` type derived from the passed constructor. 7319 * 7320 * @param date - The date to use values from 7321 * @param constructor - The date constructor to use 7322 * 7323 * @returns Date transposed to the given constructor 7324 * 7325 * @example 7326 * // Create July 10, 2022 00:00 in locale time zone 7327 * const date = new Date(2022, 6, 10) 7328 * //=> 'Sun Jul 10 2022 00:00:00 GMT+0800 (Singapore Standard Time)' 7329 * 7330 * @example 7331 * // Transpose the date to July 10, 2022 00:00 in UTC 7332 * transpose(date, UTCDate) 7333 * //=> 'Sun Jul 10 2022 00:00:00 GMT+0000 (Coordinated Universal Time)' 7334 */ 7335function transpose(date, constructor) { 7336 const date_ = isConstructor(constructor) 7337 ? new constructor(0) 7338 : (0, _index.constructFrom)(constructor, 0); 7339 date_.setFullYear(date.getFullYear(), date.getMonth(), date.getDate()); 7340 date_.setHours( 7341 date.getHours(), 7342 date.getMinutes(), 7343 date.getSeconds(), 7344 date.getMilliseconds(), 7345 ); 7346 return date_; 7347} 7348 7349function isConstructor(constructor) { 7350 return ( 7351 typeof constructor === "function" && 7352 constructor.prototype?.constructor === constructor 7353 ); 7354} 7355 7356 7357/***/ }, 7358 7359/***/ "../../node_modules/date-fns/weeksToDays.cjs" 7360/*!***************************************************!*\ 7361 !*** ../../node_modules/date-fns/weeksToDays.cjs ***! 7362 \***************************************************/ 7363(__unused_webpack_module, exports, __webpack_require__) { 7364 7365 7366exports.weeksToDays = weeksToDays; 7367var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 7368 7369/** 7370 * @name weeksToDays 7371 * @category Conversion Helpers 7372 * @summary Convert weeks to days. 7373 * 7374 * @description 7375 * Convert a number of weeks to a full number of days. 7376 * 7377 * @param weeks - The number of weeks to be converted 7378 * 7379 * @returns The number of weeks converted in days 7380 * 7381 * @example 7382 * // Convert 2 weeks into days 7383 * const result = weeksToDays(2) 7384 * //=> 14 7385 */ 7386function weeksToDays(weeks) { 7387 return Math.trunc(weeks * _index.daysInWeek); 7388} 7389 7390 7391/***/ }, 7392 7393/***/ "../../node_modules/date-fns/yearsToDays.cjs" 7394/*!***************************************************!*\ 7395 !*** ../../node_modules/date-fns/yearsToDays.cjs ***! 7396 \***************************************************/ 7397(__unused_webpack_module, exports, __webpack_require__) { 7398 7399 7400exports.yearsToDays = yearsToDays; 7401var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 7402 7403/** 7404 * @name yearsToDays 7405 * @category Conversion Helpers 7406 * @summary Convert years to days. 7407 * 7408 * @description 7409 * Convert a number of years to a full number of days. 7410 * 7411 * @param years - The number of years to be converted 7412 * 7413 * @returns The number of years converted in days 7414 * 7415 * @example 7416 * // Convert 2 years into days 7417 * const result = yearsToDays(2) 7418 * //=> 730 7419 */ 7420function yearsToDays(years) { 7421 return Math.trunc(years * _index.daysInYear); 7422} 7423 7424 7425/***/ }, 7426 7427/***/ "../../node_modules/date-fns/yearsToMonths.cjs" 7428/*!*****************************************************!*\ 7429 !*** ../../node_modules/date-fns/yearsToMonths.cjs ***! 7430 \*****************************************************/ 7431(__unused_webpack_module, exports, __webpack_require__) { 7432 7433 7434exports.yearsToMonths = yearsToMonths; 7435var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 7436 7437/** 7438 * @name yearsToMonths 7439 * @category Conversion Helpers 7440 * @summary Convert years to months. 7441 * 7442 * @description 7443 * Convert a number of years to a full number of months. 7444 * 7445 * @param years - The number of years to be converted 7446 * 7447 * @returns The number of years converted in months 7448 * 7449 * @example 7450 * // Convert 2 years into months 7451 * const result = yearsToMonths(2) 7452 * //=> 24 7453 */ 7454function yearsToMonths(years) { 7455 return Math.trunc(years * _index.monthsInYear); 7456} 7457 7458 7459/***/ }, 7460 7461/***/ "../../node_modules/date-fns/yearsToQuarters.cjs" 7462/*!*******************************************************!*\ 7463 !*** ../../node_modules/date-fns/yearsToQuarters.cjs ***! 7464 \*******************************************************/ 7465(__unused_webpack_module, exports, __webpack_require__) { 7466 7467 7468exports.yearsToQuarters = yearsToQuarters; 7469var _index = __webpack_require__(/*! ./constants.cjs */ "../../node_modules/date-fns/constants.cjs"); 7470 7471/** 7472 * @name yearsToQuarters 7473 * @category Conversion Helpers 7474 * @summary Convert years to quarters. 7475 * 7476 * @description 7477 * Convert a number of years to a full number of quarters. 7478 * 7479 * @param years - The number of years to be converted 7480 * 7481 * @returns The number of years converted in quarters 7482 * 7483 * @example 7484 * // Convert 2 years to quarters 7485 * const result = yearsToQuarters(2) 7486 * //=> 8 7487 */ 7488function yearsToQuarters(years) { 7489 return Math.trunc(years * _index.quartersInYear); 7490} 7491 7492 7493/***/ } 7494 7495}]); 7496//# sourceMappingURL=vendors-node_modules_date-fns_milliseconds_cjs-node_modules_date-fns_millisecondsToHours_cjs--091218.e6ada238.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.