@timardex/cluemart-shared 1.5.497 → 1.5.498

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -435,6 +435,7 @@ var priceUnits = [
435
435
 
436
436
  // src/utils/dailyClueGame.ts
437
437
  import dayjs from "dayjs";
438
+ import utc from "dayjs/plugin/utc";
438
439
 
439
440
  // src/types/game.ts
440
441
  var gameScreenIdentifierList = [
@@ -530,6 +531,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
530
531
  })(EnumGameStatus || {});
531
532
 
532
533
  // src/utils/dailyClueGame.ts
534
+ dayjs.extend(utc);
533
535
  function createSeededRng(seed) {
534
536
  let t = seed >>> 0;
535
537
  return function random() {
@@ -558,18 +560,18 @@ function seededShuffle(array6, seed) {
558
560
  return result;
559
561
  }
560
562
  function getDayIndex(startDate) {
561
- return dayjs().startOf("day").diff(dayjs(startDate).startOf("day"), "day");
563
+ return dayjs().utc().startOf("day").diff(dayjs(startDate).utc().startOf("day"), "day");
562
564
  }
563
565
  function computeDailyClueState(dailyClue) {
564
566
  const { startDate, endDate } = dailyClue.gameFields.gameDate;
565
567
  const { shuffled, collected } = dailyClue.letterInfo;
568
+ const today = dayjs().utc().startOf("day");
569
+ const start = dayjs(startDate).utc().startOf("day");
570
+ const end = dayjs(endDate).utc().startOf("day");
566
571
  const shuffledPlacements = seededShuffle(
567
572
  gameScreenIdentifierList,
568
- startDate.toISOString()
573
+ start.toISOString()
569
574
  );
570
- const today = dayjs().startOf("day");
571
- const start = dayjs(startDate).startOf("day");
572
- const end = dayjs(endDate).startOf("day");
573
575
  if (today.isBefore(start)) {
574
576
  return null;
575
577
  }
@@ -607,11 +609,11 @@ import dayjs2 from "dayjs";
607
609
  import customParseFormat from "dayjs/plugin/customParseFormat.js";
608
610
  import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js";
609
611
  import timezone from "dayjs/plugin/timezone.js";
610
- import utc from "dayjs/plugin/utc.js";
612
+ import utc2 from "dayjs/plugin/utc.js";
611
613
  var dateFormat = "DD-MM-YYYY";
612
614
  var timeFormat = "HH:mm";
613
615
  dayjs2.extend(customParseFormat);
614
- dayjs2.extend(utc);
616
+ dayjs2.extend(utc2);
615
617
  dayjs2.extend(timezone);
616
618
  dayjs2.extend(isSameOrAfter);
617
619
  var NZ_TZ = "Pacific/Auckland";