{"ast":null,"code":"import { getAssetByID } from '@react-native/assets-registry/registry';\nimport { Platform } from 'expo-modules-core';\nimport { selectAssetSource } from \"./AssetSources\";\nimport * as AssetUris from \"./AssetUris\";\nimport { downloadAsync } from \"./ExpoAsset\";\nimport * as ImageAssets from \"./ImageAssets\";\nimport { getLocalAssetUri } from \"./LocalAssets\";\nimport { IS_ENV_WITH_LOCAL_ASSETS } from \"./PlatformUtils\";\nimport resolveAssetSource from \"./resolveAssetSource\";\nexport const ANDROID_EMBEDDED_URL_BASE_RESOURCE = 'file:///android_res/';\nexport class Asset {\n  static byHash = {};\n  static byUri = {};\n  hash = null;\n  localUri = null;\n  width = null;\n  height = null;\n  downloading = false;\n  downloaded = false;\n  _downloadCallbacks = [];\n  constructor({\n    name,\n    type,\n    hash = null,\n    uri,\n    width,\n    height\n  }) {\n    this.name = name;\n    this.type = type;\n    this.hash = hash;\n    this.uri = uri;\n    if (typeof width === 'number') {\n      this.width = width;\n    }\n    if (typeof height === 'number') {\n      this.height = height;\n    }\n    if (hash) {\n      this.localUri = getLocalAssetUri(hash, type);\n      if (this.localUri?.startsWith(ANDROID_EMBEDDED_URL_BASE_RESOURCE)) {\n        this.uri = this.localUri;\n        this.localUri = null;\n      } else if (this.localUri) {\n        this.downloaded = true;\n      }\n    }\n    if (Platform.OS === 'web') {\n      if (!name) {\n        this.name = AssetUris.getFilename(uri);\n      }\n      if (!type) {\n        this.type = AssetUris.getFileExtension(uri);\n      }\n    }\n  }\n  static loadAsync(moduleId) {\n    const moduleIds = Array.isArray(moduleId) ? moduleId : [moduleId];\n    return Promise.all(moduleIds.map(moduleId => Asset.fromModule(moduleId).downloadAsync()));\n  }\n  static fromModule(virtualAssetModule) {\n    if (typeof virtualAssetModule === 'string') {\n      return Asset.fromURI(virtualAssetModule);\n    }\n    if (typeof virtualAssetModule === 'object' && 'uri' in virtualAssetModule && typeof virtualAssetModule.uri === 'string') {\n      const extension = AssetUris.getFileExtension(virtualAssetModule.uri);\n      return new Asset({\n        name: '',\n        type: extension.startsWith('.') ? extension.substring(1) : extension,\n        hash: null,\n        uri: virtualAssetModule.uri,\n        width: virtualAssetModule.width,\n        height: virtualAssetModule.height\n      });\n    }\n    const meta = getAssetByID(virtualAssetModule);\n    if (!meta) {\n      throw new Error(`Module \"${virtualAssetModule}\" is missing from the asset registry`);\n    }\n    if (!IS_ENV_WITH_LOCAL_ASSETS) {\n      const {\n        uri\n      } = resolveAssetSource(virtualAssetModule);\n      const asset = new Asset({\n        name: meta.name,\n        type: meta.type,\n        hash: meta.hash,\n        uri,\n        width: meta.width,\n        height: meta.height\n      });\n      if (Platform.OS === 'android' && !uri.includes(':') && (meta.width || meta.height)) {\n        asset.localUri = asset.uri;\n        asset.downloaded = true;\n      }\n      Asset.byHash[meta.hash] = asset;\n      return asset;\n    }\n    return Asset.fromMetadata(meta);\n  }\n  static fromMetadata(meta) {\n    const metaHash = meta.hash;\n    if (Asset.byHash[metaHash]) {\n      return Asset.byHash[metaHash];\n    }\n    const {\n      uri,\n      hash\n    } = selectAssetSource(meta);\n    const asset = new Asset({\n      name: meta.name,\n      type: meta.type,\n      hash,\n      uri,\n      width: meta.width,\n      height: meta.height\n    });\n    Asset.byHash[metaHash] = asset;\n    return asset;\n  }\n  static fromURI(uri) {\n    if (Asset.byUri[uri]) {\n      return Asset.byUri[uri];\n    }\n    let type = '';\n    if (uri.indexOf(';base64') > -1) {\n      type = uri.split(';')[0].split('/')[1];\n    } else {\n      const extension = AssetUris.getFileExtension(uri);\n      type = extension.startsWith('.') ? extension.substring(1) : extension;\n    }\n    const asset = new Asset({\n      name: '',\n      type,\n      hash: null,\n      uri\n    });\n    Asset.byUri[uri] = asset;\n    return asset;\n  }\n  async downloadAsync() {\n    if (this.downloaded) {\n      return this;\n    }\n    if (this.downloading) {\n      await new Promise((resolve, reject) => {\n        this._downloadCallbacks.push({\n          resolve,\n          reject\n        });\n      });\n      return this;\n    }\n    this.downloading = true;\n    try {\n      if (Platform.OS === 'web') {\n        if (ImageAssets.isImageType(this.type)) {\n          const {\n            width,\n            height,\n            name\n          } = await ImageAssets.getImageInfoAsync(this.uri);\n          this.width = width;\n          this.height = height;\n          this.name = name;\n        } else {\n          this.name = AssetUris.getFilename(this.uri);\n        }\n      }\n      this.localUri = await downloadAsync(this.uri, this.hash, this.type);\n      this.downloaded = true;\n      this._downloadCallbacks.forEach(({\n        resolve\n      }) => resolve());\n    } catch (e) {\n      this._downloadCallbacks.forEach(({\n        reject\n      }) => reject(e));\n      throw e;\n    } finally {\n      this.downloading = false;\n      this._downloadCallbacks = [];\n    }\n    return this;\n  }\n}","map":{"version":3,"names":["getAssetByID","Platform","selectAssetSource","AssetUris","downloadAsync","ImageAssets","getLocalAssetUri","IS_ENV_WITH_LOCAL_ASSETS","resolveAssetSource","ANDROID_EMBEDDED_URL_BASE_RESOURCE","Asset","byHash","byUri","hash","localUri","width","height","downloading","downloaded","_downloadCallbacks","constructor","name","type","uri","startsWith","OS","getFilename","getFileExtension","loadAsync","moduleId","moduleIds","Array","isArray","Promise","all","map","fromModule","virtualAssetModule","fromURI","extension","substring","meta","Error","asset","includes","fromMetadata","metaHash","indexOf","split","resolve","reject","push","isImageType","getImageInfoAsync","forEach","e"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/expo-asset/src/Asset.ts"],"sourcesContent":["import { getAssetByID } from '@react-native/assets-registry/registry';\nimport { Platform } from 'expo-modules-core';\n\nimport { AssetMetadata, selectAssetSource } from './AssetSources';\nimport * as AssetUris from './AssetUris';\nimport { downloadAsync } from './ExpoAsset';\nimport * as ImageAssets from './ImageAssets';\nimport { getLocalAssetUri } from './LocalAssets';\nimport { IS_ENV_WITH_LOCAL_ASSETS } from './PlatformUtils';\nimport resolveAssetSource from './resolveAssetSource';\n\n// @docsMissing\nexport type AssetDescriptor = {\n  name: string;\n  type: string;\n  hash?: string | null;\n  uri: string;\n  width?: number | null;\n  height?: number | null;\n};\n\ntype DownloadPromiseCallbacks = {\n  resolve: () => void;\n  reject: (error: Error) => void;\n};\n\nexport { AssetMetadata };\n\n/**\n * Android resource URL prefix.\n * @hidden\n */\nexport const ANDROID_EMBEDDED_URL_BASE_RESOURCE = 'file:///android_res/';\n\n/**\n * The `Asset` class represents an asset in your app. It gives metadata about the asset (such as its\n * name and type) and provides facilities to load the asset data.\n */\nexport class Asset {\n  private static byHash: Record<string, Asset | undefined> = {};\n  private static byUri: Record<string, Asset | undefined> = {};\n\n  /**\n   * The name of the asset file without the extension. Also without the part from `@` onward in the\n   * filename (used to specify scale factor for images).\n   */\n  public name: string;\n  /**\n   * The extension of the asset filename.\n   */\n  public readonly type: string;\n  /**\n   * The MD5 hash of the asset's data.\n   */\n  public readonly hash: string | null = null;\n  /**\n   * A URI that points to the asset's data on the remote server. When running the published version\n   * of your app, this refers to the location on Expo's asset server where Expo has stored your\n   * asset. When running the app from Expo CLI during development, this URI points to Expo CLI's\n   * server running on your computer and the asset is served directly from your computer. If you\n   * are not using Classic Updates (legacy), this field should be ignored as we ensure your assets\n   * are on device before running your application logic.\n   */\n  public readonly uri: string;\n  /**\n   * If the asset has been downloaded (by calling [`downloadAsync()`](#downloadasync)), the\n   * `file://` URI pointing to the local file on the device that contains the asset data.\n   */\n  public localUri: string | null = null;\n  /**\n   * If the asset is an image, the width of the image data divided by the scale factor. The scale\n   * factor is the number after `@` in the filename, or `1` if not present.\n   */\n  public width: number | null = null;\n  /**\n   * If the asset is an image, the height of the image data divided by the scale factor. The scale factor is the number after `@` in the filename, or `1` if not present.\n   */\n  public height: number | null = null;\n\n  private downloading: boolean = false;\n\n  /**\n   * Whether the asset has finished downloading from a call to [`downloadAsync()`](#downloadasync).\n   */\n  public downloaded: boolean = false;\n\n  private _downloadCallbacks: DownloadPromiseCallbacks[] = [];\n\n  constructor({ name, type, hash = null, uri, width, height }: AssetDescriptor) {\n    this.name = name;\n    this.type = type;\n    this.hash = hash;\n    this.uri = uri;\n\n    if (typeof width === 'number') {\n      this.width = width;\n    }\n    if (typeof height === 'number') {\n      this.height = height;\n    }\n\n    if (hash) {\n      this.localUri = getLocalAssetUri(hash, type);\n      if (this.localUri?.startsWith(ANDROID_EMBEDDED_URL_BASE_RESOURCE)) {\n        // Treat Android embedded resources as not downloaded state, because the uri is not direct accessible.\n        this.uri = this.localUri;\n        this.localUri = null;\n      } else if (this.localUri) {\n        this.downloaded = true;\n      }\n    }\n\n    if (Platform.OS === 'web') {\n      if (!name) {\n        this.name = AssetUris.getFilename(uri);\n      }\n      if (!type) {\n        this.type = AssetUris.getFileExtension(uri);\n      }\n    }\n  }\n\n  // @needsAudit\n  /**\n   * A helper that wraps `Asset.fromModule(module).downloadAsync` for convenience.\n   * @param moduleId An array of `require('path/to/file')` or external network URLs. Can also be\n   * just one module or URL without an Array.\n   * @return Returns a Promise that fulfills with an array of `Asset`s when the asset(s) has been\n   * saved to disk.\n   * @example\n   * ```ts\n   * const [{ localUri }] = await Asset.loadAsync(require('./assets/snack-icon.png'));\n   * ```\n   */\n  static loadAsync(moduleId: number | number[] | string | string[]): Promise<Asset[]> {\n    const moduleIds = Array.isArray(moduleId) ? moduleId : [moduleId];\n    return Promise.all(moduleIds.map((moduleId) => Asset.fromModule(moduleId).downloadAsync()));\n  }\n\n  // @needsAudit\n  /**\n   * Returns the [`Asset`](#asset) instance representing an asset given its module or URL.\n   * @param virtualAssetModule The value of `require('path/to/file')` for the asset or external\n   * network URL\n   * @return The [`Asset`](#asset) instance for the asset.\n   */\n  static fromModule(\n    virtualAssetModule: number | string | { uri: string; width: number; height: number }\n  ): Asset {\n    if (typeof virtualAssetModule === 'string') {\n      return Asset.fromURI(virtualAssetModule);\n    }\n    if (\n      typeof virtualAssetModule === 'object' &&\n      'uri' in virtualAssetModule &&\n      typeof virtualAssetModule.uri === 'string'\n    ) {\n      const extension = AssetUris.getFileExtension(virtualAssetModule.uri);\n      return new Asset({\n        name: '',\n        type: extension.startsWith('.') ? extension.substring(1) : extension,\n        hash: null,\n        uri: virtualAssetModule.uri,\n        width: virtualAssetModule.width,\n        height: virtualAssetModule.height,\n      });\n    }\n\n    const meta = getAssetByID(virtualAssetModule);\n    if (!meta) {\n      throw new Error(`Module \"${virtualAssetModule}\" is missing from the asset registry`);\n    }\n\n    // Outside of the managed env we need the moduleId to initialize the asset\n    // because resolveAssetSource depends on it\n    if (!IS_ENV_WITH_LOCAL_ASSETS) {\n      // null-check is performed above with `getAssetByID`.\n      const { uri } = resolveAssetSource(virtualAssetModule)!;\n\n      const asset = new Asset({\n        name: meta.name,\n        type: meta.type,\n        hash: meta.hash,\n        uri,\n        width: meta.width,\n        height: meta.height,\n      });\n\n      // For images backward compatibility,\n      // keeps localUri the same as uri for React Native's Image that\n      // works fine with drawable resource names.\n      if (Platform.OS === 'android' && !uri.includes(':') && (meta.width || meta.height)) {\n        asset.localUri = asset.uri;\n        asset.downloaded = true;\n      }\n\n      Asset.byHash[meta.hash] = asset;\n      return asset;\n    }\n\n    return Asset.fromMetadata(meta);\n  }\n\n  // @docsMissing\n  static fromMetadata(meta: AssetMetadata): Asset {\n    // The hash of the whole asset, not to be confused with the hash of a specific file returned\n    // from `selectAssetSource`\n    const metaHash = meta.hash;\n    if (Asset.byHash[metaHash]) {\n      return Asset.byHash[metaHash];\n    }\n\n    const { uri, hash } = selectAssetSource(meta);\n    const asset = new Asset({\n      name: meta.name,\n      type: meta.type,\n      hash,\n      uri,\n      width: meta.width,\n      height: meta.height,\n    });\n    Asset.byHash[metaHash] = asset;\n    return asset;\n  }\n\n  // @docsMissing\n  static fromURI(uri: string): Asset {\n    if (Asset.byUri[uri]) {\n      return Asset.byUri[uri];\n    }\n\n    // Possibly a Base64-encoded URI\n    let type = '';\n    if (uri.indexOf(';base64') > -1) {\n      type = uri.split(';')[0].split('/')[1];\n    } else {\n      const extension = AssetUris.getFileExtension(uri);\n      type = extension.startsWith('.') ? extension.substring(1) : extension;\n    }\n\n    const asset = new Asset({\n      name: '',\n      type,\n      hash: null,\n      uri,\n    });\n\n    Asset.byUri[uri] = asset;\n\n    return asset;\n  }\n\n  // @needsAudit\n  /**\n   * Downloads the asset data to a local file in the device's cache directory. Once the returned\n   * promise is fulfilled without error, the [`localUri`](#localuri) field of this asset points\n   * to a local file containing the asset data. The asset is only downloaded if an up-to-date local\n   * file for the asset isn't already present due to an earlier download. The downloaded `Asset`\n   * will be returned when the promise is resolved.\n   * @return Returns a Promise which fulfills with an `Asset` instance.\n   */\n  async downloadAsync(): Promise<this> {\n    if (this.downloaded) {\n      return this;\n    }\n    if (this.downloading) {\n      await new Promise<void>((resolve, reject) => {\n        this._downloadCallbacks.push({ resolve, reject });\n      });\n      return this;\n    }\n    this.downloading = true;\n\n    try {\n      if (Platform.OS === 'web') {\n        if (ImageAssets.isImageType(this.type)) {\n          const { width, height, name } = await ImageAssets.getImageInfoAsync(this.uri);\n          this.width = width;\n          this.height = height;\n          this.name = name;\n        } else {\n          this.name = AssetUris.getFilename(this.uri);\n        }\n      }\n      this.localUri = await downloadAsync(this.uri, this.hash, this.type);\n\n      this.downloaded = true;\n      this._downloadCallbacks.forEach(({ resolve }) => resolve());\n    } catch (e: any) {\n      this._downloadCallbacks.forEach(({ reject }) => reject(e));\n      throw e;\n    } finally {\n      this.downloading = false;\n      this._downloadCallbacks = [];\n    }\n    return this;\n  }\n}\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,wCAAwC;AACrE,SAASC,QAAQ,QAAQ,mBAAmB;AAE5C,SAAwBC,iBAAiB;AACzC,OAAO,KAAKC,SAAS;AACrB,SAASC,aAAa;AACtB,OAAO,KAAKC,WAAW;AACvB,SAASC,gBAAgB;AACzB,SAASC,wBAAwB;AACjC,OAAOC,kBAAkB;AAuBzB,OAAO,MAAMC,kCAAkC,GAAG,sBAAsB;AAMxE,OAAM,MAAOC,KAAK;EACR,OAAOC,MAAM,GAAsC,EAAE;EACrD,OAAOC,KAAK,GAAsC,EAAE;EAc5CC,IAAI,GAAkB,IAAI;EAcnCC,QAAQ,GAAkB,IAAI;EAK9BC,KAAK,GAAkB,IAAI;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