/* Metro module 7095; source: modules/quests/VideoQuestUIStore.tsx; dependencies: [29, 685, 4025, 7096, 690, 7097, 2] */ import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as Module00685Module from '../../by-id/module-00685.js'; /* Metro dependency 685 */ import * as ReactBatchUpdatesNativeModule from '../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */ import * as Module04025Module from '../../by-id/module-04025.js'; /* Metro dependency 4025 */ import * as DiscordVideoPlayerTypesModule from '../../external/discord_common/js/packages/video-player/DiscordVideoPlayerTypes.tsx'; /* Metro dependency 7096 */ function _fun56718(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:6, offset: 0x013cf7dd, size: 363 bytes, params: 8, frame: 25 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = Module00685Module; value = value.createWithEqualityFn(); const persist = Module04025Module.persist; const object2 = {name: 'videoQuestUIState'}; object2.storage = Module04025Module.createJSONStorage(function() { return importDefault(dependencyMap[5]); }); object2.partialize = function(a0) { return {volume: a0.volume, muted: a0.muted, videoProgress: a0.videoProgress}; }; object2.version = 0; value = value(Reflect.apply(persist, Module04025Module, [_fun56720, object2])); (FileImportTrackerModule).fileFinishedImporting('modules/quests/VideoQuestUIStore.tsx'); exports.default = value; exports.DEFAULT_VIDEO_PROGRESS = {'timestampSec': 0, 'duration': 10, 'maxTimestampSec': 0}; exports.VideoProgressState = {UNKNOWN: 'UNKNOWN', NOT_STARTED: 'NOT_STARTED', IN_PROGRESS: 'IN_PROGRESS', COMPLETED: 'COMPLETED'}; exports.FetchStatus = {NONE: 'NONE', FETCHING: 'FETCHING', SUCCESS: 'SUCCESS', FAILURE: 'FAILURE'}; exports.useVideoQuestUIStore = value; function _fun56720(a0, a1) { // fn#56720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:748, offset: 0x013cf948, size: 181 bytes, params: 3, frame: 13 const env0_0 = a0; const env0_1 = a1; const DEFAULT_VIDEO_VOLUME = (DiscordVideoPlayerTypesModule).DEFAULT_VIDEO_VOLUME; return {'volume': null, 'muted': false, 'transcriptEnabled': false, 'captionEnabled': false, 'videoProgress': null, 'transcript': null, volume: DEFAULT_VIDEO_VOLUME, videoProgress: {}, setVolume: setVolume, setMuted: setMuted, setVideoProgress: setVideoProgress, setTranscriptEnabled: setTranscriptEnabled, setCaptionEnabled: setCaptionEnabled, getVideoProgress: function(a0) { return require().videoProgress[a0]; }, getVideoProgressState: getVideoProgressState, resetQuest: resetQuest, clearState: clearState, setTranscriptAsset: setTranscriptAsset}; function setVolume(a0) { // fn#56721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:885, offset: 0x013cf9fd, size: 52 bytes, params: 2, frame: 12 var environment; const env0_0 = a0; const value = environment.__proto__; (ReactBatchUpdatesNativeModule).batchUpdates(_fun56722); function _fun56722() { // fn#56722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:912, offset: 0x013cfa31, size: 30 bytes, params: 1, frame: 11 return env1_0({volume: env0_0}); } } function setMuted(a0) { // fn#56723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:942, offset: 0x013cfa4f, size: 52 bytes, params: 2, frame: 12 var environment; const env0_0 = a0; const value = environment.__proto__; (ReactBatchUpdatesNativeModule).batchUpdates(_fun56724); function _fun56724() { // fn#56724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:969, offset: 0x013cfa83, size: 30 bytes, params: 1, frame: 11 return env1_0({muted: env0_0}); } } function setVideoProgress(a0, a1, a2) { // fn#56725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1006, offset: 0x013cfaa1, size: 139 bytes, params: 4, frame: 16 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; const value = undefined; const property = require().videoProgress[a0]; const r4 = (property == null ? value : property.maxTimestampSec) ?? 0; const Math = global.Math; const env0_3 = Math.max(r4, a1); (ReactBatchUpdatesNativeModule).batchUpdates(_fun56726); return value; function _fun56726() { // fn#56726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1135, offset: 0x013cfb2c, size: 86 bytes, params: 1, frame: 17 const binding = env1_0; const object2 = {}; copyDataProperties(object2, require().videoProgress, undefined); object2[env0_0] = {timestampSec: require, duration: importDefault, maxTimestampSec: env0_3}; return binding({videoProgress: object2}); } } function setTranscriptEnabled(a0) { // fn#56727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1255, offset: 0x013cfb82, size: 52 bytes, params: 2, frame: 12 var environment; const env0_0 = a0; const value = environment.__proto__; (ReactBatchUpdatesNativeModule).batchUpdates(_fun56728); function _fun56728() { // fn#56728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1282, offset: 0x013cfbb6, size: 30 bytes, params: 1, frame: 11 return env1_0({transcriptEnabled: env0_0}); } } function setCaptionEnabled(a0) { // fn#56729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1332, offset: 0x013cfbd4, size: 52 bytes, params: 2, frame: 12 var environment; const env0_0 = a0; const value = environment.__proto__; (ReactBatchUpdatesNativeModule).batchUpdates(_fun56730); function _fun56730() { // fn#56730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1359, offset: 0x013cfc08, size: 30 bytes, params: 1, frame: 11 return env1_0({captionEnabled: env0_0}); } } function getVideoProgressState(a0) { // fn#56732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1451, offset: 0x013cfc42, size: 119 bytes, params: 2, frame: 10 const property = require().videoProgress[a0]; return property == null ? env1_4.UNKNOWN : property.timestampSec === 0 ? env1_4.NOT_STARTED : property.timestampSec >= property.duration ? env1_4.COMPLETED : env1_4.IN_PROGRESS; } function resetQuest(a0) { // fn#56733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1605, offset: 0x013cfcb9, size: 52 bytes, params: 2, frame: 12 var environment; const env0_0 = a0; const value = environment.__proto__; (ReactBatchUpdatesNativeModule).batchUpdates(_fun56734); function _fun56734() { // fn#56734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1632, offset: 0x013cfced, size: 83 bytes, params: 1, frame: 16 const videoProgress = require().videoProgress; const binding = env0_0; videoProgress[binding]; const binding2 = env2_3; const items2 = [binding]; env1_0({videoProgress: binding2(videoProgress, items2.map(_toPropertyKey_56719))}); } } function clearState() { // fn#56735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1735, offset: 0x013cfd40, size: 45 bytes, params: 1, frame: 12 var environment; const value = environment.__proto__; (ReactBatchUpdatesNativeModule).batchUpdates(_fun56736); function _fun56736() { // fn#56736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1763, offset: 0x013cfd6d, size: 25 bytes, params: 1, frame: 11 env1_0({videoProgress: {}}); } } function setTranscriptAsset(a0) { // fn#56737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1813, offset: 0x013cfd86, size: 52 bytes, params: 2, frame: 12 var environment; const env0_0 = a0; const value = environment.__proto__; (ReactBatchUpdatesNativeModule).batchUpdates(_fun56738); function _fun56738() { // fn#56738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:1840, offset: 0x013cfdba, size: 30 bytes, params: 1, frame: 11 env1_0({transcript: env0_0}); } } } } function _toPropertyKey_56719(a0) { // fn#56719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7273:111, offset: 0x00deffed, size: 138 bytes, params: 2, frame: 16 var r1; var property; let value = a0; if (typeof value === 'object') { if (value) { property = value[global.Symbol.toPrimitive]; if (property !== undefined) { value = property.call(value, 'string'); if (typeof value !== 'object') { r1 = value; return typeof r1 === 'symbol' ? r1 : String(r1); } throw new global.TypeError('@@toPrimitive must return a primitive value.'); } value = global.String(value); r1 = value; return typeof r1 === 'symbol' ? r1 : String(r1); } } r1 = value; return typeof r1 === 'symbol' ? r1 : String(r1); } global.__d(_fun56718, 7095, [29, 685, 4025, 7096, 690, 7097, 2]) /* metro module 7095, dependencies: [29, 685, 4025, 7096, 690, 7097, 2] */;