2026-07-24 07:16:23 +00:00
// Module ID: 10635
// Function ID: 82913
2026-07-20 16:05:17 +00:00
// Name: _createForOfIteratorHelperLoose
2026-07-24 07:16:23 +00:00
// Dependencies: [5, 57, 31, 27, 7370, 4155, 653, 33, 4130, 3, 477, 10636, 491, 7592, 1207, 10637, 1554, 10638, 10639, 675, 624, 4470, 1212, 507, 10640, 1443, 10520, 10521, 8328, 4323, 10554, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 10635 (_createForOfIteratorHelperLoose)
2026-07-23 10:11:24 +00:00
import closure_4 from "items3" ;
import _slicedToArray from "_slicedToArray" ;
import closure_6 from "set" ;
import { Linking } from "importDefaultResult1" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import items3 from "items3" ;
import ME from "ME" ;
import { jsx } from "jsxProd" ;
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose" ;
import importDefaultResult from "get ActivityIndicator" ;
import set from "set" ;
import set from "result" ;
let closure_10 ;
let closure_11 ;
let closure_12 ;
let closure_9 ;
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 ;
}
function getSafeArea ( arg0 , arg1 ) {
let override = arg0 ;
let num = arg1 ;
if ( null != arg0 ) {
if ( override . disable ) {
num = 0 ;
} else if ( null != override . override ) {
const _Math2 = Math ;
override = override . override ;
let bound = Math . max ( 0 , override ) ;
} else {
bound = arg1 ;
if ( null != override . offset ) {
const _Math = Math ;
bound = Math . max ( 0 , arg1 + override . offset ) ;
}
}
}
return num ;
}
class BaseActivityWebView {
constructor ( arg0 ) {
2026-07-23 10:11:24 +00:00
( { hasFrameId , getOrCreateFrameId , releaseFrameId } = global ) ;
2026-07-20 16:05:17 +00:00
hasInvalidUrlError = global . hasInvalidUrlError ;
setHasInvalidUrlError = global . setHasInvalidUrlError ;
hadInvalidUrlError = global . hadInvalidUrlError ;
deepLinkQueryParams = global . deepLinkQueryParams ;
if ( deepLinkQueryParams === undefined ) {
deepLinkQueryParams = { } ;
}
applicationId = global . applicationId ;
( { queryParams , onActivityCrash } = global ) ;
onLoadError = global . onLoadError ;
referrerPolicy = global . referrerPolicy ;
isPipOrGridMode = global . isPipOrGridMode ;
webViewKey = global . webViewKey ;
( { ignoreSilentHardwareSwitch , activityUrl , allowPopups } = global ) ;
if ( ignoreSilentHardwareSwitch === undefined ) {
ignoreSilentHardwareSwitch = true ;
}
safeAreasConfig = global . safeAreasConfig ;
channelId = global . channelId ;
guildId = global . guildId ;
activitySessionId = global . activitySessionId ;
2026-07-23 10:11:24 +00:00
useState = undefined ;
c17 = undefined ;
c18 = undefined ;
useState = undefined ;
c20 = undefined ;
useState = undefined ;
c22 = undefined ;
2026-07-20 16:05:17 +00:00
MOBILE = undefined ;
activityUrl = undefined ;
useRef = undefined ;
useCallback = undefined ;
HermesInternal = undefined ;
closure_28 = undefined ;
useEffect = undefined ;
useEffect = undefined ;
useState = undefined ;
releaseFrameId = undefined ;
useRef = undefined ;
onLoadError = undefined ;
2026-07-23 10:11:24 +00:00
tmp = guildId ( ) ;
context = applicationId . useContext ( require ( "context" ) . WebViewContext ) ;
first = hadInvalidUrlError ( applicationId . useState ( ( ) = > callback ( ) ) , 1 ) [ 0 ] ;
useState = first ;
first1 = hadInvalidUrlError ( applicationId . useState ( ( ) = > {
2026-07-20 16:05:17 +00:00
if ( null != webViewKey ) {
let v4Result = callback2 ( ) ;
} else {
2026-07-23 10:11:24 +00:00
v4Result = outer1_0 ( hasInvalidUrlError [ 12 ] ) . v4 ( ) ;
const obj = outer1_0 ( hasInvalidUrlError [ 12 ] ) ;
2026-07-20 16:05:17 +00:00
}
return v4Result ;
} ) , 1 ) [ 0 ] ;
2026-07-23 10:11:24 +00:00
c17 = first1 ;
tmp5 = hadInvalidUrlError ( applicationId . useState ( null ) , 2 ) ;
2026-07-20 16:05:17 +00:00
url = tmp5 [ 0 ] ;
2026-07-23 10:11:24 +00:00
c18 = url ;
useState = tmp5 [ 1 ] ;
2026-07-20 16:05:17 +00:00
items = [ ] ;
items [ 0 ] = webViewKey ;
2026-07-23 10:11:24 +00:00
memo = applicationId . useMemo ( ( ) = > {
2026-07-20 16:05:17 +00:00
let webViewProxy ;
if ( null != webViewKey ) {
2026-07-23 10:11:24 +00:00
webViewProxy = outer1_0 ( hasInvalidUrlError [ 13 ] ) . getWebViewProxy ( webViewKey ) ;
const obj = outer1_0 ( hasInvalidUrlError [ 13 ] ) ;
2026-07-20 16:05:17 +00:00
}
return webViewProxy ;
} , items ) ;
2026-07-23 10:11:24 +00:00
c20 = memo ;
tmp7 = hadInvalidUrlError ( applicationId . useState ( null ) , 2 ) ;
[ str , useState ] = tmp7 ;
2026-07-20 16:05:17 +00:00
items1 = [ , , ] ;
items1 [ 0 ] = first ;
items1 [ 1 ] = first1 ;
items1 [ 2 ] = webViewKey ;
2026-07-23 10:11:24 +00:00
effect = applicationId . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
let tmp = first ;
if ( first ) {
tmp = null != webViewKey ;
}
if ( ! tmp ) {
2026-07-23 10:11:24 +00:00
const ComponentDispatch = outer1_0 ( hasInvalidUrlError [ 14 ] ) . ComponentDispatch ;
2026-07-20 16:05:17 +00:00
const obj = { id : first1 } ;
ComponentDispatch . dispatch ( webViewKey . IFRAME_MOUNT , obj ) ;
}
} , items1 ) ;
items2 = [ , ] ;
items2 [ 0 ] = webViewKey ;
items2 [ 1 ] = first1 ;
2026-07-23 10:11:24 +00:00
effect1 = applicationId . useEffect ( ( ) = > ( ) = > {
if ( null == outer1_11 ) {
const ComponentDispatch = outer2_0 ( hasInvalidUrlError [ 14 ] ) . ComponentDispatch ;
const obj = { id : outer1_17 } ;
ComponentDispatch . dispatch ( webViewKey . IFRAME_UNMOUNT , obj ) ;
2026-07-20 16:05:17 +00:00
}
} , items2 ) ;
2026-07-23 10:11:24 +00:00
rect = require ( "getStableSafeAreaInsets" ) ( ) ;
c22 = rect ;
obj2 = require ( "getConstants" ) ;
2026-07-20 16:05:17 +00:00
obj = { } ;
constants = obj2 . getConstants ( ) ;
merged = Object . assign ( queryParams ) ;
merged1 = Object . assign ( deepLinkQueryParams ) ;
obj [ "frame_id" ] = first1 ;
2026-07-23 10:11:24 +00:00
obj [ "platform" ] = referrerPolicy . MOBILE ;
2026-07-20 16:05:17 +00:00
obj [ "mobile_app_version" ] = constants . Version ;
2026-07-23 10:11:24 +00:00
tmp13 = require ( "getIFrameSandboxAttributes" ) ( { allowPopups } ) ;
2026-07-20 16:05:17 +00:00
MOBILE = tmp13 ;
uRLSearchParams = new URLSearchParams ( obj ) ;
combined = "" + activityUrl + "?" + uRLSearchParams ;
activityUrl = combined ;
2026-07-23 10:11:24 +00:00
useRef = applicationId . useRef ( safeAreasConfig ) ;
2026-07-20 16:05:17 +00:00
items3 = [ , , , ] ;
items3 [ 0 ] = combined ;
items3 [ 1 ] = tmp13 ;
items3 [ 2 ] = onLoadError ;
items3 [ 3 ] = referrerPolicy ;
2026-07-23 10:11:24 +00:00
effect2 = applicationId . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
function _loadHtml() {
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
const obj = setHasInvalidUrlError ( tmp ) ;
2026-07-20 16:05:17 +00:00
return obj ( . . . arguments ) ;
}
2026-07-23 10:11:24 +00:00
! ( function loadHtml() {
2026-07-20 16:05:17 +00:00
return _loadHtml ( . . . arguments ) ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
} , items3 ) ;
items4 = [ ] ;
items4 [ 0 ] = applicationId ;
items5 = [ ] ;
items5 [ 0 ] = applicationId ;
2026-07-23 10:11:24 +00:00
callback = applicationId . useCallback ( ( nativeEvent ) = > {
2026-07-20 16:05:17 +00:00
activitySessionId . warn ( "activity WebView error for appId " + applicationId + ". " + JSON . stringify ( nativeEvent . nativeEvent ) ) ;
} , items4 ) ;
items6 = [ , , , , , , , ] ;
items6 [ 0 ] = applicationId ;
items6 [ 1 ] = channelId ;
items6 [ 2 ] = guildId ;
items6 [ 3 ] = activitySessionId ;
items6 [ 4 ] = first1 ;
items6 [ 5 ] = releaseFrameId ;
items6 [ 6 ] = memo ;
items6 [ 7 ] = onActivityCrash ;
2026-07-23 10:11:24 +00:00
callback1 = applicationId . useCallback ( ( nativeEvent ) = > {
2026-07-20 16:05:17 +00:00
activitySessionId . warn ( "activity WebView render process gone for appId " + applicationId + ". " + JSON . stringify ( nativeEvent . nativeEvent ) ) ;
} , items5 ) ;
2026-07-23 10:11:24 +00:00
callback2 = applicationId . useCallback ( ( ) = > {
2026-07-20 16:05:17 +00:00
activitySessionId . warn ( "activity WebView content process terminated for appId " + applicationId ) ;
2026-07-23 10:11:24 +00:00
let obj = outer1_1 ( hasInvalidUrlError [ 19 ] ) ;
2026-07-20 16:05:17 +00:00
obj = { application_id : applicationId , channel_id : channelId , guild_id : guildId , activity_session_id : activitySessionId } ;
obj . track ( safeAreasConfig . ACTIVITY_WEB_VIEW_CONTENT_PROCESS_TERMINATED , obj ) ;
2026-07-23 10:11:24 +00:00
const ComponentDispatch = outer1_0 ( hasInvalidUrlError [ 14 ] ) . ComponentDispatch ;
2026-07-20 16:05:17 +00:00
obj = { id : first1 } ;
ComponentDispatch . dispatch ( webViewKey . IFRAME_UNMOUNT , obj ) ;
releaseFrameId ( ) ;
if ( null != memo ) {
memo . releaseWebView ( ) ;
}
onActivityCrash ( ) ;
} , items6 ) ;
2026-07-23 10:11:24 +00:00
obj4 = require ( "defaultAreStatesEqual" ) ;
2026-07-20 16:05:17 +00:00
items7 = [ ] ;
2026-07-23 10:11:24 +00:00
items7 [ 0 ] = onLoadError ;
2026-07-20 16:05:17 +00:00
stateFromStores = obj4 . useStateFromStores ( items7 , ( ) = > onLoadError . getUseActivityUrlOverride ( ) ) ;
useCallback = stateFromStores ;
items8 = [ , , ] ;
items8 [ 0 ] = combined ;
items8 [ 1 ] = stateFromStores ;
items8 [ 2 ] = setHasInvalidUrlError ;
2026-07-23 10:11:24 +00:00
effect3 = applicationId . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
const uRL = new URL ( combined ) ;
callback3 ( uRL ) ;
} , items8 ) ;
items9 = [ , ] ;
items9 [ 0 ] = hadInvalidUrlError ;
items9 [ 1 ] = hasInvalidUrlError ;
2026-07-23 10:11:24 +00:00
effect4 = applicationId . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
if ( tmp ) {
2026-07-23 10:11:24 +00:00
let obj = outer1_1 ( hasInvalidUrlError [ 21 ] ) ;
2026-07-20 16:05:17 +00:00
obj = { } ;
2026-07-23 10:11:24 +00:00
const intl = outer1_0 ( hasInvalidUrlError [ 22 ] ) . intl ;
obj . title = intl . string ( outer1_0 ( hasInvalidUrlError [ 22 ] ) . t . PtobXW ) ;
const intl2 = outer1_0 ( hasInvalidUrlError [ 22 ] ) . intl ;
obj . body = intl2 . string ( outer1_0 ( hasInvalidUrlError [ 22 ] ) . t [ "55iAUT" ] ) ;
const intl3 = outer1_0 ( hasInvalidUrlError [ 22 ] ) . intl ;
obj . confirmText = intl3 . string ( outer1_0 ( hasInvalidUrlError [ 22 ] ) . t . BddRzS ) ;
2026-07-20 16:05:17 +00:00
obj . show ( obj ) ;
}
} , items9 ) ;
HermesInternal = null ;
if ( null == url ) {
2026-07-23 10:11:24 +00:00
closure_28 = useState ;
tmp28 = applicationId ;
2026-07-20 16:05:17 +00:00
flag = false ;
2026-07-23 10:11:24 +00:00
tmp27 = useState ;
tmp29 = hadInvalidUrlError ;
tmp30 = hadInvalidUrlError ( applicationId . useState ( false ) , 2 ) ;
2026-07-20 16:05:17 +00:00
useEffect = tmp30 [ 1 ] ;
2026-07-23 10:11:24 +00:00
tmp31 = applicationId ;
tmp32 = hadInvalidUrlError ;
tmp33 = hadInvalidUrlError ( applicationId . useState ( [ ] ) , 2 ) ;
2026-07-20 16:05:17 +00:00
first2 = tmp33 [ 0 ] ;
useEffect = first2 ;
useState = tmp33 [ 1 ] ;
2026-07-23 10:11:24 +00:00
tmp35 = applicationId ;
2026-07-20 16:05:17 +00:00
items10 = [ , ] ;
items10 [ 0 ] = applicationId ;
2026-07-23 10:11:24 +00:00
items10 [ 1 ] = useState ;
effect5 = applicationId . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
function parseCsp ( arg0 , str ) {
const match = str . match ( arg0 ) ;
if ( null !== match ) {
if ( match . length >= 2 ) {
const parts = match [ 1 ] . split ( " " ) ;
2026-07-23 10:11:24 +00:00
const found = parts . filter ( ( arg0 ) = > ! outer1_0 . includes ( arg0 ) ) ;
2026-07-20 16:05:17 +00:00
str = match [ 1 ] ;
}
return [ ] ;
}
}
function _fetchAndParseCSP() {
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
const obj = setHasInvalidUrlError ( tmp ) ;
2026-07-20 16:05:17 +00:00
return obj ( . . . arguments ) ;
}
if ( closure_28 ) {
2026-07-23 10:11:24 +00:00
let closure_0 = [ "'self'" ] ;
( function fetchAndParseCSP() {
2026-07-20 16:05:17 +00:00
return _fetchAndParseCSP ( . . . arguments ) ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
}
} , items10 ) ;
2026-07-23 10:11:24 +00:00
tmp37 = applicationId ;
2026-07-20 16:05:17 +00:00
items11 = [ , ] ;
items11 [ 0 ] = null ;
items11 [ 1 ] = first2 ;
tmp39 = null != null ;
2026-07-23 10:11:24 +00:00
callback3 = applicationId . useCallback ( ( mainDocumentURL ) = > {
2026-07-20 16:05:17 +00:00
mainDocumentURL = mainDocumentURL . mainDocumentURL ;
if ( null != combined1 ) {
if ( null != mainDocumentURL ) {
if ( mainDocumentURL !== combined1 ) {
onActivityCrash . openURL ( mainDocumentURL . url ) ;
return false ;
}
}
}
const tmp2 = first1 ( first2 ) ;
let iter = tmp2 ( ) ;
if ( ! iter . done ) {
const _RegExp = RegExp ;
const regExp = new RegExp ( iter . value ) ;
while ( ! regExp . test ( mainDocumentURL . url ) ) {
let iter2 = tmp2 ( ) ;
iter = iter2 ;
}
return true ;
}
const activityUrlOverride = onLoadError . getActivityUrlOverride ( ) ;
let str = "" ;
if ( null != activityUrlOverride ) {
str = activityUrlOverride ;
}
2026-07-23 10:11:24 +00:00
const toURLSafeResult = outer1_1 ( hasInvalidUrlError [ 25 ] ) . toURLSafe ( str ) ;
const obj2 = outer1_1 ( hasInvalidUrlError [ 25 ] ) ;
const toURLSafeResult1 = outer1_1 ( hasInvalidUrlError [ 25 ] ) . toURLSafe ( mainDocumentURL . url ) ;
2026-07-20 16:05:17 +00:00
return null != toURLSafeResult && null != toURLSafeResult1 && toURLSafeResult . origin + toURLSafeResult . pathname === toURLSafeResult1 . origin + toURLSafeResult1 . pathname ;
} , items11 ) ;
if ( tmp39 ) {
tmp39 = null != url ;
}
if ( tmp39 ) {
tmp39 = null != str ;
}
releaseFrameId = tmp39 ;
2026-07-23 10:11:24 +00:00
tmp40 = applicationId ;
ref = applicationId . useRef ( null ) ;
2026-07-20 16:05:17 +00:00
useRef = ref ;
2026-07-23 10:11:24 +00:00
tmp42 = applicationId ;
callback4 = applicationId . useCallback ( ( arg0 ) = > {
2026-07-20 16:05:17 +00:00
const current = ref . current ;
if ( null != current ) {
2026-07-23 10:11:24 +00:00
current . injectJavaScript ( outer1_1 ( hasInvalidUrlError [ 26 ] ) ( arg0 ) ) ;
2026-07-20 16:05:17 +00:00
}
} , [ ] ) ;
onLoadError = callback4 ;
items12 = [ , , ] ;
items12 [ 0 ] = webViewKey ;
origin = undefined ;
2026-07-23 10:11:24 +00:00
tmp44 = applicationId ;
2026-07-20 16:05:17 +00:00
if ( null != url ) {
origin = url . origin ;
}
items12 [ 1 ] = origin ;
items12 [ 2 ] = callback4 ;
2026-07-23 10:11:24 +00:00
tmp47 = applicationId ;
2026-07-20 16:05:17 +00:00
items13 = [ , , , , , ] ;
items13 [ 0 ] = rect ;
items13 [ 1 ] = isPipOrGridMode ;
items13 [ 2 ] = tmp39 ;
items13 [ 3 ] = memo ;
items13 [ 4 ] = callback4 ;
items13 [ 5 ] = safeAreasConfig ;
2026-07-23 10:11:24 +00:00
callback5 = applicationId . useCallback ( ( nativeEvent ) = > {
2026-07-20 16:05:17 +00:00
if ( null == webViewKey ) {
const _JSON = JSON ;
const parsed = JSON . parse ( nativeEvent . nativeEvent . data ) ;
let tmp4 = "object" === typeof parsed ;
if ( tmp4 ) {
let origin ;
if ( null != url ) {
origin = url . origin ;
}
tmp4 = null != origin ;
}
if ( tmp4 ) {
let origin1 ;
if ( null != url ) {
origin1 = url . origin ;
}
2026-07-23 10:11:24 +00:00
outer1_1 ( hasInvalidUrlError [ 27 ] ) . handleMessage ( parsed , origin1 , callback4 ) ;
const obj = outer1_1 ( hasInvalidUrlError [ 27 ] ) ;
2026-07-20 16:05:17 +00:00
}
}
} , items12 ) ;
2026-07-23 10:11:24 +00:00
effect6 = applicationId . useEffect ( ( ) = > {
2026-07-20 16:05:17 +00:00
function _tryInjectJavaScript() {
// CreateGeneratorClosureLongIndex (0x67)
2026-07-23 10:11:24 +00:00
const obj = setHasInvalidUrlError ( tmp ) ;
2026-07-20 16:05:17 +00:00
return obj ( . . . arguments ) ;
}
2026-07-23 10:11:24 +00:00
if ( c32 ) {
2026-07-20 16:05:17 +00:00
if ( null != memo ) {
2026-07-23 10:11:24 +00:00
( function tryInjectJavaScript() {
2026-07-20 16:05:17 +00:00
return _tryInjectJavaScript ( . . . arguments ) ;
2026-07-23 10:11:24 +00:00
} ) ( ) ;
2026-07-20 16:05:17 +00:00
}
}
} , items13 ) ;
if ( null != null ) {
if ( null != url ) {
if ( tmp27 ) {
}
obj1 = { } ;
left = undefined ;
2026-07-23 10:11:24 +00:00
tmp49 = useState ;
2026-07-20 16:05:17 +00:00
if ( null != safeAreasConfig ) {
left = safeAreasConfig . left ;
}
left1 = undefined ;
if ( null != rect ) {
left1 = rect . left ;
}
num = 0 ;
if ( null != left1 ) {
num = left1 ;
}
obj1 . left = tmp49 ( left , num ) ;
right = undefined ;
2026-07-23 10:11:24 +00:00
tmp52 = useState ;
2026-07-20 16:05:17 +00:00
if ( null != safeAreasConfig ) {
right = safeAreasConfig . right ;
}
right1 = undefined ;
if ( null != rect ) {
right1 = rect . right ;
}
num2 = 0 ;
if ( null != right1 ) {
num2 = right1 ;
}
obj1 . right = tmp52 ( right , num2 ) ;
top = undefined ;
2026-07-23 10:11:24 +00:00
tmp55 = useState ;
2026-07-20 16:05:17 +00:00
if ( null != safeAreasConfig ) {
top = safeAreasConfig . top ;
}
top1 = undefined ;
if ( null != rect ) {
top1 = rect . top ;
}
num3 = 0 ;
if ( null != top1 ) {
num3 = top1 ;
}
obj1 . top = tmp55 ( top , num3 ) ;
bottom = undefined ;
2026-07-23 10:11:24 +00:00
tmp58 = useState ;
2026-07-20 16:05:17 +00:00
if ( null != safeAreasConfig ) {
bottom = safeAreasConfig . bottom ;
}
bottom1 = undefined ;
if ( null != rect ) {
bottom1 = rect . bottom ;
}
num4 = 0 ;
if ( null != bottom1 ) {
num4 = bottom1 ;
}
obj1 . bottom = tmp58 ( bottom , num4 ) ;
2026-07-23 10:11:24 +00:00
tmp61 = useState ;
if ( useState ) {
tmp63 = hasFrameId ;
tmp64 = hasInvalidUrlError ;
2026-07-20 16:05:17 +00:00
num5 = 18 ;
2026-07-23 10:11:24 +00:00
obj6 = require ( "safeAreaInitJs" ) ;
2026-07-20 16:05:17 +00:00
injectedJavascriptForIOS = obj6 . createInjectedJavascriptForIOS ( obj1 ) ;
}
tmp66Result = null ;
if ( null != str ) {
2026-07-23 10:11:24 +00:00
tmp67 = hasFrameId ;
tmp68 = hasInvalidUrlError ;
2026-07-20 16:05:17 +00:00
num6 = 13 ;
2026-07-23 10:11:24 +00:00
tmp66 = channelId ;
2026-07-20 16:05:17 +00:00
obj2 = { } ;
obj2 . style = tmp . webView ;
obj2 . ref = ref ;
obj3 = { } ;
obj3 . uri = null ;
obj2 . source = obj3 ;
obj4 = { } ;
if ( "" === url . port ) {
host = url . host ;
} else {
_HermesInternal3 = HermesInternal ;
str6 = ":" ;
host = "" + url . hostname + ":" + url . port ;
}
obj4 . domain = host ;
str7 = "http:" ;
obj4 . httpAllowed = "http:" === url . protocol ;
obj5 = { } ;
str8 = "internal" ;
obj5 . type = "internal" ;
_HermesInternal4 = HermesInternal ;
str9 = "/" ;
obj5 . path = "/" + first1 + "/" ;
2026-07-23 10:11:24 +00:00
obj5 . directory = require ( "asyncGeneratorStep" ) ;
2026-07-20 16:05:17 +00:00
items14 = [ ] ;
items14 [ 0 ] = obj5 ;
obj4 . pathHandlers = items14 ;
obj2 . androidAssetLoaderConfig = obj4 ;
2026-07-23 10:11:24 +00:00
obj2 . originWhitelist = [ "*" ] ;
2026-07-20 16:05:17 +00:00
str10 = "never" ;
obj2 . overScrollMode = "never" ;
obj2 . scrollEnabled = false ;
flag2 = true ;
obj2 . cacheEnabled = true ;
obj2 . onError = callback ;
obj2 . onContentProcessDidTerminate = callback2 ;
obj2 . onRenderProcessGone = callback1 ;
obj2 . webViewKey = webViewKey ;
obj2 . temporaryParentNodeTag = context ;
obj2 . messagingWithWebViewKeyEnabled = null != webViewKey ;
obj2 . onMessage = callback5 ;
2026-07-23 10:11:24 +00:00
tmp69 = useState ;
obj2 . allowFileAccess = useState ;
2026-07-20 16:05:17 +00:00
obj2 . injectedJavaScript = injectedJavascriptForIOS ;
obj2 . injectedJavaScriptForMainFrameOnly = false ;
2026-07-23 10:11:24 +00:00
tmp70 = useState ;
2026-07-20 16:05:17 +00:00
tmp71 = undefined ;
2026-07-23 10:11:24 +00:00
if ( useState ) {
2026-07-20 16:05:17 +00:00
tmp71 = callback3 ;
}
obj2 . onShouldStartLoadWithRequest = tmp71 ;
obj2 . mediaPlaybackRequiresUserAction = false ;
obj2 . ignoreSilentHardwareSwitch = ignoreSilentHardwareSwitch ;
obj2 . allowsInlineMediaPlayback = true ;
obj2 . minimumFontSize = 1 ;
obj2 . bounces = false ;
obj2 . allowsProtectedMedia = true ;
2026-07-23 10:11:24 +00:00
tmp66Result = tmp66 ( require ( "WebView" ) . WebView , obj2 ) ;
2026-07-20 16:05:17 +00:00
}
return tmp66Result ;
}
}
return null ;
} else {
2026-07-23 10:11:24 +00:00
tmp23 = useState ;
if ( useState ) {
2026-07-20 16:05:17 +00:00
_HermesInternal2 = HermesInternal ;
str5 = "file://" ;
combined1 = "file://" + str ;
} else {
_HermesInternal = HermesInternal ;
str2 = "/" ;
str3 = "/activity.html" ;
str4 = "" ;
tmp24 = first1 ;
combined1 = "" + url . origin + "/" + first1 + "/activity.html" ;
}
HermesInternal = combined1 ;
tmp26 = combined1 ;
}
return ;
}
}
function useHasInvalidUrlErrorState() {
const tmp = callback ( React . useState ( false ) , 2 ) ;
const first = tmp [ 0 ] ;
2026-07-24 07:16:23 +00:00
return { hasInvalidUrlError : first , setHasInvalidUrlError : tmp [ 1 ] , hadInvalidUrlError : importDefault ( 8328 ) ( first ) } ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
( { ActivityPlatform : closure_9 , DISALLOWED_NAVIGATION_ERROR_CLOSE_ACTIVITY : closure_10 } = items3 ) ;
( { ComponentActions : closure_11 , AnalyticEvents : closure_12 } = ME ) ;
let closure_14 = _createForOfIteratorHelperLoose . createStyles ( { webView : { backgroundColor : "transparent" } } ) ;
2026-07-20 16:05:17 +00:00
importDefaultResult = new importDefaultResult ( "EmbeddedActivityWebView" ) ;
2026-07-23 10:11:24 +00:00
set = set . isIOS ( ) ;
const result = set . fileFinishedImporting ( "modules/activities/native/EmbeddedActivityWebView.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default function EmbeddedActivityWebView ( channelId ) {
channelId = channelId . channelId ;
const currentEmbeddedActivity = channelId . currentEmbeddedActivity ;
const applicationId = channelId . applicationId ;
2026-07-23 10:11:24 +00:00
let obj = { channelId : 0 , currentEmbeddedActivity : 0 , applicationId : 0 } ;
2026-07-20 16:05:17 +00:00
Object . setPrototypeOf ( null ) ;
const merged = Object . assign ( channelId , obj ) ;
const tmp3 = useHasInvalidUrlErrorState ( ) ;
const hasInvalidUrlError = tmp3 . hasInvalidUrlError ;
const hadInvalidUrlError = tmp3 . hadInvalidUrlError ;
obj = { } ;
if ( null != currentEmbeddedActivity ) {
if ( null != currentEmbeddedActivity . customId ) {
obj . custom_id = currentEmbeddedActivity . customId ;
}
if ( null != currentEmbeddedActivity . referrerId ) {
obj . referrer_id = currentEmbeddedActivity . referrerId ;
}
}
const items = [ hasInvalidUrlError , hadInvalidUrlError , channelId , applicationId , currentEmbeddedActivity ] ;
const effect = React . useEffect ( ( ) = > {
if ( tmp ) {
if ( null != channelId ) {
let obj = currentEmbeddedActivity ( hasInvalidUrlError [ 29 ] ) ;
const participant = obj . selectParticipant ( channelId , null ) ;
}
let _location ;
obj = { } ;
if ( null != currentEmbeddedActivity ) {
_location = currentEmbeddedActivity . location ;
}
obj . location = _location ;
obj . applicationId = applicationId ;
obj . showFeedback = false ;
currentEmbeddedActivity ( hasInvalidUrlError [ 30 ] ) . leaveActivity ( obj ) ;
const obj2 = currentEmbeddedActivity ( hasInvalidUrlError [ 30 ] ) ;
}
} , items ) ;
obj = {
hasFrameId() {
return currentEmbeddedActivity ( hasInvalidUrlError [ 30 ] ) . hasFrameId ( ) ;
} ,
getOrCreateFrameId() {
return currentEmbeddedActivity ( hasInvalidUrlError [ 30 ] ) . getOrCreateFrameId ( ) ;
} ,
releaseFrameId() {
return currentEmbeddedActivity ( hasInvalidUrlError [ 30 ] ) . releaseFrameId ( ) ;
} ,
hasInvalidUrlError ,
setHasInvalidUrlError : tmp3.setHasInvalidUrlError ,
hadInvalidUrlError ,
deepLinkQueryParams : obj ,
applicationId ,
channelId
} ;
const merged1 = Object . assign ( merged ) ;
2026-07-23 10:11:24 +00:00
return < BaseActivityWebView hasFrameId = { function hasFrameId() {
return currentEmbeddedActivity ( hasInvalidUrlError [ 30 ] ) . hasFrameId ( ) ;
} } getOrCreateFrameId = { function getOrCreateFrameId() {
return currentEmbeddedActivity ( hasInvalidUrlError [ 30 ] ) . getOrCreateFrameId ( ) ;
} } releaseFrameId = { function releaseFrameId() {
return currentEmbeddedActivity ( hasInvalidUrlError [ 30 ] ) . releaseFrameId ( ) ;
} } hasInvalidUrlError = { hasInvalidUrlError } setHasInvalidUrlError = { tmp3 . setHasInvalidUrlError } hadInvalidUrlError = { hadInvalidUrlError } deepLinkQueryParams = { obj } applicationId = { applicationId } channelId = { channelId } / > ;
2026-07-20 16:05:17 +00:00
} ;
export { BaseActivityWebView } ;
export { useHasInvalidUrlErrorState } ;