Files
discord-decomp/sources/modules/search/managers/AbstractSearchSessionAnalyticsManager.tsx
T
2026-07-28 01:06:53 +03:00

110 lines
6.6 KiB
TypeScript

/* Metro module 9689; source: modules/search/managers/AbstractSearchSessionAnalyticsManager.tsx; dependencies: [6, 7, 491, 9675, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SearchUtilsModule from '../SearchUtils.tsx'; /* Metro dependency 9675 */
function _fun76177(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:6, offset: 0x01dc5b43, size: 145 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = _fun76179();
(FileImportTrackerModule).fileFinishedImporting('modules/search/managers/AbstractSearchSessionAnalyticsManager.tsx');
exports.default = value;
function createDefaultSessionState() { // fn#76178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:116, offset: 0x01dc5bd4, size: 51 bytes, params: 1, frame: 12
const object = {};
object.sessionId = (require(491) /* metro dependency 491 */).v4();
object.searchQueryId = null;
return object;
}
function _fun76179() { // fn#76179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:209, offset: 0x01dc5c07, size: 263 bytes, params: 1, frame: 15
return CreateClass(AbstractSearchSessionAnalyticsManager, [{key: 'getSession', value: value_76181}, {key: 'setSession',
value: value_76182}, {key: 'deleteSession', value: value_76183}, {key: 'getSessionId', value: function(a0) {
var r1;
var value = this.getSession(a0);
var value2 = null;
r1 = value2 == value ? undefined : value.sessionId;
return value2 != r1 ? r1 : value2;
}}, {key: 'getQueryId', value: function(a0) {
var r1;
var value = this.getSession(a0);
var value2 = null;
r1 = value2 == value ? undefined : value.searchQueryId;
return value2 != r1 ? r1 : value2;
}}, {key: 'refreshQueryId', value: value_76186}, {key: 'initialize', value: value_76187}, {key: 'terminate',
value: function(a0) {
this._terminate(a0);
this.deleteSession(a0);
}}, {key: 'transferSession', value: function(a0, a1) {
this._transferSession(a0, a1);
var value = this.getSession(a0);
var sessions = this.sessions;
sessions.set(require(dependencyMap[3]).getSearchContextId(a1), value ?? createDefaultSessionState());
this.deleteSession(a0);
}}]);
function AbstractSearchSessionAnalyticsManager() { // fn#76180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:230, offset: 0x01dc5d0e, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
env1_2(this, AbstractSearchSessionAnalyticsManager);
const Map = global.Map;
this.sessions = new Map();
}
function value_76181(a0) { // fn#76181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:374, offset: 0x01dc5d4b, size: 72 bytes, params: 2, frame: 13
const sessions = this.sessions;
const get = sessions.get;
let value = environment.__proto__;
const getSearchContextId = (SearchUtilsModule).getSearchContextId;
value = Reflect.apply(get, sessions, [Reflect.apply(getSearchContextId, value, [a0])]);
const value2 = null;
return value2 != value ? value : value2;
}
function value_76182(a0, a1) { // fn#76182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:491, offset: 0x01dc5d93, size: 113 bytes, params: 3, frame: 15
const value = environment.__proto__;
const searchContextId = (SearchUtilsModule).getSearchContextId(a0);
let sessions = this.sessions;
const r5 = sessions.get(searchContextId) ?? createDefaultSessionState();
sessions = this.sessions;
const set = sessions.set;
const object = {};
copyDataProperties(object, a1, copyDataProperties(object, r5, r5));
Reflect.apply(set, sessions, [searchContextId, object]);
}
function value_76183(a0) { // fn#76183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:668, offset: 0x01dc5e04, size: 60 bytes, params: 2, frame: 14
const sessions = this.sessions;
let value = environment.__proto__;
value = require(9675) /* metro dependency 9675: SearchUtils */;
const getSearchContextId = value.getSearchContextId;
sessions.delete(Reflect.apply(getSearchContextId, value, [a0]));
}
function value_76186(a0) { // fn#76186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:1004, offset: 0x01dc5ea0, size: 62 bytes, params: 2, frame: 15
const setSession = this.setSession;
const object = {};
const value = environment.__proto__;
object.searchQueryId = (require(491) /* metro dependency 491 */).v4();
Reflect.apply(setSession, this, [a0, object]);
}
function value_76187(a0, a1) { // fn#76187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9875:1090, offset: 0x01dc5ede, size: 116 bytes, params: 3, frame: 17
let value = copyRestArgs(1, undefined);
const _initialize = this._initialize;
let object = [a0];
arraySpread(object, value, 1, undefined);
apply(_initialize, object, this, undefined);
const setSession = this.setSession;
object = {};
value = environment.__proto__;
object.sessionId = (require(491) /* metro dependency 491 */).v4();
object.searchQueryId = null;
Reflect.apply(setSession, this, [a0, object]);
}
}
}
global.__d(_fun76177, 9689, [6, 7, 491, 9675, 2]) /* metro module 9689, dependencies: [6, 7, 491, 9675, 2] */;