{"version":3,"file":"_resource-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/authoring/output/output_emitter_ref.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/render3/reactivity/computed.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/render3/reactivity/linked_signal.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/src/resource/resource.ts"],"sourcesContent":["/**\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.dev/license\n */\n\nimport {setActiveConsumer} from '../../../primitives/signals';\n\nimport {inject} from '../../di/injector_compatibility';\nimport {ErrorHandler} from '../../error_handler';\nimport {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../../errors';\nimport {DestroyRef} from '../../linker/destroy_ref';\n\nimport {OutputRef, OutputRefSubscription} from './output_ref';\n\n/**\n * An `OutputEmitterRef` is created by the `output()` function and can be\n * used to emit values to consumers of your directive or component.\n *\n * Consumers of your directive/component can bind to the output and\n * subscribe to changes via the bound event syntax. For example:\n *\n * ```html\n * <my-comp (valueChange)=\"processNewValue($event)\" />\n * ```\n *\n * @see [Custom events with outputs](guide/components/outputs)\n *\n * @publicAPI\n */\nexport class OutputEmitterRef<T> implements OutputRef<T> {\n  private destroyed = false;\n  private listeners: Array<(value: T) => void> | null = null;\n  private errorHandler = inject(ErrorHandler, {optional: true});\n\n  /** @internal */\n  destroyRef: DestroyRef = inject(DestroyRef);\n\n  constructor() {\n    // Clean-up all listeners and mark as destroyed upon destroy.\n    this.destroyRef.onDestroy(() => {\n      this.destroyed = true;\n      this.listeners = null;\n    });\n  }\n\n  subscribe(callback: (value: T) => void): OutputRefSubscription {\n    if (this.destroyed) {\n      throw new RuntimeError(\n        RuntimeErrorCode.OUTPUT_REF_DESTROYED,\n        ngDevMode &&\n          'Unexpected subscription to destroyed `OutputRef`. ' +\n            'The owning directive/component is destroyed.',\n      );\n    }\n\n    (this.listeners ??= []).push(callback);\n\n    return {\n      unsubscribe: () => {\n        const idx = this.listeners?.indexOf(callback);\n        if (idx !== undefined && idx !== -1) {\n          this.listeners?.splice(idx, 1);\n        }\n      },\n    };\n  }\n\n  /** Emits a new value to the output. */\n  emit(value: T): void {\n    if (this.destroyed) {\n      console.warn(\n        formatRuntimeError(\n          RuntimeErrorCode.OUTPUT_REF_DESTROYED,\n          ngDevMode &&\n            'Unexpected emit for destroyed `OutputRef`. ' +\n              'The owning directive/component is destroyed.',\n        ),\n      );\n      return;\n    }\n\n    if (this.listeners === null) {\n      return;\n    }\n\n    const previousConsumer = setActiveConsumer(null);\n    try {\n      for (const listenerFn of this.listeners) {\n        try {\n          listenerFn(value);\n        } catch (err: unknown) {\n          this.errorHandler?.handleError(err);\n        }\n      }\n    } finally {\n      setActiveConsumer(previousConsumer);\n    }\n  }\n}\n\n/** Gets the owning `DestroyRef` for the given output. */\nexport function getOutputDestroyRef(ref: OutputRef<unknown>): DestroyRef | undefined {\n  return ref.destroyRef;\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.dev/license\n */\n\nimport {createComputed, SIGNAL} from '../../../primitives/signals';\n\nimport {Signal, ValueEqualityFn} from './api';\n\n/**\n * Options passed to the `computed` creation function.\n */\nexport interface CreateComputedOptions<T> {\n  /**\n   * A comparison function which defines equality for computed values.\n   */\n  equal?: ValueEqualityFn<T>;\n\n  /**\n   * A debug name for the computed signal. Used in Angular DevTools to identify the signal.\n   */\n  debugName?: string;\n}\n\n/**\n * Create a computed `Signal` which derives a reactive value from an expression.\n * @see [Computed signals](guide/signals#computed-signals)\n */\nexport function computed<T>(computation: () => T, options?: CreateComputedOptions<T>): Signal<T> {\n  const getter = createComputed(computation, options?.equal);\n\n  if (ngDevMode) {\n    getter.toString = () => `[Computed: ${getter()}]`;\n    getter[SIGNAL].debugName = options?.debugName;\n  }\n\n  return getter;\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.dev/license\n */\n\nimport {\n  ComputationFn,\n  createLinkedSignal,\n  LinkedSignalGetter,\n  LinkedSignalNode,\n  linkedSignalSetFn,\n  linkedSignalUpdateFn,\n  SIGNAL,\n} from '../../../primitives/signals';\nimport {Signal, ValueEqualityFn} from './api';\nimport {signalAsReadonlyFn, WritableSignal} from './signal';\n\nconst identityFn = <T>(v: T) => v;\n\n/**\n * Creates a writable signal whose value is initialized and reset by the linked, reactive computation.\n *\n * @publicApi 20.0\n */\nexport function linkedSignal<D>(\n  computation: () => D,\n  options?: {equal?: ValueEqualityFn<NoInfer<D>>; debugName?: string},\n): WritableSignal<D>;\n\n/**\n * Creates a writable signal whose value is initialized and reset by the linked, reactive computation.\n * This is an advanced API form where the computation has access to the previous value of the signal and the computation result.\n *\n * Note: The computation is reactive, meaning the linked signal will automatically update whenever any of the signals used within the computation change.\n *\n * @publicApi 20.0\n * @see [Dependent state with linkedSignal](guide/signals/linked-signal)\n */\nexport function linkedSignal<S, D>(options: {\n  source: () => S;\n  computation: (source: NoInfer<S>, previous?: {source: NoInfer<S>; value: NoInfer<D>}) => D;\n  equal?: ValueEqualityFn<NoInfer<D>>;\n  debugName?: string;\n}): WritableSignal<D>;\n\nexport function linkedSignal<S, D>(\n  optionsOrComputation:\n    | {\n        source: () => S;\n        computation: ComputationFn<S, D>;\n        equal?: ValueEqualityFn<D>;\n        debugName?: string;\n      }\n    | (() => D),\n  options?: {equal?: ValueEqualityFn<D>; debugName?: string},\n): WritableSignal<D> {\n  if (typeof optionsOrComputation === 'function') {\n    const getter = createLinkedSignal<D, D>(\n      optionsOrComputation,\n      identityFn<D>,\n      options?.equal,\n    ) as LinkedSignalGetter<D, D> & WritableSignal<D>;\n    return upgradeLinkedSignalGetter(getter, options?.debugName);\n  } else {\n    const getter = createLinkedSignal<S, D>(\n      optionsOrComputation.source,\n      optionsOrComputation.computation,\n      optionsOrComputation.equal,\n    );\n    return upgradeLinkedSignalGetter(getter, optionsOrComputation.debugName);\n  }\n}\n\nfunction upgradeLinkedSignalGetter<S, D>(\n  getter: LinkedSignalGetter<S, D>,\n  debugName?: string,\n): WritableSignal<D> {\n  if (ngDevMode) {\n    getter.toString = () => `[LinkedSignal: ${getter()}]`;\n    getter[SIGNAL].debugName = debugName;\n  }\n\n  const node = getter[SIGNAL] as LinkedSignalNode<S, D>;\n  const upgradedGetter = getter as LinkedSignalGetter<S, D> & WritableSignal<D>;\n\n  upgradedGetter.set = (newValue: D) => linkedSignalSetFn(node, newValue);\n  upgradedGetter.update = (updateFn: (value: D) => D) => linkedSignalUpdateFn(node, updateFn);\n  upgradedGetter.asReadonly = signalAsReadonlyFn.bind(getter as any) as () => Signal<D>;\n\n  return upgradedGetter;\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.dev/license\n */\n\nimport {untracked} from '../render3/reactivity/untracked';\nimport {computed} from '../render3/reactivity/computed';\nimport {signal, signalAsReadonlyFn, WritableSignal} from '../render3/reactivity/signal';\nimport {Signal, ValueEqualityFn} from '../render3/reactivity/api';\nimport {effect, EffectRef} from '../render3/reactivity/effect';\nimport {\n  ResourceOptions,\n  ResourceStatus,\n  WritableResource,\n  Resource,\n  ResourceRef,\n  ResourceStreamingLoader,\n  StreamingResourceOptions,\n  ResourceStreamItem,\n  ResourceLoaderParams,\n} from './api';\n\nimport {Injector} from '../di/injector';\nimport {assertInInjectionContext} from '../di/contextual';\nimport {inject} from '../di/injector_compatibility';\nimport {PendingTasks} from '../pending_tasks';\nimport {linkedSignal} from '../render3/reactivity/linked_signal';\nimport {DestroyRef} from '../linker/destroy_ref';\n\n/**\n * Constructs a `Resource` that projects a reactive request to an asynchronous operation defined by\n * a loader function, which exposes the result of the loading operation via signals.\n *\n * Note that `resource` is intended for _read_ operations, not operations which perform mutations.\n * `resource` will cancel in-progress loads via the `AbortSignal` when destroyed or when a new\n * request object becomes available, which could prematurely abort mutations.\n *\n * @see [Async reactivity with resources](guide/signals/resource)\n *\n * @experimental 19.0\n */\nexport function resource<T, R>(\n  options: ResourceOptions<T, R> & {defaultValue: NoInfer<T>},\n): ResourceRef<T>;\n\n/**\n * Constructs a `Resource` that projects a reactive request to an asynchronous operation defined by\n * a loader function, which exposes the result of the loading operation via signals.\n *\n * Note that `resource` is intended for _read_ operations, not operations which perform mutations.\n * `resource` will cancel in-progress loads via the `AbortSignal` when destroyed or when a new\n * request object becomes available, which could prematurely abort mutations.\n *\n * @experimental 19.0\n * @see [Async reactivity with resources](guide/signals/resource)\n */\nexport function resource<T, R>(options: ResourceOptions<T, R>): ResourceRef<T | undefined>;\nexport function resource<T, R>(options: ResourceOptions<T, R>): ResourceRef<T | undefined> {\n  if (ngDevMode && !options?.injector) {\n    assertInInjectionContext(resource);\n  }\n\n  const oldNameForParams = (\n    options as ResourceOptions<T, R> & {request: ResourceOptions<T, R>['params']}\n  ).request;\n  const params = (options.params ?? oldNameForParams ?? (() => null)) as () => R;\n  return new ResourceImpl<T | undefined, R>(\n    params,\n    getLoader(options),\n    options.defaultValue,\n    options.equal ? wrapEqualityFn(options.equal) : undefined,\n    options.injector ?? inject(Injector),\n  );\n}\n\ntype ResourceInternalStatus = 'idle' | 'loading' | 'resolved' | 'local';\n\n/**\n * Internal state of a resource.\n */\ninterface ResourceProtoState<T> {\n  extRequest: WrappedRequest;\n\n  // For simplicity, status is internally tracked as a subset of the public status enum.\n  // Reloading and Error statuses are projected from Loading and Resolved based on other state.\n  status: ResourceInternalStatus;\n}\n\ninterface ResourceState<T> extends ResourceProtoState<T> {\n  previousStatus: ResourceStatus;\n  stream: Signal<ResourceStreamItem<T>> | undefined;\n}\n\ntype WrappedRequest = {request: unknown; reload: number};\n\n/**\n * Base class which implements `.value` as a `WritableSignal` by delegating `.set` and `.update`.\n */\nabstract class BaseWritableResource<T> implements WritableResource<T> {\n  readonly value: WritableSignal<T>;\n  abstract readonly status: Signal<ResourceStatus>;\n  abstract readonly error: Signal<Error | undefined>;\n\n  abstract reload(): boolean;\n\n  constructor(value: Signal<T>) {\n    this.value = value as WritableSignal<T>;\n    this.value.set = this.set.bind(this);\n    this.value.update = this.update.bind(this);\n    this.value.asReadonly = signalAsReadonlyFn;\n  }\n\n  abstract set(value: T): void;\n\n  private readonly isError = computed(() => this.status() === 'error');\n\n  update(updateFn: (value: T) => T): void {\n    this.set(updateFn(untracked(this.value)));\n  }\n\n  readonly isLoading = computed(() => this.status() === 'loading' || this.status() === 'reloading');\n\n  // Use a computed here to avoid triggering reactive consumers if the value changes while staying\n  // either defined or undefined.\n  private readonly isValueDefined = computed(() => {\n    // Check if it's in an error state first to prevent the error from bubbling up.\n    if (this.isError()) {\n      return false;\n    }\n\n    return this.value() !== undefined;\n  });\n\n  hasValue(): this is ResourceRef<Exclude<T, undefined>> {\n    return this.isValueDefined();\n  }\n\n  asReadonly(): Resource<T> {\n    return this;\n  }\n}\n\n/**\n * Implementation for `resource()` which uses a `linkedSignal` to manage the resource's state.\n */\nexport class ResourceImpl<T, R> extends BaseWritableResource<T> implements ResourceRef<T> {\n  private readonly pendingTasks: PendingTasks;\n\n  /**\n   * The current state of the resource. Status, value, and error are derived from this.\n   */\n  private readonly state: WritableSignal<ResourceState<T>>;\n\n  /**\n   * Combines the current request with a reload counter which allows the resource to be reloaded on\n   * imperative command.\n   */\n  protected readonly extRequest: WritableSignal<WrappedRequest>;\n  private readonly effectRef: EffectRef;\n\n  private pendingController: AbortController | undefined;\n  private resolvePendingTask: (() => void) | undefined = undefined;\n  private destroyed = false;\n  private unregisterOnDestroy: () => void;\n\n  constructor(\n    request: () => R,\n    private readonly loaderFn: ResourceStreamingLoader<T, R>,\n    defaultValue: T,\n    private readonly equal: ValueEqualityFn<T> | undefined,\n    injector: Injector,\n  ) {\n    super(\n      // Feed a computed signal for the value to `BaseWritableResource`, which will upgrade it to a\n      // `WritableSignal` that delegates to `ResourceImpl.set`.\n      computed(\n        () => {\n          const streamValue = this.state().stream?.();\n\n          if (!streamValue) {\n            return defaultValue;\n          }\n\n          // Prevents `hasValue()` from throwing an error when a reload happened in the error state\n          if (this.state().status === 'loading' && this.error()) {\n            return defaultValue;\n          }\n\n          if (!isResolved(streamValue)) {\n            throw new ResourceValueError(this.error()!);\n          }\n\n          return streamValue.value;\n        },\n        {equal},\n      ),\n    );\n\n    // Extend `request()` to include a writable reload signal.\n    this.extRequest = linkedSignal({\n      source: request,\n      computation: (request) => ({request, reload: 0}),\n    });\n\n    // The main resource state is managed in a `linkedSignal`, which allows the resource to change\n    // state instantaneously when the request signal changes.\n    this.state = linkedSignal<WrappedRequest, ResourceState<T>>({\n      // Whenever the request changes,\n      source: this.extRequest,\n      // Compute the state of the resource given a change in status.\n      computation: (extRequest, previous) => {\n        const status = extRequest.request === undefined ? 'idle' : 'loading';\n        if (!previous) {\n          return {\n            extRequest,\n            status,\n            previousStatus: 'idle',\n            stream: undefined,\n          };\n        } else {\n          return {\n            extRequest,\n            status,\n            previousStatus: projectStatusOfState(previous.value),\n            // If the request hasn't changed, keep the previous stream.\n            stream:\n              previous.value.extRequest.request === extRequest.request\n                ? previous.value.stream\n                : undefined,\n          };\n        }\n      },\n    });\n\n    this.effectRef = effect(this.loadEffect.bind(this), {\n      injector,\n      manualCleanup: true,\n    });\n\n    this.pendingTasks = injector.get(PendingTasks);\n\n    // Cancel any pending request when the resource itself is destroyed.\n    this.unregisterOnDestroy = injector.get(DestroyRef).onDestroy(() => this.destroy());\n  }\n\n  override readonly status = computed(() => projectStatusOfState(this.state()));\n\n  override readonly error = computed(() => {\n    const stream = this.state().stream?.();\n    return stream && !isResolved(stream) ? stream.error : undefined;\n  });\n\n  /**\n   * Called either directly via `WritableResource.set` or via `.value.set()`.\n   */\n  override set(value: T): void {\n    if (this.destroyed) {\n      return;\n    }\n\n    const error = untracked(this.error);\n    const state = untracked(this.state);\n\n    if (!error) {\n      const current = untracked(this.value);\n      if (\n        state.status === 'local' &&\n        (this.equal ? this.equal(current, value) : current === value)\n      ) {\n        return;\n      }\n    }\n\n    // Enter Local state with the user-defined value.\n    this.state.set({\n      extRequest: state.extRequest,\n      status: 'local',\n      previousStatus: 'local',\n      stream: signal({value}),\n    });\n\n    // We're departing from whatever state the resource was in previously, so cancel any in-progress\n    // loading operations.\n    this.abortInProgressLoad();\n  }\n\n  override reload(): boolean {\n    // We don't want to restart in-progress loads.\n    const {status} = untracked(this.state);\n    if (status === 'idle' || status === 'loading') {\n      return false;\n    }\n\n    // Increment the request reload to trigger the `state` linked signal to switch us to `Reload`\n    this.extRequest.update(({request, reload}) => ({request, reload: reload + 1}));\n    return true;\n  }\n\n  destroy(): void {\n    this.destroyed = true;\n    this.unregisterOnDestroy();\n    this.effectRef.destroy();\n    this.abortInProgressLoad();\n\n    // Destroyed resources enter Idle state.\n    this.state.set({\n      extRequest: {request: undefined, reload: 0},\n      status: 'idle',\n      previousStatus: 'idle',\n      stream: undefined,\n    });\n  }\n\n  private async loadEffect(): Promise<void> {\n    const extRequest = this.extRequest();\n\n    // Capture the previous status before any state transitions. Note that this is `untracked` since\n    // we do not want the effect to depend on the state of the resource, only on the request.\n    const {status: currentStatus, previousStatus} = untracked(this.state);\n\n    if (extRequest.request === undefined) {\n      // Nothing to load (and we should already be in a non-loading state).\n      return;\n    } else if (currentStatus !== 'loading') {\n      // We're not in a loading or reloading state, so this loading request is stale.\n      return;\n    }\n\n    // Cancel any previous loading attempts.\n    this.abortInProgressLoad();\n\n    // Capturing _this_ load's pending task in a local variable is important here. We may attempt to\n    // resolve it twice:\n    //\n    //  1. when the loading function promise resolves/rejects\n    //  2. when cancelling the loading operation\n    //\n    // After the loading operation is cancelled, `this.resolvePendingTask` no longer represents this\n    // particular task, but this `await` may eventually resolve/reject. Thus, when we cancel in\n    // response to (1) below, we need to cancel the locally saved task.\n    let resolvePendingTask: (() => void) | undefined = (this.resolvePendingTask =\n      this.pendingTasks.add());\n\n    const {signal: abortSignal} = (this.pendingController = new AbortController());\n\n    try {\n      // The actual loading is run through `untracked` - only the request side of `resource` is\n      // reactive. This avoids any confusion with signals tracking or not tracking depending on\n      // which side of the `await` they are.\n      const stream = await untracked(() => {\n        return this.loaderFn({\n          params: extRequest.request as Exclude<R, undefined>,\n          // TODO(alxhub): cleanup after g3 removal of `request` alias.\n          request: extRequest.request as Exclude<R, undefined>,\n          abortSignal,\n          previous: {\n            status: previousStatus,\n          },\n        } as ResourceLoaderParams<R>);\n      });\n\n      // If this request has been aborted, or the current request no longer\n      // matches this load, then we should ignore this resolution.\n      if (abortSignal.aborted || untracked(this.extRequest) !== extRequest) {\n        return;\n      }\n\n      this.state.set({\n        extRequest,\n        status: 'resolved',\n        previousStatus: 'resolved',\n        stream,\n      });\n    } catch (err) {\n      if (abortSignal.aborted || untracked(this.extRequest) !== extRequest) {\n        return;\n      }\n\n      this.state.set({\n        extRequest,\n        status: 'resolved',\n        previousStatus: 'error',\n        stream: signal({error: encapsulateResourceError(err)}),\n      });\n    } finally {\n      // Resolve the pending task now that the resource has a value.\n      resolvePendingTask?.();\n      resolvePendingTask = undefined;\n    }\n  }\n\n  private abortInProgressLoad(): void {\n    untracked(() => this.pendingController?.abort());\n    this.pendingController = undefined;\n\n    // Once the load is aborted, we no longer want to block stability on its resolution.\n    this.resolvePendingTask?.();\n    this.resolvePendingTask = undefined;\n  }\n}\n\n/**\n * Wraps an equality function to handle either value being `undefined`.\n */\nfunction wrapEqualityFn<T>(equal: ValueEqualityFn<T>): ValueEqualityFn<T | undefined> {\n  return (a, b) => (a === undefined || b === undefined ? a === b : equal(a, b));\n}\n\nfunction getLoader<T, R>(options: ResourceOptions<T, R>): ResourceStreamingLoader<T, R> {\n  if (isStreamingResourceOptions(options)) {\n    return options.stream;\n  }\n\n  return async (params) => {\n    try {\n      return signal({value: await options.loader(params)});\n    } catch (err) {\n      return signal({error: encapsulateResourceError(err)});\n    }\n  };\n}\n\nfunction isStreamingResourceOptions<T, R>(\n  options: ResourceOptions<T, R>,\n): options is StreamingResourceOptions<T, R> {\n  return !!(options as StreamingResourceOptions<T, R>).stream;\n}\n\n/**\n * Project from a state with `ResourceInternalStatus` to the user-facing `ResourceStatus`\n */\nfunction projectStatusOfState(state: ResourceState<unknown>): ResourceStatus {\n  switch (state.status) {\n    case 'loading':\n      return state.extRequest.reload === 0 ? 'loading' : 'reloading';\n    case 'resolved':\n      return isResolved(state.stream!()) ? 'resolved' : 'error';\n    default:\n      return state.status;\n  }\n}\n\nfunction isResolved<T>(state: ResourceStreamItem<T>): state is {value: T} {\n  return (state as {error: unknown}).error === undefined;\n}\n\nexport function encapsulateResourceError(error: unknown): Error {\n  if (error instanceof Error) {\n    return error;\n  }\n\n  return new ResourceWrappedError(error);\n}\n\nclass ResourceValueError extends Error {\n  constructor(error: Error) {\n    super(\n      ngDevMode\n        ? `Resource is currently in an error state (see Error.cause for details): ${error.message}`\n        : error.message,\n      {cause: error},\n    );\n  }\n}\n\nclass ResourceWrappedError extends Error {\n  constructor(error: unknown) {\n    super(\n      ngDevMode\n        ? `Resource returned an error that's not an Error instance: ${String(error)}. Check this error's .cause for the actual error.`\n        : String(error),\n      {cause: error},\n    );\n  }\n}\n"],"names":["OutputEmitterRef","destroyed","listeners","errorHandler","inject","ErrorHandler","optional","destroyRef","DestroyRef","constructor","onDestroy","subscribe","callback","RuntimeError","ngDevMode","push","unsubscribe","idx","indexOf","undefined","splice","emit","value","console","warn","formatRuntimeError","previousConsumer","setActiveConsumer","listenerFn","err","handleError","getOutputDestroyRef","ref","computed","computation","options","getter","createComputed","equal","toString","SIGNAL","debugName","identityFn","v","linkedSignal","optionsOrComputation","createLinkedSignal","upgradeLinkedSignalGetter","source","node","upgradedGetter","set","newValue","linkedSignalSetFn","update","updateFn","linkedSignalUpdateFn","asReadonly","signalAsReadonlyFn","bind","resource","injector","assertInInjectionContext","oldNameForParams","request","params","ResourceImpl","getLoader","defaultValue","wrapEqualityFn","Injector","BaseWritableResource","isError","status","untracked","isLoading","isValueDefined","hasValue","loaderFn","pendingTasks","state","extRequest","effectRef","pendingController","resolvePendingTask","unregisterOnDestroy","streamValue","stream","error","isResolved","ResourceValueError","reload","previous","previousStatus","projectStatusOfState","effect","loadEffect","manualCleanup","get","PendingTasks","destroy","current","signal","abortInProgressLoad","currentStatus","add","abortSignal","AbortController","aborted","encapsulateResourceError","abort","a","b","isStreamingResourceOptions","loader","Error","ResourceWrappedError","message","cause","String"],"mappings":";;;;;;;;;;MAgCaA,gBAAgB,CAAA;AACnBC,EAAAA,SAAS,GAAG,KAAK;AACjBC,EAAAA,SAAS,GAAqC,IAAI;AAClDC,EAAAA,YAAY,GAAGC,MAAM,CAACC,YAAY,EAAE;AAACC,IAAAA,QAAQ,EAAE;AAAK,GAAA,CAAC;AAG7DC,EAAAA,UAAU,GAAeH,MAAM,CAACI,UAAU,CAAC;AAE3CC,EAAAA,WAAAA,GAAA;AAEE,IAAA,IAAI,CAACF,UAAU,CAACG,SAAS,CAAC,MAAK;MAC7B,IAAI,CAACT,SAAS,GAAG,IAAI;MACrB,IAAI,CAACC,SAAS,GAAG,IAAI;AACvB,KAAC,CAAC;AACJ;EAEAS,SAASA,CAACC,QAA4B,EAAA;IACpC,IAAI,IAAI,CAACX,SAAS,EAAE;MAClB,MAAM,IAAIY,YAAY,CAAA,GAAA,EAEpBC,SAAS,IACP,oDAAoD,GAClD,8CAA8C,CACnD;AACH;IAEA,CAAC,IAAI,CAACZ,SAAS,KAAK,EAAE,EAAEa,IAAI,CAACH,QAAQ,CAAC;IAEtC,OAAO;MACLI,WAAW,EAAEA,MAAK;QAChB,MAAMC,GAAG,GAAG,IAAI,CAACf,SAAS,EAAEgB,OAAO,CAACN,QAAQ,CAAC;QAC7C,IAAIK,GAAG,KAAKE,SAAS,IAAIF,GAAG,KAAK,CAAC,CAAC,EAAE;UACnC,IAAI,CAACf,SAAS,EAAEkB,MAAM,CAACH,GAAG,EAAE,CAAC,CAAC;A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