Kargi-Sitesi/node_modules/@angular/fire/fesm2015/angular-fire-compat-functions.js.map

1 line
6.3 KiB
Text
Raw Normal View History

2024-11-04 02:30:09 +00:00
{"version":3,"file":"angular-fire-compat-functions.js","sources":["../../../src/compat/functions/base.ts","../../../src/compat/functions/functions.ts","../../../src/compat/functions/functions.module.ts","../../../src/compat/functions/angular-fire-compat-functions.ts"],"sourcesContent":["// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/functions, so Proxy can work with proxy-polyfill in Internet Explorer\nexport const proxyPolyfillCompat = {\n useEmulator: null,\n useFunctionsEmulator: null,\n httpsCallable: null,\n};\n","import { Inject, Injectable, InjectionToken, NgZone, Optional } from '@angular/core';\nimport { from, Observable, of } from 'rxjs';\nimport { map, observeOn, shareReplay, switchMap } from 'rxjs/operators';\nimport { ɵAngularFireSchedulers } from '@angular/fire';\nimport { ɵlazySDKProxy, ɵPromiseProxy, ɵapplyMixins } from '@angular/fire/compat';\nimport { FirebaseOptions } from 'firebase/app';\nimport { ɵfirebaseAppFactory, FIREBASE_APP_NAME, FIREBASE_OPTIONS, ɵcacheInstance } from '@angular/fire/compat';\nimport firebase from 'firebase/compat/app';\nimport { proxyPolyfillCompat } from './base';\nimport { HttpsCallableOptions } from '@firebase/functions-types';\nimport { AppCheckInstances } from '@angular/fire/app-check';\n\nexport const ORIGIN = new InjectionToken<string>('angularfire2.functions.origin');\nexport const REGION = new InjectionToken<string>('angularfire2.functions.region');\n\ntype UseEmulatorArguments = Parameters<firebase.functions.Functions['useEmulator']>;\nexport const USE_EMULATOR = new InjectionToken<UseEmulatorArguments>('angularfire2.functions.use-emulator');\n\n// override httpsCallable for compatibility with 5.x\nexport interface AngularFireFunctions extends Omit<ɵPromiseProxy<firebase.functions.Functions>, 'httpsCallable'> {\n}\n\n@Injectable({\n providedIn: 'any'\n})\nexport class AngularFireFunctions {\n\n public readonly httpsCallable: <T = any, R = any>(name: string, options?: HttpsCallableOptions) => (data: T) => Observable<R>;\n\n constructor(\n @Inject(FIREBASE_OPTIONS) options: FirebaseOptions,\n @Optional() @Inject(FIREBASE_APP_NAME) name: string | null | undefined,\n zone: NgZone,\n schedulers: ɵAngularFireSchedulers,\n @Optional() @Inject(REGION) region: string | null,\n @Optional() @Inject(ORIGIN) origin: string | null,\n @Optional() @Inject(USE_EMULATOR) _useEmulator: any, // can't use the tuple here\n @Optional() _appCheckInstances: AppCheckInstances,\n ) {\n const useEmulator: UseEmulatorArguments | null = _useEmulator;\n\n const functions = of(undefined).pipe(\n observeOn(schedulers.outsideAngular),\n switchMap(() => import('firebase/compat/functions')),\n map(() => ɵfirebaseAppFactory(options, zone, name)),\n map(app => ɵcacheInstance(`${app.name}.functions.${region || origin}`, 'AngularFireFunctions', app.name, () => {\n let functions: firebase.functions.Functions;\n if (region && origin) {\n throw new Error('REGION and ORIGIN can\\'t be used at the same time.');\n }\n functions = app.functions(region || origin || undefined);\n if (useEmulator) {\n functions.useEmulator(...useEmulator);\n }\n return functions;\n }, [region, origin, useEmulator])),\n shareReplay({ bufferSize: 1, refCount: false })\n );\n\n this.httpsCallable = <T = any, R = any>(name: string, options?: HttpsCallableOptions) =>\n (data: T) => from(functions).pipe(\n observeOn(schedulers.insideAngular),\n switchMap(functions => functions.httpsCallable(name, options)(data)),\n map(r => r.data as R)\n );\n\n return ɵlazySDKProxy(this, functions, zone);\n\n }\n\n}\n\nɵapplyMixins(AngularFireFunctions, [proxyPolyfillCompat]);\n","import { NgModule } from '@angular/core';\nimport { AngularFireFunctions } from './functions';\nimport firebase from 'firebase/compat/app';\nimport { VERSION } from '@angular/fire';\n\n@NgModule({\n providers: [ An