2026-07-25 08:10:48 +00:00
// Module ID: 4216
2026-07-27 11:26:19 +00:00
// Function ID: 36651
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 15, 17, 18, 1194, 4217, 4195, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 4216 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import isStreamKey from "isStreamKey" ;
import _possibleConstructorReturn from "_possibleConstructorReturn" ;
import _getPrototypeOf from "_getPrototypeOf" ;
import _inherits from "_inherits" ;
import closure_7 from "_isNativeReflectConstruct" ;
import closure_8 from "_isNativeReflectConstruct" ;
const require = arg1 ;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = ! valueOf . call ( Reflect . construct ( Boolean , [ ] , ( ) = > {
} ) ) ;
function _isNativeReflectConstruct() {
return closure_0 ;
}
const result = _isNativeReflectConstruct ( ) ;
}
2026-07-23 10:11:24 +00:00
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 ;
}
function isStatsOutbound ( found ) {
return "packetsSent" in found ;
}
function updateAveragedStatsHelper ( minVersion , arg1 , arg2 , arr , arr2 ) {
let tmp = arg2 ;
const found = arr . find ( ( type ) = > "video" === type . type ) ;
if ( null == arg2 ) {
2026-07-23 10:11:24 +00:00
const obj = { packetsSentOrReceived : 0 , packetsLost : 0 , packetLossRate : 0 , frameRate : 0 , resolution : 0 , entropy : 0 , numDatapoints : 0 , frameRateAggregated : 0 , resolutionAggregated : 0 , entropyAggregated : 0 , minVersion } ;
2026-07-20 16:05:17 +00:00
tmp = obj ;
}
if ( null == found ) {
return tmp ;
} else {
if ( isStatsOutbound ( found ) ) {
const packetsSent = found . packetsSent ;
let num2 = 0 ;
if ( null != packetsSent ) {
num2 = packetsSent ;
}
let num = num2 ;
} else {
const packetsReceived = found . packetsReceived ;
num = 0 ;
if ( null != packetsReceived ) {
num = packetsReceived ;
}
}
const packetsLost = found . packetsLost ;
if ( isStatsOutbound ( found ) ) {
let num4 = 0 ;
if ( tmp5 ) {
num4 = packetsLost ;
}
let num3 = num4 ;
} else {
num3 = 0 ;
if ( tmp5 ) {
num3 = packetsLost ;
}
}
if ( isStatsOutbound ( found ) ) {
const frameRateEncode = found . frameRateEncode ;
let num6 = 0 ;
if ( null != frameRateEncode ) {
num6 = frameRateEncode ;
}
let num5 = num6 ;
} else {
const frameRateDecode = found . frameRateDecode ;
num5 = 0 ;
if ( null != frameRateDecode ) {
num5 = frameRateDecode ;
}
}
const resolution = found . resolution ;
let height ;
if ( null != resolution ) {
height = resolution . height ;
}
let num7 = 0 ;
if ( null != height ) {
num7 = height ;
}
let num8 = 0 ;
if ( isStatsOutbound ( found ) ) {
const videoEntropy = found . videoEntropy ;
num8 = 0 ;
if ( null != videoEntropy ) {
num8 = videoEntropy ;
}
}
tmp . numDatapoints = tmp . numDatapoints + 1 ;
tmp . frameRateAggregated = tmp . frameRateAggregated + num5 ;
tmp . resolutionAggregated = tmp . resolutionAggregated + num7 ;
tmp . entropyAggregated = tmp . entropyAggregated + num8 ;
let found1 ;
if ( null != arr2 ) {
found1 = arr2 . find ( ( type ) = > "video" === type . type ) ;
}
if ( null != found1 ) {
if ( arg1 >= tmp . minVersion ) {
tmp . numDatapoints = tmp . numDatapoints - 1 ;
if ( isStatsOutbound ( found1 ) ) {
const packetsSent2 = found1 . packetsSent ;
let num11 = 0 ;
if ( null != packetsSent2 ) {
num11 = packetsSent2 ;
}
let num10 = num11 ;
} else {
const packetsReceived2 = found1 . packetsReceived ;
num10 = 0 ;
if ( null != packetsReceived2 ) {
num10 = packetsReceived2 ;
}
}
const packetsLost2 = found1 . packetsLost ;
if ( isStatsOutbound ( found1 ) ) {
let num13 = 0 ;
if ( tmp13 ) {
num13 = packetsLost2 ;
}
let num12 = num13 ;
} else {
num12 = 0 ;
if ( tmp13 ) {
num12 = packetsLost2 ;
}
}
if ( isStatsOutbound ( found1 ) ) {
const frameRateEncode2 = found1 . frameRateEncode ;
let num15 = 0 ;
if ( null != frameRateEncode2 ) {
num15 = frameRateEncode2 ;
}
let num14 = num15 ;
} else {
const frameRateDecode2 = found1 . frameRateDecode ;
num14 = 0 ;
if ( null != frameRateDecode2 ) {
num14 = frameRateDecode2 ;
}
}
let num16 = 0 ;
if ( isStatsOutbound ( found1 ) ) {
const videoEntropy2 = found1 . videoEntropy ;
num16 = 0 ;
if ( null != videoEntropy2 ) {
num16 = videoEntropy2 ;
}
}
const resolution2 = found1 . resolution ;
let height1 ;
if ( null != resolution2 ) {
height1 = resolution2 . height ;
}
let num17 = 0 ;
if ( null != height1 ) {
num17 = height1 ;
}
tmp . frameRateAggregated = tmp . frameRateAggregated - num14 ;
tmp . resolutionAggregated = tmp . resolutionAggregated - num17 ;
tmp . entropyAggregated = tmp . entropyAggregated - num16 ;
tmp . packetsSentOrReceived = num - num10 ;
tmp . packetsLost = num3 - num12 ;
}
tmp . frameRate = tmp . frameRateAggregated / tmp . numDatapoints ;
tmp . resolution = tmp . resolutionAggregated / tmp . numDatapoints ;
tmp . entropy = tmp . entropyAggregated / tmp . numDatapoints ;
tmp . packetLossRate = tmp . packetsLost / ( tmp . packetsSentOrReceived + tmp . packetsLost ) ;
return tmp ;
}
tmp . packetsSentOrReceived = num ;
tmp . packetsLost = num3 ;
}
}
2026-07-23 10:11:24 +00:00
function updateAveragedStats ( closure_10 , prop , value , arr ) {
if ( null == closure_10 [ prop ] ) {
closure_10 [ prop ] = { } ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
id = id . getId ( ) ;
let version ;
if ( null != arr ) {
version = arr . version ;
2026-07-20 16:05:17 +00:00
}
let num = 0 ;
if ( null != version ) {
num = version ;
}
let outbound ;
2026-07-23 10:11:24 +00:00
if ( null != arr ) {
outbound = arr . stats . rtp . outbound ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
closure_10 [ prop ] [ id ] = updateAveragedStatsHelper ( value . version , num , closure_10 [ prop ] [ id ] , value . stats . rtp . outbound , outbound ) ;
const keys = Object . keys ( value . stats . rtp . inbound ) ;
2026-07-20 16:05:17 +00:00
for ( let num2 = 0 ; num2 < keys . length ; num2 = num2 + 1 ) {
let tmp5 = keys [ num2 ] ;
2026-07-23 10:11:24 +00:00
version = value . version ;
2026-07-20 16:05:17 +00:00
let version1 ;
let tmp6 = updateAveragedStatsHelper ;
2026-07-23 10:11:24 +00:00
if ( null != arr ) {
version1 = arr . version ;
2026-07-20 16:05:17 +00:00
}
let num3 = 0 ;
if ( null != version1 ) {
num3 = version1 ;
}
2026-07-23 10:11:24 +00:00
let tmp8 = closure_10 [ prop ] [ tmp5 ] ;
let tmp9 = value . stats . rtp . inbound [ tmp5 ] ;
2026-07-20 16:05:17 +00:00
let tmp10 ;
2026-07-23 10:11:24 +00:00
if ( null != arr ) {
tmp10 = arr . stats . rtp . inbound [ tmp5 ] ;
2026-07-20 16:05:17 +00:00
}
let tmp11 = version ;
let tmp12 = num3 ;
let tmp13 = tmp8 ;
let tmp14 = tmp9 ;
let tmp15 = tmp10 ;
2026-07-23 10:11:24 +00:00
closure_10 [ prop ] [ tmp5 ] = tmp6 ( version , num3 , tmp8 , tmp9 , tmp10 ) ;
2026-07-20 16:05:17 +00:00
}
}
function resetAccumulatedStats ( mediaEngineConnectionId , ownerId ) {
2026-07-23 10:11:24 +00:00
let tmp5 ;
if ( null != dependencyMap2 [ mediaEngineConnectionId ] ) {
tmp5 = tmp4 [ ownerId ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( null != tmp5 ) {
delete tmp3 [ tmp2 ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let tmp9 ;
if ( null != dependencyMap3 [ mediaEngineConnectionId ] ) {
tmp9 = tmp8 [ ownerId ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( null != tmp9 ) {
delete tmp [ tmp2 ] ;
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
function getStatsHistoryAtIndex ( prop , arg1 ) {
if ( null == prop ) {
2026-07-20 16:05:17 +00:00
return null ;
} else {
let tmp2 = null ;
2026-07-23 10:11:24 +00:00
if ( null != dependencyMap [ prop ] ) {
2026-07-20 16:05:17 +00:00
tmp2 = null ;
if ( arr . length > arg1 ) {
tmp2 = arr [ arr . length - arg1 - 1 ] ;
}
}
return tmp2 ;
}
}
let closure_9 = { } ;
let closure_10 = { } ;
let closure_11 = { } ;
2026-07-23 10:11:24 +00:00
let tmp2 = ( ( Store ) = > {
2026-07-20 16:05:17 +00:00
class MediaEngineStatsStore {
constructor ( ) {
self = this ;
2026-07-23 10:11:24 +00:00
tmp = outer1_2 ( this , MediaEngineStatsStore ) ;
obj = outer1_5 ( MediaEngineStatsStore ) ;
tmp2 = outer1_4 ;
if ( outer1_12 ( ) ) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis ;
_Reflect = Reflect ;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_5 ;
2026-07-20 16:05:17 +00:00
tmp8 = arguments ;
2026-07-23 10:11:24 +00:00
constructResult = Reflect . construct ( obj , arguments , outer1_5 ( self ) . constructor ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments ;
tmp4 = arguments ;
constructResult = obj ( . . . arguments ) ;
}
return tmp2 ( self , constructResult ) ;
}
}
callback2 ( MediaEngineStatsStore , Store ) ;
let obj = {
key : "initialize" ,
value() {
2026-07-23 10:11:24 +00:00
this . waitFor ( outer1_7 , outer1_8 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
2026-07-23 10:11:24 +00:00
let items = [ obj , , , , ] ;
2026-07-20 16:05:17 +00:00
obj = {
key : "getConnectionStats" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return outer1_19 ( arg0 , 0 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 1 ] = obj ;
obj = {
key : "getLastConnectionStats" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return outer1_19 ( arg0 , 1 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 2 ] = obj ;
items [ 3 ] = {
key : "getStatsHistory" ,
value ( arg0 ) {
if ( null == arg0 ) {
let items = [ ] ;
} else {
2026-07-23 10:11:24 +00:00
items = outer1_9 [ arg0 ] ;
2026-07-20 16:05:17 +00:00
if ( null == items ) {
items = [ ] ;
}
}
return items ;
}
} ;
items [ 4 ] = {
key : "getAccumulatedPerformanceStats" ,
value ( arg0 , arg1 , arg2 ) {
let tmp = null ;
if ( null != arg0 ) {
2026-07-23 10:11:24 +00:00
const tmp3 = "long" === arg2 ? outer1_10 : outer1_11 [ arg0 ] ;
2026-07-20 16:05:17 +00:00
let tmp4 ;
if ( null != tmp3 ) {
tmp4 = tmp3 [ arg1 ] ;
}
let tmp6 = null ;
if ( null != tmp4 ) {
tmp6 = tmp4 ;
}
tmp = tmp6 ;
}
return tmp ;
}
} ;
return callback ( MediaEngineStatsStore , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( require ( "initialize" ) . Store ) ;
2026-07-20 16:05:17 +00:00
tmp2 . displayName = "MediaEngineStatsStore" ;
2026-07-23 10:11:24 +00:00
tmp2 = new tmp2 ( require ( "dispatcher" ) , {
2026-07-20 16:05:17 +00:00
MEDIA_ENGINE_CONNECTION_STATS : function handleMediaEngineConnectionStats ( connectionStats ) {
let iter3 ;
const tmp = _createForOfIteratorHelperLoose ( connectionStats . connectionStats ) ;
const iter = tmp ( ) ;
let iter2 = iter ;
if ( ! iter . done ) {
do {
let value = iter2 . value ;
let prop = value . mediaEngineConnectionId ;
if ( 0 !== prop . length ) {
{ } [ prop ] = value ;
2026-07-23 10:11:24 +00:00
let tmp26 = dependencyMap ;
if ( ! ( prop in dependencyMap ) ) {
let tmp2 = dependencyMap ;
dependencyMap [ prop ] = [ ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let tmp3 = dependencyMap ;
let arr2 = dependencyMap [ prop ] ;
2026-07-20 16:05:17 +00:00
let arr = arr2 . push ( value ) ;
2026-07-23 10:11:24 +00:00
let tmp5 = dependencyMap ;
2026-07-20 16:05:17 +00:00
arr = undefined ;
2026-07-23 10:11:24 +00:00
if ( dependencyMap [ prop ] . length > 30 ) {
let tmp7 = dependencyMap ;
let arr3 = dependencyMap [ prop ] ;
2026-07-20 16:05:17 +00:00
arr = arr3 . shift ( ) ;
}
let tmp9 = closure_11 ;
2026-07-23 10:11:24 +00:00
let tmp10 = getStatsHistoryAtIndex ;
let tmp8 = updateAveragedStats ;
let tmp11 = getStatsHistoryAtIndex ( prop , 15 ) ;
2026-07-20 16:05:17 +00:00
let tmp12 ;
if ( null != tmp11 ) {
tmp12 = tmp11 ;
}
let tmp13 = tmp9 ;
let tmp14 = prop ;
let tmp15 = value ;
let tmp16 = tmp12 ;
let tmp8Result = tmp8 ( tmp9 , prop , value , tmp12 ) ;
2026-07-23 10:11:24 +00:00
let tmp18 = updateAveragedStats ;
2026-07-20 16:05:17 +00:00
let tmp19 = closure_10 ;
let tmp20 = prop ;
let tmp21 = value ;
let tmp22 = arr ;
2026-07-23 10:11:24 +00:00
let tmp23 = updateAveragedStats ( closure_10 , prop , value , arr ) ;
2026-07-20 16:05:17 +00:00
let tmp24 = tmp11 ;
let tmp25 = arr ;
}
iter3 = tmp ( ) ;
iter2 = iter3 ;
} while ( ! iter3 . done ) ;
}
} ,
MEDIA_ENGINE_CONNECTION_STATS_HISTORY_RESET : function handleResetStats ( mediaEngineConnectionId ) {
if ( null != mediaEngineConnectionId . mediaEngineConnectionId ) {
2026-07-23 10:11:24 +00:00
delete tmp3 [ tmp2 ] ;
delete tmp3 [ tmp2 ] ;
delete tmp [ tmp2 ] ;
2026-07-20 16:05:17 +00:00
}
} ,
STREAM_UPDATE : function handleStreamUpdate ( streamKey ) {
streamKey = streamKey . streamKey ;
if ( streamKey . paused ) {
return false ;
} else {
2026-07-23 10:11:24 +00:00
rTCConnection = rTCConnection . getRTCConnection ( streamKey ) ;
2026-07-20 16:05:17 +00:00
let mediaEngineConnectionId ;
if ( null != rTCConnection ) {
mediaEngineConnectionId = rTCConnection . getMediaEngineConnectionId ( ) ;
}
if ( null == mediaEngineConnectionId ) {
return false ;
} else {
2026-07-25 08:10:48 +00:00
resetAccumulatedStats ( mediaEngineConnectionId , require ( 4195 ) /* isStreamKey */ . decodeStreamKey ( streamKey ) . ownerId ) ;
2026-07-20 16:05:17 +00:00
}
}
} ,
RTC_CONNECTION_VIDEO : function handleVideo ( mediaEngineConnectionId ) {
mediaEngineConnectionId = mediaEngineConnectionId . mediaEngineConnectionId ;
if ( null == mediaEngineConnectionId ) {
return false ;
} else {
resetAccumulatedStats ( mediaEngineConnectionId , tmp ) ;
}
}
} ) ;
2026-07-23 10:11:24 +00:00
let result = require ( "_possibleConstructorReturn" ) . fileFinishedImporting ( "modules/media_engine/MediaEngineStatsStore.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default tmp2 ;