2026-07-29 08:29:29 +00:00
// Module ID: 328
// Function ID: 329
// Name: _queryCache
// Dependencies: [5, 19, 21, 329, 331, 81, 148, 332, 333, 336, 337, 254]
// Exports: default
// Module 328 (_queryCache)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */ ;
import resolveAssetSourceDefault from "resolveAssetSource" /* 81 */ ;
import get _hairlineWidthDefault from "get hairlineWidth" /* 254 */ ;
import ImageLoaderDefault from "ImageLoader" /* 329 */ ;
import getImageSourcesFromImageProps from "getImageSourcesFromImageProps" /* 331 */ ;
import closure _3 from "asyncGeneratorStep" /* 5 */ ;
import { use } from "noop" /* 19 */ ;
import { jsx } from "jsxProd" /* 21 */ ;
import set from "set" /* 333 */ ;
2026-07-29 08:29:29 +00:00
2026-08-24 06:08:38 +00:00
require = arg1 ;
2026-07-29 08:29:29 +00:00
function _queryCache ( ) {
const self = this ;
const tmp = callback ( ( arg0 ) => {
2026-08-24 06:08:38 +00:00
closure _0 = arg0 ;
c1 = 0 ;
2026-07-29 08:29:29 +00:00
return ( function * ( arg0 ) {
if ( v0 === 2 ) {
v0 = 3 ;
HermesBuiltin . throwTypeError ( ) ;
} else if ( tmp3 === 3 ) {
if ( arg0 === 1 ) {
throw arg1 ;
} else if ( arg0 === 2 ) {
let obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
2026-08-25 06:04:03 +00:00
return { value : "HermesInternal" , done : "HermesInternal" } ;
2026-07-29 08:29:29 +00:00
}
} else {
try {
v0 = 2 ;
if ( arg0 === 1 ) {
v0 = 3 ;
throw arg1 ;
} else if ( arg0 === 2 ) {
v0 = 3 ;
obj = { value : null , done : true } ;
obj [ 0 ] = arg1 ;
return obj ;
} else {
2026-08-24 06:08:38 +00:00
obj = v0 ( closure _1 _2 [ 3 ] ) ;
2026-07-29 08:29:29 +00:00
v0 = 3 ;
2026-08-24 06:08:38 +00:00
obj1 = { value : null , done : true } ;
2026-07-29 08:29:29 +00:00
obj1 [ 0 ] = obj . queryCache ( closure _0 ) ;
return obj1 ;
}
} catch ( tmp7 ) {
v0 = tmp ;
throw tmp7 ;
}
}
} ) ( ) ;
} ) ;
2026-08-24 06:08:38 +00:00
closure _7 = tmp ;
2026-07-29 08:29:29 +00:00
const apply = tmp . apply ;
if ( typeof apply === "unknown" ) {
let applyArgumentsResult = HermesBuiltin . applyArguments ( self ) ;
} else {
applyArgumentsResult = apply ( self , arguments ) ;
}
return applyArgumentsResult ;
}
2026-08-24 06:08:38 +00:00
noopAll ;
2026-07-29 08:29:29 +00:00
let c6 = 1 ;
2026-08-25 06:04:03 +00:00
let closure _8 = { uri : "Array" , width : "call" , height : "Path" } ;
2026-07-29 08:29:29 +00:00
function _BaseImage ( arg0 ) {
( { alt , accessible , aria - labelledby : tmp , aria - busy : tmp2 , aria - checked : tmp3 , aria - disabled : tmp4 , aria - expanded : tmp5 , aria - label : tmp7 , aria - selected : tmp8 , accessibilityLabel , accessibilityLabelledBy , accessibilityState , defaultSource , loadingIndicatorSource , style , onLoadStart , onLoad , onLoadEnd , onError , width , height } = arg0 ) ;
( { ref , aria - hidden : tmp6 , children , source , src , crossOrigin , referrerPolicy , srcSet , resizeMode } = arg0 ) ;
const merged = Object . assign ( arg0 , Object . create ( null ) ) ;
2026-08-24 06:08:38 +00:00
let obj = getImageSourcesFromImageProps ;
2026-07-29 08:29:29 +00:00
const arr = obj . getImageSourcesFromImageProps ( { crossOrigin , referrerPolicy , src , srcSet , width , height , source } ) || closure _8 ;
2026-08-24 06:08:38 +00:00
const tmp13 = resolveAssetSourceDefault ( defaultSource ) ;
const tmp14 = resolveAssetSourceDefault ( loadingIndicatorSource ) ;
2026-07-29 08:29:29 +00:00
if ( null != children ) {
const _Error2 = Error ;
2026-08-24 06:08:38 +00:00
error = new Error ( "The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning." ) ;
2026-07-29 08:29:29 +00:00
throw error ;
} else {
if ( null != defaultSource ) {
if ( null != loadingIndicatorSource ) {
const _Error = Error ;
const error1 = new Error ( "The <Image> component cannot have defaultSource and loadingIndicatorSource at the same time. Please use either defaultSource or loadingIndicatorSource." ) ;
throw error1 ;
}
}
const _Array = Array ;
if ( Array . isArray ( arr ) ) {
( { headers , width : width3 , height : height3 } = arr [ 0 ] ) ;
if ( null != headers ) {
merged . headers = headers ;
}
let tmp18 = 1 === arr . length ;
if ( tmp18 ) {
obj = { width : null , height : null } ;
obj [ 0 ] = width3 ;
obj [ 1 ] = height3 ;
tmp18 = obj ;
}
const items = [ tmp18 , closure _9 . base , style ] ;
merged . style = items ;
merged . source = arr ;
} else {
( { width : width2 , height : height2 } = arr ) ;
if ( "" === arr . uri ) {
const _console = console ;
console . warn ( "source.uri should not be an empty string" ) ;
}
if ( width2 == null ) {
width2 = width ;
}
obj = { width : null , height : null } ;
obj [ 0 ] = width2 ;
if ( height2 == null ) {
height2 = height ;
}
obj [ 1 ] = height2 ;
const items1 = [ obj , closure _9 . base , style ] ;
merged . style = items1 ;
const items2 = [ arr ] ;
merged . source = items2 ;
}
if ( null != onLoadStart ) {
merged . shouldNotifyLoadEvents = true ;
merged . onLoadStart = onLoadStart ;
}
if ( null != onLoad ) {
merged . shouldNotifyLoadEvents = true ;
merged . onLoad = onLoad ;
}
if ( null != onLoadEnd ) {
merged . shouldNotifyLoadEvents = true ;
merged . onLoadEnd = onLoadEnd ;
}
if ( null != onError ) {
merged . shouldNotifyLoadEvents = true ;
merged . onError = onError ;
}
if ( tmp20 ) {
merged . defaultSource = tmp13 ;
}
if ( tmp21 ) {
merged . loadingIndicatorSrc = tmp14 ;
}
if ( null != tmp7 ) {
merged . accessibilityLabel = tmp7 ;
} else if ( null != accessibilityLabel ) {
merged . accessibilityLabel = accessibilityLabel ;
} else if ( null != alt ) {
merged . accessibilityLabel = alt ;
}
if ( null != tmp ) {
merged . accessibilityLabelledBy = tmp ;
} else if ( null != accessibilityLabelledBy ) {
merged . accessibilityLabelledBy = accessibilityLabelledBy ;
}
if ( null != alt ) {
merged . accessible = true ;
} else if ( null != accessible ) {
merged . accessible = accessible ;
}
if ( ! tmp22 ) {
if ( tmp2 == null ) {
let busy ;
if ( accessibilityState != null ) {
busy = accessibilityState . busy ;
}
}
2026-08-24 06:08:38 +00:00
obj1 = { busy : null , checked : null , disabled : null , expanded : null , selected : null } ;
2026-07-29 08:29:29 +00:00
obj1 [ 0 ] = tmp2 ;
if ( tmp3 == null ) {
let checked ;
if ( accessibilityState != null ) {
checked = accessibilityState . checked ;
}
}
obj1 [ 1 ] = tmp3 ;
if ( tmp4 == null ) {
let disabled ;
if ( accessibilityState != null ) {
disabled = accessibilityState . disabled ;
}
}
obj1 [ 2 ] = tmp4 ;
if ( tmp5 == null ) {
let expanded ;
if ( accessibilityState != null ) {
expanded = accessibilityState . expanded ;
}
}
obj1 [ 3 ] = tmp5 ;
if ( tmp8 == null ) {
let selected ;
if ( accessibilityState != null ) {
selected = accessibilityState . selected ;
}
}
obj1 [ 4 ] = tmp8 ;
merged . accessibilityState = obj1 ;
}
if ( true === tmp6 ) {
merged . importantForAccessibility = "no-hide-descendants" ;
}
const tmp28 = tmp12 ( 148 ) ( style ) ;
let tmp10Result = tmp10 ( 332 ) ;
let objectFit ;
if ( tmp28 != null ) {
objectFit = tmp28 . objectFit ;
}
let str4 = tmp10Result . convertObjectFitToResizeMode ( objectFit ) || resizeMode ;
if ( ! str4 ) {
resizeMode = undefined ;
if ( tmp28 != null ) {
resizeMode = tmp28 . resizeMode ;
}
str4 = resizeMode ;
}
if ( ! str4 ) {
str4 = "cover" ;
}
merged . resizeMode = str4 ;
tmp10Result = tmp10 ( 333 ) ;
const tmp33 = use ( tmp12 ( 336 ) ) ;
if ( null !== tmp33 ) {
merged . internal _analyticTag = tmp33 ;
}
const obj2 = { } ;
tmp20 = null != tmp13 && null != tmp13 . uri ;
tmp21 = null != tmp14 && null != tmp14 . uri ;
tmp22 = null == accessibilityState && null == tmp2 && null == tmp3 && null == tmp4 && null == tmp5 && null == tmp8 ;
const wrapRefWithImageAttachedCallbacks = tmp10Result . useWrapRefWithImageAttachedCallbacks ( ref ) ;
const merged1 = Object . assign ( merged ) ;
obj2 . ref = wrapRefWithImageAttachedCallbacks ;
return jsx ( tmp12 ( 337 ) , { } ) ;
}
}
set = set . unstable _getImageComponentDecorator ( ) ;
let resultResult = _BaseImage ;
if ( null != set ) {
resultResult = set ( _BaseImage ) ;
}
resultResult . displayName = "Image" ;
2026-08-04 21:03:28 +00:00
resultResult . getSize = function getSize ( arg0 , fn ) {
2026-08-24 06:08:38 +00:00
closure _0 = arg0 ;
importDefault = fn ;
const size = ImageLoaderDefault . getSize ( arg0 ) ;
2026-08-04 21:03:28 +00:00
if ( typeof fn !== "function" ) {
2026-07-29 08:29:29 +00:00
return size ;
} else {
2026-08-04 21:03:28 +00:00
fn = arg2 ;
2026-07-29 08:29:29 +00:00
if ( ! arg2 ) {
fn = ( ) => {
console . warn ( ` Failed to get size for image: ${ closure _0 } ` ) ;
} ;
}
size . then ( ( width ) => callback ( width . width , width . height ) ) . catch ( fn ) ;
}
2026-08-24 06:08:38 +00:00
const obj = ImageLoaderDefault ;
2026-07-29 08:29:29 +00:00
} ;
2026-08-04 21:03:28 +00:00
resultResult . getSizeWithHeaders = function getSizeWithHeaders ( arg0 , arg1 , fn ) {
2026-08-24 06:08:38 +00:00
closure _0 = arg0 ;
importDefault = fn ;
const sizeWithHeaders = ImageLoaderDefault . getSizeWithHeaders ( arg0 , arg1 ) ;
2026-08-04 21:03:28 +00:00
if ( typeof fn !== "function" ) {
2026-07-29 08:29:29 +00:00
return sizeWithHeaders ;
} else {
2026-08-04 21:03:28 +00:00
fn = arg3 ;
2026-07-29 08:29:29 +00:00
if ( ! arg3 ) {
fn = ( ) => {
console . warn ( ` Failed to get size for image: ${ closure _0 } ` ) ;
} ;
}
sizeWithHeaders . then ( ( width ) => callback ( width . width , width . height ) ) . catch ( fn ) ;
}
2026-08-24 06:08:38 +00:00
const obj = ImageLoaderDefault ;
2026-07-29 08:29:29 +00:00
} ;
resultResult . prefetch = function prefetch ( closure _0 ) {
2026-08-24 06:08:38 +00:00
closure _6 = tmp + 1 ;
2026-07-29 08:29:29 +00:00
if ( arg1 ) {
arg1 ( tmp ) ;
}
2026-08-24 06:08:38 +00:00
return ImageLoaderDefault . prefetchImage ( closure _0 , + closure _6 ) ;
2026-07-29 08:29:29 +00:00
} ;
resultResult . prefetchWithMetadata = function prefetchWithMetadata ( arg0 , arg1 , arg2 , arg3 ) {
2026-08-24 06:08:38 +00:00
closure _6 = tmp + 1 ;
2026-07-29 08:29:29 +00:00
if ( arg3 ) {
arg3 ( tmp ) ;
}
2026-08-24 06:08:38 +00:00
return ImageLoaderDefault . prefetchImage ( arg0 , + closure _6 ) ;
2026-07-29 08:29:29 +00:00
} ;
resultResult . abortPrefetch = function abortPrefetch ( _requestId ) {
2026-08-24 06:08:38 +00:00
ImageLoaderDefault . abortRequest ( _requestId ) ;
2026-07-29 08:29:29 +00:00
} ;
resultResult . queryCache = function queryCache ( closure _0 ) {
const self = this ;
const apply = _queryCache . apply ;
if ( typeof apply === "unknown" ) {
let applyArgumentsResult = HermesBuiltin . applyArguments ( self ) ;
} else {
applyArgumentsResult = apply ( self , arguments ) ;
}
return applyArgumentsResult ;
} ;
2026-08-24 06:08:38 +00:00
resultResult . resolveAssetSource = resolveAssetSourceDefault ;
let closure _9 = get _hairlineWidthDefault . create ( { base : { overflow : "hidden" } } ) ;
2026-07-29 08:29:29 +00:00
export default resultResult ;