@timardex/cluemart-shared 1.5.494 → 1.5.495
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/{chunk-YTEETYG7.mjs → chunk-F4IWHY4O.mjs} +9 -7
- package/dist/chunk-F4IWHY4O.mjs.map +1 -0
- package/dist/{chunk-DXNREXCC.mjs → chunk-SKWWATIR.mjs} +2 -2
- package/dist/formFields/index.cjs +4 -2
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/hooks/index.cjs +4 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.cjs +8 -6
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-YTEETYG7.mjs.map +0 -1
- /package/dist/{chunk-DXNREXCC.mjs.map → chunk-SKWWATIR.mjs.map} +0 -0
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 = [
|
|
@@ -526,6 +527,7 @@ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
|
526
527
|
})(EnumGameStatus || {});
|
|
527
528
|
|
|
528
529
|
// src/utils/dailyClueGame.ts
|
|
530
|
+
dayjs.extend(utc);
|
|
529
531
|
function createSeededRng(seed) {
|
|
530
532
|
let t = seed >>> 0;
|
|
531
533
|
return function random() {
|
|
@@ -554,7 +556,7 @@ function seededShuffle(array6, seed) {
|
|
|
554
556
|
return result;
|
|
555
557
|
}
|
|
556
558
|
function getDayIndex(startDate) {
|
|
557
|
-
return dayjs().startOf("day").diff(dayjs(startDate).startOf("day"), "day");
|
|
559
|
+
return dayjs().utc().startOf("day").diff(dayjs(startDate).utc().startOf("day"), "day");
|
|
558
560
|
}
|
|
559
561
|
function computeDailyClueState(dailyClue) {
|
|
560
562
|
const { startDate, endDate } = dailyClue.gameFields.gameDate;
|
|
@@ -563,9 +565,9 @@ function computeDailyClueState(dailyClue) {
|
|
|
563
565
|
gameScreenIdentifierList,
|
|
564
566
|
startDate.toISOString()
|
|
565
567
|
);
|
|
566
|
-
const today = dayjs().startOf("day");
|
|
567
|
-
const start = dayjs(startDate).startOf("day");
|
|
568
|
-
const end = dayjs(endDate).startOf("day");
|
|
568
|
+
const today = dayjs().utc().startOf("day");
|
|
569
|
+
const start = dayjs(startDate).utc().startOf("day");
|
|
570
|
+
const end = dayjs(endDate).utc().startOf("day");
|
|
569
571
|
if (today.isBefore(start)) {
|
|
570
572
|
return null;
|
|
571
573
|
}
|
|
@@ -603,11 +605,11 @@ import dayjs2 from "dayjs";
|
|
|
603
605
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
604
606
|
import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js";
|
|
605
607
|
import timezone from "dayjs/plugin/timezone.js";
|
|
606
|
-
import
|
|
608
|
+
import utc2 from "dayjs/plugin/utc.js";
|
|
607
609
|
var dateFormat = "DD-MM-YYYY";
|
|
608
610
|
var timeFormat = "HH:mm";
|
|
609
611
|
dayjs2.extend(customParseFormat);
|
|
610
|
-
dayjs2.extend(
|
|
612
|
+
dayjs2.extend(utc2);
|
|
611
613
|
dayjs2.extend(timezone);
|
|
612
614
|
dayjs2.extend(isSameOrAfter);
|
|
613
615
|
var NZ_TZ = "Pacific/Auckland";
|