2026-07-27 11:26:19 +00:00
// Module ID: 13993
// Function ID: 107080
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-27 11:26:19 +00:00
// Dependencies: [31, 4223, 653, 10432, 491, 10438, 5949, 5960, 13979, 13994, 5839, 5844, 2]
2026-07-20 16:05:17 +00:00
// Exports: useBountiesModalVideoAnalytics
2026-07-27 11:26:19 +00:00
// Module 13993 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import result from "result" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import { AnalyticEvents } from "ME" ;
const require = arg1 ;
function _createForOfIteratorHelperLoose ( iterable ) {
let closure_0 = iterable ;
iterable = "undefined" !== typeof Symbol ;
if ( iterable ) {
2026-07-20 16:05:17 +00:00
const _Symbol = Symbol ;
2026-07-23 10:11:24 +00:00
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( ! iterable ) {
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( iterable ) {
const iter = iterable . call ( iterable ) ;
2026-07-20 16:05:17 +00:00
const next = iter . next ;
return next . bind ( iter ) ;
} else {
const _Array = Array ;
2026-07-23 10:11:24 +00:00
let tmp = iterable ;
if ( ! Array . isArray ( iterable ) ) {
2026-07-20 16:05:17 +00:00
let tmp2 ;
2026-07-23 10:11:24 +00:00
if ( iterable ) {
if ( "string" === typeof iterable ) {
tmp2 = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
const toString = { } . toString ;
2026-07-23 10:11:24 +00:00
const substr = toString . call ( iterable ) . slice ( 8 , - 1 ) ;
2026-07-20 16:05:17 +00:00
let name = substr ;
if ( tmp3 ) {
2026-07-23 10:11:24 +00:00
name = iterable . constructor . name ;
2026-07-20 16:05:17 +00:00
}
if ( "Map" !== name ) {
if ( "Set" !== name ) {
if ( "Arguments" === name ) {
2026-07-23 10:11:24 +00:00
let arr = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj = /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ ;
2026-07-20 16:05:17 +00:00
}
}
tmp2 = arr ;
}
const _Array2 = Array ;
2026-07-23 10:11:24 +00:00
arr = Array . from ( iterable ) ;
const callResult = toString . call ( iterable ) ;
tmp3 = "Object" === substr && iterable . constructor ;
2026-07-20 16:05:17 +00:00
}
}
tmp = tmp2 ;
if ( ! tmp2 ) {
const _TypeError = TypeError ;
const typeError = new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
throw typeError ;
}
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
closure_0 = tmp ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let c1 = 0 ;
2026-07-20 16:05:17 +00:00
return ( ) = > {
2026-07-23 10:11:24 +00:00
if ( closure_1 >= length . length ) {
2026-07-20 16:05:17 +00:00
let obj = { done : true } ;
} else {
obj = { done : false } ;
closure_1 = tmp3 + 1 ;
2026-07-23 10:11:24 +00:00
obj . value = length [ + closure_1 ] ;
2026-07-20 16:05:17 +00:00
}
return obj ;
} ;
}
}
function _arrayLikeToArray ( arg0 , arg1 ) {
let length ;
if ( tmp ) {
length = arg0 . length ;
}
const ArrayResult = Array ( length ) ;
for ( let num = 0 ; num < length ; num = num + 1 ) {
ArrayResult [ num ] = arg0 [ num ] ;
}
return ArrayResult ;
}
2026-07-23 10:11:24 +00:00
let closure_6 = [ 25 , 50 , 75 ] ;
let result = require ( "ME" ) . fileFinishedImporting ( "modules/quests/native/BountiesModal/useBountiesModalVideoAnalytics.tsx" ) ;
2026-07-20 16:05:17 +00:00
export const useBountiesModalVideoAnalytics = function useBountiesModalVideoAnalytics ( bountyId ) {
bountyId = bountyId . bountyId ;
const sourceQuestContent = bountyId . sourceQuestContent ;
const rewardDurationMs = bountyId . rewardDurationMs ;
let num = bountyId . initialPlaybackTimeSec ;
if ( num === undefined ) {
num = 0 ;
}
let num2 = bountyId . initialMaxVideoProgressSec ;
if ( num2 === undefined ) {
num2 = 0 ;
}
let num3 = bountyId . initialVideoDurationSec ;
if ( num3 === undefined ) {
num3 = 0 ;
}
2026-07-21 22:01:30 +00:00
let flag = bountyId . wasPreloaded ;
if ( flag === undefined ) {
flag = false ;
}
let str = bountyId . startupPath ;
if ( str === undefined ) {
str = "carousel" ;
}
let prop = bountyId . verticalScrollingPosition ;
if ( prop === undefined ) {
prop = null ;
}
let flag2 = bountyId . isActive ;
if ( flag2 === undefined ) {
flag2 = true ;
}
let questImpressionId ;
let memo ;
let closure_11 ;
let closure_12 ;
let closure_13 ;
let closure_14 ;
let closure_15 ;
let closure_16 ;
let closure_17 ;
let closure_18 ;
let closure_19 ;
let closure_20 ;
2026-07-22 07:54:56 +00:00
let closure_21 ;
let closure_22 ;
2026-07-20 16:05:17 +00:00
let callback ;
2026-07-22 07:54:56 +00:00
let memo1 ;
2026-07-20 16:05:17 +00:00
let callback1 ;
let callback2 ;
let callback3 ;
let callback4 ;
let callback5 ;
2026-07-22 07:54:56 +00:00
let callback6 ;
let callback7 ;
let callback14 ;
let callback15 ;
let callback16 ;
2026-07-23 10:11:24 +00:00
let obj = bountyId ( rewardDurationMs [ 3 ] ) ;
2026-07-21 22:01:30 +00:00
questImpressionId = obj . useQuestImpressionId ( ) ;
2026-07-23 10:11:24 +00:00
memo = num2 . useMemo ( ( ) = > bountyId ( rewardDurationMs [ 4 ] ) . v4 ( ) , [ ] ) ;
2026-07-20 16:05:17 +00:00
const set = new Set ( ) ;
2026-07-21 22:01:30 +00:00
if ( tmp5 ) {
2026-07-20 16:05:17 +00:00
set . add ( "start" ) ;
}
if ( 1000 * num2 >= rewardDurationMs ) {
set . add ( "threshold" ) ;
}
2026-07-23 10:11:24 +00:00
closure_11 = num2 . useRef ( set ) ;
closure_12 = num2 . useRef ( false ) ;
closure_13 = num2 . useRef ( num ) ;
closure_14 = num2 . useRef ( num3 ) ;
closure_15 = num2 . useRef ( null ) ;
closure_16 = num2 . useRef ( null ) ;
closure_17 = num2 . useRef ( false ) ;
closure_18 = num2 . useRef ( false ) ;
closure_19 = num2 . useRef ( null ) ;
closure_20 = num2 . useRef ( null ) ;
closure_21 = num2 . useRef ( - 1 ) ;
closure_22 = num2 . useRef ( { bitrateBps : null , width : null , height : null , levelIndex : null } ) ;
callback = num2 . useCallback ( ( ) = > {
2026-07-22 07:54:56 +00:00
if ( null != closure_19 . current ) {
const _clearTimeout = clearTimeout ;
clearTimeout ( closure_19 . current ) ;
closure_19 . current = null ;
}
} , [ ] ) ;
2026-07-21 22:01:30 +00:00
const items = [ flag , str , prop , rewardDurationMs ] ;
2026-07-23 10:11:24 +00:00
memo1 = num2 . useMemo ( ( ) = > ( { was_preloaded : flag , startup_path : str , vertical_scrolling_position : prop , reward_timer_seconds : rewardDurationMs / 1000 } ) , items ) ;
callback1 = num2 . useCallback ( ( ) = > {
2026-07-22 07:54:56 +00:00
const current = closure_22 . current ;
return { hls_level_index : current.levelIndex , hls_segment_res_width : current.width , hls_segment_res_height : current.height } ;
} , [ ] ) ;
2026-07-21 22:01:30 +00:00
const items1 = [ num2 , num3 ] ;
2026-07-23 10:11:24 +00:00
callback2 = num2 . useCallback ( ( current ) = > {
2026-07-20 16:05:17 +00:00
let iter ;
let tmp = current ;
if ( ! ref . current ) {
ref . current = true ;
if ( tmp <= 0 ) {
tmp = num3 ;
}
if ( tmp > 0 ) {
2026-07-21 22:01:30 +00:00
const result = bountyId ( rewardDurationMs [ 5 ] ) . formatVideoProgressRatio ( num2 , tmp ) ;
const tmp11 = prop ( str ) ;
2026-07-20 16:05:17 +00:00
let iter2 = tmp11 ( ) ;
if ( ! iter2 . done ) {
do {
let value = iter2 . value ;
if ( result >= value / 100 ) {
2026-07-21 22:01:30 +00:00
let tmp3 = closure_11 ;
current = closure_11 . current ;
2026-07-20 16:05:17 +00:00
let _HermesInternal = HermesInternal ;
let addResult = current . add ( "p" + value ) ;
}
iter = tmp11 ( ) ;
iter2 = iter ;
} while ( ! iter . done ) ;
}
2026-07-21 22:01:30 +00:00
const obj = bountyId ( rewardDurationMs [ 5 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-21 22:01:30 +00:00
} , items1 ) ;
const items2 = [ bountyId , memo , questImpressionId , sourceQuestContent , rewardDurationMs ] ;
2026-07-23 10:11:24 +00:00
callback3 = num2 . useCallback ( ( arg0 ) = > {
2026-07-20 16:05:17 +00:00
let progress ;
let thresholdMet ;
let videoTimestampSeconds ;
( { videoTimestampSeconds , progress , thresholdMet } = arg0 ) ;
2026-07-21 22:01:30 +00:00
let obj = bountyId ( rewardDurationMs [ 6 ] ) ;
obj = { adContentId : bountyId , adCreativeType : bountyId ( rewardDurationMs [ 7 ] ) . AdCreativeType . BOUNTY , event : flag.AD_VIDEO_PROGRESSED , properties : obj , sourceQuestContent } ;
2026-07-20 16:05:17 +00:00
obj = { progress , video_timestamp_seconds : videoTimestampSeconds , video_session_id : memo , impression_id : questImpressionId , threshold_met : thresholdMet , reward_timer_seconds : rewardDurationMs / 1000 } ;
obj . trackAdContentEvent ( obj ) ;
2026-07-21 22:01:30 +00:00
} , items2 ) ;
2026-07-22 07:54:56 +00:00
const items3 = [ callback3 ] ;
2026-07-23 10:11:24 +00:00
callback4 = num2 . useCallback ( ( ) = > {
2026-07-21 22:01:30 +00:00
const current = closure_11 . current ;
2026-07-20 16:05:17 +00:00
if ( ! current . has ( "start" ) ) {
2026-07-21 22:01:30 +00:00
const current2 = closure_11 . current ;
2026-07-20 16:05:17 +00:00
current2 . add ( "start" ) ;
2026-07-23 10:11:24 +00:00
callback3 ( { videoTimestampSeconds : 0 , progress : 0 , thresholdMet : false } ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
} , items3 ) ;
2026-07-22 07:54:56 +00:00
const items4 = [ callback3 , rewardDurationMs ] ;
2026-07-23 10:11:24 +00:00
callback5 = num2 . useCallback ( ( arg0 , current ) = > {
2026-07-21 22:01:30 +00:00
current = closure_11 . current ;
2026-07-20 16:05:17 +00:00
if ( ! current . has ( "threshold" ) ) {
2026-07-21 22:01:30 +00:00
const current2 = closure_11 . current ;
2026-07-20 16:05:17 +00:00
current2 . add ( "threshold" ) ;
const _Math = Math ;
const bound = Math . max ( rewardDurationMs / 1000 , arg0 ) ;
2026-07-21 22:01:30 +00:00
let obj = bountyId ( rewardDurationMs [ 5 ] ) ;
2026-07-20 16:05:17 +00:00
obj = { videoTimestampSeconds : bound } ;
obj . progress = obj . formatVideoProgressRatio ( bound , current ) ;
obj . thresholdMet = true ;
2026-07-22 07:54:56 +00:00
callback3 ( obj ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
} , items4 ) ;
2026-07-22 07:54:56 +00:00
const items5 = [ callback3 ] ;
2026-07-23 10:11:24 +00:00
callback6 = num2 . useCallback ( ( arg0 , arg1 ) = > {
2026-07-21 22:01:30 +00:00
const current = closure_11 . current ;
2026-07-20 16:05:17 +00:00
if ( ! current . has ( "end" ) ) {
2026-07-21 22:01:30 +00:00
const current2 = closure_11 . current ;
2026-07-20 16:05:17 +00:00
current2 . add ( "end" ) ;
const _Math = Math ;
2026-07-23 10:11:24 +00:00
const obj = { videoTimestampSeconds : Math.max ( arg0 , arg1 ) , progress : 1 , thresholdMet : true } ;
2026-07-22 07:54:56 +00:00
callback3 ( obj ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
} , items5 ) ;
2026-07-22 07:54:56 +00:00
const items6 = [ callback3 , rewardDurationMs ] ;
2026-07-23 10:11:24 +00:00
callback7 = num2 . useCallback ( ( videoTimestampSeconds , current ) = > {
2026-07-20 16:05:17 +00:00
let iter ;
if ( current > 0 ) {
2026-07-21 22:01:30 +00:00
const result = bountyId ( rewardDurationMs [ 5 ] ) . formatVideoProgressRatio ( videoTimestampSeconds , current ) ;
const tmp13 = prop ( str ) ;
2026-07-20 16:05:17 +00:00
let iter2 = tmp13 ( ) ;
if ( ! iter2 . done ) {
do {
let value = iter2 . value ;
let _HermesInternal = HermesInternal ;
let combined = "p" + value ;
2026-07-21 22:01:30 +00:00
let tmp2 = closure_11 ;
current = closure_11 . current ;
2026-07-20 16:05:17 +00:00
if ( ! current . has ( combined ) ) {
if ( result >= value / 100 ) {
2026-07-21 22:01:30 +00:00
let tmp3 = closure_11 ;
let current2 = closure_11 . current ;
2026-07-20 16:05:17 +00:00
let addResult = current2 . add ( combined ) ;
2026-07-23 10:11:24 +00:00
let tmp5 = callback3 ;
2026-07-20 16:05:17 +00:00
let obj = { videoTimestampSeconds , progress : result } ;
2026-07-23 10:11:24 +00:00
let tmp6 = rewardDurationMs ;
obj . thresholdMet = 1000 * videoTimestampSeconds >= rewardDurationMs ;
let tmp7 = callback3 ( obj ) ;
2026-07-20 16:05:17 +00:00
}
}
iter = tmp13 ( ) ;
iter2 = iter ;
} while ( ! iter . done ) ;
}
2026-07-21 22:01:30 +00:00
const obj2 = bountyId ( rewardDurationMs [ 5 ] ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
} , items6 ) ;
2026-07-22 07:54:56 +00:00
const items7 = [ callback2 , callback4 , callback5 , callback7 , rewardDurationMs ] ;
const items8 = [ callback2 , callback4 , callback5 , callback7 , callback6 ] ;
2026-07-23 10:11:24 +00:00
const callback8 = num2 . useCallback ( ( arg0 , current , current2 ) = > {
2026-07-21 22:01:30 +00:00
closure_13 . current = current2 ;
closure_14 . current = current ;
2026-07-22 07:54:56 +00:00
callback2 ( current ) ;
2026-07-21 22:01:30 +00:00
if ( 0 === arg0 ) {
2026-07-22 07:54:56 +00:00
callback4 ( ) ;
2026-07-21 22:01:30 +00:00
}
if ( 1000 * arg0 >= rewardDurationMs ) {
2026-07-22 07:54:56 +00:00
callback5 ( arg0 , current ) ;
2026-07-21 22:01:30 +00:00
}
2026-07-22 07:54:56 +00:00
callback7 ( arg0 , current ) ;
2026-07-21 22:01:30 +00:00
} , items7 ) ;
const items9 = [ bountyId , memo , questImpressionId , sourceQuestContent , rewardDurationMs ] ;
2026-07-23 10:11:24 +00:00
const callback9 = num2 . useCallback ( ( arg0 , current , current2 ) = > {
2026-07-21 22:01:30 +00:00
closure_13 . current = current2 ;
closure_14 . current = current ;
2026-07-22 07:54:56 +00:00
callback2 ( current ) ;
2026-07-21 22:01:30 +00:00
if ( 0 === arg0 ) {
2026-07-22 07:54:56 +00:00
callback4 ( ) ;
2026-07-21 22:01:30 +00:00
}
callback5 ( arg0 , current ) ;
2026-07-22 07:54:56 +00:00
callback7 ( arg0 , current ) ;
callback6 ( arg0 , current ) ;
2026-07-21 22:01:30 +00:00
} , items8 ) ;
const items10 = [ bountyId , memo , questImpressionId , sourceQuestContent , rewardDurationMs ] ;
2026-07-23 10:11:24 +00:00
const callback10 = num2 . useCallback ( ( loop_count ) = > {
2026-07-21 22:01:30 +00:00
closure_13 . current = 0 ;
let obj = bountyId ( rewardDurationMs [ 6 ] ) ;
obj = { adContentId : bountyId , adCreativeType : bountyId ( rewardDurationMs [ 7 ] ) . AdCreativeType . BOUNTY , event : flag.AD_VIDEO_LOOPED , properties : obj , sourceQuestContent } ;
obj = { video_session_id : memo , impression_id : questImpressionId , loop_count , reward_timer_seconds : rewardDurationMs / 1000 } ;
obj . trackAdContentEvent ( obj ) ;
} , items9 ) ;
const items11 = [ bountyId , memo , questImpressionId , sourceQuestContent , rewardDurationMs ] ;
2026-07-23 10:11:24 +00:00
const callback11 = num2 . useCallback ( ( video_timestamp_seconds ) = > {
2026-07-21 22:01:30 +00:00
if ( arg1 === bountyId ( rewardDurationMs [ 8 ] ) . PlaybackTriggerSource . USER_INTERACTION ) {
let obj = bountyId ( rewardDurationMs [ 6 ] ) ;
obj = { adContentId : bountyId , adCreativeType : bountyId ( rewardDurationMs [ 7 ] ) . AdCreativeType . BOUNTY , event : flag.AD_VIDEO_PAUSED } ;
obj = { video_timestamp_seconds , video_session_id : memo , impression_id : questImpressionId , reward_timer_seconds : rewardDurationMs / 1000 } ;
obj . properties = obj ;
obj . sourceQuestContent = sourceQuestContent ;
2026-07-20 16:05:17 +00:00
obj . trackAdContentEvent ( obj ) ;
2026-07-21 22:01:30 +00:00
}
} , items10 ) ;
const items12 = [ bountyId , memo , questImpressionId , sourceQuestContent , rewardDurationMs ] ;
2026-07-23 10:11:24 +00:00
const callback12 = num2 . useCallback ( ( video_timestamp_seconds ) = > {
2026-07-21 22:01:30 +00:00
if ( arg1 === bountyId ( rewardDurationMs [ 8 ] ) . PlaybackTriggerSource . USER_INTERACTION ) {
let obj = bountyId ( rewardDurationMs [ 6 ] ) ;
obj = { adContentId : bountyId , adCreativeType : bountyId ( rewardDurationMs [ 7 ] ) . AdCreativeType . BOUNTY , event : flag.AD_VIDEO_RESUMED } ;
obj = { video_timestamp_seconds , video_session_id : memo , impression_id : questImpressionId , reward_timer_seconds : rewardDurationMs / 1000 } ;
obj . properties = obj ;
obj . sourceQuestContent = sourceQuestContent ;
obj . trackAdContentEvent ( obj ) ;
}
} , items11 ) ;
2026-07-22 07:54:56 +00:00
const items13 = [ bountyId , memo , questImpressionId , callback1 , memo1 , sourceQuestContent ] ;
2026-07-23 10:11:24 +00:00
const callback13 = num2 . useCallback ( ( error ) = > {
2026-07-21 22:01:30 +00:00
let obj = bountyId ( rewardDurationMs [ 6 ] ) ;
obj = { adContentId : bountyId , adCreativeType : bountyId ( rewardDurationMs [ 7 ] ) . AdCreativeType . BOUNTY , event : flag.AD_VIDEO_ERROR } ;
2026-07-23 10:11:24 +00:00
obj = { video_progress : bountyId ( rewardDurationMs [ 5 ] ) . formatVideoProgressRatio ( ref2 . current , ref3 . current ) , video_error_type : null , network_connection_speed : null , video_session_id : memo } ;
2026-07-21 22:01:30 +00:00
let code ;
if ( null != error ) {
code = error . error . code ;
}
obj . video_error_code = code ;
let localizedDescription ;
if ( null != error ) {
localizedDescription = error . error . localizedDescription ;
}
if ( null == localizedDescription ) {
let errorString ;
2026-07-20 16:05:17 +00:00
if ( null != error ) {
2026-07-21 22:01:30 +00:00
errorString = error . error . errorString ;
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
localizedDescription = errorString ;
}
obj . video_error_message = localizedDescription ;
obj . video_network_state = null ;
obj . impression_id = questImpressionId ;
obj . reward_timer_seconds = rewardDurationMs / 1000 ;
obj . properties = obj ;
obj . sourceQuestContent = sourceQuestContent ;
obj . trackAdContentEvent ( obj ) ;
const obj4 = bountyId ( rewardDurationMs [ 5 ] ) ;
if ( obj5 . isSourceError ( error ) ) {
2026-07-23 10:11:24 +00:00
const obj1 = { name : bountyId ( rewardDurationMs [ 11 ] ) . MetricEvents . QUEST_VIDEO_ERROR , tags : [ "error_type:SOURCE_ERROR" ] } ;
2026-07-21 22:01:30 +00:00
sourceQuestContent ( rewardDurationMs [ 10 ] ) . increment ( obj1 ) ;
const obj6 = sourceQuestContent ( rewardDurationMs [ 10 ] ) ;
}
} , items12 ) ;
2026-07-23 10:11:24 +00:00
callback14 = num2 . useCallback ( ( ) = > {
2026-07-22 07:54:56 +00:00
if ( null != ref7 . current ) {
2026-07-21 22:01:30 +00:00
const _Date = Date ;
2026-07-22 07:54:56 +00:00
ref7 . current = null ;
const diff = Date . now ( ) - ref7 . current ;
2026-07-21 22:01:30 +00:00
let obj = bountyId ( rewardDurationMs [ 6 ] ) ;
obj = { adContentId : bountyId , adCreativeType : bountyId ( rewardDurationMs [ 7 ] ) . AdCreativeType . BOUNTY , event : flag.AD_VIDEO_BUFFERING_ENDED } ;
2026-07-22 07:54:56 +00:00
obj = { video_session_id : memo , impression_id : questImpressionId , duration : diff , network_connection_speed : num3.getEffectiveConnectionSpeed ( ) , buffer_index : ref8.current , video_bitrate_bps : closure_22.current.bitrateBps } ;
const merged = Object . assign ( callback1 ( ) ) ;
const merged1 = Object . assign ( memo1 ) ;
2026-07-20 16:05:17 +00:00
obj . properties = obj ;
obj . sourceQuestContent = sourceQuestContent ;
obj . trackAdContentEvent ( obj ) ;
2026-07-21 22:01:30 +00:00
}
} , items13 ) ;
2026-07-22 07:54:56 +00:00
const items14 = [ bountyId , memo , questImpressionId , callback , callback1 , memo1 , sourceQuestContent ] ;
2026-07-23 10:11:24 +00:00
callback15 = num2 . useCallback ( ( ) = > {
2026-07-22 07:54:56 +00:00
let current = ref5 . current ;
2026-07-21 22:01:30 +00:00
if ( ! current ) {
current = null == ref4 . current ;
}
if ( ! current ) {
2026-07-22 07:54:56 +00:00
current = null == closure_16 . current ;
2026-07-21 22:01:30 +00:00
}
if ( ! current ) {
2026-07-22 07:54:56 +00:00
ref5 . current = true ;
callback ( ) ;
2026-07-21 22:01:30 +00:00
let obj = bountyId ( rewardDurationMs [ 6 ] ) ;
obj = { adContentId : bountyId , adCreativeType : bountyId ( rewardDurationMs [ 7 ] ) . AdCreativeType . BOUNTY , event : true.AD_VIDEO_TIME_TO_FIRST_FRAME } ;
2026-07-22 07:54:56 +00:00
obj = { video_session_id : memo , impression_id : questImpressionId , duration_ms : closure_16.current - ref4 . current , network_connection_speed : num3.getEffectiveConnectionSpeed ( ) , startup_bitrate_bps : closure_22.current.bitrateBps } ;
const merged = Object . assign ( callback1 ( ) ) ;
const merged1 = Object . assign ( memo1 ) ;
2026-07-21 22:01:30 +00:00
obj . properties = obj ;
obj . sourceQuestContent = sourceQuestContent ;
obj . trackAdContentEvent ( obj ) ;
}
} , items14 ) ;
2026-07-22 07:54:56 +00:00
const items15 = [ callback15 ] ;
2026-07-23 10:11:24 +00:00
callback16 = num2 . useCallback ( ( ) = > {
2026-07-22 07:54:56 +00:00
let current = ref5 . current ;
if ( ! current ) {
current = null == ref4 . current ;
}
if ( ! current ) {
current = null == closure_16 . current ;
}
if ( ! current ) {
if ( null == closure_22 . current . bitrateBps ) {
if ( null == closure_19 . current ) {
const _setTimeout = setTimeout ;
closure_19 . current = setTimeout ( ( ) = > {
2026-07-23 10:11:24 +00:00
outer1_19 . current = null ;
outer1_33 ( ) ;
2026-07-22 07:54:56 +00:00
} , 500 ) ;
}
} else {
callback15 ( ) ;
}
}
} , items15 ) ;
const items16 = [ callback , callback14 , callback15 ] ;
2026-07-23 10:11:24 +00:00
const effect = num2 . useEffect ( ( ) = > ( ) = > {
if ( null != outer1_19 . current ) {
outer1_33 ( ) ;
2026-07-22 07:54:56 +00:00
}
2026-07-23 10:11:24 +00:00
outer1_23 ( ) ;
outer1_32 ( ) ;
2026-07-22 07:54:56 +00:00
} , items16 ) ;
const items17 = [ flag2 , callback16 , callback , callback14 , callback15 ] ;
2026-07-23 10:11:24 +00:00
const effect1 = num2 . useEffect ( ( ) = > {
2026-07-21 22:01:30 +00:00
if ( flag2 ) {
2026-07-22 07:54:56 +00:00
callback16 ( ) ;
2026-07-21 22:01:30 +00:00
} else {
2026-07-22 07:54:56 +00:00
if ( null != closure_19 . current ) {
callback15 ( ) ;
}
callback ( ) ;
callback14 ( ) ;
2026-07-21 22:01:30 +00:00
}
2026-07-22 07:54:56 +00:00
} , items17 ) ;
2026-07-21 22:01:30 +00:00
obj = {
2026-07-22 07:54:56 +00:00
handleVideoProgressAnalytics : callback8 ,
handleVideoEndAnalytics : callback9 ,
handleVideoLoopedAnalytics : callback10 ,
handleVideoPausedAnalytics : callback11 ,
handleVideoResumedAnalytics : callback12 ,
handleVideoErrorAnalytics : callback13 ,
2026-07-23 10:11:24 +00:00
handleLoadStartAnalytics : num2.useCallback ( ( ) = > {
2026-07-22 07:54:56 +00:00
callback14 ( ) ;
callback ( ) ;
2026-07-21 22:01:30 +00:00
closure_15 . current = Date . now ( ) ;
closure_16 . current = null ;
closure_17 . current = false ;
closure_18 . current = false ;
2026-07-23 10:11:24 +00:00
closure_22 . current = { bitrateBps : null , width : null , height : null , levelIndex : null } ;
2026-07-22 07:54:56 +00:00
} , items18 ) ,
2026-07-23 10:11:24 +00:00
handleVideoTracksAnalytics : num2.useCallback ( ( arg0 ) = > {
closure_22 . current = ( function getSelectedTrackInfo ( arg0 ) {
2026-07-22 07:54:56 +00:00
let selectedVideoTrackId ;
let videoTracks ;
( { videoTracks , selectedVideoTrackId } = arg0 ) ;
if ( 0 === videoTracks . length ) {
2026-07-23 10:11:24 +00:00
return { bitrateBps : null , width : null , height : null , levelIndex : null } ;
2026-07-22 07:54:56 +00:00
} else {
let num = - 1 ;
if ( null != selectedVideoTrackId ) {
num = - 1 ;
if ( selectedVideoTrackId . length > 0 ) {
num = videoTracks . findIndex ( ( trackId ) = > trackId . trackId === selectedVideoTrackId ) ;
}
}
const size = num >= 0 ? videoTracks [ num ] : videoTracks [ 0 ] ;
const obj = { } ;
let bitrate = null ;
if ( size . bitrate > 0 ) {
bitrate = size . bitrate ;
}
obj . bitrateBps = bitrate ;
let width = null ;
if ( size . width > 0 ) {
width = size . width ;
}
obj . width = width ;
let height = null ;
if ( size . height > 0 ) {
height = size . height ;
}
obj . height = height ;
let tmp4 = null ;
if ( num >= 0 ) {
tmp4 = num ;
}
obj . levelIndex = tmp4 ;
return obj ;
}
2026-07-23 10:11:24 +00:00
} ) ( arg0 ) ;
2026-07-22 07:54:56 +00:00
let tmp = flag2 ;
if ( flag2 ) {
tmp = null != closure_16 . current ;
}
if ( tmp ) {
tmp = null != closure_22 . current . bitrateBps ;
}
if ( tmp ) {
callback15 ( ) ;
}
} , items19 ) ,
2026-07-23 10:11:24 +00:00
handleReadyForDisplayAnalytics : num2.useCallback ( ( ) = > {
2026-07-21 22:01:30 +00:00
closure_18 . current = true ;
2026-07-22 07:54:56 +00:00
if ( null == closure_16 . current ) {
2026-07-21 22:01:30 +00:00
const _Date = Date ;
2026-07-22 07:54:56 +00:00
closure_16 . current = Date . now ( ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-21 22:01:30 +00:00
if ( flag2 ) {
2026-07-22 07:54:56 +00:00
callback16 ( ) ;
2026-07-21 22:01:30 +00:00
}
2026-07-22 07:54:56 +00:00
} , items20 ) ,
2026-07-23 10:11:24 +00:00
handleBufferAnalytics : num2.useCallback ( ( arg0 ) = > {
2026-07-22 07:54:56 +00:00
if ( ref6 . current ) {
2026-07-21 22:01:30 +00:00
if ( flag2 ) {
if ( arg0 ) {
const _Date = Date ;
2026-07-22 07:54:56 +00:00
closure_20 . current = Date . now ( ) ;
ref8 . current = ref8 . current + 1 ;
2026-07-21 22:01:30 +00:00
let obj = bountyId ( rewardDurationMs [ 6 ] ) ;
obj = { adContentId : bountyId , adCreativeType : bountyId ( rewardDurationMs [ 7 ] ) . AdCreativeType . BOUNTY , event : flag.AD_VIDEO_BUFFERING_STARTED } ;
2026-07-22 07:54:56 +00:00
obj = { video_session_id : memo , impression_id : questImpressionId , network_connection_speed : 7.getEffectiveConnectionSpeed ( ) , buffer_index : ref8.current , video_bitrate_bps : closure_22.current.bitrateBps } ;
const merged = Object . assign ( callback1 ( ) ) ;
const merged1 = Object . assign ( memo1 ) ;
2026-07-21 22:01:30 +00:00
obj . properties = obj ;
obj . sourceQuestContent = sourceQuestContent ;
obj . trackAdContentEvent ( obj ) ;
} else {
2026-07-22 07:54:56 +00:00
callback14 ( ) ;
2026-07-21 22:01:30 +00:00
}
return tmp5 ;
}
}
2026-07-22 07:54:56 +00:00
} , items21 )
2026-07-20 16:05:17 +00:00
} ;
2026-07-23 10:11:24 +00:00
items18 = [ callback , callback14 ] ;
items19 = [ callback15 , flag2 ] ;
items20 = [ flag2 , callback16 ] ;
items21 = [ bountyId , memo , questImpressionId , callback14 , callback1 , flag2 , memo1 , sourceQuestContent ] ;
2026-07-20 16:05:17 +00:00
return obj ;
} ;