mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
154 KiB
JSON
1 line
154 KiB
JSON
{"ast":null,"code":"import { __awaiter } from 'tslib';\nimport { HttpClient, HttpClientModule } from '@angular/common/http';\nimport { Injectable, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Component, ElementRef, Renderer2, Input, Output, NgModule } from '@angular/core';\nimport { File } from '@ionic-native/file/ngx';\nimport { WebView } from '@ionic-native/ionic-webview/ngx';\nimport { Platform, IonicModule } from '@ionic/angular';\nimport { Subject, fromEvent } from 'rxjs';\nimport { first, take, filter } from 'rxjs/operators';\nimport { File as File$1 } from '@ionic-native/file/ngx/index';\nimport { WebView as WebView$1 } from '@ionic-native/ionic-webview/ngx/index';\nimport { CommonModule } from '@angular/common';\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/services/image-loader-config.service.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@ionic-native/file/ngx';\nimport * as ɵngcc2 from '@angular/common/http';\nimport * as ɵngcc3 from '@ionic/angular';\nimport * as ɵngcc4 from '@ionic-native/ionic-webview/ngx';\nimport * as ɵngcc5 from '@angular/common';\nfunction IonicImageLoaderComponent_ion_spinner_0_Template(rf, ctx) {\n if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"ion-spinner\", 1);\n }\n if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵproperty(\"name\", ctx_r0.spinnerName)(\"color\", ctx_r0.spinnerColor);\n }\n}\nconst _c0 = [\"*\"];\nclass ImageLoaderConfigService {\n constructor() {\n this.debugMode = false;\n this.spinnerEnabled = true;\n this.fallbackAsPlaceholder = false;\n this.backgroundSize = 'contain';\n this.backgroundRepeat = 'no-repeat';\n this.display = 'block';\n this.width = '100%';\n this.height = '100%';\n this.useImg = false;\n this.concurrency = 5;\n this.maxCacheSize = -1;\n this.maxCacheAge = -1;\n this.imageReturnType = 'uri';\n // Must be default 'true' for the new WebView to show images\n this.fileNameCachedWithExtension = true;\n this.fallbackFileNameCachedExtension = '.jpg';\n this.cacheDirectoryType = 'cache';\n this._cacheDirectoryName = 'image-loader-cache';\n }\n /**\n * @return {?}\n */\n get cacheDirectoryName() {\n return this._cacheDirectoryName;\n }\n /**\n * @param {?} name\n * @return {?}\n */\n set cacheDirectoryName(name) {\n name.replace(/\\W/g, '');\n this._cacheDirectoryName = name;\n }\n /**\n * Enables debug mode to receive console logs, errors, warnings\n * @return {?}\n */\n enableDebugMode() {\n this.debugMode = true;\n }\n /**\n * Enable/Disable the spinner by default. Defaults to true.\n * @param {?} enable set to true to enable\n * @return {?}\n */\n enableSpinner(enable) {\n this.spinnerEnabled = enable;\n }\n /**\n * Enable/Disable the fallback image as placeholder instead of the spinner. Defaults to false.\n * @param {?} enable set to true to enable\n * @return {?}\n */\n enableFallbackAsPlaceholder(enable) {\n this.fallbackAsPlaceholder = enable;\n }\n /**\n * Sets the cache directory name. Defaults to 'image-loader-cache'\n * @param {?} name name of directory\n * @return {?}\n */\n setCacheDirectoryName(name) {\n this.cacheDirectoryName = name;\n }\n /**\n * Set default height for images that are not using <img> tag\n * @param {?} height height\n * @return {?}\n */\n setHeight(height) {\n this.height = height;\n }\n /**\n * Set default width for images that are not using <img> tag\n * @param {?} width Width\n * @return {?}\n */\n setWidth(width) {\n this.width = width;\n }\n /**\n * Enable display mode for images that are not using <img> tag\n * @param {?} display Display mode\n * @return {?}\n */\n setDisplay(display) {\n this.display = display;\n }\n /**\n * Use <img> tag by default\n * @param {?} use set to true to use <img> tag by default\n * @return {?}\n */\n useImageTag(use) {\n this.useImg = use;\n }\n /**\n * Set default background size for images that are not using <img> tag\n * @param {?} backgroundSize Background size\n * @return {?}\n */\n setBackgroundSize(backgroundSize) {\n this.backgroundSize = backgroundSize;\n }\n /**\n * Set background repeat for images that are not using <img> tag\n * @param {?} backgroundRepeat Background repeat\n * @return {?}\n */\n setBackgroundRepeat(backgroundRepeat) {\n this.backgroundRepeat = backgroundRepeat;\n }\n /**\n * Set fallback URL to use when image src is undefined or did not resolve.\n * This image will not be cached. This should ideally be a locally saved image.\n * @param {?} fallbackUrl The remote or local URL of the image\n * @return {?}\n */\n setFallbackUrl(fallbackUrl) {\n this.fallbackUrl = fallbackUrl;\n }\n /**\n * Set the maximum number of allowed connections at the same time.\n * @param {?} concurrency\n * @return {?}\n */\n setConcurrency(concurrency) {\n this.concurrency = concurrency;\n }\n /**\n * Sets the maximum allowed cache size\n * @param {?} cacheSize Cache size in bytes\n * @return {?}\n */\n setMaximumCacheSize(cacheSize) {\n this.maxCacheSize = cacheSize;\n }\n /**\n * Sets the maximum allowed cache age\n * @param {?} cacheAge Maximum cache age in milliseconds\n * @return {?}\n */\n setMaximumCacheAge(cacheAge) {\n this.maxCacheAge = cacheAge;\n }\n /**\n * Set the return type of cached images\n * @param {?} imageReturnType The return type; either 'base64' or 'uri'\n * @return {?}\n */\n setImageReturnType(imageReturnType) {\n this.imageReturnType = imageReturnType;\n }\n /**\n * Set the default spinner name\n * @param {?} name\n * @return {?}\n */\n setSpinnerName(name) {\n this.spinnerName = name;\n }\n /**\n * Set the default spinner color\n * @param {?} color\n * @return {?}\n */\n setSpinnerColor(color) {\n this.spinnerColor = color;\n }\n /**\n * Set headers options for the HttpClient transfers.\n * @param {?} headers\n * @return {?}\n */\n setHttpHeaders(headers) {\n this.httpHeaders = headers;\n }\n /**\n * Set options for the FileTransfer plugin\n * @deprecated FileTransfer plugin removed.\n * @param {?} options\n * @return {?}\n */\n setFileTransferOptions(options) {\n // do nothing, plugin deprecated.\n }\n /**\n * Enable/Disable the save filename of cached images with extension. Defaults to false.\n * @param {?} enable set to true to enable\n * @return {?}\n */\n setFileNameCachedWithExtension(enable) {\n this.fileNameCachedWithExtension = enable;\n }\n /**\n * Set fallback extension filename of cached images. Defaults to '.jpg'.\n * @param {?} extension fallback extension (e.x .jpg)\n * @return {?}\n */\n setFallbackFileNameCachedExtension(extension) {\n this.fallbackFileNameCachedExtension = extension;\n }\n}\nImageLoaderConfigService.ɵfac = function ImageLoaderConfigService_Factory(t) {\n return new (t || ImageLoaderConfigService)();\n};\nImageLoaderConfigService.ɵprov = /*@__PURE__*/ɵngcc0.ɵɵdefineInjectable({\n token: ImageLoaderConfigService,\n factory: ImageLoaderConfigService.ɵfac,\n providedIn: 'root'\n});\n/** @nocollapse */\nImageLoaderConfigService.ngInjectableDef = ɵɵdefineInjectable({\n factory: function ImageLoaderConfigService_Factory() {\n return new ImageLoaderConfigService();\n },\n token: ImageLoaderConfigService,\n providedIn: \"root\"\n});\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ImageLoaderConfigService, [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], function () {\n return [];\n }, null);\n})();\nif (false) {\n /** @type {?} */\n ImageLoaderConfigService.prototype.debugMode;\n /** @type {?} */\n ImageLoaderConfigService.prototype.spinnerEnabled;\n /** @type {?} */\n ImageLoaderConfigService.prototype.fallbackAsPlaceholder;\n /** @type {?} */\n ImageLoaderConfigService.prototype.backgroundSize;\n /** @type {?} */\n ImageLoaderConfigService.prototype.backgroundRepeat;\n /** @type {?} */\n ImageLoaderConfigService.prototype.display;\n /** @type {?} */\n ImageLoaderConfigService.prototype.width;\n /** @type {?} */\n ImageLoaderConfigService.prototype.height;\n /** @type {?} */\n ImageLoaderConfigService.prototype.useImg;\n /** @type {?} */\n ImageLoaderConfigService.prototype.fallbackUrl;\n /** @type {?} */\n ImageLoaderConfigService.prototype.concurrency;\n /** @type {?} */\n ImageLoaderConfigService.prototype.maxCacheSize;\n /** @type {?} */\n ImageLoaderConfigService.prototype.maxCacheAge;\n /** @type {?} */\n ImageLoaderConfigService.prototype.imageReturnType;\n /** @type {?} */\n ImageLoaderConfigService.prototype.spinnerName;\n /** @type {?} */\n ImageLoaderConfigService.prototype.spinnerColor;\n /** @type {?} */\n ImageLoaderConfigService.prototype.httpHeaders;\n /** @type {?} */\n ImageLoaderConfigService.prototype.fileNameCachedWithExtension;\n /** @type {?} */\n ImageLoaderConfigService.prototype.fallbackFileNameCachedExtension;\n /** @type {?} */\n ImageLoaderConfigService.prototype.cacheDirectoryType;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderConfigService.prototype._cacheDirectoryName;\n}\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/services/image-loader.service.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @record\n */\nfunction IndexItem() {}\nif (false) {\n /** @type {?} */\n IndexItem.prototype.name;\n /** @type {?} */\n IndexItem.prototype.modificationTime;\n /** @type {?} */\n IndexItem.prototype.size;\n}\n/**\n * @record\n */\nfunction QueueItem() {}\nif (false) {\n /** @type {?} */\n QueueItem.prototype.imageUrl;\n /** @type {?} */\n QueueItem.prototype.resolve;\n /** @type {?} */\n QueueItem.prototype.reject;\n}\n/** @type {?} */\nconst EXTENSIONS = ['jpg', 'png', 'jpeg', 'gif', 'svg', 'tiff'];\nclass ImageLoaderService {\n /**\n * @param {?} config\n * @param {?} file\n * @param {?} http\n * @param {?} platform\n * @param {?} webview\n */\n constructor(config, file, http, platform, webview) {\n this.config = config;\n this.file = file;\n this.http = http;\n this.platform = platform;\n this.webview = webview;\n /**\n * Indicates if the cache service is ready.\n * When the cache service isn't ready, images are loaded via browser instead.\n */\n this.isCacheReady = false;\n /**\n * Indicates if this service is initialized.\n * This service is initialized once all the setup is done.\n */\n this.isInit = false;\n this.initPromise = new Promise(\n /**\n * @param {?} resolve\n * @return {?}\n */\n resolve => this.initPromiseResolve = resolve);\n this.lockSubject = new Subject();\n this.lock$ = this.lockSubject.asObservable();\n /**\n * Number of concurrent requests allowed\n */\n this.concurrency = 5;\n /**\n * Queue items\n */\n this.queue = [];\n this.processing = 0;\n /**\n * Fast accessible Object for currently processing items\n */\n this.currentlyProcessing = {};\n this.cacheIndex = [];\n this.currentCacheSize = 0;\n this.indexed = false;\n this.lockedCallsQueue = [];\n if (!platform.is('cordova')) {\n // we are running on a browser, or using livereload\n // plugin will not function in this case\n this.isInit = true;\n this.throwWarning('You are running on a browser or using livereload, IonicImageLoader will not function, falling back to browser loading.');\n this.initPromiseResolve();\n } else {\n fromEvent(document, 'deviceready').pipe(first()).subscribe(\n /**\n * @param {?} res\n * @return {?}\n */\n res => {\n if (this.nativeAvailable) {\n this.initCache();\n } else {\n // we are running on a browser, or using livereload\n // plugin will not function in this case\n this.isInit = true;\n this.initPromiseResolve();\n this.throwWarning('You are running on a browser or using livereload, IonicImageLoader will not function, falling back to browser loading.');\n }\n });\n }\n }\n /**\n * @return {?}\n */\n get nativeAvailable() {\n return File.installed();\n }\n /**\n * @private\n * @return {?}\n */\n get isCacheSpaceExceeded() {\n return this.config.maxCacheSize > -1 && this.currentCacheSize > this.config.maxCacheSize;\n }\n /**\n * @private\n * @return {?}\n */\n get isWKWebView() {\n return this.platform.is('ios') && /** @type {?} */window.webkit && /** @type {?} */window.webkit.messageHandlers;\n }\n /**\n * @private\n * @return {?}\n */\n get isIonicWKWebView() {\n return (\n // Important: isWKWebview && isIonicWKWebview must be mutually excluse.\n // Otherwise the logic for copying to tmp under IOS will fail.\n this.platform.is('android') && this.webview || this.platform.is('android') && location.host === 'localhost:8080' || /** @type {?} */window.LiveReload\n );\n }\n /**\n * @private\n * @return {?}\n */\n get isDevServer() {\n return window['IonicDevServer'] !== undefined;\n }\n /**\n * Check if we can process more items in the queue\n * @private\n * @return {?}\n */\n get canProcess() {\n return this.queue.length > 0 && this.processing < this.concurrency;\n }\n /**\n * @return {?}\n */\n ready() {\n return this.initPromise;\n }\n /**\n * Preload an image\n * @param {?} imageUrl Image URL\n * @return {?} returns a promise that resolves with the cached image URL\n */\n preload(imageUrl) {\n return this.getImagePath(imageUrl);\n }\n /**\n * @return {?}\n */\n getFileCacheDirectory() {\n if (this.config.cacheDirectoryType === 'data') {\n return this.file.dataDirectory;\n } else if (this.config.cacheDirectoryType === 'external') {\n return this.platform.is('android') ? this.file.externalDataDirectory : this.file.documentsDirectory;\n }\n return this.file.cacheDirectory;\n }\n /**\n * Clears cache of a single image\n * @param {?} imageUrl Image URL\n * @return {?}\n */\n clearImageCache(imageUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.platform.is('cordova')) {\n return;\n }\n yield this.ready();\n this.runLocked(\n /**\n * @return {?}\n */\n () => __awaiter(this, void 0, void 0, function* () {\n /** @type {?} */\n const fileName = this.createFileName(imageUrl);\n /** @type {?} */\n const route = this.getFileCacheDirectory() + this.config.cacheDirectoryName;\n // pause any operations\n this.isInit = false;\n try {\n yield this.file.removeFile(route, fileName);\n if (this.isWKWebView && !this.isIonicWKWebView) {\n yield this.file.removeFile(this.file.tempDirectory + this.config.cacheDirectoryName, fileName);\n }\n } catch (err) {\n this.throwError(err);\n }\n return this.initCache(true);\n }));\n });\n }\n /**\n * Clears the cache\n * @return {?}\n */\n clearCache() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.platform.is('cordova')) {\n return;\n }\n yield this.ready();\n this.runLocked(\n /**\n * @return {?}\n */\n () => __awaiter(this, void 0, void 0, function* () {\n try {\n yield this.file.removeRecursively(this.getFileCacheDirectory(), this.config.cacheDirectoryName);\n if (this.isWKWebView && !this.isIonicWKWebView) {\n // also clear the temp files\n try {\n this.file.removeRecursively(this.file.tempDirectory, this.config.cacheDirectoryName);\n } catch (err) {\n // Noop catch. Removing the tempDirectory might fail,\n // as it is not persistent.\n }\n }\n } catch (err) {\n this.throwError(err);\n }\n return this.initCache(true);\n }));\n });\n }\n /**\n * Gets the filesystem path of an image.\n * This will return the remote path if anything goes wrong or if the cache service isn't ready yet.\n * @param {?} imageUrl The remote URL of the image\n * @return {?} Returns a promise that will always resolve with an image URL\n */\n getImagePath(imageUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof imageUrl !== 'string' || imageUrl.length <= 0) {\n throw new Error('The image url provided was empty or invalid.');\n }\n yield this.ready();\n if (!this.isCacheReady) {\n this.throwWarning('The cache system is not running. Images will be loaded by your browser instead.');\n return imageUrl;\n }\n if (this.isImageUrlRelative(imageUrl)) {\n return imageUrl;\n }\n try {\n return yield this.getCachedImagePath(imageUrl);\n } catch (err) {\n // image doesn't exist in cache, lets fetch it and save it\n return this.addItemToQueue(imageUrl);\n }\n });\n }\n /**\n * @private\n * @return {?}\n */\n processLockedQueue() {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield this.getLockedState()) {\n return;\n }\n if (this.lockedCallsQueue.length > 0) {\n yield this.setLockedState(true);\n try {\n yield this.lockedCallsQueue.slice(0, 1)[0]();\n } catch (err) {\n console.log('Error running locked function: ', err);\n }\n yield this.setLockedState(false);\n return this.processLockedQueue();\n }\n });\n }\n /**\n * @private\n * @return {?}\n */\n getLockedState() {\n return this.lock$.pipe(take(1)).toPromise();\n }\n /**\n * @private\n * @return {?}\n */\n awaitUnlocked() {\n return this.lock$.pipe(filter(\n /**\n * @param {?} locked\n * @return {?}\n */\n locked => !!locked), take(1)).toPromise();\n }\n /**\n * @private\n * @param {?} locked\n * @return {?}\n */\n setLockedState(locked) {\n return __awaiter(this, void 0, void 0, function* () {\n this.lockSubject.next(locked);\n });\n }\n /**\n * @private\n * @param {?} fn\n * @return {?}\n */\n runLocked(fn) {\n this.lockedCallsQueue.push(fn);\n this.processLockedQueue();\n }\n /**\n * Returns if an imageUrl is an relative path\n * @private\n * @param {?} imageUrl\n * @return {?}\n */\n isImageUrlRelative(imageUrl) {\n return !/^(https?|file):\\/\\/\\/?/i.test(imageUrl);\n }\n /**\n * Add an item to the queue\n * @private\n * @param {?} imageUrl\n * @param {?=} resolve\n * @param {?=} reject\n * @return {?}\n */\n addItemToQueue(imageUrl, resolve, reject) {\n /** @type {?} */\n let p;\n if (!resolve && !reject) {\n p = new Promise(\n /**\n * @param {?} res\n * @param {?} rej\n * @return {?}\n */\n (res, rej) => {\n resolve = res;\n reject = rej;\n });\n } else {\n resolve = resolve || (\n /**\n * @return {?}\n */\n () => {});\n reject = reject || (\n /**\n * @return {?}\n */\n () => {});\n }\n this.queue.push({\n imageUrl,\n resolve,\n reject\n });\n this.processQueue();\n return p;\n }\n /**\n * Processes one item from the queue\n * @private\n * @return {?}\n */\n processQueue() {\n return __awaiter(this, void 0, void 0, function* () {\n // make sure we can process items first\n if (!this.canProcess) {\n return;\n }\n // increase the processing number\n this.processing++;\n // take the first item from queue\n /** @type {?} */\n const currentItem = this.queue.splice(0, 1)[0];\n // function to call when done processing this item\n // this will reduce the processing number\n // then will execute this function again to process any remaining items\n /** @type {?} */\n const done =\n /**\n * @return {?}\n */\n () => {\n this.processing--;\n this.processQueue();\n // only delete if it's the last/unique occurrence in the queue\n if (this.currentlyProcessing[currentItem.imageUrl] !== undefined && !this.currentlyInQueue(currentItem.imageUrl)) {\n delete this.currentlyProcessing[currentItem.imageUrl];\n }\n };\n /** @type {?} */\n const error =\n /**\n * @param {?} e\n * @return {?}\n */\n e => {\n currentItem.reject();\n this.throwError(e);\n done();\n };\n if (this.currentlyProcessing[currentItem.imageUrl] !== undefined) {\n try {\n // Prevented same Image from loading at the same time\n yield this.currentlyProcessing[currentItem.imageUrl];\n /** @type {?} */\n const localUrl = yield this.getCachedImagePath(currentItem.imageUrl);\n currentItem.resolve(localUrl);\n done();\n } catch (err) {\n error(err);\n }\n return;\n }\n this.currentlyProcessing[currentItem.imageUrl] = (\n /**\n * @return {?}\n */\n () => __awaiter(this, void 0, void 0, function* () {\n // process more items concurrently if we can\n if (this.canProcess) {\n this.processQueue();\n }\n /** @type {?} */\n const localDir = this.getFileCacheDirectory() + this.config.cacheDirectoryName + '/';\n /** @type {?} */\n const fileName = this.createFileName(currentItem.imageUrl);\n try {\n /** @type {?} */\n const data = yield this.http.get(currentItem.imageUrl, {\n responseType: 'blob',\n headers: this.config.httpHeaders\n }).toPromise();\n /** @type {?} */\n const file = /** @type {?} */yield this.file.writeFile(localDir, fileName, data, {\n replace: true\n });\n if (this.isCacheSpaceExceeded) {\n this.maintainCacheSize();\n }\n yield this.addFileToIndex(file);\n /** @type {?} */\n const localUrl = yield this.getCachedImagePath(currentItem.imageUrl);\n currentItem.resolve(localUrl);\n done();\n this.maintainCacheSize();\n } catch (err) {\n error(err);\n throw err;\n }\n }))();\n });\n }\n /**\n * Search if the url is currently in the queue\n * @private\n * @param {?} imageUrl Image url to search\n * @return {?}\n */\n currentlyInQueue(imageUrl) {\n return this.queue.some(\n /**\n * @param {?} item\n * @return {?}\n */\n item => item.imageUrl === imageUrl);\n }\n /**\n * Initialize the cache service\n * @private\n * @param {?=} replace\n * @return {?}\n */\n initCache(replace) {\n return __awaiter(this, void 0, void 0, function* () {\n this.concurrency = this.config.concurrency;\n // create cache directories if they do not exist\n try {\n yield this.createCacheDirectory(replace);\n yield this.indexCache();\n this.isCacheReady = true;\n } catch (err) {\n this.throwError(err);\n }\n this.isInit = true;\n this.initPromiseResolve();\n });\n }\n /**\n * Adds a file to index.\n * Also deletes any files if they are older than the set maximum cache age.\n * @private\n * @param {?} file FileEntry to index\n * @return {?}\n */\n addFileToIndex(file) {\n return __awaiter(this, void 0, void 0, function* () {\n /** @type {?} */\n const metadata = yield new Promise(\n /**\n * @param {?} resolve\n * @param {?} reject\n * @return {?}\n */\n (resolve, reject) => file.getMetadata(resolve, reject));\n if (this.config.maxCacheAge > -1 && Date.now() - metadata.modificationTime.getTime() > this.config.maxCacheAge) {\n // file age exceeds maximum cache age\n return this.removeFile(file.name);\n } else {\n // file age doesn't exceed maximum cache age, or maximum cache age isn't set\n this.currentCacheSize += metadata.size;\n // add item to index\n this.cacheIndex.push({\n name: file.name,\n modificationTime: metadata.modificationTime,\n size: metadata.size\n });\n }\n });\n }\n /**\n * Indexes the cache if necessary\n * @private\n * @return {?}\n */\n indexCache() {\n return __awaiter(this, void 0, void 0, function* () {\n this.cacheIndex = [];\n try {\n /** @type {?} */\n const files = yield this.file.listDir(this.getFileCacheDirectory(), this.config.cacheDirectoryName);\n yield Promise.all(files.map(this.addFileToIndex.bind(this)));\n // Sort items by date. Most recent to oldest.\n this.cacheIndex = this.cacheIndex.sort(\n /**\n * @param {?} a\n * @param {?} b\n * @return {?}\n */\n (a, b) => a > b ? -1 : a < b ? 1 : 0);\n this.indexed = true;\n } catch (err) {\n this.throwError(err);\n }\n });\n }\n /**\n * This method runs every time a new file is added.\n * It checks the cache size and ensures that it doesn't exceed the maximum cache size set in the config.\n * If the limit is reached, it will delete old images to create free space.\n * @private\n * @return {?}\n */\n maintainCacheSize() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.config.maxCacheSize > -1 && this.indexed) {\n /** @type {?} */\n const maintain =\n /**\n * @return {?}\n */\n () => __awaiter(this, void 0, void 0, function* () {\n if (this.currentCacheSize > this.config.maxCacheSize) {\n // grab the first item in index since it's the oldest one\n /** @type {?} */\n const file = this.cacheIndex.splice(0, 1)[0];\n if (typeof file === 'undefined') {\n return maintain();\n }\n // delete the file then process next file if necessary\n try {\n yield this.removeFile(file.name);\n } catch (err) {\n // ignore errors, nothing we can do about it\n }\n this.currentCacheSize -= file.size;\n return maintain();\n }\n });\n return maintain();\n }\n });\n }\n /**\n * Remove a file\n * @private\n * @param {?} file The name of the file to remove\n * @return {?}\n */\n removeFile(file) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.file.removeFile(this.getFileCacheDirectory() + this.config.cacheDirectoryName, file);\n if (this.isWKWebView && !this.isIonicWKWebView) {\n try {\n return this.file.removeFile(this.file.tempDirectory + this.config.cacheDirectoryName, file);\n } catch (err) {\n // Noop catch. Removing the files from tempDirectory might fail, as it is not persistent.\n }\n }\n });\n }\n /**\n * Get the local path of a previously cached image if exists\n * @private\n * @param {?} url The remote URL of the image\n * @return {?} Returns a promise that resolves with the local path if exists, or rejects if doesn't exist\n */\n getCachedImagePath(url) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.ready();\n if (!this.isCacheReady) {\n throw new Error('Cache is not ready');\n }\n // if we're running with livereload, ignore cache and call the resource from it's URL\n if (this.isDevServer) {\n return url;\n }\n // get file name\n /** @type {?} */\n const fileName = this.createFileName(url);\n // get full path\n /** @type {?} */\n const dirPath = this.getFileCacheDirectory() + this.config.cacheDirectoryName;\n /** @type {?} */\n const tempDirPath = this.file.tempDirectory + this.config.cacheDirectoryName;\n try {\n // check if exists\n /** @type {?} */\n const fileEntry = /** @type {?} */yield this.file.resolveLocalFilesystemUrl(dirPath + '/' + fileName);\n // file exists in cache\n if (this.config.imageReturnType === 'base64') {\n // read the file as data url and return the base64 string.\n // should always be successful as the existence of the file\n // is already ensured\n /** @type {?} */\n const base64 = yield this.file.readAsDataURL(dirPath, fileName);\n return base64.replace('data:null', 'data:*/*');\n } else if (this.config.imageReturnType !== 'uri') {\n return;\n }\n // now check if iOS device & using WKWebView Engine.\n // in this case only the tempDirectory is accessible,\n // therefore the file needs to be copied into that directory first!\n if (this.isIonicWKWebView) {\n return this.normalizeUrl(fileEntry);\n }\n if (!this.isWKWebView) {\n // return native path\n return fileEntry.nativeURL;\n }\n // check if file already exists in temp directory\n try {\n /** @type {?} */\n const tempFileEntry = /** @type {?} */yield this.file.resolveLocalFilesystemUrl(tempDirPath + '/' + fileName);\n // file exists in temp directory\n // return native path\n return this.normalizeUrl(tempFileEntry);\n } catch (err) {\n // file does not yet exist in the temp directory.\n // copy it!\n /** @type {?} */\n const tempFileEntry = /** @type {?} */yield this.file.copyFile(dirPath, fileName, tempDirPath, fileName);\n // now the file exists in the temp directory\n // return native path\n return this.normalizeUrl(tempFileEntry);\n }\n } catch (err) {\n throw new Error('File does not exist');\n }\n });\n }\n /**\n * Normalizes the image uri to a version that can be loaded in the webview\n * @private\n * @param {?} fileEntry the FileEntry of the image file\n * @return {?} the normalized Url\n */\n normalizeUrl(fileEntry) {\n // Use Ionic normalizeUrl to generate the right URL for Ionic WKWebView\n if (Ionic && typeof Ionic.normalizeURL === 'function') {\n return Ionic.normalizeURL(fileEntry.nativeURL);\n }\n // use new webview function to do the trick\n if (this.webview) {\n return this.webview.convertFileSrc(fileEntry.nativeURL);\n }\n return fileEntry.nativeURL;\n }\n /**\n * Throws a console error if debug mode is enabled\n * @private\n * @param {...?} args Error message\n * @return {?}\n */\n throwError(...args) {\n if (this.config.debugMode) {\n args.unshift('ImageLoader Error: ');\n console.error.apply(console, args);\n }\n }\n /**\n * Throws a console warning if debug mode is enabled\n * @private\n * @param {...?} args Error message\n * @return {?}\n */\n throwWarning(...args) {\n if (this.config.debugMode) {\n args.unshift('ImageLoader Warning: ');\n console.warn.apply(console, args);\n }\n }\n /**\n * Check if the cache directory exists\n * @private\n * @param {?} directory The directory to check. Either this.file.tempDirectory or this.getFileCacheDirectory()\n * @return {?} Returns a promise that resolves if exists, and rejects if it doesn't\n */\n cacheDirectoryExists(directory) {\n return this.file.checkDir(directory, this.config.cacheDirectoryName);\n }\n /**\n * Create the cache directories\n * @private\n * @param {?=} replace override directory if exists\n * @return {?} Returns a promise that resolves if the directories were created, and rejects on error\n */\n createCacheDirectory(replace = false) {\n /** @type {?} */\n let cacheDirectoryPromise;\n /** @type {?} */\n let tempDirectoryPromise;\n if (replace) {\n // create or replace the cache directory\n cacheDirectoryPromise = this.file.createDir(this.getFileCacheDirectory(), this.config.cacheDirectoryName, replace);\n } else {\n // check if the cache directory exists.\n // if it does not exist create it!\n cacheDirectoryPromise = this.cacheDirectoryExists(this.getFileCacheDirectory()).catch(\n /**\n * @return {?}\n */\n () => this.file.createDir(this.getFileCacheDirectory(), this.config.cacheDirectoryName, false));\n }\n if (this.isWKWebView && !this.isIonicWKWebView) {\n if (replace) {\n // create or replace the temp directory\n tempDirectoryPromise = this.file.createDir(this.file.tempDirectory, this.config.cacheDirectoryName, replace);\n } else {\n // check if the temp directory exists.\n // if it does not exist create it!\n tempDirectoryPromise = this.cacheDirectoryExists(this.file.tempDirectory).catch(\n /**\n * @return {?}\n */\n () => this.file.createDir(this.file.tempDirectory, this.config.cacheDirectoryName, false));\n }\n } else {\n tempDirectoryPromise = Promise.resolve();\n }\n return Promise.all([cacheDirectoryPromise, tempDirectoryPromise]);\n }\n /**\n * Creates a unique file name out of the URL\n * @private\n * @param {?} url URL of the file\n * @return {?} Unique file name\n */\n createFileName(url) {\n // hash the url to get a unique file name\n return this.hashString(url).toString() + (this.config.fileNameCachedWithExtension ? this.getExtensionFromUrl(url) : '');\n }\n /**\n * Converts a string to a unique 32-bit int\n * @private\n * @param {?} string string to hash\n * @return {?} 32-bit int\n */\n hashString(string) {\n /** @type {?} */\n let hash = 0;\n /** @type {?} */\n let char;\n if (string.length === 0) {\n return hash;\n }\n for (let i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n // tslint:disable-next-line\n hash = (hash << 5) - hash + char;\n // tslint:disable-next-line\n hash = hash & hash;\n }\n return hash;\n }\n /**\n * Extract extension from filename or url\n *\n * @private\n * @param {?} url\n * @return {?}\n *\n * Not always will url's contain a valid image extention. We'll check if any valid extention is supplied.\n * If not, we will use the default.\n */\n getExtensionFromUrl(url) {\n /** @type {?} */\n const urlWitoutParams = url.split(/\\#|\\?/)[0];\n /** @type {?} */\n const ext = (urlWitoutParams.substr((~-urlWitoutParams.lastIndexOf('.') >>> 0) + 1) || '').toLowerCase();\n return EXTENSIONS.indexOf(ext) >= 0 ? ext : this.config.fallbackFileNameCachedExtension;\n }\n}\nImageLoaderService.ɵfac = function ImageLoaderService_Factory(t) {\n return new (t || ImageLoaderService)(ɵngcc0.ɵɵinject(ImageLoaderConfigService), ɵngcc0.ɵɵinject(ɵngcc1.File), ɵngcc0.ɵɵinject(ɵngcc2.HttpClient), ɵngcc0.ɵɵinject(ɵngcc3.Platform), ɵngcc0.ɵɵinject(ɵngcc4.WebView));\n};\nImageLoaderService.ɵprov = /*@__PURE__*/ɵngcc0.ɵɵdefineInjectable({\n token: ImageLoaderService,\n factory: ImageLoaderService.ɵfac,\n providedIn: 'root'\n});\n/** @nocollapse */\nImageLoaderService.ctorParameters = () => [{\n type: ImageLoaderConfigService\n}, {\n type: File\n}, {\n type: HttpClient\n}, {\n type: Platform\n}, {\n type: WebView\n}];\n/** @nocollapse */\nImageLoaderService.ngInjectableDef = ɵɵdefineInjectable({\n factory: function ImageLoaderService_Factory() {\n return new ImageLoaderService(ɵɵinject(ImageLoaderConfigService), ɵɵinject(File$1), ɵɵinject(HttpClient), ɵɵinject(Platform), ɵɵinject(WebView$1));\n },\n token: ImageLoaderService,\n providedIn: \"root\"\n});\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ImageLoaderService, [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], function () {\n return [{\n type: ImageLoaderConfigService\n }, {\n type: ɵngcc1.File\n }, {\n type: ɵngcc2.HttpClient\n }, {\n type: ɵngcc3.Platform\n }, {\n type: ɵngcc4.WebView\n }];\n }, null);\n})();\nif (false) {\n /**\n * Indicates if the cache service is ready.\n * When the cache service isn't ready, images are loaded via browser instead.\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.isCacheReady;\n /**\n * Indicates if this service is initialized.\n * This service is initialized once all the setup is done.\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.isInit;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.initPromiseResolve;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.initPromise;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.lockSubject;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.lock$;\n /**\n * Number of concurrent requests allowed\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.concurrency;\n /**\n * Queue items\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.queue;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.processing;\n /**\n * Fast accessible Object for currently processing items\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.currentlyProcessing;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.cacheIndex;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.currentCacheSize;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.indexed;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.lockedCallsQueue;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.config;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.file;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.http;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.platform;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.webview;\n}\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/ionic-image-loader.component.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/** @type {?} */\nconst propMap = {\n display: 'display',\n height: 'height',\n width: 'width',\n backgroundSize: 'background-size',\n backgroundRepeat: 'background-repeat'\n};\n/**\n * @record\n */\nfunction ImageAttribute() {}\nif (false) {\n /** @type {?} */\n ImageAttribute.prototype.element;\n /** @type {?} */\n ImageAttribute.prototype.value;\n}\nclass IonicImageLoaderComponent {\n /**\n * @param {?} _element\n * @param {?} renderer\n * @param {?} imageLoader\n * @param {?} config\n */\n constructor(_element, renderer, imageLoader, config) {\n this._element = _element;\n this.renderer = renderer;\n this.imageLoader = imageLoader;\n this.config = config;\n /**\n * Fallback URL to load when the image url fails to load or does not exist.\n */\n this.fallbackUrl = this.config.fallbackUrl;\n /**\n * Whether to show a spinner while the image loads\n */\n this.spinner = this.config.spinnerEnabled;\n /**\n * Whether to show the fallback image instead of a spinner while the image loads\n */\n this.fallbackAsPlaceholder = this.config.fallbackAsPlaceholder;\n /**\n * Attributes to pass through to img tag if _useImg == true\n */\n this.imgAttributes = [];\n /**\n * Enable/Disable caching\n */\n this.cache = true;\n /**\n * Width of the image. This will be ignored if using useImg.\n */\n this.width = this.config.width;\n /**\n * Height of the image. This will be ignored if using useImg.\n */\n this.height = this.config.height;\n /**\n * Display type of the image. This will be ignored if using useImg.\n */\n this.display = this.config.display;\n /**\n * Background size. This will be ignored if using useImg.\n */\n this.backgroundSize = this.config.backgroundSize;\n /**\n * Background repeat. This will be ignored if using useImg.\n */\n this.backgroundRepeat = this.config.backgroundRepeat;\n /**\n * Name of the spinner\n */\n this.spinnerName = this.config.spinnerName;\n /**\n * Color of the spinner\n */\n this.spinnerColor = this.config.spinnerColor;\n /**\n * Notify on image load..\n */\n this.load = new EventEmitter();\n /**\n * Indicates if the image is still loading\n */\n this.isLoading = true;\n this._useImg = this.config.useImg;\n }\n /**\n * Use <img> tag\n * @param {?} val\n * @return {?}\n */\n set useImg(val) {\n this._useImg = val !== false;\n }\n /**\n * Convenience attribute to disable caching\n * @param {?} val\n * @return {?}\n */\n set noCache(val) {\n this.cache = val !== false;\n }\n /**\n * @return {?}\n */\n get src() {\n return this._src;\n }\n /**\n * The URL of the image to load.\n * @param {?} imageUrl\n * @return {?}\n */\n set src(imageUrl) {\n this._src = this.processImageUrl(imageUrl);\n this.updateImage(this._src);\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n if (this.fallbackAsPlaceholder && this.fallbackUrl) {\n this.setImage(this.fallbackUrl, false);\n }\n if (!this.src) {\n // image url was not passed\n // this can happen when [src] is set to a variable that turned out to be undefined\n // one example could be a list of users with their profile pictures\n // in this case, it would be useful to use the fallback image instead\n // if fallbackUrl was used as placeholder we do not need to set it again\n if (!this.fallbackAsPlaceholder && this.fallbackUrl) {\n // we're not going to cache the fallback image since it should be locally saved\n this.setImage(this.fallbackUrl);\n } else {\n this.isLoading = false;\n }\n }\n }\n /**\n * @private\n * @param {?} imageUrl\n * @return {?}\n */\n updateImage(imageUrl) {\n this.imageLoader.getImagePath(imageUrl).then(\n /**\n * @param {?} url\n * @return {?}\n */\n url => this.setImage(url)).catch(\n /**\n * @param {?} error\n * @return {?}\n */\n error => this.setImage(this.fallbackUrl || imageUrl));\n }\n /**\n * Gets the image URL to be loaded and disables caching if necessary\n * @private\n * @param {?} imageUrl\n * @return {?}\n */\n processImageUrl(imageUrl) {\n if (this.cache === false) {\n // need to disable caching\n if (imageUrl.indexOf('?') < 0) {\n // add ? if doesn't exists\n imageUrl += '?';\n } else {\n imageUrl += '&';\n }\n // append timestamp at the end to make URL unique\n imageUrl += 'cache_buster=' + Date.now();\n }\n return imageUrl;\n }\n /**\n * Set the image to be displayed\n * @private\n * @param {?} imageUrl image src\n * @param {?=} stopLoading set to true to mark the image as loaded\n * @return {?}\n */\n setImage(imageUrl, stopLoading = true) {\n this.isLoading = !stopLoading;\n if (this._useImg) {\n // Using <img> tag\n if (!this.element) {\n // create img element if we dont have one\n this.element = this.renderer.createElement('img');\n this.renderer.appendChild(this._element.nativeElement, this.element);\n }\n // set it's src\n this.renderer.setAttribute(this.element, 'src', imageUrl);\n // if imgAttributes are defined, add them to our img element\n this.imgAttributes.forEach(\n /**\n * @param {?} attribute\n * @return {?}\n */\n attribute => {\n this.renderer.setAttribute(this.element, attribute.element, attribute.value);\n });\n if (this.fallbackUrl && !this.imageLoader.nativeAvailable) {\n this.renderer.listen(this.element, 'error',\n /**\n * @return {?}\n */\n () => this.renderer.setAttribute(this.element, 'src', this.fallbackUrl));\n }\n } else {\n // Not using <img> tag\n this.element = this._element.nativeElement;\n for (const prop in propMap) {\n if (this[prop]) {\n this.renderer.setStyle(this.element, propMap[prop], this[prop]);\n }\n }\n this.renderer.setStyle(this.element, 'background-image', `url(\"${imageUrl || this.fallbackUrl}\")`);\n }\n if (stopLoading) {\n this.load.emit(this);\n }\n }\n}\nIonicImageLoaderComponent.ɵfac = function IonicImageLoaderComponent_Factory(t) {\n return new (t || IonicImageLoaderComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ImageLoaderService), ɵngcc0.ɵɵdirectiveInject(ImageLoaderConfigService));\n};\nIonicImageLoaderComponent.ɵcmp = /*@__PURE__*/ɵngcc0.ɵɵdefineComponent({\n type: IonicImageLoaderComponent,\n selectors: [[\"img-loader\"]],\n inputs: {\n fallbackUrl: \"fallbackUrl\",\n spinner: \"spinner\",\n fallbackAsPlaceholder: \"fallbackAsPlaceholder\",\n imgAttributes: \"imgAttributes\",\n cache: \"cache\",\n width: \"width\",\n height: \"height\",\n display: \"display\",\n backgroundSize: \"backgroundSize\",\n backgroundRepeat: \"backgroundRepeat\",\n spinnerName: \"spinnerName\",\n spinnerColor: \"spinnerColor\",\n useImg: \"useImg\",\n noCache: \"noCache\",\n src: \"src\"\n },\n outputs: {\n load: \"load\"\n },\n ngContentSelectors: _c0,\n decls: 2,\n vars: 1,\n consts: [[3, \"name\", \"color\", 4, \"ngIf\"], [3, \"name\", \"color\"]],\n template: function IonicImageLoaderComponent_Template(rf, ctx) {\n if (rf & 1) {\n ɵngcc0.ɵɵprojectionDef();\n ɵngcc0.ɵɵtemplate(0, IonicImageLoaderComponent_ion_spinner_0_Template, 1, 2, \"ion-spinner\", 0);\n ɵngcc0.ɵɵprojection(1);\n }\n if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.spinner && ctx.isLoading && !ctx.fallbackAsPlaceholder);\n }\n },\n dependencies: [ɵngcc3.IonSpinner, ɵngcc5.NgIf],\n styles: [\"ion-spinner[_ngcontent-%COMP%] { float: none; margin-left: auto; margin-right: auto; display: block; }\"]\n});\n/** @nocollapse */\nIonicImageLoaderComponent.ctorParameters = () => [{\n type: ElementRef\n}, {\n type: Renderer2\n}, {\n type: ImageLoaderService\n}, {\n type: ImageLoaderConfigService\n}];\nIonicImageLoaderComponent.propDecorators = {\n fallbackUrl: [{\n type: Input\n }],\n spinner: [{\n type: Input\n }],\n fallbackAsPlaceholder: [{\n type: Input\n }],\n imgAttributes: [{\n type: Input\n }],\n cache: [{\n type: Input\n }],\n width: [{\n type: Input\n }],\n height: [{\n type: Input\n }],\n display: [{\n type: Input\n }],\n backgroundSize: [{\n type: Input\n }],\n backgroundRepeat: [{\n type: Input\n }],\n spinnerName: [{\n type: Input\n }],\n spinnerColor: [{\n type: Input\n }],\n load: [{\n type: Output\n }],\n useImg: [{\n type: Input\n }],\n noCache: [{\n type: Input\n }],\n src: [{\n type: Input\n }]\n};\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IonicImageLoaderComponent, [{\n type: Component,\n args: [{\n selector: 'img-loader',\n template: `\n <ion-spinner\n *ngIf=\"spinner && isLoading && !fallbackAsPlaceholder\"\n [name]=\"spinnerName\"\n [color]=\"spinnerColor\"\n ></ion-spinner>\n <ng-content></ng-content>\n `,\n styles: [\"ion-spinner { float: none; margin-left: auto; margin-right: auto; display: block; }\"]\n }]\n }], function () {\n return [{\n type: ɵngcc0.ElementRef\n }, {\n type: ɵngcc0.Renderer2\n }, {\n type: ImageLoaderService\n }, {\n type: ImageLoaderConfigService\n }];\n }, {\n fallbackUrl: [{\n type: Input\n }],\n spinner: [{\n type: Input\n }],\n fallbackAsPlaceholder: [{\n type: Input\n }],\n imgAttributes: [{\n type: Input\n }],\n cache: [{\n type: Input\n }],\n width: [{\n type: Input\n }],\n height: [{\n type: Input\n }],\n display: [{\n type: Input\n }],\n backgroundSize: [{\n type: Input\n }],\n backgroundRepeat: [{\n type: Input\n }],\n spinnerName: [{\n type: Input\n }],\n spinnerColor: [{\n type: Input\n }],\n load: [{\n type: Output\n }],\n useImg: [{\n type: Input\n }],\n noCache: [{\n type: Input\n }],\n src: [{\n type: Input\n }]\n });\n})();\nif (false) {\n /**\n * Fallback URL to load when the image url fails to load or does not exist.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.fallbackUrl;\n /**\n * Whether to show a spinner while the image loads\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.spinner;\n /**\n * Whether to show the fallback image instead of a spinner while the image loads\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.fallbackAsPlaceholder;\n /**\n * Attributes to pass through to img tag if _useImg == true\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.imgAttributes;\n /**\n * Enable/Disable caching\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.cache;\n /**\n * Width of the image. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.width;\n /**\n * Height of the image. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.height;\n /**\n * Display type of the image. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.display;\n /**\n * Background size. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.backgroundSize;\n /**\n * Background repeat. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.backgroundRepeat;\n /**\n * Name of the spinner\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.spinnerName;\n /**\n * Color of the spinner\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.spinnerColor;\n /**\n * Notify on image load..\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.load;\n /**\n * Indicates if the image is still loading\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.isLoading;\n /** @type {?} */\n IonicImageLoaderComponent.prototype.element;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype._useImg;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype._src;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype._element;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype.renderer;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype.imageLoader;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype.config;\n}\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/ionic-image-loader.module.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass IonicImageLoaderModule {}\nIonicImageLoaderModule.ɵfac = function IonicImageLoaderModule_Factory(t) {\n return new (t || IonicImageLoaderModule)();\n};\nIonicImageLoaderModule.ɵmod = /*@__PURE__*/ɵngcc0.ɵɵdefineNgModule({\n type: IonicImageLoaderModule\n});\nIonicImageLoaderModule.ɵinj = /*@__PURE__*/ɵngcc0.ɵɵdefineInjector({\n providers: [File, ImageLoaderConfigService, ImageLoaderService],\n imports: [IonicModule, HttpClientModule, CommonModule]\n});\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IonicImageLoaderModule, [{\n type: NgModule,\n args: [{\n imports: [IonicModule, HttpClientModule, CommonModule],\n declarations: [IonicImageLoaderComponent],\n exports: [IonicImageLoaderComponent],\n providers: [File, ImageLoaderConfigService, ImageLoaderService]\n }]\n }], null, null);\n})();\n(function () {\n (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(IonicImageLoaderModule, {\n declarations: function () {\n return [IonicImageLoaderComponent];\n },\n imports: function () {\n return [IonicModule, HttpClientModule, CommonModule];\n },\n exports: function () {\n return [IonicImageLoaderComponent];\n }\n });\n})();\n\n/**\n * @fileoverview added by tsickle\n * Generated from: public-api.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * Generated from: ionic-image-loader-v5.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { ImageLoaderConfigService, ImageLoaderService, IonicImageLoaderComponent, IonicImageLoaderModule };","map":{"version":3,"names":["__awaiter","HttpClient","HttpClientModule","Injectable","ɵɵdefineInjectable","ɵɵinject","EventEmitter","Component","ElementRef","Renderer2","Input","Output","NgModule","File","WebView","Platform","IonicModule","Subject","fromEvent","first","take","filter","File$1","WebView$1","CommonModule","ɵngcc0","ɵngcc1","ɵngcc2","ɵngcc3","ɵngcc4","ɵngcc5","IonicImageLoaderComponent_ion_spinner_0_Template","rf","ctx","ɵɵelement","ctx_r0","ɵɵnextContext","ɵɵproperty","spinnerName","spinnerColor","_c0","ImageLoaderConfigService","constructor","debugMode","spinnerEnabled","fallbackAsPlaceholder","backgroundSize","backgroundRepeat","display","width","height","useImg","concurrency","maxCacheSize","maxCacheAge","imageReturnType","fileNameCachedWithExtension","fallbackFileNameCachedExtension","cacheDirectoryType","_cacheDirectoryName","cacheDirectoryName","name","replace","enableDebugMode","enableSpinner","enable","enableFallbackAsPlaceholder","setCacheDirectoryName","setHeight","setWidth","setDisplay","useImageTag","use","setBackgroundSize","setBackgroundRepeat","setFallbackUrl","fallbackUrl","setConcurrency","setMaximumCacheSize","cacheSize","setMaximumCacheAge","cacheAge","setImageReturnType","setSpinnerName","setSpinnerColor","color","setHttpHeaders","headers","httpHeaders","setFileTransferOptions","options","setFileNameCachedWithExtension","setFallbackFileNameCachedExtension","extension","ɵfac","ImageLoaderConfigService_Factory","t","ɵprov","token","factory","providedIn","ngInjectableDef","ngDevMode","ɵsetClassMetadata","type","args","prototype","IndexItem","modificationTime","size","QueueItem","imageUrl","resolve","reject","EXTENSIONS","ImageLoaderService","config","file","http","platform","webview","isCacheReady","isInit","initPromise","Promise","initPromiseResolve","lockSubject","lock$","asObservable","queue","processing","currentlyProcessing","cacheIndex","currentCacheSize","indexed","lockedCallsQueue","is","throwWarning","document","pipe","subscribe","res","nativeAvailable","initCache","installed","isCacheSpaceExceeded","isWKWebView","window","webkit","messageHandlers","isIonicWKWebView","location","host","LiveReload","isDevServer","undefined","canProcess","length","ready","preload","getImagePath","getFileCacheDirectory","dataDirectory","externalDataDirectory","documentsDirectory","cacheDirectory","clearImageCache","runLocked","fileName","createFileName","route","removeFile","tempDirectory","err","throwError","clearCache","removeRecursively","Error","isImageUrlRelative","getCachedImagePath","addItemToQueue","processLockedQueue","getLockedState","setLockedState","slice","console","log","toPromise","awaitUnlocked","locked","next","fn","push","test","p","rej","processQueue","currentItem","splice","done","currentlyInQueue","error","e","localUrl","localDir","data","get","responseType","writeFile","maintainCacheSize","addFileToIndex","some","item","createCacheDirectory","indexCache","metadata","getMetadata","Date","now","getTime","files","listDir","all","map","bind","sort","a","b","maintain","url","dirPath","tempDirPath","fileEntry","resolveLocalFilesystemUrl","base64","readAsDataURL","normalizeUrl","nativeURL","tempFileEntry","copyFile","Ionic","normalizeURL","convertFileSrc","unshift","apply","warn","cacheDirectoryExists","directory","checkDir","cacheDirectoryPromise","tempDirectoryPromise","createDir","catch","hashString","toString","getExtensionFromUrl","string","hash","char","i","charCodeAt","urlWitoutParams","split","ext","substr","lastIndexOf","toLowerCase","indexOf","ImageLoaderService_Factory","ctorParameters","propMap","ImageAttribute","element","value","IonicImageLoaderComponent","_element","renderer","imageLoader","spinner","imgAttributes","cache","load","isLoading","_useImg","val","noCache","src","_src","processImageUrl","updateImage","ngOnInit","setImage","then","stopLoading","createElement","appendChild","nativeElement","setAttribute","forEach","attribute","listen","prop","setStyle","emit","IonicImageLoaderComponent_Factory","ɵɵdirectiveInject","ɵcmp","ɵɵdefineComponent","selectors","inputs","outputs","ngContentSelectors","decls","vars","consts","template","IonicImageLoaderComponent_Template","ɵɵprojectionDef","ɵɵtemplate","ɵɵprojection","dependencies","IonSpinner","NgIf","styles","propDecorators","selector","IonicImageLoaderModule","IonicImageLoaderModule_Factory","ɵmod","ɵɵdefineNgModule","ɵinj","ɵɵdefineInjector","providers","imports","declarations","exports","ngJitMode","ɵɵsetNgModuleScope"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/ionic-image-loader-v5/__ivy_ngcc__/fesm2015/ionic-image-loader-v5.js"],"sourcesContent":["import { __awaiter } from 'tslib';\nimport { HttpClient, HttpClientModule } from '@angular/common/http';\nimport { Injectable, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Component, ElementRef, Renderer2, Input, Output, NgModule } from '@angular/core';\nimport { File } from '@ionic-native/file/ngx';\nimport { WebView } from '@ionic-native/ionic-webview/ngx';\nimport { Platform, IonicModule } from '@ionic/angular';\nimport { Subject, fromEvent } from 'rxjs';\nimport { first, take, filter } from 'rxjs/operators';\nimport { File as File$1 } from '@ionic-native/file/ngx/index';\nimport { WebView as WebView$1 } from '@ionic-native/ionic-webview/ngx/index';\nimport { CommonModule } from '@angular/common';\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/services/image-loader-config.service.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nimport * as ɵngcc0 from '@angular/core';\nimport * as ɵngcc1 from '@ionic-native/file/ngx';\nimport * as ɵngcc2 from '@angular/common/http';\nimport * as ɵngcc3 from '@ionic/angular';\nimport * as ɵngcc4 from '@ionic-native/ionic-webview/ngx';\nimport * as ɵngcc5 from '@angular/common';\n\nfunction IonicImageLoaderComponent_ion_spinner_0_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵelement(0, \"ion-spinner\", 1);\n} if (rf & 2) {\n const ctx_r0 = ɵngcc0.ɵɵnextContext();\n ɵngcc0.ɵɵproperty(\"name\", ctx_r0.spinnerName)(\"color\", ctx_r0.spinnerColor);\n} }\nconst _c0 = [\"*\"];\nclass ImageLoaderConfigService {\n constructor() {\n this.debugMode = false;\n this.spinnerEnabled = true;\n this.fallbackAsPlaceholder = false;\n this.backgroundSize = 'contain';\n this.backgroundRepeat = 'no-repeat';\n this.display = 'block';\n this.width = '100%';\n this.height = '100%';\n this.useImg = false;\n this.concurrency = 5;\n this.maxCacheSize = -1;\n this.maxCacheAge = -1;\n this.imageReturnType = 'uri';\n // Must be default 'true' for the new WebView to show images\n this.fileNameCachedWithExtension = true;\n this.fallbackFileNameCachedExtension = '.jpg';\n this.cacheDirectoryType = 'cache';\n this._cacheDirectoryName = 'image-loader-cache';\n }\n /**\n * @return {?}\n */\n get cacheDirectoryName() {\n return this._cacheDirectoryName;\n }\n /**\n * @param {?} name\n * @return {?}\n */\n set cacheDirectoryName(name) {\n name.replace(/\\W/g, '');\n this._cacheDirectoryName = name;\n }\n /**\n * Enables debug mode to receive console logs, errors, warnings\n * @return {?}\n */\n enableDebugMode() {\n this.debugMode = true;\n }\n /**\n * Enable/Disable the spinner by default. Defaults to true.\n * @param {?} enable set to true to enable\n * @return {?}\n */\n enableSpinner(enable) {\n this.spinnerEnabled = enable;\n }\n /**\n * Enable/Disable the fallback image as placeholder instead of the spinner. Defaults to false.\n * @param {?} enable set to true to enable\n * @return {?}\n */\n enableFallbackAsPlaceholder(enable) {\n this.fallbackAsPlaceholder = enable;\n }\n /**\n * Sets the cache directory name. Defaults to 'image-loader-cache'\n * @param {?} name name of directory\n * @return {?}\n */\n setCacheDirectoryName(name) {\n this.cacheDirectoryName = name;\n }\n /**\n * Set default height for images that are not using <img> tag\n * @param {?} height height\n * @return {?}\n */\n setHeight(height) {\n this.height = height;\n }\n /**\n * Set default width for images that are not using <img> tag\n * @param {?} width Width\n * @return {?}\n */\n setWidth(width) {\n this.width = width;\n }\n /**\n * Enable display mode for images that are not using <img> tag\n * @param {?} display Display mode\n * @return {?}\n */\n setDisplay(display) {\n this.display = display;\n }\n /**\n * Use <img> tag by default\n * @param {?} use set to true to use <img> tag by default\n * @return {?}\n */\n useImageTag(use) {\n this.useImg = use;\n }\n /**\n * Set default background size for images that are not using <img> tag\n * @param {?} backgroundSize Background size\n * @return {?}\n */\n setBackgroundSize(backgroundSize) {\n this.backgroundSize = backgroundSize;\n }\n /**\n * Set background repeat for images that are not using <img> tag\n * @param {?} backgroundRepeat Background repeat\n * @return {?}\n */\n setBackgroundRepeat(backgroundRepeat) {\n this.backgroundRepeat = backgroundRepeat;\n }\n /**\n * Set fallback URL to use when image src is undefined or did not resolve.\n * This image will not be cached. This should ideally be a locally saved image.\n * @param {?} fallbackUrl The remote or local URL of the image\n * @return {?}\n */\n setFallbackUrl(fallbackUrl) {\n this.fallbackUrl = fallbackUrl;\n }\n /**\n * Set the maximum number of allowed connections at the same time.\n * @param {?} concurrency\n * @return {?}\n */\n setConcurrency(concurrency) {\n this.concurrency = concurrency;\n }\n /**\n * Sets the maximum allowed cache size\n * @param {?} cacheSize Cache size in bytes\n * @return {?}\n */\n setMaximumCacheSize(cacheSize) {\n this.maxCacheSize = cacheSize;\n }\n /**\n * Sets the maximum allowed cache age\n * @param {?} cacheAge Maximum cache age in milliseconds\n * @return {?}\n */\n setMaximumCacheAge(cacheAge) {\n this.maxCacheAge = cacheAge;\n }\n /**\n * Set the return type of cached images\n * @param {?} imageReturnType The return type; either 'base64' or 'uri'\n * @return {?}\n */\n setImageReturnType(imageReturnType) {\n this.imageReturnType = imageReturnType;\n }\n /**\n * Set the default spinner name\n * @param {?} name\n * @return {?}\n */\n setSpinnerName(name) {\n this.spinnerName = name;\n }\n /**\n * Set the default spinner color\n * @param {?} color\n * @return {?}\n */\n setSpinnerColor(color) {\n this.spinnerColor = color;\n }\n /**\n * Set headers options for the HttpClient transfers.\n * @param {?} headers\n * @return {?}\n */\n setHttpHeaders(headers) {\n this.httpHeaders = headers;\n }\n /**\n * Set options for the FileTransfer plugin\n * @deprecated FileTransfer plugin removed.\n * @param {?} options\n * @return {?}\n */\n setFileTransferOptions(options) {\n // do nothing, plugin deprecated.\n }\n /**\n * Enable/Disable the save filename of cached images with extension. Defaults to false.\n * @param {?} enable set to true to enable\n * @return {?}\n */\n setFileNameCachedWithExtension(enable) {\n this.fileNameCachedWithExtension = enable;\n }\n /**\n * Set fallback extension filename of cached images. Defaults to '.jpg'.\n * @param {?} extension fallback extension (e.x .jpg)\n * @return {?}\n */\n setFallbackFileNameCachedExtension(extension) {\n this.fallbackFileNameCachedExtension = extension;\n }\n}\nImageLoaderConfigService.ɵfac = function ImageLoaderConfigService_Factory(t) { return new (t || ImageLoaderConfigService)(); };\nImageLoaderConfigService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: ImageLoaderConfigService, factory: ImageLoaderConfigService.ɵfac, providedIn: 'root' });\n/** @nocollapse */ ImageLoaderConfigService.ngInjectableDef = ɵɵdefineInjectable({ factory: function ImageLoaderConfigService_Factory() { return new ImageLoaderConfigService(); }, token: ImageLoaderConfigService, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ImageLoaderConfigService, [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], function () { return []; }, null); })();\nif (false) {\n /** @type {?} */\n ImageLoaderConfigService.prototype.debugMode;\n /** @type {?} */\n ImageLoaderConfigService.prototype.spinnerEnabled;\n /** @type {?} */\n ImageLoaderConfigService.prototype.fallbackAsPlaceholder;\n /** @type {?} */\n ImageLoaderConfigService.prototype.backgroundSize;\n /** @type {?} */\n ImageLoaderConfigService.prototype.backgroundRepeat;\n /** @type {?} */\n ImageLoaderConfigService.prototype.display;\n /** @type {?} */\n ImageLoaderConfigService.prototype.width;\n /** @type {?} */\n ImageLoaderConfigService.prototype.height;\n /** @type {?} */\n ImageLoaderConfigService.prototype.useImg;\n /** @type {?} */\n ImageLoaderConfigService.prototype.fallbackUrl;\n /** @type {?} */\n ImageLoaderConfigService.prototype.concurrency;\n /** @type {?} */\n ImageLoaderConfigService.prototype.maxCacheSize;\n /** @type {?} */\n ImageLoaderConfigService.prototype.maxCacheAge;\n /** @type {?} */\n ImageLoaderConfigService.prototype.imageReturnType;\n /** @type {?} */\n ImageLoaderConfigService.prototype.spinnerName;\n /** @type {?} */\n ImageLoaderConfigService.prototype.spinnerColor;\n /** @type {?} */\n ImageLoaderConfigService.prototype.httpHeaders;\n /** @type {?} */\n ImageLoaderConfigService.prototype.fileNameCachedWithExtension;\n /** @type {?} */\n ImageLoaderConfigService.prototype.fallbackFileNameCachedExtension;\n /** @type {?} */\n ImageLoaderConfigService.prototype.cacheDirectoryType;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderConfigService.prototype._cacheDirectoryName;\n}\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/services/image-loader.service.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/**\n * @record\n */\nfunction IndexItem() { }\nif (false) {\n /** @type {?} */\n IndexItem.prototype.name;\n /** @type {?} */\n IndexItem.prototype.modificationTime;\n /** @type {?} */\n IndexItem.prototype.size;\n}\n/**\n * @record\n */\nfunction QueueItem() { }\nif (false) {\n /** @type {?} */\n QueueItem.prototype.imageUrl;\n /** @type {?} */\n QueueItem.prototype.resolve;\n /** @type {?} */\n QueueItem.prototype.reject;\n}\n/** @type {?} */\nconst EXTENSIONS = ['jpg', 'png', 'jpeg', 'gif', 'svg', 'tiff'];\nclass ImageLoaderService {\n /**\n * @param {?} config\n * @param {?} file\n * @param {?} http\n * @param {?} platform\n * @param {?} webview\n */\n constructor(config, file, http, platform, webview) {\n this.config = config;\n this.file = file;\n this.http = http;\n this.platform = platform;\n this.webview = webview;\n /**\n * Indicates if the cache service is ready.\n * When the cache service isn't ready, images are loaded via browser instead.\n */\n this.isCacheReady = false;\n /**\n * Indicates if this service is initialized.\n * This service is initialized once all the setup is done.\n */\n this.isInit = false;\n this.initPromise = new Promise((/**\n * @param {?} resolve\n * @return {?}\n */\n resolve => this.initPromiseResolve = resolve));\n this.lockSubject = new Subject();\n this.lock$ = this.lockSubject.asObservable();\n /**\n * Number of concurrent requests allowed\n */\n this.concurrency = 5;\n /**\n * Queue items\n */\n this.queue = [];\n this.processing = 0;\n /**\n * Fast accessible Object for currently processing items\n */\n this.currentlyProcessing = {};\n this.cacheIndex = [];\n this.currentCacheSize = 0;\n this.indexed = false;\n this.lockedCallsQueue = [];\n if (!platform.is('cordova')) {\n // we are running on a browser, or using livereload\n // plugin will not function in this case\n this.isInit = true;\n this.throwWarning('You are running on a browser or using livereload, IonicImageLoader will not function, falling back to browser loading.');\n this.initPromiseResolve();\n }\n else {\n fromEvent(document, 'deviceready')\n .pipe(first())\n .subscribe((/**\n * @param {?} res\n * @return {?}\n */\n res => {\n if (this.nativeAvailable) {\n this.initCache();\n }\n else {\n // we are running on a browser, or using livereload\n // plugin will not function in this case\n this.isInit = true;\n this.initPromiseResolve();\n this.throwWarning('You are running on a browser or using livereload, IonicImageLoader will not function, falling back to browser loading.');\n }\n }));\n }\n }\n /**\n * @return {?}\n */\n get nativeAvailable() {\n return File.installed();\n }\n /**\n * @private\n * @return {?}\n */\n get isCacheSpaceExceeded() {\n return (this.config.maxCacheSize > -1 &&\n this.currentCacheSize > this.config.maxCacheSize);\n }\n /**\n * @private\n * @return {?}\n */\n get isWKWebView() {\n return (this.platform.is('ios') &&\n ((/** @type {?} */ (window))).webkit &&\n ((/** @type {?} */ (window))).webkit.messageHandlers);\n }\n /**\n * @private\n * @return {?}\n */\n get isIonicWKWebView() {\n return (\n // Important: isWKWebview && isIonicWKWebview must be mutually excluse.\n // Otherwise the logic for copying to tmp under IOS will fail.\n (this.platform.is('android') && this.webview) ||\n (this.platform.is('android')) && (location.host === 'localhost:8080') ||\n ((/** @type {?} */ (window))).LiveReload);\n }\n /**\n * @private\n * @return {?}\n */\n get isDevServer() {\n return window['IonicDevServer'] !== undefined;\n }\n /**\n * Check if we can process more items in the queue\n * @private\n * @return {?}\n */\n get canProcess() {\n return this.queue.length > 0 && this.processing < this.concurrency;\n }\n /**\n * @return {?}\n */\n ready() {\n return this.initPromise;\n }\n /**\n * Preload an image\n * @param {?} imageUrl Image URL\n * @return {?} returns a promise that resolves with the cached image URL\n */\n preload(imageUrl) {\n return this.getImagePath(imageUrl);\n }\n /**\n * @return {?}\n */\n getFileCacheDirectory() {\n if (this.config.cacheDirectoryType === 'data') {\n return this.file.dataDirectory;\n }\n else if (this.config.cacheDirectoryType === 'external') {\n return this.platform.is('android') ? this.file.externalDataDirectory : this.file.documentsDirectory;\n }\n return this.file.cacheDirectory;\n }\n /**\n * Clears cache of a single image\n * @param {?} imageUrl Image URL\n * @return {?}\n */\n clearImageCache(imageUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.platform.is('cordova')) {\n return;\n }\n yield this.ready();\n this.runLocked((/**\n * @return {?}\n */\n () => __awaiter(this, void 0, void 0, function* () {\n /** @type {?} */\n const fileName = this.createFileName(imageUrl);\n /** @type {?} */\n const route = this.getFileCacheDirectory() + this.config.cacheDirectoryName;\n // pause any operations\n this.isInit = false;\n try {\n yield this.file.removeFile(route, fileName);\n if (this.isWKWebView && !this.isIonicWKWebView) {\n yield this.file.removeFile(this.file.tempDirectory + this.config.cacheDirectoryName, fileName);\n }\n }\n catch (err) {\n this.throwError(err);\n }\n return this.initCache(true);\n })));\n });\n }\n /**\n * Clears the cache\n * @return {?}\n */\n clearCache() {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.platform.is('cordova')) {\n return;\n }\n yield this.ready();\n this.runLocked((/**\n * @return {?}\n */\n () => __awaiter(this, void 0, void 0, function* () {\n try {\n yield this.file.removeRecursively(this.getFileCacheDirectory(), this.config.cacheDirectoryName);\n if (this.isWKWebView && !this.isIonicWKWebView) {\n // also clear the temp files\n try {\n this.file.removeRecursively(this.file.tempDirectory, this.config.cacheDirectoryName);\n }\n catch (err) {\n // Noop catch. Removing the tempDirectory might fail,\n // as it is not persistent.\n }\n }\n }\n catch (err) {\n this.throwError(err);\n }\n return this.initCache(true);\n })));\n });\n }\n /**\n * Gets the filesystem path of an image.\n * This will return the remote path if anything goes wrong or if the cache service isn't ready yet.\n * @param {?} imageUrl The remote URL of the image\n * @return {?} Returns a promise that will always resolve with an image URL\n */\n getImagePath(imageUrl) {\n return __awaiter(this, void 0, void 0, function* () {\n if (typeof imageUrl !== 'string' || imageUrl.length <= 0) {\n throw new Error('The image url provided was empty or invalid.');\n }\n yield this.ready();\n if (!this.isCacheReady) {\n this.throwWarning('The cache system is not running. Images will be loaded by your browser instead.');\n return imageUrl;\n }\n if (this.isImageUrlRelative(imageUrl)) {\n return imageUrl;\n }\n try {\n return yield this.getCachedImagePath(imageUrl);\n }\n catch (err) {\n // image doesn't exist in cache, lets fetch it and save it\n return this.addItemToQueue(imageUrl);\n }\n });\n }\n /**\n * @private\n * @return {?}\n */\n processLockedQueue() {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield this.getLockedState()) {\n return;\n }\n if (this.lockedCallsQueue.length > 0) {\n yield this.setLockedState(true);\n try {\n yield this.lockedCallsQueue.slice(0, 1)[0]();\n }\n catch (err) {\n console.log('Error running locked function: ', err);\n }\n yield this.setLockedState(false);\n return this.processLockedQueue();\n }\n });\n }\n /**\n * @private\n * @return {?}\n */\n getLockedState() {\n return this.lock$\n .pipe(take(1))\n .toPromise();\n }\n /**\n * @private\n * @return {?}\n */\n awaitUnlocked() {\n return this.lock$\n .pipe(filter((/**\n * @param {?} locked\n * @return {?}\n */\n locked => !!locked)), take(1))\n .toPromise();\n }\n /**\n * @private\n * @param {?} locked\n * @return {?}\n */\n setLockedState(locked) {\n return __awaiter(this, void 0, void 0, function* () {\n this.lockSubject.next(locked);\n });\n }\n /**\n * @private\n * @param {?} fn\n * @return {?}\n */\n runLocked(fn) {\n this.lockedCallsQueue.push(fn);\n this.processLockedQueue();\n }\n /**\n * Returns if an imageUrl is an relative path\n * @private\n * @param {?} imageUrl\n * @return {?}\n */\n isImageUrlRelative(imageUrl) {\n return !/^(https?|file):\\/\\/\\/?/i.test(imageUrl);\n }\n /**\n * Add an item to the queue\n * @private\n * @param {?} imageUrl\n * @param {?=} resolve\n * @param {?=} reject\n * @return {?}\n */\n addItemToQueue(imageUrl, resolve, reject) {\n /** @type {?} */\n let p;\n if (!resolve && !reject) {\n p = new Promise((/**\n * @param {?} res\n * @param {?} rej\n * @return {?}\n */\n (res, rej) => {\n resolve = res;\n reject = rej;\n }));\n }\n else {\n resolve = resolve || ((/**\n * @return {?}\n */\n () => {\n }));\n reject = reject || ((/**\n * @return {?}\n */\n () => {\n }));\n }\n this.queue.push({\n imageUrl,\n resolve,\n reject,\n });\n this.processQueue();\n return p;\n }\n /**\n * Processes one item from the queue\n * @private\n * @return {?}\n */\n processQueue() {\n return __awaiter(this, void 0, void 0, function* () {\n // make sure we can process items first\n if (!this.canProcess) {\n return;\n }\n // increase the processing number\n this.processing++;\n // take the first item from queue\n /** @type {?} */\n const currentItem = this.queue.splice(0, 1)[0];\n // function to call when done processing this item\n // this will reduce the processing number\n // then will execute this function again to process any remaining items\n /** @type {?} */\n const done = (/**\n * @return {?}\n */\n () => {\n this.processing--;\n this.processQueue();\n // only delete if it's the last/unique occurrence in the queue\n if (this.currentlyProcessing[currentItem.imageUrl] !== undefined && !this.currentlyInQueue(currentItem.imageUrl)) {\n delete this.currentlyProcessing[currentItem.imageUrl];\n }\n });\n /** @type {?} */\n const error = (/**\n * @param {?} e\n * @return {?}\n */\n (e) => {\n currentItem.reject();\n this.throwError(e);\n done();\n });\n if (this.currentlyProcessing[currentItem.imageUrl] !== undefined) {\n try {\n // Prevented same Image from loading at the same time\n yield this.currentlyProcessing[currentItem.imageUrl];\n /** @type {?} */\n const localUrl = yield this.getCachedImagePath(currentItem.imageUrl);\n currentItem.resolve(localUrl);\n done();\n }\n catch (err) {\n error(err);\n }\n return;\n }\n this.currentlyProcessing[currentItem.imageUrl] = ((/**\n * @return {?}\n */\n () => __awaiter(this, void 0, void 0, function* () {\n // process more items concurrently if we can\n if (this.canProcess) {\n this.processQueue();\n }\n /** @type {?} */\n const localDir = this.getFileCacheDirectory() + this.config.cacheDirectoryName + '/';\n /** @type {?} */\n const fileName = this.createFileName(currentItem.imageUrl);\n try {\n /** @type {?} */\n const data = yield this.http.get(currentItem.imageUrl, {\n responseType: 'blob',\n headers: this.config.httpHeaders,\n }).toPromise();\n /** @type {?} */\n const file = (/** @type {?} */ (yield this.file.writeFile(localDir, fileName, data, { replace: true })));\n if (this.isCacheSpaceExceeded) {\n this.maintainCacheSize();\n }\n yield this.addFileToIndex(file);\n /** @type {?} */\n const localUrl = yield this.getCachedImagePath(currentItem.imageUrl);\n currentItem.resolve(localUrl);\n done();\n this.maintainCacheSize();\n }\n catch (err) {\n error(err);\n throw err;\n }\n })))();\n });\n }\n /**\n * Search if the url is currently in the queue\n * @private\n * @param {?} imageUrl Image url to search\n * @return {?}\n */\n currentlyInQueue(imageUrl) {\n return this.queue.some((/**\n * @param {?} item\n * @return {?}\n */\n item => item.imageUrl === imageUrl));\n }\n /**\n * Initialize the cache service\n * @private\n * @param {?=} replace\n * @return {?}\n */\n initCache(replace) {\n return __awaiter(this, void 0, void 0, function* () {\n this.concurrency = this.config.concurrency;\n // create cache directories if they do not exist\n try {\n yield this.createCacheDirectory(replace);\n yield this.indexCache();\n this.isCacheReady = true;\n }\n catch (err) {\n this.throwError(err);\n }\n this.isInit = true;\n this.initPromiseResolve();\n });\n }\n /**\n * Adds a file to index.\n * Also deletes any files if they are older than the set maximum cache age.\n * @private\n * @param {?} file FileEntry to index\n * @return {?}\n */\n addFileToIndex(file) {\n return __awaiter(this, void 0, void 0, function* () {\n /** @type {?} */\n const metadata = yield new Promise((/**\n * @param {?} resolve\n * @param {?} reject\n * @return {?}\n */\n (resolve, reject) => file.getMetadata(resolve, reject)));\n if (this.config.maxCacheAge > -1 &&\n Date.now() - metadata.modificationTime.getTime() >\n this.config.maxCacheAge) {\n // file age exceeds maximum cache age\n return this.removeFile(file.name);\n }\n else {\n // file age doesn't exceed maximum cache age, or maximum cache age isn't set\n this.currentCacheSize += metadata.size;\n // add item to index\n this.cacheIndex.push({\n name: file.name,\n modificationTime: metadata.modificationTime,\n size: metadata.size,\n });\n }\n });\n }\n /**\n * Indexes the cache if necessary\n * @private\n * @return {?}\n */\n indexCache() {\n return __awaiter(this, void 0, void 0, function* () {\n this.cacheIndex = [];\n try {\n /** @type {?} */\n const files = yield this.file.listDir(this.getFileCacheDirectory(), this.config.cacheDirectoryName);\n yield Promise.all(files.map(this.addFileToIndex.bind(this)));\n // Sort items by date. Most recent to oldest.\n this.cacheIndex = this.cacheIndex.sort((/**\n * @param {?} a\n * @param {?} b\n * @return {?}\n */\n (a, b) => (a > b ? -1 : a < b ? 1 : 0)));\n this.indexed = true;\n }\n catch (err) {\n this.throwError(err);\n }\n });\n }\n /**\n * This method runs every time a new file is added.\n * It checks the cache size and ensures that it doesn't exceed the maximum cache size set in the config.\n * If the limit is reached, it will delete old images to create free space.\n * @private\n * @return {?}\n */\n maintainCacheSize() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.config.maxCacheSize > -1 && this.indexed) {\n /** @type {?} */\n const maintain = (/**\n * @return {?}\n */\n () => __awaiter(this, void 0, void 0, function* () {\n if (this.currentCacheSize > this.config.maxCacheSize) {\n // grab the first item in index since it's the oldest one\n /** @type {?} */\n const file = this.cacheIndex.splice(0, 1)[0];\n if (typeof file === 'undefined') {\n return maintain();\n }\n // delete the file then process next file if necessary\n try {\n yield this.removeFile(file.name);\n }\n catch (err) {\n // ignore errors, nothing we can do about it\n }\n this.currentCacheSize -= file.size;\n return maintain();\n }\n }));\n return maintain();\n }\n });\n }\n /**\n * Remove a file\n * @private\n * @param {?} file The name of the file to remove\n * @return {?}\n */\n removeFile(file) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.file.removeFile(this.getFileCacheDirectory() + this.config.cacheDirectoryName, file);\n if (this.isWKWebView && !this.isIonicWKWebView) {\n try {\n return this.file.removeFile(this.file.tempDirectory + this.config.cacheDirectoryName, file);\n }\n catch (err) {\n // Noop catch. Removing the files from tempDirectory might fail, as it is not persistent.\n }\n }\n });\n }\n /**\n * Get the local path of a previously cached image if exists\n * @private\n * @param {?} url The remote URL of the image\n * @return {?} Returns a promise that resolves with the local path if exists, or rejects if doesn't exist\n */\n getCachedImagePath(url) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.ready();\n if (!this.isCacheReady) {\n throw new Error('Cache is not ready');\n }\n // if we're running with livereload, ignore cache and call the resource from it's URL\n if (this.isDevServer) {\n return url;\n }\n // get file name\n /** @type {?} */\n const fileName = this.createFileName(url);\n // get full path\n /** @type {?} */\n const dirPath = this.getFileCacheDirectory() + this.config.cacheDirectoryName;\n /** @type {?} */\n const tempDirPath = this.file.tempDirectory + this.config.cacheDirectoryName;\n try {\n // check if exists\n /** @type {?} */\n const fileEntry = (/** @type {?} */ (yield this.file.resolveLocalFilesystemUrl(dirPath + '/' + fileName)));\n // file exists in cache\n if (this.config.imageReturnType === 'base64') {\n // read the file as data url and return the base64 string.\n // should always be successful as the existence of the file\n // is already ensured\n /** @type {?} */\n const base64 = yield this.file.readAsDataURL(dirPath, fileName);\n return base64.replace('data:null', 'data:*/*');\n }\n else if (this.config.imageReturnType !== 'uri') {\n return;\n }\n // now check if iOS device & using WKWebView Engine.\n // in this case only the tempDirectory is accessible,\n // therefore the file needs to be copied into that directory first!\n if (this.isIonicWKWebView) {\n return this.normalizeUrl(fileEntry);\n }\n if (!this.isWKWebView) {\n // return native path\n return fileEntry.nativeURL;\n }\n // check if file already exists in temp directory\n try {\n /** @type {?} */\n const tempFileEntry = (/** @type {?} */ (yield this.file.resolveLocalFilesystemUrl(tempDirPath + '/' + fileName)));\n // file exists in temp directory\n // return native path\n return this.normalizeUrl(tempFileEntry);\n }\n catch (err) {\n // file does not yet exist in the temp directory.\n // copy it!\n /** @type {?} */\n const tempFileEntry = (/** @type {?} */ (yield this.file\n .copyFile(dirPath, fileName, tempDirPath, fileName)));\n // now the file exists in the temp directory\n // return native path\n return this.normalizeUrl(tempFileEntry);\n }\n }\n catch (err) {\n throw new Error('File does not exist');\n }\n });\n }\n /**\n * Normalizes the image uri to a version that can be loaded in the webview\n * @private\n * @param {?} fileEntry the FileEntry of the image file\n * @return {?} the normalized Url\n */\n normalizeUrl(fileEntry) {\n // Use Ionic normalizeUrl to generate the right URL for Ionic WKWebView\n if (Ionic && typeof Ionic.normalizeURL === 'function') {\n return Ionic.normalizeURL(fileEntry.nativeURL);\n }\n // use new webview function to do the trick\n if (this.webview) {\n return this.webview.convertFileSrc(fileEntry.nativeURL);\n }\n return fileEntry.nativeURL;\n }\n /**\n * Throws a console error if debug mode is enabled\n * @private\n * @param {...?} args Error message\n * @return {?}\n */\n throwError(...args) {\n if (this.config.debugMode) {\n args.unshift('ImageLoader Error: ');\n console.error.apply(console, args);\n }\n }\n /**\n * Throws a console warning if debug mode is enabled\n * @private\n * @param {...?} args Error message\n * @return {?}\n */\n throwWarning(...args) {\n if (this.config.debugMode) {\n args.unshift('ImageLoader Warning: ');\n console.warn.apply(console, args);\n }\n }\n /**\n * Check if the cache directory exists\n * @private\n * @param {?} directory The directory to check. Either this.file.tempDirectory or this.getFileCacheDirectory()\n * @return {?} Returns a promise that resolves if exists, and rejects if it doesn't\n */\n cacheDirectoryExists(directory) {\n return this.file.checkDir(directory, this.config.cacheDirectoryName);\n }\n /**\n * Create the cache directories\n * @private\n * @param {?=} replace override directory if exists\n * @return {?} Returns a promise that resolves if the directories were created, and rejects on error\n */\n createCacheDirectory(replace = false) {\n /** @type {?} */\n let cacheDirectoryPromise;\n /** @type {?} */\n let tempDirectoryPromise;\n if (replace) {\n // create or replace the cache directory\n cacheDirectoryPromise = this.file.createDir(this.getFileCacheDirectory(), this.config.cacheDirectoryName, replace);\n }\n else {\n // check if the cache directory exists.\n // if it does not exist create it!\n cacheDirectoryPromise = this.cacheDirectoryExists(this.getFileCacheDirectory())\n .catch((/**\n * @return {?}\n */\n () => this.file.createDir(this.getFileCacheDirectory(), this.config.cacheDirectoryName, false)));\n }\n if (this.isWKWebView && !this.isIonicWKWebView) {\n if (replace) {\n // create or replace the temp directory\n tempDirectoryPromise = this.file.createDir(this.file.tempDirectory, this.config.cacheDirectoryName, replace);\n }\n else {\n // check if the temp directory exists.\n // if it does not exist create it!\n tempDirectoryPromise = this.cacheDirectoryExists(this.file.tempDirectory).catch((/**\n * @return {?}\n */\n () => this.file.createDir(this.file.tempDirectory, this.config.cacheDirectoryName, false)));\n }\n }\n else {\n tempDirectoryPromise = Promise.resolve();\n }\n return Promise.all([cacheDirectoryPromise, tempDirectoryPromise]);\n }\n /**\n * Creates a unique file name out of the URL\n * @private\n * @param {?} url URL of the file\n * @return {?} Unique file name\n */\n createFileName(url) {\n // hash the url to get a unique file name\n return (this.hashString(url).toString() +\n (this.config.fileNameCachedWithExtension\n ? this.getExtensionFromUrl(url)\n : ''));\n }\n /**\n * Converts a string to a unique 32-bit int\n * @private\n * @param {?} string string to hash\n * @return {?} 32-bit int\n */\n hashString(string) {\n /** @type {?} */\n let hash = 0;\n /** @type {?} */\n let char;\n if (string.length === 0) {\n return hash;\n }\n for (let i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n // tslint:disable-next-line\n hash = (hash << 5) - hash + char;\n // tslint:disable-next-line\n hash = hash & hash;\n }\n return hash;\n }\n /**\n * Extract extension from filename or url\n *\n * @private\n * @param {?} url\n * @return {?}\n *\n * Not always will url's contain a valid image extention. We'll check if any valid extention is supplied.\n * If not, we will use the default.\n */\n getExtensionFromUrl(url) {\n /** @type {?} */\n const urlWitoutParams = url.split(/\\#|\\?/)[0];\n /** @type {?} */\n const ext = (urlWitoutParams.substr((~-urlWitoutParams.lastIndexOf('.') >>> 0) + 1) || '').toLowerCase();\n return (EXTENSIONS.indexOf(ext) >= 0 ? ext : this.config.fallbackFileNameCachedExtension);\n }\n}\nImageLoaderService.ɵfac = function ImageLoaderService_Factory(t) { return new (t || ImageLoaderService)(ɵngcc0.ɵɵinject(ImageLoaderConfigService), ɵngcc0.ɵɵinject(ɵngcc1.File), ɵngcc0.ɵɵinject(ɵngcc2.HttpClient), ɵngcc0.ɵɵinject(ɵngcc3.Platform), ɵngcc0.ɵɵinject(ɵngcc4.WebView)); };\nImageLoaderService.ɵprov = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjectable({ token: ImageLoaderService, factory: ImageLoaderService.ɵfac, providedIn: 'root' });\n/** @nocollapse */\nImageLoaderService.ctorParameters = () => [\n { type: ImageLoaderConfigService },\n { type: File },\n { type: HttpClient },\n { type: Platform },\n { type: WebView }\n];\n/** @nocollapse */ ImageLoaderService.ngInjectableDef = ɵɵdefineInjectable({ factory: function ImageLoaderService_Factory() { return new ImageLoaderService(ɵɵinject(ImageLoaderConfigService), ɵɵinject(File$1), ɵɵinject(HttpClient), ɵɵinject(Platform), ɵɵinject(WebView$1)); }, token: ImageLoaderService, providedIn: \"root\" });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(ImageLoaderService, [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], function () { return [{ type: ImageLoaderConfigService }, { type: ɵngcc1.File }, { type: ɵngcc2.HttpClient }, { type: ɵngcc3.Platform }, { type: ɵngcc4.WebView }]; }, null); })();\nif (false) {\n /**\n * Indicates if the cache service is ready.\n * When the cache service isn't ready, images are loaded via browser instead.\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.isCacheReady;\n /**\n * Indicates if this service is initialized.\n * This service is initialized once all the setup is done.\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.isInit;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.initPromiseResolve;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.initPromise;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.lockSubject;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.lock$;\n /**\n * Number of concurrent requests allowed\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.concurrency;\n /**\n * Queue items\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.queue;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.processing;\n /**\n * Fast accessible Object for currently processing items\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.currentlyProcessing;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.cacheIndex;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.currentCacheSize;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.indexed;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.lockedCallsQueue;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.config;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.file;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.http;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.platform;\n /**\n * @type {?}\n * @private\n */\n ImageLoaderService.prototype.webview;\n}\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/ionic-image-loader.component.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n/** @type {?} */\nconst propMap = {\n display: 'display',\n height: 'height',\n width: 'width',\n backgroundSize: 'background-size',\n backgroundRepeat: 'background-repeat',\n};\n/**\n * @record\n */\nfunction ImageAttribute() { }\nif (false) {\n /** @type {?} */\n ImageAttribute.prototype.element;\n /** @type {?} */\n ImageAttribute.prototype.value;\n}\nclass IonicImageLoaderComponent {\n /**\n * @param {?} _element\n * @param {?} renderer\n * @param {?} imageLoader\n * @param {?} config\n */\n constructor(_element, renderer, imageLoader, config) {\n this._element = _element;\n this.renderer = renderer;\n this.imageLoader = imageLoader;\n this.config = config;\n /**\n * Fallback URL to load when the image url fails to load or does not exist.\n */\n this.fallbackUrl = this.config.fallbackUrl;\n /**\n * Whether to show a spinner while the image loads\n */\n this.spinner = this.config.spinnerEnabled;\n /**\n * Whether to show the fallback image instead of a spinner while the image loads\n */\n this.fallbackAsPlaceholder = this.config.fallbackAsPlaceholder;\n /**\n * Attributes to pass through to img tag if _useImg == true\n */\n this.imgAttributes = [];\n /**\n * Enable/Disable caching\n */\n this.cache = true;\n /**\n * Width of the image. This will be ignored if using useImg.\n */\n this.width = this.config.width;\n /**\n * Height of the image. This will be ignored if using useImg.\n */\n this.height = this.config.height;\n /**\n * Display type of the image. This will be ignored if using useImg.\n */\n this.display = this.config.display;\n /**\n * Background size. This will be ignored if using useImg.\n */\n this.backgroundSize = this.config.backgroundSize;\n /**\n * Background repeat. This will be ignored if using useImg.\n */\n this.backgroundRepeat = this.config.backgroundRepeat;\n /**\n * Name of the spinner\n */\n this.spinnerName = this.config.spinnerName;\n /**\n * Color of the spinner\n */\n this.spinnerColor = this.config.spinnerColor;\n /**\n * Notify on image load..\n */\n this.load = new EventEmitter();\n /**\n * Indicates if the image is still loading\n */\n this.isLoading = true;\n this._useImg = this.config.useImg;\n }\n /**\n * Use <img> tag\n * @param {?} val\n * @return {?}\n */\n set useImg(val) {\n this._useImg = val !== false;\n }\n /**\n * Convenience attribute to disable caching\n * @param {?} val\n * @return {?}\n */\n set noCache(val) {\n this.cache = val !== false;\n }\n /**\n * @return {?}\n */\n get src() {\n return this._src;\n }\n /**\n * The URL of the image to load.\n * @param {?} imageUrl\n * @return {?}\n */\n set src(imageUrl) {\n this._src = this.processImageUrl(imageUrl);\n this.updateImage(this._src);\n }\n /**\n * @return {?}\n */\n ngOnInit() {\n if (this.fallbackAsPlaceholder && this.fallbackUrl) {\n this.setImage(this.fallbackUrl, false);\n }\n if (!this.src) {\n // image url was not passed\n // this can happen when [src] is set to a variable that turned out to be undefined\n // one example could be a list of users with their profile pictures\n // in this case, it would be useful to use the fallback image instead\n // if fallbackUrl was used as placeholder we do not need to set it again\n if (!this.fallbackAsPlaceholder && this.fallbackUrl) {\n // we're not going to cache the fallback image since it should be locally saved\n this.setImage(this.fallbackUrl);\n }\n else {\n this.isLoading = false;\n }\n }\n }\n /**\n * @private\n * @param {?} imageUrl\n * @return {?}\n */\n updateImage(imageUrl) {\n this.imageLoader\n .getImagePath(imageUrl)\n .then((/**\n * @param {?} url\n * @return {?}\n */\n (url) => this.setImage(url)))\n .catch((/**\n * @param {?} error\n * @return {?}\n */\n (error) => this.setImage(this.fallbackUrl || imageUrl)));\n }\n /**\n * Gets the image URL to be loaded and disables caching if necessary\n * @private\n * @param {?} imageUrl\n * @return {?}\n */\n processImageUrl(imageUrl) {\n if (this.cache === false) {\n // need to disable caching\n if (imageUrl.indexOf('?') < 0) {\n // add ? if doesn't exists\n imageUrl += '?';\n }\n else {\n imageUrl += '&';\n }\n // append timestamp at the end to make URL unique\n imageUrl += 'cache_buster=' + Date.now();\n }\n return imageUrl;\n }\n /**\n * Set the image to be displayed\n * @private\n * @param {?} imageUrl image src\n * @param {?=} stopLoading set to true to mark the image as loaded\n * @return {?}\n */\n setImage(imageUrl, stopLoading = true) {\n this.isLoading = !stopLoading;\n if (this._useImg) {\n // Using <img> tag\n if (!this.element) {\n // create img element if we dont have one\n this.element = this.renderer.createElement('img');\n this.renderer.appendChild(this._element.nativeElement, this.element);\n }\n // set it's src\n this.renderer.setAttribute(this.element, 'src', imageUrl);\n // if imgAttributes are defined, add them to our img element\n this.imgAttributes.forEach((/**\n * @param {?} attribute\n * @return {?}\n */\n (attribute) => {\n this.renderer.setAttribute(this.element, attribute.element, attribute.value);\n }));\n if (this.fallbackUrl && !this.imageLoader.nativeAvailable) {\n this.renderer.listen(this.element, 'error', (/**\n * @return {?}\n */\n () => this.renderer.setAttribute(this.element, 'src', this.fallbackUrl)));\n }\n }\n else {\n // Not using <img> tag\n this.element = this._element.nativeElement;\n for (const prop in propMap) {\n if (this[prop]) {\n this.renderer.setStyle(this.element, propMap[prop], this[prop]);\n }\n }\n this.renderer.setStyle(this.element, 'background-image', `url(\"${imageUrl || this.fallbackUrl}\")`);\n }\n if (stopLoading) {\n this.load.emit(this);\n }\n }\n}\nIonicImageLoaderComponent.ɵfac = function IonicImageLoaderComponent_Factory(t) { return new (t || IonicImageLoaderComponent)(ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ElementRef), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.Renderer2), ɵngcc0.ɵɵdirectiveInject(ImageLoaderService), ɵngcc0.ɵɵdirectiveInject(ImageLoaderConfigService)); };\nIonicImageLoaderComponent.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: IonicImageLoaderComponent, selectors: [[\"img-loader\"]], inputs: { fallbackUrl: \"fallbackUrl\", spinner: \"spinner\", fallbackAsPlaceholder: \"fallbackAsPlaceholder\", imgAttributes: \"imgAttributes\", cache: \"cache\", width: \"width\", height: \"height\", display: \"display\", backgroundSize: \"backgroundSize\", backgroundRepeat: \"backgroundRepeat\", spinnerName: \"spinnerName\", spinnerColor: \"spinnerColor\", useImg: \"useImg\", noCache: \"noCache\", src: \"src\" }, outputs: { load: \"load\" }, ngContentSelectors: _c0, decls: 2, vars: 1, consts: [[3, \"name\", \"color\", 4, \"ngIf\"], [3, \"name\", \"color\"]], template: function IonicImageLoaderComponent_Template(rf, ctx) { if (rf & 1) {\n ɵngcc0.ɵɵprojectionDef();\n ɵngcc0.ɵɵtemplate(0, IonicImageLoaderComponent_ion_spinner_0_Template, 1, 2, \"ion-spinner\", 0);\n ɵngcc0.ɵɵprojection(1);\n } if (rf & 2) {\n ɵngcc0.ɵɵproperty(\"ngIf\", ctx.spinner && ctx.isLoading && !ctx.fallbackAsPlaceholder);\n } }, dependencies: [ɵngcc3.IonSpinner, ɵngcc5.NgIf], styles: [\"ion-spinner[_ngcontent-%COMP%] { float: none; margin-left: auto; margin-right: auto; display: block; }\"] });\n/** @nocollapse */\nIonicImageLoaderComponent.ctorParameters = () => [\n { type: ElementRef },\n { type: Renderer2 },\n { type: ImageLoaderService },\n { type: ImageLoaderConfigService }\n];\nIonicImageLoaderComponent.propDecorators = {\n fallbackUrl: [{ type: Input }],\n spinner: [{ type: Input }],\n fallbackAsPlaceholder: [{ type: Input }],\n imgAttributes: [{ type: Input }],\n cache: [{ type: Input }],\n width: [{ type: Input }],\n height: [{ type: Input }],\n display: [{ type: Input }],\n backgroundSize: [{ type: Input }],\n backgroundRepeat: [{ type: Input }],\n spinnerName: [{ type: Input }],\n spinnerColor: [{ type: Input }],\n load: [{ type: Output }],\n useImg: [{ type: Input }],\n noCache: [{ type: Input }],\n src: [{ type: Input }]\n};\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IonicImageLoaderComponent, [{\n type: Component,\n args: [{ selector: 'img-loader', template: `\n <ion-spinner\n *ngIf=\"spinner && isLoading && !fallbackAsPlaceholder\"\n [name]=\"spinnerName\"\n [color]=\"spinnerColor\"\n ></ion-spinner>\n <ng-content></ng-content>\n `, styles: [\"ion-spinner { float: none; margin-left: auto; margin-right: auto; display: block; }\"] }]\n }], function () { return [{ type: ɵngcc0.ElementRef }, { type: ɵngcc0.Renderer2 }, { type: ImageLoaderService }, { type: ImageLoaderConfigService }]; }, { fallbackUrl: [{\n type: Input\n }], spinner: [{\n type: Input\n }], fallbackAsPlaceholder: [{\n type: Input\n }], imgAttributes: [{\n type: Input\n }], cache: [{\n type: Input\n }], width: [{\n type: Input\n }], height: [{\n type: Input\n }], display: [{\n type: Input\n }], backgroundSize: [{\n type: Input\n }], backgroundRepeat: [{\n type: Input\n }], spinnerName: [{\n type: Input\n }], spinnerColor: [{\n type: Input\n }], load: [{\n type: Output\n }], useImg: [{\n type: Input\n }], noCache: [{\n type: Input\n }], src: [{\n type: Input\n }] }); })();\nif (false) {\n /**\n * Fallback URL to load when the image url fails to load or does not exist.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.fallbackUrl;\n /**\n * Whether to show a spinner while the image loads\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.spinner;\n /**\n * Whether to show the fallback image instead of a spinner while the image loads\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.fallbackAsPlaceholder;\n /**\n * Attributes to pass through to img tag if _useImg == true\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.imgAttributes;\n /**\n * Enable/Disable caching\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.cache;\n /**\n * Width of the image. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.width;\n /**\n * Height of the image. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.height;\n /**\n * Display type of the image. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.display;\n /**\n * Background size. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.backgroundSize;\n /**\n * Background repeat. This will be ignored if using useImg.\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.backgroundRepeat;\n /**\n * Name of the spinner\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.spinnerName;\n /**\n * Color of the spinner\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.spinnerColor;\n /**\n * Notify on image load..\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.load;\n /**\n * Indicates if the image is still loading\n * @type {?}\n */\n IonicImageLoaderComponent.prototype.isLoading;\n /** @type {?} */\n IonicImageLoaderComponent.prototype.element;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype._useImg;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype._src;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype._element;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype.renderer;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype.imageLoader;\n /**\n * @type {?}\n * @private\n */\n IonicImageLoaderComponent.prototype.config;\n}\n\n/**\n * @fileoverview added by tsickle\n * Generated from: lib/ionic-image-loader.module.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\nclass IonicImageLoaderModule {\n}\nIonicImageLoaderModule.ɵfac = function IonicImageLoaderModule_Factory(t) { return new (t || IonicImageLoaderModule)(); };\nIonicImageLoaderModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: IonicImageLoaderModule });\nIonicImageLoaderModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [\n File,\n ImageLoaderConfigService,\n ImageLoaderService\n ], imports: [IonicModule,\n HttpClientModule,\n CommonModule] });\n(function () { (typeof ngDevMode === \"undefined\" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(IonicImageLoaderModule, [{\n type: NgModule,\n args: [{\n imports: [\n IonicModule,\n HttpClientModule,\n CommonModule\n ],\n declarations: [\n IonicImageLoaderComponent\n ],\n exports: [\n IonicImageLoaderComponent\n ],\n providers: [\n File,\n ImageLoaderConfigService,\n ImageLoaderService\n ]\n }]\n }], null, null); })();\n(function () { (typeof ngJitMode === \"undefined\" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(IonicImageLoaderModule, { declarations: function () { return [IonicImageLoaderComponent]; }, imports: function () { return [IonicModule,\n HttpClientModule,\n CommonModule]; }, exports: function () { return [IonicImageLoaderComponent]; } }); })();\n\n/**\n * @fileoverview added by tsickle\n * Generated from: public-api.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * Generated from: ionic-image-loader-v5.ts\n * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc\n */\n\nexport { ImageLoaderConfigService, ImageLoaderService, IonicImageLoaderComponent, IonicImageLoaderModule };\n\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,UAAU,EAAEC,gBAAgB,QAAQ,sBAAsB;AACnE,SAASC,UAAU,EAAEC,kBAAkB,EAAEC,QAAQ,EAAEC,YAAY,EAAEC,SAAS,EAAEC,UAAU,EAAEC,SAAS,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,eAAe;AACjJ,SAASC,IAAI,QAAQ,wBAAwB;AAC7C,SAASC,OAAO,QAAQ,iCAAiC;AACzD,SAASC,QAAQ,EAAEC,WAAW,QAAQ,gBAAgB;AACtD,SAASC,OAAO,EAAEC,SAAS,QAAQ,MAAM;AACzC,SAASC,KAAK,EAAEC,IAAI,EAAEC,MAAM,QAAQ,gBAAgB;AACpD,SAASR,IAAI,IAAIS,MAAM,QAAQ,8BAA8B;AAC7D,SAASR,OAAO,IAAIS,SAAS,QAAQ,uCAAuC;AAC5E,SAASC,YAAY,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