@timardex/cluemart-shared 1.5.493 → 1.5.494

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.
Files changed (49) hide show
  1. package/dist/{chunk-USQKKCIA.mjs → chunk-534WN2SR.mjs} +7 -3
  2. package/dist/chunk-534WN2SR.mjs.map +1 -0
  3. package/dist/{chunk-4LT5GOOP.mjs → chunk-DXNREXCC.mjs} +3 -3
  4. package/dist/{chunk-GSNFQJBZ.mjs → chunk-KPO6ZYQ4.mjs} +2 -95
  5. package/dist/chunk-KPO6ZYQ4.mjs.map +1 -0
  6. package/dist/chunk-QG5DPPZI.mjs +96 -0
  7. package/dist/chunk-QG5DPPZI.mjs.map +1 -0
  8. package/dist/{chunk-KYDS4REE.mjs → chunk-YTEETYG7.mjs} +95 -17
  9. package/dist/chunk-YTEETYG7.mjs.map +1 -0
  10. package/dist/enums/index.cjs +6 -2
  11. package/dist/enums/index.cjs.map +1 -1
  12. package/dist/enums/index.d.mts +7 -3
  13. package/dist/enums/index.d.ts +7 -3
  14. package/dist/enums/index.mjs +1 -1
  15. package/dist/formFields/index.cjs +8 -5
  16. package/dist/formFields/index.cjs.map +1 -1
  17. package/dist/formFields/index.mjs +4 -3
  18. package/dist/game-DTrJRy_s.d.mts +120 -0
  19. package/dist/game-lvz2AUuu.d.ts +120 -0
  20. package/dist/graphql/index.d.mts +2 -1
  21. package/dist/graphql/index.d.ts +2 -1
  22. package/dist/graphql/index.mjs +1 -1
  23. package/dist/hooks/index.cjs +21 -18
  24. package/dist/hooks/index.cjs.map +1 -1
  25. package/dist/hooks/index.d.mts +2 -1
  26. package/dist/hooks/index.d.ts +2 -1
  27. package/dist/hooks/index.mjs +5 -4
  28. package/dist/hooks/index.mjs.map +1 -1
  29. package/dist/index.cjs +202 -119
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.mts +17 -4
  32. package/dist/index.d.ts +17 -4
  33. package/dist/index.mjs +200 -119
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/{post-C67Q-sXR.d.ts → post-DXOToXeT.d.ts} +3 -119
  36. package/dist/{post-C9rtHepe.d.mts → post-wptsHKVN.d.mts} +3 -119
  37. package/dist/types/index.d.mts +2 -1
  38. package/dist/types/index.d.ts +2 -1
  39. package/dist/types/index.mjs +6 -4
  40. package/dist/utils/index.cjs +171 -14
  41. package/dist/utils/index.cjs.map +1 -1
  42. package/dist/utils/index.d.mts +11 -1
  43. package/dist/utils/index.d.ts +11 -1
  44. package/dist/utils/index.mjs +7 -2
  45. package/package.json +1 -1
  46. package/dist/chunk-GSNFQJBZ.mjs.map +0 -1
  47. package/dist/chunk-KYDS4REE.mjs.map +0 -1
  48. package/dist/chunk-USQKKCIA.mjs.map +0 -1
  49. /package/dist/{chunk-4LT5GOOP.mjs.map → chunk-DXNREXCC.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -116,9 +116,13 @@ declare enum EnumNotificationResourceType {
116
116
  DEACTIVATED_EVENT = "deactivated_event",
117
117
  DEACTIVATED_PARTNER = "deactivated_partner",
118
118
  DEACTIVATED_VENDOR = "deactivated_vendor",
119
+ DOWNGRADED_EVENT = "downgraded_event",
120
+ DOWNGRADED_PARTNER = "downgraded_partner",
121
+ DOWNGRADED_VENDOR = "downgraded_vendor",
119
122
  DECLINED_EVENT = "declined_event",
120
123
  DECLINED_PARTNER = "declined_partner",
121
124
  DECLINED_VENDOR = "declined_vendor",
125
+ DAILY_CLUE_LETTER_AVAILABLE = "daily_clue_letter_available",
122
126
  EVENT_INVITE_VENDOR = "event_invite_vendor",
123
127
  EVENT_STARTING_SOON = "event_starting_soon",
124
128
  EXPIRATION_REMINDER_EVENT = "expiration_reminder_event",
@@ -129,11 +133,11 @@ declare enum EnumNotificationResourceType {
129
133
  VENDOR_APPLICATION_TO_EVENT = "vendor_application_to_event"
130
134
  }
131
135
  declare enum EnumNotificationType {
136
+ CHAT = "chat",
132
137
  EVENT = "event",
133
- VENDOR = "vendor",
134
138
  RELATION = "relation",
135
- CHAT = "chat",
136
- SYSTEM = "system"
139
+ SYSTEM = "system",
140
+ VENDOR = "vendor"
137
141
  }
138
142
  declare enum EnumRegions {
139
143
  All = "All Regions",
@@ -2407,6 +2411,15 @@ declare const fonts: {
2407
2411
  };
2408
2412
  };
2409
2413
 
2414
+ /** Seeded shuffle so all players see the same letter order / placements for a game. */
2415
+ declare function seededShuffle<T>(array: readonly T[], seed: string): T[];
2416
+ declare function computeDailyClueState(dailyClue: DailyClueGameData): {
2417
+ gameHistory: GameHistory | null;
2418
+ todaysClue: GamePlacementClue | null;
2419
+ todaysLetter: string | null;
2420
+ todaysPlacement: GamePlacement | null;
2421
+ } | null;
2422
+
2410
2423
  declare const dateFormat = "DD-MM-YYYY";
2411
2424
  declare const timeFormat = "HH:mm";
2412
2425
  declare function toNZTime(date: Date | string): string;
@@ -2465,4 +2478,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
2465
2478
  declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
2466
2479
  declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
2467
2480
 
2468
- export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
2481
+ export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, seededShuffle, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
package/dist/index.d.ts CHANGED
@@ -116,9 +116,13 @@ declare enum EnumNotificationResourceType {
116
116
  DEACTIVATED_EVENT = "deactivated_event",
117
117
  DEACTIVATED_PARTNER = "deactivated_partner",
118
118
  DEACTIVATED_VENDOR = "deactivated_vendor",
119
+ DOWNGRADED_EVENT = "downgraded_event",
120
+ DOWNGRADED_PARTNER = "downgraded_partner",
121
+ DOWNGRADED_VENDOR = "downgraded_vendor",
119
122
  DECLINED_EVENT = "declined_event",
120
123
  DECLINED_PARTNER = "declined_partner",
121
124
  DECLINED_VENDOR = "declined_vendor",
125
+ DAILY_CLUE_LETTER_AVAILABLE = "daily_clue_letter_available",
122
126
  EVENT_INVITE_VENDOR = "event_invite_vendor",
123
127
  EVENT_STARTING_SOON = "event_starting_soon",
124
128
  EXPIRATION_REMINDER_EVENT = "expiration_reminder_event",
@@ -129,11 +133,11 @@ declare enum EnumNotificationResourceType {
129
133
  VENDOR_APPLICATION_TO_EVENT = "vendor_application_to_event"
130
134
  }
131
135
  declare enum EnumNotificationType {
136
+ CHAT = "chat",
132
137
  EVENT = "event",
133
- VENDOR = "vendor",
134
138
  RELATION = "relation",
135
- CHAT = "chat",
136
- SYSTEM = "system"
139
+ SYSTEM = "system",
140
+ VENDOR = "vendor"
137
141
  }
138
142
  declare enum EnumRegions {
139
143
  All = "All Regions",
@@ -2407,6 +2411,15 @@ declare const fonts: {
2407
2411
  };
2408
2412
  };
2409
2413
 
2414
+ /** Seeded shuffle so all players see the same letter order / placements for a game. */
2415
+ declare function seededShuffle<T>(array: readonly T[], seed: string): T[];
2416
+ declare function computeDailyClueState(dailyClue: DailyClueGameData): {
2417
+ gameHistory: GameHistory | null;
2418
+ todaysClue: GamePlacementClue | null;
2419
+ todaysLetter: string | null;
2420
+ todaysPlacement: GamePlacement | null;
2421
+ } | null;
2422
+
2410
2423
  declare const dateFormat = "DD-MM-YYYY";
2411
2424
  declare const timeFormat = "HH:mm";
2412
2425
  declare function toNZTime(date: Date | string): string;
@@ -2465,4 +2478,4 @@ declare const cluemartSocialMedia: SocialMediaType[];
2465
2478
  declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
2466
2479
  declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
2467
2480
 
2468
- export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
2481
+ export { ANDROID_URL, type AdFormData, type AdResource, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseGame, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventStatusType, type EventType, type FormDateField, type FormField, type GameData, type GameDate, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, IOS_URL, type ImageObjectType, ImageTypeEnum, type LocationGeoType, type LocationType, type LoginFormData, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type RefundPolicy, type Region, type RegisterFormData, type RelationDate, type RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, type TermsAgreement, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetEventsByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, computeDailyClueState, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, gameScreenIdentifierList, gameTypeToDisplayName, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, seededShuffle, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUpdateAd, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
package/dist/index.mjs CHANGED
@@ -126,9 +126,13 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
126
126
  EnumNotificationResourceType2["DEACTIVATED_EVENT"] = "deactivated_event";
127
127
  EnumNotificationResourceType2["DEACTIVATED_PARTNER"] = "deactivated_partner";
128
128
  EnumNotificationResourceType2["DEACTIVATED_VENDOR"] = "deactivated_vendor";
129
+ EnumNotificationResourceType2["DOWNGRADED_EVENT"] = "downgraded_event";
130
+ EnumNotificationResourceType2["DOWNGRADED_PARTNER"] = "downgraded_partner";
131
+ EnumNotificationResourceType2["DOWNGRADED_VENDOR"] = "downgraded_vendor";
129
132
  EnumNotificationResourceType2["DECLINED_EVENT"] = "declined_event";
130
133
  EnumNotificationResourceType2["DECLINED_PARTNER"] = "declined_partner";
131
134
  EnumNotificationResourceType2["DECLINED_VENDOR"] = "declined_vendor";
135
+ EnumNotificationResourceType2["DAILY_CLUE_LETTER_AVAILABLE"] = "daily_clue_letter_available";
132
136
  EnumNotificationResourceType2["EVENT_INVITE_VENDOR"] = "event_invite_vendor" /* EVENT_INVITE_VENDOR */;
133
137
  EnumNotificationResourceType2["EVENT_STARTING_SOON"] = "event_starting_soon";
134
138
  EnumNotificationResourceType2["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
@@ -140,11 +144,11 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
140
144
  return EnumNotificationResourceType2;
141
145
  })(EnumNotificationResourceType || {});
142
146
  var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType2) => {
147
+ EnumNotificationType2["CHAT"] = "chat";
143
148
  EnumNotificationType2["EVENT"] = "event" /* EVENT */;
144
- EnumNotificationType2["VENDOR"] = "vendor" /* VENDOR */;
145
149
  EnumNotificationType2["RELATION"] = "relation";
146
- EnumNotificationType2["CHAT"] = "chat";
147
150
  EnumNotificationType2["SYSTEM"] = "system";
151
+ EnumNotificationType2["VENDOR"] = "vendor" /* VENDOR */;
148
152
  return EnumNotificationType2;
149
153
  })(EnumNotificationType || {});
150
154
  var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
@@ -429,25 +433,190 @@ var priceUnits = [
429
433
  { label: "Half dozen", value: "HALF_DOZEN" }
430
434
  ];
431
435
 
432
- // src/utils/index.ts
436
+ // src/utils/dailyClueGame.ts
433
437
  import dayjs from "dayjs";
438
+
439
+ // src/types/game.ts
440
+ var gameScreenIdentifierList = [
441
+ {
442
+ clue: "Where your actions turn into a timeline.",
443
+ id: "activities"
444
+ },
445
+ {
446
+ clue: "Where conversations happen without speaking.",
447
+ id: "chat"
448
+ },
449
+ {
450
+ clue: "The place to redefine who you are.",
451
+ id: "edit-profile"
452
+ },
453
+ {
454
+ clue: "A single moment worth showing up for.",
455
+ id: "event"
456
+ },
457
+ {
458
+ clue: "What\u2019s happening around you, right now.",
459
+ id: "events-near-me"
460
+ },
461
+ {
462
+ clue: "A collection of things worth attending.",
463
+ id: "events"
464
+ },
465
+ {
466
+ clue: "What\u2019s happening in a wider area\u2014not just nearby.",
467
+ id: "events/region"
468
+ },
469
+ {
470
+ clue: "Where fun becomes a challenge.",
471
+ id: "games"
472
+ },
473
+ {
474
+ clue: "Your starting point for everything.",
475
+ id: "home"
476
+ },
477
+ {
478
+ clue: "Where the app taps you on the shoulder.",
479
+ id: "notifications"
480
+ },
481
+ {
482
+ clue: "Where you fine-tune your experience.",
483
+ id: "options"
484
+ },
485
+ {
486
+ clue: "A single collaborator in the ecosystem.",
487
+ id: "partner"
488
+ },
489
+ {
490
+ clue: "The network behind the scenes.",
491
+ id: "partners"
492
+ },
493
+ {
494
+ clue: "Where you share something with everyone.",
495
+ id: "post"
496
+ },
497
+ {
498
+ clue: "Your identity, on display.",
499
+ id: "profile"
500
+ },
501
+ {
502
+ clue: "One provider offering something valuable.",
503
+ id: "vendor"
504
+ },
505
+ {
506
+ clue: "A marketplace of providers.",
507
+ id: "vendors"
508
+ },
509
+ {
510
+ clue: "People who stopped by to see you.",
511
+ id: "visitors"
512
+ }
513
+ ];
514
+ var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
515
+ EnumGameType2["DAILY_CLUE"] = "dailyClue";
516
+ return EnumGameType2;
517
+ })(EnumGameType || {});
518
+ var gameTypeToDisplayName = {
519
+ ["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
520
+ };
521
+ var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
522
+ EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
523
+ EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
524
+ EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
525
+ return EnumGameStatus2;
526
+ })(EnumGameStatus || {});
527
+
528
+ // src/utils/dailyClueGame.ts
529
+ function createSeededRng(seed) {
530
+ let t = seed >>> 0;
531
+ return function random() {
532
+ t += 1831565813;
533
+ let x = t;
534
+ x = Math.imul(x ^ x >>> 15, x | 1);
535
+ x ^= x + Math.imul(x ^ x >>> 7, x | 61);
536
+ return ((x ^ x >>> 14) >>> 0) / 4294967296;
537
+ };
538
+ }
539
+ function hashStringToNumber(seed) {
540
+ let hash = 2166136261;
541
+ for (let i = 0; i < seed.length; i++) {
542
+ hash ^= seed.codePointAt(i) ?? 0;
543
+ hash = Math.imul(hash, 16777619);
544
+ }
545
+ return hash >>> 0;
546
+ }
547
+ function seededShuffle(array6, seed) {
548
+ const rng = createSeededRng(hashStringToNumber(seed));
549
+ const result = [...array6];
550
+ for (let i = result.length - 1; i > 0; i--) {
551
+ const j = Math.floor(rng() * (i + 1));
552
+ [result[i], result[j]] = [result[j], result[i]];
553
+ }
554
+ return result;
555
+ }
556
+ function getDayIndex(startDate) {
557
+ return dayjs().startOf("day").diff(dayjs(startDate).startOf("day"), "day");
558
+ }
559
+ function computeDailyClueState(dailyClue) {
560
+ const { startDate, endDate } = dailyClue.gameFields.gameDate;
561
+ const { shuffled, collected } = dailyClue.letterInfo;
562
+ const shuffledPlacements = seededShuffle(
563
+ gameScreenIdentifierList,
564
+ startDate.toISOString()
565
+ );
566
+ const today = dayjs().startOf("day");
567
+ const start = dayjs(startDate).startOf("day");
568
+ const end = dayjs(endDate).startOf("day");
569
+ if (today.isBefore(start)) {
570
+ return null;
571
+ }
572
+ if (today.isAfter(end)) {
573
+ return null;
574
+ }
575
+ const index = getDayIndex(startDate);
576
+ if (index < 0 || index >= shuffled.length) return null;
577
+ if (collected?.includes(shuffled[index])) {
578
+ return null;
579
+ }
580
+ if (today.isAfter(end)) {
581
+ return {
582
+ gameHistory: {
583
+ gameDate: dailyClue.gameFields.gameDate,
584
+ gameStatus: "GAME_COMPLETED" /* GAME_COMPLETED */,
585
+ gameType: dailyClue.gameFields.gameType,
586
+ pointsEarned: dailyClue.points
587
+ },
588
+ todaysClue: null,
589
+ todaysLetter: null,
590
+ todaysPlacement: null
591
+ };
592
+ }
593
+ return {
594
+ gameHistory: null,
595
+ todaysClue: shuffledPlacements[index].clue,
596
+ todaysLetter: shuffled[index],
597
+ todaysPlacement: shuffledPlacements[index].id
598
+ };
599
+ }
600
+
601
+ // src/utils/index.ts
602
+ import dayjs2 from "dayjs";
434
603
  import customParseFormat from "dayjs/plugin/customParseFormat.js";
435
604
  import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js";
436
605
  import timezone from "dayjs/plugin/timezone.js";
437
606
  import utc from "dayjs/plugin/utc.js";
438
607
  var dateFormat = "DD-MM-YYYY";
439
608
  var timeFormat = "HH:mm";
440
- dayjs.extend(customParseFormat);
441
- dayjs.extend(utc);
442
- dayjs.extend(timezone);
443
- dayjs.extend(isSameOrAfter);
609
+ dayjs2.extend(customParseFormat);
610
+ dayjs2.extend(utc);
611
+ dayjs2.extend(timezone);
612
+ dayjs2.extend(isSameOrAfter);
444
613
  var NZ_TZ = "Pacific/Auckland";
445
614
  function toNZTime(date3) {
446
- return dayjs(date3).tz(NZ_TZ).format();
615
+ return dayjs2(date3).tz(NZ_TZ).format();
447
616
  }
448
617
  var formatDate = (dateStr, display = "datetime", timeStr) => {
449
618
  const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;
450
- const dateTime = timeStr ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`) : dayjs(dateStr, dateFormat);
619
+ const dateTime = timeStr ? dayjs2(dateTimeStr, `${dateFormat} ${timeFormat}`) : dayjs2(dateStr, dateFormat);
451
620
  const formattedDate = dateTime.format("dddd, D MMMM, YYYY");
452
621
  const formattedTime = dateTime.format("h:mm a");
453
622
  switch (display) {
@@ -462,9 +631,9 @@ var formatDate = (dateStr, display = "datetime", timeStr) => {
462
631
  }
463
632
  };
464
633
  var getCurrentAndFutureDates = (dates) => {
465
- const now = dayjs();
634
+ const now = dayjs2();
466
635
  return dates.filter((dateObj) => {
467
- const dateTime = dayjs(
636
+ const dateTime = dayjs2(
468
637
  `${dateObj.startDate} ${dateObj.startTime}`,
469
638
  `${dateFormat} ${timeFormat}`
470
639
  );
@@ -472,16 +641,15 @@ var getCurrentAndFutureDates = (dates) => {
472
641
  });
473
642
  };
474
643
  var isFutureDatesBeforeThreshold = (date3, minHoursFromNow) => {
475
- const threshold = minHoursFromNow ? dayjs().add(minHoursFromNow, "hour") : dayjs().startOf("day");
476
- const dateTime = dayjs(
644
+ const threshold = minHoursFromNow ? dayjs2().add(minHoursFromNow, "hour") : dayjs2().startOf("day");
645
+ const dateTime = dayjs2(
477
646
  `${date3.startDate} ${date3.startTime}`,
478
647
  `${dateFormat} ${timeFormat}`
479
648
  );
480
649
  return dateTime.isSameOrAfter(threshold);
481
650
  };
482
651
  var formatTimestamp = (timestamp) => {
483
- const formattedDate = dayjs(timestamp).tz("Pacific/Auckland").format(dateFormat);
484
- const formattedTime = dayjs(timestamp).tz("Pacific/Auckland").format(timeFormat);
652
+ const formattedDate = dayjs2(timestamp).tz("Pacific/Auckland").format(dateFormat);
485
653
  return formatDate(formattedDate, "date");
486
654
  };
487
655
  var isIsoDateString = (value) => {
@@ -532,8 +700,8 @@ function sortDatesChronologically(dates) {
532
700
  }
533
701
  return [...dates].sort((a, b) => {
534
702
  const dateTimeFormat = `${dateFormat} ${timeFormat}`;
535
- const dateA = dayjs(`${a.startDate} ${a.startTime}`, dateTimeFormat);
536
- const dateB = dayjs(`${b.startDate} ${b.startTime}`, dateTimeFormat);
703
+ const dateA = dayjs2(`${a.startDate} ${a.startTime}`, dateTimeFormat);
704
+ const dateB = dayjs2(`${b.startDate} ${b.startTime}`, dateTimeFormat);
537
705
  return dateA.valueOf() - dateB.valueOf();
538
706
  });
539
707
  }
@@ -6020,7 +6188,7 @@ import * as React from "react";
6020
6188
  import { useForm } from "react-hook-form";
6021
6189
 
6022
6190
  // src/yupSchema/global.ts
6023
- import dayjs2 from "dayjs";
6191
+ import dayjs3 from "dayjs";
6024
6192
  import customParseFormat2 from "dayjs/plugin/customParseFormat.js";
6025
6193
  import isSameOrAfter2 from "dayjs/plugin/isSameOrAfter.js";
6026
6194
  import * as yup from "yup";
@@ -6049,8 +6217,8 @@ var noLeadingZeros = (fieldName, options = {}) => {
6049
6217
  return true;
6050
6218
  };
6051
6219
  };
6052
- dayjs2.extend(isSameOrAfter2);
6053
- dayjs2.extend(customParseFormat2);
6220
+ dayjs3.extend(isSameOrAfter2);
6221
+ dayjs3.extend(customParseFormat2);
6054
6222
  var emailRequiredSchema = yup.string().email("Invalid email address").required("Email is required").label("Email").transform(
6055
6223
  (value) => typeof value === "string" ? value.trim().toLowerCase() : value
6056
6224
  );
@@ -6081,12 +6249,12 @@ var contactDetailsSchema = yup.object({
6081
6249
  landlinePhone: landlinePhoneSchema
6082
6250
  }).nullable().default(void 0);
6083
6251
  var endDateNotInPastTest = yup.string().test("not-in-past", "End date cannot be in the past", (value) => {
6084
- const now = dayjs2();
6085
- return value ? dayjs2(value, dateFormat, true).isSameOrAfter(now, "day") : false;
6252
+ const now = dayjs3();
6253
+ return value ? dayjs3(value, dateFormat, true).isSameOrAfter(now, "day") : false;
6086
6254
  });
6087
6255
  var startDateNotInPastTest = yup.string().test("not-in-past", "Start date cannot be in the past", (value) => {
6088
- const now = dayjs2();
6089
- return value ? dayjs2(value, dateFormat, true).isSameOrAfter(now, "day") : false;
6256
+ const now = dayjs3();
6257
+ return value ? dayjs3(value, dateFormat, true).isSameOrAfter(now, "day") : false;
6090
6258
  });
6091
6259
  var endDateAfterStartDateTest = yup.string().test(
6092
6260
  "end-after-start",
@@ -6094,8 +6262,8 @@ var endDateAfterStartDateTest = yup.string().test(
6094
6262
  function(value) {
6095
6263
  const { startDate } = this.parent;
6096
6264
  if (!startDate || !value) return false;
6097
- return dayjs2(value, dateFormat, true).isSameOrAfter(
6098
- dayjs2(startDate, dateFormat, true),
6265
+ return dayjs3(value, dateFormat, true).isSameOrAfter(
6266
+ dayjs3(startDate, dateFormat, true),
6099
6267
  "day"
6100
6268
  );
6101
6269
  }
@@ -6106,12 +6274,12 @@ var endTimeMustBeAfterStartTimeTest = yup.string().test(
6106
6274
  function(value) {
6107
6275
  const { startDate, endDate, startTime } = this.parent;
6108
6276
  if (!startDate || !endDate || !startTime || !value) return false;
6109
- const startDateTime = dayjs2(
6277
+ const startDateTime = dayjs3(
6110
6278
  `${startDate} ${startTime}`,
6111
6279
  `${dateFormat} ${timeFormat}`,
6112
6280
  true
6113
6281
  );
6114
- const endDateTime = dayjs2(
6282
+ const endDateTime = dayjs3(
6115
6283
  `${endDate} ${value}`,
6116
6284
  `${dateFormat} ${timeFormat}`,
6117
6285
  true
@@ -6123,10 +6291,10 @@ var startTimeCannotBeInPastTest = yup.string().test(
6123
6291
  "valid-start-time",
6124
6292
  "Start time cannot be in the past",
6125
6293
  function(value) {
6126
- const now = dayjs2();
6294
+ const now = dayjs3();
6127
6295
  const { startDate } = this.parent;
6128
6296
  if (!startDate || !value) return false;
6129
- const startDateTime = dayjs2(
6297
+ const startDateTime = dayjs3(
6130
6298
  `${startDate} ${value}`,
6131
6299
  `${dateFormat} ${timeFormat}`,
6132
6300
  true
@@ -7732,95 +7900,6 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
7732
7900
  EnumActivity2["VIEW"] = "VIEW";
7733
7901
  return EnumActivity2;
7734
7902
  })(EnumActivity || {});
7735
-
7736
- // src/types/game.ts
7737
- var gameScreenIdentifierList = [
7738
- {
7739
- clue: "Where your actions turn into a timeline.",
7740
- id: "activities"
7741
- },
7742
- {
7743
- clue: "Where conversations happen without speaking.",
7744
- id: "chat"
7745
- },
7746
- {
7747
- clue: "The place to redefine who you are.",
7748
- id: "edit-profile"
7749
- },
7750
- {
7751
- clue: "A single moment worth showing up for.",
7752
- id: "event"
7753
- },
7754
- {
7755
- clue: "What\u2019s happening around you, right now.",
7756
- id: "events-near-me"
7757
- },
7758
- {
7759
- clue: "A collection of things worth attending.",
7760
- id: "events"
7761
- },
7762
- {
7763
- clue: "What\u2019s happening in a wider area\u2014not just nearby.",
7764
- id: "events/region"
7765
- },
7766
- {
7767
- clue: "Where fun becomes a challenge.",
7768
- id: "games"
7769
- },
7770
- {
7771
- clue: "Your starting point for everything.",
7772
- id: "home"
7773
- },
7774
- {
7775
- clue: "Where the app taps you on the shoulder.",
7776
- id: "notifications"
7777
- },
7778
- {
7779
- clue: "Where you fine-tune your experience.",
7780
- id: "options"
7781
- },
7782
- {
7783
- clue: "A single collaborator in the ecosystem.",
7784
- id: "partner"
7785
- },
7786
- {
7787
- clue: "The network behind the scenes.",
7788
- id: "partners"
7789
- },
7790
- {
7791
- clue: "Where you share something with everyone.",
7792
- id: "post"
7793
- },
7794
- {
7795
- clue: "Your identity, on display.",
7796
- id: "profile"
7797
- },
7798
- {
7799
- clue: "One provider offering something valuable.",
7800
- id: "vendor"
7801
- },
7802
- {
7803
- clue: "A marketplace of providers.",
7804
- id: "vendors"
7805
- },
7806
- {
7807
- clue: "People who stopped by to see you.",
7808
- id: "visitors"
7809
- }
7810
- ];
7811
- var EnumGameType = /* @__PURE__ */ ((EnumGameType2) => {
7812
- EnumGameType2["DAILY_CLUE"] = "dailyClue";
7813
- return EnumGameType2;
7814
- })(EnumGameType || {});
7815
- var gameTypeToDisplayName = {
7816
- ["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
7817
- };
7818
- var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
7819
- EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
7820
- EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
7821
- EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
7822
- return EnumGameStatus2;
7823
- })(EnumGameStatus || {});
7824
7903
  export {
7825
7904
  ANDROID_URL,
7826
7905
  EnumActivity,
@@ -7869,6 +7948,7 @@ export {
7869
7948
  categoryColors,
7870
7949
  cluemartSocialMedia,
7871
7950
  companyContactFields,
7951
+ computeDailyClueState,
7872
7952
  contactUsFields,
7873
7953
  darkColors,
7874
7954
  dateFormat,
@@ -7912,6 +7992,7 @@ export {
7912
7992
  requestPasswordResetFields,
7913
7993
  requirementsOptions,
7914
7994
  resetPasswordFields,
7995
+ seededShuffle,
7915
7996
  socialMediaFields,
7916
7997
  sortDatesChronologically,
7917
7998
  stallTypeOptions,