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BA,GACAA,EAAkBzC,cAEtB,MAAM0C,EAAkB,IAAIC,KAAsBvK,MAC5C+J,EAAc/J,KAAK+J,YACzBA,EAAYS,IAAIF,GAChBtK,KAAKqK,qBAAoBI,MAAeP,EAAQI,GAC5CtK,KAAKqK,oBAAsBC,GAC3BP,EAAYS,IAAIxK,KAAKqK,mBAG7BK,YACI,MAAQL,qBAAsBrK,OACzBqK,GAAqBA,EAAkBM,SACxC3E,MAAM0E,YAEV1K,KAAK4H,cAETgD,eACI5K,KAAKqK,uBAAoBpH,EAE7B4H,iBACI7K,KAAKqK,uBAAoBpH,EACrBjD,KAAK8K,WACL9E,MAAM0E,YAGdK,WAAWC,GACPhL,KAAK+J,YAAY3E,KAAK4F","names":["scheduler","schedule","taskFn","delay","id","setTimeout","clearTimeout","scheduleBeforeRender","window","requestAnimationFrame","cancelAnimationFrame","_matches","node","selectors","defaultIndex","matchingIndex","nodeType","Node","ELEMENT_NODE","isElement","some","selector","i","el","elProto","Element","prototype","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","call","constructor","component","injector","this","componentFactory","get","ComponentFactoryResolver","resolveComponentFactory","create","ComponentNgElementStrategy","eventEmitters","ReplaySubject","events","pipe","switchMap","emitters","merge","componentRef","viewChangeDetectorRef","inputChanges","hasInputChanges","implementsOnChanges","scheduledChangeDetectionFn","scheduledDestroyFn","initialInputValues","Map","unchangedInputs","Set","inputs","map","propName","ngZone","NgZone","elementZone","Zone","run","current","connect","element","runInZone","initializeComponent","disconnect","destroy","DESTROY_DELAY","getInputValue","property","instance","setInputValue","value","value1","value2","strictEquals","undefined","has","recordInputChange","delete","scheduleDetectChanges","set","childInjector","Injector","providers","parent","projectableNodes","host","ngContentSelectors","nodes","childNodes","wildcardIndex","ii","length","ngContentIndex","findMatchingIndex","push","extractProjectableNodes","ChangeDetectorRef","ngOnChanges","initializeInputs","initializeOutputs","detectChanges","ApplicationRef","attachView","hostView","forEach","clear","outputs","templateName","name","next","callNgOnChanges","markViewForCheck","markForCheck","currentValue","pendingChange","isFirstChange","previousValue","SimpleChange","changeDetectorRef","fn","HTMLElement","super","arguments","ngElementEventsSubscription","config","getComponentInputs","strategyFactory","ComponentNgElementStrategyFactory","attributeToPropertyInputs","input","replace","char","toLowerCase","camelToDashCase","getDefaultAttributeToPropertyInputs","NgElement","ngElementStrategy","_ngElementStrategy","strategy","hasOwnProperty","attributeChangedCallback","attrName","oldValue","newValue","namespace","connectedCallback","subscribedToEvents","subscribeToEvents","disconnectedCallback","unsubscribe","subscribe","e","customEvent","doc","detail","CustomEvent","event","createEvent","initCustomEvent","bubbles","cancelable","createCustomEvent","ownerDocument","dispatchEvent","NgElementImpl","observedAttributes","Object","keys","defineProperty","configurable","enumerable","VERSION","Version","project","resultSelector","source","a","from","b","lift","SwitchMapOperator","subscriber","SwitchMapSubscriber","SimpleOuterSubscriber","destination","index","_next","result","error","_innerSub","innerSubscription","innerSubscriber","SimpleInnerSubscriber","add","innerSubscribe","_complete","closed","_unsubscribe","notifyComplete","isStopped","notifyNext","innerValue"],"sources":["../node_modules/@angular/elements/__ivy_ngcc__/fesm2015/elements.js","../node_modules/rxjs/_esm2015/internal/operators/switchMap.js"],"sourcesContent":["/**\n * @license Angular v12.2.17\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ComponentFactoryResolver, NgZone, Injector, ChangeDetectorRef, ApplicationRef, SimpleChange, Version } from '@angular/core';\nimport { ReplaySubject, merge } from 'rxjs';\nimport { switchMap, map } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provide methods for scheduling the execution of a callback.\n */\nconst scheduler = {\n /**\n * Schedule a callback to be called after some delay.\n *\n * Returns a function that when executed will cancel the scheduled function.\n */\n schedule(taskFn, delay) {\n const id = setTimeout(taskFn, delay);\n return () => clearTimeout(id);\n },\n /**\n * Schedule a callback to be called before the next render.\n * (If `window.requestAnimationFrame()` is not available, use `scheduler.schedule()` instead.)\n *\n * Returns a function that when executed will cancel the scheduled function.\n */\n scheduleBeforeRender(taskFn) {\n // TODO(gkalpak): Implement a better way of accessing `requestAnimationFrame()`\n // (e.g. accounting for vendor prefix, SSR-compatibility, etc).\n if (typeof window === 'undefined') {\n // For SSR just schedule immediately.\n return scheduler.schedule(taskFn, 0);\n }\n if (typeof window.requestAnimationFrame === 'undefined') {\n const frameMs = 16;\n return scheduler.schedule(taskFn, frameMs);\n }\n const id = window.requestAnimationFrame(taskFn);\n return () => window.cancelAnimationFrame(id);\n },\n};\n/**\n * Convert a camelCased string to kebab-cased.\n */\nfunction camelToDashCase(input) {\n return input.replace(/[A-Z]/g, char => `-${char.toLowerCase()}`);\n}\n/**\n * Create a `CustomEvent` (even on browsers where `CustomEvent` is not a constructor).\n */\nfunction createCustomEvent(doc, name, detail) {\n const bubbles = false;\n const cancelable = false;\n // On IE11, `CustomEvent` is not a constructor.\n if (typeof CustomEvent !== 'function') {\n const event = doc.createEvent('CustomEvent');\n event.initCustomEvent(name, bubbles, cancelable, detail);\n return event;\n }\n return new CustomEvent(name, { bubbles, cancelable, detail });\n}\n/**\n * Check whether the input is an `Element`.\n */\nfunction isElement(node) {\n return !!node && node.nodeType === Node.ELEMENT_NODE;\n}\n/**\n * Check whether the input is a function.\n */\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n/**\n * Convert a kebab-cased string to camelCased.\n */\nfunction kebabToCamelCase(input) {\n return input.replace(/-([a-z\\d])/g, (_, char) => char.toUpperCase());\n}\nlet _matches;\n/**\n * Check whether an `Element` matches a CSS selector.\n * NOTE: this is duplicated from @angular/upgrade, and can\n * be consolidated in the future\n */\nfunction matchesSelector(el, selector) {\n if (!_matches) {\n const elProto = Element.prototype;\n _matches = elProto.matches || elProto.matchesSelector || elProto.mozMatchesSelector ||\n elProto.msMatchesSelector || elProto.oMatchesSelector || elProto.webkitMatchesSelector;\n }\n return el.nodeType === Node.ELEMENT_NODE ? _matches.call(el, selector) : false;\n}\n/**\n * Test two values for strict equality, accounting for the fact that `NaN !== NaN`.\n */\nfunction strictEquals(value1, value2) {\n return value1 === value2 || (value1 !== value1 && value2 !== value2);\n}\n/** Gets a map of default set of attributes to observe and the properties they affect. */\nfunction getDefaultAttributeToPropertyInputs(inputs) {\n const attributeToPropertyInputs = {};\n inputs.forEach(({ propName, templateName }) => {\n attributeToPropertyInputs[camelToDashCase(templateName)] = propName;\n });\n return attributeToPropertyInputs;\n}\n/**\n * Gets a component's set of inputs. Uses the injector to get the component factory where the inputs\n * are defined.\n */\nfunction getComponentInputs(component, injector) {\n const componentFactoryResolver = injector.get(ComponentFactoryResolver);\n const componentFactory = componentFactoryResolver.resolveComponentFactory(component);\n return componentFactory.inputs;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction extractProjectableNodes(host, ngContentSelectors) {\n const nodes = host.childNodes;\n const projectableNodes = ngContentSelectors.map(() => []);\n let wildcardIndex = -1;\n ngContentSelectors.some((selector, i) => {\n if (selector === '*') {\n wildcardIndex = i;\n return true;\n }\n return false;\n });\n for (let i = 0, ii = nodes.length; i < ii; ++i) {\n const node = nodes[i];\n const ngContentIndex = findMatchingIndex(node, ngContentSelectors, wildcardIndex);\n if (ngContentIndex !== -1) {\n projectableNodes[ngContentIndex].push(node);\n }\n }\n return projectableNodes;\n}\nfunction findMatchingIndex(node, selectors, defaultIndex) {\n let matchingIndex = defaultIndex;\n if (isElement(node)) {\n selectors.some((selector, i) => {\n if ((selector !== '*') && matchesSelector(node, selector)) {\n matchingIndex = i;\n return true;\n }\n return false;\n });\n }\n return matchingIndex;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Time in milliseconds to wait before destroying the component ref when disconnected. */\nconst DESTROY_DELAY = 10;\n/**\n * Factory that creates new ComponentNgElementStrategy instance. Gets the component factory with the\n * constructor's injector's factory resolver and passes that factory to each strategy.\n *\n * @publicApi\n */\nclass ComponentNgElementStrategyFactory {\n constructor(component, injector) {\n this.componentFactory =\n injector.get(ComponentFactoryResolver).resolveComponentFactory(component);\n }\n create(injector) {\n return new ComponentNgElementStrategy(this.componentFactory, injector);\n }\n}\n/**\n * Creates and destroys a component ref using a component factory and handles change detection\n * in response to input changes.\n *\n * @publicApi\n */\nclass ComponentNgElementStrategy {\n constructor(componentFactory, injector) {\n this.componentFactory = componentFactory;\n this.injector = injector;\n // Subject of `NgElementStrategyEvent` observables corresponding to the component's outputs.\n this.eventEmitters = new ReplaySubject(1);\n /** Merged stream of the component's output events. */\n this.events = this.eventEmitters.pipe(switchMap(emitters => merge(...emitters)));\n /** Reference to the component that was created on connect. */\n this.componentRef = null;\n /** Reference to the component view's `ChangeDetectorRef`. */\n this.viewChangeDetectorRef = null;\n /**\n * Changes that have been made to component inputs since the last change detection run.\n * (NOTE: These are only recorded if the component implements the `OnChanges` interface.)\n */\n this.inputChanges = null;\n /** Whether changes have been made to component inputs since the last change detection run. */\n this.hasInputChanges = false;\n /** Whether the created component implements the `OnChanges` interface. */\n this.implementsOnChanges = false;\n /** Whether a change detection has been scheduled to run on the component. */\n this.scheduledChangeDetectionFn = null;\n /** Callback function that when called will cancel a scheduled destruction on the component. */\n this.scheduledDestroyFn = null;\n /** Initial input values that were set before the component was created. */\n this.initialInputValues = new Map();\n /**\n * Set of component inputs that have not yet changed, i.e. for which `recordInputChange()` has not\n * fired.\n * (This helps detect the first change of an input, even if it is explicitly set to `undefined`.)\n */\n this.unchangedInputs = new Set(this.componentFactory.inputs.map(({ propName }) => propName));\n /** Service for setting zone context. */\n this.ngZone = this.injector.get(NgZone);\n /** The zone the element was created in or `null` if Zone.js is not loaded. */\n this.elementZone = (typeof Zone === 'undefined') ? null : this.ngZone.run(() => Zone.current);\n }\n /**\n * Initializes a new component if one has not yet been created and cancels any scheduled\n * destruction.\n */\n connect(element) {\n this.runInZone(() => {\n // If the element is marked to be destroyed, cancel the task since the component was\n // reconnected\n if (this.scheduledDestroyFn !== null) {\n this.scheduledDestroyFn();\n this.scheduledDestroyFn = null;\n return;\n }\n if (this.componentRef === null) {\n this.initializeComponent(element);\n }\n });\n }\n /**\n * Schedules the component to be destroyed after some small delay in case the element is just\n * being moved across the DOM.\n */\n disconnect() {\n this.runInZone(() => {\n // Return if there is no componentRef or the component is already scheduled for destruction\n if (this.componentRef === null || this.scheduledDestroyFn !== null) {\n return;\n }\n // Schedule the component to be destroyed after a small timeout in case it is being\n // moved elsewhere in the DOM\n this.scheduledDestroyFn = scheduler.schedule(() => {\n if (this.componentRef !== null) {\n this.componentRef.destroy();\n this.componentRef = null;\n this.viewChangeDetectorRef = null;\n }\n }, DESTROY_DELAY);\n });\n }\n /**\n * Returns the component property value. If the component has not yet been created, the value is\n * retrieved from the cached initialization values.\n */\n getInputValue(property) {\n return this.runInZone(() => {\n if (this.componentRef === null) {\n return this.initialInputValues.get(property);\n }\n return this.componentRef.instance[property];\n });\n }\n /**\n * Sets the input value for the property. If the component has not yet been created, the value is\n * cached and set when the component is created.\n */\n setInputValue(property, value) {\n this.runInZone(() => {\n if (this.componentRef === null) {\n this.initialInputValues.set(property, value);\n return;\n }\n // Ignore the value if it is strictly equal to the current value, except if it is `undefined`\n // and this is the first change to the value (because an explicit `undefined` _is_ strictly\n // equal to not having a value set at all, but we still need to record this as a change).\n if (strictEquals(value, this.getInputValue(property)) &&\n !((value === undefined) && this.unchangedInputs.has(property))) {\n return;\n }\n // Record the changed value and update internal state to reflect the fact that this input has\n // changed.\n this.recordInputChange(property, value);\n this.unchangedInputs.delete(property);\n this.hasInputChanges = true;\n // Update the component instance and schedule change detection.\n this.componentRef.instance[property] = value;\n this.scheduleDetectChanges();\n });\n }\n /**\n * Creates a new component through the component factory with the provided element host and\n * sets up its initial inputs, listens for outputs changes, and runs an initial change detection.\n */\n initializeComponent(element) {\n const childInjector = Injector.create({ providers: [], parent: this.injector });\n const projectableNodes = extractProjectableNodes(element, this.componentFactory.ngContentSelectors);\n this.componentRef = this.componentFactory.create(childInjector, projectableNodes, element);\n this.viewChangeDetectorRef = this.componentRef.injector.get(ChangeDetectorRef);\n this.implementsOnChanges = isFunction(this.componentRef.instance.ngOnChanges);\n this.initializeInputs();\n this.initializeOutputs(this.componentRef);\n this.detectChanges();\n const applicationRef = this.injector.get(ApplicationRef);\n applicationRef.attachView(this.componentRef.hostView);\n }\n /** Set any stored initial inputs on the component's properties. */\n initializeInputs() {\n this.componentFactory.inputs.forEach(({ propName }) => {\n if (this.initialInputValues.has(propName)) {\n // Call `setInputValue()` now that the component has been instantiated to update its\n // properties and fire `ngOnChanges()`.\n this.setInputValue(propName, this.initialInputValues.get(propName));\n }\n });\n this.initialInputValues.clear();\n }\n /** Sets up listeners for the component's outputs so that the events stream emits the events. */\n initializeOutputs(componentRef) {\n const eventEmitters = this.componentFactory.outputs.map(({ propName, templateName }) => {\n const emitter = componentRef.instance[propName];\n return emitter.pipe(map(value => ({ name: templateName, value })));\n });\n this.eventEmitters.next(eventEmitters);\n }\n /** Calls ngOnChanges with all the inputs that have changed since the last call. */\n callNgOnChanges(componentRef) {\n if (!this.implementsOnChanges || this.inputChanges === null) {\n return;\n }\n // Cache the changes and set inputChanges to null to capture any changes that might occur\n // during ngOnChanges.\n const inputChanges = this.inputChanges;\n this.inputChanges = null;\n componentRef.instance.ngOnChanges(inputChanges);\n }\n /**\n * Marks the component view for check, if necessary.\n * (NOTE: This is required when the `ChangeDetectionStrategy` is set to `OnPush`.)\n */\n markViewForCheck(viewChangeDetectorRef) {\n if (this.hasInputChanges) {\n this.hasInputChanges = false;\n viewChangeDetectorRef.markForCheck();\n }\n }\n /**\n * Schedules change detection to run on the component.\n * Ignores subsequent calls if already scheduled.\n */\n scheduleDetectChanges() {\n if (this.scheduledChangeDetectionFn) {\n return;\n }\n this.scheduledChangeDetectionFn = scheduler.scheduleBeforeRender(() => {\n this.scheduledChangeDetectionFn = null;\n this.detectChanges();\n });\n }\n /**\n * Records input changes so that the component receives SimpleChanges in its onChanges function.\n */\n recordInputChange(property, currentValue) {\n // Do not record the change if the component does not implement `OnChanges`.\n if (!this.implementsOnChanges) {\n return;\n }\n if (this.inputChanges === null) {\n this.inputChanges = {};\n }\n // If there already is a change, modify the current value to match but leave the values for\n // `previousValue` and `isFirstChange`.\n const pendingChange = this.inputChanges[property];\n if (pendingChange) {\n pendingChange.currentValue = currentValue;\n return;\n }\n const isFirstChange = this.unchangedInputs.has(property);\n const previousValue = isFirstChange ? undefined : this.getInputValue(property);\n this.inputChanges[property] = new SimpleChange(previousValue, currentValue, isFirstChange);\n }\n /** Runs change detection on the component. */\n detectChanges() {\n if (this.componentRef === null) {\n return;\n }\n this.callNgOnChanges(this.componentRef);\n this.markViewForCheck(this.viewChangeDetectorRef);\n this.componentRef.changeDetectorRef.detectChanges();\n }\n /** Runs in the angular zone, if present. */\n runInZone(fn) {\n return (this.elementZone && Zone.current !== this.elementZone) ? this.ngZone.run(fn) : fn();\n }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Implements the functionality needed for a custom element.\n *\n * @publicApi\n */\nclass NgElement extends HTMLElement {\n constructor() {\n super(...arguments);\n /**\n * A subscription to change, connect, and disconnect events in the custom element.\n */\n this.ngElementEventsSubscription = null;\n }\n}\n/**\n * @description Creates a custom element class based on an Angular component.\n *\n * Builds a class that encapsulates the functionality of the provided component and\n * uses the configuration information to provide more context to the class.\n * Takes the component factory's inputs and outputs to convert them to the proper\n * custom element API and add hooks to input changes.\n *\n * The configuration's injector is the initial injector set on the class,\n * and used by default for each created instance.This behavior can be overridden with the\n * static property to affect all newly created instances, or as a constructor argument for\n * one-off creations.\n *\n * @see [Angular Elements Overview](guide/elements \"Turning Angular components into custom elements\")\n *\n * @param component The component to transform.\n * @param config A configuration that provides initialization information to the created class.\n * @returns The custom-element construction class, which can be registered with\n * a browser's `CustomElementRegistry`.\n *\n * @publicApi\n */\nfunction createCustomElement(component, config) {\n const inputs = getComponentInputs(component, config.injector);\n const strategyFactory = config.strategyFactory || new ComponentNgElementStrategyFactory(component, config.injector);\n const attributeToPropertyInputs = getDefaultAttributeToPropertyInputs(inputs);\n class NgElementImpl extends NgElement {\n constructor(injector) {\n super();\n this.injector = injector;\n }\n get ngElementStrategy() {\n // NOTE:\n // Some polyfills (e.g. `document-register-element`) do not call the constructor, therefore\n // it is not safe to set `ngElementStrategy` in the constructor and assume it will be\n // available inside the methods.\n //\n // TODO(andrewseguin): Add e2e tests that cover cases where the constructor isn't called. For\n // now this is tested using a Google internal test suite.\n if (!this._ngElementStrategy) {\n const strategy = this._ngElementStrategy =\n strategyFactory.create(this.injector || config.injector);\n // Re-apply pre-existing input values (set as properties on the element) through the\n // strategy.\n inputs.forEach(({ propName }) => {\n if (!this.hasOwnProperty(propName)) {\n // No pre-existing value for `propName`.\n return;\n }\n // Delete the property from the instance and re-apply it through the strategy.\n const value = this[propName];\n delete this[propName];\n strategy.setInputValue(propName, value);\n });\n }\n return this._ngElementStrategy;\n }\n attributeChangedCallback(attrName, oldValue, newValue, namespace) {\n const propName = attributeToPropertyInputs[attrName];\n this.ngElementStrategy.setInputValue(propName, newValue);\n }\n connectedCallback() {\n // For historical reasons, some strategies may not have initialized the `events` property\n // until after `connect()` is run. Subscribe to `events` if it is available before running\n // `connect()` (in order to capture events emitted during initialization), otherwise subscribe\n // afterwards.\n //\n // TODO: Consider deprecating/removing the post-connect subscription in a future major version\n // (e.g. v11).\n let subscribedToEvents = false;\n if (this.ngElementStrategy.events) {\n // `events` are already available: Subscribe to it asap.\n this.subscribeToEvents();\n subscribedToEvents = true;\n }\n this.ngElementStrategy.connect(this);\n if (!subscribedToEvents) {\n // `events` were not initialized before running `connect()`: Subscribe to them now.\n // The events emitted during the component initialization have been missed, but at least\n // future events will be captured.\n this.subscribeToEvents();\n }\n }\n disconnectedCallback() {\n // Not using `this.ngElementStrategy` to avoid unnecessarily creating the `NgElementStrategy`.\n if (this._ngElementStrategy) {\n this._ngElementStrategy.disconnect();\n }\n if (this.ngElementEventsSubscription) {\n this.ngElementEventsSubscription.unsubscribe();\n this.ngElementEventsSubscription = null;\n }\n }\n subscribeToEvents() {\n // Listen for events from the strategy and dispatch them as custom events.\n this.ngElementEventsSubscription = this.ngElementStrategy.events.subscribe(e => {\n const customEvent = createCustomEvent(this.ownerDocument, e.name, e.value);\n this.dispatchEvent(customEvent);\n });\n }\n }\n // Work around a bug in closure typed optimizations(b/79557487) where it is not honoring static\n // field externs. So using quoted access to explicitly prevent renaming.\n NgElementImpl['observedAttributes'] = Object.keys(attributeToPropertyInputs);\n // Add getters and setters to the prototype for each property input.\n inputs.forEach(({ propName }) => {\n Object.defineProperty(NgElementImpl.prototype, propName, {\n get() {\n return this.ngElementStrategy.getInputValue(propName);\n },\n set(newValue) {\n this.ngElementStrategy.setInputValue(propName, newValue);\n },\n configurable: true,\n enumerable: true,\n });\n });\n return NgElementImpl;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nconst VERSION = new Version('12.2.17');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { NgElement, VERSION, createCustomElement };\n\n","import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return (source) => source.pipe(switchMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n }\n return (source) => source.lift(new SwitchMapOperator(project));\n}\nclass SwitchMapOperator {\n constructor(project) {\n this.project = project;\n }\n call(subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n }\n}\nclass SwitchMapSubscriber extends SimpleOuterSubscriber {\n constructor(destination, project) {\n super(destination);\n this.project = project;\n this.index = 0;\n }\n _next(value) {\n let result;\n const index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (error) {\n this.destination.error(error);\n return;\n }\n this._innerSub(result);\n }\n _innerSub(result) {\n const innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n const innerSubscriber = new SimpleInnerSubscriber(this);\n const destination = this.destination;\n destination.add(innerSubscriber);\n this.innerSubscription = innerSubscribe(result, innerSubscriber);\n if (this.innerSubscription !== innerSubscriber) {\n destination.add(this.innerSubscription);\n }\n }\n _complete() {\n const { innerSubscription } = this;\n if (!innerSubscription || innerSubscription.closed) {\n super._complete();\n }\n this.unsubscribe();\n }\n _unsubscribe() {\n this.innerSubscription = undefined;\n }\n notifyComplete() {\n this.innerSubscription = undefined;\n if (this.isStopped) {\n super._complete();\n }\n }\n notifyNext(innerValue) {\n this.destination.next(innerValue);\n }\n}\n"],"sourceRoot":"webpack:///","file":"177.js"}