decord/source/modules/quests/lib/analytics/QuestHomeSearchSession.tsx

39 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 7524
// Function ID: 7525
2026-07-20 16:05:17 +00:00
// Name: getOrCreateQuestHomeSearchSession
2026-08-24 06:08:38 +00:00
// Dependencies: [514, 5068, 2]
2026-07-20 16:05:17 +00:00
// Exports: clearQuestHomeSearchSession, getCurrentQuestHomeSearchSession, getOrCreateQuestHomeSearchSession
2026-08-24 06:08:38 +00:00
// Module 7524 (getOrCreateQuestHomeSearchSession)
import set from "set" /* 2 */;
import v1 from "v1" /* 514 */;
import result2 from "result" /* 5068 */;
2026-07-23 10:11:24 +00:00
let c2 = null;
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/quests/lib/analytics/QuestHomeSearchSession.tsx");
2026-07-20 16:05:17 +00:00
export const getOrCreateQuestHomeSearchSession = function getOrCreateQuestHomeSearchSession() {
const timestamp = Date.now();
2026-07-23 10:11:24 +00:00
if (null == obj) {
2026-07-29 08:29:29 +00:00
obj = { searchSession: null, isNew: true };
obj = { uuid: null, createdAtTimestamp: null, lastUsedTimestamp: null, version: null };
2026-08-24 06:08:38 +00:00
obj[0] = v1.v4();
2026-07-29 08:29:29 +00:00
obj[1] = timestamp;
obj[2] = timestamp;
2026-08-24 06:08:38 +00:00
obj[3] = result2.CLIENT_SESSION_STORAGE_VERSION;
2026-07-29 08:29:29 +00:00
obj[0] = obj;
2026-08-24 06:08:38 +00:00
const obj4 = v1;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
obj.lastUsedTimestamp = timestamp;
2026-07-29 08:29:29 +00:00
obj = { searchSession: null, isNew: false };
obj[0] = obj;
2026-07-20 16:05:17 +00:00
}
return obj;
};
export function clearQuestHomeSearchSession() {
2026-08-24 06:08:38 +00:00
c2 = null;
2026-07-20 16:05:17 +00:00
}
export function getCurrentQuestHomeSearchSession() {
2026-07-23 10:11:24 +00:00
return c2;
2026-07-20 16:05:17 +00:00
}