{"version":3,"file":"chunk-nr34p3du.js","sources":["node_modules/@rx-angular/cdk/fesm2022/cdk-template.mjs"],"sourcesContent":["import { onStrategy, strategyHandling } from '@rx-angular/cdk/render-strategies';\nimport { of, BehaviorSubject, concat, combineLatest, ReplaySubject, EMPTY, merge } from 'rxjs';\nimport { switchMap, ignoreElements, catchError, distinctUntilChanged, map, tap, withLatestFrom } from 'rxjs/operators';\n\n/**\n * @internal\n * creates an embeddedViewRef\n *\n * @param viewContainerRef\n * @param templateRef\n * @param context\n * @param index\n * @return EmbeddedViewRef<C>\n */\nfunction createEmbeddedView(viewContainerRef, templateRef, context, index = 0) {\n  const view = viewContainerRef.createEmbeddedView(templateRef, context, index);\n  view.detectChanges();\n  return view;\n}\n/**\n * @internal\n *\n * A factory function returning an object to handle `TemplateRef`'s.\n * You can add and get a `TemplateRef`.\n *\n */\nfunction templateHandling(viewContainerRef) {\n  const templateCache = new Map();\n  const get$ = name => {\n    return templateCache.get(name) || of(undefined);\n  };\n  const get = name => {\n    let ref;\n    const templatRef$ = get$(name);\n    if (templatRef$) {\n      const sub = templatRef$.subscribe(r => ref = r);\n      sub.unsubscribe();\n    }\n    return ref;\n  };\n  return {\n    add(name, templateRef) {\n      assertTemplate(name, templateRef);\n      if (!templateCache.has(name)) {\n        templateCache.set(name, new BehaviorSubject(templateRef));\n      } else {\n        templateCache.get(name).next(templateRef);\n      }\n    },\n    get$,\n    get,\n    createEmbeddedView: (name, context) => createEmbeddedView(viewContainerRef, get(name), context)\n  };\n  //\n  function assertTemplate(property, templateRef) {\n    const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n    if (!isTemplateRefOrNull) {\n      throw new Error(`${property} must be a TemplateRef, but received ${typeof templateRef}`);\n    }\n    return isTemplateRefOrNull;\n  }\n}\n/**\n * @internal\n *\n * A side effect operator similar to `tap` but with a static internal logic.\n * It calls detect changes on the 'VirtualParent' and the injectingViewCdRef.\n *\n * @param injectingViewCdRef\n * @param strategy\n * @param notifyNeeded\n * @param ngZone\n */\nfunction notifyAllParentsIfNeeded(injectingViewCdRef, strategy, notifyNeeded, ngZone) {\n  return o$ => o$.pipe(switchMap(v => {\n    const notifyParent = notifyNeeded();\n    if (!notifyParent) {\n      return of(v);\n    }\n    return concat(of(v), onStrategy(injectingViewCdRef, strategy, (_v, work, options) => {\n      /*console.log(\n       'notifyAllParentsIfNeeded injectingView',\n       (injectingViewCdRef as any).context\n       );*/\n      work(injectingViewCdRef, options.scope);\n    }, {\n      scope: injectingViewCdRef.context || injectingViewCdRef,\n      ngZone\n    }).pipe(ignoreElements()));\n  }));\n}\n\n/**\n * @internal\n *\n * Factory that returns a `ListTemplateManager` for the passed params.\n *\n * @param templateSettings\n */\nfunction getTemplateHandler(templateSettings) {\n  const {\n    viewContainerRef,\n    initialTemplateRef,\n    createViewContext,\n    updateViewContext\n  } = templateSettings;\n  return {\n    updateUnchangedContext,\n    insertView,\n    moveView,\n    removeView,\n    getListChanges,\n    updateView\n  };\n  // =====\n  function updateUnchangedContext(item, index, count) {\n    const view = viewContainerRef.get(index);\n    updateViewContext(item, view, {\n      count,\n      index\n    });\n    view.detectChanges();\n  }\n  function moveView(oldIndex, item, index, count) {\n    const oldView = viewContainerRef.get(oldIndex);\n    const view = viewContainerRef.move(oldView, index);\n    updateViewContext(item, view, {\n      count,\n      index\n    });\n    view.detectChanges();\n  }\n  function updateView(item, index, count) {\n    const view = viewContainerRef.get(index);\n    updateViewContext(item, view, {\n      count,\n      index\n    });\n    view.detectChanges();\n  }\n  function removeView(index) {\n    return viewContainerRef.remove(index);\n  }\n  function insertView(item, index, count) {\n    createEmbeddedView(viewContainerRef, initialTemplateRef, createViewContext(item, {\n      count,\n      index\n    }), index);\n  }\n}\n/**\n * @internal\n *\n * @param changes\n * @param items\n */\nfunction getListChanges(changes, items) {\n  const changedIdxs = new Set();\n  const changesArr = [];\n  let notifyParent = false;\n  changes.forEachOperation((record, adjustedPreviousIndex, currentIndex) => {\n    const item = record.item;\n    if (record.previousIndex == null) {\n      // insert\n      changesArr.push(getInsertChange(item, currentIndex === null ? undefined : currentIndex));\n      changedIdxs.add(item);\n      notifyParent = true;\n    } else if (currentIndex == null) {\n      // remove\n      changesArr.push(getRemoveChange(item, adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex));\n      notifyParent = true;\n    } else if (adjustedPreviousIndex !== null) {\n      // move\n      changesArr.push(getMoveChange(item, currentIndex, adjustedPreviousIndex));\n      changedIdxs.add(item);\n      notifyParent = true;\n    }\n  });\n  changes.forEachIdentityChange(record => {\n    const item = record.item;\n    if (!changedIdxs.has(item)) {\n      changesArr.push(getUpdateChange(item, record.currentIndex));\n      changedIdxs.add(item);\n    }\n  });\n  items.forEach((item, index) => {\n    if (!changedIdxs.has(item)) {\n      changesArr.push(getUnchangedChange(item, index));\n    }\n  });\n  return [changesArr, notifyParent];\n  // ==========\n  function getMoveChange(item, currentIndex, adjustedPreviousIndex) {\n    return [2 /* RxListTemplateChangeType.move */, [item, currentIndex, adjustedPreviousIndex]];\n  }\n  function getUpdateChange(item, currentIndex) {\n    return [3 /* RxListTemplateChangeType.update */, [item, currentIndex]];\n  }\n  function getUnchangedChange(item, index) {\n    return [4 /* RxListTemplateChangeType.context */, [item, index]];\n  }\n  function getInsertChange(item, currentIndex) {\n    return [0 /* RxListTemplateChangeType.insert */, [item, currentIndex === null ? undefined : currentIndex]];\n  }\n  function getRemoveChange(item, adjustedPreviousIndex) {\n    return [1 /* RxListTemplateChangeType.remove */, [item, adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex]];\n  }\n}\n\n/** @internal **/\nfunction isRxRenderError(e) {\n  return e != null && Array.isArray(e) && e.length === 2 && e[0] instanceof Error;\n}\n/** @internal **/\nfunction createErrorHandler(_handler) {\n  const _handleError = _handler ? e => _handler.handleError(e) : console.error;\n  return {\n    handleError: error => {\n      if (isRxRenderError(error)) {\n        _handleError(error[0]);\n        console.error('additionalErrorContext', error[1]);\n      } else {\n        _handleError(error);\n      }\n    }\n  };\n}\n/** @internal **/\nfunction toRenderError(e, context) {\n  return [e, context];\n}\nfunction createListTemplateManager(config) {\n  const {\n    templateSettings,\n    renderSettings,\n    trackBy,\n    iterableDiffers\n  } = config;\n  const {\n    defaultStrategyName,\n    strategies,\n    cdRef: injectingViewCdRef,\n    patchZone,\n    parent\n  } = renderSettings;\n  const errorHandler = createErrorHandler(renderSettings.errorHandler);\n  const ngZone = patchZone ? patchZone : undefined;\n  const strategyHandling$ = strategyHandling(defaultStrategyName, strategies);\n  let _differ;\n  function getDiffer(values) {\n    if (_differ) {\n      return _differ;\n    }\n    return values ? _differ = iterableDiffers.find(values).create(trackBy) : null;\n  }\n  //               type,  context\n  /* TODO (regarding createView): this is currently not in use. for the list-manager this would mean to provide\n   functions for not only create. developers than should have to provide create, move, remove,... the whole thing.\n   i don't know if this is the right decision for a first RC */\n  const listViewHandler = getTemplateHandler({\n    ...templateSettings,\n    initialTemplateRef: templateSettings.templateRef\n  });\n  const viewContainerRef = templateSettings.viewContainerRef;\n  let notifyParent = false;\n  let changesArr;\n  let partiallyFinished = false;\n  return {\n    nextStrategy(nextConfig) {\n      strategyHandling$.next(nextConfig);\n    },\n    render(values$) {\n      return values$.pipe(render());\n    }\n  };\n  function handleError() {\n    return o$ => o$.pipe(catchError(err => {\n      partiallyFinished = false;\n      errorHandler.handleError(err);\n      return of(null);\n    }));\n  }\n  function render() {\n    return o$ => combineLatest([o$, strategyHandling$.strategy$.pipe(distinctUntilChanged())]).pipe(map(([iterable, strategy]) => {\n      const differ = getDiffer(iterable);\n      let changes;\n      if (differ) {\n        if (partiallyFinished) {\n          const currentIterable = [];\n          for (let i = 0, ilen = viewContainerRef.length; i < ilen; i++) {\n            const viewRef = viewContainerRef.get(i);\n            currentIterable[i] = viewRef.context.$implicit;\n          }\n          differ.diff(currentIterable);\n        }\n        changes = differ.diff(iterable);\n      }\n      return {\n        changes,\n        iterable,\n        strategy\n      };\n    }),\n    // Cancel old renders\n    switchMap(({\n      changes,\n      iterable,\n      strategy\n    }) => {\n      if (!changes) {\n        return of([]);\n      }\n      const values = iterable || [];\n      // TODO: we might want to treat other iterables in a more performant way than Array.from()\n      const items = Array.isArray(values) ? values : Array.from(iterable);\n      const listChanges = listViewHandler.getListChanges(changes, items);\n      changesArr = listChanges[0];\n      const insertedOrRemoved = listChanges[1];\n      const applyChanges$ = getObservablesFromChangesArray(changesArr, strategy, items.length);\n      partiallyFinished = true;\n      notifyParent = insertedOrRemoved && parent;\n      return combineLatest(applyChanges$.length > 0 ? applyChanges$ : [of(null)]).pipe(tap(() => partiallyFinished = false), notifyAllParentsIfNeeded(injectingViewCdRef, strategy, () => notifyParent, ngZone), handleError(), map(() => iterable));\n    }), handleError());\n  }\n  /**\n   * @internal\n   *\n   * returns an array of streams which process all of the view updates needed to reflect the latest diff to the\n   * viewContainer.\n   * I\n   *\n   * @param changes\n   * @param strategy\n   * @param count\n   */\n  function getObservablesFromChangesArray(changes, strategy, count) {\n    return changes.length > 0 ? changes.map(change => {\n      const payload = change[1];\n      return onStrategy(change[0], strategy, type => {\n        switch (type) {\n          case 0 /* RxListTemplateChangeType.insert */:\n            listViewHandler.insertView(payload[0], payload[1], count);\n            break;\n          case 2 /* RxListTemplateChangeType.move */:\n            listViewHandler.moveView(payload[2], payload[0], payload[1], count);\n            break;\n          case 1 /* RxListTemplateChangeType.remove */:\n            listViewHandler.removeView(payload[1]);\n            break;\n          case 3 /* RxListTemplateChangeType.update */:\n            listViewHandler.updateView(payload[0], payload[1], count);\n            break;\n          case 4 /* RxListTemplateChangeType.context */:\n            listViewHandler.updateUnchangedContext(payload[0], payload[1], count);\n            break;\n        }\n      }, {\n        ngZone\n      });\n    }) : [of(null)];\n  }\n}\nconst computeFirst = ({\n  count,\n  index\n}) => index === 0;\nconst computeLast = ({\n  count,\n  index\n}) => index === count - 1;\nconst computeEven = ({\n  count,\n  index\n}) => index % 2 === 0;\nclass RxDefaultListViewContext {\n  _item = new ReplaySubject(1);\n  item$ = this._item.asObservable();\n  _$implicit;\n  _$complete;\n  _$error;\n  _$suspense;\n  _context$ = new BehaviorSubject({\n    index: -1,\n    count: -1\n  });\n  set $implicit($implicit) {\n    this._$implicit = $implicit;\n    this._item.next($implicit);\n  }\n  get $implicit() {\n    return this._$implicit;\n  }\n  get $complete() {\n    return this._$complete;\n  }\n  get $error() {\n    return this._$error;\n  }\n  get $suspense() {\n    return this._$suspense;\n  }\n  get index() {\n    return this._context$.getValue().index;\n  }\n  get count() {\n    return this._context$.getValue().count;\n  }\n  get first() {\n    return computeFirst(this._context$.getValue());\n  }\n  get last() {\n    return computeLast(this._context$.getValue());\n  }\n  get even() {\n    return computeEven(this._context$.getValue());\n  }\n  get odd() {\n    return !this.even;\n  }\n  get index$() {\n    return this._context$.pipe(map(c => c.index), distinctUntilChanged());\n  }\n  get count$() {\n    return this._context$.pipe(map(s => s.count), distinctUntilChanged());\n  }\n  get first$() {\n    return this._context$.pipe(map(computeFirst), distinctUntilChanged());\n  }\n  get last$() {\n    return this._context$.pipe(map(computeLast), distinctUntilChanged());\n  }\n  get even$() {\n    return this._context$.pipe(map(computeEven), distinctUntilChanged());\n  }\n  get odd$() {\n    return this.even$.pipe(map(even => !even));\n  }\n  constructor(item, customProps) {\n    this.$implicit = item;\n    if (customProps) {\n      this.updateContext(customProps);\n    }\n  }\n  updateContext(newProps) {\n    this._context$.next({\n      ...this._context$.getValue(),\n      ...newProps\n    });\n  }\n  select = props => {\n    return this.item$.pipe(map(r => props.reduce((acc, key) => acc?.[key], r)));\n  };\n}\nvar RxBaseTemplateNames = /*#__PURE__*/function (RxBaseTemplateNames) {\n  RxBaseTemplateNames[\"error\"] = \"errorTpl\";\n  RxBaseTemplateNames[\"complete\"] = \"completeTpl\";\n  RxBaseTemplateNames[\"suspense\"] = \"suspenseTpl\";\n  return RxBaseTemplateNames;\n}(RxBaseTemplateNames || {});\n/**\n * @internal\n *\n * A factory function that returns a map of projections to turn a notification of a Observable (next, error, complete)\n *\n * @param customNextContext - projection function to provide custom properties as well as override existing\n */\nfunction notificationKindToViewContext(customNextContext) {\n  // @TODO rethink overrides\n  return {\n    suspense: notification => {\n      const $implicit = notification.value;\n      return {\n        $implicit,\n        suspense: true,\n        error: false,\n        complete: false,\n        ...customNextContext($implicit)\n      };\n    },\n    next: notification => {\n      const $implicit = notification.value;\n      return {\n        $implicit,\n        suspense: false,\n        error: false,\n        complete: false,\n        ...customNextContext($implicit)\n      };\n    },\n    error: notification => {\n      const $implicit = notification.value;\n      return {\n        $implicit,\n        complete: false,\n        error: notification.error || true,\n        suspense: false,\n        ...customNextContext($implicit)\n      };\n    },\n    complete: notification => {\n      const $implicit = notification.value;\n      return {\n        $implicit,\n        error: false,\n        complete: true,\n        suspense: false,\n        ...customNextContext($implicit)\n      };\n    }\n  };\n}\nfunction createTemplateManager(config) {\n  const {\n    renderSettings,\n    notificationToTemplateName,\n    templateSettings\n  } = config;\n  const {\n    defaultStrategyName,\n    strategies,\n    cdRef: injectingViewCdRef,\n    patchZone,\n    parent\n  } = renderSettings;\n  const errorHandler = createErrorHandler(renderSettings.errorHandler);\n  const ngZone = patchZone ? patchZone : undefined;\n  let activeTemplate;\n  const strategyHandling$ = strategyHandling(defaultStrategyName, strategies);\n  const templates = templateHandling(templateSettings.viewContainerRef);\n  const viewContainerRef = templateSettings.viewContainerRef;\n  const triggerHandling = config.templateTrigger$ || EMPTY;\n  const getContext = notificationKindToViewContext(templateSettings.customContext || (() => ({})));\n  return {\n    addTemplateRef: (name, templateRef) => {\n      templates.add(name, templateRef);\n    },\n    nextStrategy: strategyHandling$.next,\n    render(values$) {\n      let trg;\n      let notification = {\n        value: undefined,\n        complete: false,\n        error: false,\n        kind: \"suspense\" /* RxNotificationKind.Suspense */,\n        hasValue: false\n      };\n      return merge(values$.pipe(tap(n => notification = n)), triggerHandling.pipe(tap(trigger => trg = trigger))).pipe(switchMap(() => {\n        const contextKind = trg || notification.kind;\n        trg = undefined;\n        const value = notification.value;\n        const templateName = notificationToTemplateName[contextKind](value, templates);\n        return templates.get$(templateName).pipe(map(template => ({\n          template,\n          templateName,\n          notification,\n          contextKind\n        })));\n      }), withLatestFrom(strategyHandling$.strategy$),\n      // Cancel old renders\n      switchMap(([{\n        template,\n        templateName,\n        notification,\n        contextKind\n      }, strategy]) => {\n        const isNewTemplate = activeTemplate !== template || !template;\n        const notifyParent = isNewTemplate && parent;\n        return onStrategy(notification.value, strategy, (v, work, options) => {\n          const context = getContext[contextKind](notification);\n          if (isNewTemplate) {\n            // template has changed (undefined => next; suspense => next; ...)\n            // handle remove & insert\n            // remove current view if there is any\n            if (viewContainerRef.length > 0) {\n              // patch removal if needed\n              viewContainerRef.clear();\n            }\n            // create new view if any\n            if (template) {\n              // createEmbeddedView is already patched, no need for workFactory\n              templates.createEmbeddedView(templateName, context);\n            }\n          } else if (template) {\n            // template didn't change, update it\n            // handle update\n            const view = viewContainerRef.get(0);\n            Object.keys(context).forEach(k => {\n              view.context[k] = context[k];\n            });\n            // update view context, patch if needed\n            work(view, options.scope, notification);\n          }\n          activeTemplate = template;\n        }, {\n          ngZone\n        }\n        // we don't need to specify any scope here. The template manager is the only one\n        // who will call `viewRef#detectChanges` on any of the templates it manages.\n        // whenever a new value comes in, any pre-scheduled work of this taskManager will\n        // be nooped before a new work will be scheduled. This happens because of the implementation\n        // of `StrategyCredential#behavior`\n        ).pipe(notifyAllParentsIfNeeded(injectingViewCdRef, strategy, () => notifyParent, ngZone), catchError(e => {\n          errorHandler.handleError(e);\n          return of(e);\n        }));\n      }));\n    }\n  };\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { RxBaseTemplateNames, RxDefaultListViewContext, createListTemplateManager, createTemplateManager, templateHandling };\n"],"names":["createEmbeddedView","viewContainerRef","templateRef","context","index","view","templateHandling","templateCache","get$","name","of","get","ref","templatRef$","r","assertTemplate","BehaviorSubject","property","isTemplateRefOrNull","notifyAllParentsIfNeeded","injectingViewCdRef","strategy","notifyNeeded","ngZone","o$","switchMap","v","concat","onStrategy","_v","work","options","ignoreElements","getTemplateHandler","templateSettings","initialTemplateRef","createViewContext","updateViewContext","updateUnchangedContext","insertView","moveView","removeView","getListChanges","updateView","item","count","oldIndex","oldView","changes","items","changedIdxs","changesArr","notifyParent","record","adjustedPreviousIndex","currentIndex","getInsertChange","getRemoveChange","getMoveChange","getUpdateChange","getUnchangedChange","isRxRenderError","e","createErrorHandler","_handler","_handleError","error","createListTemplateManager","config","renderSettings","trackBy","iterableDiffers","defaultStrategyName","strategies","patchZone","parent","errorHandler","strategyHandling$","strategyHandling","_differ","getDiffer","values","listViewHandler","__spreadProps","__spreadValues","partiallyFinished","nextConfig","values$","render","handleError","catchError","err","combineLatest","distinctUntilChanged","map","iterable","differ","currentIterable","i","ilen","viewRef","listChanges","insertedOrRemoved","applyChanges$","getObservablesFromChangesArray","tap","change","payload","type","computeFirst","computeLast","computeEven","RxDefaultListViewContext","customProps","__publicField","ReplaySubject","props","acc","key","$implicit","c","s","even","newProps","RxBaseTemplateNames","notificationKindToViewContext","customNextContext","notification","createTemplateManager","notificationToTemplateName","activeTemplate","templates","triggerHandling","EMPTY","getContext","trg","merge","n","trigger","contextKind","value","templateName","template","withLatestFrom","isNewTemplate","k"],"mappings":"6OAcA,SAASA,EAAAA,CAAmBC,EAAkBC,CAAaC,CAAAA,CAAAA,CAASC,EAAQ,CAAG,CAAA,CAC7E,IAAMC,CAAAA,CAAOJ,CAAiB,CAAA,kBAAA,CAAmBC,EAAaC,CAASC,CAAAA,CAAK,EAC5E,OAAAC,CAAAA,CAAK,eACEA,CAAAA,CACT,CAQA,SAASC,EAAiBL,CAAAA,CAAAA,CAAkB,CAC1C,IAAMM,CAAAA,CAAgB,IAAI,GACpBC,CAAAA,CAAAA,CAAOC,GACJF,CAAc,CAAA,GAAA,CAAIE,CAAI,CAAA,EAAKC,EAAG,CAAA,KAAA,CAAS,EAE1CC,CAAMF,CAAAA,CAAAA,EAAQ,CAClB,IAAIG,CACEC,CAAAA,CAAAA,CAAcL,EAAKC,CAAI,CAAA,CAC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