{"version":3,"file":"dereekb-dbx-form.mjs","sources":["../../../../packages/dbx-form/src/lib/form/form.ts","../../../../packages/dbx-form/src/lib/form/action/form.action.directive.ts","../../../../packages/dbx-form/src/lib/form/action/transition/form.action.transition.safety.directive.ts","../../../../packages/dbx-form/src/lib/forge/form/forge.form.ts","../../../../packages/dbx-form/src/lib/forge/validation.ts","../../../../packages/dbx-form/src/lib/forge/form/forge.global-defaults.service.ts","../../../../packages/dbx-form/src/lib/forge/form/forge.context.ts","../../../../packages/dbx-form/src/lib/forge/form/forge.context.service.ts","../../../../packages/dbx-form/src/lib/forge/form/forge.component.ts","../../../../packages/dbx-form/src/lib/form/io/form.input.directive.ts","../../../../packages/dbx-form/src/lib/form/action/forge.action.dialog.component.ts","../../../../packages/dbx-form/src/lib/form/debug/form.logger.directive.ts","../../../../packages/dbx-form/src/lib/form/io/form.loading.directive.ts","../../../../packages/dbx-form/src/lib/form/io/form.change.directive.ts","../../../../packages/dbx-form/src/lib/form/form.angular.util.ts","../../../../packages/dbx-form/src/lib/forge/field/field.ts","../../../../packages/dbx-form/src/lib/field/field.autocomplete.ts","../../../../packages/dbx-form/src/lib/forge/field/field.util.meta.ts","../../../../packages/dbx-form/src/lib/forge/field/field.util.ts","../../../../packages/dbx-form/src/lib/validator/website.ts","../../../../packages/dbx-form/src/lib/forge/field/field.util.validation.ts","../../../../packages/dbx-form/src/lib/forge/field/value/text/text.field.ts","../../../../packages/dbx-form/src/lib/forge/field/value/text/textarea.field.ts","../../../../packages/dbx-form/src/lib/forge/field/value/text/text.additional.field.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/expand/expand.field.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/flex/flex.wrapper.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/wrapper.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/array-field/array-field.wrapper.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/array-field/array-field.element.wrapper.ts","../../../../packages/dbx-form/src/lib/forge/field/value/array/array.field.ts","../../../../packages/dbx-form/src/lib/forge/field/value/text/text.address.field.ts","../../../../packages/dbx-form/src/lib/forge/field/value/number/number.field.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/formfield/formfield.wrapper.ts","../../../../packages/dbx-form/src/lib/forge/field/value/number/slider.field.ts","../../../../packages/dbx-form/src/lib/forge/field/value/boolean/boolean.field.ts","../../../../packages/dbx-form/src/lib/field/value/date/datetime.config.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/datetime.calc.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/date.field.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/datetime.field.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/daterange.field.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/datetimerange.field.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/fixeddaterange.field.ts","../../../../packages/dbx-form/src/lib/field/value/date/date.value.ts","../../../../packages/dbx-form/src/lib/field/value/date/datetime.ts","../../../../packages/dbx-form/src/lib/field/value/date/datetime.field.service.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/datetime.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/datetime.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/value/date/daterange.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/daterange.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/value/date/fixeddaterange.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/value/date/fixeddaterange.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/value/duration/duration.field.ts","../../../../packages/dbx-form/src/lib/field/value/duration/duration.picker.popover.component.ts","../../../../packages/dbx-form/src/lib/field/value/duration/duration.picker.popover.component.html","../../../../packages/dbx-form/src/lib/forge/field/value/duration/duration.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/value/duration/duration.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/value/phone/phone.field.ts","../../../../packages/dbx-form/src/lib/validator/phone.ts","../../../../packages/dbx-form/src/lib/forge/field/value/phone/phone.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/value/phone/phone.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/selection/selection.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/selection.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/selection/selection.field.ts","../../../../packages/dbx-form/src/lib/field/selection/searchable/searchable.field.autocomplete.item.component.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/searchable/searchable.field.directive.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/searchable/searchable-text.field.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/searchable/searchable-chip.field.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/searchable/searchable-text.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/searchable/searchable-text.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/selection/searchable/searchable-chip.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/searchable/searchable-chip.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/selection/pickable/pickable.field.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/pickable/pickable.field.directive.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/pickable/pickable-chip.field.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/pickable/pickable-list.field.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/pickable/pickable-chip.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/pickable/pickable-chip.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/selection/pickable/pickable-list.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/pickable/pickable-list.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/selection/sourceselect/sourceselect.field.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/sourceselect/sourceselect.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/sourceselect/sourceselect.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/selection/list/list.field.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/list/list.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/selection/list/list.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/checklist/checklist.field.ts","../../../../packages/dbx-form/src/lib/forge/field/component/component.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/component/component.field.ts","../../../../packages/dbx-form/src/lib/forge/field/texteditor/texteditor.field.component.ts","../../../../packages/dbx-form/src/lib/forge/field/texteditor/texteditor.field.component.html","../../../../packages/dbx-form/src/lib/forge/field/texteditor/texteditor.field.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/array-field/array-field.duplicate.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/array-field/array-field.wrapper.component.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/array-field/array-field.wrapper.component.html","../../../../packages/dbx-form/src/lib/forge/field/wrapper/array-field/array-field.element.wrapper.component.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/array-field/array-field.element.wrapper.component.html","../../../../packages/dbx-form/src/lib/forge/field/wrapper/formfield/formfield.wrapper.component.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/formfield/formfield.wrapper.component.html","../../../../packages/dbx-form/src/lib/forge/field/wrapper/section/section.wrapper.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/info/info.field.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/info/info.wrapper.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/style/style.wrapper.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/working/working.wrapper.component.ts","../../../../packages/dbx-form/src/lib/forge/field/wrapper/working/working.wrapper.ts","../../../../packages/dbx-form/src/lib/forge/form/forge.component.template.ts","../../../../packages/dbx-form/src/lib/forge/form/forge.directive.ts","../../../../packages/dbx-form/src/lib/forge/form/forge.form.component.ts","../../../../packages/dbx-form/src/lib/forge/forge.providers.ts","../../../../packages/dbx-form/src/lib/forge/preset/preset.form.ts","../../../../packages/dbx-form/src/lib/forge/preset/search.form.component.ts","../../../../packages/dbx-form/src/lib/forge/template/login.ts","../../../../packages/dbx-form/src/lib/shared/template/timezone.ts","../../../../packages/dbx-form/src/lib/forge/template/timezone.ts","../../../../packages/dbx-form/src/lib/forge/template/website.ts","../../../../packages/dbx-form/src/lib/forge/template/available.ts","../../../../packages/dbx-form/src/lib/field/value/date/datetime.preset.ts","../../../../packages/dbx-form/src/lib/field/selection/pickable/pickable.util.ts","../../../../packages/dbx-form/src/lib/layout/form.spacer.directive.ts","../../../../packages/dbx-form/src/lib/validator/boolean.ts","../../../../packages/dbx-form/src/lib/validator/email.ts","../../../../packages/dbx-form/src/lib/validator/field.ts","../../../../packages/dbx-form/src/lib/validator/number.ts","../../../../packages/dbx-form/src/lib/validator/available.ts","../../../../packages/dbx-form/src/lib/form.providers.ts","../../../../packages/dbx-form/src/dereekb-dbx-form.ts"],"sourcesContent":["import { forwardRef, type Provider, type Type } from '@angular/core';\nimport { type Observable } from 'rxjs';\nimport { type LockSet } from '@dereekb/rxjs';\nimport { type BooleanStringKeyArray, type Maybe } from '@dereekb/util';\nimport { type AbstractControl, type FormControlStatus } from '@angular/forms';\n\n/**\n * Current state of a DbxForm\n */\nexport enum DbxFormState {\n  /**\n   * Form is not finished initializing.\n   */\n  INITIALIZING = -1,\n  /**\n   * Form is initialized but has not yet used.\n   */\n  RESET = 0,\n  /**\n   * Form has been used.\n   */\n  USED = 1\n}\n\n/**\n * Unique key for disabling/enabling.\n */\nexport type DbxFormDisabledKey = string;\n\n/**\n * Default key used when disabling/enabling a form without specifying a custom key.\n */\nexport const DEFAULT_FORM_DISABLED_KEY = 'dbx_form_disabled';\n\n/**\n * Reference to the current state of a form.\n */\nexport interface DbxFormStateRef {\n  readonly state: DbxFormState;\n}\n\n/**\n * DbxForm stream event\n */\nexport interface DbxFormEvent extends DbxFormStateRef {\n  readonly isComplete: boolean;\n  readonly status: FormControlStatus;\n  readonly pristine?: boolean;\n  readonly untouched?: boolean;\n  readonly lastResetAt?: Date;\n  readonly changesCount?: number;\n  /**\n   * Whether or not the form is disabled.\n   */\n  readonly isDisabled?: boolean;\n  /**\n   * Current disabled state keys.\n   */\n  readonly disabled?: BooleanStringKeyArray;\n}\n\n/**\n * Form that has an event stream, value, and state items.\n */\nexport abstract class DbxForm<T = unknown> {\n  abstract readonly stream$: Observable<DbxFormEvent>;\n\n  /**\n   * Returns an observable that emits the form's current value, optionally gated by the\n   * implementation's validity rules (e.g. {@link DbxForgeFormContext.requireValid}).\n   *\n   * Consumers that only want a value once the form passes validation should use this method.\n   */\n  abstract getValue(): Observable<T>;\n\n  /**\n   * Returns an observable that emits the form's current value, regardless of validity gates.\n   *\n   * Used by infrastructure (e.g. {@link DbxActionFormDirective}) that needs the underlying\n   * value to feed user-supplied isValid/isModified functions even while the form is invalid.\n   * Defaults to {@link getValue}; implementations that gate {@link getValue} on validity\n   * should override this to bypass that gate.\n   *\n   * @returns An observable of the form's current value, even when validity gates would suppress {@link getValue}.\n   */\n  currentValue(): Observable<T> {\n    return this.getValue();\n  }\n\n  /**\n   * Returns an observable that returns the current disabled keys.\n   */\n  abstract getDisabled(): Observable<BooleanStringKeyArray>;\n}\n\n/**\n * Mutable extension of {@link DbxForm} that supports setting values, resetting, and disabling the form.\n *\n * @typeParam T - The form value type.\n */\nexport abstract class DbxMutableForm<T = unknown> extends DbxForm<T> {\n  /**\n   * LockSet for the form.\n   */\n  abstract readonly lockSet?: LockSet;\n\n  /**\n   * Sets the initial value of the form, and resets the form.\n   *\n   * @param value\n   */\n  abstract setValue(value: Maybe<Partial<T>>): void;\n\n  /**\n   * Resets the form to the initial value.\n   */\n  abstract resetForm(): void;\n\n  /**\n   * Disables the form\n   *\n   * @param disabled\n   */\n  abstract setDisabled(key?: DbxFormDisabledKey, disabled?: boolean): void;\n\n  /**\n   * Force the form to update itself as if it was changed.\n   */\n  abstract forceFormUpdate(): void;\n}\n\n/**\n * Provides the given type as a {@link DbxForm} in Angular's dependency injection system.\n *\n * @param sourceType - The concrete form type to register as a provider.\n * @returns Array of Angular providers.\n */\nexport function provideDbxForm<S extends DbxForm>(sourceType: Type<S>): Provider[] {\n  return [{ provide: DbxForm, useExisting: forwardRef(() => sourceType) }];\n}\n\n/**\n * Provides the given type as both a {@link DbxForm} and {@link DbxMutableForm} in Angular's dependency injection system.\n *\n * @param sourceType - The concrete mutable form type to register as a provider.\n * @returns Array of Angular providers.\n */\nexport function provideDbxMutableForm<S extends DbxMutableForm>(sourceType: Type<S>): Provider[] {\n  return [...provideDbxForm(sourceType), { provide: DbxMutableForm, useExisting: forwardRef(() => sourceType) }];\n}\n\n/**\n * Enables or disables an Angular form control based on the provided flag.\n *\n * @param form - The Angular abstract control to enable or disable.\n * @param isDisabled - Whether to disable (`true`) or enable (`false`) the control.\n * @param config - Optional configuration passed to the control's `disable()` or `enable()` methods.\n */\nexport function toggleDisableFormControl(form: AbstractControl<any>, isDisabled: boolean, config?: Parameters<AbstractControl['disable']>[0]) {\n  if (isDisabled) {\n    form.disable(config);\n  } else {\n    form.enable(config);\n  }\n}\n","import { Directive, type OnInit, inject, input } from '@angular/core';\nimport { addSeconds, isPast } from 'date-fns';\nimport { type Observable, of, combineLatest, exhaustMap, catchError, delay, filter, first, map, switchMap, distinctUntilChanged, shareReplay } from 'rxjs';\nimport { DbxActionContextStoreSourceInstance, type DbxActionValueGetterResult, cleanLockSet, cleanSubscription } from '@dereekb/dbx-core';\nimport { type IsModifiedFunction, type IsValidFunction, type ObservableOrValue, asObservable, type IsEqualFunction, makeIsModifiedFunctionObservable } from '@dereekb/rxjs';\nimport { DbxFormState, DbxMutableForm } from '../../form/form';\nimport { type IsModified, type IsValid, type MapFunction, type Maybe } from '@dereekb/util';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n/**\n * Disabled key used by {@link DbxActionFormDirective} to manage the form's disabled state during action processing.\n */\nexport const APP_ACTION_FORM_DISABLED_KEY = 'dbx_action_form';\n\n/**\n * Function that maps a form's value of type `T` to an action value result of type `O`.\n *\n * Used by {@link DbxActionFormDirective} to transform form output before passing it to the action source.\n */\nexport type DbxActionFormMapValueFunction<T, O> = MapFunction<T, ObservableOrValue<DbxActionValueGetterResult<O>>>;\n\n/**\n * Used with an action to bind a form to an action as it's value source.\n *\n * If the form has errors when the action is trigger, it will reject the action.\n *\n * If the source is not considered modified, the trigger will be ignored.\n *\n * @selector `[dbxActionForm]`\n *\n * @typeParam T - The form value type.\n * @typeParam O - The output value type passed to the action source.\n */\n@Directive({\n  selector: '[dbxActionForm]'\n})\nexport class DbxActionFormDirective<T = object, O = T> implements OnInit {\n  readonly form = inject(DbxMutableForm<T>, { host: true });\n  readonly source = inject(DbxActionContextStoreSourceInstance<O, unknown>);\n\n  readonly lockSet = cleanLockSet({\n    onDestroy: () => {\n      this.source.enable(APP_ACTION_FORM_DISABLED_KEY);\n    },\n    onLockSetDestroy: () => {\n      this._triggeredSub.destroy();\n      this._isCompleteSub.destroy();\n      this._isWorkingSub.destroy();\n      this.form.setDisabled(APP_ACTION_FORM_DISABLED_KEY, false);\n    }\n  });\n\n  /**\n   * Whether or not to disable the form while the action is working.\n   *\n   * Defaults to true.\n   */\n  readonly dbxActionFormDisabledOnWorking = input<Maybe<boolean>>(true);\n\n  /**\n   * Optional validator that checks whether or not the value is\n   * ready to send before the context store is marked enabled.\n   */\n  readonly dbxActionFormIsValid = input<Maybe<IsValidFunction<T>>>();\n\n  /**\n   * Optional function that checks whether or not the value is still the same/equal.\n   */\n  readonly dbxActionFormIsEqual = input<Maybe<IsEqualFunction<T>>>();\n\n  /**\n   * Optional function that checks whether or not the value has been modified.\n   *\n   * If dbxActionFormIsEqual is provided, this will be ignored.\n   */\n  readonly dbxActionFormIsModified = input<Maybe<IsModifiedFunction<T>>>();\n\n  /**\n   * Optional function that maps the form's value to the source's value.\n   */\n  readonly dbxActionFormMapValue = input<Maybe<DbxActionFormMapValueFunction<T, O>>>();\n\n  readonly dbxActionFormDisabledOnWorking$ = toObservable(this.dbxActionFormDisabledOnWorking);\n\n  readonly isValidFunction$ = toObservable(this.dbxActionFormIsValid).pipe(\n    map((x) => x ?? (() => of(true))),\n    shareReplay(1)\n  );\n  readonly isModifiedFunction$: Observable<IsModifiedFunction<T>> = makeIsModifiedFunctionObservable({\n    isModified: toObservable(this.dbxActionFormIsModified),\n    isEqual: toObservable(this.dbxActionFormIsEqual)\n  }).pipe(shareReplay(1));\n\n  readonly mapValueFunction$: Observable<Maybe<DbxActionFormMapValueFunction<T, O>>> = toObservable(this.dbxActionFormMapValue);\n\n  private readonly _triggeredSub = cleanSubscription();\n  private readonly _isCompleteSub = cleanSubscription();\n  private readonly _isWorkingSub = cleanSubscription();\n\n  constructor() {\n    if (this.form.lockSet) {\n      this.lockSet.addChildLockSet(this.form.lockSet, 'form');\n    }\n\n    this.lockSet.addChildLockSet(this.source.lockSet, 'source');\n  }\n\n  ngOnInit(): void {\n    // Pass data from the form to the source when triggered.\n    this._triggeredSub.subscription = this.source.triggered$\n      .pipe(\n        switchMap(() =>\n          this.form.stream$.pipe(\n            first(),\n            exhaustMap((stream) => {\n              const { isComplete } = stream;\n              const doNothing = {}; // nothing, form not complete\n\n              let obs: Observable<DbxActionValueGetterResult<O>>;\n\n              if (isComplete) {\n                obs = this.form.getValue().pipe(\n                  first(),\n                  exhaustMap((value) =>\n                    this.preCheckReadyValue(value).pipe(\n                      first(),\n                      switchMap((canContinue) => {\n                        if (canContinue) {\n                          return this.readyValue(value).pipe(first());\n                        }\n\n                        return of(doNothing);\n                      }),\n                      catchError((error) => of({ reject: error }))\n                    )\n                  )\n                );\n              } else {\n                obs = of(doNothing);\n              }\n\n              return obs;\n            })\n          )\n        )\n      )\n      .subscribe((result: DbxActionValueGetterResult<O>) => {\n        if (result.reject) {\n          this.source.reject(result.reject);\n        } else if (result.value == null) {\n          // value isn't ready\n        } else {\n          this.source.readyValue(result.value);\n        }\n      });\n\n    // Update the enabled/disabled state\n    this._isCompleteSub.subscription = this.form.stream$\n      .pipe(\n        delay(0),\n        filter((x) => x.state !== DbxFormState.INITIALIZING),\n        switchMap((event) => {\n          // Use both changes count and whether or not something was in the past to guage whether or not the item has been touched.\n          // Angular Form's untouched is whether or not focus has been lost but we can still receive value updates.\n          // More than a certain amount of updates implies that it is being typed into/used.\n          // 3 changes and 2 seconds are arbitrary values derived from guesses about any slow/late changes that may come from external directives for setup.\n          const isProbablyTouched = !event.untouched || ((event.changesCount ?? 0) > 3 && isPast(addSeconds(event.lastResetAt ?? new Date(), 2)));\n          const runIsValidCheck = event.isComplete;\n          const isConsideredModified = event.pristine === false && isProbablyTouched;\n\n          return this.form.currentValue().pipe(\n            first(),\n            exhaustMap((value) => {\n              const returnFalseFunction = () => of(false);\n              const isValidFunction: Maybe<IsValidFunction<T>> = runIsValidCheck ? undefined : returnFalseFunction;\n              const isModifiedFunction: Maybe<IsModifiedFunction<T>> = isConsideredModified ? undefined : returnFalseFunction;\n\n              return this.checkIsValidAndIsModified(value, { isValidFunction, isModifiedFunction }).pipe(\n                map(([valid, modified]: [boolean, boolean]) => ({ valid, modified })),\n                first()\n              );\n            })\n          );\n        })\n      )\n      .subscribe(({ valid, modified }) => {\n        // Update Modified State\n        this.source.setIsModified(modified);\n\n        // Disable if the form is not yet complete/valid.\n        this.source.enable(APP_ACTION_FORM_DISABLED_KEY, valid);\n      });\n\n    // Watch the working state and disable form while working\n    this._isWorkingSub.subscription = combineLatest([this.source.isWorking$, this.dbxActionFormDisabledOnWorking$])\n      .pipe(\n        map(([isWorking, disableFormWhileWorking]: [boolean, Maybe<boolean>]) => disableFormWhileWorking !== false && isWorking),\n        distinctUntilChanged()\n      )\n      .subscribe((disable) => {\n        this.form.setDisabled(APP_ACTION_FORM_DISABLED_KEY, disable);\n      });\n  }\n\n  /**\n   * Checks whether the given form value is both valid and modified, optionally applying override functions.\n   *\n   * @param value - The current form value to check.\n   * @param overrides - Optional override functions for the validity and modification checks.\n   * @returns An observable emitting a tuple of `[isValid, isModified]`.\n   */\n  checkIsValidAndIsModified(value: T, overrides?: CheckValidAndModifiedOverrides<T>): Observable<[IsValid, IsModified]> {\n    const { isModifiedFunction: overrideIsModifiedFunction, isValidFunction: overrideIsValidFunction } = overrides ?? {};\n    const isValidFunctionObs = overrideIsValidFunction == null ? this.isValidFunction$ : of(overrideIsValidFunction);\n    const isModifiedFunctionObs = overrideIsModifiedFunction == null ? this.isModifiedFunction$ : of(overrideIsModifiedFunction);\n\n    return combineLatest([isValidFunctionObs, isModifiedFunctionObs]).pipe(\n      switchMap(([isValid, isModified]) => {\n        return combineLatest([isValid(value), isModified(value)]).pipe(map(([valid, modified]) => [valid, modified] as [boolean, boolean]));\n      })\n    );\n  }\n\n  /**\n   * Pre-checks whether the form value is valid and modified before marking it as ready.\n   *\n   * @param value - The current form value.\n   * @returns An observable emitting a tuple of `[isValid, isModified]`.\n   */\n  protected preCheckReadyValue(value: T): Observable<[IsValid, IsModified]> {\n    return this.checkIsValidAndIsModified(value);\n  }\n\n  /**\n   * Transforms the form value into an action value result, applying the optional map function if provided.\n   *\n   * @param value - The validated form value.\n   * @returns An observable emitting the action value getter result.\n   */\n  protected readyValue(value: T): Observable<DbxActionValueGetterResult<O>> {\n    return this.mapValueFunction$.pipe(\n      switchMap((mapFunction) => {\n        if (mapFunction) {\n          return asObservable(mapFunction(value));\n        }\n\n        return of({ value: value as unknown as O });\n      })\n    );\n  }\n}\n\n/**\n * Optional overrides for the validity and modification check functions\n * used by {@link DbxActionFormDirective.checkIsValidAndIsModified}.\n */\ninterface CheckValidAndModifiedOverrides<T> {\n  /**\n   * Override function for the modification check.\n   */\n  isModifiedFunction?: Maybe<IsModifiedFunction<T>>;\n  /**\n   * Override function for the validity check.\n   */\n  isValidFunction?: Maybe<IsValidFunction<T>>;\n}\n","import { Directive, effect, inject, input } from '@angular/core';\nimport { type HookResult, type Transition } from '@uirouter/core';\nimport { type DbxActionTransitionSafetyType, DbxActionTransitionSafetyDirective } from '@dereekb/dbx-web';\nimport { DbxActionFormDirective } from '../form.action.directive';\n\n/**\n * Extension of {@link DbxActionTransitionSafetyDirective} that forces the form to update before\n * evaluating transition safety. This ensures the latest form state is considered when deciding\n * whether to block or allow a route transition.\n *\n * NOTE: Only works with UIRouter.\n *\n * @selector `[dbxActionFormSafety]`\n *\n * @typeParam T - The form value type.\n * @typeParam O - The output value type passed to the action source.\n */\n@Directive({\n  selector: '[dbxActionFormSafety]'\n})\nexport class DbxActionFormSafetyDirective<T, O> extends DbxActionTransitionSafetyDirective<T, O> {\n  readonly dbxActionForm = inject(DbxActionFormDirective<T>, { host: true });\n\n  /**\n   * The safety type that controls when transitions are blocked.\n   *\n   * Defaults to `'auto'`, which blocks transitions when the form has unsaved changes.\n   */\n  readonly dbxActionFormSafety = input<DbxActionTransitionSafetyType>('auto');\n\n  protected readonly _dbxActionFormSafetyUpdateEffect = effect(() => this._safetyType.next(this.dbxActionFormSafety()));\n\n  protected override _handleOnBeforeTransition(transition: Transition): HookResult {\n    this.dbxActionForm.form.forceFormUpdate();\n    return super._handleOnBeforeTransition(transition);\n  }\n}\n","import { type FieldDef, type FormConfig, type RegisteredFieldTypes } from '@ng-forge/dynamic-forms';\nimport { filterMaybeArrayValues, filterUndefinedValues, filterUniqueValues, type Maybe } from '@dereekb/util';\n\n// MARK: DbxForgeField\n/**\n * A FieldDef that has been augmented with @dereekb/dbx-form specific properties that are passed to a dbx-forge form.\n */\nexport type DbxForgeField<F extends FieldDef<any>> = F & {\n  /**\n   * Form-level configuration that was generated at a field level.\n   *\n   * This is read by dbx-forge when importing configuration and is merged into the input FormConfig.\n   */\n  readonly _formConfig?: Maybe<DbxForgeFieldFormConfig>;\n};\n\n/**\n * Contains a reference to hidden sister fields.\n */\nexport interface DbxForgeFieldHiddenFieldsRef {\n  readonly _hiddenFields?: (FieldDef<any> & { hidden: true })[];\n}\n\n/**\n * Form-level configuration that was generated at a field level.\n */\nexport interface DbxForgeFieldFormConfig extends Partial<Pick<FormConfig, 'schemas' | 'externalData' | 'customFnConfig' | 'defaultValidationMessages'>>, DbxForgeFieldHiddenFieldsRef {}\n\n/**\n * Merges multiple field-level form configs into a single config, layering later inputs on top\n * of earlier ones for `externalData`, `customFnConfig`, and `defaultValidationMessages`, while\n * concatenating `schemas`.\n *\n * Keys whose merged value is empty are dropped from the result (no empty `{}` or `[]` fields).\n *\n * @param input - Field form configs to merge, from lowest to highest priority.\n * @returns A merged config with only populated fields retained.\n */\nexport function mergeDbxForgeFieldFormConfig(...input: DbxForgeFieldFormConfig[]): DbxForgeFieldFormConfig {\n  const schemas: NonNullable<FormConfig['schemas']> = [];\n  const externalData: NonNullable<FormConfig['externalData']> = {};\n  const customFnConfig: NonNullable<FormConfig['customFnConfig']> = {};\n  const defaultValidationMessages: NonNullable<FormConfig['defaultValidationMessages']> = {};\n\n  input.forEach((fieldFormConfig) => {\n    if (fieldFormConfig.schemas) {\n      schemas.push(...fieldFormConfig.schemas);\n    }\n\n    if (fieldFormConfig.externalData) {\n      Object.assign(externalData, fieldFormConfig.externalData);\n    }\n\n    if (fieldFormConfig.customFnConfig) {\n      mergeCustomFnConfigInto(customFnConfig, fieldFormConfig.customFnConfig);\n    }\n\n    if (fieldFormConfig.defaultValidationMessages) {\n      Object.assign(defaultValidationMessages, fieldFormConfig.defaultValidationMessages);\n    }\n  });\n\n  const result: DbxForgeFieldFormConfig = filterUndefinedValues({\n    schemas: schemas.length > 0 ? schemas : undefined,\n    externalData: Object.keys(externalData).length > 0 ? externalData : undefined,\n    customFnConfig: Object.keys(customFnConfig).length > 0 ? customFnConfig : undefined,\n    defaultValidationMessages: Object.keys(defaultValidationMessages).length > 0 ? defaultValidationMessages : undefined\n  });\n\n  return result;\n}\n\n// MARK: CustomFnConfig\nconst CUSTOM_FN_CONFIG_KEYS: (keyof NonNullable<FormConfig['customFnConfig']>)[] = ['customFunctions', 'derivations', 'asyncDerivations', 'asyncConditions', 'validators', 'asyncValidators', 'httpValidators'];\n\n/**\n * Produces a shallow copy of a `FormConfig.customFnConfig` that clones each inner bucket\n * (validators, derivations, etc.) so downstream merges can mutate the result without\n * leaking writes back to the original form config.\n *\n * @param input - The customFnConfig to copy, or undefined.\n * @returns A new customFnConfig containing only the known buckets, each one a fresh object.\n */\nexport function copyFormConfigCustomFnConfig(input: FormConfig['customFnConfig']): FormConfig['customFnConfig'] {\n  const customFnConfig: FormConfig['customFnConfig'] = {};\n\n  for (const key of CUSTOM_FN_CONFIG_KEYS) {\n    const value = input?.[key];\n\n    if (value) {\n      (customFnConfig as any)[key] = { ...value };\n    }\n  }\n\n  return customFnConfig;\n}\n\nfunction mergeCustomFnConfigInto(target: FormConfig['customFnConfig'], source: FormConfig['customFnConfig']): void {\n  for (const key of CUSTOM_FN_CONFIG_KEYS) {\n    const sourceValue = source?.[key];\n\n    if (sourceValue) {\n      (target as any)[key] = { ...(target as any)?.[key], ...sourceValue };\n    }\n  }\n}\n\n// MARK: Form Config\nexport interface DbxForgeGlobalFormConfigDefaults extends Pick<FormConfig, 'defaultValidationMessages'> {}\n\nexport interface DbxForgeFinalizeFormConfigResult {\n  /**\n   * The input config that was used to generate the field configs.\n   */\n  readonly input: FormConfig;\n  /**\n   * The field configs that were extracted from the input's fields.\n   */\n  readonly extractedFieldFormConfigs: DbxForgeFieldFormConfig[];\n  /**\n   * The final output config.\n   */\n  readonly config: FormConfig;\n}\n\n/**\n * Recursively walks a list of fields, returning every field encountered including those\n * nested inside containers, groups, rows, pages, and array fields.\n *\n * Container-style fields (container/group/row/page/full ArrayField) place their children\n * under `fields`; `SimplifiedArrayField` places its children under `template`. Both are\n * traversed here so that `_formConfig` declared on a deeply-nested field still gets pulled\n * up to the form level.\n *\n * @param fields - The top-level fields to walk.\n * @returns A flat list of every field reachable from the inputs, in pre-order.\n */\nfunction flattenForgeFields(fields: readonly FieldDef<any>[]): DbxForgeField<FieldDef<any>>[] {\n  const out: DbxForgeField<FieldDef<any>>[] = [];\n\n  function visit(field: FieldDef<any>): void {\n    out.push(field as DbxForgeField<FieldDef<any>>);\n\n    const fieldWithChildren = field as { fields?: unknown; template?: unknown };\n\n    // ContainerField / GroupField / RowField / PageField / ArrayField all carry their\n    // children under `fields`. ArrayField entries may themselves be either a FieldDef\n    // or an array of FieldDefs (object items).\n    if (Array.isArray(fieldWithChildren.fields)) {\n      for (const child of fieldWithChildren.fields) {\n        if (Array.isArray(child)) {\n          for (const grandchild of child) {\n            if (grandchild != null && typeof grandchild === 'object') {\n              visit(grandchild as FieldDef<any>);\n            }\n          }\n        } else if (child != null && typeof child === 'object') {\n          visit(child as FieldDef<any>);\n        }\n      }\n    }\n\n    // SimplifiedArrayField carries its child shape under `template`, which can be either\n    // a single FieldDef (primitive items) or an array of FieldDefs (object items).\n    const template = fieldWithChildren.template;\n\n    if (template != null) {\n      if (Array.isArray(template)) {\n        for (const child of template) {\n          if (child != null && typeof child === 'object') {\n            visit(child as FieldDef<any>);\n          }\n        }\n      } else if (typeof template === 'object') {\n        visit(template as FieldDef<any>);\n      }\n    }\n  }\n\n  for (const field of fields) {\n    visit(field);\n  }\n\n  return out;\n}\n\n/**\n * Finalizes a `FormConfig` for consumption by dbx-forge by pulling field-level `_formConfig`\n * values up to the form level and appending any `_hiddenFields` so they participate in\n * validation and value wiring without being rendered.\n *\n * The walk is recursive: `_formConfig` declared on a field nested inside a container,\n * group, row, page, or array (full or simplified) is pulled up alongside top-level\n * `_formConfig` so derivations and validators registered by a child field factory\n * (e.g. an idempotent transform on a state field inside an address flex layout) are\n * preserved when the field is composed into a parent layout.\n *\n * Layering order (lowest to highest priority): `globalDefaults`, the input form's own config,\n * then each field's `_formConfig` in pre-order traversal — so a later field can override an\n * earlier field's default validation message.\n *\n * @param input - The FormConfig authored by the caller.\n * @param globalDefaults - Seed values for workspace-wide defaults (e.g. validation messages)\n * @returns The original input, the extracted field form configs, and the finalized config.\n */\nexport function dbxForgeFinalizeFormConfig(input: FormConfig, globalDefaults?: DbxForgeGlobalFormConfigDefaults): DbxForgeFinalizeFormConfigResult {\n  const { fields } = input;\n\n  const allFields = flattenForgeFields(fields);\n\n  /**\n   * Extract all the values from the fields that are of type DbxForgeFieldFormConfig.\n   */\n  const extractedFieldFormConfigs: DbxForgeFieldFormConfig[] = filterMaybeArrayValues(allFields.map((x) => x._formConfig));\n\n  const globalDefaultsLayer: DbxForgeFieldFormConfig = globalDefaults ? { defaultValidationMessages: globalDefaults.defaultValidationMessages } : {};\n  const merged = mergeDbxForgeFieldFormConfig(globalDefaultsLayer, { schemas: input.schemas, externalData: input.externalData, customFnConfig: copyFormConfigCustomFnConfig(input.customFnConfig ?? {}), defaultValidationMessages: input.defaultValidationMessages }, ...extractedFieldFormConfigs);\n\n  // Extract hidden fields from field-level _hiddenFields and _formConfig._hiddenFields\n  const hiddenFields: RegisteredFieldTypes[] = [];\n\n  for (const field of allFields) {\n    if (field._formConfig?._hiddenFields) {\n      field._formConfig._hiddenFields.forEach((x) => {\n        hiddenFields.push(x as RegisteredFieldTypes);\n      });\n    }\n  }\n\n  const config = {\n    ...input,\n    fields: hiddenFields.length > 0 ? [...fields, ...hiddenFields] : fields,\n    schemas: merged.schemas ? filterUniqueValues(merged.schemas, (x) => x.name) : input.schemas,\n    externalData: merged.externalData ?? input.externalData,\n    customFnConfig: merged.customFnConfig ?? input.customFnConfig,\n    defaultValidationMessages: merged.defaultValidationMessages ?? input.defaultValidationMessages\n  };\n\n  return {\n    input,\n    extractedFieldFormConfigs: extractedFieldFormConfigs,\n    config\n  };\n}\n","import type { ValidationMessages } from '@ng-forge/dynamic-forms';\n\n/**\n * Default validation messages for all built-in Angular validators.\n *\n * Uses ng-forge's `{{param}}` interpolation for dynamic values.\n *\n * Can be used as `FormConfig.defaultValidationMessages` to apply form-wide,\n * or spread into individual field `validationMessages`.\n *\n * @returns A ValidationMessages object with messages for required, email, minLength, maxLength, min, max, and pattern validators.\n *\n * @example\n * ```typescript\n * const config: FormConfig = {\n *   fields: [...],\n *   defaultValidationMessages: forgeDefaultValidationMessages()\n * };\n * ```\n */\nexport function dbxForgeDefaultValidationMessages(): ValidationMessages {\n  return {\n    required: 'This field is required.',\n    email: 'Invalid email address.',\n    minLength: 'Should have at least {{requiredLength}} characters.',\n    maxLength: 'This value should be less than {{requiredLength}} characters.',\n    min: 'This value should be more than or equal to {{min}}.',\n    max: 'This value should be less than or equal to {{max}}.',\n    pattern: 'Invalid format.'\n  };\n}\n","import { Service } from '@angular/core';\nimport { type ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { type Maybe } from '@dereekb/util';\nimport { dbxForgeDefaultValidationMessages } from '../validation';\nimport { type DbxForgeGlobalFormConfigDefaults } from './forge.form';\n\n/**\n * Root-provided service that holds the {@link DbxForgeGlobalFormConfigDefaults} applied\n * as the lowest-priority layer during {@link dbxForgeFinalizeFormConfig} merging.\n *\n * Seeded with {@link dbxForgeDefaultValidationMessages} so apps receive the standard\n * dbx-form validation messages without any explicit configuration.\n */\n@Service()\nexport class DbxForgeGlobalDefaultConfigService {\n  private _defaults: DbxForgeGlobalFormConfigDefaults = {\n    defaultValidationMessages: dbxForgeDefaultValidationMessages()\n  };\n\n  /**\n   * Returns the current global defaults applied to every finalized forge form config.\n   *\n   * @returns The active {@link DbxForgeGlobalFormConfigDefaults} object.\n   *\n   * @example\n   * ```ts\n   * const defaults = service.getGlobalDefaults();\n   * ```\n   */\n  getGlobalDefaults(): DbxForgeGlobalFormConfigDefaults {\n    return this._defaults;\n  }\n\n  /**\n   * Replaces the entire global defaults object.\n   *\n   * @param value - The new {@link DbxForgeGlobalFormConfigDefaults} to apply.\n   *\n   * @example\n   * ```ts\n   * service.setGlobalDefaults({ defaultValidationMessages: { required: 'Required' } });\n   * ```\n   */\n  setGlobalDefaults(value: DbxForgeGlobalFormConfigDefaults): void {\n    this._defaults = value;\n  }\n\n  /**\n   * Replaces only the default validation messages on the global defaults, preserving\n   * any other fields in the current defaults object.\n   *\n   * @param messages - The {@link ValidationMessages} to apply, or `undefined` to clear.\n   *\n   * @example\n   * ```ts\n   * service.setDefaultValidationMessages({ required: 'This field is required.' });\n   * ```\n   */\n  setDefaultValidationMessages(messages: Maybe<ValidationMessages>): void {\n    this._defaults = { ...this._defaults, defaultValidationMessages: messages ?? undefined };\n  }\n}\n","import { Injectable, type OnDestroy, type Provider, type Signal, signal, computed, inject } from '@angular/core';\nimport { BehaviorSubject, combineLatest, type Observable, shareReplay, switchMap, filter, map, scan } from 'rxjs';\nimport { type DbxMutableForm, type DbxFormEvent, type DbxFormDisabledKey, DbxFormState, DEFAULT_FORM_DISABLED_KEY, provideDbxMutableForm } from '../../form/form';\nimport { type BooleanStringKeyArray, BooleanStringKeyArrayUtility, type FilterFromPOJOFunction, type Maybe } from '@dereekb/util';\nimport { LockSet, filterMaybe } from '@dereekb/rxjs';\nimport { type FormConfig } from '@ng-forge/dynamic-forms';\nimport { type FieldTree } from '@angular/forms/signals';\nimport { type DbxForgeFinalizeFormConfigResult, dbxForgeFinalizeFormConfig } from './forge.form';\nimport { DbxForgeGlobalDefaultConfigService } from './forge.global-defaults.service';\n\n/**\n * Recursively strips keys that start with `_` from a form value object.\n *\n * ng-forge wrapper/layout fields (sections, toggles, expand, rows) use auto-generated\n * keys prefixed with `_` (e.g. `_section_1`, `_toggle_2`). These are layout artifacts\n * and should not appear in the final form output.\n *\n * - Object values under `_` keys are \"unwrapped\": their contents are merged into the parent.\n * - Primitive values under `_` keys (e.g. toggle booleans) are dropped entirely.\n * - Non-underscore keys are preserved, with recursive cleaning of nested objects.\n *\n * @param value - The form value object to clean.\n * @returns A new object with internal `_`-prefixed keys stripped and their object values unwrapped.\n *\n * @example\n * ```\n * stripForgeInternalKeys({ _toggle_1: false, _section_6: { name: \"Bob\" } })\n * // → { name: \"Bob\" }\n * ```\n */\nexport function stripForgeInternalKeys<T>(value: T): T {\n  let result: T;\n\n  if (value == null || typeof value !== 'object' || Array.isArray(value) || value instanceof Date) {\n    result = value;\n  } else {\n    const stripped: Record<string, unknown> = {};\n\n    for (const [key, val] of Object.entries(value as Record<string, unknown>)) {\n      if (key.startsWith('_')) {\n        if (val != null && typeof val === 'object' && !Array.isArray(val)) {\n          Object.assign(stripped, stripForgeInternalKeys(val));\n        }\n        // Primitive _ keys (toggle booleans, etc.) are dropped\n      } else {\n        stripped[key] = stripForgeInternalKeys(val);\n      }\n    }\n\n    result = stripped as T;\n  }\n\n  return result;\n}\n\n/**\n * Returns true if a value is considered \"empty\" for forge form output purposes.\n *\n * Empty means: `null`, `undefined`, empty string `\"\"`, or `NaN`.\n * Note: `false`, `0`, empty arrays `[]`, and other falsy values are NOT empty.\n *\n * @param val - The value to check for emptiness.\n * @returns True if the value is null, undefined, an empty string, or NaN.\n */\nfunction isEmptyFormValue(val: unknown): boolean {\n  return val === null || val === undefined || val === '' || Number.isNaN(val);\n}\n\n/**\n * Recursively strips keys whose values are empty (`null`, `undefined`, `\"\"`, or `NaN`)\n * from a form value object. Also removes keys whose values become empty objects\n * `{}` after recursive stripping.\n *\n * Arrays are recursed into so that empties inside nested objects are stripped,\n * but array length and item indices are preserved — primitive empty values\n * (e.g. `NaN`, `''`) inside an array stay in place, since shifting indices would\n * change the semantics of chip/list-style array fields.\n *\n * This normalizes ng-forge output so the model only includes keys that have\n * been explicitly set by the user.\n *\n * @param value - The form value object to clean.\n * @returns A new object with empty-valued keys removed.\n *\n * @example\n * ```\n * stripEmptyForgeValues({ name: \"\", age: null, active: false, count: 0 })\n * // → { active: false, count: 0 }\n *\n * stripEmptyForgeValues({ section: { a: \"\", b: \"\" } })\n * // → {}\n *\n * stripEmptyForgeValues({ items: [{ amount: NaN, name: 'a' }, { amount: 5 }] })\n * // → { items: [{ name: 'a' }, { amount: 5 }] }\n * ```\n */\nexport function stripEmptyForgeValues<T>(value: T): T {\n  let result: T;\n\n  if (value == null || typeof value !== 'object' || value instanceof Date) {\n    result = value;\n  } else if (Array.isArray(value)) {\n    result = (value as unknown[]).map((item) => stripEmptyForgeValues(item)) as unknown as T;\n  } else {\n    const stripped: Record<string, unknown> = {};\n\n    for (const [key, val] of Object.entries(value as Record<string, unknown>)) {\n      if (isEmptyFormValue(val)) {\n        continue;\n      }\n\n      if (typeof val === 'object' && !(val instanceof Date)) {\n        const cleaned = stripEmptyForgeValues(val);\n\n        if (Array.isArray(cleaned) || (cleaned != null && Object.keys(cleaned).length > 0)) {\n          stripped[key] = cleaned;\n        }\n      } else {\n        stripped[key] = val;\n      }\n    }\n\n    result = stripped as T;\n  }\n\n  return result;\n}\n\n/**\n * Context service managing a ng-forge dynamic form's connection to the DbxForm system.\n *\n * Bridges ng-forge's signal-based form state to the existing DbxForm/DbxMutableForm\n * Observable-based interface — a lightweight implementation with no delegate pattern needed.\n */\n@Injectable()\nexport class DbxForgeFormContext<T = unknown> implements DbxMutableForm<T>, OnDestroy {\n  private readonly dbxForgeGlobalDefaultsConfigService = inject(DbxForgeGlobalDefaultConfigService);\n\n  private static readonly INITIAL_STATE: DbxFormEvent = {\n    isComplete: false,\n    state: DbxFormState.INITIALIZING,\n    status: 'PENDING'\n  };\n\n  readonly lockSet = new LockSet();\n\n  /**\n   * When true (default), {@link getValue} only emits values when the form is valid.\n   * Set to false to emit all values regardless of validation state.\n   */\n  requireValid = true;\n\n  /**\n   * When true (default), keys starting with `_` are stripped from the form value\n   * before it is emitted by {@link getValue}. These keys are layout artifacts from\n   * ng-forge wrappers (sections, toggles, expand groups, rows) and are not part of\n   * the domain model.\n   *\n   * Object values under `_` keys are unwrapped (contents merged into parent);\n   * primitive `_` values (e.g. toggle booleans) are dropped entirely.\n   */\n  stripInternalKeys = true;\n\n  /**\n   * When true (default), keys whose values are empty (`null`, `undefined`, `\"\"`, or `NaN`)\n   * are stripped from the form value before emission. This normalizes ng-forge output\n   * so the model only includes keys that have been explicitly set by the user.\n   *\n   * Note: `false`, `0`, and empty arrays are NOT considered empty and are preserved.\n   */\n  stripEmptyValues = true;\n\n  /**\n   * Optional custom POJO filter applied during the `formValue` signal's deep-equality\n   * comparison. When set, this filter replaces the default filter that strips `_`-prefixed\n   * keys and null/undefined values.\n   *\n   * Useful for testing scenarios where `stripInternalKeys` is `false` and the `_`-prefixed\n   * keys must participate in equality checks.\n   */\n  formValuePojoFilter: Maybe<FilterFromPOJOFunction<unknown>>;\n\n  /**\n   * When true (default), the form still reports `isComplete` based on validity even\n   * while disabled, so disabling a form only locks inputs but does not suppress the\n   * form value.\n   *\n   * When false, `isComplete` is forced to `false` while disabled, preventing the\n   * action system from reading the form value. `false` is the native ng-forge default\n   * behavior, where a disabled form does not produce output.\n   */\n  emitValueWhenDisabled = true;\n\n  /**\n   * Tracks validity signals from nested wrapper forms (e.g. forgeFormFieldWrapper,\n   * section wrapper). These wrappers create isolated DynamicForm instances\n   * whose validity is not visible to the parent DynamicForm.valid() signal.\n   *\n   * Wrapper components register their nested form's validity via {@link registerWrapperValidity},\n   * and the combined result is exposed as {@link allWrappersValid}.\n   */\n  private readonly _wrapperValidSignals = new Set<Signal<boolean>>();\n  private readonly _wrapperValidSignalsVersion = signal(0);\n\n  /**\n   * Computed signal that is `true` when all registered wrapper nested forms are valid.\n   * Returns `true` when no wrappers are registered.\n   */\n  readonly allWrappersValid = computed(() => {\n    this._wrapperValidSignalsVersion(); // depend on version to retrigger when wrappers register/unregister\n    let result = true;\n\n    for (const s of this._wrapperValidSignals) {\n      if (!s()) {\n        result = false;\n        break;\n      }\n    }\n\n    return result;\n  });\n\n  /**\n   * Registers a wrapper's nested form validity signal for tracking.\n   *\n   * Call this from wrapper content components so that validation errors in nested\n   * DynamicForm instances propagate to the parent form's validity state.\n   *\n   * @param valid - The wrapper's nested form validity signal.\n   * @returns A cleanup function that unregisters the signal. Call on component destroy.\n   */\n  registerWrapperValidity(valid: Signal<boolean>): () => void {\n    this._wrapperValidSignals.add(valid);\n    this._wrapperValidSignalsVersion.update((v) => v + 1);\n\n    return () => {\n      this._wrapperValidSignals.delete(valid);\n      this._wrapperValidSignalsVersion.update((v) => v + 1);\n    };\n  }\n\n  /**\n   * The parent DynamicForm's field tree, set by DbxForgeFormComponent.\n   *\n   * Allows wrapper field components to write values to sibling hidden fields\n   * in the parent form (e.g., for the form-field wrapper's hidden field sync).\n   */\n  private readonly _parentFormTree = signal<FieldTree<Record<string, unknown>> | undefined>(undefined);\n  readonly parentFormTree = this._parentFormTree.asReadonly();\n\n  setParentFormTree(tree: FieldTree<Record<string, unknown>> | undefined): void {\n    this._parentFormTree.set(tree);\n  }\n\n  private readonly _config = new BehaviorSubject<Maybe<FormConfig>>(undefined);\n  private readonly _disabled = new BehaviorSubject<BooleanStringKeyArray>(undefined);\n  private readonly _formState = new BehaviorSubject<DbxFormEvent>(DbxForgeFormContext.INITIAL_STATE);\n  private readonly _value = new BehaviorSubject<Maybe<T>>(undefined);\n  private readonly _isValid = new BehaviorSubject<boolean>(false);\n  private readonly _setValue = new BehaviorSubject<Maybe<Partial<T>>>(undefined);\n  private readonly _reset = new BehaviorSubject<Date>(new Date());\n\n  private readonly _internalConfig$: Observable<Maybe<DbxForgeFinalizeFormConfigResult>> = this._config.pipe(\n    scan<Maybe<FormConfig>, Maybe<DbxForgeFinalizeFormConfigResult>, Maybe<DbxForgeFinalizeFormConfigResult>>((acc, config) => {\n      let result: Maybe<DbxForgeFinalizeFormConfigResult>;\n\n      if (config) {\n        if (acc?.input === config) {\n          result = acc;\n        } else {\n          result = dbxForgeFinalizeFormConfig(config, this.dbxForgeGlobalDefaultsConfigService.getGlobalDefaults());\n        }\n      } else {\n        result = undefined;\n      }\n\n      return result;\n    }, undefined),\n    shareReplay(1)\n  );\n\n  readonly config$: Observable<FormConfig> = this._internalConfig$.pipe(\n    filterMaybe(),\n    map(({ config }) => config),\n    shareReplay(1)\n  );\n\n  /**\n   * Form event stream that restarts on each reset, mirroring the formly form's\n   * switchMap-on-reset pattern. This ensures that each resetForm() produces a fresh\n   * emission sequence, so dbxFormSource's distinctUntilChanged on state can detect\n   * the RESET transition even if the previous state was also RESET.\n   */\n  readonly stream$: Observable<DbxFormEvent> = this._reset.pipe(\n    switchMap(() => this._formState.asObservable()),\n    shareReplay(1)\n  );\n\n  readonly setValue$ = this._setValue.asObservable();\n  readonly disabled$ = this._disabled.asObservable();\n  readonly reset$ = this._reset.asObservable();\n\n  get config(): Maybe<FormConfig> {\n    return this._config.value;\n  }\n\n  set config(config: Maybe<FormConfig>) {\n    this._config.next(config);\n  }\n\n  updateFormState(state: DbxFormEvent): void {\n    this._formState.next(state);\n  }\n\n  updateValue(value: T): void {\n    let cleaned = this.stripInternalKeys ? stripForgeInternalKeys(value) : value;\n    cleaned = this.stripEmptyValues ? stripEmptyForgeValues(cleaned) : cleaned;\n    this._value.next(cleaned);\n  }\n\n  updateIsValid(valid: boolean): void {\n    this._isValid.next(valid);\n  }\n\n  getValue(): Observable<T> {\n    let result: Observable<T>;\n\n    if (this.requireValid) {\n      result = combineLatest([this._value.pipe(filterMaybe()), this._isValid]).pipe(\n        filter(([, valid]) => valid),\n        map(([value]) => value)\n      );\n    } else {\n      result = this._value.pipe(filterMaybe());\n    }\n\n    return result;\n  }\n\n  /**\n   * Emits the current form value regardless of {@link requireValid}. Used by infrastructure\n   * that needs the underlying value while the form is invalid (e.g. {@link DbxActionFormDirective}\n   * feeding the value into user-supplied isModified functions to drive the action's disabled state).\n   *\n   * @returns An observable of the latest non-null form value, regardless of validity.\n   */\n  currentValue(): Observable<T> {\n    return this._value.pipe(filterMaybe());\n  }\n\n  getDisabled(): Observable<BooleanStringKeyArray> {\n    return this._disabled.asObservable();\n  }\n\n  setValue(value: Maybe<Partial<T>>): void {\n    this._setValue.next(value);\n  }\n\n  resetForm(): void {\n    this._reset.next(new Date());\n  }\n\n  setDisabled(key?: DbxFormDisabledKey, disabled = true): void {\n    const next = BooleanStringKeyArrayUtility.set(this._disabled.value, key ?? DEFAULT_FORM_DISABLED_KEY, disabled);\n    this._disabled.next(next);\n  }\n\n  forceFormUpdate(): void {\n    // Signal forms update automatically — this is a no-op for forge\n  }\n\n  ngOnDestroy(): void {\n    this.lockSet.destroyOnNextUnlock(() => {\n      this._config.complete();\n      this._disabled.complete();\n      this._formState.complete();\n      this._value.complete();\n      this._isValid.complete();\n      this._setValue.complete();\n      this._reset.complete();\n    });\n  }\n}\n\n/**\n * Provides DbxForgeFormContext and registers it as both DbxForm and DbxMutableForm.\n *\n * @returns The providers registering the forge form context for dependency injection.\n */\nexport function provideDbxForgeFormContext(): Provider[] {\n  return [DbxForgeFormContext, ...provideDbxMutableForm(DbxForgeFormContext)];\n}\n","import { Injectable, type Signal, computed, inject, untracked } from '@angular/core';\nimport { type EvaluationContext, type DynamicForm, DynamicFormLogger } from '@ng-forge/dynamic-forms';\nimport type { ArrayContext } from '@ng-forge/dynamic-forms/integration';\nimport type { FieldTree } from '@angular/forms/signals';\n\n/**\n * Abstract injectable that exposes the active {@link DynamicForm} instance as a signal.\n *\n * Implemented by {@link DbxForgeFormComponent} and provided via\n * `{ provide: DbxForgeDynamicFormSignalRef, useExisting: DbxForgeFormComponent }`.\n *\n * Services provided at the forge-component level cannot inject ng-forge's\n * `RootFormRegistryService` (which is provided BY `DynamicForm`, a child of\n * {@link DbxForgeFormComponent}). This abstract ref lets higher-level services\n * ({@link DbxForgeFormContextService}) reactively read from DynamicForm without\n * relying on its injector.\n */\nexport abstract class DbxForgeDynamicFormSignalRef {\n  abstract readonly dynamicForm: Signal<DynamicForm<any, any> | undefined>;\n}\n\n/**\n * Input for {@link DbxForgeFormContextService.createArrayItemEvaluationContext}.\n */\nexport interface DbxForgeArrayItemEvaluationContextInput {\n  /**\n   * The array context for the current array item, retrieved via `inject(ARRAY_CONTEXT)`\n   * inside an array element wrapper.\n   */\n  readonly arrayContext: ArrayContext;\n  /**\n   * When true, reads from the form value / array index signals create reactive\n   * dependencies so a consuming `computed()` re-evaluates on change.\n   *\n   * When false (default), reads are wrapped in `untracked()` to prevent cycles\n   * in validators and similar non-reactive callers.\n   */\n  readonly reactive?: boolean;\n}\n\n/**\n * Provides {@link EvaluationContext} objects for dbx-forge wrapper and field components.\n *\n * Mirrors the subset of ng-forge's internal `FieldContextRegistryService` that we can\n * build from the public API. Provided at the {@link DbxForgeFormComponent} level so\n * every descendant wrapper/field can inject it without repeating providers.\n *\n * Reads form state via {@link DbxForgeDynamicFormSignalRef} — ng-forge's\n * `RootFormRegistryService` is provided below the forge component and is not\n * reachable from this injector level.\n *\n * Currently supports array-item-scoped contexts. Field-level and display-only\n * contexts may be added later as needs arise.\n */\n@Injectable()\nexport class DbxForgeFormContextService {\n  private readonly _signalRef = inject(DbxForgeDynamicFormSignalRef);\n  private readonly _logger = inject(DynamicFormLogger);\n\n  /**\n   * The active {@link DynamicForm} instance (undefined until the view-child resolves).\n   */\n  readonly dynamicForm = this._signalRef.dynamicForm;\n\n  /**\n   * Current form value as a plain record. Empty object when the DynamicForm hasn't\n   * mounted yet.\n   */\n  readonly formValue: Signal<Record<string, unknown>> = computed(() => {\n    const form = this._signalRef.dynamicForm();\n    return (form?.formValue() ?? {}) as Record<string, unknown>;\n  });\n\n  /**\n   * The active Signal Form tree, or undefined until the DynamicForm mounts.\n   */\n  readonly rootForm: Signal<FieldTree<Record<string, unknown>> | undefined> = computed(() => {\n    const form = this._signalRef.dynamicForm();\n    return form?.form() as FieldTree<Record<string, unknown>> | undefined;\n  });\n\n  /**\n   * Builds an {@link EvaluationContext} scoped to the current array item.\n   *\n   * - `fieldValue` is the current item.\n   * - `formValue` is the current item (item-scoped, matching ng-forge's buildArrayScopedContext).\n   * - `rootFormValue` is the full form.\n   * - `arrayIndex` / `arrayPath` come from the provided {@link ArrayContext}.\n   * - `fieldPath` is `\"${arrayKey}.${index}\"`.\n   *\n   * Falls back to the root form value as `formValue` when the array item lookup fails\n   * (bad index, missing array, or non-object item).\n   *\n   * @param input - Configuration specifying the array context and reactivity mode.\n   * @returns An evaluation context scoped to the array item at the current index.\n   */\n  createArrayItemEvaluationContext(input: DbxForgeArrayItemEvaluationContextInput): EvaluationContext {\n    const { arrayContext, reactive = false } = input;\n    const arrayKey = arrayContext.arrayKey;\n\n    const rootFormValue = reactive ? this.formValue() : untracked(() => this.formValue());\n    const index = reactive ? arrayContext.index() : untracked(() => arrayContext.index());\n\n    const arrayData = _getNestedValue(rootFormValue, arrayKey);\n    let itemValue: unknown = undefined;\n    let scopedFormValue: Record<string, unknown> | undefined;\n\n    if (Array.isArray(arrayData) && index >= 0 && index < arrayData.length) {\n      const item = arrayData[index];\n      itemValue = item;\n      if (item != null && typeof item === 'object') {\n        scopedFormValue = item as Record<string, unknown>;\n      }\n    }\n\n    const fieldPath = `${arrayKey}.${index}`;\n    let result: EvaluationContext;\n\n    if (scopedFormValue) {\n      result = {\n        fieldValue: itemValue,\n        formValue: scopedFormValue,\n        rootFormValue,\n        arrayIndex: index,\n        arrayPath: arrayKey,\n        fieldPath,\n        customFunctions: {},\n        logger: this._logger\n      };\n    } else {\n      result = {\n        fieldValue: itemValue,\n        formValue: rootFormValue,\n        fieldPath,\n        customFunctions: {},\n        logger: this._logger\n      };\n    }\n\n    return result;\n  }\n}\n\n/**\n * Resolves a dotted path against a record (e.g. `\"orders.items\"` → rec.orders.items).\n * Returns undefined if any segment is missing.\n *\n * Mirrors ng-forge's internal `getNestedValue` (not exported from the public API) for\n * the nested array-key case.\n *\n * @param source - The root record to traverse.\n * @param path - A dot-separated path string (e.g. `\"orders.items\"`)\n * @returns The value at the resolved path, or undefined if any segment is missing.\n */\nfunction _getNestedValue(source: Record<string, unknown>, path: string): unknown {\n  const segments = path.split('.');\n  let current: unknown = source;\n  let aborted = false;\n\n  for (const segment of segments) {\n    if (current == null || typeof current !== 'object') {\n      aborted = true;\n      break;\n    }\n\n    current = (current as Record<string, unknown>)[segment];\n  }\n\n  return aborted ? undefined : current;\n}\n","import { Component, type OnInit, computed, inject, signal, effect, untracked, viewChild } from '@angular/core';\nimport { DynamicForm, EventDispatcher, type FormOptions } from '@ng-forge/dynamic-forms';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { DbxForm, type DbxFormEvent, DbxFormState, DbxMutableForm } from '../../form/form';\nimport { type BooleanStringKeyArray, BooleanStringKeyArrayUtility, filterUndefinedValues, type Maybe, type FilterFromPOJOFunction, areEqualPOJOValuesUsingPojoFilter } from '@dereekb/util';\nimport { skip } from 'rxjs';\nimport { DbxForgeFormContext } from './forge.context';\nimport { DbxForgeDynamicFormSignalRef, DbxForgeFormContextService } from './forge.context.service';\nimport { cleanSubscription } from '@dereekb/dbx-core';\n\n/**\n * Wraps ng-forge's DynamicForm and bridges it to the DbxForm system.\n *\n * Uses ng-forge's signal-based form value and derives DbxFormEvent state\n * from signal reads rather than complex Observable chains.\n */\n@Component({\n  selector: 'dbx-forge',\n  template: `\n    @if (configSignal()) {\n      <form [dynamic-form]=\"configSignal()!\" [(value)]=\"formValue\" [formOptions]=\"formOptionsSignal()\"></form>\n    }\n  `,\n  host: {\n    class: 'dbx-forge',\n    '[class.dbx-forge-form-disabled]': 'isDisabledSignal()'\n  },\n  providers: [EventDispatcher, { provide: DbxForgeDynamicFormSignalRef, useExisting: DbxForgeFormComponent }, DbxForgeFormContextService, { provide: DbxForm, useExisting: DbxForgeFormContext }, { provide: DbxMutableForm, useExisting: DbxForgeFormContext }],\n  imports: [DynamicForm]\n})\nexport class DbxForgeFormComponent<T extends object = object> implements DbxForgeDynamicFormSignalRef, OnInit {\n  private readonly _context = inject(DbxForgeFormContext<T>);\n\n  private readonly _setValueSub = cleanSubscription();\n  private readonly _resetSub = cleanSubscription();\n  private readonly _disabledSub = cleanSubscription();\n\n  readonly dynamicForm = viewChild(DynamicForm);\n\n  readonly formValue = signal<T>({} as T, { equal: (a, b) => _forgeFormValueEqual(a, b, this._context) });\n  readonly configSignal = toSignal(this._context.config$, { initialValue: undefined });\n\n  private readonly _changesCount = signal(0);\n  private readonly _lastResetAt = signal(new Date());\n  private readonly _isReset = signal(true);\n  private readonly _disabled = signal<BooleanStringKeyArray>(undefined);\n\n  /**\n   * True once ng-forge has finished its synchronous initialization: the config\n   * has arrived, the DynamicForm view child is populated, and ng-forge has\n   * performed its initial field-default writebacks via the two-way [(value)]\n   * binding. A setValue that arrives before this point would be clobbered by\n   * those writebacks, so we queue it until ready.\n   *\n   * The form is kept in RESET state while not ready so that\n   * {@link DbxFormSourceDirective} 'reset' mode still forwards an\n   * asynchronously-resolving value once it arrives.\n   */\n  private readonly _formReady = signal(false);\n\n  /**\n   * A setValue payload received while {@link _formReady} was false. Applied\n   * once ready; only the most recent pending value is retained.\n   *\n   * Wrapped in a single-element object so we can distinguish \"no pending\n   * value\" (undefined) from \"pending value of undefined/null\" (object present\n   * with a null/undefined inner value).\n   */\n  private _pendingValue: Maybe<{ value: Maybe<Partial<T>> }> = undefined;\n\n  readonly isDisabledSignal = computed(() => BooleanStringKeyArrayUtility.isTrue(this._disabled()));\n\n  readonly formOptionsSignal = computed((): FormOptions | undefined => {\n    return this.isDisabledSignal() ? { disabled: true } : undefined;\n  });\n\n  /**\n   * Computed validity combining the ng-forge DynamicForm's valid signal with\n   * validity from all registered wrapper nested forms.\n   *\n   * Wrapper fields (forgeFormFieldWrapper, section wrapper, etc.) create\n   * isolated DynamicForm instances whose validity is not visible to the parent\n   * DynamicForm.valid(). They register their nested validity via\n   * {@link DbxForgeFormContext.registerWrapperValidity}, and this computed combines both sources.\n   */\n  readonly formValidSignal = computed(() => (this.dynamicForm()?.valid() ?? false) && this._context.allWrappersValid());\n\n  /**\n   * Track form value changes and update the context value + changes count.\n   *\n   * Only `formValue()` is tracked — all other signal reads use `untracked()`\n   * to avoid infinite re-triggering from writing back to signals in this effect.\n   *\n   * While the form is not yet ready (see {@link _formReady}), any formValue\n   * change that arrives through ng-forge's two-way [(value)] binding is\n   * treated as an initialization artifact: the context value is still synced,\n   * but the form is held in RESET state (changesCount clamped at 1) so that\n   * {@link DbxFormSourceDirective} in 'reset' mode can still forward an\n   * async source value once it arrives.\n   */\n  protected readonly _formValueEffect = effect(() => {\n    const value = this.formValue();\n\n    untracked(() => {\n      this._context.updateValue(value);\n\n      if (this._formReady()) {\n        const changesCount = this._changesCount() + 1;\n        this._changesCount.set(changesCount);\n\n        const isReset = changesCount <= 1;\n        this._isReset.set(isReset);\n\n        this._emitFormState();\n      } else if (this._changesCount() === 0) {\n        this._changesCount.set(1);\n        this._isReset.set(true);\n        this._emitFormState();\n      }\n    });\n  });\n\n  /**\n   * Marks the form as ready once the ng-forge DynamicForm view child is\n   * populated. The viewChild signal updates after ng-forge has completed its\n   * synchronous initialization (including any field-default writebacks), so\n   * setting ready here is safe — the writebacks have already happened and\n   * been absorbed by the not-ready branch of {@link _formValueEffect}.\n   *\n   * Applies any queued setValue payload immediately upon becoming ready so\n   * that the user-intended value wins over ng-forge's defaults.\n   */\n  protected readonly _formReadyEffect = effect(() => {\n    const df = this.dynamicForm();\n    if (df && !untracked(() => this._formReady())) {\n      untracked(() => {\n        this._formReady.set(true);\n\n        const pending = this._pendingValue;\n        if (pending != null) {\n          this._pendingValue = undefined;\n          this._applySetValueNow(pending.value);\n        }\n      });\n    }\n  });\n\n  /**\n   * Expose the parent DynamicForm's field tree to the context so wrapper components\n   * can write to sibling hidden fields in the parent form.\n   */\n  protected readonly _parentFormTreeEffect = effect(() => {\n    const formTree = this.dynamicForm()?.form();\n    untracked(() => {\n      this._context.setParentFormTree(formTree);\n    });\n  });\n\n  /**\n   * Track validity changes from the DynamicForm and update the context.\n   *\n   * Separated from the value effect so that validity changes (e.g. async validators resolving)\n   * update isComplete and status without incrementing changesCount.\n   */\n  protected readonly _validityEffect = effect(() => {\n    const isValid = this.formValidSignal();\n\n    untracked(() => {\n      this._context.updateIsValid(isValid);\n      this._emitFormState();\n    });\n  });\n\n  protected _emitFormState(): void {\n    const isValid = this.formValidSignal();\n    const isReset = this._isReset();\n    const changesCount = this._changesCount();\n\n    const suppressComplete = this.isDisabledSignal() && !this._context.emitValueWhenDisabled;\n    let status: DbxFormEvent['status'];\n    if (this.isDisabledSignal()) {\n      status = 'DISABLED';\n    } else if (isValid) {\n      status = 'VALID';\n    } else {\n      status = 'INVALID';\n    }\n\n    const state: DbxFormEvent = {\n      isComplete: suppressComplete ? false : isValid,\n      status,\n      state: isReset ? DbxFormState.RESET : DbxFormState.USED,\n      pristine: isReset,\n      untouched: isReset,\n      changesCount,\n      isDisabled: this.isDisabledSignal(),\n      disabled: this._disabled(),\n      lastResetAt: this._lastResetAt()\n    };\n\n    this._context.updateFormState(state);\n  }\n\n  /**\n   * The last value passed to setValue, used as the reset target.\n   * Mirrors formly's behavior where resetForm() restores the initial value\n   * rather than clearing to `{}`. This prevents ng-forge's two-way [(value)]\n   * binding from writing back empty field defaults that overwrite a\n   * subsequent dbxFormSource re-apply.\n   */\n\n  private _initialValue: any = {};\n\n  ngOnInit(): void {\n    // Listen for setValue from context.\n    // Marks the form as USED after applying the value so that dbxFormSource's\n    // distinctUntilChanged on state$ can detect subsequent resetForm() calls\n    // as USED→RESET transitions. Uses changesCount=100 to ensure the value\n    // stays above 1 even after the _formValueEffect increments from a\n    // concurrent resetForm's _resetState (which sets changesCount=0).\n    //\n    // If the form is not yet ready (ng-forge DynamicForm has not rendered\n    // and written its initial field defaults), the value is queued and\n    // applied by _formReadyEffect once the form becomes ready. This covers:\n    //   (a) setValue called before the config$ has emitted (form not rendered)\n    //   (b) setValue called after config but before ng-forge's init writeback\n    //       has settled (would otherwise be clobbered by the writeback)\n    this._setValueSub.subscription = this._context.setValue$.subscribe((value) => {\n      if (value != null) {\n        if (this._formReady()) {\n          this._applySetValueNow(value);\n        } else {\n          this._pendingValue = { value };\n        }\n      }\n    });\n\n    // Listen for reset from context.\n    // Restores the form to the last setValue value (not {}) to match formly behavior\n    // and avoid ng-forge's two-way binding overwriting a pending dbxFormSource re-apply.\n    //\n    // NOTE: _resetState() + formValue update are done here, but _emitFormState()\n    // is NOT called. The context's stream$ uses switchMap on _reset, so when\n    // _reset fires (from context.resetForm()), the switchMap creates a new inner\n    // subscription to _formState. We update _formState via _emitFormState() in\n    // a microtask so the new inner subscription is ready to receive it.\n    this._resetSub.subscription = this._context.reset$.pipe(skip(1)).subscribe(() => {\n      this._resetState();\n      this.formValue.set(structuredClone(this._initialValue));\n      // Emit on next microtask so the switchMap in stream$ has restarted\n      void Promise.resolve().then(() => this._emitFormState());\n    });\n\n    // Listen for disabled state changes from context\n    this._disabledSub.subscription = this._context.disabled$.subscribe((disabled) => {\n      this._disabled.set(disabled);\n      this._emitFormState();\n    });\n  }\n\n  private _resetState(): void {\n    this._changesCount.set(0);\n    this._isReset.set(true);\n    this._lastResetAt.set(new Date());\n  }\n\n  private _applySetValueNow(value: Maybe<Partial<T>>): void {\n    // Strip keys whose value is `undefined` before writing to the ng-forge\n    // two-way binding. @angular/forms/signals throws NG01902 \"Orphan field\"\n    // when a registered field's key resolves to `undefined` in the model —\n    // stripping avoids that crash while still preserving `null`, empty\n    // strings, and empty arrays (which are valid field values).\n    const sanitized = value != null && typeof value === 'object' ? (filterUndefinedValues(value as object) as Partial<T>) : value;\n    this._initialValue = sanitized;\n    this._changesCount.set(100);\n    this._isReset.set(false);\n    this.formValue.set(sanitized as T);\n    this._emitFormState();\n  }\n}\n\n/**\n * Deep-equality comparator for the {@link DbxForgeFormComponent.formValue} signal.\n *\n * ng-forge's outward sync effect writes entity values back through the\n * `[(value)]` two-way binding. Each write creates a new object reference even\n * when the content is identical. Without this guard the `_formValueEffect`\n * re-fires on every write-back, which triggers `updateValue` (stripping\n * internal/empty keys) and `_emitFormState`, creating an infinite effect cycle\n * that leads to OOM.\n *\n * The filter used depends on the context's configuration:\n * - Custom {@link DbxForgeFormContext.formValuePojoFilter} if set\n * - Default filter that strips `_`-prefixed keys and null/undefined values\n *   when {@link DbxForgeFormContext.stripInternalKeys} is true (default)\n * - Null/undefined-only filter when `stripInternalKeys` is false\n *\n * @param a - The previous form value.\n * @param b - The next form value.\n * @param context - The forge form context providing filter configuration.\n * @returns True if the two values are considered equal after filtering.\n */\nexport function _forgeFormValueEqual<T>(a: T, b: T, context: DbxForgeFormContext<T>): boolean {\n  const pojoFilter = context.formValuePojoFilter ?? (context.stripInternalKeys ? _filterForgeFormValueStripInternal : _filterForgeFormValueKeepInternal);\n  return areEqualPOJOValuesUsingPojoFilter(a, b, pojoFilter as FilterFromPOJOFunction<T>);\n}\n\n/**\n * Returns true if a value should be excluded from the deep-equality comparison\n * performed by {@link _forgeFormValueEqual}. Mirrors the empty-value semantics of\n * {@link stripEmptyForgeValues} for the comparison filters: null, undefined, and\n * NaN are all skipped so that two values differing only by these \"empty\" values\n * are considered equal.\n *\n * @param val - The value to test.\n * @returns True if the value is null, undefined, or NaN.\n */\nfunction _isFilteredFormValue(val: unknown): boolean {\n  return val == null || (typeof val === 'number' && Number.isNaN(val));\n}\n\n/**\n * Default filter: strips `_`-prefixed keys (ng-forge internal/layout keys),\n * null/undefined values, and NaN values before deep equality comparison.\n *\n * The `_`-prefixed keys can reference complex, self-referencing ng-forge\n * objects (field trees, form instances) that cause stack overflows during\n * recursive comparison. They are layout artifacts and irrelevant for\n * value equality. NaN values are stripped because `NaN === NaN` is false,\n * which would otherwise cause `_forgeFormValueEqual` to treat two structurally\n * identical values as unequal and trigger an infinite effect cycle.\n *\n * @param input - The form value object to filter.\n * @returns A filtered copy with internal keys and null/undefined/NaN values removed.\n */\nexport function _filterForgeFormValueStripInternal<T>(input: T): T {\n  if (input == null || typeof input !== 'object' || Array.isArray(input)) {\n    return input;\n  }\n\n  const comparisonObject: Record<string, unknown> = {};\n\n  for (const [key, val] of Object.entries(input as Record<string, unknown>)) {\n    if (!_isFilteredFormValue(val) && !key.startsWith('_')) {\n      comparisonObject[key] = val;\n    }\n  }\n\n  return comparisonObject as T;\n}\n\n/**\n * Filter used when `stripInternalKeys` is false: retains `_`-prefixed keys\n * but still strips null/undefined and NaN values.\n *\n * @param input - The form value object to filter.\n * @returns A filtered copy with null/undefined/NaN values removed but internal keys retained.\n */\nexport function _filterForgeFormValueKeepInternal<T>(input: T): T {\n  if (input == null || typeof input !== 'object' || Array.isArray(input)) {\n    return input;\n  }\n\n  const comparisonObject: Record<string, unknown> = {};\n\n  for (const [key, val] of Object.entries(input as Record<string, unknown>)) {\n    if (!_isFilteredFormValue(val)) {\n      comparisonObject[key] = val;\n    }\n  }\n\n  return comparisonObject as T;\n}\n","import { combineLatest, distinctUntilChanged, filter, first, map, switchMap, type Observable, EMPTY, exhaustMap, shareReplay, throttleTime, type Subscription } from 'rxjs';\nimport { Directive, effect, inject, input } from '@angular/core';\nimport { DbxFormState, type DbxFormStateRef, DbxMutableForm } from '../form';\nimport { type Maybe } from '@dereekb/util';\nimport { asObservable, type ObservableOrValue, errorOnEmissionsInPeriod } from '@dereekb/rxjs';\nimport { cleanSubscription } from '@dereekb/dbx-core';\n\n/**\n * Creates an observable that pipes input values to a form based on the specified mode.\n *\n * This is a convenience wrapper around {@link dbxFormSourceObservableFromStream} that\n * extracts the stream from the form instance.\n *\n * @param form - The mutable form to derive stream state from.\n * @param inputObs - The source observable or value to pipe into the form.\n * @param modeObs - Observable controlling when values are forwarded (reset, always, or every).\n * @returns An observable of values to be set on the form.\n */\nexport function dbxFormSourceObservable<T>(form: DbxMutableForm, inputObs: ObservableOrValue<T>, modeObs: Observable<DbxFormSourceDirectiveMode>): Observable<T> {\n  return dbxFormSourceObservableFromStream(form.stream$, inputObs, modeObs);\n}\n\n/**\n * Creates an observable that pipes input values to a form based on the form's stream state and the specified mode.\n *\n * - `'reset'`: Only forwards the value when the form enters the RESET state.\n * - `'always'`: Forwards values while not initializing, with throttling and loop detection.\n * - `'every'`: Forwards values while not initializing, without throttling or loop protection.\n *\n * @param streamObs - Observable of the form's state stream.\n * @param inputObs - The source observable or value to pipe into the form.\n * @param modeObs - Observable or value controlling when values are forwarded.\n * @returns An observable of values to be set on the form.\n */\nexport function dbxFormSourceObservableFromStream<T>(streamObs: Observable<DbxFormStateRef>, inputObs: ObservableOrValue<T>, modeObs: ObservableOrValue<DbxFormSourceDirectiveMode>): Observable<T> {\n  const value$ = asObservable(inputObs).pipe(shareReplay(1)); // catch/share the latest emission\n\n  const state$ = streamObs.pipe(\n    map((x) => x.state),\n    distinctUntilChanged()\n  );\n\n  const mode$ = asObservable(modeObs).pipe(distinctUntilChanged());\n\n  return combineLatest([mode$, value$]).pipe(\n    map((x) => x[0]),\n    distinctUntilChanged(),\n    switchMap((mode: DbxFormSourceDirectiveMode) => {\n      if (mode === 'reset') {\n        // Reset mode: forward exactly one value each time the form enters RESET state,\n        // then ignore subsequent source changes until the next reset.\n        return state$.pipe(\n          exhaustMap((state: DbxFormState) => {\n            if (state === DbxFormState.RESET) {\n              return value$.pipe(first());\n            }\n\n            return EMPTY;\n          })\n        );\n      }\n\n      // pass any updated value while not initializing.\n      return state$.pipe(\n        map((x) => x === DbxFormState.INITIALIZING),\n        distinctUntilChanged(),\n        switchMap((initializing: boolean) => {\n          if (initializing) {\n            return EMPTY;\n          }\n\n          let valueObs = value$;\n\n          if (mode === 'always') {\n            valueObs = valueObs.pipe(\n              throttleTime(10, undefined, { leading: true, trailing: true }),\n              errorOnEmissionsInPeriod({\n                period: 1000,\n                maxEmissionsPerPeriod: 50,\n                onError: () => {\n                  console.error(\n                    'dbxFormSourceObservableFromStream: Error thrown due to too many emissions. There may be an unintentional loop being triggered by dbxFormSource. Typically this can occur in cases where the dbxFormSource directive is used at the same time as dbxFormValueChange directive and the same value is being pushed.'\n                  );\n                }\n              })\n            );\n          }\n\n          return valueObs;\n        })\n      );\n    })\n  );\n}\n\n/**\n * Modes that define when to copy data from the source to the form.\n *\n * - `'reset'`: Only copy data when the form is reset or is untouched.\n * - `'always'`: Always copy data when the data observable emits a value. Has a throttle of 20ms to prevent too many emissions. If emissions occur in a manner that appears to be a loop (more than 30 emissions in 1 second), then an error is thrown and warning printed to the console.\n * - `'every'`: Equal to always, but has no throttle or error message warning.\n */\nexport type DbxFormSourceDirectiveMode = 'reset' | 'always' | 'every';\n\n/**\n * Directive that sets a form's value based on an input observable or value source.\n *\n * Supports different modes for when the value is forwarded to the form:\n * - `'reset'` (default): Only sets the form value when the form is reset.\n * - `'always'`: Sets the form value on every emission, with throttling and loop detection.\n * - `'every'`: Sets the form value on every emission, without throttling.\n *\n * @selector `[dbxFormSource]`\n *\n * @typeParam T - The form value type.\n */\n@Directive({\n  selector: '[dbxFormSource]'\n})\nexport class DbxFormSourceDirective<T = unknown> {\n  readonly form = inject(DbxMutableForm<T>, { host: true });\n\n  /**\n   * The mode controlling when the source value is forwarded to the form.\n   */\n  readonly dbxFormSourceMode = input<Maybe<DbxFormSourceDirectiveMode>>();\n\n  /**\n   * The source value or observable to pipe into the form.\n   */\n  readonly dbxFormSource = input<Maybe<ObservableOrValue<Maybe<Partial<T>>>>>();\n\n  protected readonly _effectSub = cleanSubscription();\n  protected readonly _setFormSourceObservableEffect = effect(() => {\n    const formSource = this.dbxFormSource();\n    const mode: DbxFormSourceDirectiveMode = this.dbxFormSourceMode() ?? 'reset';\n\n    let subscription: Maybe<Subscription>;\n\n    if (formSource) {\n      // Guard against the feedback loop where setValue() calls resetForm() internally,\n      // which triggers a new RESET state on stream$, causing another value to be forwarded.\n      // The flag is set before setValue and cleared on the next microtask, so the synchronous\n      // stream$ emissions from the feedback reset are filtered out.\n      let isSettingValue = false;\n      const guardedStream$ = this.form.stream$.pipe(filter(() => !isSettingValue));\n\n      subscription = dbxFormSourceObservableFromStream(guardedStream$, formSource, mode).subscribe((x) => {\n        isSettingValue = true;\n        this.form.setValue(x);\n        void Promise.resolve().then(() => (isSettingValue = false));\n      });\n    }\n\n    this._effectSub.setSub(subscription);\n  });\n}\n","import { Component, inject, type OnInit } from '@angular/core';\nimport { AbstractDialogDirective, DbxActionModule, DbxActionSnackbarErrorDirective, DbxButtonModule, type DbxButtonStyle, DbxDialogContentCloseComponent, DbxDialogContentDirective } from '@dereekb/dbx-web';\nimport { type MatDialog, type MatDialogConfig, type MatDialogRef } from '@angular/material/dialog';\nimport { type Maybe } from '@dereekb/util';\nimport { asObservableFromGetter, type MaybeObservableOrValueGetter, type ObservableOrValueGetter, type WorkUsingContext } from '@dereekb/rxjs';\nimport { type FormConfig } from '@ng-forge/dynamic-forms';\nimport { distinctUntilChanged } from 'rxjs';\nimport { cleanSubscription, type DbxButtonDisplay } from '@dereekb/dbx-core';\nimport { DbxForgeFormContext, provideDbxForgeFormContext } from '../../forge/form/forge.context';\nimport { DbxForgeFormComponent } from '../../forge/form/forge.component';\nimport { DbxFormSourceDirective } from '../io/form.input.directive';\nimport { DbxActionFormDirective } from './form.action.directive';\n\n/**\n * Button configuration for the submit button in a {@link DbxForgeActionDialogComponent}.\n *\n * Combines display properties (text, icon) with style properties (color, raised, etc.).\n */\nexport interface DbxForgeActionDialogComponentButtonConfig extends DbxButtonDisplay, DbxButtonStyle {}\n\n/**\n * Configuration for opening a {@link DbxForgeActionDialogComponent}.\n *\n * Defines the dialog header, form config, initial values, submit button, and dialog options.\n *\n * @typeParam O - The form value type produced by the dialog.\n */\nexport interface DbxForgeActionDialogComponentConfig<O> {\n  /**\n   * Header text for the dialog.\n   */\n  readonly header: string;\n  /**\n   * Used for retrieving the ng-forge FormConfig to display in the dialog.\n   */\n  readonly config: ObservableOrValueGetter<FormConfig>;\n  /**\n   * Initial value for the form.\n   */\n  readonly initialValue?: MaybeObservableOrValueGetter<O>;\n  /**\n   * Text/Icon for the submit button.\n   */\n  readonly submitButtonConfig?: DbxForgeActionDialogComponentButtonConfig;\n  /**\n   * Dialog-specific configuration\n   */\n  readonly dialog?: Omit<MatDialogConfig, 'data'>;\n}\n\n/**\n * A standalone dialog component that renders a dynamic ng-forge form within a Material dialog.\n *\n * Provides a header, a configurable form, and a submit button wired to an action handler.\n * The dialog closes with the submitted form value on success, or `undefined` if dismissed.\n *\n * Use {@link DbxForgeActionDialogComponent.openDialogWithForm} to open the dialog programmatically.\n *\n * @typeParam O - The form value type produced by the dialog.\n */\n@Component({\n  template: `\n    <dbx-dialog-content dbxAction [dbxActionHandler]=\"handleSubmitValue\" class=\"dbx-dialog-content-with-header\" dbxActionSnackbarError>\n      <h3 class=\"dbx-dialog-content-header\">{{ header }}</h3>\n      <dbx-dialog-content-close (close)=\"close()\"></dbx-dialog-content-close>\n      <div>\n        <dbx-forge dbxActionForm [dbxFormSource]=\"initialValue$\"></dbx-forge>\n        <dbx-button dbxActionButton [buttonDisplay]=\"submitButtonConfig\" [buttonStyle]=\"submitButtonConfig\" [raised]=\"true\"></dbx-button>\n      </div>\n    </dbx-dialog-content>\n  `,\n  providers: [provideDbxForgeFormContext()],\n  imports: [DbxActionSnackbarErrorDirective, DbxDialogContentDirective, DbxActionModule, DbxButtonModule, DbxDialogContentCloseComponent, DbxForgeFormComponent, DbxFormSourceDirective, DbxActionFormDirective]\n})\nexport class DbxForgeActionDialogComponent<O> extends AbstractDialogDirective<O, DbxForgeActionDialogComponentConfig<O>> implements OnInit {\n  private readonly _configSub = cleanSubscription();\n\n  readonly context = inject(DbxForgeFormContext<O>, { self: true });\n  readonly config$ = asObservableFromGetter(this.data.config);\n  readonly initialValue$ = asObservableFromGetter(this.data.initialValue);\n\n  readonly header = this.data.header;\n\n  readonly submitButtonConfig = {\n    text: 'Submit',\n    ...this.data.submitButtonConfig\n  };\n\n  ngOnInit(): void {\n    this._configSub.setSub(\n      this.config$.pipe(distinctUntilChanged()).subscribe((config) => {\n        this.context.config = config;\n      })\n    );\n  }\n\n  /**\n   * Action handler that marks the action as successful and closes the dialog with the submitted value.\n   *\n   * @param value - The submitted form value\n   * @param context - The action context used to signal success\n   */\n  readonly handleSubmitValue: WorkUsingContext<O> = (value, context) => {\n    context.success();\n    this.close(value);\n  };\n\n  /**\n   * Opens a new dialog with a dynamic ng-forge form using the provided configuration.\n   *\n   * @param matDialog - The Angular Material dialog service.\n   * @param config - Configuration for the dialog, including form config, header, and initial value.\n   * @returns A reference to the opened dialog, which resolves to the submitted value or `undefined`.\n   */\n  static openDialogWithForm<O>(matDialog: MatDialog, config: DbxForgeActionDialogComponentConfig<O>): MatDialogRef<DbxForgeActionDialogComponent<O>, Maybe<O>> {\n    return matDialog.open(DbxForgeActionDialogComponent<O>, {\n      width: '90vw',\n      maxHeight: '300px',\n      maxWidth: '600px',\n      ...config.dialog,\n      data: config\n    });\n  }\n}\n","import { Directive, inject } from '@angular/core';\nimport { cleanSubscription } from '@dereekb/dbx-core';\nimport { DbxForm } from '../form';\nimport { combineLatest } from 'rxjs';\n\n/**\n * Debug directive that logs every form stream event to the console.\n *\n * Subscribes to the parent form's {@link DbxForm.stream$} and prints each event snapshot\n * via `console.log`. Useful during development to inspect the form lifecycle and state transitions.\n *\n * @selector `[dbxFormLogger]`\n *\n * @example\n * ```html\n * <dbx-form>\n *   <ng-container dbxFormLogger></ng-container>\n *   <!-- form fields -->\n * </dbx-form>\n * ```\n */\n@Directive({\n  selector: '[dbxFormLogger],[dbxFormStreamLogger]'\n})\nexport class DbxFormLoggerDirective {\n  readonly form = inject(DbxForm, { host: true });\n\n  constructor() {\n    cleanSubscription(\n      combineLatest([this.form.getValue(), this.form.stream$]).subscribe(([currentValue, event]) => {\n        console.log('dbxFormLogger - stream: ', { currentValue, event });\n      })\n    );\n  }\n}\n","import { type Observable } from 'rxjs';\nimport { Directive, inject, input } from '@angular/core';\nimport { cleanSubscription } from '@dereekb/dbx-core';\nimport { DbxMutableForm } from '../../form/form';\nimport { type LoadingState, type MaybeObservableOrValue, filterMaybe, maybeValueFromObservableOrValue, valueFromFinishedLoadingState } from '@dereekb/rxjs';\nimport { dbxFormSourceObservableFromStream, type DbxFormSourceDirectiveMode } from './form.input.directive';\nimport { type Maybe } from '@dereekb/util';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n/**\n * Default mode for the {@link DbxFormLoadingSourceDirective}, which only passes values on form reset.\n */\nconst DEFAULT_DBX_FORM_LOADING_SOURCE_DIRECTIVE_MODE: DbxFormSourceDirectiveMode = 'reset';\n\n/**\n * Directive that sets a form's value from a {@link LoadingState} source once loading is complete.\n *\n * Only passes non-null values from the source. Extracts the value from the finished loading state\n * and forwards it to the form using the configured mode.\n *\n * @selector `[dbxFormLoadingSource]`\n *\n * @typeParam T - The form value type (must extend object).\n */\n@Directive({\n  selector: '[dbxFormLoadingSource]'\n})\nexport class DbxFormLoadingSourceDirective<T extends object = object> {\n  readonly form = inject(DbxMutableForm<T>, { host: true });\n\n  /**\n   * The mode controlling when the loading source value is forwarded to the form.\n   *\n   * Defaults to `'reset'`.\n   */\n  readonly dbxFormLoadingSourceMode = input<DbxFormSourceDirectiveMode, Maybe<DbxFormSourceDirectiveMode>>(DEFAULT_DBX_FORM_LOADING_SOURCE_DIRECTIVE_MODE, { transform: (x) => x ?? DEFAULT_DBX_FORM_LOADING_SOURCE_DIRECTIVE_MODE });\n\n  /**\n   * The loading state source to observe. The form value is set once loading finishes with a non-null value.\n   */\n  readonly dbxFormLoadingSource = input<MaybeObservableOrValue<LoadingState<T>>>();\n\n  readonly mode$ = toObservable(this.dbxFormLoadingSourceMode);\n  readonly source$: Observable<Maybe<T>> = toObservable(this.dbxFormLoadingSource).pipe(maybeValueFromObservableOrValue(), filterMaybe(), valueFromFinishedLoadingState());\n\n  constructor() {\n    cleanSubscription(\n      dbxFormSourceObservableFromStream(this.form.stream$, this.source$, this.mode$).subscribe((x) => {\n        this.form.setValue(x);\n      })\n    );\n  }\n}\n","import { Directive, type OnInit, inject, output } from '@angular/core';\nimport { cleanSubscription } from '@dereekb/dbx-core';\nimport { type Maybe } from '@dereekb/util';\nimport { first, switchMap, delay, map, of } from 'rxjs';\nimport { DbxForm } from '../form';\n\n/**\n * Directive that observes form value changes and emits the current value when the form is complete/valid,\n * or `undefined` when the form is incomplete.\n *\n * Subscribes to the form's stream during `ngOnInit` to ensure the first emission occurs after initialization.\n *\n * @selector `[dbxFormValueChange]`\n *\n * @typeParam T - The form value type.\n */\n@Directive({\n  selector: '[dbxFormValueChange]'\n})\nexport class DbxFormValueChangeDirective<T> implements OnInit {\n  readonly form = inject(DbxForm<T>, { host: true });\n\n  /**\n   * Emits the current form value when the form is complete/valid, or `undefined` when incomplete.\n   */\n  readonly dbxFormValueChange = output<Maybe<T>>();\n\n  protected readonly _sub = cleanSubscription();\n\n  ngOnInit(): void {\n    // specifically call within ngOnInit to ensure first emission occurs after the form is initialized.\n    this._sub.setSub(\n      this.form.stream$\n        .pipe(\n          switchMap((x) => {\n            if (!x.isComplete) {\n              return of({ isComplete: false as const, value: undefined as Maybe<T> });\n            }\n\n            return this.form.getValue().pipe(\n              first(),\n              map((value) => ({ isComplete: true as const, value: value as Maybe<T> }))\n            );\n          }),\n          delay(0)\n        )\n        .subscribe(({ isComplete, value }) => {\n          if (isComplete) {\n            this.dbxFormValueChange.emit(value);\n          } else {\n            this.dbxFormValueChange.emit(undefined);\n          }\n        })\n    );\n  }\n}\n","import { type AbstractControl } from '@angular/forms';\nimport { type Maybe } from '@dereekb/util';\nimport { type Observable, startWith } from 'rxjs';\n\n/**\n * A FormGroup/AbstractControl path to a specific control.\n */\nexport type FormControlPath = string;\n\n/**\n * Streams a value from the input control at the given path. If no path is specified, streams the value from the control.\n *\n * Returns `undefined` if the control at the given path does not exist.\n *\n * @param fromControl - The root control to retrieve the target control from.\n * @param path - Optional dot-delimited path to a nested control.\n * @returns An observable of the control's value changes (starting with the current value), or `undefined` if the control was not found.\n *\n * @example\n * ```ts\n * const name$ = streamValueFromControl<string>(formGroup, 'user.name');\n * ```\n */\nexport function streamValueFromControl<T>(fromControl: AbstractControl, path?: FormControlPath): Maybe<Observable<T>> {\n  const control = path ? fromControl.get(path) : fromControl;\n  return control?.valueChanges.pipe(startWith(control.value));\n}\n","import { type ArrayOrValue, type Building, type Maybe, type MaybeMap, type MaybeSo, type Milliseconds, NOOP_MODIFIER, asArray, filterNullAndUndefinedValues, filterUndefinedValues, filterUniqueValues, mapMaybeFunction, mergeArrays, objectHasNoKeys } from '@dereekb/util';\nimport { type AsyncCustomValidator, type CustomFnConfig, type CustomValidator, type EvaluationContext, type FieldDef, type FieldMeta, type FieldWithValidation, type LogicConfig, type ValidationMessages, type ValidatorConfig, type WrapperConfig } from '@ng-forge/dynamic-forms';\nimport { type DbxForgeFieldValidation } from './field.type';\nimport { type DbxForgeField, type DbxForgeFieldFormConfig, mergeDbxForgeFieldFormConfig } from '../form/forge.form';\n\nexport const SELF_DEPENDENCY_TOKEN = '$self' as const; // TODO: Import from ng-forge?\n\n// MARK: Forge Field\n/**\n * Contains a reference to a hint value of some type.\n */\nexport type DbxForgeFieldHintValueRef<T> = {\n  hint?: T;\n};\n\n/**\n * A field config that includes an optional logic variable.\n */\nexport type DbxForgeFieldLogicValueRef<T> = {\n  logic?: T[];\n};\n\n// MARK: Field Def\n/**\n * This is an internal type.\n *\n * @see {@link DbxForgeFieldFunctionDef} instead.\n */\ntype _DbxForgeFieldFunctionDef<F extends FieldDef<any>> =\n  F extends FieldDef<infer TProps, infer _TMeta>\n    ? // If the props includes hint,\n      TProps extends DbxForgeFieldHintValueRef<infer T>\n      ? Pick<F, 'key'> & Partial<Omit<F, 'key' | 'type'>> & DbxForgeFieldHintValueRef<T>\n      : Pick<F, 'key'> & Partial<Omit<F, 'key' | 'type'>>\n    : never;\n\n/**\n * Represents an @ng-forge/dynamic-forms FieldDef that has been augmented with dbx-form specific properties.\n *\n * Is used in builder functions for a specific FieldDef that already pre-configures the key and type.\n *\n * Branded config type for forge field functions. Intersects DbxForgeFieldFunctionDef<F> with\n * custom config properties C, and carries a phantom __fieldDef property so F can be\n * extracted without conditional type inference.\n */\nexport type DbxForgeFieldFunctionDef<F extends FieldDef<any>, C = unknown> = _DbxForgeFieldFunctionDef<F> & C & { readonly __fieldDef?: F };\n\n/**\n * Extracts the FieldDef type F from a DbxForgeFieldFunctionConfigDef via the phantom __fieldDef brand.\n */\nexport type ExtractDbxForgeFieldDef<C> = C extends { __fieldDef?: infer F extends FieldDef<any> } ? F : FieldDef<any>;\n\n/**\n * Represents the array-type of of a FieldDef's logic type.\n */\nexport type DbxForgeFieldFunctionDefLogicValue<C extends DbxForgeFieldFunctionDef<any>> = C extends DbxForgeFieldFunctionDef<infer F> ? (F extends DbxForgeFieldLogicValueRef<infer T> ? T : never) : never;\n\n/**\n * Sync custom function for a derivation logic entry.\n *\n * When provided in addLogic(), the builder auto-registers this function\n * in _formConfig.customFnConfig.derivations under the given (or auto-generated) functionName.\n */\nexport type DbxForgeFieldLogicFn<O = any, I = any> = (ctx: EvaluationContext<I>) => O;\n\ninterface DbxForgeFieldLogicFnFunctionRef<O = any, I = any> {\n  readonly fn: DbxForgeFieldLogicFn<O, I>;\n}\n\n/**\n * Async custom function for a derivation logic entry.\n *\n * When provided in addLogic(), the builder auto-registers this function\n * in _formConfig.customFnConfig.asyncDerivations under the given (or auto-generated) asyncFunctionName.\n */\nexport type DbxForgeFieldLogicAsyncFn<O = any, I = any> = (ctx: EvaluationContext<I>) => Promise<O>;\n\n/**\n * Internal narrowed view of a derivation entry that carries an inline `fn`.\n *\n * The dbx-form abstraction lets callers pass `fn` on sync, async, and (no-op) http\n * derivations alike, but ng-forge's `LogicConfig` union now declares `fn?: never`\n * on the http / asyncFunction variants. Intersecting the entry with the function\n * refs therefore collapses the union and narrows `source` to `undefined`, so we\n * use this hand-built shape at the `finalizeDerivationEntry` destructure to\n * preserve the `source` discriminator at the type level.\n */\ninterface DbxForgeFieldLogicDerivationFnEntry {\n  readonly fn: DbxForgeFieldLogicFn | DbxForgeFieldLogicAsyncFn;\n  readonly functionName?: string;\n  readonly source?: 'http' | 'asyncFunction';\n  readonly asyncFunctionName?: string;\n}\n\n/**\n * The externalData declared within a logic declaration.\n *\n * Is merged into the final form config later.\n */\nexport type DbxForgeFieldLogicExternalData = DbxForgeFieldFormConfig['externalData'];\n\n// MARK: DbxForgeFieldFunction\n/**\n * The result of a DbxForgeFieldFunction.\n */\nexport type DbxForgeFieldFunctionResult<C extends DbxForgeFieldFunctionDef<any>> = C extends DbxForgeFieldFunctionDef<infer F> ? DbxForgeField<F> : never;\n\n/**\n * Creates the target FieldDef value from the input config and optional configure function.\n */\nexport type DbxForgeFieldFunction<C extends DbxForgeFieldFunctionDef<any>, F extends FieldDef<any> = ExtractDbxForgeFieldDef<C>> = (input: C, configure?: Maybe<ArrayOrValue<DbxForgeBuildFieldDefFunction<C>>>) => DbxForgeField<F>;\n\n/**\n * Builds the FieldDef from the input config and props and optional configure function.\n */\nexport type DbxForgeFieldFunctionFieldDefBuilder<C extends DbxForgeFieldFunctionDef<any>, FV = any> = (input: Building<C>, props: C['props'], configure?: Maybe<ArrayOrValue<DbxForgeBuildFieldDefFunction<C, FV>>>) => DbxForgeFieldFunctionResult<C> | void;\n\n/**\n * Generates custom props from the input config.\n *\n * This result is merged with the existing props on the input, if a props variable exists.\n *\n * All undefined values are filtered out. All defined values will override the existing props.\n */\nexport type DbxForgeFieldFunctionConfigPropsBuilder<C extends DbxForgeFieldFunctionDef<any>> = (input: C) => Partial<C['props']>;\n\n/**\n * Config for dbxForgeFieldFunction().\n */\nexport interface DbxForgeFieldFunctionConfig<C extends DbxForgeFieldFunctionDef<any>> {\n  /**\n   * The type of the field.\n   *\n   * Should match the registered type.\n   */\n  readonly type: ExtractDbxForgeFieldDef<C>['type'];\n  /**\n   * Builds the config for the field. If null is provided, the config from the input config is used directly.\n   *\n   * @param input - The input config.\n   * @returns The config for the field.\n   */\n  readonly buildFieldDef?: DbxForgeFieldFunctionFieldDefBuilder<C>;\n  /**\n   * Builds the props for the field. If null is provided, the props from the input config are used directly.\n   *\n   * @param input - The input config.\n   * @returns The props for the field.\n   */\n  readonly buildProps?: Maybe<DbxForgeFieldFunctionConfigPropsBuilder<C>>;\n}\n\n/**\n * Creates a {@link DbxForgeFieldFunction} from a {@link DbxForgeFieldFunctionConfig}.\n *\n * The returned function accepts a field definition config and an optional configure callback,\n * and produces a fully-typed {@link DbxForgeField} with the correct `type` set.\n *\n * @param config - Factory configuration containing the field type and optional builders for props and the field definition.\n * @returns A reusable field factory function.\n *\n * @example\n * ```ts\n * const myTextField = dbxForgeFieldFunction<MyTextFieldDef>({\n *   type: 'my-text',\n *   buildProps: (input) => ({ placeholder: input.placeholder ?? 'Enter text' }),\n *   buildFieldDef: dbxForgeBuildFieldDef((instance) => {\n *     instance.injectDefaultValidation();\n *   })\n * });\n * ```\n *\n * @__NO_SIDE_EFFECTS__\n */\nexport function dbxForgeFieldFunction<C extends DbxForgeFieldFunctionDef<F>, F extends FieldDef<any> = ExtractDbxForgeFieldDef<C>>(config: DbxForgeFieldFunctionConfig<C>): DbxForgeFieldFunction<C, F> {\n  const { type, buildFieldDef, buildProps } = config;\n\n  const makeFieldDef: DbxForgeFieldFunctionFieldDefBuilder<C> = buildFieldDef ?? NOOP_MODIFIER;\n  const makeProps: DbxForgeFieldFunctionConfigPropsBuilder<C> = buildProps\n    ? (input: C) => {\n        const props: Partial<F['props']> = {\n          ...input.props,\n          ...filterUndefinedValues(buildProps(input))\n        };\n\n        return props;\n      }\n    : (input: C) => {\n        // Return props as-is if it exists, or set an empty object\n        return 'props' in input ? input.props : {};\n      };\n\n  return ((input: C, configure?: DbxForgeBuildFieldDefFunction<C>) => {\n    const props = makeProps(input);\n\n    // always copy the input before passing to makeFieldDef\n    const _config = {\n      ...input,\n      props\n    } as Building<C>;\n\n    const config = makeFieldDef(_config, props, configure) ?? _config;\n\n    // always set type before returning\n    (config as Building<F>).type = type;\n\n    return config;\n  }) as unknown as DbxForgeFieldFunction<C>;\n}\n\n// MARK: Utilities\n/**\n * Input for adding validation to a field via the builder instance.\n *\n * Accepts validators and optional validation messages that are merged into the field's existing validation.\n */\nexport type DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceAddValidationInput = {\n  readonly validators?: Maybe<ArrayOrValue<DbxForgeFieldValidatorInput>>;\n  /**\n   * Form-level default validation messages merged into `_formConfig.defaultValidationMessages`.\n   *\n   * Use for messages associated with inline `fn` validators whose error kinds need\n   * form-wide resolution. Separate from field-level `validationMessages`.\n   */\n  readonly formValidationMessages?: Maybe<Record<string, string>>;\n} & MaybeMap<Pick<DbxForgeFieldValidation, 'validationMessages'>>;\n\n/**\n * Builder instance provided to {@link DbxForgeBuildFieldDefFunction} callbacks.\n *\n * Exposes methods for reading and mutating a field definition during construction,\n * including validation, meta, logic, and form config.\n */\nexport interface DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C extends DbxForgeFieldFunctionDef<any>, FV = any>\n  extends DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilder<C, FV>, DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceFormConfigBuilder, DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceWrappersBuilder {\n  /**\n   * Returns the current fieldDef.\n   */\n  getFieldDef: () => C;\n  /**\n   * Returns the current props.\n   */\n  getProps: () => Building<C['props']>;\n  /**\n   * Returns the default validation from the default validation source.\n   *\n   * Does not modify the current config.\n   */\n  getDefaultValidation(): DbxForgeFieldValidation;\n  /**\n   * Injects the default validators into the field definition.\n   */\n  injectDefaultValidation(): void;\n  /**\n   * Loads all the current validators from the field definition.\n   */\n  getValidation(): DbxForgeFieldValidation;\n  /**\n   * Adds/Merges the input validation into the existing field definition.\n   */\n  addValidation(input: DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceAddValidationInput): void;\n  /**\n   * Sets the validation for the field definition.\n   */\n  setValidation(input: DbxForgeFieldValidation): void;\n  /**\n   * Returns the current meta.\n   */\n  getMeta(): FieldMeta;\n  /**\n   * Inserts the input meta into the existing field definition.\n   *\n   * Null values clear existing values.\n   */\n  addMeta(meta?: Maybe<FieldMeta>): void;\n  /**\n   * Sets the meta for the field definition.\n   */\n  setMeta(meta: FieldMeta): void;\n  /**\n   * Calls another DbxForgeBuildFieldDefFunction with this instance.\n   */\n  configure(fn: DbxForgeBuildFieldDefFunction<C, FV>): void;\n}\n\ninterface DbxForgeFieldLogicExtras {\n  readonly dependsOn?: string[];\n  readonly externalData?: DbxForgeFieldLogicExternalData;\n}\n\n/**\n * Distributive conditional type that augments logic config types with an optional `fn` callback\n * for function-based derivations. Preserves ng-forge's discriminated union structure.\n *\n * - Sync function derivations (`functionName: string`): adds `fn`, makes `functionName` optional when `fn` is provided\n * - Async function derivations (`asyncFunctionName: string`): adds `fn`, makes `asyncFunctionName` optional when `fn` is provided\n * - All other logic types (state, expression, value, http): passed through unchanged\n */\ntype DbxForgeFieldLogicWithFn<T> =\n  // Branch 1: sync function derivation (has required functionName)\n  T extends { type: 'derivation'; functionName: string }\n    ? // Allow the original type with an optional fn alongside the required functionName\n      | (Omit<T, 'dependsOn'> & { fn?: DbxForgeFieldLogicFn } & DbxForgeFieldLogicExtras)\n      // Or: when fn is provided, make functionName optional (builder auto-generates a name)\n      | (Omit<T, 'functionName' | 'dependsOn'> & { functionName?: string; fn: DbxForgeFieldLogicFn } & DbxForgeFieldLogicExtras)\n    : // Branch 2: async function derivation (has source: 'asyncFunction' + required asyncFunctionName)\n      T extends { type: 'derivation'; source: 'asyncFunction'; asyncFunctionName: string }\n      ? // Allow the original type with an optional async fn alongside the required asyncFunctionName\n        | (T & { fn?: DbxForgeFieldLogicAsyncFn } & DbxForgeFieldLogicExtras)\n        // Or: when fn is provided, make asyncFunctionName optional (builder auto-generates a name)\n        | (Omit<T, 'asyncFunctionName' | 'dependsOn'> & { asyncFunctionName?: string; fn: DbxForgeFieldLogicAsyncFn } & DbxForgeFieldLogicExtras)\n      : // Branch 3: all other logic types (state, expression, value, http) — pass through unchanged\n        T;\n\n/**\n * A custom logic type for transforming values.\n *\n * Is transformed into a derivation by the builder instance.\n */\nexport type DbxForgeFieldTransformLogic<FV = unknown> = DbxForgeFieldIdempotentTransformLogic<FV> | DbxForgeFieldAsyncTransformLogic<FV> | DbxForgeFieldDebouncedTransformLogic<FV>;\n\n/**\n * The three types of transforms allowed.\n *\n * - Idempotent: The transform is synchronous. It should return the equivalent output for the equivalent input.\n * - Async: The transform is asynchronous and returns a Promise. Does not have to be idempotent.\n * - Debounced: A synchronous function that has a debounce to it. Does not have to be idempotent.\n */\nexport type DbxForgeFieldTransformType = 'idempotent' | 'async' | 'debounced';\n\n/**\n * Controls when a transform derivation runs.\n *\n * - `'defined'` — only runs when the field value is non-null/defined (default)\n * - `'always'` — runs on every evaluation, including when the value is undefined\n */\nexport type DbxForgeFieldTransformWhen = 'defined' | 'always';\n\n/**\n * Synchronous transform function that receives the current field value and evaluation context.\n */\nexport type DbxForgeFieldTransformFunction<I, O> = (value: I, ctx: EvaluationContext<I>) => O;\n\n/**\n * Asynchronous variant of {@link DbxForgeFieldTransformFunction} that returns a Promise.\n */\nexport type DbxForgeFieldAsyncTransformFunction<I, O> = DbxForgeFieldTransformFunction<I, Promise<O>>;\n\nexport type DbxForgeFieldIdempotentTransformLogic<FV = unknown> = DbxForgeFieldIdempotentTransformLogicWhenDefined<FV> | DbxForgeFieldIdempotentTransformLogicWhenAlways<FV>;\n\nexport interface DbxForgeFieldIdempotentTransformLogicWhenDefined<FV = unknown> {\n  readonly type: 'transform';\n  readonly transformType: 'idempotent';\n  readonly when?: 'defined';\n  readonly transform: DbxForgeFieldTransformFunction<FV, FV>;\n}\n\nexport interface DbxForgeFieldIdempotentTransformLogicWhenAlways<FV = unknown> {\n  readonly type: 'transform';\n  readonly transformType: 'idempotent';\n  readonly when: 'always';\n  readonly transform: DbxForgeFieldTransformFunction<Maybe<FV>, FV>;\n}\n\nexport type DbxForgeFieldAsyncTransformLogic<FV = unknown> = DbxForgeFieldAsyncTransformLogicWhenDefined<FV> | DbxForgeFieldAsyncTransformLogicWhenAlways<FV>;\n\nexport interface DbxForgeFieldAsyncTransformLogicWhenDefined<FV = unknown> {\n  readonly type: 'transform';\n  readonly transformType: 'async';\n  readonly when?: 'defined';\n  readonly transform: DbxForgeFieldAsyncTransformFunction<FV, FV>;\n  readonly debounceMs?: Milliseconds;\n}\n\nexport interface DbxForgeFieldAsyncTransformLogicWhenAlways<FV = unknown> {\n  readonly type: 'transform';\n  readonly transformType: 'async';\n  readonly when: 'always';\n  readonly transform: DbxForgeFieldAsyncTransformFunction<Maybe<FV>, FV>;\n  readonly debounceMs?: Milliseconds;\n}\n\nexport type DbxForgeFieldDebouncedTransformLogic<FV = unknown> = DbxForgeFieldDebouncedTransformLogicWhenDefined<FV> | DbxForgeFieldDebouncedTransformLogicWhenAlways<FV>;\n\nexport interface DbxForgeFieldDebouncedTransformLogicWhenDefined<FV = unknown> {\n  readonly type: 'transform';\n  readonly transformType: 'debounced';\n  readonly when?: 'defined';\n  readonly transform: DbxForgeFieldTransformFunction<FV, FV>;\n  readonly debounceMs?: Milliseconds;\n}\n\nexport interface DbxForgeFieldDebouncedTransformLogicWhenAlways<FV = unknown> {\n  readonly type: 'transform';\n  readonly transformType: 'debounced';\n  readonly when: 'always';\n  readonly transform: DbxForgeFieldTransformFunction<Maybe<FV>, FV>;\n  readonly debounceMs?: Milliseconds;\n}\n\n/**\n * Default debounce time applied to debounced transform derivations.\n */\nexport const DEFAULT_TRANSFORM_DEBOUNCE_TIME: Milliseconds = 500;\n\n// MARK: Validator With Fn\n/**\n * A custom validator config with an inline `fn` for auto-registration.\n *\n * When `reusableDefinition` is true, `functionName` is required -- the function is registered\n * once and shared across fields that reference it by name with field-specific `params`.\n *\n * When `reusableDefinition` is false/undefined, `functionName` is optional (auto-generated).\n */\nexport type DbxForgeFieldCustomValidatorWithFn =\n  | { readonly type: 'custom'; readonly fn: CustomValidator; readonly functionName: string; readonly reusableDefinition: true; readonly params?: Record<string, unknown>; readonly kind?: string }\n  | { readonly type: 'custom'; readonly fn: CustomValidator; readonly functionName?: string; readonly reusableDefinition?: false; readonly params?: Record<string, unknown>; readonly kind?: string };\n\n/**\n * An async validator config with an inline `fn` for auto-registration.\n *\n * When `reusableDefinition` is true, `functionName` is required -- the function is registered\n * once and shared across fields that reference it by name with field-specific `params`.\n *\n * When `reusableDefinition` is false/undefined, `functionName` is optional (auto-generated).\n */\nexport type DbxForgeFieldAsyncValidatorWithFn =\n  | { readonly type: 'async'; readonly fn: AsyncCustomValidator; readonly functionName: string; readonly reusableDefinition: true; readonly params?: Record<string, unknown> }\n  | { readonly type: 'async'; readonly fn: AsyncCustomValidator; readonly functionName?: string; readonly reusableDefinition?: false; readonly params?: Record<string, unknown> };\n\n/**\n * A validator input that can be a standard {@link ValidatorConfig} or one augmented with an inline `fn`.\n *\n * Supports both one-off inline validators (functionName auto-generated) and reusable definitions\n * (functionName required, registered once, referenced by name with field-specific params).\n */\nexport type DbxForgeFieldValidatorInput = ValidatorConfig | DbxForgeFieldCustomValidatorWithFn | DbxForgeFieldAsyncValidatorWithFn;\n\n/**\n * This type allows the builder instance to automatically register a function with the dbx-forge form.\n *\n * Uses distributive conditional types to preserve ng-forge's discriminated union while adding\n * `fn` support only to function-based derivation variants.\n */\nexport type DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilderLogic<C extends DbxForgeFieldFunctionDef<any>, FV = any> = DbxForgeFieldLogicWithFn<DbxForgeFieldFunctionDefLogicValue<C>> | DbxForgeFieldTransformLogic<FV>;\n\n/**\n * Builder methods for reading and mutating the logic configuration on a field definition.\n *\n * Logic entries control conditional field state (hidden, readonly, disabled, required)\n * and value derivation (sync/async functions, transforms).\n */\nexport interface DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilder<C extends DbxForgeFieldFunctionDef<any>, FV = any> {\n  /**\n   * Returns the current logic configuration, if it exists.\n   */\n  getLogic(): Maybe<DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilderLogic<C, FV>[]>;\n  /**\n   * Adds one or more arbitrary logic value(s) to the field definition.\n   */\n  addLogic(logic: ArrayOrValue<DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilderLogic<C, FV>>): void;\n  /**\n   * Replaces the logic for the field definition.\n   */\n  setLogic(logic: ArrayOrValue<DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilderLogic<C, FV>>): void;\n}\n\n/**\n * Builder methods for reading and mutating the wrappers configuration on a field definition.\n */\nexport interface DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceWrappersBuilder {\n  /**\n   * Returns the current wrappers configuration, if it exists.\n   */\n  getWrappers(): Maybe<WrapperConfig[]>;\n  /**\n   * Merges the field wrappers into the field definition.\n   */\n  addWrappers(wrappers: ArrayOrValue<WrapperConfig>): void;\n  /**\n   * Replaces the field form config for the field definition.\n   */\n  setWrappers(wrappers: ArrayOrValue<WrapperConfig>): void;\n}\n\n/**\n * Builder methods for reading and mutating the form-level config attached to a field definition.\n *\n * Form config includes schemas, external data, and custom function registrations\n * that are merged into the parent {@link DbxForgeFieldFormConfig} at form construction time.\n */\nexport interface DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceFormConfigBuilder {\n  /**\n   * Returns the current logic configuration, if it exists.\n   */\n  getFormConfig(): Maybe<DbxForgeFieldFormConfig>;\n  /**\n   * Merges the field form config into the field definition.\n   */\n  addFormConfig(formConfig: Maybe<DbxForgeFieldFormConfig>): void;\n  /**\n   * Replaces the field form config for the field definition.\n   */\n  setFormConfig(formConfig: Maybe<DbxForgeFieldFormConfig>): void;\n}\n\n/**\n * Callback invoked by the builder to configure a field definition.\n *\n * Receives the builder {@link DbxForgeFieldFunctionFieldDefBuilderFunctionInstance} and the in-progress field config.\n */\nexport type DbxForgeBuildFieldDefFunction<C extends DbxForgeFieldFunctionDef<any>, FV = unknown> = (instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C, FV>, config: Building<C>) => void;\n\n/**\n * Configuration for {@link dbxForgeBuildFieldDef}.\n */\nexport interface DbxForgeBuildFieldDefConfig<C extends DbxForgeFieldFunctionDef<any>> {\n  // TODO: ...\n}\n\nfunction getDefaultValidation(): DbxForgeFieldValidation {\n  return {};\n}\n\n/**\n * Creates a {@link DbxForgeFieldFunctionFieldDefBuilder} that provides a builder-instance pattern\n * for configuring field definitions.\n *\n * The returned builder runs the `configureFunction` first, then any per-call `inputConfigure` callback,\n * and finally finalizes logic entries (registering custom functions, expanding transforms).\n *\n * @param configureFunction - Primary configure callback applied to every field built by this builder.\n * @param _config - Reserved for future builder-level options.\n * @returns A reusable field definition builder.\n *\n * @example\n * ```ts\n * const buildMyField = dbxForgeBuildFieldDef<MyFieldDef>((instance) => {\n *   instance.injectDefaultValidation();\n *   instance.addLogic({ type: 'transform', transformType: 'idempotent', transform: trimString });\n * });\n * ```\n */\nexport function dbxForgeBuildFieldDef<C extends DbxForgeFieldFunctionDef<any>, FV = any>(configureFunction: DbxForgeBuildFieldDefFunction<C, FV>, _config?: Maybe<DbxForgeBuildFieldDefConfig<C>>): DbxForgeFieldFunctionFieldDefBuilder<C, FV> {\n  // TODO: Default ValidationMessages place, etc.\n\n  return ((fieldDef: C, props: C['props'], inputConfigure?: Maybe<DbxForgeBuildFieldDefFunction<C, FV>>) => {\n    function getFieldDef(): C {\n      return fieldDef;\n    }\n\n    function getProps(): Building<C['props']> {\n      return props;\n    }\n\n    function injectDefaultValidation(): void {\n      const defaultValidation = getDefaultValidation();\n      addValidation(defaultValidation);\n    }\n\n    function getValidation(): DbxForgeFieldValidation {\n      return {\n        validators: fieldDef['validators'],\n        validationMessages: fieldDef['validationMessages']\n      };\n    }\n\n    const _accumulatedFormValidationMessages: Record<string, string> = {};\n    let _inlineValidatorCount = 0;\n\n    /**\n     * Generates a deduplication key for a validator config.\n     *\n     * Built-in validators deduplicate by type. Custom/async/http validators use a\n     * composite key to allow multiple validators of the same type with different function names.\n     *\n     * @param v - The validator input to generate a deduplication key for.\n     * @returns Key unique to the validator's type and identity. (string)\n     */\n    function _validatorDeduplicationKey(v: DbxForgeFieldValidatorInput): string {\n      let result: string;\n\n      switch (v.type) {\n        case 'custom':\n          if ('expression' in v && v.expression) {\n            result = `custom:expr:${v.kind ?? v.expression}`;\n          } else {\n            _inlineValidatorCount += 1;\n            const customFnName = (v as any).functionName ?? `__inline_${_inlineValidatorCount}__`;\n            result = `custom:fn:${customFnName}`;\n          }\n          break;\n        case 'async': {\n          _inlineValidatorCount += 1;\n          const asyncFnName = (v as any).functionName ?? `__inline_${_inlineValidatorCount}__`;\n          result = `async:${asyncFnName}`;\n          break;\n        }\n        case 'http':\n          if ('functionName' in v) {\n            result = `http:fn:${v.functionName}`;\n          } else {\n            result = `http:decl`;\n          }\n          break;\n        default:\n          result = v.type;\n          break;\n      }\n\n      return result;\n    }\n\n    function addValidation(input: DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceAddValidationInput): void {\n      const currentValidation = getValidation();\n\n      let nextValidators: Maybe<DbxForgeFieldValidatorInput[]> = currentValidation.validators;\n      let nextValidationMessages: Maybe<ValidationMessages> = currentValidation.validationMessages;\n\n      const inputValidators = asArray(input.validators);\n\n      if (inputValidators.length) {\n        nextValidators = filterUniqueValues(mergeArrays([currentValidation.validators as Maybe<DbxForgeFieldValidatorInput[]>, inputValidators]), _validatorDeduplicationKey);\n      }\n\n      if (input.validationMessages) {\n        nextValidationMessages = {\n          ...currentValidation.validationMessages,\n          ...filterUndefinedValues(input.validationMessages)\n        };\n      }\n\n      if (input.formValidationMessages) {\n        Object.assign(_accumulatedFormValidationMessages, input.formValidationMessages);\n      }\n\n      setValidation({\n        validators: nextValidators as ValidatorConfig[] | undefined,\n        validationMessages: nextValidationMessages\n      });\n    }\n\n    function setValidation(input: DbxForgeFieldValidation): void {\n      (fieldDef as Building<FieldWithValidation>)['validators'] = input.validators;\n      (fieldDef as Building<FieldWithValidation>)['validationMessages'] = input.validationMessages;\n    }\n\n    function configure(fn: DbxForgeBuildFieldDefFunction<C, FV>): void {\n      fn(instance, fieldDef);\n    }\n\n    function getMeta(): FieldMeta {\n      return fieldDef['meta'];\n    }\n\n    function insertMeta(meta?: Maybe<FieldMeta>): void {\n      if (meta) {\n        const currentMeta = getMeta();\n\n        const nextMeta = filterNullAndUndefinedValues({\n          ...currentMeta,\n          ...filterUndefinedValues(meta)\n        });\n\n        setMeta(nextMeta);\n      }\n    }\n\n    function setMeta(meta: FieldMeta): void {\n      (fieldDef as Building<FieldDef<any>>)['meta'] = meta;\n    }\n\n    // Logic\n    function getLogic(): Maybe<DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilderLogic<C>[]> {\n      return fieldDef['logic'];\n    }\n\n    function addLogic(logic: ArrayOrValue<DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilderLogic<C>>) {\n      const currentLogic = getLogic() ?? [];\n      const nextLogic = mergeArrays([currentLogic, asArray(logic)]);\n      setLogic(nextLogic);\n    }\n\n    function setLogic(logic: ArrayOrValue<DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilderLogic<C>>) {\n      const nextLogic = asArray(logic);\n      (fieldDef as any)['logic'] = nextLogic; // set the next logic value\n    }\n\n    // Wrappers\n    function getWrappers(): Maybe<WrapperConfig[]> {\n      return fieldDef['wrappers'];\n    }\n\n    function addWrappers(input: ArrayOrValue<WrapperConfig>) {\n      const currentWrappers = getWrappers() ?? [];\n      const nextWrappers = mergeArrays([currentWrappers, asArray(input)]);\n      setWrappers(nextWrappers);\n    }\n\n    function setWrappers(wrappers: ArrayOrValue<WrapperConfig>) {\n      const nextWrappers = asArray(wrappers);\n      (fieldDef as any)['wrappers'] = nextWrappers; // set the next wrappers value\n    }\n\n    // FormConfig\n    function getFormConfig(): Maybe<DbxForgeFieldFormConfig> {\n      return fieldDef['_formConfig'];\n    }\n\n    function addFormConfig(formConfig: Maybe<DbxForgeFieldFormConfig>): void {\n      const currentFormConfig = getFormConfig() ?? {};\n      const nextFormConfig = mergeDbxForgeFieldFormConfig(currentFormConfig, formConfig ?? {});\n      setFormConfig(nextFormConfig);\n    }\n\n    function setFormConfig(formConfig: Maybe<DbxForgeFieldFormConfig>): void {\n      (fieldDef as Building<DbxForgeField<any>>)['_formConfig'] = formConfig;\n    }\n\n    const instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C, FV> = {\n      getFieldDef,\n      getProps,\n      getValidation,\n      getDefaultValidation,\n      injectDefaultValidation,\n      addValidation,\n      setValidation,\n      getMeta,\n      addMeta: insertMeta,\n      setMeta,\n      getLogic,\n      addLogic,\n      setLogic,\n      getFormConfig,\n      addFormConfig,\n      setFormConfig,\n      getWrappers,\n      addWrappers,\n      setWrappers,\n      configure\n    };\n\n    configure(configureFunction);\n\n    // perform the final configure\n    if (inputConfigure) {\n      configure(inputConfigure);\n    }\n\n    // finalize the logic and validation expansion/cleanup\n    _finalizeLogicAndValidation(instance, _accumulatedFormValidationMessages);\n\n    return fieldDef;\n  }) as DbxForgeFieldFunctionFieldDefBuilder<C, FV>;\n}\n\n/**\n * Finalizes logic and validation for a field definition.\n *\n * For logic: registers inline `fn` derivations into `customFnConfig`, converts transforms to derivation entries.\n * For validation: registers inline `fn` validators into `customFnConfig.validators`/`asyncValidators`,\n * and merges accumulated form validation messages into `_formConfig.defaultValidationMessages`.\n *\n * @param instance - The field definition builder instance.\n * @param accumulatedFormValidationMessages - Form-level validation messages accumulated by `addValidation()`.\n */\nfunction _finalizeLogicAndValidation<C extends DbxForgeFieldFunctionDef<any>, FV = any>(instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C, FV>, accumulatedFormValidationMessages?: Record<string, string>): void {\n  const fieldDef = instance.getFieldDef();\n\n  // --- Logic finalization ---\n  _finalizeLogic(instance, fieldDef);\n\n  // --- Validation finalization ---\n  _finalizeValidation(instance, fieldDef);\n\n  // Merge accumulated form validation messages\n  if (accumulatedFormValidationMessages && !objectHasNoKeys(accumulatedFormValidationMessages)) {\n    instance.addFormConfig({\n      defaultValidationMessages: accumulatedFormValidationMessages\n    });\n  }\n}\n\n/**\n * Finalizes the logic expansion/cleanup for a field definition.\n *\n * Registers inline `fn` derivation functions and converts transform entries to derivation logic.\n *\n * @param instance - The builder instance whose logic entries will be finalized.\n * @param fieldDef - The field definition being constructed.\n */\nfunction _finalizeLogic<C extends DbxForgeFieldFunctionDef<any>, FV = any>(instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C, FV>, fieldDef: C): void {\n  const logic = instance.getLogic();\n\n  // if no logic is defined, just skip finalization\n  if (logic?.length) {\n    _finalizeLogicEntries(instance, fieldDef, logic);\n  }\n}\n\nfunction _finalizeLogicEntries<C extends DbxForgeFieldFunctionDef<any>, FV = any>(instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C, FV>, fieldDef: C, logic: DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceLogicBuilderLogic<C, FV>[]): void {\n  let hasOneOrMoreCustomFunctions = false;\n\n  /**\n   * Used for storing custom functions that are defined within the field config.\n   */\n  const customFnConfig = {\n    derivations: {} as MaybeSo<Required<CustomFnConfig['derivations']>>,\n    asyncDerivations: {} as MaybeSo<Required<CustomFnConfig['asyncDerivations']>>\n  };\n\n  /**\n   * Used for storing external data that is defined within the field config.\n   */\n  const externalData: MaybeSo<Required<DbxForgeFieldLogicExternalData>> = {};\n\n  interface RegisterCustomFunctionInput {\n    isAsync: boolean;\n    functionName?: string;\n    fn: any;\n  }\n\n  let customFunctionNameCount = 0;\n\n  /**\n   * Generates a default function name for the given entry, and sets it on the entry.\n   *\n   * @returns A unique auto-generated function name based on the field key.\n   */\n  function _generateDefaultFunctionName() {\n    customFunctionNameCount += 1;\n    return `__fn__${fieldDef.key}_${customFunctionNameCount}`;\n  }\n\n  /**\n   * Registers a custom function with the customFnConfig.\n   *\n   * @param input - The function to register, including its async flag and optional name.\n   * @param generateFunctionName - Optional name generator; defaults to {@link _generateDefaultFunctionName}\n   * @returns The resolved function name under which the function was registered.\n   */\n  function _registerCustomFunction(input: RegisterCustomFunctionInput, generateFunctionName: () => string = _generateDefaultFunctionName): string {\n    const { isAsync, functionName, fn } = input;\n    const finalFunctionName = functionName ?? generateFunctionName();\n\n    if (isAsync) {\n      customFnConfig.asyncDerivations[finalFunctionName] = fn;\n    } else {\n      customFnConfig.derivations[finalFunctionName] = fn;\n    }\n\n    // flag added\n    hasOneOrMoreCustomFunctions = true;\n\n    return finalFunctionName;\n  }\n\n  function finalizeDerivationEntry(derivationEntry: LogicConfig & { type: 'derivation' }) {\n    if ('fn' in derivationEntry) {\n      const { fn, functionName, source, asyncFunctionName } = derivationEntry as unknown as DbxForgeFieldLogicDerivationFnEntry;\n\n      /**\n       * Generates a default function name for the given entry, and sets it on the entry.\n       *\n       * @returns A unique auto-generated function name assigned to the derivation entry.\n       */\n      function generateDefaultFunctionNameForEntry() {\n        const functionName = _generateDefaultFunctionName();\n\n        // set the functionName on the entry so it is associated now\n        (derivationEntry as any).functionName = functionName;\n\n        return functionName;\n      }\n\n      function registerCustomFunction(input: RegisterCustomFunctionInput) {\n        _registerCustomFunction(input, generateDefaultFunctionNameForEntry);\n\n        // remove fn from the entry\n        delete (derivationEntry as any).fn;\n      }\n\n      switch (source) {\n        case 'http':\n          // do nothing.\n          break;\n        case 'asyncFunction':\n          registerCustomFunction({ isAsync: true, functionName: asyncFunctionName, fn });\n          break;\n        default:\n          // sync function\n          registerCustomFunction({ isAsync: false, functionName, fn });\n          break;\n      }\n\n      // clean up the entry by removing fn\n      delete (derivationEntry as Building<DbxForgeFieldLogicFnFunctionRef>).fn;\n    }\n\n    // move any external data to the form config\n    if ('externalData' in derivationEntry) {\n      Object.assign(externalData, derivationEntry.externalData);\n    }\n\n    // set the default dependsOn if not set\n    if (!derivationEntry.dependsOn) {\n      derivationEntry.dependsOn = [SELF_DEPENDENCY_TOKEN];\n    }\n  }\n\n  function finalizeTransformEntry(entry: DbxForgeFieldTransformLogic<FV>): LogicConfig {\n    const { transform: inputTransformFn, when } = entry;\n\n    /**\n     * The derivation functions will try to map occasionally while the value is undefined.\n     *\n     * We wrap it unless our transform expects that by specifying \"always\".\n     */\n    let transformFn: DbxForgeFieldTransformFunction<Maybe<FV>, any>;\n\n    if (when === 'always') {\n      transformFn = inputTransformFn as DbxForgeFieldTransformFunction<Maybe<FV>, any>;\n    } else {\n      transformFn = mapMaybeFunction(inputTransformFn as any);\n    }\n\n    /**\n     * Build the final derivation function.\n     *\n     * @param ctx - The evaluation context containing the current field value.\n     * @returns The transformed field value.\n     */\n    const fn: DbxForgeFieldLogicFn = (ctx) => {\n      return transformFn(ctx.fieldValue, ctx);\n    };\n\n    let result: LogicConfig;\n\n    switch (entry.transformType) {\n      case 'idempotent':\n        result = {\n          type: 'derivation',\n          trigger: 'onChange',\n          functionName: _registerCustomFunction({ isAsync: false, fn }),\n          dependsOn: [SELF_DEPENDENCY_TOKEN]\n        };\n        break;\n      case 'async':\n        result = {\n          type: 'derivation',\n          functionName: _registerCustomFunction({ isAsync: true, fn }),\n          dependsOn: [SELF_DEPENDENCY_TOKEN]\n        };\n        break;\n      case 'debounced':\n        result = {\n          type: 'derivation',\n          trigger: 'debounced',\n          functionName: _registerCustomFunction({ isAsync: false, fn }),\n          dependsOn: [SELF_DEPENDENCY_TOKEN],\n          debounceMs: entry.debounceMs\n        };\n        break;\n      default:\n        throw new Error(`Unexpected transform type.`);\n    }\n\n    return result;\n  }\n\n  // finalize each entry\n  const finalLogic: LogicConfig[] = logic.map((entry) => {\n    const derivationEntry = entry as LogicConfig | DbxForgeFieldTransformLogic<FV>;\n    let finalEntry: LogicConfig = entry as LogicConfig;\n\n    switch (derivationEntry.type) {\n      case 'hidden':\n      case 'readonly':\n      case 'disabled':\n      case 'required':\n        // nothing to do\n        break;\n      case 'derivation':\n        finalizeDerivationEntry(derivationEntry);\n        break;\n      case 'transform':\n        finalEntry = finalizeTransformEntry(derivationEntry);\n        break;\n      default:\n        break;\n    }\n\n    return finalEntry;\n  });\n\n  instance.setLogic(finalLogic as any);\n\n  // finally add/merge the form config from the fields that was accumulated\n  if (hasOneOrMoreCustomFunctions || !objectHasNoKeys(externalData)) {\n    instance.addFormConfig({\n      customFnConfig,\n      externalData\n    });\n  }\n}\n\n/**\n * Finalizes validation for a field definition.\n *\n * Scans validators for inline `fn` properties, auto-registers them in\n * `customFnConfig.validators`/`asyncValidators`, and replaces `fn` with the generated `functionName`.\n *\n * @param instance - The builder instance whose validators will be finalized.\n * @param fieldDef - The field definition being constructed.\n */\nfunction _finalizeValidation<C extends DbxForgeFieldFunctionDef<any>>(instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C>, fieldDef: C): void {\n  const validation = instance.getValidation();\n  const validators = validation.validators;\n\n  if (validators?.length) {\n    _finalizeValidators(instance, fieldDef, validation);\n  }\n}\n\nfunction _finalizeValidators<C extends DbxForgeFieldFunctionDef<any>>(instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C>, fieldDef: C, validation: DbxForgeFieldValidation): void {\n  const validators = validation.validators;\n\n  if (validators) {\n    let hasOneOrMoreValidatorFunctions = false;\n\n    const validatorCustomFnConfig: {\n      validators: Record<string, CustomValidator>;\n      asyncValidators: Record<string, AsyncCustomValidator>;\n    } = { validators: {}, asyncValidators: {} };\n\n    let validatorFnNameCount = 0;\n\n    function _generateValidatorFunctionName() {\n      validatorFnNameCount += 1;\n      return `__vfn__${fieldDef.key}_${validatorFnNameCount}`;\n    }\n\n    const finalizedValidators: ValidatorConfig[] = validators.map((entry) => {\n      let result: ValidatorConfig;\n\n      if ('fn' in entry) {\n        const { fn, reusableDefinition: _reusableDefinition, ...rest } = entry as any;\n        const functionName: string = rest.functionName ?? _generateValidatorFunctionName();\n        hasOneOrMoreValidatorFunctions = true;\n\n        switch (entry.type) {\n          case 'custom':\n            validatorCustomFnConfig.validators[functionName] = fn;\n            break;\n          case 'async':\n            validatorCustomFnConfig.asyncValidators[functionName] = fn;\n            break;\n          default:\n            break;\n        }\n\n        // Return a clean ValidatorConfig without fn or reusableDefinition\n        result = { ...rest, functionName } as ValidatorConfig;\n      } else {\n        result = entry;\n      }\n\n      return result;\n    });\n\n    instance.setValidation({\n      validators: finalizedValidators,\n      validationMessages: validation.validationMessages\n    });\n\n    if (hasOneOrMoreValidatorFunctions) {\n      const validatorFormConfig: { validators?: Record<string, CustomValidator>; asyncValidators?: Record<string, AsyncCustomValidator> } = {};\n\n      if (Object.keys(validatorCustomFnConfig.validators).length > 0) {\n        validatorFormConfig.validators = validatorCustomFnConfig.validators;\n      }\n\n      if (Object.keys(validatorCustomFnConfig.asyncValidators).length > 0) {\n        validatorFormConfig.asyncValidators = validatorCustomFnConfig.asyncValidators;\n      }\n\n      instance.addFormConfig({\n        customFnConfig: validatorFormConfig\n      });\n    }\n  }\n}\n\n// MARK: Utils\n/**\n * Creates a single {@link DbxForgeBuildFieldDefFunction} from all the input functions.\n *\n * @param fns - The functions to apply.\n * @returns Applies all of the given functions.\n */\nexport function dbxForgeFieldFunctionConfigure<C extends DbxForgeFieldFunctionDef<any>, FV = unknown>(...fns: DbxForgeBuildFieldDefFunction<C, FV>[]): DbxForgeBuildFieldDefFunction<C, FV> {\n  let fn: DbxForgeBuildFieldDefFunction<C, FV>;\n\n  switch (fns.length) {\n    case 0:\n      fn = NOOP_MODIFIER;\n      break;\n    case 1:\n      fn = fns[0];\n      break;\n    default:\n      fn = (instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C, FV>, config: Building<C>) => {\n        fns.forEach((fn) => {\n          fn(instance, config);\n        });\n      };\n      break;\n  }\n\n  return fn;\n}\n\n/**\n * Creates a {@link DbxForgeFieldFunctionConfigPropsBuilder} that automatically copies `hint`\n * from the top-level field config into `props.hint`.\n *\n * Historically the hint lived at the base config level. In `@ng-forge/dynamic-forms` hints are\n * expected under `props`, so this builder bridges that gap.\n *\n * @param makeProps - Optional delegate that produces additional props; its result is merged before the hint is applied.\n * @returns A props builder that includes the hint value.\n *\n * @example\n * ```ts\n * const myField = dbxForgeFieldFunction<MyFieldDef>({\n *   type: 'my-field',\n *   buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder()\n * });\n * ```\n */\nexport function dbxForgeFieldFunctionConfigPropsWithHintBuilder<C extends DbxForgeFieldFunctionDef<any> & DbxForgeFieldHintValueRef<any>>(makeProps?: DbxForgeFieldFunctionConfigPropsBuilder<C>): DbxForgeFieldFunctionConfigPropsBuilder<C> {\n  return (input: C) => {\n    const props: Partial<C['props']> = makeProps?.(input) ?? {};\n\n    if ('hint' in input) {\n      (props as DbxForgeFieldHintValueRef<any>).hint = input.hint;\n    }\n\n    return props;\n  };\n}\n","import { type Maybe } from '@dereekb/util';\n\n/**\n * Semantic type to disable autocomplete on a field. Pass `false` to the autocomplete property.\n */\nexport type DisableAutocompleteForField = false;\n\n/**\n * Autocomplete configuration/attribute option for an input field.\n *\n * Pass a string for a specific autocomplete value (e.g., `'email'`, `'name'`),\n * or `false` to disable browser autofill.\n */\nexport type FieldAutocompleteAttributeOption = string | DisableAutocompleteForField;\n\n/**\n * Autocomplete configuration/attribute for an input field.\n *\n * @see {FieldAutocompleteAttributeOption}\n */\nexport type FieldAutocompleteAttributeValue = string;\n\n/**\n * Reference to an autocomplete attribute.\n */\nexport interface FieldAutocompleteAttributeOptionRef {\n  readonly autocomplete?: FieldAutocompleteAttributeOption;\n}\n\n/**\n * The output attributes to apply to an input element.\n */\nexport interface FieldAutocompleteAttributes {\n  readonly name?: string;\n  readonly autocomplete: FieldAutocompleteAttributeValue;\n}\n\n/**\n * Builds a {@link FieldMeta} object for the given autocomplete configuration.\n *\n * When `false`, disables browser autofill by setting `name: 'password'` and `autocomplete: 'off'`\n * (matching the Chrome autofill workaround). When a string, sets the `autocomplete` attribute\n * to that value.\n *\n * @param autocomplete - The autocomplete option to convert into HTML attributes.\n * @returns The corresponding attributes, or undefined when no autocomplete option is provided.\n */\nexport function fieldAutocompleteAttributeValue(autocomplete?: Maybe<FieldAutocompleteAttributeOption>): Maybe<FieldAutocompleteAttributes> {\n  let result: Maybe<FieldAutocompleteAttributes>;\n\n  if (autocomplete === false) {\n    // https://stackoverflow.com/questions/15738259/disabling-chrome-autofill\n    result = disableAutofillAttributes();\n  } else if (autocomplete != null) {\n    result = {\n      autocomplete\n    };\n  }\n\n  return result;\n}\n\n/**\n * Returns the attributes to disable autofill on an input element.\n *\n * @returns Attributes that disable browser autofill when applied to an input element.\n *\n * @see https://stackoverflow.com/questions/15738259/disabling-chrome-autofill\n */\nexport function disableAutofillAttributes(): FieldAutocompleteAttributes {\n  return {\n    name: 'password',\n    autocomplete: 'off'\n  };\n}\n","import type { FieldMeta } from '@ng-forge/dynamic-forms';\nimport { type DbxForgeFieldFunctionDef, type DbxForgeFieldFunctionFieldDefBuilderFunctionInstance } from './field';\nimport { type FieldAutocompleteAttributeOptionRef, fieldAutocompleteAttributeValue } from '../../field/field.autocomplete';\n\n/**\n * Reads the `autocomplete` option from the builder's field def and, when it resolves to a\n * recognized HTML autocomplete token, attaches it to the field as `FieldMeta` so the\n * rendered input emits the corresponding `autocomplete` attribute.\n *\n * Intended to be used inside a field builder function to propagate autocomplete hints from\n * config into the final rendered form control.\n *\n * @param instance - The field builder instance whose field def is inspected and to which metadata is added.\n */\nexport function configureForgeAutocompleteFieldMeta<C extends DbxForgeFieldFunctionDef<any> & FieldAutocompleteAttributeOptionRef>(instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C>): void {\n  const fieldDef = instance.getFieldDef();\n\n  if ('autocomplete' in fieldDef) {\n    const meta = fieldAutocompleteAttributeValue(fieldDef['autocomplete']);\n\n    if (meta) {\n      instance.addMeta(meta as unknown as FieldMeta);\n    }\n  }\n}\n","import { computed, inject, type Signal } from '@angular/core';\nimport { FORM_OPTIONS } from '@ng-forge/dynamic-forms/integration';\n\n/**\n * Creates a computed signal that reads the disabled state from ng-forge's form-level options.\n *\n * Injects the `FORM_OPTIONS` token provided by ng-forge's `DynamicForm` component and reads\n * `formOptions.disabled`. This is the correct way to check form-level disabled state in\n * custom field components, since `FormOptions.disabled` does not propagate to individual\n * `FieldState.disabled()` signals.\n *\n * Must be called in an injection context (constructor, field initializer, or inject()-capable context).\n *\n * @returns A computed signal that is `true` when the form is disabled.\n *\n * @example\n * ```typescript\n * readonly isDisabled = dbxForgeFieldDisabled();\n * ```\n */\nexport function dbxForgeFieldDisabled(): Signal<boolean> {\n  const formOptions = inject(FORM_OPTIONS, { optional: true });\n\n  return computed(() => {\n    let disabled = false;\n\n    try {\n      disabled = formOptions?.()?.disabled ?? false;\n    } catch {\n      disabled = false;\n    }\n\n    return disabled;\n  });\n}\n","/* eslint-disable dereekb-util/prefer-maybe-type -- Angular's ValidatorFn returns exactly `ValidationErrors | null`; widening to `Maybe<...>` adds `undefined` and breaks the contract (TS2322). */\nimport { type AbstractControl, type ValidationErrors, type ValidatorFn } from '@angular/forms';\nimport { type ArrayOrValue, type Maybe, type WebsiteDomain, type WebsiteUrlDetails, asArray, isWebsiteUrlWithPrefix, websiteUrlDetails } from '@dereekb/util';\n\nexport const IS_NOT_WEBSITE_URL_VALIDATION_KEY = 'isNotWebsiteUrl';\nexport const IS_NOT_WEBSITE_URL_WITH_PREFIX_VALIDATION_KEY = 'isNotWebsiteUrlWithPrefix';\nexport const IS_NOT_WEBSITE_URL_WITH_EXPECTED_DOMAIN_VALIDATION_KEY = 'isNotWebsiteUrlWithExpectedDomain';\n\nexport interface IsNotWebsiteUrlErrorData {\n  readonly value: string;\n  readonly isPrefixRequired: boolean;\n  readonly message: string;\n}\n\nexport interface IsWebsiteUrlValidatorConfig {\n  /**\n   * Whether or not to require an http/https prefix.\n   *\n   * Defaults to true.\n   */\n  readonly requirePrefix?: Maybe<boolean>;\n  /**\n   * Whether or not to allow URLs with a port number but no TLD (e.g. http://localhost:9010/path).\n   *\n   * Defaults to false.\n   */\n  readonly allowPorts?: Maybe<boolean>;\n  /**\n   * Valid domains to accept.\n   *\n   * Defaults to undefined.\n   */\n  readonly validDomains?: Maybe<ArrayOrValue<WebsiteDomain>>;\n}\n\n/**\n * Angular form validator that checks whether the control value is a valid website URL,\n * optionally requiring an http/https prefix, allowing port numbers, and restricting to specific domains.\n *\n * @param config - Optional validation configuration for prefix, port, and domain requirements.\n * @returns A ValidatorFn that validates website URLs.\n */\nexport function isWebsiteUrlValidator(config?: IsWebsiteUrlValidatorConfig): ValidatorFn {\n  const { requirePrefix, allowPorts, validDomains: inputValidDomains } = config ?? {};\n  const isPrefixRequired = requirePrefix ?? true;\n  const isAllowPorts = allowPorts ?? false;\n  const validDomains = asArray(inputValidDomains);\n  const validDomainsSet = new Set(validDomains);\n  const validateDomains = validDomainsSet.size > 0;\n\n  function isValidUrl(details: WebsiteUrlDetails): boolean {\n    if (isPrefixRequired) {\n      if (isWebsiteUrlWithPrefix(details.input)) {\n        return true;\n      }\n    } else if (details.isWebsiteUrl) {\n      return true;\n    }\n\n    if (isAllowPorts && details.hasPortNumber) {\n      return isPrefixRequired ? details.hasHttpPrefix : true;\n    }\n\n    return false;\n  }\n\n  const portNumbersMessagePart = isAllowPorts ? '' : ' Urls with port numbers (e.g. localhost:8080) are not allowed.';\n\n  const validateWebsiteValue: (details: WebsiteUrlDetails) => ValidationErrors | null = isPrefixRequired\n    ? (details: WebsiteUrlDetails) => {\n        return isValidUrl(details)\n          ? null\n          : {\n              [IS_NOT_WEBSITE_URL_WITH_PREFIX_VALIDATION_KEY]: {\n                value: details.input,\n                isPrefixRequired,\n                message: `Value is not a website url with an http/https prefix.${portNumbersMessagePart}`\n              }\n            };\n      }\n    : (details: WebsiteUrlDetails) => {\n        return isValidUrl(details)\n          ? null\n          : {\n              [IS_NOT_WEBSITE_URL_VALIDATION_KEY]: {\n                value: details.input,\n                isPrefixRequired,\n                message: `Value is not a valid website url.${portNumbersMessagePart}`\n              }\n            };\n      };\n\n  const validateWebsiteDomain: (details: WebsiteUrlDetails) => ValidationErrors | null = (details: WebsiteUrlDetails) => {\n    let pass = validDomainsSet.size === 0;\n\n    if (details.hasWebsiteDomain && validateDomains) {\n      pass = validDomainsSet.has(details.domain);\n    }\n\n    return pass\n      ? null\n      : {\n          [IS_NOT_WEBSITE_URL_WITH_EXPECTED_DOMAIN_VALIDATION_KEY]: {\n            value: details.input,\n            isPrefixRequired,\n            validDomains,\n            message: `Value is not a website url with one of the expected domains: ${validDomains.join(', ')}.`\n          }\n        };\n  };\n\n  return (control: AbstractControl): ValidationErrors | null => {\n    const value: string | undefined = control.value;\n\n    if (value != null) {\n      const details = websiteUrlDetails(value);\n\n      return {\n        ...validateWebsiteValue(details),\n        ...validateWebsiteDomain(details)\n      };\n    }\n\n    return {};\n  };\n}\n","import type { CustomValidator, DynamicText, ValidationError, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { type Maybe, type WebsiteDomain, asArray, isWebsiteUrlWithPrefix, websiteUrlDetails } from '@dereekb/util';\nimport { type DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceAddValidationInput } from './field';\nimport { IS_NOT_WEBSITE_URL_VALIDATION_KEY, IS_NOT_WEBSITE_URL_WITH_EXPECTED_DOMAIN_VALIDATION_KEY, IS_NOT_WEBSITE_URL_WITH_PREFIX_VALIDATION_KEY, type IsWebsiteUrlValidatorConfig } from '../../validator/website';\n\n// MARK: Pattern\n/**\n * Configuration for {@link dbxForgePatternValidator}.\n */\nexport interface DbxForgePatternValidatorConfig {\n  readonly pattern: string | RegExp;\n  readonly message?: ValidationMessages['pattern'];\n}\n\n/**\n * Builds a forge validator input that applies a regex pattern constraint to a field.\n *\n * @param config - The pattern to match and an optional override for the `pattern` validation message.\n * @returns A validator input with a `pattern` validator and the associated validation message.\n *\n * @example\n * ```ts\n * instance.addValidation(dbxForgePatternValidator({ pattern: /^[a-z0-9-]+$/i, message: 'Only alphanumerics and dashes are allowed.' }));\n * ```\n */\nexport function dbxForgePatternValidator(config: DbxForgePatternValidatorConfig): DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceAddValidationInput {\n  const { pattern, message } = config;\n\n  return {\n    validators: [\n      {\n        type: 'pattern',\n        value: pattern\n      }\n    ],\n    validationMessages: {\n      pattern: message\n    }\n  };\n}\n\n// MARK: Email\n/**\n * Configuration for {@link dbxForgeEmailValidator}.\n */\nexport interface DbxForgeEmailValidatorConfig {\n  readonly message?: ValidationMessages['email'];\n}\n\n/**\n * Default message applied by {@link dbxForgeEmailValidator} when no override is supplied.\n */\nexport const DEFAULT_DBX_FORGE_EMAIL_VALIDATION_MESSAGE = 'Please enter a valid email address.';\n\n/**\n * Builds a forge validator input that applies the built-in `email` validator with a default\n * user-friendly message.\n *\n * @param config - Optional override for the `email` validation message.\n * @returns A validator input with an `email` validator and the associated validation message.\n *\n * @example\n * ```ts\n * instance.addValidation(dbxForgeEmailValidator());\n * instance.addValidation(dbxForgeEmailValidator({ message: 'Enter your work email.' }));\n * ```\n */\nexport function dbxForgeEmailValidator(config?: DbxForgeEmailValidatorConfig): DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceAddValidationInput {\n  const message = config?.message ?? DEFAULT_DBX_FORGE_EMAIL_VALIDATION_MESSAGE;\n\n  return {\n    validators: [\n      {\n        type: 'email'\n      }\n    ],\n    validationMessages: {\n      email: message\n    }\n  };\n}\n\n// MARK: Website\n/**\n * Configuration for {@link dbxForgeWebsiteUrlValidator}. Extends\n * {@link IsWebsiteUrlValidatorConfig} with per-error message overrides.\n */\nexport interface DbxForgeWebsiteUrlValidatorConfig extends IsWebsiteUrlValidatorConfig {\n  /**\n   * Optional override for the \"is not a valid website url\" error message.\n   */\n  readonly notWebsiteUrlMessage?: DynamicText;\n  /**\n   * Optional override for the \"is not a valid website url with an http/https prefix\" error message.\n   */\n  readonly notWebsiteUrlWithPrefixMessage?: DynamicText;\n  /**\n   * Optional override for the \"is not a valid website url with an expected domain\" error message.\n   */\n  readonly notWebsiteUrlWithExpectedDomainMessage?: DynamicText;\n}\n\nfunction buildPortNumbersMessagePart(allowPorts: boolean): string {\n  return allowPorts ? '' : ' Urls with port numbers (e.g. localhost:8080) are not allowed.';\n}\n\n/**\n * Builds a forge validator input that checks a value is a valid website URL, optionally\n * requiring an http/https prefix and/or restricting to an allow-list of domains.\n *\n * When `validDomains` is provided and non-empty, an additional domain-match error is emitted\n * independently of the URL-shape error so both problems can surface at once.\n *\n * @param config - Tuning knobs for prefix, port, allowed domains, and custom messages.\n * @returns A validator input with a custom validator and the associated website validation messages.\n *\n * @example\n * ```ts\n * instance.addValidation(dbxForgeWebsiteUrlValidator());\n * instance.addValidation(dbxForgeWebsiteUrlValidator({ requirePrefix: false, allowPorts: true }));\n * instance.addValidation(dbxForgeWebsiteUrlValidator({ validDomains: ['example.com', 'example.org'] }));\n * ```\n */\nexport function dbxForgeWebsiteUrlValidator(config?: DbxForgeWebsiteUrlValidatorConfig): DbxForgeFieldFunctionFieldDefBuilderFunctionInstanceAddValidationInput {\n  const { requirePrefix, allowPorts, validDomains: inputValidDomains, notWebsiteUrlMessage, notWebsiteUrlWithPrefixMessage, notWebsiteUrlWithExpectedDomainMessage } = config ?? {};\n  const isPrefixRequired = requirePrefix ?? true;\n  const isAllowPorts = allowPorts ?? false;\n  const validDomains: WebsiteDomain[] = asArray<Maybe<WebsiteDomain>>(inputValidDomains).filter((x): x is WebsiteDomain => x != null);\n  const validDomainsSet = new Set(validDomains);\n  const validateDomains = validDomainsSet.size > 0;\n  const portNumbersMessagePart = buildPortNumbersMessagePart(isAllowPorts);\n\n  const websiteUrlErrorKind = isPrefixRequired ? IS_NOT_WEBSITE_URL_WITH_PREFIX_VALIDATION_KEY : IS_NOT_WEBSITE_URL_VALIDATION_KEY;\n  const defaultWebsiteUrlMessage = isPrefixRequired ? `Value is not a website url with an http/https prefix.${portNumbersMessagePart}` : `Value is not a valid website url.${portNumbersMessagePart}`;\n  const defaultExpectedDomainMessage = `Value is not a website url with one of the expected domains: ${validDomains.join(', ')}.`;\n\n  const resolvedWebsiteUrlMessage = (isPrefixRequired ? notWebsiteUrlWithPrefixMessage : notWebsiteUrlMessage) ?? defaultWebsiteUrlMessage;\n  const resolvedExpectedDomainMessage = notWebsiteUrlWithExpectedDomainMessage ?? defaultExpectedDomainMessage;\n\n  const fn: CustomValidator = (ctx) => {\n    const value = ctx.value() as Maybe<string>;\n    let result: Maybe<ValidationError[]> = null;\n\n    if (value != null && value !== '') {\n      const details = websiteUrlDetails(value);\n      const errors: ValidationError[] = [];\n\n      const isValidUrl = (() => {\n        let valid = false;\n\n        if (isPrefixRequired ? isWebsiteUrlWithPrefix(details.input) : details.isWebsiteUrl) {\n          valid = true;\n        } else if (isAllowPorts && details.hasPortNumber) {\n          valid = isPrefixRequired ? details.hasHttpPrefix : true;\n        }\n\n        return valid;\n      })();\n\n      if (!isValidUrl) {\n        errors.push({ kind: websiteUrlErrorKind });\n      }\n\n      if (validateDomains) {\n        const hasValidDomain = details.hasWebsiteDomain && validDomainsSet.has(details.domain);\n\n        if (!hasValidDomain) {\n          errors.push({ kind: IS_NOT_WEBSITE_URL_WITH_EXPECTED_DOMAIN_VALIDATION_KEY });\n        }\n      }\n\n      result = errors.length > 0 ? errors : null;\n    }\n\n    return result;\n  };\n\n  return {\n    validators: [\n      {\n        type: 'custom',\n        fn\n      }\n    ],\n    validationMessages: {\n      [websiteUrlErrorKind]: resolvedWebsiteUrlMessage,\n      [IS_NOT_WEBSITE_URL_WITH_EXPECTED_DOMAIN_VALIDATION_KEY]: resolvedExpectedDomainMessage\n    }\n  };\n}\n","import type { BaseValueField, DynamicText } from '@ng-forge/dynamic-forms';\nimport type { MatInputField, MatInputProps } from '@ng-forge/dynamic-forms-material';\nimport { transformStringFunction, type TransformStringFunctionConfig } from '@dereekb/util';\nimport type { FieldAutocompleteAttributeOptionRef } from '../../../../field/field.autocomplete';\nimport { dbxForgeFieldFunction, dbxForgeBuildFieldDef, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef, type DbxForgeFieldFunction, type DbxForgeFieldHintValueRef } from '../../field';\nimport { configureForgeAutocompleteFieldMeta } from '../../field.util.meta';\nimport { dbxForgeEmailValidator, dbxForgePatternValidator } from '../../field.util.validation';\n\n// MARK: Text Field\n/**\n * Configuration for minimum and maximum text length constraints.\n */\nexport interface DbxForgeTextFieldLengthConfig {\n  readonly minLength?: number;\n  readonly maxLength?: number;\n}\n\n/**\n * Configuration for regex pattern validation on a text field.\n */\nexport interface DbxForgeTextFieldPatternConfig {\n  readonly pattern?: string | RegExp;\n}\n\n/**\n * We use this for DbxForgeNumberFieldConfig since MatInputField is a union type for both string and number input.\n */\ntype DbxForgeStringInputFieldDef = BaseValueField<Omit<MatInputProps, 'type'> & { type?: DbxForgeTextFieldInputType }, string> & { type: 'input' } & DbxForgeFieldHintValueRef<DynamicText>;\n\n/**\n * HTML input type for a text field.\n */\nexport type DbxForgeTextFieldInputType = 'text' | 'password' | 'email';\n\n/**\n * Full configuration for a single-line text input field in forge.\n *\n * Combines labeling, validation (pattern, length), and string transformation\n * into one config object.\n */\nexport interface DbxForgeTextFieldConfig extends DbxForgeFieldFunctionDef<DbxForgeStringInputFieldDef>, FieldAutocompleteAttributeOptionRef {\n  /**\n   * HTML input type. Defaults to `'text'`.\n   */\n  readonly inputType?: DbxForgeTextFieldInputType;\n  /**\n   * An idempotent string transformation applied as a value parser (e.g., trim, uppercase).\n   *\n   * For non-idempotent transformations, you should directly configure the `transform` property instead.\n   */\n  readonly idempotentTransform?: TransformStringFunctionConfig;\n}\n\n/**\n * Single-line text input. Supports text/email/password input types, autocomplete attribute, regex pattern validation, and idempotent string transforms (trim, case changes, etc.).\n *\n * @param config - Text field configuration including key, label, validation, and transform options\n * @returns A text input field with type `'input'`\n *\n * @dbxFormField\n * @dbxFormSlug text\n * @dbxFormTier field-factory\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType input\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeTextFieldConfig\n * @example\n * ```typescript\n * const emailField = dbxForgeTextField({\n *   key: 'email',\n *   label: 'Email',\n *   required: true,\n *   inputType: 'email',\n *   props: { placeholder: 'user@example.com' }\n * });\n * ```\n */\nexport const dbxForgeTextField = dbxForgeFieldFunction<DbxForgeTextFieldConfig>({\n  type: 'input',\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder((input) => ({\n    type: input.inputType ?? 'text'\n  })),\n  buildFieldDef: dbxForgeBuildFieldDef<DbxForgeTextFieldConfig, string>((x, config) => {\n    const { pattern, idempotentTransform: transform } = config;\n\n    if (transform) {\n      x.addLogic([\n        {\n          type: 'transform',\n          transformType: 'idempotent',\n          transform: transformStringFunction(transform)\n        }\n      ]);\n\n      // remove the idempotentTransform\n      delete config.idempotentTransform;\n    }\n\n    if (config.inputType === 'email') {\n      x.addValidation(dbxForgeEmailValidator());\n    }\n\n    // configure autocomplete\n    x.configure(configureForgeAutocompleteFieldMeta);\n\n    // configure pattern validation\n    if (pattern) {\n      x.addValidation(dbxForgePatternValidator({ pattern }));\n    }\n  })\n}) as DbxForgeFieldFunction<DbxForgeTextFieldConfig, MatInputField>;\n","import type { MatTextareaField } from '@ng-forge/dynamic-forms-material';\nimport type { TransformStringFunctionConfigRef } from '@dereekb/util';\nimport type { FieldAutocompleteAttributeOptionRef } from '../../../../field/field.autocomplete';\nimport { dbxForgeFieldFunction, dbxForgeBuildFieldDef, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../../field';\nimport { configureForgeAutocompleteFieldMeta } from '../../field.util.meta';\nimport { dbxForgeDefaultValidationMessages } from '../../../validation';\n\n// MARK: TextArea Field\n/**\n * Configuration for a multi-line textarea input field in forge.\n */\nexport interface DbxForgeTextAreaFieldConfig extends DbxForgeFieldFunctionDef<MatTextareaField>, FieldAutocompleteAttributeOptionRef, Partial<TransformStringFunctionConfigRef> {\n  /**\n   * Number of visible text rows. Defaults to 3.\n   */\n  readonly rows?: number;\n  /**\n   * Initial value for the textarea. Defaults to empty string.\n   */\n  readonly defaultValue?: string;\n}\n\n/**\n * Multi-line textarea input. Supports row count, autocomplete attribute, pattern validation (RegExp → string conversion), and default value.\n *\n * @param config - Textarea field configuration including key, label, rows, and validation options\n * @returns A textarea field with type `'textarea'`\n *\n * @dbxFormField\n * @dbxFormSlug text-area\n * @dbxFormTier field-factory\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType textarea\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeTextAreaFieldConfig\n * @example\n * ```typescript\n * const bioField = dbxForgeTextAreaField({\n *   key: 'bio',\n *   label: 'Biography',\n *   rows: 5,\n *   maxLength: 500\n * });\n * ```\n */\nexport const dbxForgeTextAreaField = dbxForgeFieldFunction<DbxForgeTextAreaFieldConfig>({\n  type: 'textarea' as const,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder((input) => ({\n    rows: input.rows ?? 3\n  })),\n  buildFieldDef: dbxForgeBuildFieldDef((x, config) => {\n    // configure autocomplete\n    x.configure(configureForgeAutocompleteFieldMeta);\n\n    // set defaults\n    if (config.label == null) {\n      (config as any).label = '';\n    }\n\n    if (config.value == null) {\n      (config as any).value = config['defaultValue'] ?? '';\n    }\n\n    // convert RegExp pattern to string\n    if (config.pattern instanceof RegExp) {\n      (config as any).pattern = config.pattern.source;\n    }\n\n    // add default validation messages\n    x.addValidation({\n      validationMessages: dbxForgeDefaultValidationMessages()\n    });\n  })\n});\n","import type { DynamicText } from '@ng-forge/dynamic-forms';\nimport { LAT_LNG_PATTERN, US_STATE_CODE_STRING_REGEX, ZIP_CODE_STRING_REGEX } from '@dereekb/util';\nimport { ADDRESS_CITY_MAX_LENGTH, ADDRESS_STATE_CODE_MAX_LENGTH, ADDRESS_STATE_MAX_LENGTH, ADDRESS_COUNTRY_MAX_LENGTH, ADDRESS_ZIP_MAX_LENGTH } from '@dereekb/model';\nimport { type DbxForgeTextFieldConfig, dbxForgeTextField } from './text.field';\nimport type { FieldAutocompleteAttributeOption } from '../../../../field/field.autocomplete';\n\n// MARK: Name Field\n/**\n * Configuration for a forge name input field.\n */\nexport type DbxForgeNameFieldConfig = Partial<DbxForgeTextFieldConfig>;\n\n/**\n * Pre-configured text field for capturing a full name with sensible min/max length defaults.\n *\n * @param config - Optional overrides; defaults to key `'name'`, label `'Name'`\n * @returns A {@link MatInputField} for name input.\n *\n * @dbxFormSlug name\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeNameFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeNameField({ key: 'fullName', label: 'Full Name', required: true })\n * ```\n */\nexport function dbxForgeNameField(config: DbxForgeNameFieldConfig = {}) {\n  const { key = 'name', label = 'Name', placeholder = 'John Doe', required = false, minLength, maxLength } = config;\n\n  return dbxForgeTextField({\n    ...config,\n    key,\n    label,\n    placeholder,\n    required,\n    minLength,\n    maxLength\n  });\n}\n\n// MARK: Email Field\n/**\n * Configuration for a forge email address input field.\n */\nexport interface DbxForgeEmailFieldConfig {\n  readonly key?: string;\n  readonly label?: string;\n  readonly placeholder?: string;\n  readonly required?: boolean;\n  readonly readonly?: boolean;\n  readonly hint?: DynamicText;\n  /**\n   * Sets the autocomplete attribute on the input. Pass `false` to disable browser autofill.\n   */\n  readonly autocomplete?: FieldAutocompleteAttributeOption;\n}\n\n/**\n * Text field pre-configured with email input type and email validator. Prefer this over configuring `dbxForgeTextField` with `inputType: \"email\"` directly.\n *\n * Uses the `'email'` input type for built-in browser validation.\n *\n * @param config - Optional overrides; defaults to key `'email'`, label `'Email Address'`\n * @returns A {@link MatInputField} with email input type.\n *\n * @dbxFormSlug email\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeEmailFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeEmailField({ key: 'email', label: 'Email', required: true })\n * ```\n */\nexport function dbxForgeEmailField(config: DbxForgeEmailFieldConfig = {}) {\n  const { key = 'email', label = 'Email Address', placeholder = 'you@example.com', required, readonly: isReadonly, hint, autocomplete } = config;\n\n  return dbxForgeTextField({\n    key,\n    label,\n    placeholder,\n    required,\n    readonly: isReadonly,\n    hint,\n    autocomplete,\n    inputType: 'email'\n  });\n}\n\n// MARK: City Field\n/**\n * Configuration for a forge city input field.\n */\nexport type DbxForgeCityFieldConfig = Partial<DbxForgeTextFieldConfig>;\n\n/**\n * City name input enforcing `ADDRESS_CITY_MAX_LENGTH`. Typically used inside the address composite set.\n *\n * @param config - Optional overrides; defaults to key `'city'`, label `'City'`\n * @returns A {@link MatInputField} for city input.\n *\n * @dbxFormSlug city\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeCityFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeCityField({ required: true })\n * ```\n */\nexport function dbxForgeCityField(config: DbxForgeCityFieldConfig = {}) {\n  const { key = 'city', placeholder = '', label = 'City', maxLength = ADDRESS_CITY_MAX_LENGTH, required = false } = config;\n\n  return dbxForgeTextField({\n    ...config,\n    key,\n    placeholder,\n    label,\n    required,\n    maxLength\n  });\n}\n\n// MARK: State Field\n/**\n * Configuration for a forge US state input field.\n */\nexport interface DbxForgeStateFieldConfig extends Partial<DbxForgeTextFieldConfig> {\n  /**\n   * When true, validates and formats as a 2-letter state code (e.g., `'CA'`).\n   */\n  readonly asCode?: boolean;\n}\n\n/**\n * US state input. When `asCode: true`, validates two-letter codes and auto-uppercases input via an idempotent transform.\n *\n * @param config - Optional overrides; defaults to key `'state'`, label `'State'`\n * @returns A {@link MatInputField} for state input.\n *\n * @dbxFormSlug state\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeStateFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeStateField({ asCode: true, required: true })\n * ```\n */\nexport function dbxForgeStateField(config: DbxForgeStateFieldConfig = {}) {\n  const { asCode = false, pattern = asCode ? US_STATE_CODE_STRING_REGEX : undefined, key = 'state', placeholder: inputPlaceholder, label = 'State', maxLength = asCode ? ADDRESS_STATE_CODE_MAX_LENGTH : ADDRESS_STATE_MAX_LENGTH, idempotentTransform: transform, required = false } = config;\n  const placeholder = (inputPlaceholder ?? asCode) ? 'TX' : 'Texas';\n\n  return dbxForgeTextField({\n    ...config,\n    key,\n    placeholder,\n    label,\n    pattern,\n    required,\n    maxLength,\n    idempotentTransform: {\n      ...transform,\n      toUppercase: asCode || transform?.toUppercase\n    }\n  });\n}\n\n// MARK: Country Field\n/**\n * Configuration for a forge country input field.\n */\nexport type DbxForgeCountryFieldConfig = Partial<DbxForgeTextFieldConfig>;\n\n/**\n * Country name input enforcing `ADDRESS_COUNTRY_MAX_LENGTH`. Typically used inside the address composite set.\n *\n * @param config - Optional overrides; defaults to key `'country'`, label `'Country'`\n * @returns A {@link MatInputField} for country input.\n *\n * @dbxFormSlug country\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeCountryFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeCountryField({ required: true })\n * ```\n */\nexport function dbxForgeCountryField(config: DbxForgeCountryFieldConfig = {}) {\n  const { key = 'country', placeholder = '', label = 'Country', maxLength = ADDRESS_COUNTRY_MAX_LENGTH, required = false } = config;\n\n  return dbxForgeTextField({\n    ...config,\n    key,\n    placeholder,\n    label,\n    required,\n    maxLength\n  });\n}\n\n// MARK: Zip Code Field\n/**\n * Configuration for a forge zip/postal code input field.\n */\nexport type DbxForgeZipCodeFieldConfig = Partial<DbxForgeTextFieldConfig>;\n\n/**\n * US zip code input with pattern validation and max-length enforcement.\n *\n * @param config - Optional overrides; defaults to key `'zip'`, label `'Zip Code'`\n * @returns A {@link MatInputField} for zip code input.\n *\n * @dbxFormSlug zip-code\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeZipCodeFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeZipCodeField({ required: true })\n * ```\n */\nexport function dbxForgeZipCodeField(config: DbxForgeZipCodeFieldConfig = {}) {\n  const { key = 'zip', placeholder, label = 'Zip Code', pattern = ZIP_CODE_STRING_REGEX, maxLength = ADDRESS_ZIP_MAX_LENGTH, required = false } = config;\n\n  return dbxForgeTextField({\n    ...config,\n    key,\n    placeholder,\n    label,\n    pattern,\n    required,\n    maxLength\n  });\n}\n\n// MARK: LatLng Text Field\n/**\n * Default placeholder text for a forge latitude/longitude text field.\n */\nexport const DEFAULT_FORGE_LAT_LNG_TEXT_FIELD_PLACEHOLDER = '12.345,-67.8910';\n\n/**\n * Default pattern-validation message for a forge latitude/longitude text field.\n */\nexport const DEFAULT_FORGE_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE = `Invalid/unknown coordinates`;\n\n/**\n * Configuration for a forge latitude/longitude text input field.\n */\nexport type DbxForgeLatLngTextFieldConfig = Partial<DbxForgeTextFieldConfig>;\n\n/**\n * Latitude/longitude coordinate input with decimal-degree pattern validation.\n *\n * @param config - Optional overrides; defaults to key `'latLng'`\n * @returns A {@link MatInputField} for coordinate input.\n *\n * @dbxFormSlug lat-lng\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeLatLngTextFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeLatLngTextField({ key: 'coords', label: 'Coordinates' })\n * ```\n */\nexport function dbxForgeLatLngTextField(config: DbxForgeLatLngTextFieldConfig = {}) {\n  const { key = 'latLng' } = config;\n\n  return dbxForgeTextField({\n    key,\n    label: 'Coordinates',\n    placeholder: DEFAULT_FORGE_LAT_LNG_TEXT_FIELD_PLACEHOLDER,\n    pattern: LAT_LNG_PATTERN\n  });\n}\n","import type { BaseValueField } from '@ng-forge/dynamic-forms';\n\n// MARK: Field Type\nexport const FORGE_EXPAND_FIELD_TYPE_NAME = 'dbx-forge-expand' as const;\n\n/**\n * Visual style for the expand trigger.\n */\nexport type DbxForgeExpandButtonType = 'button' | 'text';\n\n/**\n * Props interface for the forge expand field.\n */\nexport interface DbxForgeExpandFieldProps {\n  /**\n   * Visual style for the expand trigger. Defaults to `'text'`.\n   */\n  readonly buttonType: DbxForgeExpandButtonType;\n  /**\n   * Label displayed on the expand trigger.\n   */\n  readonly expandLabel: string;\n}\n\n/**\n * Forge field definition for the expand control.\n *\n * This is a boolean value field that renders as a clickable button or text link.\n * When toggled, it writes `true`/`false` to its FieldTree value, which\n * is used by a sibling group's `logic` to show/hide content.\n */\nexport interface DbxForgeExpandFieldDef extends BaseValueField<DbxForgeExpandFieldProps, boolean> {\n  readonly type: typeof FORGE_EXPAND_FIELD_TYPE_NAME;\n}\n","import type { ContainerField, FieldDef } from '@ng-forge/dynamic-forms';\nimport type { DbxFlexSize, ScreenMediaWidthType } from '@dereekb/dbx-web';\nimport { dbxForgeContainer } from '../wrapper';\n\n// MARK: Wrapper Type\n/**\n * Registered wrapper type name for the flex layout wrapper.\n */\nexport const DBX_FORGE_FLEX_WRAPPER_TYPE_NAME = 'dbx-forge-flex' as const;\n\n/**\n * Wrapper config for the flex layout wrapper.\n *\n * Provides responsive flex layout behavior via the `dbxFlexGroup` directive.\n */\nexport interface DbxForgeFlexWrapper {\n  readonly type: typeof DBX_FORGE_FLEX_WRAPPER_TYPE_NAME;\n  /**\n   * Breakpoint based on the screen width below which fields stack.\n   */\n  readonly breakpoint?: ScreenMediaWidthType;\n  /**\n   * Whether to use relative sizing (removes max-width constraints).\n   */\n  readonly relative?: boolean;\n  /**\n   * Whether to break to a column layout when the breakpoint is reached.\n   */\n  readonly breakToColumn?: boolean;\n}\n\n// MARK: Flex Layout\n/**\n * Configuration for a single field within a flex layout,\n * pairing a field definition with an optional flex size.\n */\nexport interface DbxForgeFlexLayoutFieldConfig {\n  readonly field: FieldDef<unknown>;\n  /**\n   * Flex space sizing for the field (1-6). Defaults to the layout-level default size.\n   */\n  readonly size?: DbxFlexSize;\n}\n\n/**\n * Default configuration for a flex layout, combining flex wrapper settings\n * with a default size for fields that don't specify their own.\n */\nexport interface DbxForgeFlexLayoutConfig extends Omit<DbxForgeFlexWrapper, 'type'> {\n  /**\n   * Fields to include in the layout. Each entry may be a plain {@link FieldDef}\n   * or a {@link DbxForgeFlexLayoutFieldConfig} with a per-field size override.\n   */\n  readonly fields?: readonly (FieldDef<unknown> | DbxForgeFlexLayoutFieldConfig)[];\n  /**\n   * Default flex size for fields that don't specify their own.\n   *\n   * @defaultValue 2\n   */\n  readonly size?: DbxFlexSize;\n}\n\n/**\n * Type guard that checks if the input is a {@link DbxForgeFlexLayoutFieldConfig}\n * (has a `field` property) rather than a plain {@link FieldDef}.\n *\n * @param input - The field definition or flex layout field config to check.\n * @returns True if the input is a {@link DbxForgeFlexLayoutFieldConfig} with a `field` property.\n */\nfunction isFlexFieldConfig(input: FieldDef<unknown> | DbxForgeFlexLayoutFieldConfig): input is DbxForgeFlexLayoutFieldConfig {\n  return (input as DbxForgeFlexLayoutFieldConfig).field != null;\n}\n\n/**\n * Preferred overload: configure the flex layout with a single {@link DbxForgeFlexLayoutConfig} object.\n *\n * @param config - Layout configuration carrying `fields` and breakpoint/sizing defaults.\n * @returns A {@link ContainerField} with the flex wrapper applied and per-child sizing classes.\n */\nexport function dbxForgeFlexLayout(config: DbxForgeFlexLayoutConfig): ContainerField;\n/**\n * Creates a responsive flex layout container that arranges child fields horizontally\n * with configurable sizing, breakpoints, and responsive behavior.\n *\n * Each child field gets a `dbx-flex-N` CSS class applied (merged with any existing className).\n * The container hosts the `dbx-forge-flex` wrapper, which renders the `dbxFlexGroup`\n * directive for responsive breakpoint handling.\n *\n * A `container` is used (not a `group`) because flex layout is purely visual —\n * the wrapped fields should remain at the same level in the form value, not be\n * nested under an extra object.\n *\n * @param input - {@link DbxForgeFlexLayoutConfig} with a `fields` property and layout defaults.\n *   For backwards compatibility, may also be passed as a deprecated array of fields paired with an optional config.\n * @param legacyConfig - Only consulted when `input` is the deprecated array form; supplies the layout defaults that would otherwise live on the config object.\n * @returns A {@link ContainerField} with the flex wrapper applied and sized children.\n *\n * @dbxFormField\n * @dbxFormSlug flex-layout\n * @dbxFormTier composite-builder\n * @dbxFormSuffix Layout\n * @dbxFormProduces GroupField\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeFlexLayoutConfig\n * @dbxFormComposesFrom group\n *\n * @example\n * ```typescript\n * // Simple: all fields get default size (2)\n * dbxForgeFlexLayout({ fields: [dbxForgeCityField({}), dbxForgeStateField({}), dbxForgeZipCodeField({})] })\n *\n * // Resulting form value shape (flat — no wrapper property):\n * // { city: '...', state: '...', zip: '...' }\n *\n * // With per-field sizing and breakpoint\n * dbxForgeFlexLayout({\n *   breakpoint: 'small',\n *   size: 1,\n *   fields: [\n *     { field: dbxForgeCityField({}), size: 4 },\n *     dbxForgeStateField({}),\n *     dbxForgeZipCodeField({})\n *   ]\n * })\n *\n * // Full config\n * dbxForgeFlexLayout({ breakpoint: 'large', breakToColumn: true, relative: true, size: 1, fields: [...] })\n * ```\n */\nexport function dbxForgeFlexLayout(config: DbxForgeFlexLayoutConfig): ContainerField {\n  const { breakpoint, relative, breakToColumn, size: defaultSize = 2, fields = [] } = config;\n\n  const mappedFields = fields.map((entry) => {\n    const { field, size = defaultSize } = isFlexFieldConfig(entry) ? entry : { field: entry };\n    const flexClassName = `dbx-flex-${size}`;\n    const className = field.className ? `${field.className} ${flexClassName}` : flexClassName;\n    return { ...field, className };\n  });\n\n  const flexWrapper: DbxForgeFlexWrapper = {\n    type: DBX_FORGE_FLEX_WRAPPER_TYPE_NAME,\n    ...(breakpoint != null && { breakpoint }),\n    ...(relative != null && { relative }),\n    ...(breakToColumn != null && { breakToColumn })\n  };\n\n  return dbxForgeContainer({\n    fields: mappedFields as unknown as ContainerField['fields'],\n    className: 'dbx-flex-group',\n    wrappers: [flexWrapper]\n  });\n}\n","import type { RowField, GroupField, ContainerField, FieldDef, ConditionalExpression, WrapperConfig } from '@ng-forge/dynamic-forms';\nimport { FORGE_EXPAND_FIELD_TYPE_NAME, type DbxForgeExpandButtonType, type DbxForgeExpandFieldDef } from './expand/expand.field';\nimport { DBX_FORGE_FLEX_WRAPPER_TYPE_NAME, type DbxForgeFlexWrapper } from './flex/flex.wrapper';\n/**\n * Logic configuration for container fields (group, row, array).\n *\n * Containers only support `'hidden'` since they are layout containers,\n * not form controls. This mirrors ng-forge's internal `ContainerLogicConfig`.\n */\nexport interface DbxForgeContainerLogicConfig {\n  readonly type: 'hidden';\n  readonly condition: ConditionalExpression | boolean;\n}\n\nlet _dbxForgeRowCounter = 0;\nlet _dbxForgeContainerCounter = 0;\nlet _dbxForgeToggleCounter = 0;\nlet _dbxForgeExpandCounter = 0;\n\n// MARK: Row\n/**\n * Configuration for a forge row layout that arranges fields horizontally.\n *\n * Extends {@link RowField} with `key` made optional (auto-generated if omitted)\n * and `type` omitted (always `'row'`).\n */\nexport interface DbxForgeRowConfig extends Omit<RowField, 'type' | 'key'> {\n  /**\n   * Optional key for the row. Defaults to a unique auto-generated key.\n   *\n   * Must be unique within the form config to avoid ng-forge duplicate key errors.\n   */\n  readonly key?: string;\n}\n\n/**\n * Flex row that lays child fields out in columns. Child fields typically carry a `col` property (1–12) for grid placement.\n *\n * Uses the `@ng-forge/dynamic-forms` `RowField` type with a 12-column grid system.\n * Each child field can specify a `col` value (1-12) for responsive sizing.\n *\n * @param config - Row layout configuration with fields and optional className.\n * @returns A {@link RowField} with type `'row'`\n *\n * @dbxFormField\n * @dbxFormSlug row\n * @dbxFormTier primitive\n * @dbxFormProduces RowField\n * @dbxFormReturns RowField\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeRowConfig\n *\n * @example\n * ```typescript\n * dbxForgeRow({ fields: [ { ...dbxForgeTextField({ key: 'first' }), col: 6 }, { ...dbxForgeTextField({ key: 'last' }), col: 6 } ] })\n * ```\n */\nexport function dbxForgeRow(config: DbxForgeRowConfig): RowField {\n  const { key: inputKey, ...rest } = config;\n\n  return {\n    ...rest,\n    type: 'row',\n    key: inputKey ?? `_row_${_dbxForgeRowCounter++}`\n  } as RowField;\n}\n\n// MARK: Group\n/**\n * Configuration for a forge group layout.\n *\n * Extends {@link GroupField} with `type` omitted (always `'group'`). The `key`\n * is required because a `group` field creates a nested object in the form value\n * under that key — it is part of the value shape, not a display-only identifier.\n */\nexport interface DbxForgeGroupConfig extends Omit<GroupField, 'type'> {}\n\n/**\n * Creates a plain ng-forge `group` field. A group produces a nested object in\n * the form value under its `key`, so the key is semantically significant and\n * must be chosen deliberately.\n *\n * For visual-only grouping (conditional visibility, layout wrappers, shared\n * CSS class) that should NOT introduce a nested object in the form value, use\n * {@link dbxForgeContainer} instead — that is what ng-forge's `container`\n * field type is for.\n *\n * For sections with headers, use the section wrapper type instead.\n *\n * @param config - Group configuration with fields and required key.\n * @returns A {@link GroupField} with type `'group'`\n *\n * @dbxFormField\n * @dbxFormSlug group\n * @dbxFormTier primitive\n * @dbxFormProduces GroupField\n * @dbxFormReturns GroupField\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeGroupConfig\n *\n * @example\n * ```typescript\n * // Groups the address sub-fields under an `address` property in the form value.\n * const group = dbxForgeGroup({\n *   key: 'address',\n *   fields: [\n *     dbxForgeTextField({ key: 'city', label: 'City' }),\n *     dbxForgeTextField({ key: 'state', label: 'State' })\n *   ]\n * });\n *\n * // Resulting form value shape:\n * // { address: { city: '...', state: '...' } }\n * ```\n * @example\n * ```typescript\n * // Wrong: if the intent is purely visual (e.g. conditional visibility) and\n * // the fields should remain at the parent level in the form value, do NOT\n * // use a group — use dbxForgeContainer instead. Otherwise you end up with a\n * // spurious nested object:\n * //   { _group_0: { city: '...', state: '...' } }   // ← unwanted wrapper\n * ```\n */\nexport function dbxForgeGroup(config: DbxForgeGroupConfig): GroupField {\n  return {\n    ...config,\n    type: 'group'\n  } as GroupField;\n}\n\n// MARK: Container\n/**\n * Configuration for a forge container layout.\n *\n * Extends {@link ContainerField} with `type` omitted (always `'container'`),\n * `key` made optional (auto-generated if omitted), and `wrappers` made optional\n * (defaults to an empty array).\n */\nexport interface DbxForgeContainerConfig extends Omit<ContainerField, 'type' | 'key' | 'wrappers'> {\n  /**\n   * Optional key for the container. Defaults to a unique auto-generated key.\n   *\n   * Containers do not introduce a nested object in the form value — the key is\n   * only an identifier and is not part of the value shape. Must still be unique\n   * within the form config to avoid ng-forge duplicate key errors.\n   */\n  readonly key?: string;\n  /**\n   * Optional wrapper configs to chain around the children. Defaults to `[]`.\n   */\n  readonly wrappers?: readonly WrapperConfig[];\n}\n\n/**\n * Creates an ng-forge `container` field. Containers group child fields for\n * layout, conditional visibility, or wrapper application WITHOUT introducing\n * a nested object in the form value — child values remain at the same level\n * as the container itself.\n *\n * Use this (not {@link dbxForgeGroup}) whenever the grouping is purely visual\n * or structural. Use {@link dbxForgeGroup} when the intent is to nest the\n * child values under a named key in the form value.\n *\n * @param config - Container configuration with fields and optional key/wrappers.\n * @returns A {@link ContainerField} with type `'container'`\n *\n * @example\n * ```typescript\n * // Visual-only grouping (e.g. to apply a CSS class or a wrapper). Children\n * // remain at the parent level in the form value — the container itself\n * // does not add a property.\n * const container = dbxForgeContainer({\n *   className: 'dbx-highlight-group',\n *   fields: [\n *     dbxForgeTextField({ key: 'city', label: 'City' }),\n *     dbxForgeTextField({ key: 'state', label: 'State' })\n *   ]\n * });\n *\n * // Resulting form value shape (flat):\n * // { city: '...', state: '...' }\n * ```\n * @example\n * ```typescript\n * // Conditional visibility without altering the value shape — a common use\n * // case that should NOT use dbxForgeGroup.\n * const container = dbxForgeContainer({\n *   fields: [dbxForgeTextField({ key: 'jwks_uri', label: 'JWKS URI' })],\n *   logic: [{\n *     type: 'hidden',\n *     condition: { type: 'fieldValue', fieldPath: 'authMethod', operator: 'notEquals', value: 'private_key_jwt' }\n *   }]\n * });\n *\n * // Resulting form value shape (jwks_uri stays flat, not nested):\n * // { authMethod: '...', jwks_uri: '...' }\n * ```\n */\nexport function dbxForgeContainer(config: DbxForgeContainerConfig): ContainerField {\n  const { key: inputKey, wrappers, ...rest } = config;\n\n  return {\n    ...rest,\n    type: 'container',\n    key: inputKey ?? `_container_${_dbxForgeContainerCounter++}`,\n    wrappers: wrappers ?? []\n  } as ContainerField;\n}\n\n// MARK: Toggle Wrapper\n/**\n * Configuration for a forge toggle wrapper that shows/hides content via a slide toggle.\n */\nexport interface DbxForgeToggleWrapperConfig {\n  /**\n   * Fields to show/hide based on the toggle state.\n   */\n  readonly fields: FieldDef<unknown>[];\n  /**\n   * Label for the toggle control.\n   */\n  readonly label?: string;\n  /**\n   * Key for the toggle boolean field. Defaults to auto-generated `_toggle_N`.\n   */\n  readonly key?: string;\n  /**\n   * Optional CSS class name applied to the outer row container.\n   */\n  readonly className?: string;\n  /**\n   * Whether the toggle starts in the open state. Defaults to false.\n   */\n  readonly defaultOpen?: boolean;\n  /**\n   * Optional key for the content container. Auto-generated if omitted.\n   *\n   * The container does not add a property to the form value; this is only a\n   * stable identifier for the container field.\n   */\n  readonly contentKey?: string;\n}\n\n/**\n * Wraps content fields in a Material slide toggle — the toggle state controls conditional visibility of the inner fields.\n *\n * Uses ng-forge's built-in `toggle` field type (MatSlideToggle) and\n * `FieldValueCondition` for conditional visibility. The toggle boolean value\n * IS part of the form model. The hidden content is wrapped in a `container`\n * (not a `group`), so the wrapped fields sit at the same level as the toggle\n * in the form value — they are NOT nested under an extra object.\n *\n * Structure produced:\n * ```\n * Container (outer, with flex wrapper)\n *   ├── toggle field (type: 'toggle', boolean value)\n *   └── Container (content, hidden when toggle === false)\n * ```\n *\n * This is the forge equivalent of the formly `formlyToggleWrapper`.\n *\n * @param config - Toggle wrapper configuration.\n * @returns A {@link ContainerField} containing the toggle and content container.\n *\n * @dbxFormField\n * @dbxFormSlug toggle-wrapper\n * @dbxFormTier composite-builder\n * @dbxFormSuffix Wrapper\n * @dbxFormProduces ContainerField\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeToggleWrapperConfig\n * @dbxFormComposesFrom toggle, group\n *\n * @example\n * ```typescript\n * const toggle = dbxForgeToggleWrapper({\n *   key: 'showAdvanced',\n *   label: 'Show advanced options',\n *   fields: [\n *     dbxForgeTextField({ key: 'advanced1', label: 'Option 1' }),\n *     dbxForgeTextField({ key: 'advanced2', label: 'Option 2' })\n *   ]\n * });\n *\n * // Resulting form value (flat — no nesting under the container):\n * // { showAdvanced: true, advanced1: '...', advanced2: '...' }\n * ```\n */\nexport function dbxForgeToggleWrapper(config: DbxForgeToggleWrapperConfig): ContainerField {\n  const toggleKey = config.key ?? `_toggle_${_dbxForgeToggleCounter++}`;\n\n  // Built-in ng-forge toggle field (renders <mat-slide-toggle>)\n  const toggleField: FieldDef<unknown> = {\n    key: toggleKey,\n    type: 'toggle',\n    label: config.label ?? '',\n    value: config.defaultOpen ?? false\n  } as FieldDef<unknown>;\n\n  // Content container with conditional visibility based on toggle value.\n  // A container is used (not a group) so the wrapped fields stay at the same\n  // level in the form value as the toggle itself.\n  const hiddenCondition: DbxForgeContainerLogicConfig = {\n    type: 'hidden',\n    condition: {\n      type: 'fieldValue',\n      fieldPath: toggleKey,\n      operator: 'equals',\n      value: false\n    }\n  };\n\n  const contentContainer = dbxForgeContainer({\n    ...(config.contentKey != null && { key: config.contentKey }),\n    fields: config.fields as unknown as ContainerField['fields'],\n    logic: [hiddenCondition]\n  });\n\n  const flexWrapper: DbxForgeFlexWrapper = { type: DBX_FORGE_FLEX_WRAPPER_TYPE_NAME };\n\n  return dbxForgeContainer({\n    fields: [toggleField, contentContainer] as unknown as ContainerField['fields'],\n    className: config.className ?? 'dbx-forge-toggle-wrapper',\n    wrappers: [flexWrapper]\n  });\n}\n\n// MARK: Expand Wrapper\n/**\n * Configuration for a forge expand wrapper that shows/hides content via a button or text link.\n */\nexport interface DbxForgeExpandWrapperConfig {\n  /**\n   * Fields to show/hide when the expand control is toggled.\n   */\n  readonly fields: FieldDef<unknown>[];\n  /**\n   * Label for the expand trigger.\n   */\n  readonly label?: string;\n  /**\n   * Visual style for the expand trigger. Defaults to `'text'`.\n   */\n  readonly buttonType?: DbxForgeExpandButtonType;\n  /**\n   * Key for the expand boolean field. Defaults to auto-generated `_expand_N`.\n   */\n  readonly key?: string;\n  /**\n   * Optional CSS class name applied to the outer row container.\n   */\n  readonly className?: string;\n  /**\n   * Whether the expand starts in the open state. Defaults to false.\n   */\n  readonly defaultOpen?: boolean;\n  /**\n   * Optional key for the content container. Auto-generated if omitted.\n   *\n   * The container does not add a property to the form value; this is only a\n   * stable identifier for the container field.\n   */\n  readonly contentKey?: string;\n}\n\n/**\n * Wraps content fields behind a button or text \"expand\" control. Use for optional sections like \"Show advanced options\".\n *\n * Uses a custom `dbx-forge-expand` field type for the expand trigger and\n * `FieldValueCondition` for conditional visibility on the content. The\n * expand boolean value IS part of the form model. The hidden content is\n * wrapped in a `container` (not a `group`), so the wrapped fields sit at the\n * same level as the expand control in the form value — they are NOT nested\n * under an extra object.\n *\n * Structure produced:\n * ```\n * Container (outer, with flex wrapper)\n *   ├── expand field (type: 'dbx-forge-expand', boolean value)\n *   └── Container (content, hidden when expand field === false)\n * ```\n *\n * This is the forge equivalent of the formly `formlyExpandWrapper`.\n *\n * @param config - Expand wrapper configuration.\n * @returns A {@link ContainerField} containing the expand control and content container.\n *\n * @dbxFormField\n * @dbxFormSlug expand-wrapper\n * @dbxFormTier composite-builder\n * @dbxFormSuffix Wrapper\n * @dbxFormProduces ContainerField\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeExpandWrapperConfig\n * @dbxFormComposesFrom group\n *\n * @example\n * ```typescript\n * const expand = dbxForgeExpandWrapper({\n *   key: 'showMore',\n *   label: 'Show more options',\n *   buttonType: 'button',\n *   fields: [\n *     dbxForgeTextField({ key: 'extra1', label: 'Extra 1' }),\n *     dbxForgeTextField({ key: 'extra2', label: 'Extra 2' })\n *   ]\n * });\n *\n * // Resulting form value (flat — no nesting under the container):\n * // { showMore: true, extra1: '...', extra2: '...' }\n * ```\n */\nexport function dbxForgeExpandWrapper(config: DbxForgeExpandWrapperConfig): ContainerField {\n  const expandKey = config.key ?? `_expand_${_dbxForgeExpandCounter++}`;\n\n  const expandField: DbxForgeExpandFieldDef = {\n    key: expandKey,\n    type: FORGE_EXPAND_FIELD_TYPE_NAME,\n    label: '',\n    value: config.defaultOpen ?? false,\n    props: {\n      buttonType: config.buttonType ?? 'text',\n      expandLabel: config.label ?? ''\n    }\n  };\n\n  const hiddenCondition: DbxForgeContainerLogicConfig = {\n    type: 'hidden',\n    condition: {\n      type: 'fieldValue',\n      fieldPath: expandKey,\n      operator: 'equals',\n      value: false\n    }\n  };\n\n  const contentContainer = dbxForgeContainer({\n    ...(config.contentKey != null && { key: config.contentKey }),\n    fields: config.fields as unknown as ContainerField['fields'],\n    logic: [hiddenCondition]\n  });\n\n  const flexWrapper: DbxForgeFlexWrapper = { type: DBX_FORGE_FLEX_WRAPPER_TYPE_NAME };\n\n  return dbxForgeContainer({\n    fields: [expandField, contentContainer] as unknown as ContainerField['fields'],\n    className: config.className ?? 'dbx-forge-expand-wrapper',\n    wrappers: [flexWrapper]\n  });\n}\n","import { type ArrayItemDefinitionTemplate, type DynamicText } from '@ng-forge/dynamic-forms';\nimport { type DbxButtonStyle } from '@dereekb/dbx-web';\nimport { type DbxForgeFieldHintValueRef } from '../../field';\n\nexport const DBX_FORGE_ARRAY_FIELD_WRAPPER_NAME = 'dbx-forge-array-field-wrapper' as const;\n\nexport interface DbxForgeArrayFieldWrapperProps extends DbxForgeFieldHintValueRef<DynamicText> {\n  /**\n   * The template used when adding new items to the array.\n   *\n   * ng-forge requires an explicit template for every dynamic add operation —\n   * there is no automatic fallback. This is typically the container field\n   * definition (with element wrappers) built by {@link dbxForgeArrayField}.\n   */\n  readonly itemTemplate: ArrayItemDefinitionTemplate;\n  /**\n   * Minimum number of items required in the array.\n   *\n   * Flowed from the array FieldDef by `dbxForgeArrayField` when not set\n   * explicitly on the wrapper props.\n   */\n  readonly minLength?: number;\n  /**\n   * Maximum number of items allowed in the array.\n   *\n   * When set, the add button is disabled once the array reaches this length.\n   * Flowed from the array FieldDef by `dbxForgeArrayField` when not set\n   * explicitly on the wrapper props.\n   */\n  readonly maxLength?: number;\n  /**\n   * The label for the array field itself.\n   */\n  readonly label?: DynamicText;\n  /**\n   * Text for the add button. Defaults to 'Add'.\n   */\n  readonly addText?: DynamicText;\n  /**\n   * Text for the remove button. Defaults to 'Remove'.\n   */\n  readonly removeText?: DynamicText;\n  /**\n   * Whether the add button is shown. Defaults to true.\n   */\n  readonly allowAdd?: boolean;\n  /**\n   * Whether items can be removed. Defaults to true.\n   */\n  readonly allowRemove?: boolean;\n  /**\n   * Whether drag/drop reordering is disabled. Defaults to false.\n   */\n  readonly disableRearrange?: boolean;\n  /**\n   * Style configuration for the add button. Defaults to raised primary.\n   */\n  readonly addButtonStyle?: DbxButtonStyle;\n  /**\n   * Style configuration for the remove button. Defaults to stroked warn.\n   */\n  readonly removeButtonStyle?: DbxButtonStyle;\n}\n\nexport interface DbxForgeArrayFieldWrapperDef {\n  readonly type: typeof DBX_FORGE_ARRAY_FIELD_WRAPPER_NAME;\n  readonly props: DbxForgeArrayFieldWrapperProps;\n}\n","import { type DynamicText, type EvaluationContext } from '@ng-forge/dynamic-forms';\nimport { type IndexNumber } from '@dereekb/util';\nimport { type DbxChipDisplay, type DbxButtonDisplayStylePair, type DbxButtonStyle } from '@dereekb/dbx-web';\n\n/**\n * Predicate/factory that receives an {@link EvaluationContext} for the current array item.\n *\n * - `fieldValue` / `formValue` are scoped to the item.\n * - `arrayIndex` / `arrayPath` identify the item within its array.\n */\nexport type DbxForgeArrayItemEvaluationFn<TResult, TItem = unknown> = (ctx: EvaluationContext<TItem>) => TResult;\n\n/**\n * Props for the dbx-forge-array-field-element wrapper.\n *\n * Controls per-item rendering: drag handle, item label, and remove button\n * for each array entry.\n */\nexport interface DbxForgeArrayFieldElementWrapperProps<T = unknown> {\n  /**\n   * Label for each array item. Can be a static value or a function that receives\n   * an {@link EvaluationContext} scoped to the current item.\n   */\n  readonly labelForEntry?: DynamicText | DbxForgeArrayItemEvaluationFn<DynamicText, T>;\n  /**\n   * Whether to show the index chip. Defaults to true.\n   */\n  readonly showIndexChip?: boolean;\n  /**\n   * Customizes the display of the index chip.\n   *\n   * By default, is small with a grey color.\n   */\n  readonly indexChipDisplay?: DbxForgeArrayItemEvaluationFn<DbxChipDisplay, T>;\n  /**\n   * Text for the remove button. Defaults to 'Remove'.\n   */\n  readonly removeText?: DynamicText;\n  /**\n   * Whether items can be removed. Can be a boolean or a function that receives an\n   * {@link EvaluationContext} scoped to the current item. Defaults to `true`.\n   */\n  readonly allowRemove?: boolean | DbxForgeArrayItemEvaluationFn<boolean, T>;\n  /**\n   * Controls whether items can be duplicated. Defaults to `false`.\n   *\n   * - `true` — show the duplicate button; the duplicate is inserted immediately after the source item.\n   * - `false` — no duplicate button.\n   * - Function returning `boolean` — evaluated per-item; `true` shows the button with default placement.\n   * - Function returning {@link IndexNumber} — shows the button; the returned index is\n   *   the position at which the duplicate will be inserted.\n   */\n  readonly allowDuplicate?: boolean | DbxForgeArrayItemEvaluationFn<boolean | IndexNumber, T>;\n  /**\n   * Display and style for the duplicate button.\n   *\n   * Defaults to stroked primary with the text 'Duplicate'.\n   */\n  readonly duplicateButton?: DbxButtonDisplayStylePair | DbxForgeArrayItemEvaluationFn<DbxButtonDisplayStylePair, T>;\n  /**\n   * Whether drag/drop reordering is disabled. Defaults to false.\n   */\n  readonly disableRearrange?: boolean;\n  /**\n   * Style configuration for the remove button. Defaults to stroked warn.\n   */\n  readonly removeButtonStyle?: DbxButtonStyle;\n}\n\nexport const DBX_FORGE_ARRAY_FIELD_ELEMENT_WRAPPER_NAME = 'dbx-forge-array-field-element-wrapper' as const;\n\nexport interface DbxForgeArrayFieldElementWrapperDef<T = unknown> {\n  readonly type: typeof DBX_FORGE_ARRAY_FIELD_ELEMENT_WRAPPER_NAME;\n  readonly props?: DbxForgeArrayFieldElementWrapperProps<T>;\n}\n","import type { ArrayField, ContainerField, SimplifiedArrayField } from '@ng-forge/dynamic-forms';\nimport { dbxForgeBuildFieldDef, dbxForgeFieldFunction, type DbxForgeFieldFunctionDef } from '../../field';\nimport type { DbxForgeField } from '../../../form/forge.form';\nimport { DBX_FORGE_ARRAY_FIELD_WRAPPER_NAME, type DbxForgeArrayFieldWrapperProps } from '../../wrapper/array-field/array-field.wrapper';\nimport { DBX_FORGE_ARRAY_FIELD_ELEMENT_WRAPPER_NAME, type DbxForgeArrayFieldElementWrapperProps } from '../../wrapper/array-field/array-field.element.wrapper';\nimport { type Configurable } from '@dereekb/util';\n\n// MARK: Config\n/**\n * Configuration for creating a forge array field.\n *\n * The outer array wrapper provides label/hint header chrome.\n * Each template item is wrapped in a ContainerField with the element wrapper\n * to provide per-item drag handle, label, and remove button.\n */\nexport interface DbxForgeArrayFieldConfig extends DbxForgeFieldFunctionDef<Omit<ArrayField, 'props' | 'label' | 'fields'>> {\n  /**\n   * Template defining the fields for each array item.\n   * Each item is wrapped in a ContainerField with the element wrapper\n   * for per-item drag handle, label, and remove button.\n   *\n   * The array starts empty — items are added via the add button.\n   */\n  readonly template: ContainerField['fields'];\n  readonly props?: Omit<DbxForgeArrayFieldWrapperProps, 'itemTemplate'>;\n  readonly elementProps?: DbxForgeArrayFieldElementWrapperProps;\n}\n\nexport type DbxForgeArrayFieldFunction = (config: DbxForgeArrayFieldConfig) => DbxForgeField<ArrayField>;\n\n// MARK: Internal\n/**\n * Repeatable array wrapper with add/remove/drag-to-reorder controls. Template fields are cloned per item. Internally built with `dbxForgeFieldFunction` but categorized as a primitive because composites wrap it.\n *\n * Wraps the array with {@link DbxForgeArrayFieldWrapperComponent} for label/hint,\n * and wraps each template item in a ContainerField with\n * {@link DbxForgeArrayFieldElementWrapperComponent} for per-item drag handle,\n * label, and remove button.\n *\n * @param config - Array field configuration\n * @returns A {@link DbxForgeField}\n *\n * @dbxFormField\n * @dbxFormSlug array-field\n * @dbxFormTier primitive\n * @dbxFormProduces ArrayField\n * @dbxFormReturns ArrayField\n * @dbxFormArrayOutput yes\n * @dbxFormConfigInterface DbxForgeArrayFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeArrayField({ key: 'tags', template: [dbxForgeTextField({ key: 'value' })] })\n * ```\n */\nexport const dbxForgeArrayField = dbxForgeFieldFunction<DbxForgeArrayFieldConfig>({\n  type: 'array',\n  buildFieldDef: dbxForgeBuildFieldDef((x, config) => {\n    const { props, elementProps, template } = config;\n\n    // Flow per-element defaults from outer wrapper props; elementProps overrides\n    const resolvedElementProps = {\n      removeText: props?.removeText,\n      allowRemove: props?.allowRemove,\n      disableRearrange: props?.disableRearrange,\n      removeButtonStyle: props?.removeButtonStyle,\n      ...elementProps\n    };\n\n    // Build the container field that wraps each array item with the element wrapper.\n    // The key is required by FieldDef but does not affect the value shape for containers.\n    const containerFieldItemTemplate: ContainerField = {\n      key: `${config.key}-container`,\n      type: 'container',\n      fields: template ?? [],\n      wrappers: [\n        {\n          type: DBX_FORGE_ARRAY_FIELD_ELEMENT_WRAPPER_NAME,\n          props: resolvedElementProps\n        }\n      ]\n    };\n\n    const itemTemplate = [containerFieldItemTemplate];\n\n    // Add the outer array wrapper for label/hint chrome + cdkDropList + state service.\n    // Passes the containerField as itemTemplate so the add button can create new items.\n    // Flows minLength/maxLength from the array FieldDef into the wrapper props so\n    // the wrapper can enforce them on the add button. Wrapper-level props win when set.\n    x.addWrappers({\n      type: DBX_FORGE_ARRAY_FIELD_WRAPPER_NAME,\n      props: {\n        minLength: config.minLength,\n        maxLength: config.maxLength,\n        ...props,\n        itemTemplate\n      }\n    });\n\n    (config as Configurable<SimplifiedArrayField>).addButton = false;\n    (config as Configurable<SimplifiedArrayField>).removeButton = false;\n\n    (config as any).template = itemTemplate;\n\n    delete (config as any).props; // clear props\n  })\n}) as DbxForgeArrayFieldFunction;\n","import type { FieldDef, GroupAllowedChildren, GroupField } from '@ng-forge/dynamic-forms';\nimport { ADDRESS_LINE_MAX_LENGTH } from '@dereekb/model';\nimport { dbxForgeTextField, type DbxForgeTextFieldConfig } from './text.field';\nimport { dbxForgeCityField, type DbxForgeCityFieldConfig, dbxForgeCountryField, type DbxForgeCountryFieldConfig, dbxForgeStateField, type DbxForgeStateFieldConfig, dbxForgeZipCodeField, type DbxForgeZipCodeFieldConfig } from './text.additional.field';\nimport { dbxForgeGroup } from '../../wrapper/wrapper';\nimport { dbxForgeFlexLayout } from '../../wrapper/flex/flex.wrapper';\nimport { dbxForgeArrayField } from '../array/array.field';\nimport { type MatInputField } from '@ng-forge/dynamic-forms-material';\nimport { type DbxForgeField } from '../../../form/forge.form';\n\n// MARK: Address Config\n/**\n * Configuration for a group of address-related form fields (lines, city, state, zip, country).\n */\nexport interface DbxForgeAddressFieldsConfig {\n  readonly line1Field?: DbxForgeCityFieldConfig;\n  readonly line2Field?: DbxForgeCityFieldConfig;\n  readonly cityField?: DbxForgeCityFieldConfig;\n  readonly stateField?: DbxForgeStateFieldConfig;\n  readonly zipCodeField?: DbxForgeZipCodeFieldConfig;\n  readonly countryField?: DbxForgeCountryFieldConfig;\n  /**\n   * Whether or not to make required fields required.\n   *\n   * True by default.\n   */\n  readonly required?: boolean;\n  /**\n   * Whether or not to include the second address line.\n   *\n   * True by default.\n   */\n  readonly includeLine2?: boolean;\n  /**\n   * Whether or not to include the country.\n   *\n   * True by default.\n   */\n  readonly includeCountry?: boolean;\n}\n\n/**\n * Configuration for a single address line field.\n */\nexport interface DbxForgeAddressLineFieldConfig extends Partial<DbxForgeTextFieldConfig> {\n  /**\n   * Address line number: 0 for single \"Street\" line, 1 for \"Line 1\", 2 for \"Line 2\".\n   */\n  readonly line?: 0 | 1 | 2;\n}\n\n/**\n * Street address line input. The `line` prop controls which line (1 or 2) — it affects key and label generation.\n *\n * @param config - Optional overrides; line number determines key and label.\n * @returns A {@link MatInputField} for address line input.\n *\n * @dbxFormSlug address-line\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeAddressLineFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeAddressLineField({ line: 2 })\n * ```\n */\nexport function dbxForgeAddressLineField(config: DbxForgeAddressLineFieldConfig = {}) {\n  const { line = 1 } = config;\n  const lineCode = Math.max(1, line); // minimum of line 1\n\n  const { key = `line${lineCode}`, placeholder = '', label = line ? `Line ${line}` : 'Street', maxLength = ADDRESS_LINE_MAX_LENGTH, required = false } = config;\n\n  return dbxForgeTextField({\n    ...config,\n    key,\n    placeholder,\n    label,\n    required,\n    maxLength\n  });\n}\n\n/**\n * Flat array of address fields (line(s), city, state, zip, optional country) with a sensible flex layout. Drop directly into a parent `fields: []`.\n *\n * @param config - Address fields configuration.\n * @returns Array of forge field definitions for a complete address form section.\n *\n * @dbxFormSlug address-fields\n * @dbxFormProduces FieldDef[]\n * @dbxFormArrayOutput no\n * @dbxFormFieldTemplate address-line, city, state, zip-code, country\n * @dbxFormConfigInterface DbxForgeAddressFieldsConfig\n *\n * @example\n * ```typescript\n * dbxForgeAddressFields({ required: true, includeCountry: false })\n * ```\n */\nexport function dbxForgeAddressFields(config: DbxForgeAddressFieldsConfig = {}): GroupAllowedChildren[] {\n  const { required = true, includeLine2 = true, includeCountry = true } = config;\n\n  // City, state, zip, and country share a single relative-sized flex row to match formly parity.\n  const singleLineFields = [dbxForgeCityField({ required, ...config.cityField }), dbxForgeStateField({ required, ...config.stateField }), dbxForgeZipCodeField({ required, ...config.zipCodeField })];\n\n  if (includeCountry) {\n    singleLineFields.push(dbxForgeCountryField({ required, ...config.countryField }));\n  }\n\n  const singleLineRow = dbxForgeFlexLayout({ size: 1, relative: true, fields: singleLineFields });\n\n  let lines: DbxForgeField<MatInputField>[];\n\n  if (includeLine2) {\n    lines = [dbxForgeAddressLineField({ required, ...config.line1Field, line: 1 }), dbxForgeAddressLineField({ ...config.line2Field, line: 2 })];\n  } else {\n    lines = [dbxForgeAddressLineField({ required, ...config.line1Field, line: 0 })];\n  }\n\n  const fields: GroupAllowedChildren[] = [...lines, singleLineRow];\n  return fields;\n}\n\n// MARK: Address\n/**\n * Configuration for a complete address group composite.\n */\nexport interface DbxForgeAddressGroupConfig extends DbxForgeAddressFieldsConfig {\n  readonly key?: string;\n}\n\n/**\n * Wraps `address-fields` in a `GroupField` so the address is stored as a nested object under one key. Prefer this when the rest of the form doesn't want address fields flattened.\n *\n * @param config - Optional overrides; defaults to key `'address'`\n * @returns A {@link GroupField} containing address fields.\n *\n * @dbxFormField\n * @dbxFormSlug address-group\n * @dbxFormTier composite-builder\n * @dbxFormSuffix Group\n * @dbxFormProduces GroupField\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeAddressGroupConfig\n * @dbxFormComposesFrom address-fields, group\n *\n * @example\n * ```typescript\n * dbxForgeAddressGroup({ key: 'billingAddress' })\n * ```\n */\nexport function dbxForgeAddressGroup(config: Partial<DbxForgeAddressGroupConfig> = {}): GroupField {\n  const { key = 'address' } = config;\n\n  return dbxForgeGroup({\n    key,\n    fields: dbxForgeAddressFields(config)\n  });\n}\n\n// MARK: Address List\n/**\n * Configuration for a repeatable list of address field groups.\n */\nexport interface DbxForgeAddressListFieldConfig extends DbxForgeAddressFieldsConfig {\n  readonly key?: string;\n  /**\n   * Maximum number of addresses allowed. Defaults to 6.\n   */\n  readonly maxAddresses?: number;\n}\n\n/**\n * Repeatable array of addresses built on top of `array-field` + `address-group`. Keeps the `Field` suffix because it returns a single composite field whose value is an array of addresses.\n *\n * @param config - Optional overrides; defaults to key `'addresses'`, max 6 entries.\n * @returns A {@link DbxForgeArrayFieldDef} for multiple addresses.\n *\n * @dbxFormField\n * @dbxFormSlug address-list\n * @dbxFormTier composite-builder\n * @dbxFormSuffix Field\n * @dbxFormProduces ArrayField\n * @dbxFormArrayOutput yes\n * @dbxFormConfigInterface DbxForgeAddressListFieldConfig\n * @dbxFormComposesFrom address-group, array-field\n *\n * @example\n * ```typescript\n * dbxForgeAddressListField({ maxAddresses: 3 })\n * ```\n */\nexport function dbxForgeAddressListField(config: Partial<DbxForgeAddressListFieldConfig> = {}) {\n  const { key = 'addresses', maxAddresses = 6 } = config;\n\n  return dbxForgeArrayField({\n    key,\n    // labelForField: 'Address',\n    props: {\n      addText: 'Add Address',\n      removeText: 'Remove Address'\n    },\n    template: dbxForgeAddressFields(config),\n    maxLength: maxAddresses\n  });\n}\n","import type { BaseValueField } from '@ng-forge/dynamic-forms';\nimport type { MatInputField, MatInputProps } from '@ng-forge/dynamic-forms-material';\nimport { DOLLAR_AMOUNT_PRECISION, transformNumberFunction, type TransformNumberFunctionConfig, type TransformNumberFunctionConfigRef } from '@dereekb/util';\nimport { dbxForgeBuildFieldDef, type DbxForgeFieldFunction, dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../../field';\nimport { configureForgeAutocompleteFieldMeta } from '../../field.util.meta';\nimport { type FieldAutocompleteAttributeOptionRef } from '../../../../field/field.autocomplete';\n\n// MARK: Number Field\n/**\n * Validation error kind used by the `enforceStep` divisibility validator.\n */\nexport const FORGE_IS_DIVISIBLE_BY_VALIDATION_KEY = 'isDivisibleBy';\n\n/**\n * Numeric constraint configuration for forge number fields.\n */\nexport interface DbxForgeNumberFieldNumberConfig {\n  readonly min?: number;\n  readonly max?: number;\n  /**\n   * Step increment for the input.\n   */\n  readonly step?: number;\n  /**\n   * When true, validates that the value is divisible by `step`.\n   * Requires `step` to be set.\n   */\n  readonly enforceStep?: boolean;\n}\n\n/**\n * We use this for DbxForgeNumberFieldConfig since MatInputField is a union type for both string and number input.\n */\ntype DbxForgeNumberFieldDef = BaseValueField<Omit<MatInputProps, 'type'> & { type?: 'number' }, number> & { type: 'input' };\n\n/**\n * Full configuration for a numeric input field in forge.\n *\n * Combines labeling, numeric constraints (min/max/step), and number transformation.\n */\nexport interface DbxForgeNumberFieldConfig extends DbxForgeFieldFunctionDef<DbxForgeNumberFieldDef>, FieldAutocompleteAttributeOptionRef, DbxForgeNumberFieldNumberConfig, Partial<TransformNumberFunctionConfigRef> {\n  /**\n   * An idempotent number transformation applied as a value parser (e.g., rounding, precision, bounds).\n   *\n   * For non-idempotent transformations, you should directly configure the `transform` property instead.\n   */\n  readonly idempotentTransform?: TransformNumberFunctionConfig;\n}\n\n/**\n * Numeric input (HTML `type=\"number\"`). Supports min/max/step constraints, optional step enforcement (divisibility validator), and idempotent number transforms.\n *\n * When `step` is provided, sets the HTML `step` attribute on the input via `meta`.\n * When both `step` and `enforceStep` are set, adds a custom divisibility validator.\n *\n * @param config - Number field configuration\n * @returns A validated {@link MatInputField} with input type `'number'`\n *\n * @dbxFormField\n * @dbxFormSlug number\n * @dbxFormTier field-factory\n * @dbxFormProduces number\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType input\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeNumberFieldConfig\n * @example\n * ```typescript\n * dbxForgeNumberField({ key: 'quantity', label: 'Quantity', min: 1, max: 100, step: 1, enforceStep: true })\n * ```\n */\nexport const dbxForgeNumberField = dbxForgeFieldFunction<DbxForgeNumberFieldConfig>({\n  type: 'input' as const,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(() => {\n    return {\n      type: 'number' as const // set props type to number always\n    };\n  }),\n  buildFieldDef: dbxForgeBuildFieldDef<DbxForgeNumberFieldConfig, number>((x, config) => {\n    const { step, enforceStep, idempotentTransform: idempotentTransformConfig } = config;\n\n    if (idempotentTransformConfig) {\n      x.addLogic([\n        {\n          type: 'transform',\n          transformType: 'idempotent',\n          transform: transformNumberFunction(idempotentTransformConfig)\n        }\n      ]);\n    }\n\n    // configure autocomplete\n    x.configure(configureForgeAutocompleteFieldMeta);\n\n    // Apply the HTML step attribute to the <input> element via meta, merged with autocomplete\n    if (step != null) {\n      x.addMeta({ step });\n    }\n\n    // Add a divisibility validator when enforceStep is enabled\n    if (step && enforceStep) {\n      x.addValidation({\n        validators: [\n          {\n            type: 'custom',\n            // `fieldValue !== fieldValue` is true only for NaN; required because\n            // empty number inputs surface as NaN (not null) and the expression parser\n            // does not allow free function calls like isNaN().\n            expression: `fieldValue == null || fieldValue !== fieldValue || fieldValue % ${step} === 0`,\n            kind: FORGE_IS_DIVISIBLE_BY_VALIDATION_KEY\n          }\n        ],\n        validationMessages: {\n          [FORGE_IS_DIVISIBLE_BY_VALIDATION_KEY]: `Number must be divisible by ${step}.`\n        }\n      });\n    }\n  })\n}) as DbxForgeFieldFunction<DbxForgeNumberFieldConfig, MatInputField>;\n\n// MARK: Dollar Amount Field\n/**\n * Configuration for a forge dollar amount field, which enforces cent-level precision.\n */\nexport type DbxForgeDollarAmountFieldConfig = Omit<DbxForgeNumberFieldConfig, 'roundToStep' | 'precision'>;\n\n/**\n * Forge number field pre-configured for dollar amount input with cent-level precision. Pre-sets `transform.precision` to `DOLLAR_AMOUNT_PRECISION` so values round to whole cents.\n *\n * @param config - Number field configuration (precision is overridden to dollar amount precision)\n * @returns A {@link MatInputField} for dollar amount input.\n *\n * @dbxFormFieldDerivative number\n * @dbxFormSlug dollar-amount\n * @dbxFormProduces number\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeDollarAmountFieldConfig\n *\n * @example\n * ```typescript\n * const field = dbxForgeDollarAmountField({ key: 'price', label: 'Price', min: 0, required: true });\n * ```\n */\nexport function dbxForgeDollarAmountField(config: DbxForgeDollarAmountFieldConfig) {\n  return dbxForgeNumberField({\n    ...config,\n    transform: {\n      ...config.transform,\n      precision: config.transform?.precision ?? DOLLAR_AMOUNT_PRECISION\n    }\n  });\n}\n","import { type DynamicText } from '@ng-forge/dynamic-forms';\nimport { type Maybe, stripObject } from '@dereekb/util';\nimport { type DbxForgeFieldFunctionDef, type DbxForgeFieldFunctionFieldDefBuilderFunctionInstance } from '../../field';\n\n// MARK: Field Type\n/**\n * Registered wrapper type name for the Material-style form-field wrapper.\n *\n * Used in {@link WrapperConfig.type} to identify this wrapper when building\n * wrapper chains via {@link dbxForgeMaterialFormFieldWrappedFieldFunction}.\n */\nexport const DBX_FORGE_FORM_FIELD_WRAPPER_NAME = 'dbx-forge-form-field-wrapper' as const;\n\n// MARK: Props\n/**\n * Where the form-field wrapper should render the field's primary label.\n *\n * - `'wrapper'` — render the label in the notched outline only (default).\n * - `'content'` — suppress the notch label so the inner field can render its own\n *   label (used by checkbox/toggle, whose Material elements render their label inline).\n * - `'both'` — render the label in the notch AND let the inner field render its own.\n * - `'none'` — render no label in the notch and rely solely on `contentLabel`.\n */\nexport type DbxForgeFormFieldWrapperShowLabelAt = 'wrapper' | 'content' | 'both' | 'none';\n\n/**\n * Props for the form-field wrapper. Passed via `addWrappers({ type, props })`\n * and exposed to the wrapper component as a single `props` input.\n */\nexport interface DbxForgeFormFieldWrapperProps {\n  /**\n   * Optional label override for the notch.\n   *\n   * When set, this replaces the field's primary label inside the notched outline.\n   * Has no effect when {@link showLabelAt} is `'content'` or `'none'`.\n   */\n  readonly label?: DynamicText;\n}\n\n/**\n * Marker interface for a wrapper config that targets the form-field wrapper.\n */\nexport interface DbxForgeFormFieldWrapperDef {\n  readonly type: typeof DBX_FORGE_FORM_FIELD_WRAPPER_NAME;\n  readonly props?: DbxForgeFormFieldWrapperProps;\n}\n\n// MARK: Configuration\n/**\n * Adds the Material-style form-field wrapper ({@link DBX_FORGE_FORM_FIELD_WRAPPER_NAME}) to\n * the builder instance's wrapper chain so the rendered field is surrounded by the shared\n * label / hint / error chrome.\n *\n * @param instance - The field builder instance to mutate.\n */\nexport function configureDbxForgeFormFieldWrapper<C extends DbxForgeFieldFunctionDef<any>>(instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C>): void {\n  instance.addWrappers({\n    type: DBX_FORGE_FORM_FIELD_WRAPPER_NAME\n  });\n}\n\n/**\n * Returns a configurator that adds the form-field wrapper with the given props.\n *\n * Use this from a field factory's `buildFieldDef` step to attach the wrapper and\n * pass props (such as `showLabelAt` / `contentLabel`) through to the wrapper component.\n *\n * Undefined entries in `props` are dropped, and `props` is omitted from the wrapper\n * config entirely when no values remain — keeps the wrapper bare in the common case\n * (e.g. a checkbox/toggle with no label override).\n *\n * @param inputProps - Wrapper props applied to the inserted wrapper config; undefined entries are stripped and the `props` block is omitted entirely when no values remain.\n * @returns A configurator that mutates the builder instance to add the form-field wrapper with the resolved props.\n */\nexport function configureDbxForgeFormFieldWrapperWith(inputProps?: Maybe<DbxForgeFormFieldWrapperProps>): <C extends DbxForgeFieldFunctionDef<any>>(instance: DbxForgeFieldFunctionFieldDefBuilderFunctionInstance<C>) => void {\n  const props = stripObject(inputProps);\n\n  return (instance) => {\n    instance.addWrappers({\n      type: DBX_FORGE_FORM_FIELD_WRAPPER_NAME,\n      props\n    });\n  };\n}\n","import type { MatSliderField, MatSliderProps } from '@ng-forge/dynamic-forms-material';\nimport { configureDbxForgeFormFieldWrapper, type DbxForgeFormFieldWrapperDef } from '../../wrapper/formfield/formfield.wrapper';\nimport { type DbxForgeFieldFunctionDef, dbxForgeBuildFieldDef, dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder } from '../../field';\n\n// MARK: Number Slider Field\n/**\n * Configuration for a forge Material slider field.\n */\nexport interface DbxForgeNumberSliderFieldConfig extends DbxForgeFieldFunctionDef<MatSliderField> {\n  /**\n   * Whether or not to show the thumb label while sliding.\n   *\n   * Defaults to true.\n   */\n  readonly thumbLabel?: boolean;\n  /**\n   * Tick interval. If not provided defaults to the step value, if provided.\n   * If false, the ticks are disabled.\n   */\n  readonly tickInterval?: false | number;\n}\n\n/**\n * Material slider wrapped in a form-field container. Supports thumb label, tick interval, and step-derived tick spacing.\n *\n * The wrapper provides the Material outlined form-field appearance (notched outline with\n * floating label, hint/error subscript). The inner slider uses the ng-forge built-in\n * `slider` type.\n *\n * @param config - Slider field configuration including max (required), thumb label, and tick interval\n * @returns A {@link DbxForgeFormFieldWrapperDef} wrapping a slider field\n *\n * @dbxFormField\n * @dbxFormSlug number-slider\n * @dbxFormTier field-factory\n * @dbxFormProduces number\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType slider\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgeNumberSliderFieldConfig\n * @example\n * ```typescript\n * dbxForgeNumberSliderField({ key: 'rating', label: 'Rating', min: 0, max: 10, step: 1 })\n * ```\n */\nexport const dbxForgeNumberSliderField = dbxForgeFieldFunction<DbxForgeNumberSliderFieldConfig>({\n  type: 'slider' as const,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder((config) => {\n    const { step, thumbLabel: inputThumbLabel, tickInterval: inputTickInterval } = config;\n    let tickIntervalFromSteps: number | undefined;\n\n    if (step) {\n      tickIntervalFromSteps = 1;\n    }\n\n    const tickInterval: number | undefined = inputTickInterval === false ? undefined : (inputTickInterval ?? tickIntervalFromSteps ?? undefined);\n\n    // Create the inner slider using ng-forge built-in 'slider' type.\n    // Label and hint are omitted here — the wrapper provides those.\n    const sliderProps: Partial<MatSliderProps> = {\n      step,\n      thumbLabel: inputThumbLabel ?? true,\n      tickInterval\n    };\n\n    return sliderProps;\n  }),\n  buildFieldDef: dbxForgeBuildFieldDef((x, _config) => {\n    // configure form field wrapper\n    x.configure(configureDbxForgeFormFieldWrapper);\n  })\n});\n","import type { DynamicText } from '@ng-forge/dynamic-forms';\nimport type { MatToggleField, MatCheckboxField } from '@ng-forge/dynamic-forms-material';\nimport { dbxForgeFieldFunction, dbxForgeBuildFieldDef, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../../field';\nimport { configureDbxForgeFormFieldWrapperWith } from '../../wrapper/formfield/formfield.wrapper';\n\n/**\n * Where the field's primary label is rendered when wrapped by the form-field wrapper.\n */\nexport type DbxForgeBooleanShowLabelAt = 'wrapper' | 'content' | 'both';\n\n// MARK: Toggle Field\n/**\n * Configuration for a forge Material toggle (slide toggle) field.\n */\nexport interface DbxForgeToggleFieldConfig extends DbxForgeFieldFunctionDef<MatToggleField> {\n  /**\n   * Whether to render the toggle inside the shared Material-style form-field wrapper\n   * so it picks up the outlined chrome and properly styled error/hint subscript.\n   *\n   * Defaults to `true`.\n   */\n  readonly styledBox?: boolean;\n  /**\n   * Where to render the field's primary label. Defaults to `'content'`.\n   *\n   * Ignored if `styledBox` is false.\n   */\n  readonly showLabelAt?: DbxForgeBooleanShowLabelAt;\n  /**\n   * Optional secondary label rendered inside the wrapper's content area, regardless\n   * of {@link showLabelAt}. Useful for adding helper text inside the box.\n   */\n  readonly contentLabel?: DynamicText;\n}\n\n/**\n * Material slide toggle. Renders inside the shared form-field wrapper by default so\n * it visually matches surrounding outlined form fields and uses the standard error\n * subscript chrome; pass `styledBox: false` to opt out.\n *\n * @param config - Toggle field configuration\n * @returns A validated {@link MatToggleField} with type `'toggle'`\n *\n * @dbxFormField\n * @dbxFormSlug toggle\n * @dbxFormTier field-factory\n * @dbxFormProduces boolean\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType toggle\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgeToggleFieldConfig\n * @example\n * ```typescript\n * dbxForgeToggleField({ key: 'active', label: 'Active', value: true })\n * ```\n */\nexport const dbxForgeToggleField = dbxForgeFieldFunction<DbxForgeToggleFieldConfig>({\n  type: 'toggle' as const,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(),\n  buildFieldDef: dbxForgeBuildFieldDef((x, config) => {\n    if (config.styledBox !== false) {\n      // Boolean fields render their primary label inline next to the control,\n      // so by default the wrapper does not render a label of its own (`'content'`)\n      // — the inner field surfaces it. Callers can override via `showLabelAt`.\n      x.configure(\n        configureDbxForgeFormFieldWrapperWith({\n          label: config.showLabelAt === 'content' ? '' : config.label // clear the wrapper label if it should only show in the content\n        })\n      );\n\n      // clear the wrapper/use empty if it should only show in the wrapper\n      if (config.showLabelAt === 'wrapper') {\n        config.label = config.contentLabel ?? '';\n      }\n    }\n  })\n});\n\n// MARK: Checkbox Field\n/**\n * Configuration for a forge Material checkbox field.\n */\nexport interface DbxForgeCheckboxFieldConfig extends DbxForgeFieldFunctionDef<MatCheckboxField> {\n  /**\n   * Whether to render the checkbox inside the shared Material-style form-field wrapper\n   * so it picks up the outlined chrome and properly styled error/hint subscript.\n   *\n   * Defaults to `true`.\n   */\n  readonly styledBox?: boolean;\n  /**\n   * Where to render the field's primary label. Defaults to `'content'`.\n   *\n   * Ignored if `styledBox` is false.\n   */\n  readonly showLabelAt?: DbxForgeBooleanShowLabelAt;\n  /**\n   * Optional secondary label rendered inside the wrapper's content area, regardless\n   * of {@link showLabelAt}. Useful for adding helper text inside the box.\n   */\n  readonly contentLabel?: DynamicText;\n}\n\n/**\n * Material checkbox. Shares the form-field-wrapper opt-out with toggle.\n *\n * @param config - Checkbox field configuration\n * @returns A validated {@link MatCheckboxField} with type `'checkbox'`\n *\n * @dbxFormField\n * @dbxFormSlug checkbox\n * @dbxFormTier field-factory\n * @dbxFormProduces boolean\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType checkbox\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgeCheckboxFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeCheckboxField({ key: 'agree', label: 'I agree to the terms' })\n * ```\n */\nexport const dbxForgeCheckboxField = dbxForgeFieldFunction<DbxForgeCheckboxFieldConfig>({\n  type: 'checkbox' as const,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(),\n  buildFieldDef: dbxForgeBuildFieldDef((x, config) => {\n    if (config.styledBox !== false) {\n      // Boolean fields render their primary label inline next to the control,\n      // so by default the wrapper does not render a label of its own (`'content'`)\n      // — the inner field surfaces it. Callers can override via `showLabelAt`.\n      x.configure(\n        configureDbxForgeFormFieldWrapperWith({\n          label: config.showLabelAt === 'content' ? '' : config.label // clear the wrapper label if it should only show in the content\n        })\n      );\n\n      // clear the wrapper/use empty if it should only show in the wrapper\n      if (config.showLabelAt === 'wrapper') {\n        config.label = config.contentLabel ?? '';\n      }\n    }\n  })\n});\n","import { type DateTimeMinuteConfig } from '@dereekb/date';\n\nexport enum DbxDateTimeFieldTimeMode {\n  /**\n   * Time is required.\n   */\n  REQUIRED = 'required',\n  /**\n   * Time is optional.\n   */\n  OPTIONAL = 'optional',\n  /**\n   * Time is permenantly off.\n   */\n  NONE = 'none'\n}\n\n/**\n * Picker configuration for the date-time field, derived from {@link DateTimeMinuteConfig} without the `date` property.\n */\nexport type DbxDateTimePickerConfiguration = Omit<DateTimeMinuteConfig, 'date'>;\n\n/**\n * Direction of synchronization between date-time fields.\n */\nexport type DbxDateTimeFieldSyncType = 'before' | 'after';\n\n/**\n * Error code used when the selected date is not in the schedule.\n */\nexport const DBX_DATE_TIME_FIELD_DATE_NOT_IN_SCHEDULE_ERROR = 'dateTimeFieldDateNotInSchedule';\n\n/**\n * Error code used when the selected time/time input is not in the limited range.\n */\nexport const DBX_DATE_TIME_FIELD_TIME_NOT_IN_RANGE_ERROR = 'dateTimeFieldTimeNotInRange';\n","import { type Maybe, type ReadableTimeString } from '@dereekb/util';\nimport { dateFromLogicalDate, readableTimeStringToDate, utcDayForDate, DateTimeMinuteInstance, dateTimeMinuteDecisionFunction, findMinDate, findMaxDate } from '@dereekb/date';\nimport { startOfDay, addMinutes, addDays } from 'date-fns';\nimport { DbxDateTimeFieldTimeMode, type DbxDateTimePickerConfiguration, DBX_DATE_TIME_FIELD_DATE_NOT_IN_SCHEDULE_ERROR, DBX_DATE_TIME_FIELD_TIME_NOT_IN_RANGE_ERROR } from '../../../../field/value/date/datetime.config';\nimport { type DateTimePreset } from '../../../../field/value/date/datetime';\n\n// MARK: Interfaces\n\n/**\n * Input for computing a combined datetime from date/time field state.\n */\nexport interface DateTimeCalcInput {\n  readonly dateValue: Maybe<Date>;\n  readonly timeString: Maybe<ReadableTimeString>;\n  readonly isFullDay: boolean;\n  readonly fullDayInUTC: boolean;\n  readonly isTimeOnly: boolean;\n  readonly timeMode: DbxDateTimeFieldTimeMode;\n  readonly timeDate: Maybe<Date>;\n  readonly isCleared: boolean;\n}\n\n/**\n * Result of keyboard step computation.\n */\nexport interface KeyboardStepResult {\n  readonly direction: number;\n  readonly offset: number;\n}\n\n/**\n * Interface wrapping all datetime field calculation functions.\n */\nexport interface DateTimeFieldCalc {\n  /**\n   * Combines date + time inputs into a single Date value.\n   *\n   * This is the core logic that merges the separate date and time controls\n   * into one unified datetime, handling fullDay, timeOnly, cleared states, and timeDate fallbacks.\n   */\n  buildCombinedDateTime(input: DateTimeCalcInput): Maybe<Date>;\n\n  /**\n   * Applies a keyboard offset (in steps) to a date, clamping to the given picker config limits.\n   *\n   * Each step is multiplied by minuteStep to get the actual minutes delta.\n   * The result is clamped via DateTimeMinuteInstance.\n   *\n   * @param input - The time offset input containing date, step offset, minute step, and optional config\n   */\n  applyTimeOffset(input: ApplyTimeOffsetInput): Date;\n\n  /**\n   * Merges picker config limits with min/max values from synced fields.\n   *\n   * Sync \"before\" values contribute a minimum date (this field must be after that value).\n   * Sync \"after\" values contribute a maximum date (this field must be before that value).\n   */\n  mergePickerConfig(config: Maybe<DbxDateTimePickerConfiguration>, syncBeforeValue: Maybe<Date>, syncAfterValue: Maybe<Date>): Maybe<DbxDateTimePickerConfiguration>;\n\n  /**\n   * Filters presets based on selected date, fullDay/timeOnly state, and config limits.\n   *\n   * - Returns empty array when fullDay is active.\n   * - Returns all presets unfiltered when timeOnly (no date-based filtering).\n   * - Otherwise evaluates each preset against the selected date and config limits.\n   *\n   * @param input - The filter presets input containing presets, selected date, mode flags, and optional config\n   */\n  filterPresets(input: FilterPresetsInput): DateTimePreset[];\n\n  /**\n   * Computes a human-readable error message from a form field's error record.\n   */\n  computeErrorMessage(errors: Maybe<Record<string, unknown>>, isRequired: boolean): string | undefined;\n}\n\n// MARK: Factory\n\n/**\n * Creates a {@link DateTimeFieldCalc} instance with all datetime calculation functions.\n *\n * @returns A DateTimeFieldCalc instance bundling all pure datetime calculation functions.\n */\nexport function dateTimeFieldCalc(): DateTimeFieldCalc {\n  return {\n    buildCombinedDateTime,\n    applyTimeOffset,\n    mergePickerConfig,\n    filterPresets,\n    computeErrorMessage\n  };\n}\n\n// MARK: Pure Functions\n\n/**\n * Combines date and time inputs into a single Date.\n *\n * Handles fullDay, timeOnly, cleared states, and timeDate fallbacks to produce\n * a unified datetime value from the separate date and time form controls.\n *\n * @param input - The datetime calculation input containing date, time, and mode information.\n * @returns The combined Date value, or undefined if the input is cleared or incomplete.\n *\n * @__NO_SIDE_EFFECTS__\n */\nexport function buildCombinedDateTime(input: DateTimeCalcInput): Maybe<Date> {\n  const { dateValue, timeString, isFullDay, fullDayInUTC, isTimeOnly, timeMode, timeDate, isCleared } = input;\n\n  let result: Maybe<Date> = undefined;\n\n  if (!isCleared) {\n    let date = dateValue;\n\n    if (!date || isTimeOnly) {\n      date = timeDate ?? new Date();\n    }\n\n    if (date) {\n      if (isFullDay) {\n        result = fullDayInUTC ? utcDayForDate(date) : startOfDay(date);\n      } else if (timeString) {\n        result =\n          readableTimeStringToDate(timeString, {\n            date,\n            useSystemTimezone: true\n          }) ?? date;\n      } else if (!isTimeOnly && timeMode !== DbxDateTimeFieldTimeMode.REQUIRED) {\n        // If time is not required and no time string, return the date as-is\n        result = date;\n      }\n    }\n  }\n\n  return result;\n}\n\n/**\n * Input for {@link applyTimeOffset}.\n */\nexport interface ApplyTimeOffsetInput {\n  readonly date: Date;\n  readonly stepsOffset: number;\n  readonly minuteStep: number;\n  readonly config?: Maybe<DbxDateTimePickerConfiguration>;\n}\n\n/**\n * Applies a keyboard time offset (in step increments) and clamps to picker config limits.\n *\n * @param input - The time offset input containing date, step offset, minute step, and optional config.\n * @returns The offset date, clamped to the picker config limits.\n */\nexport function applyTimeOffset(input: ApplyTimeOffsetInput): Date {\n  const { date, stepsOffset, minuteStep, config } = input;\n  const instance = new DateTimeMinuteInstance({\n    date,\n    ...config,\n    roundDownToMinute: true\n  });\n\n  let result = instance.clamp(date);\n  const minutes = stepsOffset * minuteStep;\n\n  if (minutes !== 0) {\n    result = addMinutes(result, minutes);\n    result = instance.clamp(result);\n  }\n\n  return result;\n}\n\n/**\n * Merges picker config with sync constraint values (before/after from synced fields).\n *\n * Sync \"before\" values contribute a minimum date (this field must be after that value).\n * Sync \"after\" values contribute a maximum date (this field must be before that value).\n *\n * @param config - The base picker configuration to merge into.\n * @param syncBeforeValue - Minimum date constraint from a synced \"before\" field, or null.\n * @param syncAfterValue - Maximum date constraint from a synced \"after\" field, or null.\n * @returns The merged picker configuration with updated limits, or the original config if no sync values.\n */\nexport function mergePickerConfig(config: Maybe<DbxDateTimePickerConfiguration>, syncBeforeValue: Maybe<Date>, syncAfterValue: Maybe<Date>): Maybe<DbxDateTimePickerConfiguration> {\n  let result: Maybe<DbxDateTimePickerConfiguration> = config;\n\n  if (syncBeforeValue != null || syncAfterValue != null) {\n    const { min: limitMin, max: limitMax } = config?.limits ?? {};\n    const min = findMinDate([syncBeforeValue, dateFromLogicalDate(limitMin)]);\n    const max = findMaxDate([syncAfterValue, dateFromLogicalDate(limitMax)]);\n\n    result = {\n      ...config,\n      limits: {\n        ...config?.limits,\n        min,\n        max\n      }\n    };\n  }\n\n  return result;\n}\n\n/**\n * Input for {@link filterPresets}.\n */\nexport interface FilterPresetsInput {\n  readonly presets: DateTimePreset[];\n  readonly selectedDate: Maybe<Date>;\n  readonly isFullDay: boolean;\n  readonly isTimeOnly: boolean;\n  readonly config?: Maybe<DbxDateTimePickerConfiguration>;\n}\n\n/**\n * Filters presets based on the current field state and config limits.\n *\n * Returns an empty array when fullDay is active (no time presets apply).\n * Returns all presets unfiltered when timeOnly (no date-based filtering needed).\n * Otherwise evaluates each preset against the selected date and config limits.\n *\n * @param input - The filter presets input containing presets, selected date, mode flags, and optional config.\n * @returns The filtered array of applicable presets.\n */\nexport function filterPresets(input: FilterPresetsInput): DateTimePreset[] {\n  const { presets, selectedDate, isFullDay, isTimeOnly, config } = input;\n  let result: DateTimePreset[];\n\n  if (isFullDay) {\n    result = [];\n  } else if (isTimeOnly) {\n    result = presets;\n  } else if (selectedDate) {\n    const isAllowedDate = config ? (x: Maybe<Date>) => (x == null ? true : dateTimeMinuteDecisionFunction(config)(x)) : () => true;\n\n    result = presets.filter((preset) => {\n      const value = preset.value();\n      let presetDate: Maybe<Date>;\n\n      if (value.logicalDate) {\n        presetDate = dateFromLogicalDate(value.logicalDate);\n      } else if (value.timeString) {\n        presetDate = readableTimeStringToDate(value.timeString, {\n          date: selectedDate,\n          useSystemTimezone: true\n        });\n      }\n\n      return presetDate ? isAllowedDate(presetDate) : false;\n    });\n  } else {\n    result = [];\n  }\n\n  return result;\n}\n\n/**\n * Computes a human-readable error message from a field's error record.\n *\n * Checks for required, schedule, time range, and pattern errors in priority order.\n *\n * @param errors - The validation error record from the form field, or null/undefined.\n * @param isRequired - Whether the field is required (affects the \"required\" error message)\n * @returns A human-readable error message string, or undefined if no errors exist.\n */\nexport function computeErrorMessage(errors: Maybe<Record<string, unknown>>, isRequired: boolean): string | undefined {\n  let result: string | undefined;\n\n  if (errors && Object.keys(errors).length > 0) {\n    if (isRequired && errors['required']) {\n      result = 'Date is required';\n    } else if (errors[DBX_DATE_TIME_FIELD_DATE_NOT_IN_SCHEDULE_ERROR]) {\n      result = 'Date does not fall on an available dates in schedule.';\n    } else if (errors[DBX_DATE_TIME_FIELD_TIME_NOT_IN_RANGE_ERROR]) {\n      result = 'Time is not valid for the given date.';\n    } else if (errors['pattern']) {\n      result = 'The input time is not recognizable.';\n    } else {\n      result = 'The given date and time is invalid.';\n    }\n  }\n\n  return result;\n}\n\n// MARK: Keyboard Step Functions\n\n/**\n * Computes the date keyboard navigation step from a KeyboardEvent.\n *\n * - ArrowUp/Down: ±1 day\n * - Ctrl: ±30 days\n * - Shift: ±7 days\n * - Ctrl+Shift: ±365 days\n *\n * Returns null if the event is not a recognized arrow key.\n *\n * @param event - The keyboard event to evaluate.\n * @returns A KeyboardStepResult with direction and offset, or null if the key is not an arrow key.\n */\nexport function computeDateKeyboardStep(event: KeyboardEvent): Maybe<KeyboardStepResult> {\n  let result: Maybe<KeyboardStepResult> = null;\n  let direction: Maybe<number> = null;\n\n  switch (event.key?.toLowerCase()) {\n    case 'arrowup':\n      direction = 1;\n      break;\n    case 'arrowdown':\n      direction = -1;\n      break;\n  }\n\n  if (direction != null) {\n    let offset = 1;\n\n    if (event.ctrlKey && event.shiftKey) {\n      offset = 365;\n    } else if (event.ctrlKey) {\n      offset = 30;\n    } else if (event.shiftKey) {\n      offset = 7;\n    }\n\n    result = { direction, offset };\n  }\n\n  return result;\n}\n\n/**\n * Computes the time keyboard navigation step from a KeyboardEvent.\n *\n * - ArrowUp/Down: ±1 step\n * - Alt: ±60 steps (typically minutes)\n * - Shift: ±5 steps\n * - Alt+Shift: ±300 steps\n *\n * Returns null if the event is not a recognized arrow key.\n *\n * @param event - The keyboard event to evaluate.\n * @returns A KeyboardStepResult with direction and offset, or null if the key is not an arrow key.\n */\nexport function computeTimeKeyboardStep(event: KeyboardEvent): Maybe<KeyboardStepResult> {\n  let result: Maybe<KeyboardStepResult> = null;\n  let direction: Maybe<number> = null;\n\n  switch (event.key?.toLowerCase()) {\n    case 'arrowup':\n      direction = 1;\n      break;\n    case 'arrowdown':\n      direction = -1;\n      break;\n  }\n\n  if (direction != null) {\n    let offset = 1;\n\n    if (event.altKey && event.shiftKey) {\n      offset = 300;\n    } else if (event.altKey) {\n      offset = 60;\n    } else if (event.shiftKey) {\n      offset = 5;\n    }\n\n    result = { direction, offset };\n  }\n\n  return result;\n}\n\n// MARK: Date Navigation Helper\n\n/**\n * Navigates to a new date by applying a keyboard step, validating against the schedule, and clamping to limits.\n *\n * @param currentDate - The current date to navigate from.\n * @param step - The keyboard step result (direction + offset in days)\n * @param config - Optional picker config for schedule/limit validation.\n * @returns The new date, or null if no valid date is available in the requested direction.\n */\nexport function navigateDate(currentDate: Date, step: KeyboardStepResult, config: Maybe<DbxDateTimePickerConfiguration>): Maybe<Date> {\n  const newDate = startOfDay(addDays(currentDate, step.offset * step.direction));\n  const instance = new DateTimeMinuteInstance({\n    date: newDate,\n    ...config\n  });\n\n  let nextDate: Maybe<Date>;\n\n  if (instance.isInSchedule(newDate)) {\n    nextDate = newDate;\n  } else {\n    const direction = step.direction === 1 ? 'future' : 'past';\n    nextDate = instance.findNextAvailableDayInSchedule(newDate, direction);\n  }\n  let result: Maybe<Date> = undefined;\n\n  if (nextDate != null) {\n    result = instance.clampToLimit(nextDate);\n  }\n\n  return result;\n}\n","import type { MatDatepickerField } from '@ng-forge/dynamic-forms-material';\nimport { dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../../field';\n\n// MARK: Date Field\n/**\n * Configuration for a forge date picker field.\n */\nexport interface DbxForgeDateFieldConfig extends DbxForgeFieldFunctionDef<MatDatepickerField> {}\n\n/**\n * Material datepicker (date-only, no time). For time-of-day picking use the `date-time` field; for ranges use `date-range-row` or `date-time-range-row`.\n *\n * Uses the native ng-forge MatDatepickerField.\n *\n * @param config - Date field configuration including key, label, and date constraints\n * @returns A validated {@link MatDatepickerField}\n *\n * @dbxFormField\n * @dbxFormSlug date\n * @dbxFormTier field-factory\n * @dbxFormProduces Date\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType datepicker\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeDateFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeDateField({ key: 'startDate', label: 'Start Date', required: true })\n * ```\n */\nexport const dbxForgeDateField = dbxForgeFieldFunction<DbxForgeDateFieldConfig>({\n  type: 'datepicker' as const,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder()\n});\n","import type { BaseValueField } from '@ng-forge/dynamic-forms';\nimport { dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../../field';\nimport type { DbxForgeDateTimeFieldComponentProps } from './datetime.field.component';\nimport { type DbxDateTimeFieldSyncType } from '../../../../field/value/date/datetime.config';\n\n// MARK: Sync Field Types\n/**\n * Sync field configuration for forge datetime fields.\n *\n * Same as formly's {@link DbxDateTimeFieldSyncField} but re-exported here so forge consumers\n * don't need to import from the formly module.\n */\nexport interface DbxForgeDateTimeSyncField {\n  /**\n   * Sibling field key/path to sync with.\n   */\n  readonly syncWith: string;\n  /**\n   * How to sync against the other field.\n   *\n   * - `'before'`: The synced field's value acts as a minimum for this field.\n   * - `'after'`: The synced field's value acts as a maximum for this field.\n   */\n  readonly syncType: DbxDateTimeFieldSyncType;\n}\n\n// MARK: DateTime Field\n/**\n * The custom forge field type name for the date-time field.\n */\nexport const FORGE_DATETIME_FIELD_TYPE = 'datetime' as const;\n\n/**\n * Field definition type for a forge date-time field.\n */\nexport type DbxForgeDateTimeFieldDef = BaseValueField<DbxForgeDateTimeFieldComponentProps, unknown> & {\n  readonly type: typeof FORGE_DATETIME_FIELD_TYPE;\n};\n\n/**\n * Configuration for a forge date-time picker field combining date and time selection.\n *\n * Full parity with the formly `DateTimeFieldConfig` — supports timezone, valueMode, timeMode,\n * pickerConfig, presets, field sync, and all other formly datetime features via `props`.\n */\nexport interface DbxForgeDateTimeFieldConfig extends DbxForgeFieldFunctionDef<DbxForgeDateTimeFieldDef> {}\n\n/**\n * Combined date-time picker with timezone, value mode (DATE_STRING / TIMESTAMP / Date), and time mode (REQUIRED / OPTIONAL / NONE). Powers `date-range-row` and `date-time-range-row`.\n *\n * Full parity with formly `dateTimeField()` — supports timezone, valueMode, timeMode,\n * pickerConfig, presets, and all other features via the `props` slot.\n *\n * @param config - Date-time field configuration\n * @returns A {@link DbxForgeDateTimeFieldDef}\n *\n * @dbxFormField\n * @dbxFormSlug date-time\n * @dbxFormTier field-factory\n * @dbxFormProduces DateTimeValue\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType datetime\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeDateTimeFieldConfig\n * @dbxFormPropsInterface DbxForgeDateTimeFieldComponentProps\n *\n * @example\n * ```typescript\n * dbxForgeDateTimeField({ key: 'when', label: 'When', timezone: 'America/New_York' })\n * ```\n */\nexport const dbxForgeDateTimeField = dbxForgeFieldFunction<DbxForgeDateTimeFieldConfig>({\n  type: FORGE_DATETIME_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder()\n});\n","import type { RowField } from '@ng-forge/dynamic-forms';\nimport { dbxForgeRow } from '../../wrapper/wrapper';\nimport { DbxDateTimeFieldTimeMode } from '../../../../field/value/date/datetime.config';\nimport { dbxForgeDateTimeField, type DbxForgeDateTimeFieldConfig } from './datetime.field';\nimport type { DbxForgeDateTimeFieldComponentProps } from './datetime.field.component';\nimport { of } from 'rxjs';\n\n// MARK: Date Range Field\n/**\n * Per-field overrides for a forge date range start/end picker.\n *\n * Mirrors formly's `DateDateRangeFieldDateConfig`. Runtime component props go under `props`;\n * `dateLabel`, `timeOnly`, `timeMode`, and `getSyncFieldsObs` are managed by the row builder\n * and excluded from the override surface.\n */\nexport interface DbxForgeDateRangeFieldDateConfig extends Omit<DbxForgeDateTimeFieldConfig, 'props'> {\n  readonly props?: Omit<DbxForgeDateTimeFieldComponentProps, 'dateLabel' | 'timeOnly' | 'timeMode' | 'getSyncFieldsObs'>;\n}\n\ntype DbxForgeDateRangeRowSharedProps = Pick<DbxForgeDateTimeFieldComponentProps, 'timeDate' | 'timezone' | 'showTimezone' | 'presets' | 'valueMode' | 'minuteStep'>;\n\n/**\n * Configuration for a forge date range row with separate start and end date pickers.\n *\n * Mirrors formly's `DateDateRangeFieldConfig`. Shared runtime props (timezone, presets,\n * valueMode, etc.) go under `props`; per-field overrides go under `start` / `end`.\n */\nexport interface DbxForgeDateRangeRowConfig {\n  readonly required?: boolean;\n  readonly props?: DbxForgeDateRangeRowSharedProps;\n  readonly start?: Partial<DbxForgeDateRangeFieldDateConfig>;\n  readonly end?: Partial<DbxForgeDateRangeFieldDateConfig>;\n}\n\n/**\n * Two-column row of start/end date-time fields configured for date-only picking. Use when you need a paired start/end date range laid out horizontally.\n *\n * Composite builder that creates a pair of date pickers for selecting a date range (start and end dates)\n * arranged in a flex row. The pickers are synchronized so the start date stays before the end date.\n *\n * This is the forge equivalent of formly's `formlyDateRangeField()`.\n *\n * @param config - Date range configuration with optional shared props and start/end overrides.\n * @returns A {@link RowField} containing the start and end date field pair.\n *\n * @dbxFormField\n * @dbxFormSlug date-range-row\n * @dbxFormTier composite-builder\n * @dbxFormSuffix Row\n * @dbxFormProduces RowField\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeDateRangeRowConfig\n * @dbxFormComposesFrom date-time, row\n *\n * @example\n * ```typescript\n * dbxForgeDateRangeRow({ required: true, start: { key: 'from', label: 'From' }, end: { key: 'to', label: 'To' } })\n * ```\n */\nexport function dbxForgeDateRangeRow(config: DbxForgeDateRangeRowConfig = {}): RowField {\n  const { required: inputRequired, start, end, props: sharedProps } = config;\n  const required = inputRequired ?? start?.required ?? false;\n\n  const startFieldKey = start?.key ?? 'start';\n  const endFieldKey = end?.key ?? 'end';\n\n  const startField = dbxForgeDateTimeField({\n    ...start,\n    required,\n    key: startFieldKey,\n    props: {\n      ...sharedProps,\n      ...start?.props,\n      dateLabel: 'Start',\n      timeMode: DbxDateTimeFieldTimeMode.NONE,\n      allDayLabel: '',\n      getSyncFieldsObs: () => of([{ syncWith: endFieldKey, syncType: 'after' as const }])\n    }\n  });\n\n  const endField = dbxForgeDateTimeField({\n    ...end,\n    required,\n    key: endFieldKey,\n    props: {\n      ...sharedProps,\n      ...end?.props,\n      dateLabel: 'End',\n      timeMode: DbxDateTimeFieldTimeMode.NONE,\n      allDayLabel: '',\n      getSyncFieldsObs: () => of([{ syncWith: startFieldKey, syncType: 'before' as const }])\n    }\n  });\n\n  return dbxForgeRow({\n    fields: [\n      { ...startField, col: 6 },\n      { ...endField, col: 6 }\n    ]\n  });\n}\n","import type { RowField } from '@ng-forge/dynamic-forms';\nimport { of } from 'rxjs';\nimport { DbxDateTimeFieldTimeMode } from '../../../../field/value/date/datetime.config';\nimport type { DbxForgeDateTimeFieldComponentProps } from './datetime.field.component';\nimport { type DbxForgeDateRangeFieldDateConfig } from './daterange.field';\nimport { dbxForgeDateTimeField } from './datetime.field';\nimport { dbxForgeRow } from '../../wrapper/wrapper';\n\n// MARK: Date-Time Range Field\n/**\n * Per-field overrides for a forge date-time range start/end time picker.\n *\n * Mirrors formly's `DateTimeRangeFieldTimeConfig`. All-day related props are excluded\n * from the override surface.\n */\nexport interface DbxForgeDateTimeRangeFieldTimeConfig extends Omit<DbxForgeDateRangeFieldDateConfig, 'props'> {\n  readonly props?: Omit<DbxForgeDateTimeFieldComponentProps, 'dateLabel' | 'timeMode' | 'timeOnly' | 'hideDateHint' | 'allDayLabel' | 'fullDayFieldName' | 'fullDayInUTC' | 'getSyncFieldsObs'>;\n}\n\ntype DbxForgeDateTimeRangeRowSharedProps = Pick<DbxForgeDateTimeFieldComponentProps, 'timeDate' | 'timezone' | 'showTimezone' | 'presets' | 'valueMode' | 'minuteStep'>;\n\n/**\n * Configuration for a forge date-time range row with separate start and end time pickers.\n *\n * Mirrors formly's `DateDateTimeRangeFieldConfig`.\n */\nexport interface DbxForgeDateTimeRangeRowConfig {\n  readonly required?: boolean;\n  readonly props?: DbxForgeDateTimeRangeRowSharedProps;\n  readonly start?: Partial<DbxForgeDateTimeRangeFieldTimeConfig>;\n  readonly end?: Partial<DbxForgeDateTimeRangeFieldTimeConfig>;\n}\n\n/**\n * Two-column row of time-only pickers for selecting a time range within a single day.\n *\n * This is the forge equivalent of formly's `formlyDateTimeRangeField()`.\n *\n * @param inputConfig - Time range configuration with optional shared props and start/end overrides.\n * @returns A {@link RowField} containing the start and end time field pair.\n *\n * @dbxFormField\n * @dbxFormSlug date-time-range-row\n * @dbxFormTier composite-builder\n * @dbxFormSuffix Row\n * @dbxFormProduces RowField\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeDateTimeRangeRowConfig\n * @dbxFormComposesFrom date-time, row\n *\n * @example\n * ```typescript\n * dbxForgeDateTimeRangeRow({ start: { label: 'From' }, end: { label: 'Until' } })\n * ```\n */\nexport function dbxForgeDateTimeRangeRow(inputConfig: DbxForgeDateTimeRangeRowConfig = {}): RowField {\n  const { required = false, start: inputStart, end: inputEnd, props: sharedProps } = inputConfig;\n\n  const startFieldKey = inputStart?.key ?? 'start';\n  const endFieldKey = inputEnd?.key ?? 'end';\n\n  const startField = dbxForgeDateTimeField({\n    label: inputStart?.label ?? 'Start Time',\n    ...inputStart,\n    required,\n    key: startFieldKey,\n    props: {\n      ...sharedProps,\n      ...inputStart?.props,\n      timeMode: DbxDateTimeFieldTimeMode.REQUIRED,\n      timeOnly: true,\n      hideDateHint: true,\n      getSyncFieldsObs: () => of([{ syncWith: endFieldKey, syncType: 'after' as const }])\n    }\n  });\n\n  const endField = dbxForgeDateTimeField({\n    label: inputEnd?.label ?? 'End Time',\n    ...inputEnd,\n    required,\n    key: endFieldKey,\n    props: {\n      ...sharedProps,\n      ...inputEnd?.props,\n      timeMode: DbxDateTimeFieldTimeMode.REQUIRED,\n      timeOnly: true,\n      hideDateHint: true,\n      getSyncFieldsObs: () => of([{ syncWith: startFieldKey, syncType: 'before' as const }])\n    }\n  });\n\n  return dbxForgeRow({\n    fields: [\n      { ...startField, col: 6 },\n      { ...endField, col: 6 }\n    ]\n  });\n}\n","import type { BaseValueField } from '@ng-forge/dynamic-forms';\nimport { configureDbxForgeFormFieldWrapper } from '../../wrapper/formfield/formfield.wrapper';\nimport { dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, dbxForgeBuildFieldDef, type DbxForgeFieldFunctionDef } from '../../field';\nimport type { DbxForgeFixedDateRangeFieldComponentProps, DbxForgeFixedDateRangeValue } from './fixeddaterange.field.component';\n\n// MARK: Fixed Date Range Field\n/**\n * The custom forge field type name for the fixed date range field.\n */\nexport const FORGE_FIXEDDATERANGE_FIELD_TYPE = 'fixeddaterange' as const;\n\n/**\n * Field definition type for a forge fixed date range field.\n */\nexport type DbxForgeFixedDateRangeFieldDef = BaseValueField<DbxForgeFixedDateRangeFieldComponentProps, DbxForgeFixedDateRangeValue> & {\n  readonly type: typeof FORGE_FIXEDDATERANGE_FIELD_TYPE;\n};\n\n/**\n * Configuration for a forge fixed date range field using an inline calendar-style range picker.\n *\n * Full parity with the formly `FixedDateRangeFieldConfig`.\n */\nexport interface DbxForgeFixedDateRangeFieldConfig extends DbxForgeFieldFunctionDef<DbxForgeFixedDateRangeFieldDef> {}\n\n/**\n * Inline calendar-style date-range picker with fixed range length (e.g. \"7 days from start\"). Wrapped in a Material form-field container with a custom selection strategy.\n *\n * Uses an inline `<mat-calendar>` with a custom selection strategy, matching the formly\n * `fixedDateRangeField()` behavior. Supports multiple selection modes, timezone conversion,\n * date range input configuration, and optional text inputs.\n *\n * @param config - Fixed date range field configuration\n * @returns A {@link DbxForgeFixedDateRangeFieldDef}\n *\n * @dbxFormField\n * @dbxFormSlug fixed-date-range\n * @dbxFormTier field-factory\n * @dbxFormProduces DbxForgeFixedDateRangeValue\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType fixeddaterange\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgeFixedDateRangeFieldConfig\n * @dbxFormPropsInterface DbxForgeFixedDateRangeFieldComponentProps\n *\n * @example\n * ```typescript\n * dbxForgeFixedDateRangeField({ key: 'range', label: 'Date Range' })\n * ```\n */\nexport const dbxForgeFixedDateRangeField = dbxForgeFieldFunction<DbxForgeFixedDateRangeFieldConfig>({\n  type: FORGE_FIXEDDATERANGE_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(),\n  buildFieldDef: dbxForgeBuildFieldDef((x) => {\n    x.configure(configureDbxForgeFormFieldWrapper);\n  })\n});\n","import { type DateTimezoneUtcNormalInstance, parseISO8601DayStringToDate, toJsDate, formatToISO8601DayStringForSystem, formatToISO8601DateString, isSameDateHoursAndMinutes, type DateRangeWithDateOrStringValue, parseJsDateString } from '@dereekb/date';\nimport { type ISO8601DayString, type Maybe, dateFromMinuteOfDay, dateToMinuteOfDay } from '@dereekb/util';\n\nexport enum DbxDateTimeValueMode {\n  /**\n   * Value is returned/parsed as a Date.\n   */\n  DATE = 0,\n  /**\n   * Value is returned/parsed as an ISO8601DateString\n   */\n  DATE_STRING = 1,\n  /**\n   * Value is returned/parsed as an ISO8601DayString, relative to the current timezone.\n   */\n  DAY_STRING = 2,\n  /**\n   * Value is returned/parsed as a Unix timestamp, relative to the current timezone.\n   */\n  UNIX_TIMESTAMP = 3,\n  /**\n   * Value is returned/parsed as a minute of the day, relative to the current timezone.\n   */\n  MINUTE_OF_DAY = 4,\n  /**\n   * Value is returned/parsed as a minute of the day, relative to the system timezone.\n   */\n  SYSTEM_MINUTE_OF_DAY = 5\n}\n\n/**\n * Creates a parser function that converts raw form input values (Date, string, or number)\n * into JavaScript Date objects based on the specified value mode.\n *\n * Handles timezone conversion when a timezone instance is provided and the mode requires it.\n *\n * @param mode - Determines how the input value is interpreted.\n * @param timezoneInstance - Optional timezone converter for UTC-normal date handling.\n * @returns Parses input values to Date objects.\n *\n * @example\n * ```typescript\n * const parser = dbxDateTimeInputValueParseFactory(DbxDateTimeValueMode.DATE_STRING, timezoneInstance);\n * const date = parser('2024-01-15T10:00:00Z');\n * ```\n *\n * @__NO_SIDE_EFFECTS__\n */\nexport function dbxDateTimeInputValueParseFactory(mode: DbxDateTimeValueMode, timezoneInstance: Maybe<DateTimezoneUtcNormalInstance>): (date: Maybe<Date | string | number>) => Maybe<Date> {\n  let factory: (date: Maybe<Date | string | number>) => Maybe<Date>;\n  let useTimezoneInstance = true;\n\n  switch (mode) {\n    case DbxDateTimeValueMode.DAY_STRING:\n      factory = (x) => {\n        let result: Maybe<Date>;\n\n        switch (typeof x) {\n          case 'string':\n            result = parseISO8601DayStringToDate(x);\n            break;\n          case 'number':\n            result = new Date(x);\n            break;\n          default:\n            result = x;\n            break;\n        }\n\n        return result;\n      };\n      useTimezoneInstance = false; // day strings do not use timezones\n      break;\n    case DbxDateTimeValueMode.SYSTEM_MINUTE_OF_DAY:\n    case DbxDateTimeValueMode.MINUTE_OF_DAY:\n      factory = (x) => {\n        let result: Maybe<Date>;\n\n        switch (typeof x) {\n          case 'number':\n            result = dateFromMinuteOfDay(x);\n            break;\n          case 'string':\n            result = parseJsDateString(x);\n            break;\n          default:\n            result = x;\n            break;\n        }\n\n        return result;\n      };\n\n      if (mode === DbxDateTimeValueMode.SYSTEM_MINUTE_OF_DAY) {\n        useTimezoneInstance = false;\n      }\n\n      break;\n    case DbxDateTimeValueMode.UNIX_TIMESTAMP:\n    case DbxDateTimeValueMode.DATE_STRING:\n    case DbxDateTimeValueMode.DATE:\n    default:\n      factory = (x) => (x == null ? x : toJsDate(x));\n      break;\n  }\n\n  if (timezoneInstance && useTimezoneInstance) {\n    const originalFactory = factory;\n\n    factory = (input) => {\n      const date = originalFactory(input);\n      if (!date || (date instanceof Date && Number.isNaN(date.getTime()))) return date;\n      return timezoneInstance.systemDateToTargetDate(date);\n    };\n  }\n\n  return factory;\n}\n\n/**\n * Creates a formatter function that converts JavaScript Date objects into the appropriate\n * output format (Date, ISO string, timestamp, or minute-of-day) based on the specified value mode.\n *\n * Handles timezone conversion when a timezone instance is provided and the mode requires it.\n *\n * @param mode - Determines the output format.\n * @param timezoneInstance - Optional timezone converter for UTC-normal date handling.\n * @returns Formats Date objects to the target output type.\n *\n * @example\n * ```typescript\n * const formatter = dbxDateTimeOutputValueFactory(DbxDateTimeValueMode.DAY_STRING, null);\n * const dayString = formatter(new Date()); // e.g., '2024-01-15'\n * ```\n *\n * @__NO_SIDE_EFFECTS__\n */\nexport function dbxDateTimeOutputValueFactory(mode: DbxDateTimeValueMode, timezoneInstance: Maybe<DateTimezoneUtcNormalInstance>): (date: Maybe<Date>) => Maybe<Date | string | number> {\n  let factory: (date: Maybe<Date>) => Maybe<Date | string | number>;\n  let useTimezoneInstance = true;\n\n  switch (mode) {\n    case DbxDateTimeValueMode.DAY_STRING:\n      factory = (x) => (x == null ? x : formatToISO8601DayStringForSystem(x));\n      useTimezoneInstance = false; // day strings do not use timezones\n      break;\n    case DbxDateTimeValueMode.DATE_STRING:\n      factory = (x) => (x == null ? x : formatToISO8601DateString(x));\n      break;\n    case DbxDateTimeValueMode.UNIX_TIMESTAMP:\n      factory = (x) => (x == null ? x : x.getTime());\n      break;\n    case DbxDateTimeValueMode.SYSTEM_MINUTE_OF_DAY:\n    case DbxDateTimeValueMode.MINUTE_OF_DAY:\n      factory = (x) => (x == null ? x : dateToMinuteOfDay(x));\n\n      if (mode === DbxDateTimeValueMode.SYSTEM_MINUTE_OF_DAY) {\n        useTimezoneInstance = false;\n      }\n      break;\n    case DbxDateTimeValueMode.DATE:\n    default:\n      factory = (x) => x;\n      break;\n  }\n\n  if (timezoneInstance && useTimezoneInstance) {\n    const originalFactory = factory;\n\n    factory = (input) => {\n      const date = input ? timezoneInstance.targetDateToSystemDate(input) : input;\n      return originalFactory(date);\n    };\n  }\n\n  return factory;\n}\n\n/**\n * Compares two date-time field values for equality, handling Date, ISO8601DayString, and number (timestamp/minute) types.\n *\n * For string and number types, performs strict equality. For Date objects, compares hours and minutes.\n *\n * @param a - First date-time value.\n * @param b - Second date-time value.\n * @returns Whether the two values represent the same date-time.\n */\nexport function dbxDateTimeIsSameDateTimeFieldValue(a: Maybe<Date | ISO8601DayString | number>, b: Maybe<Date | ISO8601DayString | number>) {\n  const typeofA = typeof a;\n  return a && b ? (typeofA === 'string' || typeofA === 'number' ? a === b : isSameDateHoursAndMinutes(a as Date, b as Date)) : a == b;\n}\n\n/**\n * Compares two date range field values for equality by comparing both start and end values.\n *\n * @param a - First date range value.\n * @param b - Second date range value.\n * @returns Whether the two date ranges represent the same range.\n */\nexport function dbxDateRangeIsSameDateRangeFieldValue(a: Maybe<DateRangeWithDateOrStringValue>, b: Maybe<DateRangeWithDateOrStringValue>) {\n  return a && b ? dbxDateTimeIsSameDateTimeFieldValue(a.start, b.start) && dbxDateTimeIsSameDateTimeFieldValue(a.end, b.end) : a == b;\n}\n","import { type Getter, type GetterOrValue, type LogicalDate, type Maybe, type ReadableTimeString, asGetter, getValueFromGetter } from '@dereekb/util';\n\n/**\n * A pair of either a logical date or a time string.\n */\nexport interface DateTimePresetValue {\n  /**\n   * Logical date to provide.\n   */\n  logicalDate?: Maybe<LogicalDate>;\n  /**\n   * Time string value. Ignored if logical date is provided.\n   */\n  timeString?: Maybe<ReadableTimeString>;\n}\n\n/**\n * Configuration for a DateTimePreset\n */\nexport interface DateTimePresetConfiguration {\n  /**\n   * Label\n   */\n  label: GetterOrValue<string>;\n  /**\n   * Whether or not the value should be retrieved each time or can be cached.\n   *\n   * Only relevant if a getter is used.\n   */\n  dynamic?: boolean;\n  /**\n   * Logical time to provide.\n   */\n  logicalDate?: Maybe<GetterOrValue<LogicalDate>>;\n  /**\n   * Time string to return. Ignored if logicalDate is provided.\n   */\n  timeString?: Maybe<GetterOrValue<ReadableTimeString>>;\n}\n\n/**\n * A label and value getter.\n */\nexport interface DateTimePreset {\n  /**\n   * Getter for the label\n   */\n  label: Getter<string>;\n  /**\n   * Getter for the value\n   */\n  value: Getter<DateTimePresetValue>;\n}\n\n/**\n * Creates a DateTimePreset from a DateTimePresetConfiguration.\n *\n * @param config - The preset configuration with label and value getter.\n * @returns A DateTimePreset with a lazy value getter.\n */\nexport function dateTimePreset(config: DateTimePresetConfiguration): DateTimePreset {\n  let value: Getter<DateTimePresetValue>;\n\n  if (config.logicalDate) {\n    value = () => ({ logicalDate: getValueFromGetter(config.logicalDate) });\n  } else if (config.timeString) {\n    value = () => ({ timeString: getValueFromGetter(config.timeString) });\n  } else {\n    value = () => ({ logicalDate: 'now' });\n  }\n\n  if (!config.dynamic) {\n    value = asGetter(value()); // get/calculate the value now and return it if not dynamic\n  }\n\n  return {\n    label: asGetter(config.label),\n    value\n  };\n}\n","import { BehaviorSubject } from 'rxjs';\nimport { type DateTimePresetConfiguration } from './datetime';\nimport { Service, InjectionToken, inject } from '@angular/core';\nimport { type Maybe } from '@dereekb/util';\n\n/**\n * Injection token for providing default date-time field menu presets application-wide.\n */\nexport const DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN = new InjectionToken('DbxDateTimeFieldMenuPresetsServicePresets');\n\n/**\n * Service that manages default date-time preset configurations for all date-time fields.\n *\n * Presets are shown in the date-time field dropdown menu and allow users to quickly\n * select common date/time values (e.g., \"Now\", \"Start of day\").\n *\n * Provide default presets via {@link DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN}, or set them\n * dynamically via the `configurations` setter.\n */\n@Service()\nexport class DbxDateTimeFieldMenuPresetsService {\n  private readonly _configurations = new BehaviorSubject<DateTimePresetConfiguration[]>(inject<Maybe<DateTimePresetConfiguration[]>>(DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN, { optional: true }) ?? []);\n\n  readonly configurations$ = this._configurations.asObservable();\n\n  get configurations(): DateTimePresetConfiguration[] {\n    return this._configurations.value;\n  }\n\n  set configurations(configurations: DateTimePresetConfiguration[]) {\n    this._configurations.next(configurations);\n  }\n}\n","import { Component, input, computed, effect, type Signal, type InputSignal, DestroyRef, ElementRef, inject, signal, untracked } from '@angular/core';\nimport { type AbstractControl, FormControl, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatDatepickerModule, type MatDatepickerInputEvent } from '@angular/material/datepicker';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { DatePipe, NgTemplateOutlet } from '@angular/common';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { DEFAULT_PROPS, DEFAULT_VALIDATION_MESSAGES, FIELD_SIGNAL_CONTEXT, type FieldSignalContext, resolveValueFieldContext, buildValueFieldInputs, setupMetaTracking } from '@ng-forge/dynamic-forms/integration';\nimport { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material';\nimport type { FieldTree } from '@angular/forms/signals';\nimport { type Maybe, type Milliseconds, type TimezoneString, type ReadableTimeString, type DateOrDayString, type ArrayOrValue, asArray, filterMaybeArrayValues, isDate } from '@dereekb/util';\nimport {\n  safeToJsDate,\n  dateTimezoneUtcNormal,\n  type DateTimezoneUtcNormalInstance,\n  guessCurrentTimezone,\n  toLocalReadableTimeString,\n  getTimezoneAbbreviation,\n  isSameDateHoursAndMinutes,\n  isSameDateDay,\n  DateTimeMinuteInstance,\n  dateFromLogicalDate,\n  dateTimeMinuteWholeDayDecisionFunction,\n  toJsDayDate,\n  isSameDate\n} from '@dereekb/date';\nimport { type ObservableOrValueGetter, asObservableFromGetter, switchMapMaybeDefault, filterMaybe, skipAllInitialMaybe } from '@dereekb/rxjs';\nimport { type Observable, of, BehaviorSubject, Subject, combineLatest, interval, type Subscription } from 'rxjs';\nimport { switchMap, shareReplay, map, startWith, tap, distinctUntilChanged, debounceTime, throttleTime, combineLatestWith, filter, first, skip } from 'rxjs/operators';\nimport { startOfDay } from 'date-fns';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { DbxDateTimeValueMode, dbxDateTimeInputValueParseFactory, dbxDateTimeOutputValueFactory, dbxDateTimeIsSameDateTimeFieldValue } from '../../../../field/value/date/date.value';\nimport { DbxDateTimeFieldTimeMode, type DbxDateTimePickerConfiguration, type DbxDateTimeFieldSyncType } from '../../../../field/value/date/datetime.config';\nimport { type DateTimePresetConfiguration, type DateTimePreset, dateTimePreset } from '../../../../field/value/date/datetime';\nimport { DbxDateTimeFieldMenuPresetsService } from '../../../../field/value/date/datetime.field.service';\nimport { DateDistancePipe, TimeDistancePipe, GetValuePipe, cleanSubscription, completeOnDestroy } from '@dereekb/dbx-core';\nimport { type ErrorStateMatcher } from '@angular/material/core';\nimport { toggleDisableFormControl } from '../../../../form/form';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport { type DbxForgeDateTimeSyncField } from './datetime.field';\nimport { buildCombinedDateTime, applyTimeOffset, mergePickerConfig, filterPresets, computeErrorMessage, computeDateKeyboardStep, computeTimeKeyboardStep, navigateDate, type DateTimeCalcInput } from './datetime.calc';\n\n/**\n * Raw incoming value accepted by the date-time parser before normalization.\n */\ntype DbxForgeDateTimeRawValue = Maybe<Date | string | number>;\n\n/**\n * Custom props for the forge date-time field.\n *\n * Full parity with formly `DbxDateTimeFieldProps`.\n */\nexport interface DbxForgeDateTimeFieldComponentProps {\n  readonly timeOnly?: boolean;\n  readonly timeMode?: DbxDateTimeFieldTimeMode;\n  readonly valueMode?: DbxDateTimeValueMode;\n  readonly dateLabel?: string;\n  readonly timeLabel?: string;\n  readonly allDayLabel?: string;\n  readonly atTimeLabel?: string;\n  readonly minDate?: Date | string;\n  readonly maxDate?: Date | string;\n  readonly timezone?: Maybe<ObservableOrValueGetter<Maybe<TimezoneString>>>;\n  readonly showTimezone?: Maybe<boolean>;\n  readonly pickerConfig?: ObservableOrValueGetter<DbxDateTimePickerConfiguration>;\n  readonly hideDateHint?: boolean;\n  readonly hideDatePicker?: boolean;\n  readonly alwaysShowDateInput?: boolean;\n  readonly showClearButton?: Maybe<boolean>;\n  readonly autofillDateWhenTimeIsPicked?: boolean;\n  readonly presets?: ObservableOrValueGetter<DateTimePresetConfiguration[]>;\n  readonly timeDate?: Maybe<ObservableOrValueGetter<Maybe<DateOrDayString>>>;\n  readonly fullDayFieldName?: string;\n  readonly fullDayInUTC?: boolean;\n  readonly minuteStep?: Maybe<number>;\n  readonly inputOutputDebounceTime?: Milliseconds;\n  readonly appearance?: 'fill' | 'outline';\n  readonly hint?: DynamicText;\n  readonly getSyncFieldsObs?: () => Observable<ArrayOrValue<DbxForgeDateTimeSyncField>>;\n  /**\n   * Behavior when the date input is clicked.\n   *\n   * - `'picker'` — opens the datepicker overlay (default)\n   * - `'input'` — normal text-selection / cursor-placement behavior\n   */\n  readonly openOnInputClick?: 'picker' | 'input';\n}\n\n// MARK: Time Output Constants\nconst TIME_OUTPUT_THROTTLE_TIME: Milliseconds = 10;\n\n/**\n * Forge date-time field component.\n *\n * Hybrid signal + observable architecture: uses signals for primary/derived state and template\n * bindings, with observable pipelines for timing-sensitive operations (throttling, debouncing,\n * display refresh). Reuses the same value parsing/output utilities as the formly implementation.\n *\n * Registered as custom field type 'datetime' via `forge.providers.ts`.\n */\n@Component({\n  selector: 'dbx-forge-datetime-field',\n  imports: [MatFormFieldModule, MatInputModule, MatDatepickerModule, MatButtonModule, MatIconModule, MatMenuModule, MatDividerModule, ReactiveFormsModule, FormsModule, NgTemplateOutlet, DatePipe, DateDistancePipe, TimeDistancePipe, GetValuePipe],\n  templateUrl: './datetime.field.component.html',\n  styles: `\n    .dbx-forge-datetime-field-wrapper {\n      width: 100%;\n    }\n    .dbx-forge-datetime-inputs {\n      display: flex;\n      flex-wrap: wrap;\n      gap: 6px;\n      align-items: flex-start;\n      width: 100%;\n    }\n    .dbx-forge-datetime-col {\n      flex: 1 1 0%;\n      min-width: 180px;\n    }\n    .dbx-forge-datetime-col-full {\n      flex: 1 1 100%;\n    }\n    .dbx-forge-datetime-col-field {\n      width: 100%;\n    }\n    .dbx-forge-field-label {\n      font-weight: 500;\n    }\n    .dbx-forge-required-marker {\n      color: var(--mat-sys-error, red);\n    }\n    .dbx-forge-datetime-desc {\n      font-size: 12px;\n      margin-top: 0;\n    }\n    .dbx-forge-add-time-wrapper {\n      display: flex;\n      align-items: center;\n      min-height: 56px;\n    }\n    .dbx-forge-datetime-timezone {\n      padding: 0 6px;\n      pointer-events: none;\n    }\n    .dbx-forge-datetime-hint {\n      padding: 0 2px;\n    }\n    .dbx-forge-datetime-error {\n      padding: 0 2px;\n    }\n    @media (max-width: 599px) {\n      .dbx-forge-datetime-inputs {\n        flex-direction: column;\n        align-items: stretch;\n      }\n      .dbx-forge-datetime-col {\n        flex: 1 1 auto;\n        width: 100%;\n      }\n    }\n  `,\n  host: {\n    '[class]': 'className()'\n  }\n})\nexport class DbxForgeDateTimeFieldComponent {\n  private readonly materialConfig = inject(MATERIAL_CONFIG, { optional: true });\n  private readonly destroyRef = inject(DestroyRef);\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n  private readonly presetsService = inject(DbxDateTimeFieldMenuPresetsService, { optional: true });\n  private readonly fieldSignalContext = inject<FieldSignalContext>(FIELD_SIGNAL_CONTEXT);\n\n  // MARK: ng-forge ValueFieldComponent inputs\n  readonly field: InputSignal<FieldTree<unknown>> = input.required<FieldTree<unknown>>();\n  readonly key: InputSignal<string> = input.required<string>();\n  readonly label: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly placeholder: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly className: InputSignal<string> = input('');\n  readonly tabIndex: InputSignal<number | undefined> = input<number | undefined>();\n  readonly props: InputSignal<DbxForgeDateTimeFieldComponentProps | undefined> = input<DbxForgeDateTimeFieldComponentProps | undefined>();\n  readonly meta: InputSignal<FieldMeta | undefined> = input<FieldMeta | undefined>();\n  readonly validationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n\n  // MARK: Form controls\n  readonly dateCtrl = new FormControl<Maybe<Date>>(null);\n  readonly timeCtrl = new FormControl<Maybe<ReadableTimeString>>(null, {\n    validators: [Validators.pattern(/^(now)$|^(\\d|(0\\d)|(1\\d)|(2[0-3]))(:)?([0-5]\\d)?(\\s)?([apAP][Mm])?(\\\\s)*$/)]\n  });\n\n  // MARK: Internal signals\n  private readonly _fullDay = signal(false);\n  private readonly _timezone = signal<Maybe<TimezoneString>>(undefined);\n  private readonly _pickerConfig = signal<Maybe<DbxDateTimePickerConfiguration>>(undefined);\n  private readonly _timeDate = signal<Maybe<Date>>(undefined);\n  private readonly _presetConfigs = signal<DateTimePresetConfiguration[]>([]);\n  private readonly _isCleared = signal(false);\n  private readonly _isTimeInputFocused = signal(false);\n\n  // MARK: Subscription management\n  private readonly _sub = cleanSubscription();\n  private readonly _valueSub = cleanSubscription();\n  private readonly _autoFillDateSync = cleanSubscription();\n  private readonly _resyncTimeInputSub = cleanSubscription();\n  private _timezoneSub?: Subscription;\n  private _pickerConfigSub?: Subscription;\n  private _timeDateSub?: Subscription;\n  private _presetsSub?: Subscription;\n\n  // MARK: Subjects for event coordination\n  private readonly _offset = completeOnDestroy(new BehaviorSubject<number>(0));\n  private readonly _updateTime = completeOnDestroy(new Subject<void>());\n  private readonly _resyncTimeInput = completeOnDestroy(new Subject<void>());\n  private readonly _syncConfigObs = completeOnDestroy(new BehaviorSubject<Maybe<Observable<ArrayOrValue<DbxForgeDateTimeSyncField>>>>(undefined));\n\n  // MARK: Error state matcher\n  readonly timeErrorStateMatcher: ErrorStateMatcher = {\n    isErrorState: (control: Maybe<AbstractControl>) => {\n      if (control) {\n        return (control.invalid && (control.dirty || control.touched)) || this.hasErrorSignal() === true;\n      }\n      return false;\n    }\n  };\n\n  // MARK: Computed signals — derived from props\n  readonly fieldLabelSignal = computed(() => {\n    const l = this.label();\n    return typeof l === 'string' && l ? l : undefined;\n  });\n\n  readonly isRequiredSignal = computed(() => {\n    let required = false;\n\n    try {\n      const state = this.field()?.() as any;\n      required = (state?.required?.() as boolean) ?? false;\n    } catch {\n      required = false;\n    }\n\n    return required;\n  });\n\n  readonly isDateRequiredSignal = computed(() => this.isRequiredSignal());\n\n  readonly isTimeRequiredSignal = computed(() => {\n    const timeMode = this.timeModeSignal();\n    return this.isRequiredSignal() && timeMode === DbxDateTimeFieldTimeMode.REQUIRED;\n  });\n\n  readonly descriptionSignal = computed(() => {\n    const h = this.props()?.hint;\n    return typeof h === 'string' ? h : undefined;\n  });\n\n  readonly appearanceSignal = computed(() => this.props()?.appearance ?? this.materialConfig?.appearance ?? 'outline');\n\n  readonly valueModeSignal = computed(() => this.props()?.valueMode ?? DbxDateTimeValueMode.DATE);\n\n  readonly timeModeSignal = computed<DbxDateTimeFieldTimeMode>(() => {\n    const p = this.props();\n    if (this.valueModeSignal() === DbxDateTimeValueMode.DAY_STRING) return DbxDateTimeFieldTimeMode.NONE;\n    if (p?.timeOnly) return DbxDateTimeFieldTimeMode.REQUIRED;\n    if (p?.timeMode) return p.timeMode;\n    return DbxDateTimeFieldTimeMode.REQUIRED;\n  });\n\n  readonly isTimeOnlySignal = computed(() => {\n    const props = this.props();\n    return this.valueModeSignal() === DbxDateTimeValueMode.MINUTE_OF_DAY || props?.timeOnly === true;\n  });\n  readonly isDateOnlySignal = computed(() => this.timeModeSignal() === DbxDateTimeFieldTimeMode.NONE);\n  readonly isFullDaySignal = computed(() => this._fullDay());\n\n  readonly showDateInputSignal = computed(() => !this.isTimeOnlySignal());\n  readonly showTimeInputSignal = computed(() => {\n    const timeMode = this.timeModeSignal();\n    return !this._fullDay() && timeMode !== DbxDateTimeFieldTimeMode.NONE;\n  });\n  readonly showAddTimeButtonSignal = computed(() => {\n    const timeMode = this.timeModeSignal();\n    return !this.showTimeInputSignal() && timeMode === DbxDateTimeFieldTimeMode.OPTIONAL;\n  });\n\n  readonly dateLabelSignal = computed(() => this.props()?.dateLabel ?? 'Date');\n  readonly timeLabelSignal = computed(() => this.props()?.timeLabel ?? 'Time');\n  readonly allDayLabelSignal = computed(() => this.props()?.allDayLabel ?? 'All Day');\n  readonly atTimeLabelSignal = computed(() => this.props()?.atTimeLabel ?? 'At');\n  readonly hideDateHintSignal = computed(() => this.props()?.hideDateHint ?? false);\n  readonly hideDatePickerSignal = computed(() => this.props()?.hideDatePicker ?? false);\n  readonly showTimezoneSignal = computed(() => this.props()?.showTimezone ?? true);\n  readonly showClearButtonSignal = computed(() => this.props()?.showClearButton !== false);\n  readonly minuteStepSignal = computed(() => this.props()?.minuteStep ?? 5);\n  readonly alwaysShowDateInputSignal = computed(() => this.props()?.alwaysShowDateInput ?? true);\n  readonly autofillDateWhenTimeIsPickedSignal = computed(() => {\n    const alwaysShowDateInput = this.alwaysShowDateInputSignal();\n    return this.props()?.autofillDateWhenTimeIsPicked ?? alwaysShowDateInput === false;\n  });\n  readonly openOnInputClickSignal = computed(() => this.props()?.openOnInputClick ?? 'picker');\n\n  // MARK: Timezone signals\n  readonly resolvedTimezoneSignal = computed(() => this._timezone() ?? guessCurrentTimezone());\n\n  readonly timezoneInstanceSignal = computed<Maybe<DateTimezoneUtcNormalInstance>>(() => {\n    const tz = this.resolvedTimezoneSignal();\n    return tz ? dateTimezoneUtcNormal({ timezone: tz }) : undefined;\n  });\n\n  // MARK: Field value reading\n  // FieldTree<unknown> is callable — calling it returns FieldState which has .value, .disabled, etc.\n  // We call field()() to first unwrap the InputSignal (→ FieldTree), then call the FieldTree (→ FieldState).\n  readonly fieldValueSignal = computed(() => {\n    let result: unknown = undefined;\n\n    try {\n      const state = this.field()?.() as any;\n      result = state?.value?.() as unknown;\n    } catch {\n      // Field tree not yet initialized — fall through to undefined\n    }\n\n    return result;\n  });\n\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  // MARK: Observable pipelines\n\n  // Parse field value to system timezone Date\n  readonly fieldValue$ = toObservable(this.fieldValueSignal);\n\n  readonly timezoneInstance$ = toObservable(this.timezoneInstanceSignal);\n\n  readonly valueInSystemTimezone$: Observable<Maybe<Date>> = this.fieldValue$.pipe(\n    combineLatestWith(this.timezoneInstance$),\n    map(([raw, timezoneInstance]) => {\n      if (raw == null) return undefined;\n      const parser = dbxDateTimeInputValueParseFactory(this.valueModeSignal(), timezoneInstance);\n      const result = parser(raw as DbxForgeDateTimeRawValue);\n      if (result instanceof Date && Number.isNaN(result.getTime())) return undefined;\n      return result;\n    }),\n    throttleTime(20, undefined, { leading: true, trailing: true }),\n    distinctUntilChanged(isSameDateHoursAndMinutes),\n    shareReplay(1)\n  );\n\n  // Display value with 10-second refresh interval\n  readonly refreshInterval$ = interval(10 * 1000);\n\n  readonly displayValue$: Observable<Maybe<Date>> = this.refreshInterval$.pipe(\n    startWith(0),\n    map(() => new Date().getMinutes()),\n    distinctUntilChanged(),\n    switchMap(() => this.valueInSystemTimezone$),\n    shareReplay(1)\n  );\n\n  // Time string from parsed value\n  readonly timeString$: Observable<ReadableTimeString> = this.valueInSystemTimezone$.pipe(\n    map((x) => (x ? toLocalReadableTimeString(x) : '')),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  // Date input control value stream\n  readonly currentDate$ = this.dateCtrl.valueChanges.pipe(startWith(this.dateCtrl.value), shareReplay(1));\n  readonly date$ = this.currentDate$.pipe(filterMaybe(), shareReplay(1));\n\n  // Effective date value: merges date control changes with incoming form value\n  readonly dateValue$: Observable<Maybe<Date>> = this.date$.pipe(\n    map((x: Maybe<Date>) => (x ? startOfDay(x) : null)),\n    distinctUntilChanged<Maybe<Date>>(isSameDateDay),\n    shareReplay(1)\n  );\n\n  // Time input stream gated by _updateTime subject\n  readonly timeInput$: Observable<ReadableTimeString> = this._updateTime.pipe(\n    debounceTime(5),\n    map(() => this.timeCtrl.value || ''),\n    distinctUntilChanged()\n  );\n\n  // Resync time input debounced\n  readonly resyncTimeInput$ = this._resyncTimeInput.pipe(debounceTime(200), shareReplay(1));\n\n  // Timezone abbreviation\n  readonly tzAbbreviation$ = combineLatest([this.currentDate$, toObservable(this.resolvedTimezoneSignal), toObservable(this._timeDate)]).pipe(\n    map(([date, timezone, timeDate]) => getTimezoneAbbreviation(timezone, timeDate ?? date ?? new Date())),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  // Observable versions of signals (must be at class level for injection context)\n  private readonly _isCleared$ = toObservable(this._isCleared);\n  private readonly _timeDate$ = toObservable(this._timeDate);\n\n  readonly isTimeCleared$ = combineLatest([this.currentDate$, toObservable(this._timeDate).pipe(startWith(null)), this._isCleared$]).pipe(\n    map(([date, time, isCleared]) => isCleared || (!this.isTimeOnlySignal() && Boolean(!date && !time))),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  // Sync config processing\n  readonly syncConfigObs$ = this._syncConfigObs.pipe(switchMapMaybeDefault(), shareReplay(1));\n\n  readonly parsedSyncConfigs$ = this.syncConfigObs$.pipe(\n    map((x) => {\n      if (!x) return [];\n      return filterMaybeArrayValues(\n        asArray(x).map((syncField) => {\n          const form = this.fieldSignalContext.form;\n          const siblingTree = (form as any)?.[syncField.syncWith];\n          const siblingState = siblingTree?.();\n          if (siblingState?.value) {\n            return { syncType: syncField.syncType, fieldState: siblingState };\n          }\n          return undefined;\n        })\n      );\n    }),\n    shareReplay(1)\n  );\n\n  private _syncConfigValueObs(type: DbxDateTimeFieldSyncType): Observable<Maybe<Date>> {\n    return this.parsedSyncConfigs$.pipe(\n      switchMap((configs) => {\n        const config = configs.find((c) => c.syncType === type);\n        if (config) {\n          // Poll the sibling field's signal value since toObservable() cannot be used\n          // inside switchMap (outside injection context).\n          return interval(500).pipe(\n            startWith(0),\n            map(() => {\n              const val = config.fieldState.value();\n              const date = safeToJsDate(val);\n              // Reject Invalid Date values (e.g. from empty string sibling fields)\n              return date instanceof Date && !Number.isNaN(date.getTime()) ? date : null;\n            }),\n            distinctUntilChanged()\n          );\n        }\n        return of(null);\n      }),\n      distinctUntilChanged(),\n      shareReplay(1)\n    );\n  }\n\n  readonly syncConfigBeforeValue$ = this._syncConfigValueObs('before');\n  readonly syncConfigAfterValue$ = this._syncConfigValueObs('after');\n\n  // Picker config merged with sync constraints\n  readonly pickerConfig$ = toObservable(this._pickerConfig);\n\n  readonly dateTimePickerConfig$: Observable<Maybe<DbxDateTimePickerConfiguration>> = combineLatest([this.pickerConfig$, this.syncConfigBeforeValue$, this.syncConfigAfterValue$]).pipe(\n    map(([config, syncBefore, syncAfter]) => mergePickerConfig(config, syncBefore, syncAfter)),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  readonly dateInputMin$: Observable<Maybe<Date>> = this.dateTimePickerConfig$.pipe(\n    map((x) => (x?.limits?.min ?? null) as Maybe<Date>),\n    distinctUntilChanged<Maybe<Date>>(isSameDate),\n    shareReplay(1)\n  );\n\n  readonly dateInputMax$: Observable<Maybe<Date>> = this.dateTimePickerConfig$.pipe(\n    map((x) => (x?.limits?.max ?? null) as Maybe<Date>),\n    distinctUntilChanged<Maybe<Date>>(isSameDate),\n    shareReplay(1)\n  );\n\n  readonly dateMinAndMaxIsSameDay$: Observable<boolean> = combineLatest([this.dateInputMin$, this.dateInputMax$]).pipe(\n    map(([a, b]) => Boolean(a && b) && isSameDateDay(a, b)),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  readonly pickerFilter$: Observable<(d: Maybe<Date>) => boolean> = this.dateTimePickerConfig$.pipe(\n    map((x) => {\n      if (x) {\n        const fn = dateTimeMinuteWholeDayDecisionFunction(x, false);\n        return (d: Maybe<Date>) => (d == null ? true : fn(d));\n      }\n      return () => true;\n    }),\n    shareReplay(1)\n  );\n\n  // Show date input reactively based on restricted range\n  readonly showDateInput$: Observable<boolean> = this.dateMinAndMaxIsSameDay$.pipe(\n    map((sameDay) => this.showDateInputSignal() && (this.alwaysShowDateInputSignal() || !sameDay)),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  // Reactive date source: uses of(null) for time-only fields, dateValue$ otherwise.\n  // Must be reactive (not a one-shot ternary) because isTimeOnly depends on props\n  // which aren't available during class field initialization.\n  private readonly _rawDateTimeDate$: Observable<Maybe<Date>> = toObservable(this.isTimeOnlySignal).pipe(\n    switchMap((timeOnly) => (timeOnly ? of(null) : this.dateValue$)),\n    shareReplay(1)\n  );\n\n  // Raw datetime calculation\n  readonly rawDateTime$: Observable<Maybe<Date>> = combineLatest([this._rawDateTimeDate$, this.timeInput$.pipe(startWith(null)), toObservable(this._fullDay), toObservable(this._timeDate), this.isTimeCleared$]).pipe(\n    map(([date, timeString, fullDay, timeDate, isTimeCleared]) => {\n      const input: DateTimeCalcInput = {\n        dateValue: date,\n        timeString,\n        isFullDay: fullDay,\n        fullDayInUTC: this.props()?.fullDayInUTC ?? false,\n        isTimeOnly: this.isTimeOnlySignal(),\n        timeMode: this.timeModeSignal(),\n        timeDate,\n        isCleared: isTimeCleared\n      };\n      return buildCombinedDateTime(input);\n    }),\n    distinctUntilChanged(isSameDateHoursAndMinutes),\n    shareReplay(1)\n  );\n\n  // Time output with offset accumulation and throttling\n  readonly timeOutput$: Observable<Maybe<Date>> = combineLatest([this.rawDateTime$, this._offset, this.dateTimePickerConfig$]).pipe(\n    throttleTime(TIME_OUTPUT_THROTTLE_TIME, undefined, { leading: false, trailing: true }),\n    distinctUntilChanged((current, next) => current[0] === next[0] && next[1] === 0 && current[2] === next[2]),\n    tap(([, stepsOffset]) => (stepsOffset ? this._offset.next(0) : 0)),\n    map(([date, stepsOffset, config]) => {\n      if (date != null && stepsOffset) {\n        return applyTimeOffset({ date, stepsOffset, minuteStep: this.minuteStepSignal(), config });\n      }\n      return date;\n    }),\n    distinctUntilChanged(isSameDateHoursAndMinutes),\n    shareReplay(1)\n  );\n\n  // Picker instance for validation\n  readonly dateTimePickerInstance$ = this.dateTimePickerConfig$.pipe(\n    map((config) => new DateTimeMinuteInstance({ ...config, roundDownToMinute: true })),\n    shareReplay(1)\n  );\n\n  // Presets pipeline\n  readonly allPresets$ = toObservable(this._presetConfigs).pipe(\n    map((configs) => configs.map(dateTimePreset)),\n    shareReplay(1)\n  );\n\n  readonly presets$: Observable<DateTimePreset[]> = combineLatest([this.allPresets$, toObservable(this._fullDay)]).pipe(\n    switchMap(([allPresets, fullDay]) => {\n      if (this.isTimeOnlySignal()) return of(allPresets);\n      if (fullDay) return of([]);\n\n      // Use currentDate$ (includes null) so the combineLatest emits even when no date is set.\n      // Fall back to timeDate, then today, so presets are always available for time selection.\n      return combineLatest([this.currentDate$.pipe(throttleTime(1000, undefined, { leading: true, trailing: true })), this.dateTimePickerConfig$, this._timeDate$.pipe(startWith(undefined))]).pipe(\n        map(([selectedDate, config, timeDate]) => filterPresets({ presets: allPresets, selectedDate: selectedDate ?? timeDate ?? startOfDay(new Date()), isFullDay: false, isTimeOnly: false, config }))\n      );\n    }),\n    shareReplay(1)\n  );\n\n  // Error tracking\n  readonly hasEmptyDisplayValue$ = this.displayValue$.pipe(\n    map((x) => !x),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  readonly currentErrorMessage$ = toObservable(\n    computed(() => {\n      const f = this.field()?.() as any;\n      if (!f) return undefined;\n      const invalid = f.invalid?.() as boolean;\n      if (!invalid) return undefined;\n      const errors = f.errors?.() as Array<{ type?: string }> | undefined;\n      if (!errors || errors.length === 0) return undefined;\n      // Convert ValidationError.WithFieldTree[] to a record\n      const errorRecord: Record<string, unknown> = {};\n      for (const err of errors) {\n        if (err.type) errorRecord[err.type] = true;\n      }\n      return computeErrorMessage(errorRecord, this.isRequiredSignal());\n    })\n  ).pipe(shareReplay(1));\n\n  readonly hasError$ = this.currentErrorMessage$.pipe(map(Boolean), distinctUntilChanged(), shareReplay(1));\n\n  // Show clear button\n  readonly showClearButton$ = this.hasEmptyDisplayValue$.pipe(\n    map((empty) => Boolean(this.showClearButtonSignal() && !empty)),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  // MARK: Template signals via toSignal()\n  /**\n   * Template signal for the date input `[value]` binding.\n   *\n   * Reads directly from the Signal Forms field value so it updates on both\n   * inbound sync (form source) and user picks. Returns null when cleared.\n   */\n  readonly dateValueSignal = computed(() => {\n    const fieldValue = this.fieldValueSignal();\n    const valueMode = this.valueModeSignal();\n    const timezoneInstance = this.timezoneInstanceSignal();\n    let result: Maybe<Date> = null;\n\n    if (!this._isCleared()) {\n      const raw = fieldValue;\n\n      if (raw != null) {\n        const parser = dbxDateTimeInputValueParseFactory(valueMode, timezoneInstance);\n        const date = parser(raw as DbxForgeDateTimeRawValue);\n\n        if (date && !(date instanceof Date && Number.isNaN(date.getTime()))) {\n          result = startOfDay(date);\n        }\n      }\n    }\n\n    return result;\n  });\n  readonly displayValueSignal = toSignal(this.displayValue$);\n  readonly pickerFilterSignal = toSignal(this.pickerFilter$, { initialValue: () => true });\n  readonly dateInputMinSignal = toSignal(this.dateInputMin$, { initialValue: null });\n  readonly dateInputMaxSignal = toSignal(this.dateInputMax$, { initialValue: null });\n  readonly resolvedShowDateInputSignal = toSignal(this.showDateInput$);\n  readonly fullDaySignal = this._fullDay.asReadonly();\n  readonly tzAbbreviationSignal = toSignal(this.tzAbbreviation$);\n  readonly hasValueSignal = toSignal(this.hasEmptyDisplayValue$.pipe(map((x) => !x)));\n  readonly currentErrorMessageSignal = toSignal(this.currentErrorMessage$);\n  readonly hasErrorSignal = toSignal(this.hasError$);\n  readonly resolvedShowClearButtonSignal = toSignal(this.showClearButton$);\n  readonly presetsSignal = toSignal(this.presets$);\n  readonly isDisabledSignal = this.isDisabled;\n  readonly isTimeMenuDisabledSignal = computed(() => {\n    const disabled = this.isDisabled();\n    const isOptional = this.timeModeSignal() === DbxDateTimeFieldTimeMode.OPTIONAL;\n    const hasPresets = Boolean(this.presetsSignal()?.length);\n    return disabled || (!isOptional && !hasPresets);\n  });\n\n  // ARIA\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n  protected readonly ariaInvalidSignal = computed(() => (this.hasErrorSignal() ? 'true' : null));\n  protected readonly ariaRequiredSignal = computed(() => (this.field()().required() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const props = this.props();\n    const hintId = this.hintIdSignal();\n    let result: Maybe<string> = null;\n\n    if (this.hasErrorSignal()) {\n      result = errorId;\n    } else if (props?.hint) {\n      result = hintId;\n    }\n\n    return result;\n  });\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'input' });\n\n    // Initialize fullDay from timeMode\n    effect(() => {\n      if (this.timeModeSignal() === DbxDateTimeFieldTimeMode.NONE) {\n        this._fullDay.set(true);\n      }\n    });\n\n    // Subscribe to async props (timezone, pickerConfig, timeDate, presets)\n    effect(() => {\n      const p = this.props();\n\n      // Timezone\n      this._timezoneSub?.unsubscribe();\n      if (p?.timezone && !p?.fullDayInUTC) {\n        this._timezoneSub = asObservableFromGetter(p.timezone).subscribe((tz) => {\n          const changed = this._timezone() !== tz;\n          this._timezone.set(tz);\n          // Re-trigger the output pipeline when timezone changes so the stored value\n          // is re-converted with the new timezone.\n          if (changed) {\n            this._updateTime.next();\n          }\n        });\n      }\n\n      // Picker config\n      this._pickerConfigSub?.unsubscribe();\n      if (p?.pickerConfig) {\n        this._pickerConfigSub = asObservableFromGetter(p.pickerConfig).subscribe((config) => this._pickerConfig.set(config));\n      }\n\n      // Time date\n      this._timeDateSub?.unsubscribe();\n      if (p?.timeDate) {\n        this._timeDateSub = asObservableFromGetter(p.timeDate).subscribe((td) => {\n          const resolved = isDate(td) || typeof td === 'string' ? toJsDayDate(td) : undefined;\n          this._timeDate.set(resolved);\n        });\n      }\n\n      // Presets\n      this._presetsSub?.unsubscribe();\n      if (p?.presets) {\n        this._presetsSub = asObservableFromGetter(p.presets).subscribe((configs) => this._presetConfigs.set(configs));\n      } else if (this.presetsService) {\n        this._presetsSub = this.presetsService.configurations$.subscribe((configs) => this._presetConfigs.set(configs));\n      }\n\n      // Sync fields\n      this._syncConfigObs.next(p?.getSyncFieldsObs?.());\n\n      // Full day field name (read from sibling FieldTree)\n      if (p?.fullDayFieldName) {\n        const siblingTree = (this.fieldSignalContext.form as any)?.[p.fullDayFieldName];\n        const siblingState = siblingTree?.();\n        if (siblingState?.value) {\n          // Sync fullDay signal from sibling field\n          this._fullDay.set(Boolean(siblingState.value()));\n        }\n      }\n    });\n\n    // Disabled state propagation\n    effect(() => {\n      const disabled = this.isDisabled();\n      toggleDisableFormControl(this.dateCtrl, disabled);\n      toggleDisableFormControl(this.timeCtrl, disabled);\n    });\n\n    // Sync inbound: FieldTree value → form controls.\n    // Uses untracked() for _isTimeInputFocused to avoid re-running on focus changes.\n    effect(() => {\n      const raw = this.fieldValueSignal();\n      const isTimeFocused = untracked(() => this._isTimeInputFocused());\n\n      if (raw == null) {\n        if (this.dateCtrl.value != null) this.dateCtrl.setValue(null, { emitEvent: false });\n        // Do not clear time control while user is actively editing it\n        if (this.timeCtrl.value && !isTimeFocused) this.timeCtrl.setValue(null, { emitEvent: false });\n        return;\n      }\n\n      const parser = dbxDateTimeInputValueParseFactory(this.valueModeSignal(), this.timezoneInstanceSignal());\n      const date = parser(raw as DbxForgeDateTimeRawValue);\n      if (!date || (date instanceof Date && Number.isNaN(date.getTime()))) return;\n\n      const currentDateCtrl = this.dateCtrl.value;\n      if (!currentDateCtrl || !isSameDateDay(currentDateCtrl, date)) {\n        // Emit valueChanges (default) so currentDate$ — and therefore date$/dateValue$/_rawDateTimeDate$\n        // — see the inbound date. Without this emission, rawDateTime$.combineLatest is starved on the\n        // date side and a user-typed time edit can never propagate back to the form value.\n        // The outbound pipeline's `filter(!dbxDateTimeIsSameDateTimeFieldValue(x, currentValue))`\n        // prevents the resulting _updateTime tick from causing a feedback write.\n        this.dateCtrl.setValue(date);\n      }\n\n      // Do not overwrite time control while user is actively editing it\n      if (!isTimeFocused) {\n        const timeStr = toLocalReadableTimeString(date);\n        if (timeStr !== this.timeCtrl.value) {\n          this.timeCtrl.setValue(timeStr, { emitEvent: false });\n        }\n      }\n    });\n\n    // Main output subscription: timeOutput$ → field value.\n    // The filter must compare in storage form against the raw fieldValue. Comparing against\n    // valueInSystemTimezone$ (display-shifted) is wrong: with a non-zero system↔target tz shift,\n    // a freshly picked time can have the same timestamp as the previous valueInSystemTimezone$\n    // and be incorrectly dropped (e.g. CDT system + UTC field tz: pick 12pm → pick 5pm collides).\n    this._sub.subscription = this.fieldValue$\n      .pipe(\n        combineLatestWith(this.timezoneInstance$.pipe(map((tz) => dbxDateTimeOutputValueFactory(this.valueModeSignal(), tz)))),\n        throttleTime(TIME_OUTPUT_THROTTLE_TIME, undefined, { leading: false, trailing: true }),\n        switchMap(([currentRawValue, valueFactory]) => {\n          return this.timeOutput$.pipe(\n            throttleTime(TIME_OUTPUT_THROTTLE_TIME * 2, undefined, { leading: false, trailing: true }),\n            skipAllInitialMaybe(),\n            distinctUntilChanged(isSameDateHoursAndMinutes),\n            map((x) => valueFactory(x)),\n            filter((x) => !dbxDateTimeIsSameDateTimeFieldValue(x as DbxForgeDateTimeRawValue, currentRawValue as DbxForgeDateTimeRawValue))\n          );\n        })\n      )\n      .subscribe((value) => {\n        this._setFieldValue(value);\n      });\n\n    // Time value sync (midnight edge case)\n    let hasSetMidnightFromInput = false;\n\n    this._valueSub.subscription = this.valueInSystemTimezone$\n      .pipe(\n        map((x) => (x ? isSameDate(x, startOfDay(x)) : false)),\n        distinctUntilChanged(),\n        switchMap((isInputValueAtMidnight) => {\n          hasSetMidnightFromInput = false;\n          return this.timeString$.pipe(map((timeString) => [timeString, isInputValueAtMidnight] as [string, boolean]));\n        })\n      )\n      .subscribe(([x, isInputValueAtMidnight]) => {\n        // Do not overwrite time while user is actively editing the time input\n        if (this._isTimeInputFocused()) {\n          return;\n        }\n        // Skip empty time strings to avoid overwriting a cleared null with ''\n        if (!x) {\n          return;\n        }\n        if (!this.timeCtrl.value && x === '12:00AM' && (!isInputValueAtMidnight || (isInputValueAtMidnight && hasSetMidnightFromInput))) {\n          return;\n        }\n        if (x === '12:00AM' && isInputValueAtMidnight) {\n          hasSetMidnightFromInput = true;\n        }\n        this.setTime(x);\n      });\n\n    // Auto-fill date from restricted range\n    if (this.autofillDateWhenTimeIsPickedSignal()) {\n      this._autoFillDateSync.subscription = this.dateMinAndMaxIsSameDay$\n        .pipe(\n          switchMap((canAutofill) => {\n            if (canAutofill) {\n              return this._updateTime.pipe(\n                debounceTime(200),\n                switchMap(() => this.dateInputMin$),\n                filterMaybe()\n              );\n            }\n            return of(null);\n          })\n        )\n        .subscribe((autoDate) => {\n          if (autoDate != null) {\n            this.dateCtrl.setValue(autoDate);\n          }\n        });\n    }\n\n    // Auto-fill date with today when user enters a time and no date is set (non-timeOnly fields only).\n    // Uses timeDate or today as the fallback date.\n    if (!this.isTimeOnlySignal()) {\n      const autoFillDateOnTimeSub = this._updateTime\n        .pipe(\n          debounceTime(50),\n          filter(() => !this.dateCtrl.value && !!this.timeCtrl.value && !this.isTimeOnlySignal())\n        )\n        .subscribe(() => {\n          const fallbackDate = this._timeDate() ?? startOfDay(new Date());\n          this.dateCtrl.setValue(fallbackDate);\n        });\n\n      this.destroyRef.onDestroy(() => autoFillDateOnTimeSub.unsubscribe());\n    }\n\n    // Resync time input on focus out — normalizes the display string from the stored value.\n    // Skip resync if timeString$ is empty but the user has typed a time (the output pipeline\n    // hasn't written back to the field tree yet).\n    this._resyncTimeInputSub.subscription = this.resyncTimeInput$.pipe(switchMap(() => combineLatest([this.currentDate$, this.timeString$]).pipe(first()))).subscribe(([currentDate, timeString]) => {\n      if (currentDate != null && (timeString || !this.timeCtrl.value)) {\n        this.timeCtrl.setValue(timeString || null, { emitEvent: false });\n      }\n    });\n\n    // Outbound sync: form controls → FieldTree via _updateTime\n    const dateSub = this.dateCtrl.valueChanges.subscribe(() => this._updateTime.next());\n    const timeSub = this.timeCtrl.valueChanges.subscribe(() => this._updateTime.next());\n\n    // Config update time sync\n    const configSyncSub = this.dateTimePickerConfig$.pipe(skip(1)).subscribe(() => this._updateTime.next());\n\n    // Cleanup\n    this.destroyRef.onDestroy(() => {\n      dateSub.unsubscribe();\n      timeSub.unsubscribe();\n      configSyncSub.unsubscribe();\n      this._sub.destroy();\n      this._valueSub.destroy();\n      this._autoFillDateSync.destroy();\n      this._resyncTimeInputSub.destroy();\n      this._timezoneSub?.unsubscribe();\n      this._pickerConfigSub?.unsubscribe();\n      this._timeDateSub?.unsubscribe();\n      this._presetsSub?.unsubscribe();\n      this._offset.complete();\n      this._updateTime.complete();\n      this._resyncTimeInput.complete();\n      this._syncConfigObs.complete();\n    });\n  }\n\n  // MARK: Actions\n  onDateInputClick(picker: { open(): void }): void {\n    if (this.openOnInputClickSignal() === 'picker' && !this.isDisabled()) {\n      picker.open();\n    }\n  }\n\n  onDatePicked(event: MatDatepickerInputEvent<Date | undefined>): void {\n    const date = event.value;\n    if (date) {\n      this.dateCtrl.setValue(date);\n      this._updateTime.next();\n    }\n  }\n\n  onDateKeydown(event: KeyboardEvent): void {\n    const step = computeDateKeyboardStep(event);\n    if (!step) return;\n\n    event.preventDefault();\n\n    combineLatest([this.date$, this.dateTimePickerConfig$])\n      .pipe(first())\n      .subscribe(([date, config]) => {\n        const nextDate = navigateDate(date, step, config);\n        if (nextDate != null) {\n          this.dateCtrl.setValue(nextDate);\n          this._updateTime.next();\n        }\n      });\n  }\n\n  onTimeKeydown(event: KeyboardEvent): void {\n    const step = computeTimeKeyboardStep(event);\n    if (!step) return;\n\n    event.preventDefault();\n    this._offset.next(this._offset.value + step.offset * step.direction);\n    this._updateTime.next();\n\n    // Sync the input text from the computed time output so the user sees\n    // the change immediately while the input is still focused.\n    // Skip the current shareReplay cache and wait for the recomputed value.\n    this.timeOutput$.pipe(skip(1), first(), filterMaybe()).subscribe((date) => {\n      const timeStr = toLocalReadableTimeString(date);\n      if (timeStr !== this.timeCtrl.value) {\n        this.timeCtrl.setValue(timeStr, { emitEvent: false });\n      }\n    });\n  }\n\n  onTimeFocus(): void {\n    this._isTimeInputFocused.set(true);\n  }\n\n  onTimeBlur(): void {\n    this._isTimeInputFocused.set(false);\n    if (!this.timeCtrl.hasError('pattern')) {\n      this._updateTime.next();\n      this._resyncTimeInput.next();\n    }\n  }\n\n  clearValue(): void {\n    this._isCleared.set(true);\n    this.dateCtrl.setValue(null);\n    this.timeCtrl.setValue(null);\n    // Use null (not undefined) to clear the field value — undefined can corrupt\n    // the Signal Forms field node, destroying metadata like required state.\n    this._setFieldValue(null);\n    // Reset cleared state after a tick so future edits work\n    setTimeout(() => this._isCleared.set(false), 0);\n  }\n\n  addTime(): void {\n    this._fullDay.set(false);\n    this._syncFullDayToSibling(false);\n  }\n\n  removeTime(): void {\n    this._fullDay.set(true);\n    this.timeCtrl.setValue(null);\n    this._updateTime.next();\n    this._syncFullDayToSibling(true);\n  }\n\n  selectPreset(preset: DateTimePreset): void {\n    const value = preset.value();\n    if (value.logicalDate) {\n      const date = dateFromLogicalDate(value.logicalDate);\n      if (date) {\n        this.setTime(toLocalReadableTimeString(date));\n      }\n    } else if (value.timeString) {\n      this.setTime(value.timeString);\n    }\n  }\n\n  setTime(time: ReadableTimeString): void {\n    if (this.timeCtrl.value !== time) {\n      this.timeCtrl.setValue(time);\n      this._offset.next(0);\n      this._updateTime.next();\n    }\n  }\n\n  // MARK: Internal helpers\n\n  private _setFieldValue(value: unknown): void {\n    try {\n      const state = this.field()?.() as any;\n      if (state?.value?.set) {\n        // Never write `undefined`: Signal Forms treats an undefined value as \"this field no longer\n        // exists\" and orphans it from the parent structure, which throws NG01902 (Orphan field) /\n        // NG01901 (Cannot resolve path) on the next computed read. Use `null` for \"no value\" instead\n        // — that keeps the field attached (and matches what clearValue() writes).\n        state.value.set(value ?? null);\n      }\n    } catch {\n      // Silently handle if FieldTree value is not writable\n    }\n  }\n\n  private _syncFullDayToSibling(fullDay: boolean): void {\n    const fieldName = this.props()?.fullDayFieldName;\n    if (!fieldName) return;\n\n    try {\n      const siblingTree = (this.fieldSignalContext.form as any)?.[fieldName];\n      const siblingState = siblingTree?.();\n      if (siblingState?.value?.set) {\n        siblingState.value.set(fullDay);\n      }\n    } catch {\n      // Silently handle if sibling field is not writable\n    }\n  }\n}\n\n// MARK: Mapper\n\n/**\n * Custom mapper for the datetime field type.\n * Called by ng-forge's DynamicForm to create the inputs for the component.\n *\n * @param fieldDef - Field definition configuration.\n * @param fieldDef.key - Form model key for the field.\n * @returns Signal containing a Record of input names to values for ngComponentOutlet.\n */\nexport function dateTimeFieldMapper(fieldDef: { key: string }): Signal<Record<string, unknown>> {\n  const ctx = resolveValueFieldContext();\n  const defaultProps = inject(DEFAULT_PROPS);\n  const defaultValidationMessages = inject(DEFAULT_VALIDATION_MESSAGES);\n\n  return computed(() => {\n    const inputs = buildValueFieldInputs(fieldDef as any, ctx, defaultProps?.());\n    const dvm = defaultValidationMessages?.();\n    if (dvm !== undefined) {\n      inputs['defaultValidationMessages'] = dvm;\n    }\n    return inputs;\n  });\n}\n","<div class=\"dbx-forge-datetime-field-wrapper\">\n  <!-- Field Label -->\n  @if (fieldLabelSignal()) {\n    <span class=\"dbx-forge-field-label\">\n      {{ fieldLabelSignal() }}\n      @if (isRequiredSignal()) {\n        <span class=\"dbx-forge-required-marker\">*</span>\n      }\n    </span>\n  }\n\n  <!-- Date + Time row -->\n  <div class=\"dbx-forge-datetime-field dbx-forge-datetime-inputs\">\n    <!-- Date Input -->\n    @if (resolvedShowDateInputSignal()) {\n      <div class=\"dbx-forge-datetime-col\" [class.dbx-forge-datetime-col-full]=\"isDateOnlySignal()\">\n        <mat-form-field [appearance]=\"appearanceSignal()\" subscriptSizing=\"dynamic\" class=\"dbx-forge-datetime-col-field\">\n          <mat-label>{{ dateLabelSignal() }}</mat-label>\n          <input\n            matInput\n            [disabled]=\"isDisabledSignal()\"\n            [required]=\"isDateRequiredSignal()\"\n            [min]=\"dateInputMinSignal()\"\n            [max]=\"dateInputMaxSignal()\"\n            [matDatepicker]=\"picker\"\n            [matDatepickerFilter]=\"pickerFilterSignal()\"\n            (dateChange)=\"onDatePicked($event)\"\n            [value]=\"dateValueSignal()\"\n            (click)=\"onDateInputClick(picker)\"\n            (keydown)=\"onDateKeydown($event)\"\n            [attr.aria-invalid]=\"ariaInvalidSignal()\"\n            [attr.aria-required]=\"ariaRequiredSignal()\"\n            [attr.aria-describedby]=\"ariaDescribedBySignal()\" />\n          @if (!hideDatePickerSignal()) {\n            <button matPrefix mat-icon-button (click)=\"picker.open()\" [disabled]=\"isDisabledSignal()\" aria-label=\"Open date picker\">\n              <mat-icon aria-hidden=\"true\">calendar_today</mat-icon>\n            </button>\n          }\n          <mat-datepicker #picker></mat-datepicker>\n          @if (resolvedShowClearButtonSignal()) {\n            <button matSuffix mat-icon-button aria-label=\"Clear date and time\" [disabled]=\"isDisabledSignal()\" (click)=\"clearValue()\">\n              <mat-icon aria-hidden=\"true\">clear</mat-icon>\n            </button>\n          }\n          @if (!showTimeInputSignal()) {\n            <span matTextSuffix>\n              <ng-container [ngTemplateOutlet]=\"tzSuffix\"></ng-container>\n            </span>\n          }\n        </mat-form-field>\n      </div>\n    }\n\n    <!-- Time Input / Add Time Button -->\n    @if (showTimeInputSignal() || showAddTimeButtonSignal()) {\n      <div class=\"dbx-forge-datetime-col\">\n        @if (showTimeInputSignal()) {\n          <mat-menu #timemenu=\"matMenu\">\n            @if (timeModeSignal() === 'optional') {\n              <button mat-menu-item (click)=\"removeTime()\">\n                <span>Remove Time</span>\n              </button>\n              <mat-divider></mat-divider>\n            }\n            @for (preset of presetsSignal(); track $index) {\n              <button mat-menu-item (click)=\"selectPreset(preset)\">{{ preset.label | getValue }}</button>\n            }\n          </mat-menu>\n          <mat-form-field [appearance]=\"appearanceSignal()\" subscriptSizing=\"dynamic\" class=\"dbx-forge-datetime-col-field\">\n            <mat-label>{{ timeLabelSignal() }}</mat-label>\n            <input matInput [errorStateMatcher]=\"timeErrorStateMatcher\" [required]=\"isTimeRequiredSignal()\" [formControl]=\"timeCtrl\" (focus)=\"onTimeFocus()\" (focusout)=\"onTimeBlur()\" (keydown)=\"onTimeKeydown($event)\" />\n            <button matPrefix mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"Open time presets\" [disabled]=\"isTimeMenuDisabledSignal()\">\n              <mat-icon aria-hidden=\"true\">timer</mat-icon>\n            </button>\n            <span matTextSuffix>\n              <ng-container [ngTemplateOutlet]=\"tzSuffix\"></ng-container>\n            </span>\n            @if (timeCtrl.hasError('pattern')) {\n              <mat-error>The input time is not recognizable.</mat-error>\n            }\n          </mat-form-field>\n        }\n        @if (showAddTimeButtonSignal()) {\n          <div class=\"dbx-forge-add-time-wrapper\">\n            <button mat-button (click)=\"addTime()\">\n              <mat-icon>timer</mat-icon>\n              Add Time\n            </button>\n          </div>\n        }\n      </div>\n    }\n  </div>\n\n  <!-- Date Hint / Error -->\n  @if (hasErrorSignal()) {\n    @if (currentErrorMessageSignal()) {\n      <mat-error class=\"dbx-forge-datetime-error\" [id]=\"errorIdSignal()\">{{ currentErrorMessageSignal() }}</mat-error>\n    }\n  } @else if (!hideDateHintSignal()) {\n    <div class=\"dbx-forge-datetime-hint\" [id]=\"hintIdSignal()\">\n      @if (!hasValueSignal()) {\n        <span class=\"dbx-small dbx-hint\">No date/time set</span>\n      } @else if (displayValueSignal(); as dv) {\n        @if (fullDaySignal()) {\n          <small>\n            <b class=\"dbx-ok\">{{ allDayLabelSignal() }}</b>\n            {{ dv | date: 'fullDate' }} {{ tzAbbreviationSignal() }} ({{ dv | dateDistance }})\n          </small>\n        } @else {\n          <small>\n            <b class=\"dbx-ok\">{{ atTimeLabelSignal() }}</b>\n            {{ dv | date: 'medium' }} {{ tzAbbreviationSignal() }} ({{ dv | timeDistance }})\n          </small>\n        }\n      }\n    </div>\n  }\n\n  <!-- Description -->\n  @if (descriptionSignal()) {\n    <p class=\"dbx-hint dbx-forge-datetime-desc\">{{ descriptionSignal() }}</p>\n  }\n</div>\n\n<!-- Timezone Suffix Template -->\n<ng-template #tzSuffix>\n  @if (showTimezoneSignal()) {\n    <span class=\"dbx-forge-datetime-timezone dbx-faint\">{{ tzAbbreviationSignal() }}</span>\n  }\n</ng-template>\n","import { Component, input, computed, effect, type Signal, type InputSignal, DestroyRef, inject, ElementRef } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { AsyncPipe } from '@angular/common';\nimport type { DynamicText, FieldMeta, ValidationMessages, BaseValueField } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe, DEFAULT_PROPS, DEFAULT_VALIDATION_MESSAGES, resolveValueFieldContext, buildValueFieldInputs, createResolvedErrorsSignal, shouldShowErrors, setupMetaTracking } from '@ng-forge/dynamic-forms/integration';\nimport { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material';\nimport type { FieldTree } from '@angular/forms/signals';\nimport type { Maybe } from '@dereekb/util';\nimport { safeToJsDate } from '@dereekb/date';\n\n/**\n * The custom forge field type name for the date range field.\n */\nexport const FORGE_DATERANGE_FIELD_TYPE = 'daterange' as const;\n\n/**\n * Value shape for the date range field.\n */\nexport interface DbxForgeDateRangeValue {\n  readonly start?: Maybe<Date>;\n  readonly end?: Maybe<Date>;\n}\n\n/**\n * Custom props for the forge date range field.\n */\nexport interface DbxForgeDateRangeFieldComponentProps {\n  /**\n   * Custom label for the start date input.\n   */\n  readonly startLabel?: string;\n  /**\n   * Custom label for the end date input.\n   */\n  readonly endLabel?: string;\n  /**\n   * Whether to include time inputs alongside the date pickers.\n   *\n   * Defaults to false.\n   */\n  readonly showTime?: boolean;\n  /**\n   * Material form field appearance.\n   */\n  readonly appearance?: 'fill' | 'outline';\n  /**\n   * Hint text displayed below the field.\n   */\n  readonly hint?: DynamicText;\n  /**\n   * Minimum selectable date.\n   */\n  readonly minDate?: Date | string;\n  /**\n   * Maximum selectable date.\n   */\n  readonly maxDate?: Date | string;\n}\n\n/**\n * Field definition type for a forge date range field.\n */\nexport type DbxForgeDateRangeFieldDef = BaseValueField<DbxForgeDateRangeFieldComponentProps, DbxForgeDateRangeValue> & {\n  readonly type: typeof FORGE_DATERANGE_FIELD_TYPE;\n};\n\n/**\n * Custom ng-forge field component for date range selection.\n *\n * This component provides two date pickers (start and end) and bridges their\n * values with ng-forge Signal Forms. The value is stored as a `{ start, end }` object.\n *\n * Registered as ng-forge type 'daterange'.\n */\n@Component({\n  selector: 'dbx-forge-daterange-field',\n  imports: [MatFormFieldModule, MatInputModule, MatDatepickerModule, MatButtonModule, MatIconModule, ReactiveFormsModule, DynamicTextPipe, AsyncPipe],\n  templateUrl: './daterange.field.component.html',\n  styles: `\n    .dbx-forge-daterange-field {\n      display: flex;\n      flex-wrap: wrap;\n      gap: 8px;\n      align-items: flex-start;\n    }\n    .dbx-forge-daterange-start,\n    .dbx-forge-daterange-end {\n      flex: 1 1 auto;\n      min-width: 140px;\n    }\n    .dbx-forge-daterange-start-time,\n    .dbx-forge-daterange-end-time {\n      flex: 0 1 auto;\n      min-width: 100px;\n    }\n  `\n})\nexport class DbxForgeDateRangeFieldComponent {\n  private readonly materialConfig = inject(MATERIAL_CONFIG, { optional: true });\n  private readonly destroyRef = inject(DestroyRef);\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  // Standard ng-forge value field inputs\n  readonly field: InputSignal<FieldTree<unknown>> = input.required<FieldTree<unknown>>();\n  readonly key: InputSignal<string> = input.required<string>();\n  readonly label: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly placeholder: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly className: InputSignal<string> = input('');\n  readonly tabIndex: InputSignal<number | undefined> = input<number | undefined>();\n  readonly props: InputSignal<DbxForgeDateRangeFieldComponentProps | undefined> = input<DbxForgeDateRangeFieldComponentProps | undefined>();\n  readonly meta: InputSignal<FieldMeta | undefined> = input<FieldMeta | undefined>();\n  readonly validationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n\n  /**\n   * Internal FormControls for start and end dates and times.\n   */\n  readonly startDateCtrl = new FormControl<Maybe<Date>>(null);\n  readonly startTimeCtrl = new FormControl<string>('');\n  readonly endDateCtrl = new FormControl<Maybe<Date>>(null);\n  readonly endTimeCtrl = new FormControl<string>('');\n\n  // Computed props\n  readonly startLabelSignal: Signal<string> = computed(() => this.props()?.startLabel ?? 'Start');\n  readonly endLabelSignal: Signal<string> = computed(() => this.props()?.endLabel ?? 'End');\n  readonly showTimeSignal: Signal<boolean> = computed(() => this.props()?.showTime ?? false);\n  readonly effectiveAppearanceSignal = computed(() => this.props()?.appearance ?? this.materialConfig?.appearance ?? 'outline');\n  readonly minDateSignal = computed(() => {\n    const minDate = this.props()?.minDate;\n    return minDate ? safeToJsDate(minDate) : null;\n  });\n  readonly maxDateSignal = computed(() => {\n    const maxDate = this.props()?.maxDate;\n    return maxDate ? safeToJsDate(maxDate) : null;\n  });\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as Signal<FieldTree<unknown>>, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as Signal<FieldTree<unknown>>);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaRequiredSignal = computed(() => (this.field()().required() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const hintId = this.hintIdSignal();\n    if (this.errorsToDisplaySignal().length > 0) return errorId;\n    if (this.props()?.hint) return hintId;\n    return null;\n  });\n\n  /**\n   * Flag to prevent feedback loops during sync.\n   */\n  private _syncing = false;\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'input' });\n\n    // Sync Signal Forms field -> FormControls (inbound)\n    effect(() => {\n      const fieldTree = this.field();\n      const fieldState = fieldTree();\n      const signalValue = fieldState.value() as Maybe<DbxForgeDateRangeValue>;\n\n      if (!this._syncing) {\n        this._syncing = true;\n        this._setDateCtrlFromValue(this.startDateCtrl, this.startTimeCtrl, signalValue?.start);\n        this._setDateCtrlFromValue(this.endDateCtrl, this.endTimeCtrl, signalValue?.end);\n        this._syncing = false;\n      }\n    });\n\n    // Sync FormControls -> Signal Forms field (outbound)\n    const startDateSub = this.startDateCtrl.valueChanges.subscribe(() => this._syncOutbound());\n    const startTimeSub = this.startTimeCtrl.valueChanges.subscribe(() => this._syncOutbound());\n    const endDateSub = this.endDateCtrl.valueChanges.subscribe(() => this._syncOutbound());\n    const endTimeSub = this.endTimeCtrl.valueChanges.subscribe(() => this._syncOutbound());\n\n    this.destroyRef.onDestroy(() => {\n      startDateSub.unsubscribe();\n      startTimeSub.unsubscribe();\n      endDateSub.unsubscribe();\n      endTimeSub.unsubscribe();\n    });\n  }\n\n  /**\n   * Sets the date and time FormControls from a source Date value without emitting events.\n   *\n   * @param dateCtrl - The date FormControl to update.\n   * @param timeCtrl - The time string FormControl to update.\n   * @param value - The source Date value to extract date and time from.\n   */\n  private _setDateCtrlFromValue(dateCtrl: FormControl<Maybe<Date>>, timeCtrl: FormControl<Maybe<string>>, value: Maybe<Date>): void {\n    const dateValue = value ? safeToJsDate(value) : undefined;\n\n    if (dateValue) {\n      const currentCtrlValue = dateCtrl.value;\n\n      if (currentCtrlValue?.getTime() !== dateValue.getTime()) {\n        dateCtrl.setValue(dateValue, { emitEvent: false });\n      }\n\n      const hours = String(dateValue.getHours()).padStart(2, '0');\n      const minutes = String(dateValue.getMinutes()).padStart(2, '0');\n      const timeStr = `${hours}:${minutes}`;\n\n      if (timeStr !== timeCtrl.value) {\n        timeCtrl.setValue(timeStr, { emitEvent: false });\n      }\n    } else {\n      dateCtrl.setValue(null, { emitEvent: false });\n      timeCtrl.setValue('', { emitEvent: false });\n    }\n  }\n\n  /**\n   * Combines the date and time controls into a date range value\n   * and writes it to the Signal Forms field tree.\n   */\n  private _syncOutbound(): void {\n    if (this._syncing) {\n      return;\n    }\n\n    this._syncing = true;\n\n    const fieldTree = this.field();\n    const fieldState = fieldTree();\n    const showTime = this.showTimeSignal();\n    const startDate = this._combineDateAndTime(this.startDateCtrl.value, showTime ? this.startTimeCtrl.value : null);\n    const endDate = this._combineDateAndTime(this.endDateCtrl.value, showTime ? this.endTimeCtrl.value : null);\n\n    const newValue: DbxForgeDateRangeValue = {\n      start: startDate,\n      end: endDate\n    };\n\n    fieldState.value.set(newValue);\n    fieldState.markAsTouched();\n    fieldState.markAsDirty();\n    this._syncing = false;\n  }\n\n  /**\n   * Combines a date and optional time string into a single Date.\n   *\n   * @param dateValue - The base date value.\n   * @param timeValue - Optional time string in \"HH:mm\" format to apply to the date.\n   * @returns A new Date with the combined date and time, or undefined if no date is provided.\n   */\n  private _combineDateAndTime(dateValue: Maybe<Date>, timeValue: Maybe<string>): Maybe<Date> {\n    let result: Maybe<Date>;\n\n    if (dateValue) {\n      result = new Date(dateValue);\n\n      if (timeValue) {\n        const [hoursStr, minutesStr] = timeValue.split(':');\n        const hours = Number.parseInt(hoursStr, 10);\n        const minutes = Number.parseInt(minutesStr, 10);\n\n        if (!Number.isNaN(hours) && !Number.isNaN(minutes)) {\n          result.setHours(hours, minutes, 0, 0);\n        }\n      }\n    }\n\n    return result;\n  }\n}\n\n// MARK: Mapper\n/**\n * Custom mapper for the daterange field type.\n *\n * Uses the standard valueFieldMapper pattern from ng-forge/integration to resolve\n * the field tree and build the standard inputs for the component.\n *\n * @param fieldDef - The date range field definition.\n * @param fieldDef.key - Form model key for the field.\n * @returns Signal containing Record of input names to values for ngComponentOutlet.\n */\nexport function dateRangeFieldMapper(fieldDef: { key: string }): Signal<Record<string, unknown>> {\n  const ctx = resolveValueFieldContext();\n  const defaultProps = inject(DEFAULT_PROPS);\n  const defaultValidationMessages = inject(DEFAULT_VALIDATION_MESSAGES);\n\n  return computed(() => {\n    const inputs = buildValueFieldInputs(fieldDef as any, ctx, defaultProps?.());\n    const dvm = defaultValidationMessages?.();\n    if (dvm !== undefined) {\n      inputs['defaultValidationMessages'] = dvm;\n    }\n    return inputs;\n  });\n}\n","<div class=\"dbx-forge-daterange-field\">\n  <mat-form-field [appearance]=\"effectiveAppearanceSignal()\" subscriptSizing=\"dynamic\" class=\"dbx-forge-daterange-start\">\n    <mat-label>{{ startLabelSignal() }}</mat-label>\n    <input matInput [matDatepicker]=\"startPicker\" [formControl]=\"startDateCtrl\" [min]=\"minDateSignal()\" [max]=\"maxDateSignal()\" [attr.aria-invalid]=\"ariaInvalidSignal()\" [attr.aria-required]=\"ariaRequiredSignal()\" [attr.aria-describedby]=\"ariaDescribedBySignal()\" />\n    <mat-datepicker-toggle matIconSuffix [for]=\"startPicker\"></mat-datepicker-toggle>\n    <mat-datepicker #startPicker></mat-datepicker>\n  </mat-form-field>\n  @if (showTimeSignal()) {\n    <mat-form-field [appearance]=\"effectiveAppearanceSignal()\" subscriptSizing=\"dynamic\" class=\"dbx-forge-daterange-start-time\">\n      <mat-label>Start Time</mat-label>\n      <input matInput type=\"time\" [formControl]=\"startTimeCtrl\" />\n    </mat-form-field>\n  }\n  <mat-form-field [appearance]=\"effectiveAppearanceSignal()\" subscriptSizing=\"dynamic\" class=\"dbx-forge-daterange-end\">\n    <mat-label>{{ endLabelSignal() }}</mat-label>\n    <input matInput [matDatepicker]=\"endPicker\" [formControl]=\"endDateCtrl\" [min]=\"minDateSignal()\" [max]=\"maxDateSignal()\" />\n    <mat-datepicker-toggle matIconSuffix [for]=\"endPicker\"></mat-datepicker-toggle>\n    <mat-datepicker #endPicker></mat-datepicker>\n  </mat-form-field>\n  @if (showTimeSignal()) {\n    <mat-form-field [appearance]=\"effectiveAppearanceSignal()\" subscriptSizing=\"dynamic\" class=\"dbx-forge-daterange-end-time\">\n      <mat-label>End Time</mat-label>\n      <input matInput type=\"time\" [formControl]=\"endTimeCtrl\" />\n    </mat-form-field>\n  }\n  @if (errorsToDisplaySignal()[0]; as error) {\n    <mat-error [id]=\"errorIdSignal()\">{{ error.message }}</mat-error>\n  } @else if (props()?.hint; as hint) {\n    <mat-hint [id]=\"hintIdSignal()\">{{ hint | dynamicText | async }}</mat-hint>\n  }\n</div>\n","import { type Maybe, type DecisionFunction, type Milliseconds, type TimezoneString, type DateMonth, type DayOfMonth, type YearNumber, isMonthDaySlashDate, MS_IN_MINUTE } from '@dereekb/util';\nimport {\n  guessCurrentTimezone,\n  type DateTimezoneUtcNormalInstance,\n  dateTimezoneUtcNormal,\n  type DateRangeInput,\n  type DateRange,\n  isSameDateDayRange,\n  type DateRangeWithDateOrStringValue,\n  dateRange,\n  isDateInDateRange,\n  clampDateRangeToDateRange,\n  isSameDateRange,\n  isSameDateDay,\n  limitDateTimeInstance,\n  dateTimeMinuteWholeDayDecisionFunction\n} from '@dereekb/date';\nimport { switchMap, shareReplay, map, startWith, distinctUntilChanged, debounceTime, throttleTime, BehaviorSubject, type Observable, Subject, of, combineLatestWith, withLatestFrom, filter, combineLatest, scan, first, timer } from 'rxjs';\nimport { Component, ElementRef, Injectable, type InputSignal, type Signal, DestroyRef, inject, signal, viewChild, computed, input, forwardRef, effect, untracked } from '@angular/core';\nimport { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { type MatDateRangeSelectionStrategy, MAT_DATE_RANGE_SELECTION_STRATEGY, DateRange as DatePickerDateRange, MatCalendar, MatDatepickerModule } from '@angular/material/datepicker';\nimport { asObservableFromGetter, filterMaybe, type ObservableOrValueGetter, skipAllInitialMaybe, switchMapMaybeDefault } from '@dereekb/rxjs';\nimport { DbxDateTimeValueMode, dbxDateRangeIsSameDateRangeFieldValue, dbxDateTimeInputValueParseFactory, dbxDateTimeOutputValueFactory } from '../../../../field/value/date/date.value';\nimport { type DateTimePresetConfiguration } from '../../../../field/value/date/datetime';\nimport { type DbxFixedDateRangeDateRangeInput, type DbxFixedDateRangePickerConfiguration, type DbxFixedDateRangeSelectionMode, type FixedDateRangeScan, type FixedDateRangeScanType } from '../../../../field/value/date/fixeddaterange.config';\nimport { DateAdapter } from '@angular/material/core';\nimport { isBefore } from 'date-fns';\nimport { MatError, MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { toSignal, toObservable } from '@angular/core/rxjs-interop';\nimport { NgClass } from '@angular/common';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { DEFAULT_PROPS, DEFAULT_VALIDATION_MESSAGES, resolveValueFieldContext, buildValueFieldInputs, createResolvedErrorsSignal, shouldShowErrors, setupMetaTracking } from '@ng-forge/dynamic-forms/integration';\nimport type { FieldTree } from '@angular/forms/signals';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport { cleanSubscription, completeOnDestroy } from '@dereekb/dbx-core';\n\n// MARK: Helper Functions\nfunction fixedDateRangeInputValueFactory(mode: DbxDateTimeValueMode, timezoneInstance: Maybe<DateTimezoneUtcNormalInstance>): (input: Maybe<DateRangeWithDateOrStringValue>) => Maybe<DateRange> {\n  const dateInputTransformer = dbxDateTimeInputValueParseFactory(mode, timezoneInstance);\n\n  return (y) => {\n    let result: Maybe<DateRange> = undefined;\n\n    if (y) {\n      result = {\n        start: dateInputTransformer(y.start) as Date,\n        end: dateInputTransformer(y.end) as Date\n      };\n    }\n\n    return result;\n  };\n}\n\nfunction fixedDateRangeOutputValueFactory(mode: DbxDateTimeValueMode, timezoneInstance: Maybe<DateTimezoneUtcNormalInstance>): (date: Maybe<DateRange>) => Maybe<DateRangeWithDateOrStringValue> {\n  const dateOutputTransformer = dbxDateTimeOutputValueFactory(mode, timezoneInstance);\n\n  return (y) => {\n    let result: Maybe<DateRangeWithDateOrStringValue> = undefined;\n\n    if (y) {\n      result = {\n        start: dateOutputTransformer(y.start) as Date,\n        end: dateOutputTransformer(y.end) as Date\n      };\n    }\n\n    return result;\n  };\n}\n\nconst TIME_OUTPUT_THROTTLE_TIME: Milliseconds = 10;\n\n// MARK: Internal Types\ntype SelectedDateEventType = 'calendar' | 'input';\n\ninterface SelectedDateEvent {\n  readonly type: SelectedDateEventType;\n  readonly range?: Maybe<Partial<DateRange>>;\n}\n\n// MARK: Value Interface\n/**\n * Value shape for the fixed date range field.\n *\n * Uses the same `DateRange` shape as `@dereekb/date` — an object with `start` and `end` dates.\n * The actual stored value format depends on the configured `valueMode`.\n */\nexport interface DbxForgeFixedDateRangeValue {\n  readonly start?: Maybe<Date>;\n  readonly end?: Maybe<Date>;\n}\n\n// MARK: Props Interface\n/**\n * Custom props for the forge fixed date range field.\n *\n * Full parity with formly `DbxFixedDateRangeFieldProps`.\n */\nexport interface DbxForgeFixedDateRangeFieldComponentProps {\n  /**\n   * Date range input to build the date range from a single picked date.\n   * Required for 'single' mode and boundary-based selection modes.\n   */\n  readonly dateRangeInput?: ObservableOrValueGetter<DbxFixedDateRangeDateRangeInput>;\n  /**\n   * Selection mode to use when picking dates on the calendar.\n   *\n   * - `'single'` — Picks one date, range computed from dateRangeInput config.\n   * - `'normal'` — Standard start/end range picking with two clicks.\n   * - `'arbitrary'` — Free-form range selection within a boundary.\n   * - `'arbitrary_quick'` — Like arbitrary, but immediately sets the value on first click.\n   *\n   * Defaults to `'single'`.\n   */\n  readonly selectionMode?: Maybe<ObservableOrValueGetter<DbxFixedDateRangeSelectionMode>>;\n  /**\n   * Value mode for the dates in the output DateRange.\n   * Defaults to DATE.\n   */\n  readonly valueMode?: DbxDateTimeValueMode;\n  /**\n   * Whether to pass the date value as a UTC date, or a date in the current timezone.\n   */\n  readonly fullDayInUTC?: boolean;\n  /**\n   * Custom picker configuration (limits, schedule).\n   */\n  readonly pickerConfig?: ObservableOrValueGetter<DbxFixedDateRangePickerConfiguration>;\n  /**\n   * The input timezone to default to. Ignored if fullDayInUTC is true.\n   */\n  readonly timezone?: Maybe<ObservableOrValueGetter<Maybe<TimezoneString>>>;\n  /**\n   * Whether to display the timezone. Defaults to true.\n   */\n  readonly showTimezone?: Maybe<boolean>;\n  /**\n   * Custom presets.\n   */\n  readonly presets?: ObservableOrValueGetter<DateTimePresetConfiguration[]>;\n  /**\n   * Whether to show the range input text fields. Defaults to true.\n   */\n  readonly showRangeInput?: boolean;\n  /**\n   * Material form field appearance.\n   */\n  readonly appearance?: 'fill' | 'outline';\n  /**\n   * Hint text displayed below the field.\n   */\n  readonly hint?: DynamicText;\n}\n\n// MARK: Component\n/**\n * Forge custom field component for selecting a fixed date range using an inline calendar.\n *\n * Full parity with formly `DbxFixedDateRangeFieldComponent`: supports multiple selection modes\n * (single, normal, arbitrary, arbitrary_quick), timezone conversion, date range input configuration,\n * picker config (limits, schedule), and optional text inputs for start/end dates.\n *\n * Uses a custom `MatDateRangeSelectionStrategy` for preview highlighting on the calendar.\n *\n * Registered as ng-forge type 'fixeddaterange'.\n */\n@Component({\n  selector: 'dbx-forge-fixeddaterange-field',\n  imports: [MatDatepickerModule, MatFormFieldModule, ReactiveFormsModule, MatInputModule, MatError, NgClass],\n  templateUrl: './fixeddaterange.field.component.html',\n  providers: [\n    {\n      provide: MAT_DATE_RANGE_SELECTION_STRATEGY,\n      useClass: forwardRef(() => DbxForgeFixedDateRangeFieldSelectionStrategy)\n    }\n  ]\n})\nexport class DbxForgeFixedDateRangeFieldComponent {\n  private readonly destroyRef = inject(DestroyRef);\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  // MARK: ng-forge ValueFieldComponent inputs\n  readonly field: InputSignal<FieldTree<unknown>> = input.required<FieldTree<unknown>>();\n  readonly key: InputSignal<string> = input.required<string>();\n  readonly label: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly placeholder: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly className: InputSignal<string> = input('');\n  readonly tabIndex: InputSignal<number | undefined> = input<number | undefined>();\n  readonly props: InputSignal<DbxForgeFixedDateRangeFieldComponentProps | undefined> = input<DbxForgeFixedDateRangeFieldComponentProps | undefined>();\n  readonly meta: InputSignal<FieldMeta | undefined> = input<FieldMeta | undefined>();\n  readonly validationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n\n  // MARK: View children\n  readonly calendar = viewChild.required<MatCalendar<Date>>(MatCalendar);\n  readonly startDateInputElement = viewChild<string, ElementRef>('startDateInput', { read: ElementRef });\n  readonly endDateInputElement = viewChild<string, ElementRef>('endDateInput', { read: ElementRef });\n\n  // MARK: Internal signals\n  readonly currentDateRangeInputSignal = signal<Maybe<DbxFixedDateRangeDateRangeInput>>(undefined);\n  readonly currentSelectionModeSignal = signal<DbxFixedDateRangeSelectionMode>('single');\n\n  // MARK: Subscription management\n  private readonly _sub = cleanSubscription();\n  private readonly _inputRangeFormSub = cleanSubscription();\n  private readonly _inputRangeFormValueSub = cleanSubscription();\n  private readonly _dateRangeInputSub = cleanSubscription();\n  private readonly _currentSelectionModeSub = cleanSubscription();\n  private readonly _disableEndSub = cleanSubscription();\n  private readonly _activeDateSub = cleanSubscription();\n\n  // MARK: BehaviorSubjects\n  private readonly _config = completeOnDestroy(new BehaviorSubject<Maybe<Observable<DbxFixedDateRangePickerConfiguration>>>(undefined));\n  private readonly _selectionMode = completeOnDestroy(new BehaviorSubject<Maybe<Observable<DbxFixedDateRangeSelectionMode>>>(undefined));\n  private readonly _dateRangeInput = completeOnDestroy(new BehaviorSubject<Maybe<Observable<DbxFixedDateRangeDateRangeInput>>>(undefined));\n  private readonly _timezone = completeOnDestroy(new BehaviorSubject<Maybe<Observable<Maybe<TimezoneString>>>>(undefined));\n\n  // MARK: Event subject\n  private readonly _selectionEvent = completeOnDestroy(new Subject<SelectedDateEvent>());\n  readonly selectedDateRange$: Observable<Maybe<Partial<DateRange>>> = this._selectionEvent.pipe(map((x) => x.range));\n\n  // MARK: Form group for text inputs\n  readonly inputRangeForm = new FormGroup({\n    start: new FormControl<Maybe<Date>>(null),\n    end: new FormControl<Maybe<Date>>(null)\n  });\n\n  // MARK: Computed signals from props\n  readonly isRequiredSignal = computed(() => {\n    let result = false;\n\n    try {\n      const state = this.field()?.() as any;\n      result = (state?.required?.() as boolean) ?? false;\n    } catch {\n      // Field tree not yet initialized — fall through to false\n    }\n\n    return result;\n  });\n\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  readonly valueModeSignal = computed(() => this.props()?.valueMode ?? DbxDateTimeValueMode.DATE);\n  readonly showRangeInputSignal = computed(() => this.props()?.showRangeInput ?? true);\n  readonly showTimezoneSignal = computed(() => this.props()?.showTimezone ?? true);\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as any, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as any);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaRequiredSignal = computed(() => (this.field()().required() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const props = this.props();\n    const hintId = this.hintIdSignal();\n    let result: Maybe<string> = null;\n\n    if (this.errorsToDisplaySignal().length > 0) {\n      result = errorId;\n    } else if (props?.hint) {\n      result = hintId;\n    }\n\n    return result;\n  });\n\n  readonly hasRequiredErrorSignal = computed(() => {\n    let result = false;\n\n    try {\n      const state = this.field()?.() as any;\n      const touched = state?.touched?.() as boolean;\n\n      if (touched) {\n        const invalid = state?.invalid?.() as boolean;\n\n        if (invalid) {\n          const errors = state?.errors?.() as Array<{ type?: string }> | undefined;\n          result = errors?.some((e) => e.type === 'required') ?? false;\n        }\n      }\n    } catch {\n      // Field tree not yet initialized — fall through to false\n    }\n\n    return result;\n  });\n\n  // MARK: Field value reading\n  readonly fieldValueSignal = computed(() => {\n    let result: unknown = undefined;\n\n    try {\n      const state = this.field()?.() as any;\n      result = state?.value?.() as unknown;\n    } catch {\n      // Field tree not yet initialized — fall through to undefined\n    }\n\n    return result;\n  });\n\n  readonly fieldValue$ = toObservable(this.fieldValueSignal);\n\n  // MARK: Observable pipelines\n  readonly config$: Observable<DbxFixedDateRangePickerConfiguration> = this._config.pipe(\n    map((x) => x ?? of({})),\n    switchMap((x) => x),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  readonly limitDateTimeInstance$ = this.config$.pipe(map(limitDateTimeInstance), shareReplay(1));\n\n  readonly selectionMode$: Observable<DbxFixedDateRangeSelectionMode> = this._selectionMode.pipe(\n    switchMapMaybeDefault<DbxFixedDateRangeSelectionMode>('single'),\n    map((x) => x ?? 'single'),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  readonly dateRangeInput$ = this._dateRangeInput.pipe(switchMapMaybeDefault(), shareReplay(1));\n\n  readonly timezone$: Observable<Maybe<TimezoneString>> = this._timezone.pipe(\n    switchMapMaybeDefault(),\n    distinctUntilChanged(),\n    map((defaultTimezone) => defaultTimezone ?? guessCurrentTimezone()),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  readonly timezoneInstance$: Observable<Maybe<DateTimezoneUtcNormalInstance>> = this.timezone$.pipe(\n    map((timezone) => (timezone ? dateTimezoneUtcNormal({ timezone }) : undefined)),\n    shareReplay(1)\n  );\n\n  readonly valueInSystemTimezone$: Observable<Maybe<DateRange>> = this.fieldValue$.pipe(\n    combineLatestWith(this.timezoneInstance$),\n    map(([raw, timezoneInstance]) => {\n      if (raw == null) return undefined;\n      const inputFactory = fixedDateRangeInputValueFactory(this.valueModeSignal(), timezoneInstance);\n      return inputFactory(raw as Maybe<DateRangeWithDateOrStringValue>);\n    }),\n    throttleTime(20, undefined, { leading: false, trailing: true }),\n    distinctUntilChanged<Maybe<DateRange>>(isSameDateDayRange),\n    shareReplay(1)\n  );\n\n  readonly minMaxRange$ = this.limitDateTimeInstance$.pipe(\n    combineLatestWith(timer(MS_IN_MINUTE)),\n    map(([x]) => x.dateRange()),\n    distinctUntilChanged(isSameDateDayRange),\n    shareReplay(1)\n  );\n\n  readonly min$ = this.minMaxRange$.pipe(\n    map((x) => x?.start ?? null),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  readonly max$ = this.minMaxRange$.pipe(\n    map((x) => x?.end ?? null),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  readonly pickerFilter$: Observable<DecisionFunction<Maybe<Date>>> = this.config$.pipe(\n    distinctUntilChanged(),\n    map((x) => {\n      if (x && Object.keys(x).length > 0) {\n        const dateFilter = dateTimeMinuteWholeDayDecisionFunction(x, false);\n        return (d: Maybe<Date>) => (d == null ? true : dateFilter(d));\n      }\n      return () => true;\n    }),\n    shareReplay(1)\n  );\n\n  readonly defaultPickerFilter: DecisionFunction<Maybe<Date>> = () => true;\n\n  // MARK: Date range selection\n\n  dateRangeSelectionForMode(mode: DbxFixedDateRangeSelectionMode) {\n    const result: Observable<Maybe<DateRange>> = combineLatest([this.dateRangeInput$, this.limitDateTimeInstance$]).pipe(\n      switchMap(([dateRangeInput, limitInstance]) => {\n        const hasDateRangeConfiguration = Boolean(dateRangeInput);\n        const minMaxClamp = (range: DateRange) => limitInstance.clampDateRange(range);\n\n        let modeResult: Observable<Maybe<DateRange>>;\n\n        if (mode === 'single') {\n          modeResult = this.selectedDateRange$.pipe(\n            distinctUntilChanged(isSameDateDayRange),\n            map((inputDateRange) => {\n              const date = inputDateRange?.start;\n              return date ? minMaxClamp(dateRange({ ...dateRangeInput, date } as DateRangeInput)) : null;\n            })\n          );\n        } else {\n          modeResult = this.selectedDateRange$.pipe(\n            // eslint-disable-next-line sonarjs/cognitive-complexity\n            scan((acc: FixedDateRangeScan, nextDateRange: Maybe<Partial<DateRange>>) => {\n              let result: FixedDateRangeScan;\n              let pickType: Maybe<FixedDateRangeScanType> = 'start';\n\n              if (nextDateRange?.start == null) {\n                result = {\n                  lastDateRange: nextDateRange\n                };\n              } else {\n                const { start: startOrNextDate, end } = nextDateRange;\n                const potentialBoundary = dateRange({ ...dateRangeInput, date: startOrNextDate } as DateRangeInput);\n\n                if (startOrNextDate && end) {\n                  const range = clampDateRangeToDateRange(nextDateRange, potentialBoundary) as DateRange;\n                  result = {\n                    lastDateRange: nextDateRange,\n                    boundary: range,\n                    range\n                  };\n\n                  if (mode === 'normal' && acc.lastPickType === 'start' && isSameDateDay(startOrNextDate, end) && isSameDateDay(startOrNextDate, acc.lastDateRange?.start)) {\n                    pickType = 'startRepeat';\n                  }\n                } else {\n                  let range: Maybe<DateRange> = undefined;\n                  let boundary: Maybe<DateRange> = potentialBoundary;\n\n                  if (mode === 'normal') {\n                    if (!hasDateRangeConfiguration) {\n                      boundary = undefined;\n                      pickType = acc.lastPickType === 'start' ? 'end' : 'start';\n                    } else if (acc.lastPickType === 'startRepeat') {\n                      pickType = 'end';\n                    } else {\n                      pickType = acc.lastPickType === 'start' && acc.boundary && isDateInDateRange(startOrNextDate, acc.boundary) ? 'end' : 'start';\n                    }\n\n                    switch (pickType) {\n                      case 'end': {\n                        const lastStart = acc.lastDateRange?.start as Date;\n\n                        let boundaryToCheck: DateRange;\n                        const selectionIsBeforePreviousSelection = !lastStart || isBefore(startOrNextDate, lastStart);\n\n                        let nextStart: Date;\n                        let nextEnd: Date;\n\n                        if (selectionIsBeforePreviousSelection) {\n                          nextStart = startOrNextDate;\n                          nextEnd = lastStart;\n                          boundaryToCheck = potentialBoundary;\n                        } else {\n                          nextStart = lastStart;\n                          nextEnd = startOrNextDate;\n                          boundaryToCheck = dateRange({ ...dateRangeInput, date: nextStart } as DateRangeInput);\n                        }\n\n                        if (isBefore(boundaryToCheck.end, nextEnd)) {\n                          nextStart = startOrNextDate;\n                          nextEnd = startOrNextDate;\n                          pickType = 'start';\n                          boundary = boundaryToCheck;\n                        } else {\n                          boundary = range;\n                        }\n\n                        range = {\n                          start: nextStart,\n                          end: nextEnd\n                        };\n                        break;\n                      }\n                      case 'start':\n                        range = {\n                          start: startOrNextDate,\n                          end: startOrNextDate\n                        };\n                        break;\n                    }\n                  } else if (acc.boundary && isDateInDateRange(startOrNextDate, acc.boundary)) {\n                    range = {\n                      start: acc.boundary.start,\n                      end: startOrNextDate\n                    };\n\n                    if (mode === 'arbitrary_quick') {\n                      if (isSameDateRange(acc.range, range) && isSameDateDay(range.end, startOrNextDate)) {\n                        range = dateRange({ ...dateRangeInput, date: range.start } as DateRangeInput);\n                        boundary = range;\n                      } else {\n                        boundary = range;\n                      }\n                    } else {\n                      boundary = acc.boundary;\n                    }\n                  } else if (mode === 'arbitrary_quick') {\n                    range = potentialBoundary;\n                  }\n\n                  result = {\n                    lastDateRange: nextDateRange,\n                    boundary,\n                    range\n                  };\n                }\n              }\n\n              if (result) {\n                result = {\n                  lastPickType: pickType,\n                  lastDateRange: result.lastDateRange,\n                  boundary: result.boundary ? minMaxClamp(result.boundary) : undefined,\n                  range: result.range ? minMaxClamp(result.range) : undefined\n                };\n              }\n\n              return result;\n            }, {}),\n            filter((x) => !x.lastDateRange || x.range != null),\n            map((x) => x.range ?? null)\n          );\n        }\n\n        return modeResult;\n      })\n    );\n\n    return result;\n  }\n\n  readonly fullBoundary$: Observable<Maybe<DateRange>> = this.dateRangeSelectionForMode('single').pipe(shareReplay(1));\n\n  readonly latestBoundary$: Observable<Maybe<DateRange>> = this.selectionMode$.pipe(switchMap((mode) => (mode === 'arbitrary_quick' ? this.valueInSystemTimezone$ : this.fullBoundary$)));\n\n  readonly calendarFocusDate$: Observable<Date> = this._selectionEvent.pipe(startWith(null)).pipe(\n    switchMap((selectionEvent) => {\n      return selectionEvent?.type === 'calendar' && selectionEvent.range?.start\n        ? of(selectionEvent.range.start)\n        : this.fullBoundary$.pipe(\n            first(),\n            map((fullBoundary) => fullBoundary?.start ?? selectionEvent?.range?.start)\n          );\n    }),\n    filterMaybe(),\n    shareReplay(1)\n  );\n\n  readonly dateRangeSelection$: Observable<Maybe<DateRange>> = this.selectionMode$.pipe(switchMap((mode) => this.dateRangeSelectionForMode(mode)));\n\n  readonly calendarSelection$: Observable<Maybe<DatePickerDateRange<Date>>> = this.valueInSystemTimezone$.pipe(\n    map((x) => (x ? new DatePickerDateRange<Date>(x.start, x.end) : null)),\n    shareReplay(1)\n  );\n\n  readonly endDisabled$ = this.selectionMode$.pipe(\n    map((x) => x === 'single'),\n    distinctUntilChanged(),\n    shareReplay(1)\n  );\n\n  // MARK: Template signals\n  readonly minDateSignal = toSignal(this.min$, { initialValue: null });\n  readonly maxDateSignal = toSignal(this.max$, { initialValue: null });\n  readonly endDisabledSignal = toSignal(this.endDisabled$);\n  readonly latestBoundarySignal = toSignal(this.latestBoundary$);\n  readonly calendarSelectionSignal = toSignal(this.calendarSelection$, { initialValue: null });\n  readonly pickerFilterSignal = toSignal(this.pickerFilter$, { initialValue: this.defaultPickerFilter });\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'mat-calendar' });\n\n    // MARK: Effect — subscribe to async props\n    effect(() => {\n      const p = this.props();\n\n      untracked(() => {\n        // Picker config (provide default so pipeline can proceed without config)\n        this._config.next(p?.pickerConfig ? asObservableFromGetter(p.pickerConfig) : of({}));\n\n        // Date range input\n        if (p?.dateRangeInput) {\n          this._dateRangeInput.next(asObservableFromGetter(p.dateRangeInput));\n        }\n\n        // Selection mode\n        if (p?.selectionMode) {\n          this._selectionMode.next(asObservableFromGetter(p.selectionMode));\n        }\n\n        // Timezone\n        if (p?.timezone && !p?.fullDayInUTC) {\n          this._timezone.next(asObservableFromGetter(p.timezone));\n        }\n      });\n    });\n\n    // MARK: Subscriptions — observable pipeline wiring\n    const dateRangeSelection = this.dateRangeSelection$.pipe(shareReplay(1));\n\n    const setInputFormValue = (value: Maybe<DateRange>) => {\n      if (!isSameDateDayRange(value, this.inputRangeForm.value as Partial<DateRange>)) {\n        this.inputRangeForm.setValue({\n          start: value?.start ?? null,\n          end: value?.end ?? null\n        });\n      }\n    };\n\n    // Main output subscription: dateRangeSelection → output value → field tree\n    // Uses withLatestFrom so only new user selections drive output writes.\n    // The old switchMap pattern re-subscribed to dateRangeSelection (which has shareReplay(1))\n    // whenever the field value changed externally, causing the cached user selection to replay\n    // and overwrite the external value.\n    this._sub.subscription = dateRangeSelection\n      .pipe(skipAllInitialMaybe(), withLatestFrom(this.valueInSystemTimezone$, this.timezoneInstance$.pipe(map((timezoneInstance) => fixedDateRangeOutputValueFactory(this.valueModeSignal(), timezoneInstance)))), throttleTime(TIME_OUTPUT_THROTTLE_TIME, undefined, { leading: false, trailing: true }))\n      .subscribe(([rawValue, currentValue, valueFactory]) => {\n        const value = rawValue ? valueFactory(rawValue) : null;\n        const isSameRange = dbxDateRangeIsSameDateRangeFieldValue(value, currentValue);\n\n        if (!isSameRange) {\n          this._setFieldValue(value);\n        } else if (rawValue != null) {\n          setInputFormValue(rawValue);\n        }\n      });\n\n    // Sync selection mode to signal\n    this._currentSelectionModeSub.subscription = this.selectionMode$.subscribe((x) => this.currentSelectionModeSignal.set(x));\n\n    // Sync dateRangeInput to signal\n    this._dateRangeInputSub.subscription = this.dateRangeInput$.subscribe((x) => this.currentDateRangeInputSignal.set(x));\n\n    // Sync inbound value to text input form\n    this._inputRangeFormSub.subscription = this.valueInSystemTimezone$.subscribe((x: Maybe<DateRange>) => {\n      setInputFormValue(x);\n    });\n\n    // End-disabled subscription\n    this._disableEndSub.subscription = this.endDisabled$.subscribe((disabled) => {\n      const end = this.inputRangeForm.get('end');\n\n      if (end) {\n        if (disabled) {\n          end.disable();\n        } else {\n          end.enable();\n        }\n      }\n    });\n\n    // Calendar focus management\n    this._activeDateSub.subscription = this.calendarFocusDate$.subscribe((x) => {\n      const cal = this.calendar();\n      if (cal) {\n        cal.activeDate = x;\n      }\n    });\n\n    // MARK: Effect — disabled state propagation\n    effect(() => {\n      const disabled = this.isDisabled();\n      untracked(() => {\n        if (disabled) {\n          this.inputRangeForm.disable();\n        } else {\n          this.inputRangeForm.enable();\n\n          // Re-apply end-disabled state after re-enabling\n          this.endDisabled$.pipe(first()).subscribe((endDisabled) => {\n            const end = this.inputRangeForm.get('end');\n            if (end && endDisabled) {\n              end.disable();\n            }\n          });\n        }\n      });\n    });\n\n    // MARK: Text input subscription (outbound: text inputs → selection)\n    effect(() => {\n      const showRange = this.showRangeInputSignal();\n\n      untracked(() => {\n        this._inputRangeFormValueSub.destroy();\n\n        if (showRange) {\n          this._inputRangeFormValueSub.subscription = this.valueInSystemTimezone$\n            .pipe(\n              throttleTime(100),\n              switchMap(() => {\n                return this.inputRangeForm.valueChanges.pipe(\n                  debounceTime(500),\n                  filter(() => {\n                    const startString = this.startDateInputElement()?.nativeElement?.value;\n                    let valid = isMonthDaySlashDate(startString);\n\n                    if (valid && this.currentSelectionModeSignal() !== 'single') {\n                      const endString = this.endDateInputElement()?.nativeElement?.value;\n                      valid = isMonthDaySlashDate(endString);\n                    }\n\n                    return valid;\n                  }),\n                  map((x) => x as Maybe<Partial<DateRange>>)\n                );\n              }),\n              distinctUntilChanged(isSameDateRange)\n            )\n            .subscribe((x: Maybe<Partial<DateRange>>) => {\n              const currentSelectionMode = this.currentSelectionModeSignal();\n\n              if (currentSelectionMode === 'single') {\n                this.setDateRange(x?.start ? { start: x.start } : null, 'input');\n              } else {\n                let rangeToSet: Maybe<Partial<DateRange>> = x;\n\n                const latestBoundary = this.latestBoundarySignal();\n\n                if (currentSelectionMode === 'arbitrary_quick' && latestBoundary && x?.start && x?.end && !isDateInDateRange(x.start, latestBoundary)) {\n                  const boundary = dateRange({ ...this.currentDateRangeInputSignal(), date: x.start } as DateRangeInput);\n                  rangeToSet = { start: x.start, end: boundary.end };\n                }\n\n                this.setDateRange(rangeToSet, 'input');\n              }\n            });\n        }\n      });\n    });\n\n    // MARK: Cleanup\n    this.destroyRef.onDestroy(() => {\n      this._sub.destroy();\n      this._inputRangeFormSub.destroy();\n      this._inputRangeFormValueSub.destroy();\n      this._dateRangeInputSub.destroy();\n      this._currentSelectionModeSub.destroy();\n      this._disableEndSub.destroy();\n      this._activeDateSub.destroy();\n      this._config.complete();\n      this._selectionMode.complete();\n      this._dateRangeInput.complete();\n      this._timezone.complete();\n      this._selectionEvent.complete();\n    });\n  }\n\n  // MARK: Public methods\n  selectedChange(date: Maybe<Date>): void {\n    this.setDateRange(date ? { start: date } : null, 'calendar');\n  }\n\n  setDateRange(range: Maybe<Partial<DateRange>>, type: SelectedDateEventType) {\n    this._selectionEvent.next({ type, range });\n  }\n\n  _createDateRange(date: Maybe<Date>): Maybe<DateRange> {\n    return date ? dateRange({ ...this.currentDateRangeInputSignal(), date } as DateRangeInput) : undefined;\n  }\n\n  // MARK: Private helpers\n  private _setFieldValue(value: Maybe<DateRangeWithDateOrStringValue>): void {\n    try {\n      const fieldTree = this.field();\n      const fieldState = fieldTree() as any;\n      // Never write `undefined`: Signal Forms orphans a field whose value becomes undefined, which\n      // throws NG01902 (Orphan field) / NG01901 (Cannot resolve path) on the next computed read.\n      // Use `null` for \"no value\" so the field stays attached to its parent structure.\n      fieldState.value.set(value ?? null);\n      fieldState.markAsTouched();\n      fieldState.markAsDirty();\n    } catch {\n      // Field may not be ready\n    }\n  }\n}\n\n// MARK: Selection Strategy\n/**\n * Custom Material date range selection strategy for the forge fixed date range field.\n *\n * Provides preview highlighting on the calendar based on the current selection mode\n * and boundary constraints.\n */\n@Injectable()\nexport class DbxForgeFixedDateRangeFieldSelectionStrategy<D> implements MatDateRangeSelectionStrategy<D> {\n  private readonly _dateAdapter = inject(DateAdapter<D>);\n  readonly component = inject(DbxForgeFixedDateRangeFieldComponent);\n\n  selectionFinished(date: Maybe<D>, currentRange: DatePickerDateRange<D>, _event: Event): DatePickerDateRange<D> {\n    return currentRange;\n  }\n\n  createPreview(activeDate: Maybe<D>, _currentRange: DatePickerDateRange<D>, _event: Event): DatePickerDateRange<D> {\n    const { currentSelectionModeSignal, latestBoundarySignal } = this.component;\n    const currentSelectionMode = currentSelectionModeSignal();\n    let result: DatePickerDateRange<D> | undefined;\n\n    if (activeDate != null && currentSelectionMode !== 'single') {\n      const latestBoundary = latestBoundarySignal();\n      const date = this.dateFromAdapterDate(activeDate);\n\n      if (latestBoundary && (currentSelectionMode === 'normal' || isDateInDateRange(date, latestBoundary))) {\n        result = this._createDateRange(latestBoundary);\n      }\n    }\n\n    return result ?? this._createDateRangeWithDate(activeDate);\n  }\n\n  private _createDateRangeWithDate(input: Maybe<D>): DatePickerDateRange<D> {\n    let range: Maybe<DateRange>;\n\n    if (input) {\n      const date = this.dateFromAdapterDate(input);\n      range = this.component._createDateRange(date);\n    }\n\n    return this._createDateRange(range);\n  }\n\n  private _createDateRange(input: Maybe<DateRange>): DatePickerDateRange<D> {\n    return input ? new DatePickerDateRange<D>(this.adapterDateFromDate(input.start), this.adapterDateFromDate(input.end)) : new DatePickerDateRange<D>(null, null);\n  }\n\n  dateFromAdapterDate(input: D) {\n    const day: DayOfMonth = this._dateAdapter.getDate(input);\n    const monthIndex: DateMonth = this._dateAdapter.getMonth(input);\n    const year: YearNumber = this._dateAdapter.getYear(input);\n    return new Date(year, monthIndex, day);\n  }\n\n  adapterDateFromDate(date: Date): D {\n    const day: DayOfMonth = date.getDate();\n    const monthIndex: DateMonth = date.getMonth();\n    const year: YearNumber = date.getFullYear();\n\n    return this._dateAdapter.createDate(year, monthIndex, day);\n  }\n}\n\n// MARK: Mapper\n/**\n * Custom mapper for the fixeddaterange field type.\n *\n * Uses the standard valueFieldMapper pattern from ng-forge/integration.\n *\n * @param fieldDef - Field definition configuration.\n * @param fieldDef.key - Form model key for the field.\n * @returns Signal containing a Record of input names to values for ngComponentOutlet.\n */\nexport function fixedDateRangeFieldMapper(fieldDef: { key: string }): Signal<Record<string, unknown>> {\n  const ctx = resolveValueFieldContext();\n  const defaultProps = inject(DEFAULT_PROPS);\n  const defaultValidationMessages = inject(DEFAULT_VALIDATION_MESSAGES);\n\n  return computed(() => {\n    const inputs = buildValueFieldInputs(fieldDef as any, ctx, defaultProps?.());\n    const dvm = defaultValidationMessages?.();\n    if (dvm !== undefined) {\n      inputs['defaultValidationMessages'] = dvm;\n    }\n    return inputs;\n  });\n}\n","<div class=\"dbx-fixeddaterange-field\">\n  <mat-calendar #calendarView [selected]=\"calendarSelectionSignal()\" [dateFilter]=\"pickerFilterSignal()\" [minDate]=\"minDateSignal()\" [maxDate]=\"maxDateSignal()\" (selectedChange)=\"selectedChange($event)\" [attr.aria-invalid]=\"ariaInvalidSignal()\" [attr.aria-describedby]=\"ariaDescribedBySignal()\"></mat-calendar>\n  <mat-form-field class=\"dbx-fixeddaterange-field-input\" appearance=\"fill\">\n    @if (showRangeInputSignal()) {\n      <mat-date-range-input [formGroup]=\"inputRangeForm\">\n        <input #startDateInput matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n        <input #endDateInput [ngClass]=\"endDisabledSignal() ? 'dbx-fixeddaterange-field-input-end' : ''\" [attr.tabindex]=\"endDisabledSignal() ? -1 : 0\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n      </mat-date-range-input>\n    }\n  </mat-form-field>\n  @if (errorsToDisplaySignal()[0]; as error) {\n    <mat-error [id]=\"errorIdSignal()\">{{ error.message }}</mat-error>\n  } @else if (props()?.hint; as hint) {\n    <mat-hint [id]=\"hintIdSignal()\">{{ hint }}</mat-hint>\n  }\n</div>\n","import type { BaseValueField } from '@ng-forge/dynamic-forms';\nimport { type TimeUnit, filterFromPOJO } from '@dereekb/util';\nimport type { TimeDurationFieldValueMode } from '../../../../field/value/duration/duration.config';\nimport type { DbxForgeTimeDurationFieldComponentProps } from './duration.field.component';\nimport { dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../../field';\n\n/**\n * The custom forge field type name for the time duration field.\n */\nexport const FORGE_TIMEDURATION_FIELD_TYPE = 'timeduration' as const;\n\n/**\n * Field definition type for a forge time duration field.\n */\nexport type DbxForgeTimeDurationFieldDef = BaseValueField<DbxForgeTimeDurationFieldComponentProps, unknown> & {\n  readonly type: typeof FORGE_TIMEDURATION_FIELD_TYPE;\n};\n\n// MARK: TimeDuration Field\n/**\n * Configuration for a forge time duration input field.\n */\nexport interface DbxForgeTimeDurationFieldConfig extends DbxForgeFieldFunctionDef<DbxForgeTimeDurationFieldDef> {\n  /**\n   * The unit of the output value.\n   *\n   * Defaults to `'ms'` (milliseconds).\n   */\n  readonly outputUnit?: TimeUnit;\n  /**\n   * The output value mode.\n   *\n   * Defaults to `'number'`.\n   */\n  readonly valueMode?: TimeDurationFieldValueMode;\n  /**\n   * The time units available for the field.\n   */\n  readonly allowedUnits?: TimeUnit[];\n  /**\n   * Which units to show in the popover picker.\n   *\n   * Defaults to allowedUnits filtered to exclude 'ms'.\n   */\n  readonly pickerUnits?: TimeUnit[];\n  /**\n   * Whether the popover picker should carry over values to the next larger unit.\n   */\n  readonly carryOver?: boolean;\n}\n\n/**\n * Duration input with popover picker. Output shape varies by `valueMode` — number (ms/s/…), string, or structured object.\n *\n * Uses a custom ng-forge ValueFieldComponent that provides a text input\n * accepting duration strings (e.g. \"2h30m\") and a popover picker.\n *\n * @param config - Time duration field configuration\n * @returns A {@link DbxForgeTimeDurationFieldDef}\n *\n * @dbxFormField\n * @dbxFormSlug time-duration\n * @dbxFormTier field-factory\n * @dbxFormProduces TimeDurationValue\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType timeduration\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeTimeDurationFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeTimeDurationField({ key: 'duration', label: 'Duration', outputUnit: 'm' })\n * ```\n */\nexport const dbxForgeTimeDurationField = dbxForgeFieldFunction<DbxForgeTimeDurationFieldConfig>({\n  type: FORGE_TIMEDURATION_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder((config) =>\n    filterFromPOJO({\n      outputUnit: config.outputUnit,\n      valueMode: config.valueMode,\n      allowedUnits: config.allowedUnits,\n      pickerUnits: config.pickerUnits,\n      min: config.min,\n      max: config.max,\n      carryOver: config.carryOver\n    })\n  )\n});\n","import { Component, type ElementRef, signal } from '@angular/core';\nimport { type Milliseconds, type TimeUnit, TIME_UNIT_SHORT_LABEL_MAP, timeUnitToMilliseconds } from '@dereekb/util';\nimport { type TimeDurationData, durationDataToMilliseconds, getDurationDataValue, millisecondsToDurationData, setDurationDataValue } from '@dereekb/date';\nimport { AbstractPopoverDirective, type DbxPopoverService } from '@dereekb/dbx-web';\nimport { type NgPopoverRef } from 'ng-overlay-container';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\n\n/**\n * Default popover key for the duration picker.\n */\nexport const DEFAULT_DURATION_PICKER_POPOVER_KEY = 'durationpicker';\n\n/**\n * Callback invoked on every +/- click in the duration picker.\n */\nexport type DbxDurationPickerChangeCallback = (data: TimeDurationData) => void;\n\n/**\n * Data passed to the duration picker popover.\n */\nexport interface DbxDurationPickerPopoverData {\n  /**\n   * The current duration values.\n   */\n  readonly current: TimeDurationData;\n  /**\n   * Which time unit columns to show.\n   */\n  readonly units: TimeUnit[];\n  /**\n   * Optional callback invoked on every +/- change for live updates.\n   */\n  readonly onChange?: DbxDurationPickerChangeCallback;\n  /**\n   * Minimum total value in milliseconds. Used to disable decrement buttons.\n   */\n  readonly minMs?: Milliseconds;\n  /**\n   * Maximum total value in milliseconds. Used to disable increment buttons.\n   */\n  readonly maxMs?: Milliseconds;\n  /**\n   * Whether values should carry over to the next larger unit when they overflow\n   * (e.g., 60 seconds → 1 minute). Only carries into units present in `units`.\n   *\n   * Defaults to false.\n   */\n  readonly carryOver?: boolean;\n}\n\n/**\n * Popover component that displays a horizontal duration picker with +/- buttons for each time unit.\n *\n * Each column shows the unit label, an increment button, the current value, and a decrement button.\n * Buttons are disabled when incrementing/decrementing would exceed min/max constraints.\n * Changes are applied immediately via the onChange callback and returned when the popover closes.\n *\n * @example\n * ```typescript\n * DbxDurationPickerPopoverComponent.openPopover(popoverService, {\n *   origin: elementRef,\n *   data: { current: { hours: 1, minutes: 30 }, units: ['h', 'min', 's'] }\n * });\n * ```\n */\n@Component({\n  templateUrl: 'duration.picker.popover.component.html',\n  imports: [MatIconModule, MatButtonModule]\n})\nexport class DbxDurationPickerPopoverComponent extends AbstractPopoverDirective<TimeDurationData, DbxDurationPickerPopoverData> {\n  readonly durationData = signal<TimeDurationData>(this.popover.data?.current ?? {});\n  readonly units: TimeUnit[] = [...(this.popover.data?.units ?? ['d', 'h', 'min', 's'])].reverse();\n\n  private readonly _onChange = this.popover.data?.onChange;\n  private readonly _minMs = this.popover.data?.minMs;\n  private readonly _maxMs = this.popover.data?.maxMs;\n  private readonly _carryOver = this.popover.data?.carryOver ?? false;\n\n  constructor() {\n    super();\n    this.popover.getClosingValueFn = () => this.durationData();\n  }\n\n  /**\n   * Opens the duration picker popover.\n   *\n   * @param popoverService - The popover service to use.\n   * @param config - Configuration with origin element and picker data.\n   * @param config.origin - The element to anchor the popover to.\n   * @param config.data - The picker data including current values and which units to show.\n   * @returns A reference to the opened popover.\n   */\n  static openPopover(popoverService: DbxPopoverService, config: { origin: ElementRef; data: DbxDurationPickerPopoverData }): NgPopoverRef {\n    return popoverService.open({\n      key: DEFAULT_DURATION_PICKER_POPOVER_KEY,\n      origin: config.origin,\n      componentClass: DbxDurationPickerPopoverComponent,\n      data: config.data,\n      width: `${Math.max(200, config.data.units.length * 64 + 32)}px`,\n      height: '260px'\n    });\n  }\n\n  /**\n   * Gets the short label for a time unit.\n   *\n   * @param unit - The time unit.\n   * @returns The short label string.\n   */\n  unitLabel(unit: TimeUnit): string {\n    return TIME_UNIT_SHORT_LABEL_MAP[unit];\n  }\n\n  /**\n   * Gets the current value for a specific time unit.\n   *\n   * @param unit - The time unit to read.\n   * @returns The current value for that unit.\n   */\n  getValue(unit: TimeUnit): number {\n    return getDurationDataValue(this.durationData(), unit);\n  }\n\n  /**\n   * Returns true if incrementing the given unit by 1 would not exceed the maximum.\n   *\n   * @param unit - The time unit to check.\n   * @returns Whether incrementing is allowed.\n   */\n  canIncrement(unit: TimeUnit): boolean {\n    if (this._maxMs == null) {\n      return true;\n    }\n\n    const currentMs = durationDataToMilliseconds(this.durationData());\n    const incrementMs = timeUnitToMilliseconds(1, unit);\n    return currentMs + incrementMs <= this._maxMs;\n  }\n\n  /**\n   * Returns true if decrementing the given unit by 1 would not go below the minimum (or below 0).\n   *\n   * @param unit - The time unit to check.\n   * @returns Whether decrementing is allowed.\n   */\n  canDecrement(unit: TimeUnit): boolean {\n    if (this._carryOver) {\n      // With carryOver, allow decrement as long as total ms after decrement >= minMs (or 0)\n      const currentMs = durationDataToMilliseconds(this.durationData());\n      const decrementMs = timeUnitToMilliseconds(1, unit);\n      const minMs = this._minMs ?? 0;\n      return currentMs - decrementMs >= minMs;\n    }\n\n    const current = getDurationDataValue(this.durationData(), unit);\n\n    if (current <= 0) {\n      return false;\n    }\n\n    if (this._minMs == null) {\n      return true;\n    }\n\n    const currentMs = durationDataToMilliseconds(this.durationData());\n    const decrementMs = timeUnitToMilliseconds(1, unit);\n    return currentMs - decrementMs >= this._minMs;\n  }\n\n  /**\n   * Increments the value for a specific time unit.\n   * Holding shift doubles the step.\n   *\n   * @param unit - The time unit to increment.\n   * @param step - The amount to increment by (defaults to 1)\n   */\n  increment(unit: TimeUnit, step = 1): void {\n    const current = getDurationDataValue(this.durationData(), unit);\n    const updated = this._normalizeIfCarryOver(setDurationDataValue(this.durationData(), unit, current + step));\n    this.durationData.set(updated);\n    this._onChange?.(updated);\n  }\n\n  /**\n   * Decrements the value for a specific time unit.\n   * Holding shift doubles the step.\n   *\n   * @param unit - The time unit to decrement.\n   * @param step - The amount to decrement by (defaults to 1)\n   */\n  decrement(unit: TimeUnit, step = 1): void {\n    const current = getDurationDataValue(this.durationData(), unit);\n    const newValue = this._carryOver ? current - step : Math.max(0, current - step);\n    const updated = this._normalizeIfCarryOver(setDurationDataValue(this.durationData(), unit, newValue));\n    this.durationData.set(updated);\n    this._onChange?.(updated);\n  }\n\n  /**\n   * Returns the step size — 2 if shift is held, 1 otherwise.\n   *\n   * @param event - The mouse or keyboard event.\n   * @returns The step multiplier.\n   */\n  stepFromEvent(event?: Event): number {\n    if (event && 'shiftKey' in event) {\n      return (event as MouseEvent | KeyboardEvent).shiftKey ? 2 : 1;\n    }\n\n    return 1;\n  }\n\n  /**\n   * When carryOver is enabled, normalizes the data by converting to total milliseconds\n   * and decomposing back into the picker's units (e.g., 60s becomes 1m, 7d becomes 1w).\n   *\n   * @param data - The duration data to normalize.\n   * @returns Normalized or original data.\n   */\n  private _normalizeIfCarryOver(data: TimeDurationData): TimeDurationData {\n    if (!this._carryOver) {\n      return data;\n    }\n\n    const ms = durationDataToMilliseconds(data);\n    return millisecondsToDurationData(Math.max(0, ms), this.units);\n  }\n\n  // MARK: Hold-to-repeat\n  private _holdInterval: ReturnType<typeof setInterval> | undefined;\n  private _holdTimeout: ReturnType<typeof setTimeout> | undefined;\n  private _holdActive = false;\n  private _shiftHeld = false;\n\n  /**\n   * Fires one action immediately and starts hold-to-repeat.\n   * Used by both mousedown and keydown.\n   *\n   * @param action - The action to perform.\n   * @param unit - The time unit.\n   * @param event - The triggering event (for shift detection)\n   */\n  onHoldStart(action: 'increment' | 'decrement', unit: TimeUnit, event: Event): void {\n    // Only preventDefault for keyboard events (prevents page scroll).\n    // Don't preventDefault on mousedown — it blocks focus transfer to the button.\n    if (event instanceof KeyboardEvent) {\n      event.preventDefault();\n      this._shiftHeld = event.shiftKey;\n    } else if (event instanceof MouseEvent) {\n      this._shiftHeld = event.shiftKey;\n    }\n\n    if (this._holdActive) {\n      return;\n    }\n\n    this._doAction(action, unit, this._currentStep);\n\n    this._holdActive = true;\n    this._holdTimeout = setTimeout(() => {\n      this._holdInterval = setInterval(() => {\n        if (!this._doAction(action, unit, this._currentStep)) {\n          this.stopHold();\n        }\n      }, 80);\n    }, 300);\n  }\n\n  /**\n   * Returns the current step based on whether shift is held.\n   *\n   * @returns Two when shift is held for larger increments, one otherwise.\n   */\n  private get _currentStep(): number {\n    return this._shiftHeld ? 2 : 1;\n  }\n\n  /**\n   * Stops the hold-to-repeat interval.\n   */\n  /**\n   * Handles keyup events. Only stops the hold when an arrow key is released.\n   * Releasing modifier keys (shift, ctrl, etc.) does not stop the hold.\n   *\n   * @param event - The keyboard event.\n   */\n  onKeyUp(event: KeyboardEvent): void {\n    this._shiftHeld = event.shiftKey;\n\n    if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n      this.stopHold();\n    }\n  }\n\n  stopHold(): void {\n    this._holdActive = false;\n\n    if (this._holdTimeout) {\n      clearTimeout(this._holdTimeout);\n      this._holdTimeout = undefined;\n    }\n\n    if (this._holdInterval) {\n      clearInterval(this._holdInterval);\n      this._holdInterval = undefined;\n    }\n  }\n\n  /**\n   * Executes an increment or decrement action if allowed.\n   *\n   * @param action - Whether to increment or decrement the value.\n   * @param unit - The time unit to adjust (e.g. 'h', 'm', 's')\n   * @param step - The step multiplier for the action.\n   * @returns True if the action was performed.\n   */\n  private _doAction(action: 'increment' | 'decrement', unit: TimeUnit, step: number): boolean {\n    if (action === 'increment' && this.canIncrement(unit)) {\n      this.increment(unit, step);\n      return true;\n    }\n\n    if (action === 'decrement' && this.canDecrement(unit)) {\n      this.decrement(unit, step);\n      return true;\n    }\n\n    return false;\n  }\n}\n","<div class=\"dbx-duration-picker\">\n  @for (unit of units; track unit) {\n    <div class=\"dbx-duration-picker-column\">\n      <span class=\"dbx-duration-picker-label\">{{ unitLabel(unit) }}</span>\n      <button\n        mat-icon-button\n        type=\"button\"\n        (mousedown)=\"onHoldStart('increment', unit, $event)\"\n        (mouseup)=\"stopHold()\"\n        (mouseleave)=\"stopHold()\"\n        (keydown.arrowup)=\"onHoldStart('increment', unit, $event)\"\n        (keydown.arrowdown)=\"onHoldStart('decrement', unit, $event)\"\n        (keyup)=\"onKeyUp($event)\"\n        [disabled]=\"!canIncrement(unit)\"\n        aria-label=\"Increase\">\n        <mat-icon>add</mat-icon>\n      </button>\n      <span class=\"dbx-duration-picker-value\">{{ getValue(unit) }}</span>\n      <button\n        mat-icon-button\n        type=\"button\"\n        (mousedown)=\"onHoldStart('decrement', unit, $event)\"\n        (mouseup)=\"stopHold()\"\n        (mouseleave)=\"stopHold()\"\n        (keydown.arrowup)=\"onHoldStart('increment', unit, $event)\"\n        (keydown.arrowdown)=\"onHoldStart('decrement', unit, $event)\"\n        (keyup)=\"onKeyUp($event)\"\n        [disabled]=\"!canDecrement(unit)\"\n        aria-label=\"Decrease\">\n        <mat-icon>remove</mat-icon>\n      </button>\n    </div>\n  }\n</div>\n","import { Component, input, computed, effect, type Signal, type InputSignal, inject, viewChild, ElementRef } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { AsyncPipe } from '@angular/common';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe, DEFAULT_PROPS, DEFAULT_VALIDATION_MESSAGES, resolveValueFieldContext, buildValueFieldInputs, createResolvedErrorsSignal, shouldShowErrors, setupMetaTracking } from '@ng-forge/dynamic-forms/integration';\nimport { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material';\nimport type { FieldTree } from '@angular/forms/signals';\nimport { type TimeUnit, type HoursAndMinutes, ALL_TIME_UNITS, hoursAndMinutesToTimeUnit, millisecondsToTimeUnit, minutesToHoursAndMinutes, timeUnitToMilliseconds } from '@dereekb/util';\nimport { type TimeDurationData, durationDataToMilliseconds, formatDurationString, millisecondsToDurationData, parseDurationString } from '@dereekb/date';\nimport { DbxPopoverService } from '@dereekb/dbx-web';\nimport { DbxDurationPickerPopoverComponent } from '../../../../field/value/duration/duration.picker.popover.component';\nimport type { TimeDurationFieldValueMode } from '../../../../field/value/duration/duration.config';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport { toggleDisableFormControl } from '../../../../form/form';\n\n/**\n * Custom props for the forge time duration field.\n */\nexport interface DbxForgeTimeDurationFieldComponentProps {\n  /**\n   * The unit of the output value.\n   *\n   * Defaults to `'ms'`.\n   */\n  readonly outputUnit?: TimeUnit;\n  /**\n   * Output value mode.\n   *\n   * Defaults to `'number'`.\n   */\n  readonly valueMode?: TimeDurationFieldValueMode;\n  /**\n   * The time units available for the field.\n   * Controls which units the parser recognizes and default popover columns.\n   *\n   * Defaults to all time units.\n   */\n  readonly allowedUnits?: TimeUnit[];\n  /**\n   * Which units to show in the popover picker.\n   *\n   * Defaults to allowedUnits filtered to exclude 'ms'.\n   */\n  readonly pickerUnits?: TimeUnit[];\n  /**\n   * Minimum output value (in the output unit).\n   */\n  readonly min?: number;\n  /**\n   * Maximum output value (in the output unit).\n   */\n  readonly max?: number;\n  /**\n   * Whether the popover picker carries over values to the next larger unit.\n   */\n  readonly carryOver?: boolean;\n  /**\n   * Material form field appearance.\n   */\n  readonly appearance?: 'fill' | 'outline';\n  /**\n   * Hint text displayed below the field.\n   */\n  readonly hint?: DynamicText;\n}\n\n/**\n * Custom ng-forge field component for time duration input with text parsing and a popover picker.\n *\n * The text input accepts duration strings like \"3d10h5m8s\", \"2 hours 30 minutes\", etc.\n * A picker button opens a popover with +/- columns for each time unit.\n *\n * This component bridges a FormControl-based duration input with ng-forge Signal Forms.\n *\n * Registered as ng-forge type 'timeduration'.\n */\n@Component({\n  selector: 'dbx-forge-timeduration-field',\n  imports: [MatFormFieldModule, MatInputModule, MatButtonModule, MatIconModule, FormsModule, ReactiveFormsModule, DynamicTextPipe, AsyncPipe],\n  templateUrl: './duration.field.component.html'\n})\nexport class DbxForgeTimeDurationFieldComponent {\n  private readonly materialConfig = inject(MATERIAL_CONFIG, { optional: true });\n  private readonly popoverService = inject(DbxPopoverService);\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  // Standard ng-forge value field inputs\n  readonly field: InputSignal<FieldTree<unknown>> = input.required<FieldTree<unknown>>();\n  readonly key: InputSignal<string> = input.required<string>();\n  readonly label: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly placeholder: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly className: InputSignal<string> = input('');\n  readonly tabIndex: InputSignal<number | undefined> = input<number | undefined>();\n  readonly props: InputSignal<DbxForgeTimeDurationFieldComponentProps | undefined> = input<DbxForgeTimeDurationFieldComponentProps | undefined>();\n  readonly meta: InputSignal<FieldMeta | undefined> = input<FieldMeta | undefined>();\n  readonly validationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n\n  /**\n   * Internal FormControl for the text input.\n   */\n  readonly textCtrl = new FormControl<string>('');\n\n  readonly pickerButtonElement = viewChild<string, ElementRef>('pickerButton', { read: ElementRef });\n\n  /**\n   * Tracks the last parsed duration data for the picker popover.\n   */\n  private _currentDurationData: TimeDurationData = {};\n\n  // Computed props\n  readonly effectiveAppearanceSignal = computed(() => this.props()?.appearance ?? this.materialConfig?.appearance ?? 'outline');\n\n  readonly outputUnitSignal: Signal<TimeUnit> = computed(() => this.props()?.outputUnit ?? 'ms');\n  readonly valueModeSignal: Signal<TimeDurationFieldValueMode> = computed(() => this.props()?.valueMode ?? 'number');\n  readonly allowedUnitsSignal: Signal<TimeUnit[]> = computed(() => this.props()?.allowedUnits ?? (ALL_TIME_UNITS as unknown as TimeUnit[]));\n  readonly pickerUnitsSignal: Signal<TimeUnit[]> = computed(() => {\n    const allowedUnits = this.allowedUnitsSignal();\n    return this.props()?.pickerUnits ?? allowedUnits.filter((u) => u !== 'ms');\n  });\n\n  /**\n   * Units used for decomposing/displaying duration text.\n   */\n  readonly displayUnitsSignal: Signal<TimeUnit[]> = computed(() => {\n    const units = [...this.pickerUnitsSignal()];\n\n    if (!units.includes('ms')) {\n      units.push('ms');\n    }\n\n    return units;\n  });\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as Signal<FieldTree<unknown>>, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as Signal<FieldTree<unknown>>);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaRequiredSignal = computed(() => (this.field()().required() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const hintId = this.hintIdSignal();\n    if (this.errorsToDisplaySignal().length > 0) return errorId;\n    if (this.props()?.hint) return hintId;\n    return null;\n  });\n\n  /**\n   * Flag to prevent feedback loops during sync.\n   */\n  private _syncing = false;\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'input' });\n\n    // Disabled state propagation\n    effect(() => {\n      const disabled = this.isDisabled();\n      toggleDisableFormControl(this.textCtrl, disabled);\n    });\n\n    // Sync Signal Forms field -> text control (inbound)\n    effect(() => {\n      const fieldTree = this.field();\n      const fieldState = fieldTree();\n      const signalValue: unknown = fieldState.value();\n\n      // Also read computed dependencies so the effect re-runs on config changes\n      const outputUnit = this.outputUnitSignal();\n      const valueMode = this.valueModeSignal();\n      const displayUnits = this.displayUnitsSignal();\n\n      if (!this._syncing) {\n        this._syncing = true;\n\n        if (signalValue == null) {\n          this._currentDurationData = {};\n          this.textCtrl.setValue('', { emitEvent: false });\n        } else {\n          const ms = this._outputValueToMilliseconds(signalValue, outputUnit, valueMode);\n          this._currentDurationData = millisecondsToDurationData(ms, displayUnits);\n          this.textCtrl.setValue(formatDurationString(this._currentDurationData), { emitEvent: false });\n        }\n\n        this._syncing = false;\n      }\n    });\n  }\n\n  /**\n   * Called when the text input loses focus. Parses the text and updates the output.\n   */\n  onTextBlur(): void {\n    this._parseAndSync();\n  }\n\n  /**\n   * Called when Enter is pressed in the text input.\n   *\n   * @param event - The keyboard event triggered by pressing Enter.\n   */\n  onTextEnter(event: Event): void {\n    event.preventDefault();\n    this._parseAndSync();\n  }\n\n  /**\n   * Opens the duration picker popover.\n   */\n  openPicker(): void {\n    const origin = this.pickerButtonElement();\n\n    if (!origin) {\n      return;\n    }\n\n    const existingMs = this._currentDurationData.milliseconds;\n    const outputUnit = this.outputUnitSignal();\n\n    const onPickerChange = (data: TimeDurationData) => {\n      // Preserve milliseconds from the existing data since the popover doesn't show them\n      const merged: TimeDurationData = existingMs ? { ...data, milliseconds: existingMs } : data;\n      this._currentDurationData = merged;\n      this.textCtrl.setValue(formatDurationString(merged), { emitEvent: false });\n      this._syncOutputFromDurationData(merged);\n    };\n\n    const propsValue = this.props();\n    const minMs = propsValue?.min == null ? undefined : timeUnitToMilliseconds(propsValue.min, outputUnit);\n    const maxMs = propsValue?.max == null ? undefined : timeUnitToMilliseconds(propsValue.max, outputUnit);\n\n    DbxDurationPickerPopoverComponent.openPopover(this.popoverService, {\n      origin,\n      data: {\n        current: this._currentDurationData,\n        units: this.pickerUnitsSignal(),\n        onChange: onPickerChange,\n        minMs,\n        maxMs,\n        carryOver: propsValue?.carryOver\n      }\n    });\n  }\n\n  /**\n   * Parses the current text input and syncs the output value.\n   */\n  private _parseAndSync(): void {\n    if (this._syncing) {\n      return;\n    }\n\n    const text = this.textCtrl.value?.trim();\n\n    if (!text) {\n      this._currentDurationData = {};\n      this._setFieldValue(null);\n      return;\n    }\n\n    const parsed = parseDurationString(text);\n    this._currentDurationData = parsed;\n\n    // Re-format the display text to normalize it\n    this.textCtrl.setValue(formatDurationString(parsed), { emitEvent: false });\n    this._syncOutputFromDurationData(parsed);\n  }\n\n  /**\n   * Converts duration data to the output value and sets it on the field.\n   *\n   * @param data - The parsed duration data containing time unit values.\n   */\n  private _syncOutputFromDurationData(data: TimeDurationData): void {\n    const ms = durationDataToMilliseconds(data);\n    const outputUnit = this.outputUnitSignal();\n    const valueMode = this.valueModeSignal();\n\n    let outputValue: unknown;\n\n    if (valueMode === 'duration_data') {\n      outputValue = data;\n    } else if (valueMode === 'hours_and_minutes') {\n      const totalMinutes = ms / 60000;\n      outputValue = minutesToHoursAndMinutes(Math.round(totalMinutes));\n    } else {\n      outputValue = millisecondsToTimeUnit(ms, outputUnit);\n    }\n\n    this._setFieldValue(outputValue);\n  }\n\n  /**\n   * Writes a value to the Signal Forms field tree.\n   *\n   * @param value - The value to set on the field, or undefined to clear it.\n   */\n  private _setFieldValue(value: unknown): void {\n    this._syncing = true;\n\n    const fieldTree = this.field();\n    const fieldState = fieldTree();\n    // Use null (not undefined) for \"no value\" — undefined orphans the Signal Forms field (NG01902/NG01901).\n    fieldState.value.set(value ?? null);\n    fieldState.markAsTouched();\n    fieldState.markAsDirty();\n\n    this._syncing = false;\n  }\n\n  /**\n   * Converts an output value (number, HoursAndMinutes, or TimeDurationData) to milliseconds.\n   *\n   * @param value - The output value to convert (number, HoursAndMinutes, or TimeDurationData depending on valueMode)\n   * @param outputUnit - The time unit of the numeric output value (used when valueMode is 'number')\n   * @param valueMode - The current value mode determining how to interpret the value.\n   * @returns The equivalent duration in milliseconds.\n   */\n  private _outputValueToMilliseconds(value: unknown, outputUnit: TimeUnit, valueMode: TimeDurationFieldValueMode): number {\n    let result: number;\n\n    if (valueMode === 'duration_data') {\n      result = durationDataToMilliseconds(value as TimeDurationData);\n    } else if (valueMode === 'hours_and_minutes') {\n      const hm = value as HoursAndMinutes;\n      result = hoursAndMinutesToTimeUnit(hm, 'ms');\n    } else {\n      result = timeUnitToMilliseconds(value as number, outputUnit);\n    }\n\n    return result;\n  }\n}\n\n// MARK: Mapper\n/**\n * Custom mapper for the timeduration field type.\n *\n * Uses the standard valueFieldMapper pattern from ng-forge/integration to resolve\n * the field tree and build the standard inputs for the component.\n *\n * @param fieldDef - The time duration field definition.\n * @param fieldDef.key - Form model key for the field.\n * @returns Signal containing Record of input names to values for ngComponentOutlet.\n */\nexport function timeDurationFieldMapper(fieldDef: { key: string }): Signal<Record<string, unknown>> {\n  const ctx = resolveValueFieldContext();\n  const defaultProps = inject(DEFAULT_PROPS);\n  const defaultValidationMessages = inject(DEFAULT_VALIDATION_MESSAGES);\n\n  return computed(() => {\n    const inputs = buildValueFieldInputs(fieldDef as any, ctx, defaultProps?.());\n    const dvm = defaultValidationMessages?.();\n    if (dvm !== undefined) {\n      inputs['defaultValidationMessages'] = dvm;\n    }\n    return inputs;\n  });\n}\n","<mat-form-field [appearance]=\"effectiveAppearanceSignal()\" subscriptSizing=\"dynamic\" class=\"dbx-forge-timeduration-field\">\n  @if (label()) {\n    <mat-label>{{ label() | dynamicText | async }}</mat-label>\n  }\n  <input matInput type=\"text\" [formControl]=\"textCtrl\" (blur)=\"onTextBlur()\" (keydown.enter)=\"onTextEnter($event)\" placeholder=\"e.g. 2h30m\" [attr.aria-invalid]=\"ariaInvalidSignal()\" [attr.aria-required]=\"ariaRequiredSignal()\" [attr.aria-describedby]=\"ariaDescribedBySignal()\" />\n  <button mat-icon-button matSuffix type=\"button\" #pickerButton (click)=\"openPicker()\" [disabled]=\"isDisabled()\" aria-label=\"Open duration picker\">\n    <mat-icon>schedule</mat-icon>\n  </button>\n  @if (errorsToDisplaySignal()[0]; as error) {\n    <mat-error [id]=\"errorIdSignal()\">{{ error.message }}</mat-error>\n  } @else if (props()?.hint; as hint) {\n    <mat-hint [id]=\"hintIdSignal()\">{{ hint | dynamicText | async }}</mat-hint>\n  }\n</mat-form-field>\n","import type { BaseValueField } from '@ng-forge/dynamic-forms';\nimport { filterFromPOJO } from '@dereekb/util';\nimport type { DbxForgePhoneFieldProps } from './phone.field.component';\nimport { dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../../field';\n\n// MARK: Phone Field\n/**\n * The custom forge field type name for the phone field.\n */\nexport const FORGE_PHONE_FIELD_TYPE = 'phone' as const;\n\n/**\n * Field definition type for a forge phone field.\n */\nexport type DbxForgePhoneFieldDef = BaseValueField<DbxForgePhoneFieldProps, string> & {\n  readonly type: typeof FORGE_PHONE_FIELD_TYPE;\n};\n\n/**\n * Configuration for a forge international phone number input field.\n */\n/**\n * Autocomplete values supported by the phone field.\n *\n * The underlying `ngx-mat-input-tel` component only supports `'off'` and `'tel'`.\n * Pass `false` to disable autocomplete (equivalent to `'off'`).\n */\nexport type DbxForgePhoneFieldAutocomplete = 'off' | 'tel' | false;\n\nexport interface DbxForgePhoneFieldConfig extends DbxForgeFieldFunctionDef<DbxForgePhoneFieldDef> {\n  /**\n   * Preferred countries to show at the top of the country selector.\n   */\n  readonly preferredCountries?: string[];\n  /**\n   * ISO country codes to restrict the dropdown to.\n   */\n  readonly onlyCountries?: string[];\n  /**\n   * Whether or not to enable the search feature. True by default.\n   */\n  readonly enableSearch?: boolean;\n  /**\n   * Whether or not to allow adding an extension. False by default.\n   */\n  readonly allowExtension?: boolean;\n  /**\n   * Sets the autocomplete attribute on the phone input.\n   *\n   * Pass `'tel'` to enable phone autofill, or `false`/`'off'` to disable.\n   */\n  readonly autocomplete?: DbxForgePhoneFieldAutocomplete;\n}\n\n/**\n * International phone number input backed by ngx-mat-input-tel. Supports preferred-country lists, search, and optional extension input.\n *\n * Uses the custom 'phone' field type which renders the ngx-mat-input-tel component\n * bridged to Signal Forms.\n *\n * @param config - Phone field configuration\n * @returns A forge field definition for the phone input\n *\n * @dbxFormField\n * @dbxFormSlug phone\n * @dbxFormTier field-factory\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType phone\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgePhoneFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgePhoneField({ key: 'phone', label: 'Phone', preferredCountries: ['US', 'CA'] })\n * ```\n */\nexport const dbxForgePhoneField = dbxForgeFieldFunction<DbxForgePhoneFieldConfig>({\n  type: FORGE_PHONE_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder((config) =>\n    filterFromPOJO({\n      preferredCountries: config.preferredCountries,\n      onlyCountries: config.onlyCountries,\n      enableSearch: config.enableSearch,\n      allowExtension: config.allowExtension,\n      autocomplete: config.autocomplete === false ? 'off' : config.autocomplete\n    })\n  )\n});\n","/* eslint-disable dereekb-util/prefer-maybe-type -- Angular's ValidatorFn returns exactly `ValidationErrors | null`; widening to `Maybe<...>` adds `undefined` and breaks the contract (TS2322). */\nimport { type AbstractControl, type ValidationErrors, type ValidatorFn } from '@angular/forms';\nimport { e164PhoneNumberExtensionPair, isE164PhoneNumber as isE164PhoneNumberFunction, isValidPhoneExtensionNumber } from '@dereekb/util';\n\n/**\n * Validation message shown when a value is not a valid phone number.\n */\nexport const INVALID_PHONE_NUMBER_MESSAGE = { name: 'validatePhoneNumber', message: 'This is not a valid phone number.' };\n\n/**\n * Validation message shown when a value is not a valid phone number extension.\n */\nexport const INVALID_PHONE_NUMBER_EXTENSION_MESSAGE = { name: 'validatePhoneNumberExtension', message: 'This is not a valid phone number extension.' };\n\n/**\n * Angular form validator that checks whether the control value is a valid E.164 phone number.\n *\n * @param allowExtension - Whether to allow phone number extensions in the value.\n * @returns A ValidatorFn that validates E.164 phone numbers.\n */\nexport function isE164PhoneNumber(allowExtension: boolean): ValidatorFn {\n  return (control: AbstractControl): ValidationErrors | null => {\n    const value: string | undefined = control.value;\n\n    if (value != null && !isE164PhoneNumberFunction(value, allowExtension)) {\n      return {\n        [INVALID_PHONE_NUMBER_MESSAGE.name]: true\n      };\n    }\n\n    return {};\n  };\n}\n\n/**\n * Angular Form ValidationFn for checking the input is a valid phone extension. Empty values return true.\n *\n * @returns A ValidatorFn that validates phone extension numbers.\n */\nexport function isPhoneExtension(): ValidatorFn {\n  return (control: AbstractControl): ValidationErrors | null => {\n    const value: string | number | undefined = control.value;\n\n    if (value != null) {\n      const asString = value.toString();\n\n      if (asString.length > 0 && !isValidPhoneExtensionNumber(asString)) {\n        return {\n          [INVALID_PHONE_NUMBER_EXTENSION_MESSAGE.name]: true\n        };\n      }\n    }\n\n    return {};\n  };\n}\n\n/**\n * Angular form validator that checks the value is a valid E.164 phone number with a valid extension (if present).\n *\n * @returns A ValidatorFn that validates E.164 phone numbers with optional extensions.\n */\nexport function isE164PhoneNumberWithValidExtension(): ValidatorFn {\n  return (control: AbstractControl): ValidationErrors | null => {\n    const value: string | undefined = control.value;\n    let errors: ValidationErrors = {};\n\n    if (value != null) {\n      if (isE164PhoneNumberFunction(value, true)) {\n        const pair = e164PhoneNumberExtensionPair(value);\n\n        if (pair.extension && !isValidPhoneExtensionNumber(pair.extension)) {\n          errors = {\n            [INVALID_PHONE_NUMBER_EXTENSION_MESSAGE.name]: true\n          };\n        }\n      } else {\n        errors = {\n          [INVALID_PHONE_NUMBER_MESSAGE.name]: true\n        };\n      }\n    }\n\n    return errors;\n  };\n}\n","import { Component, input, computed, effect, type Signal, type InputSignal, DestroyRef, inject, ElementRef } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { NgxMatInputTelComponent } from 'ngx-mat-input-tel';\nimport { MatInputModule } from '@angular/material/input';\nimport { AsyncPipe } from '@angular/common';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe, DEFAULT_PROPS, DEFAULT_VALIDATION_MESSAGES, resolveValueFieldContext, buildValueFieldInputs, createResolvedErrorsSignal, shouldShowErrors, setupMetaTracking } from '@ng-forge/dynamic-forms/integration';\nimport { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material';\nimport type { FieldTree } from '@angular/forms/signals';\nimport { type Maybe, e164PhoneNumberExtensionPair, e164PhoneNumberFromE164PhoneNumberExtensionPair, type E164PhoneNumber } from '@dereekb/util';\nimport { isPhoneExtension } from '../../../../validator/phone';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport { toggleDisableFormControl } from '../../../../form/form';\n\n/**\n * Custom props for the forge phone field.\n */\nexport interface DbxForgePhoneFieldProps {\n  /**\n   * ISO country codes for countries shown first in the dropdown.\n   */\n  readonly preferredCountries?: string[];\n  /**\n   * ISO country codes to restrict the dropdown to.\n   */\n  readonly onlyCountries?: string[];\n  /**\n   * Whether or not to enable the search feature. True by default.\n   */\n  readonly enableSearch?: boolean;\n  /**\n   * Whether or not to allow adding an extension. False by default.\n   */\n  readonly allowExtension?: boolean;\n  /**\n   * Material form field appearance.\n   */\n  readonly appearance?: 'fill' | 'outline';\n  /**\n   * Hint text displayed below the field.\n   */\n  readonly hint?: DynamicText;\n  /**\n   * Autocomplete value for the phone input. The underlying `ngx-mat-input-tel`\n   * component supports `'off'` and `'tel'`.\n   */\n  readonly autocomplete?: 'off' | 'tel';\n}\n\n/**\n * Default preferred countries shown at the top of the phone country dropdown.\n */\nexport const DEFAULT_FORGE_PREFERRED_COUNTRIES = ['us'];\n\n/**\n * Custom ng-forge field component that wraps the ngx-mat-input-tel phone input.\n *\n * Since ngx-mat-input-tel uses ControlValueAccessor (reactive forms) and does not support\n * Signal Forms' [formField] directive, this component bridges the two systems by manually\n * syncing the FieldTree signal state with a FormControl.\n *\n * Registered as ng-forge type 'phone'.\n */\n@Component({\n  selector: 'dbx-forge-phone-field',\n  imports: [MatFormFieldModule, MatInputModule, ReactiveFormsModule, NgxMatInputTelComponent, DynamicTextPipe, AsyncPipe],\n  templateUrl: './phone.field.component.html',\n  styles: [\n    `\n      :host {\n        display: block;\n        width: 100%;\n      }\n      :host mat-form-field {\n        width: 100%;\n      }\n    `\n  ]\n})\nexport class DbxForgePhoneFieldComponent {\n  private readonly materialConfig = inject(MATERIAL_CONFIG, { optional: true });\n  private readonly destroyRef = inject(DestroyRef);\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  // Standard ng-forge value field inputs\n  readonly field: InputSignal<FieldTree<string>> = input.required<FieldTree<string>>();\n  readonly key: InputSignal<string> = input.required<string>();\n  readonly label: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly placeholder: InputSignal<DynamicText | undefined> = input<DynamicText | undefined>();\n  readonly className: InputSignal<string> = input('');\n  readonly tabIndex: InputSignal<number | undefined> = input<number | undefined>();\n  readonly props: InputSignal<DbxForgePhoneFieldProps | undefined> = input<DbxForgePhoneFieldProps | undefined>();\n  readonly meta: InputSignal<FieldMeta | undefined> = input<FieldMeta | undefined>();\n  readonly validationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages: InputSignal<ValidationMessages | undefined> = input<ValidationMessages | undefined>();\n\n  /**\n   * Internal FormControl used to bridge ngx-mat-input-tel (reactive forms)\n   * with the ng-forge Signal Forms field tree.\n   */\n  readonly phoneCtrl = new FormControl<string>('');\n  readonly extensionCtrl = new FormControl<string>('', { validators: [isPhoneExtension()] });\n\n  // Computed props\n  readonly preferredCountriesSignal: Signal<string[]> = computed(() => this.props()?.preferredCountries ?? DEFAULT_FORGE_PREFERRED_COUNTRIES);\n  readonly onlyCountriesSignal: Signal<string[]> = computed(() => this.props()?.onlyCountries ?? []);\n  readonly enableSearchSignal: Signal<boolean> = computed(() => this.props()?.enableSearch ?? true);\n  readonly allowExtensionSignal: Signal<boolean> = computed(() => this.props()?.allowExtension ?? false);\n  readonly effectiveAppearanceSignal = computed(() => this.props()?.appearance ?? this.materialConfig?.appearance ?? 'outline');\n  readonly effectiveAutocompleteSignal = computed(() => this.props()?.autocomplete ?? 'off');\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaRequiredSignal = computed(() => (this.field()().required() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const hintId = this.hintIdSignal();\n    if (this.errorsToDisplaySignal().length > 0) return errorId;\n    if (this.props()?.hint) return hintId;\n    return null;\n  });\n\n  /**\n   * Flag to prevent feedback loops during sync.\n   */\n  private _syncing = false;\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'ngx-mat-input-tel' });\n\n    // Disabled state propagation\n    effect(() => {\n      const disabled = this.isDisabled();\n      toggleDisableFormControl(this.phoneCtrl, disabled);\n      toggleDisableFormControl(this.extensionCtrl, disabled);\n    });\n\n    // Sync Signal Forms field -> FormControl (inbound)\n    effect(() => {\n      const fieldTree = this.field();\n      const fieldState = fieldTree();\n      const signalValue: Maybe<string> = fieldState.value();\n\n      if (!this._syncing) {\n        this._syncing = true;\n\n        if (signalValue) {\n          const pair = e164PhoneNumberExtensionPair(signalValue);\n          const phone = pair.number ?? '';\n          const extension = pair.extension ?? '';\n\n          if (phone !== this.phoneCtrl.value) {\n            this.phoneCtrl.setValue(phone, { emitEvent: false });\n          }\n\n          if (extension !== this.extensionCtrl.value) {\n            this.extensionCtrl.setValue(extension, { emitEvent: false });\n          }\n        } else if (this.phoneCtrl.value !== '') {\n          this.phoneCtrl.setValue('', { emitEvent: false });\n          this.extensionCtrl.setValue('', { emitEvent: false });\n        }\n\n        this._syncing = false;\n      }\n    });\n\n    // Sync FormControl -> Signal Forms field (outbound)\n    const phoneSub = this.phoneCtrl.valueChanges.subscribe((phone) => {\n      this._syncOutbound(phone, this.extensionCtrl.value);\n    });\n\n    const extSub = this.extensionCtrl.valueChanges.subscribe((ext) => {\n      this._syncOutbound(this.phoneCtrl.value, ext);\n    });\n\n    this.destroyRef.onDestroy(() => {\n      phoneSub.unsubscribe();\n      extSub.unsubscribe();\n    });\n  }\n\n  private _syncOutbound(phone: Maybe<string>, extension: Maybe<string>): void {\n    if (this._syncing) {\n      return;\n    }\n\n    this._syncing = true;\n\n    const fieldTree = this.field();\n    const fieldState = fieldTree();\n    let outputValue: string;\n\n    if (phone && this.allowExtensionSignal()) {\n      outputValue = e164PhoneNumberFromE164PhoneNumberExtensionPair({\n        number: phone as E164PhoneNumber,\n        extension: extension ?? undefined\n      });\n    } else {\n      outputValue = phone ?? '';\n    }\n\n    const currentSignalValue = fieldState.value();\n\n    if (outputValue !== currentSignalValue) {\n      fieldState.value.set(outputValue);\n      fieldState.markAsTouched();\n      fieldState.markAsDirty();\n    }\n\n    this._syncing = false;\n  }\n}\n\n// MARK: Mapper\n/**\n * Custom mapper for the phone field type.\n *\n * Uses the standard valueFieldMapper pattern from ng-forge/integration to resolve\n * the field tree and build the standard inputs for the component.\n *\n * @param fieldDef - The phone field definition with a key property.\n * @param fieldDef.key - The field key used to resolve the FieldTree from the form context.\n * @returns Signal containing Record of input names to values for ngComponentOutlet.\n */\nexport function phoneFieldMapper(fieldDef: { key: string }): Signal<Record<string, unknown>> {\n  const ctx = resolveValueFieldContext();\n  const defaultProps = inject(DEFAULT_PROPS);\n  const defaultValidationMessages = inject(DEFAULT_VALIDATION_MESSAGES);\n\n  return computed(() => {\n    const inputs = buildValueFieldInputs(fieldDef as any, ctx, defaultProps?.());\n    const dvm = defaultValidationMessages?.();\n    if (dvm !== undefined) {\n      inputs['defaultValidationMessages'] = dvm;\n    }\n    return inputs;\n  });\n}\n","<mat-form-field [appearance]=\"effectiveAppearanceSignal()\" subscriptSizing=\"dynamic\">\n  @if (label()) {\n    <mat-label>{{ label() | dynamicText | async }}</mat-label>\n  }\n  <div class=\"dbx-form-phone-field\">\n    <ngx-mat-input-tel\n      name=\"phone\"\n      class=\"dbx-form-phone-field-phone-content\"\n      [formControl]=\"phoneCtrl\"\n      [autocomplete]=\"effectiveAutocompleteSignal()\"\n      [enableSearch]=\"enableSearchSignal()\"\n      [preferredCountries]=\"preferredCountriesSignal()\"\n      [onlyCountries]=\"onlyCountriesSignal()\"\n      [enablePlaceholder]=\"false\"\n      [placeholder]=\"(placeholder() | dynamicText | async) ?? ''\"\n      [attr.aria-invalid]=\"ariaInvalidSignal()\"\n      [attr.aria-required]=\"ariaRequiredSignal()\"\n      [attr.aria-describedby]=\"ariaDescribedBySignal()\"></ngx-mat-input-tel>\n    @if (allowExtensionSignal()) {\n      <div class=\"dbx-form-phone-field-extension-content\">\n        <span class=\"dbx-hint dbx-button-spacer\">Ext.</span>\n        <input name=\"phone-extension\" class=\"dbx-form-phone-field-extension-input\" placeholder=\"123\" minlength=\"0\" maxlength=\"6\" [formControl]=\"extensionCtrl\" aria-label=\"Phone extension\" />\n      </div>\n    }\n  </div>\n  @if (errorsToDisplaySignal()[0]; as error) {\n    <mat-error [id]=\"errorIdSignal()\">{{ error.message }}</mat-error>\n  } @else if (props()?.hint; as hint) {\n    <mat-hint [id]=\"hintIdSignal()\">{{ hint | dynamicText | async }}</mat-hint>\n  }\n</mat-form-field>\n","import { Component, computed, ElementRef, inject, input } from '@angular/core';\nimport type { Maybe } from '@dereekb/util';\nimport { FormField, type FieldTree } from '@angular/forms/signals';\nimport { MatError, MatFormField, MatLabel } from '@angular/material/form-field';\nimport { MatOption, MatSelect } from '@angular/material/select';\nimport { MatHint } from '@angular/material/input';\nimport type { DynamicText, FieldMeta, ValidationMessages, ValueType, BaseValueField } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe, createResolvedErrorsSignal, setupMetaTracking, shouldShowErrors } from '@ng-forge/dynamic-forms/integration';\nimport { MATERIAL_CONFIG, type MatSelectProps } from '@ng-forge/dynamic-forms-material';\nimport { AsyncPipe } from '@angular/common';\nimport { maybeValueFromObservableOrValue, type ObservableOrValue } from '@dereekb/rxjs';\nimport { combineLatest, distinctUntilChanged, map } from 'rxjs';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport type { ValueSelectionOption, ValueSelectionOptionClear } from '../../../field/field.selection';\n\n// MARK: Resolved Option\n/**\n * A fully resolved selection option with label and value, ready for rendering in a `<mat-option>`.\n *\n * Produced by resolving {@link ValueSelectionOption} items: value options pass through,\n * while clear options are mapped to `{ label, value: null }`.\n */\nexport interface DbxForgeResolvedSelectionOption<T> {\n  readonly label: string;\n  readonly value: Maybe<T>;\n  readonly disabled?: boolean;\n}\n\n// MARK: Props\n/**\n * Props interface for the forge value selection field component.\n *\n * Passed via the `props` property on the forge field definition.\n */\nexport interface DbxForgeValueSelectionFieldProps<T = unknown> extends MatSelectProps {\n  /**\n   * Options to select from.\n   *\n   * Accepts a static array or an Observable that emits option arrays.\n   * Options may include {@link ValueSelectionOptionClear} entries with `clear: true`.\n   */\n  readonly options: ObservableOrValue<ValueSelectionOption<T>[]>;\n  /**\n   * When true or a string, adds a clear/reset option at the top of the options list.\n   * If a string is provided, it is used as the clear option label.\n   *\n   * If the options already contain a clear option, no additional one is added.\n   */\n  readonly addClearOption?: boolean | string;\n}\n\n/**\n * The custom forge field type name for the value selection field.\n */\nexport const FORGE_VALUE_SELECTION_FIELD_TYPE = 'dbx-value-selection' as const;\n\n/**\n * Forge field definition interface for the value selection field.\n */\nexport interface DbxForgeValueSelectionFieldDef<T = unknown> extends BaseValueField<DbxForgeValueSelectionFieldProps<T>, T> {\n  readonly type: typeof FORGE_VALUE_SELECTION_FIELD_TYPE;\n}\n\n// MARK: Resolve Options\n/**\n * Resolves {@link ValueSelectionOption} items into flat {@link DbxForgeResolvedSelectionOption} items\n * suitable for rendering in `<mat-option>`.\n *\n * Maps `ValueSelectionOptionClear` (`{ clear: true }`) to `{ label, value: null }`.\n * Optionally prepends a clear option if `addClearOption` is configured and no clear option exists.\n *\n * @param options - Source selection options.\n * @param addClearOption - Whether to prepend a clear option.\n * @returns Resolved options ready for rendering.\n */\nexport function resolveForgeSelectionOptions<T>(options: ValueSelectionOption<T>[], addClearOption: boolean | string): DbxForgeResolvedSelectionOption<T>[] {\n  const hasClear = options.some((x) => (x as ValueSelectionOptionClear).clear);\n\n  let resolvedOptions: DbxForgeResolvedSelectionOption<T>[] = options.map((option) => {\n    if ((option as ValueSelectionOptionClear).clear) {\n      return {\n        label: (option as ValueSelectionOptionClear).label ?? '',\n        value: null\n      };\n    }\n\n    return option as DbxForgeResolvedSelectionOption<T>;\n  });\n\n  if (addClearOption && !hasClear) {\n    const clearLabel = typeof addClearOption === 'string' ? addClearOption : '-- Clear --';\n    resolvedOptions = [{ label: clearLabel, value: null }, ...resolvedOptions];\n  }\n\n  return resolvedOptions;\n}\n\n// MARK: Component\n/**\n * Forge ValueFieldComponent for value-selection (dropdown) fields.\n *\n * Mirrors ng-forge's built-in `MatSelectFieldComponent` but adds support for\n * {@link ValueSelectionOption} (including clear options), Observable option sources,\n * and `addClearOption` configuration.\n *\n * Uses `[formField]` for native ng-forge value binding, `<mat-form-field>` for proper\n * Material rendering, and `[attr.hidden]` for built-in logic (hidden/disabled) support.\n */\n@Component({\n  selector: 'dbx-forge-value-selection-field',\n  templateUrl: './selection.field.component.html',\n  imports: [MatFormField, MatLabel, MatSelect, MatOption, MatHint, FormField, MatError, DynamicTextPipe, AsyncPipe],\n  host: {\n    '[id]': '`${key()}`',\n    '[attr.data-testid]': 'key()',\n    '[class]': 'className()',\n    '[attr.hidden]': 'field()().hidden() || null'\n  }\n})\nexport class DbxForgeValueSelectionFieldComponent<T = unknown> {\n  private readonly materialConfig = inject(MATERIAL_CONFIG, { optional: true });\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  // ng-forge ValueFieldComponent inputs\n  readonly field = input.required<FieldTree<ValueType>>();\n  readonly key = input.required<string>();\n  readonly label = input<DynamicText | undefined>();\n  readonly placeholder = input<DynamicText | undefined>();\n  readonly className = input<string>('');\n  readonly tabIndex = input<number | undefined>();\n  readonly props = input<DbxForgeValueSelectionFieldProps<T> | undefined>();\n  readonly meta = input<FieldMeta | undefined>();\n  readonly validationMessages = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n  // Derived signals\n  readonly addClearOptionSignal = computed(() => this.props()?.addClearOption);\n  readonly addClearOption$ = toObservable(this.addClearOptionSignal).pipe(distinctUntilChanged());\n\n  readonly inputOptionsSignal = computed(() => this.props()?.options);\n  readonly inputOptions$ = toObservable(this.inputOptionsSignal).pipe(maybeValueFromObservableOrValue());\n\n  readonly resolvedOptions$ = combineLatest([this.inputOptions$, this.addClearOption$]).pipe(map(([options, addClearOption]) => resolveForgeSelectionOptions(options ?? [], addClearOption ?? false)));\n\n  readonly resolvedOptionsSignal = toSignal(this.resolvedOptions$);\n\n  readonly multipleSignal = computed(() => this.props()?.multiple ?? false);\n  readonly effectiveAppearanceSignal = computed(() => this.props()?.appearance ?? this.materialConfig?.appearance ?? 'outline');\n  readonly effectiveSubscriptSizingSignal = computed(() => this.props()?.subscriptSizing ?? this.materialConfig?.subscriptSizing ?? 'dynamic');\n  readonly compareWithSignal = computed(() => this.props()?.compareWith ?? Object.is);\n\n  // Error display\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as any, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as any);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  /**\n   * Unique ID for the hint element\n   */\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n\n  /**\n   * Base ID for error elements\n   */\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n\n  // Accessibility\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaRequiredSignal = computed(() => (this.field()().required() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const hintId = this.hintIdSignal();\n    if (this.errorsToDisplaySignal().length > 0) return errorId;\n    if (this.props()?.hint) return hintId;\n    return null;\n  });\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'mat-select' });\n  }\n}\n","@let f = field();\n@let selectId = key() + '-select';\n\n<mat-form-field class=\"dbx-w100\" [appearance]=\"effectiveAppearanceSignal()\" [subscriptSizing]=\"effectiveSubscriptSizingSignal()\">\n  @if (label(); as label) {\n    <mat-label>{{ label | dynamicText | async }}</mat-label>\n  }\n\n  <mat-select [id]=\"selectId\" [formField]=\"f\" [placeholder]=\"(placeholder() | dynamicText | async) ?? ''\" [multiple]=\"multipleSignal()\" [compareWith]=\"compareWithSignal()\" [attr.aria-invalid]=\"ariaInvalidSignal()\" [attr.aria-required]=\"ariaRequiredSignal()\" [attr.aria-describedby]=\"ariaDescribedBySignal()\">\n    @for (option of resolvedOptionsSignal(); track $index) {\n      <mat-option [value]=\"option.value\" [disabled]=\"option.disabled ?? false\">{{ option.label }}</mat-option>\n    }\n  </mat-select>\n\n  @if (errorsToDisplaySignal()[0]; as error) {\n    <mat-error [id]=\"errorIdSignal()\">{{ error.message }}</mat-error>\n  } @else if (props()?.hint; as hint) {\n    <mat-hint [id]=\"hintIdSignal()\">{{ hint | dynamicText | async }}</mat-hint>\n  }\n</mat-form-field>\n","import { FORGE_VALUE_SELECTION_FIELD_TYPE, type DbxForgeValueSelectionFieldDef, type DbxForgeValueSelectionFieldProps } from './selection.field.component';\nimport { dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../field';\nimport type { DbxForgeField } from '../../form/forge.form';\n\n// MARK: Re-exports\nexport { resolveForgeSelectionOptions, type DbxForgeResolvedSelectionOption, type DbxForgeValueSelectionFieldProps, type DbxForgeValueSelectionFieldDef, FORGE_VALUE_SELECTION_FIELD_TYPE } from './selection.field.component';\n\n// MARK: Config\n/**\n * Configuration for a forge select (dropdown) field.\n *\n * Equivalent to formly's `ValueSelectionFieldConfig` — supports static and Observable options,\n * clear options, and multiple selection.\n */\nexport interface DbxForgeValueSelectionFieldConfig<T = unknown> extends Omit<DbxForgeFieldFunctionDef<DbxForgeValueSelectionFieldDef<T>>, 'props'> {\n  readonly props: DbxForgeValueSelectionFieldProps<T>;\n}\n\n/**\n * Generic function type for dbxForgeValueSelectionField to preserve caller generics.\n */\nexport type DbxForgeValueSelectionFieldFunction = <T = unknown>(config: DbxForgeValueSelectionFieldConfig<T>) => DbxForgeField<DbxForgeValueSelectionFieldDef<T>>;\n\n// MARK: Factory\n/**\n * Single-select dropdown over a static or async value list. Simpler than `source-select` when metadata lookup is unnecessary.\n *\n * The component uses `<mat-form-field>` with `[formField]` for native ng-forge value binding,\n * proper Material rendering, and built-in logic (hidden/disabled/readonly) support.\n *\n * Supports static arrays, Observable option sources, and `ValueSelectionOptionClear` entries.\n *\n * @param config - Selection field configuration\n * @returns A forge field definition for the value selection component\n *\n * @dbxFormField\n * @dbxFormSlug value-selection\n * @dbxFormTier field-factory\n * @dbxFormProduces T\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType dbx-value-selection\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgeValueSelectionFieldConfig<T>\n * @dbxFormGeneric <T = unknown>\n *\n * @example\n * ```typescript\n * dbxForgeValueSelectionField<string>({ key: 'status', props: { options: [{ value: 'active', label: 'Active' }] } })\n * ```\n */\nexport const dbxForgeValueSelectionField = dbxForgeFieldFunction<DbxForgeValueSelectionFieldConfig>({\n  type: FORGE_VALUE_SELECTION_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder()\n}) as DbxForgeValueSelectionFieldFunction;\n","import { Component, computed, Directive, inject, InjectionToken, input } from '@angular/core';\nimport { type ConfiguredSearchableValueFieldDisplayValue } from './searchable';\nimport { mergeArraysIntoArray } from '@dereekb/util';\nimport { DbxInjectionComponent, type DbxInjectionComponentConfig } from '@dereekb/dbx-core';\nimport { DbxAnchorComponent } from '@dereekb/dbx-web';\nimport { MatIconModule } from '@angular/material/icon';\n\n/**\n * Injection token providing the {@link ConfiguredSearchableValueFieldDisplayValue} to autocomplete item display components.\n */\nexport const DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN = new InjectionToken('DbxSearchableField');\n\n/**\n * Renders a single autocomplete suggestion item using dynamic component injection.\n *\n * Wraps the display component in a {@link DbxAnchorComponent} and provides the display\n * value data via {@link DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN}.\n */\n@Component({\n  selector: 'dbx-searchable-field-autocomplete-item',\n  template: `\n    <dbx-anchor [block]=\"true\" [anchor]=\"anchorSignal()\">\n      <dbx-injection [config]=\"configSignal()\"></dbx-injection>\n    </dbx-anchor>\n  `,\n  imports: [DbxAnchorComponent, DbxInjectionComponent]\n})\nexport class DbxSearchableFieldAutocompleteItemComponent<T> {\n  readonly displayValue = input.required<ConfiguredSearchableValueFieldDisplayValue<T>>();\n\n  readonly configSignal = computed(() => {\n    const displayValue = this.displayValue();\n    const config: DbxInjectionComponentConfig = {\n      ...displayValue.display,\n      // Set data so dbxInjectionComponentConfigIsEqual detects the change\n      // when the display value reference changes (it compares data by reference).\n      data: displayValue,\n      providers: mergeArraysIntoArray(\n        [\n          {\n            provide: DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN,\n            useValue: displayValue\n          }\n        ],\n        displayValue.display.providers\n      )\n    };\n\n    return config;\n  });\n\n  readonly anchorSignal = computed(() => this.displayValue().anchor);\n}\n\n// MARK: Default\n/**\n * Abstract base directive for custom searchable field display components.\n *\n * Injects the {@link ConfiguredSearchableValueFieldDisplayValue} via the\n * {@link DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN} for use in custom templates.\n */\n@Directive()\nexport abstract class AbstractDbxSearchableFieldDisplayDirective<T> {\n  readonly displayValue = inject<ConfiguredSearchableValueFieldDisplayValue<T>>(DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN);\n}\n\n/**\n * Default display component for searchable field autocomplete items.\n *\n * Renders an optional icon, a label, and an optional sublabel in a horizontal flex layout.\n */\n@Component({\n  selector: 'dbx-default-searchable-field-display',\n  template: `\n    <div class=\"dbx-default-searchable-field-display dbx-flex-bar\">\n      @if (icon) {\n        <mat-icon class=\"dbx-icon-spacer\">{{ icon }}</mat-icon>\n      }\n      <span class=\"dbx-chip-label\">{{ displayValue.label }}</span>\n      @if (displayValue.sublabel) {\n        <span class=\"dbx-chip-sublabel\">({{ displayValue.sublabel }})</span>\n      }\n    </div>\n  `,\n  imports: [MatIconModule]\n})\nexport class DbxDefaultSearchableFieldDisplayComponent<T> extends AbstractDbxSearchableFieldDisplayDirective<T> {\n  readonly icon = this.displayValue.icon;\n}\n","import { computed, Directive, input, type OnDestroy, type OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { type PrimativeKey, type Configurable } from '@dereekb/util';\nimport { type DbxInjectionComponentConfig, mergeDbxInjectionComponentConfigs, cleanSubscription, completeOnDestroy } from '@dereekb/dbx-core';\nimport { type LoadingState, successResult, startWithBeginLoading } from '@dereekb/rxjs';\nimport { BehaviorSubject, debounceTime, distinctUntilChanged, first, map, mergeMap, of, shareReplay, startWith, switchMap, type Observable } from 'rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { type DynamicText, type FieldMeta, type ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { type SearchableValueFieldDisplayFn, type SearchableValueFieldDisplayValue, type SearchableValueFieldValue, type SearchableValueFieldHashFn, type ConfiguredSearchableValueFieldDisplayValue } from '../../../../field/selection/searchable/searchable';\nimport { DbxDefaultSearchableFieldDisplayComponent } from '../../../../field/selection/searchable/searchable.field.autocomplete.item.component';\nimport { type DbxForgeSearchableTextFieldProps } from './searchable-text.field';\n\nconst DEFAULT_SEARCH_INPUT_PLACEHOLDER = 'Type to Search';\n\nconst DEFAULT_SEARCHABLE_FIELD_DISPLAY: Partial<DbxInjectionComponentConfig> = {\n  componentClass: DbxDefaultSearchableFieldDisplayComponent\n};\n\n// MARK: Abstract Directive\n/**\n * Abstract base directive for forge searchable fields that manages display caching,\n * search result loading, and common signals.\n *\n * Subclasses provide the specific value model (single-value text or multi-value chip).\n */\n@Directive()\nexport abstract class AbstractForgeSearchableFieldDirective<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey, P extends DbxForgeSearchableTextFieldProps<T, M, H> = DbxForgeSearchableTextFieldProps<T, M, H>> implements OnInit, OnDestroy {\n  // MARK: ng-forge ValueFieldComponent Inputs\n  readonly key = input.required<string>();\n  readonly label = input<DynamicText | undefined>();\n  readonly placeholder = input<DynamicText | undefined>();\n  readonly className = input<string>('');\n  readonly tabIndex = input<number | undefined>();\n  readonly props = input<P | undefined>();\n  readonly meta = input<FieldMeta | undefined>();\n  readonly validationMessages = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n  readonly inputCtrl = new FormControl<string>('');\n\n  protected readonly _clearDisplayHashMapSub = cleanSubscription();\n  protected readonly _displayHashMap = completeOnDestroy(new BehaviorSubject<Map<H, ConfiguredSearchableValueFieldDisplayValue<T, M>>>(new Map()));\n\n  // MARK: Input Observables\n  readonly inputValue$: Observable<string> = this.inputCtrl.valueChanges.pipe(\n    startWith(this.inputCtrl.value),\n    map((x) => (typeof x === 'string' ? x : ''))\n  );\n\n  readonly inputValueString$: Observable<string> = this.inputValue$.pipe(debounceTime(200), distinctUntilChanged());\n\n  // MARK: Computed Signals\n  readonly labelSignal = computed(() => {\n    const l = this.label();\n    return typeof l === 'string' ? l : undefined;\n  });\n\n  readonly hintSignal = computed(() => this.props()?.hint);\n\n  // ARIA IDs\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n\n  readonly searchInputPlaceholderSignal = computed(() => {\n    const p = this.props();\n    const placeholderValue = this.placeholder();\n    const searchOnEmpty = p?.searchOnEmptyText ?? false;\n    const placeholder = typeof placeholderValue === 'string' ? placeholderValue : undefined;\n    return placeholder || (searchOnEmpty ? '' : DEFAULT_SEARCH_INPUT_PLACEHOLDER);\n  });\n\n  // MARK: Search Results\n  readonly searchResultsState$: Observable<LoadingState<ConfiguredSearchableValueFieldDisplayValue<T, M>[]>> = this.inputValueString$.pipe(\n    switchMap((text) => {\n      const p = this.props();\n      const searchOnEmptyText = p?.searchOnEmptyText ?? false;\n      const searchFn = p?.search;\n      let result: Observable<LoadingState<ConfiguredSearchableValueFieldDisplayValue<T, M>[]>>;\n\n      if (searchFn) {\n        result = (text || searchOnEmptyText ? searchFn(text ?? '') : of([])).pipe(\n          switchMap((x) => this._loadDisplayValuesForFieldValues(x)),\n          startWithBeginLoading()\n        );\n      } else {\n        result = of(successResult([] as ConfiguredSearchableValueFieldDisplayValue<T, M>[]));\n      }\n\n      return result;\n    }),\n    shareReplay(1)\n  );\n\n  readonly searchResults$: Observable<ConfiguredSearchableValueFieldDisplayValue<T, M>[]> = this.searchResultsState$.pipe(\n    map((x) => x?.value ?? []),\n    shareReplay(1)\n  );\n\n  readonly searchResultsSignal = toSignal(this.searchResults$, { initialValue: [] as ConfiguredSearchableValueFieldDisplayValue<T, M>[] });\n\n  // MARK: Lifecycle\n  ngOnInit(): void {\n    const p = this.props();\n    if (p?.refreshDisplayValues$) {\n      this._clearDisplayHashMapSub.subscription = p.refreshDisplayValues$.subscribe(() => this._displayHashMap.next(new Map()));\n    }\n\n    this._onInit();\n  }\n\n  ngOnDestroy(): void {\n    this._onDestroy();\n  }\n\n  /**\n   * Subclass lifecycle hook called at the end of ngOnInit.\n   */\n  protected abstract _onInit(): void;\n  /**\n   * Subclass lifecycle hook called at the end of ngOnDestroy.\n   */\n  protected abstract _onDestroy(): void;\n\n  // MARK: Protected Helpers\n  protected _hashForValue(): SearchableValueFieldHashFn<T, H> {\n    return this.props()?.hashForValue ?? ((x) => x as unknown as H);\n  }\n\n  protected _displayForValue(): SearchableValueFieldDisplayFn<T, M> {\n    return this.props()?.displayForValue ?? ((values) => of(values.map((v) => ({ ...v, label: String(v.value) }))));\n  }\n\n  protected _loadDisplayValuesForValues(values: T[]): Observable<LoadingState<ConfiguredSearchableValueFieldDisplayValue<T, M>[]>> {\n    return this._loadDisplayValuesForFieldValues(values.map((value) => ({ value })));\n  }\n\n  protected _loadDisplayValuesForFieldValues(values: SearchableValueFieldValue<T, M>[]): Observable<LoadingState<ConfiguredSearchableValueFieldDisplayValue<T, M>[]>> {\n    return this._getDisplayValuesForFieldValues(values).pipe(\n      map((displayValues: ConfiguredSearchableValueFieldDisplayValue<T, M>[]) => successResult(displayValues)),\n      startWithBeginLoading(),\n      shareReplay(1)\n    );\n  }\n\n  protected _getDisplayValuesForFieldValues(values: SearchableValueFieldValue<T, M>[]): Observable<ConfiguredSearchableValueFieldDisplayValue<T, M>[]> {\n    const hashForValue = this._hashForValue();\n    const displayForValue = this._displayForValue();\n    const p = this.props();\n    const display = p?.display;\n    const useAnchor = p?.useAnchor;\n    const anchorForValue = useAnchor && p?.anchorForValue;\n    const defaultDisplay = mergeDbxInjectionComponentConfigs([DEFAULT_SEARCHABLE_FIELD_DISPLAY, display]);\n\n    return this._displayHashMap.pipe(\n      mergeMap((displayMap) => {\n        const mappingResult = values.map((x) => [x, hashForValue(x.value)] as [SearchableValueFieldValue<T, M>, H]).map(([x, hash], i) => [i, hash, x, displayMap.get(hash)] as [number, H, SearchableValueFieldValue<T, M>, ConfiguredSearchableValueFieldDisplayValue<T, M>]);\n\n        const hasDisplay = mappingResult.filter((x) => Boolean(x[3]));\n        const needsDisplay = mappingResult.filter((x) => !x[3]);\n\n        let obs: Observable<ConfiguredSearchableValueFieldDisplayValue<T, M>[]>;\n\n        if (needsDisplay.length > 0) {\n          const displayValuesObs = displayForValue(needsDisplay.map((x) => x[2]));\n\n          obs = displayValuesObs.pipe(\n            first(),\n            map((displayResults) => {\n              (displayResults as Configurable<SearchableValueFieldDisplayValue<T, M>>[]).forEach((x) => {\n                if (x.display) {\n                  x.display = mergeDbxInjectionComponentConfigs([defaultDisplay, x.display]);\n                } else {\n                  x.display = defaultDisplay;\n                }\n\n                if (!x.anchor && anchorForValue) {\n                  x.anchor = anchorForValue(x);\n                }\n              });\n\n              const displayResultsMapping: [ConfiguredSearchableValueFieldDisplayValue<T, M>, H][] = (displayResults as ConfiguredSearchableValueFieldDisplayValue<T, M>[]).map((x) => [x, hashForValue(x.value)]);\n              const valueIndexHashMap = new Map(displayResultsMapping.map(([x, hash]) => [hash, x]));\n\n              displayResultsMapping.forEach(([x, hash]) => displayMap.set(hash, x));\n\n              return mappingResult.map((x) => x[3] ?? valueIndexHashMap.get(x[1]));\n            })\n          );\n        } else {\n          obs = of(hasDisplay.map((x) => x[3]));\n        }\n\n        return obs;\n      })\n    );\n  }\n}\n","import { type PrimativeKey } from '@dereekb/util';\nimport { type DbxInjectionComponentConfig } from '@dereekb/dbx-core';\nimport { type Observable } from 'rxjs';\nimport { type ValidatorFn } from '@angular/forms';\nimport { type BaseValueField } from '@ng-forge/dynamic-forms';\nimport { type SearchableValueFieldStringSearchFn, type SearchableValueFieldDisplayFn, type SearchableValueFieldHashFn, type SearchableValueFieldAnchorFn } from '../../../../field/selection/searchable/searchable';\nimport { configureDbxForgeFormFieldWrapper } from '../../wrapper/formfield/formfield.wrapper';\nimport { type DbxForgeFieldFunctionDef, dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, dbxForgeBuildFieldDef } from '../../field';\nimport type { DbxForgeField } from '../../../form/forge.form';\n\n// MARK: Field Type Name\n/**\n * The custom forge field type name for the searchable text field.\n */\nexport const DBX_FORGE_SEARCHABLE_TEXT_FIELD_TYPE_NAME = 'dbx-searchable-text' as const;\n\n// MARK: Props\n/**\n * Props interface for the forge searchable text field.\n *\n * Passed via the `props` property on the forge field definition.\n */\nexport interface DbxForgeSearchableTextFieldProps<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> {\n  readonly search: SearchableValueFieldStringSearchFn<T, M>;\n  readonly displayForValue: SearchableValueFieldDisplayFn<T, M>;\n  readonly hashForValue?: SearchableValueFieldHashFn<T, H>;\n  readonly allowStringValues?: boolean;\n  readonly convertStringValue?: (text: string) => T;\n  readonly showSelectedValue?: boolean;\n  readonly searchOnEmptyText?: boolean;\n  readonly display?: Partial<DbxInjectionComponentConfig>;\n  readonly useAnchor?: boolean;\n  readonly anchorForValue?: SearchableValueFieldAnchorFn<T, M>;\n  readonly showClearValue?: boolean;\n  readonly searchLabel?: string;\n  readonly refreshDisplayValues$?: Observable<unknown>;\n  readonly hint?: string;\n  readonly textInputValidator?: ValidatorFn | ValidatorFn[];\n}\n\n// MARK: Field Def\n/**\n * Forge field definition interface for the searchable text field.\n */\nexport interface DbxForgeSearchableTextFieldDef<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends BaseValueField<DbxForgeSearchableTextFieldProps<T, M, H>, T> {\n  readonly type: typeof DBX_FORGE_SEARCHABLE_TEXT_FIELD_TYPE_NAME;\n}\n\n// MARK: Searchable Text Field\n/**\n * Configuration for a forge searchable text field (single-value autocomplete).\n */\nexport interface DbxForgeSearchableTextFieldConfig<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends DbxForgeFieldFunctionDef<DbxForgeSearchableTextFieldDef<T, M, H>> {}\n\nexport type DbxForgeSearchableTextFieldFunction = <T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey>(config: DbxForgeSearchableTextFieldConfig<T, M, H>) => DbxForgeField<DbxForgeSearchableTextFieldDef<T, M, H>>;\n\n/**\n * Single-value autocomplete field with search-as-you-type. Optionally allows free-form typed strings as values.\n *\n * @param config - Searchable text field configuration\n * @returns A {@link DbxForgeFormFieldWrapperFieldDef} wrapping a searchable text field\n *\n * @dbxFormField\n * @dbxFormSlug searchable-text\n * @dbxFormTier field-factory\n * @dbxFormProduces T\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType dbx-searchable-text\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgeSearchableTextFieldConfig<T, M, H>\n * @dbxFormGeneric <T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey>\n *\n * @example\n * ```typescript\n * dbxForgeSearchableTextField<User>({ key: 'user', props: { search, displayForValue } })\n * ```\n */\nexport const dbxForgeSearchableTextField = dbxForgeFieldFunction<DbxForgeSearchableTextFieldConfig>({\n  type: DBX_FORGE_SEARCHABLE_TEXT_FIELD_TYPE_NAME,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(),\n  buildFieldDef: dbxForgeBuildFieldDef((x) => {\n    // configure form field wrapper\n    x.configure(configureDbxForgeFormFieldWrapper);\n  })\n}) as DbxForgeSearchableTextFieldFunction;\n","import { type PrimativeKey } from '@dereekb/util';\nimport { type BaseValueField } from '@ng-forge/dynamic-forms';\nimport { configureDbxForgeFormFieldWrapper } from '../../wrapper/formfield/formfield.wrapper';\nimport { type DbxForgeSearchableTextFieldProps } from './searchable-text.field';\nimport { type DbxForgeFieldFunctionDef, dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, dbxForgeBuildFieldDef } from '../../field';\nimport type { DbxForgeField } from '../../../form/forge.form';\n\n// MARK: Field Type Name\n/**\n * The custom forge field type name for the searchable chip field.\n */\nexport const DBX_FORGE_SEARCHABLE_CHIP_FIELD_TYPE_NAME = 'dbx-searchable-chip' as const;\n\n// MARK: Props\n/**\n * Props interface for the forge searchable chip field.\n */\nexport interface DbxForgeSearchableChipFieldProps<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends DbxForgeSearchableTextFieldProps<T, M, H> {\n  readonly multiSelect?: boolean;\n  readonly asArrayValue?: boolean;\n}\n\n// MARK: Field Def\n/**\n * Forge field definition interface for the searchable chip field.\n */\nexport interface DbxForgeSearchableChipFieldDef<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends BaseValueField<DbxForgeSearchableChipFieldProps<T, M, H>, T | T[]> {\n  readonly type: typeof DBX_FORGE_SEARCHABLE_CHIP_FIELD_TYPE_NAME;\n}\n\n// MARK: Searchable Chip Field\n/**\n * Configuration for a forge searchable chip field (multi-value autocomplete with chips).\n */\nexport interface DbxForgeSearchableChipFieldConfig<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends DbxForgeFieldFunctionDef<DbxForgeSearchableChipFieldDef<T, M, H>> {}\n\nexport type DbxForgeSearchableChipFieldFunction = <T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey>(config: DbxForgeSearchableChipFieldConfig<T, M, H>) => DbxForgeField<DbxForgeSearchableChipFieldDef<T, M, H>>;\n\n/**\n * Multi-value autocomplete with chips. Defaults to multi-select; supports free-form text entry when `allowStringValues` is set.\n *\n * @param config - Searchable chip field configuration\n * @returns A {@link DbxForgeFormFieldWrapperFieldDef} wrapping a searchable chip field\n *\n * @dbxFormField\n * @dbxFormSlug searchable-chip\n * @dbxFormTier field-factory\n * @dbxFormProduces T | T[]\n * @dbxFormArrayOutput optional\n * @dbxFormNgFormType dbx-searchable-chip\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgeSearchableChipFieldConfig<T, M, H>\n * @dbxFormGeneric <T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey>\n *\n * @example\n * ```typescript\n * dbxForgeSearchableChipField<Tag>({ key: 'tags', props: { search, displayForValue } })\n * ```\n */\nexport const dbxForgeSearchableChipField = dbxForgeFieldFunction<DbxForgeSearchableChipFieldConfig>({\n  type: DBX_FORGE_SEARCHABLE_CHIP_FIELD_TYPE_NAME,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(),\n  buildFieldDef: dbxForgeBuildFieldDef((x) => {\n    // configure form field wrapper\n    x.configure(configureDbxForgeFormFieldWrapper);\n  })\n}) as DbxForgeSearchableChipFieldFunction;\n\n/**\n * Configuration for a forge searchable string chip field, pre-configured for string values.\n *\n * `allowStringValues` is omitted from the config — it is always forced to `true`\n * so users can type a value and press Enter to add it as a chip.\n */\nexport type DbxForgeSearchableStringChipFieldConfig<M = unknown> = Omit<DbxForgeSearchableChipFieldConfig<string, M>, 'props'> & {\n  readonly props?: Omit<DbxForgeSearchableChipFieldProps<string, M>, 'allowStringValues'>;\n};\n\n/**\n * String-value specialization of `searchable-chip`. `allowStringValues` is forced true — use for free-form tag entry.\n *\n * Always sets `allowStringValues: true` on the inner field props so pressing Enter\n * (or typing a separator key) commits the typed value as a chip.\n *\n * @param config - String-specific searchable chip field configuration (omits allowStringValues)\n * @returns A {@link DbxForgeFormFieldWrapperFieldDef} wrapping a searchable chip field.\n *\n * @dbxFormField\n * @dbxFormSlug searchable-string-chip\n * @dbxFormTier field-factory\n * @dbxFormProduces string | string[]\n * @dbxFormArrayOutput optional\n * @dbxFormNgFormType dbx-searchable-chip\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgeSearchableStringChipFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeSearchableStringChipField({ key: 'tags', props: { search, displayForValue } })\n * ```\n */\nexport function dbxForgeSearchableStringChipField<M = unknown>(config: DbxForgeSearchableStringChipFieldConfig<M>) {\n  return dbxForgeSearchableChipField<string, M>({\n    ...config,\n    props: {\n      ...config.props,\n      allowStringValues: true\n    }\n  } as DbxForgeSearchableChipFieldConfig<string, M>);\n}\n","import { Component, computed, effect, ElementRef, inject, input, viewChild } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatAutocompleteModule, type MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatOptionModule } from '@angular/material/core';\nimport { type Maybe, type PrimativeKey } from '@dereekb/util';\nimport { BehaviorSubject, map, shareReplay, switchMap, type Observable } from 'rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { type FieldTree } from '@angular/forms/signals';\nimport { type SearchableValueFieldDisplayValue, type ConfiguredSearchableValueFieldDisplayValue } from '../../../../field/selection/searchable/searchable';\nimport { DbxSearchableFieldAutocompleteItemComponent } from '../../../../field/selection/searchable/searchable.field.autocomplete.item.component';\nimport { AbstractForgeSearchableFieldDirective } from './searchable.field.directive';\nimport { createResolvedErrorsSignal, setupMetaTracking, shouldShowErrors } from '@ng-forge/dynamic-forms/integration';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport { toggleDisableFormControl } from '../../../../form/form';\nimport { type DbxForgeSearchableTextFieldProps } from './searchable-text.field';\nimport { cleanSubscription, completeOnDestroy } from '@dereekb/dbx-core';\n\n/**\n * Forge ValueFieldComponent for searchable text selection (single value).\n *\n * Wraps the existing searchable text autocomplete pattern from formly as a standalone\n * ng-forge dynamic forms component. Receives field config via signal inputs from the mapper.\n */\n@Component({\n  selector: 'dbx-forge-searchable-text-field',\n  templateUrl: './searchable-text.field.component.html',\n  imports: [FormsModule, ReactiveFormsModule, MatAutocompleteModule, MatOptionModule, MatIconModule, DbxSearchableFieldAutocompleteItemComponent]\n})\nexport class DbxForgeSearchableTextFieldComponent<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends AbstractForgeSearchableFieldDirective<T, M, H, DbxForgeSearchableTextFieldProps<T, M, H>> {\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  readonly field = input.required<FieldTree<T>>();\n  readonly textInputRef = viewChild<ElementRef<HTMLInputElement>>('textInput');\n\n  private readonly _singleValueSyncSub = cleanSubscription();\n  private readonly _valuesSubject = completeOnDestroy(new BehaviorSubject<T[]>([]));\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as any, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as any);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    if (this.errorsToDisplaySignal().length > 0) return this.errorIdSignal();\n    if (this.props()?.hint) return this.hintIdSignal();\n    return null;\n  });\n\n  readonly showClearValueSignal = computed(() => this.props()?.showClearValue ?? true);\n  readonly searchLabelSignal = computed(() => this.props()?.searchLabel ?? 'Search');\n\n  readonly fieldValueSignal = computed(() => {\n    const fieldGetter = this.field();\n    const fieldState = typeof fieldGetter === 'function' ? (fieldGetter as any)() : undefined;\n    return fieldState?.value?.() as Maybe<T>;\n  });\n\n  readonly displayValues$: Observable<ConfiguredSearchableValueFieldDisplayValue<T, M>[]> = this._valuesSubject.pipe(\n    switchMap((values: T[]) => this._loadDisplayValuesForValues(values)),\n    map((x) => x?.value ?? []),\n    shareReplay(1)\n  );\n\n  readonly selectedDisplayValue$ = this.displayValues$.pipe(\n    map((x) => x[0]),\n    shareReplay(1)\n  );\n\n  readonly selectedDisplayValueSignal = toSignal(this.selectedDisplayValue$);\n  readonly hasValueSignal = computed(() => Boolean(this.selectedDisplayValueSignal()));\n  readonly showSelectedDisplayValueSignal = computed(() => {\n    const hasValue = this.hasValueSignal();\n    const p = this.props();\n    const showSelected = p?.showSelectedValue ?? !(p?.allowStringValues ?? false);\n    return showSelected && hasValue;\n  });\n\n  // Disabled state propagation\n  private readonly _disabledEffect = effect(() => {\n    toggleDisableFormControl(this.inputCtrl, this.isDisabled());\n  });\n\n  private readonly _syncFieldValueEffect = effect(() => {\n    const fieldValue = this.fieldValueSignal();\n    const values = fieldValue != null && fieldValue !== '' ? [fieldValue] : [];\n    this._valuesSubject.next(values);\n  });\n\n  constructor() {\n    super();\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'input' });\n  }\n\n  protected _onInit(): void {\n    this._singleValueSyncSub.subscription = this.displayValues$.subscribe((x) => {\n      if (x[0]) {\n        this.inputCtrl.setValue(x[0].label, { emitEvent: false });\n      }\n    });\n  }\n\n  protected _onDestroy(): void {\n    this._singleValueSyncSub.destroy();\n    this._valuesSubject.complete();\n  }\n\n  focusInput(): void {\n    this.textInputRef()?.nativeElement?.focus();\n  }\n\n  selected(event: MatAutocompleteSelectedEvent): void {\n    const value = event.option.value as SearchableValueFieldDisplayValue<T> | { _ignore?: true } | { _clear?: true };\n\n    if ((value as any)._clear) {\n      this._setFieldValue(null);\n      this.inputCtrl.setValue('', { emitEvent: false });\n    } else if (!(value as any)._ignore) {\n      const displayValue = value as SearchableValueFieldDisplayValue<T>;\n      this._setFieldValue(displayValue.value);\n      // Reset input to the display label immediately. When re-selecting the same\n      // value the FieldTree signal does not change, so _singleValueSyncSub never\n      // re-fires and the input would otherwise keep whatever mat-autocomplete\n      // wrote (the object's toString → \"[object Object]\").\n      this.inputCtrl.setValue(displayValue.label ?? '', { emitEvent: false });\n    }\n  }\n\n  private _setFieldValue(value: Maybe<T>): void {\n    const fieldGetter = this.field();\n    if (!fieldGetter || typeof fieldGetter !== 'function') return;\n\n    const fieldState = (fieldGetter as any)();\n    if (fieldState?.value?.set) {\n      // Use null (not undefined) for \"no value\" — undefined orphans the Signal Forms field (NG01902/NG01901).\n      fieldState.value.set(value ?? null);\n    }\n  }\n}\n","<div class=\"dbx-searchable-text-field\" tabindex=\"0\" (click)=\"focusInput()\" (keydown.enter)=\"focusInput()\" [class.dbx-searchable-text-field-has-value]=\"hasValueSignal()\" [class.dbx-searchable-text-field-show-value]=\"showSelectedDisplayValueSignal()\">\n  @if (showSelectedDisplayValueSignal()) {\n    @let sv = selectedDisplayValueSignal();\n    @if (sv) {\n      <div class=\"dbx-searchable-text-field-value\">\n        <dbx-searchable-field-autocomplete-item [displayValue]=\"sv\"></dbx-searchable-field-autocomplete-item>\n      </div>\n    }\n  }\n  <div class=\"dbx-searchable-text-field-input\">\n    @if (searchLabelSignal()) {\n      <div class=\"dbx-label\">{{ searchLabelSignal() }}</div>\n    }\n    <input #textInput class=\"dbx-forge-bare-input\" [formControl]=\"inputCtrl\" [matAutocomplete]=\"auto\" [placeholder]=\"searchInputPlaceholderSignal()\" [attr.aria-invalid]=\"ariaInvalidSignal()\" [attr.aria-describedby]=\"ariaDescribedBySignal()\" />\n  </div>\n</div>\n<mat-autocomplete class=\"dbx-searchable-text-field-autocomplete\" #auto=\"matAutocomplete\" (optionSelected)=\"selected($event)\">\n  @if (showClearValueSignal() && hasValueSignal()) {\n    <mat-option [value]=\"{ _clear: true }\">Clear</mat-option>\n  }\n  @for (result of searchResultsSignal(); track $index) {\n    <mat-option [value]=\"result\" [class.dbx-searchable-field-anchor-option]=\"!!result.anchor\">\n      <dbx-searchable-field-autocomplete-item [displayValue]=\"result\"></dbx-searchable-field-autocomplete-item>\n    </mat-option>\n  }\n</mat-autocomplete>\n","import { Component, computed, effect, ElementRef, inject, input } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatAutocompleteModule, type MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\nimport { MatChipsModule, type MatChipInputEvent } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatOptionModule } from '@angular/material/core';\nimport { COMMA, ENTER } from '@angular/cdk/keycodes';\nimport { type Maybe, type PrimativeKey, filterUniqueValues, lastValue, convertMaybeToArray, type ArrayOrValue } from '@dereekb/util';\nimport { skipUntilTimeElapsedAfterLastEmission } from '@dereekb/rxjs';\nimport { DbxLoadingModule } from '@dereekb/dbx-web';\nimport { BehaviorSubject, map, shareReplay, Subject, switchMap, type Observable } from 'rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { type FieldTree } from '@angular/forms/signals';\nimport { type SearchableValueFieldDisplayValue, type ConfiguredSearchableValueFieldDisplayValue } from '../../../../field/selection/searchable/searchable';\nimport { DbxSearchableFieldAutocompleteItemComponent } from '../../../../field/selection/searchable/searchable.field.autocomplete.item.component';\nimport { AbstractForgeSearchableFieldDirective } from './searchable.field.directive';\nimport { createResolvedErrorsSignal, setupMetaTracking, shouldShowErrors } from '@ng-forge/dynamic-forms/integration';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport { toggleDisableFormControl } from '../../../../form/form';\nimport { type DbxForgeSearchableChipFieldProps } from './searchable-chip.field';\nimport { completeOnDestroy, cleanSubscription } from '@dereekb/dbx-core';\n\n/**\n * Forge ValueFieldComponent for searchable chip selection (multi-value).\n *\n * Wraps the existing searchable chip pattern from formly as a standalone\n * ng-forge dynamic forms component. Supports adding/removing chips with autocomplete search.\n */\n@Component({\n  selector: 'dbx-forge-searchable-chip-field',\n  templateUrl: './searchable-chip.field.component.html',\n  imports: [FormsModule, ReactiveFormsModule, MatAutocompleteModule, MatChipsModule, MatOptionModule, MatIconModule, DbxLoadingModule, DbxSearchableFieldAutocompleteItemComponent]\n})\nexport class DbxForgeSearchableChipFieldComponent<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends AbstractForgeSearchableFieldDirective<T, M, H, DbxForgeSearchableChipFieldProps<T, M, H>> {\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  readonly field = input.required<FieldTree<T | T[]>>();\n  readonly separatorKeysCodes: number[] = [ENTER, COMMA];\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as any, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as any);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    if (this.errorsToDisplaySignal().length > 0) return this.errorIdSignal();\n    if (this.props()?.hint) return this.hintIdSignal();\n    return null;\n  });\n\n  private readonly _blur = completeOnDestroy(new Subject<void>());\n  private readonly _blurSub = cleanSubscription();\n  private readonly _valuesSubject = completeOnDestroy(new BehaviorSubject<T[]>([]));\n\n  readonly values$ = this._valuesSubject.asObservable().pipe(shareReplay(1));\n\n  readonly displayValues$: Observable<ConfiguredSearchableValueFieldDisplayValue<T, M>[]> = this._valuesSubject.pipe(\n    switchMap((values: T[]) => this._loadDisplayValuesForValues(values)),\n    map((x) => x?.value ?? []),\n    shareReplay(1)\n  );\n\n  readonly displayValuesSignal = toSignal(this.displayValues$, { initialValue: [] as ConfiguredSearchableValueFieldDisplayValue<T, M>[] });\n\n  // Disabled state propagation\n  private readonly _disabledEffect = effect(() => {\n    toggleDisableFormControl(this.inputCtrl, this.isDisabled());\n  });\n\n  private readonly _syncFieldValueEffect = effect(() => {\n    const fieldGetter = this.field();\n    const fieldState = typeof fieldGetter === 'function' ? (fieldGetter as any)() : undefined;\n    const fieldValue = fieldState?.value?.() as Maybe<T | T[]>;\n    const values = fieldValue == null ? [] : convertMaybeToArray(fieldValue as ArrayOrValue<T>).filter((v) => v != null && v !== '');\n    this._valuesSubject.next(values);\n  });\n\n  constructor() {\n    super();\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'input' });\n  }\n\n  get inputErrorMessage(): Maybe<string> {\n    const errors = this.inputCtrl.errors;\n    let result: Maybe<string>;\n\n    if (errors) {\n      for (const key of Object.keys(errors)) {\n        const error = errors[key];\n\n        if (typeof error === 'string') {\n          result = error;\n          break;\n        } else if (error?.message) {\n          result = error.message;\n          break;\n        }\n      }\n\n      result ??= 'Invalid input';\n    }\n\n    return result;\n  }\n\n  protected _onInit(): void {\n    const p = this.props();\n\n    if (p?.textInputValidator) {\n      this.inputCtrl.setValidators(p.textInputValidator);\n    }\n\n    this._blurSub.subscription = this._blur.pipe(skipUntilTimeElapsedAfterLastEmission(this.values$, 100)).subscribe(() => {\n      this._tryAddCurrentInputValue();\n    });\n  }\n\n  protected _onDestroy(): void {\n    this._valuesSubject.complete();\n    this._blur.complete();\n    this._blurSub.destroy();\n  }\n\n  selectedChip(event: MatAutocompleteSelectedEvent): void {\n    this._addValue((event.option.value as SearchableValueFieldDisplayValue<T>).value);\n  }\n\n  removeWithDisplayValue(displayValue: SearchableValueFieldDisplayValue<T>): void {\n    this._removeValue(displayValue.value);\n  }\n\n  addChip(event: MatChipInputEvent): void {\n    const text = event.value ?? this.inputCtrl.value;\n    this._addWithTextValue(text ?? '');\n  }\n\n  tabPressedOnInput(event: KeyboardEvent): boolean {\n    if (event?.key?.toLowerCase() === 'tab' && this._tryAddCurrentInputValue()) {\n      event.preventDefault();\n      event.stopImmediatePropagation();\n      return false;\n    }\n\n    return true;\n  }\n\n  onBlur(): void {\n    this._blur.next();\n  }\n\n  // MARK: Internal\n  private get _multiSelect(): boolean {\n    return this.props()?.multiSelect ?? true;\n  }\n\n  private get _asArrayValue(): boolean {\n    return this.props()?.asArrayValue ?? true;\n  }\n\n  private get _pickOnlyOne(): boolean {\n    return this._asArrayValue === false || this._multiSelect === false;\n  }\n\n  private get _allowStringValues(): boolean {\n    return this.props()?.allowStringValues ?? Boolean(this.props()?.convertStringValue);\n  }\n\n  private _tryAddCurrentInputValue(): boolean {\n    if (this._allowStringValues) {\n      const value = (this.inputCtrl.value || '').trim();\n\n      if (value) {\n        this._addWithTextValue(value);\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  private _addWithTextValue(text: string): void {\n    if (!this._allowStringValues) {\n      return;\n    }\n\n    text = (text || '').trim();\n\n    if (text) {\n      this.inputCtrl.setValue(text);\n    }\n\n    if (!this.inputCtrl.valid) {\n      this.inputCtrl.markAsTouched();\n      return;\n    }\n\n    if (text) {\n      const convertFn = this.props()?.convertStringValue;\n      const value = convertFn ? convertFn(text) : (text as unknown as T);\n      this._addValue(value);\n    }\n  }\n\n  private _addValue(value: T): void {\n    this.inputCtrl.setValue(null);\n    const currentValues = this._valuesSubject.getValue();\n    this._setValues([...currentValues, value]);\n  }\n\n  private _removeValue(value: T): void {\n    const hashForValue = this._hashForValue();\n    const hashToFilter = hashForValue(value);\n    const values = this._valuesSubject.getValue().filter((x) => hashForValue(x) !== hashToFilter);\n    this._setValues(values);\n  }\n\n  private _setValues(values: T[]): void {\n    const hashForValue = this._hashForValue();\n    values = filterUniqueValues(values, hashForValue);\n\n    if (this._pickOnlyOne) {\n      values = [lastValue(values)].filter((x) => x != null);\n    }\n\n    this._valuesSubject.next(values);\n    this._setFieldValue(values);\n  }\n\n  private _setFieldValue(values: T[]): void {\n    const fieldGetter = this.field();\n    if (!fieldGetter || typeof fieldGetter !== 'function') return;\n\n    let newValue: T | T[] = values;\n\n    if (!this._asArrayValue) {\n      newValue = values[0];\n    }\n\n    const fieldState = (fieldGetter as any)();\n    if (fieldState?.value?.set) {\n      // Use null (not undefined) for \"no value\": single-value mode yields `values[0]` === undefined\n      // when empty, and undefined orphans the Signal Forms field (NG01902/NG01901).\n      fieldState.value.set(newValue ?? null);\n    }\n  }\n}\n","<div class=\"dbx-searchable-field dbx-searchable-chip-field\">\n  <mat-chip-grid #chipGrid>\n    @for (dv of displayValuesSignal(); track $index) {\n      <mat-chip-row (removed)=\"removeWithDisplayValue(dv)\">\n        <dbx-searchable-field-autocomplete-item [displayValue]=\"dv\"></dbx-searchable-field-autocomplete-item>\n        <button matChipRemove>\n          <mat-icon>cancel</mat-icon>\n        </button>\n      </mat-chip-row>\n    }\n    <input\n      #textInput\n      class=\"dbx-forge-bare-input\"\n      [class.dbx-warn]=\"inputErrorMessage\"\n      [formControl]=\"inputCtrl\"\n      [matAutocomplete]=\"auto\"\n      [matChipInputFor]=\"chipGrid\"\n      [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n      (matChipInputTokenEnd)=\"addChip($event)\"\n      [placeholder]=\"searchInputPlaceholderSignal()\"\n      (blur)=\"onBlur()\"\n      (keydown)=\"tabPressedOnInput($event)\"\n      [attr.aria-invalid]=\"ariaInvalidSignal()\"\n      [attr.aria-describedby]=\"ariaDescribedBySignal()\" />\n  </mat-chip-grid>\n  @if (inputCtrl.value && inputCtrl.touched && inputErrorMessage) {\n    <div class=\"dbx-small mat-mdc-form-field-error mat-mdc-form-field-bottom-align\">{{ inputErrorMessage }}</div>\n  }\n</div>\n<mat-autocomplete class=\"dbx-searchable-text-field-autocomplete\" #auto=\"matAutocomplete\" (optionSelected)=\"selectedChip($event)\">\n  @for (result of searchResultsSignal(); track $index) {\n    <mat-option [value]=\"result\">\n      <dbx-searchable-field-autocomplete-item [displayValue]=\"result\"></dbx-searchable-field-autocomplete-item>\n    </mat-option>\n  }\n</mat-autocomplete>\n","import { type PrimativeKey } from '@dereekb/util';\nimport { type DbxInjectionComponentConfig } from '@dereekb/dbx-core';\nimport { type Observable } from 'rxjs';\nimport { type BaseValueField } from '@ng-forge/dynamic-forms';\nimport { type PickableValueFieldDisplayFunction, type PickableValueFieldFilterFunction, type PickableValueFieldFilterSelectedValuesFunction, type PickableValueFieldHashFunction, type PickableValueFieldLoadValuesFunction } from '../../../../field/selection/pickable/pickable';\nimport { type PickableItemFieldItemSortFn } from '../../../../field/selection/pickable/pickable.item';\n\n// MARK: Field Type Names\n/**\n * The custom forge field type name for the pickable chip field.\n */\nexport const FORGE_PICKABLE_CHIP_FIELD_TYPE = 'dbx-pickable-chip' as const;\n\n/**\n * The custom forge field type name for the pickable list field.\n */\nexport const FORGE_PICKABLE_LIST_FIELD_TYPE = 'dbx-pickable-list' as const;\n\n// MARK: Props\n/**\n * Props interface for forge pickable fields (both chip and list variants).\n *\n * Passed via the `props` property on the forge field definition.\n */\nexport interface DbxForgePickableFieldProps<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> {\n  readonly loadValues: PickableValueFieldLoadValuesFunction<T, M>;\n  readonly displayForValue: PickableValueFieldDisplayFunction<T, M>;\n  readonly hashForValue?: PickableValueFieldHashFunction<T, H>;\n  readonly filterValues?: PickableValueFieldFilterFunction<T, M>;\n  /**\n   * Filters/modifies the selected values at selection time (user pick, remove, select-all).\n   *\n   * Lets the field enforce rules like group exclusivity internally instead of round-tripping conflicting values through external sync.\n   */\n  readonly filterSelectedValues?: PickableValueFieldFilterSelectedValuesFunction<T>;\n  readonly sortItems?: PickableItemFieldItemSortFn<T, M>;\n  readonly multiSelect?: boolean;\n  readonly asArrayValue?: boolean;\n  readonly showTextFilter?: boolean;\n  readonly skipFilterFnOnEmpty?: boolean;\n  readonly filterLabel?: string;\n  readonly maxPicks?: number;\n  readonly showSelectAllButton?: boolean;\n  readonly changeSelectionModeToViewOnDisabled?: boolean;\n  readonly footerConfig?: DbxInjectionComponentConfig;\n  readonly refreshDisplayValues$?: Observable<unknown>;\n  readonly hint?: string;\n}\n\n// MARK: Field Defs\n/**\n * Forge field definition interface for the pickable chip field.\n */\nexport interface DbxForgePickableChipFieldDef<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends BaseValueField<DbxForgePickableFieldProps<T, M, H>, T | T[]> {\n  readonly type: typeof FORGE_PICKABLE_CHIP_FIELD_TYPE;\n}\n\n/**\n * Forge field definition interface for the pickable list field.\n */\nexport interface DbxForgePickableListFieldDef<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends BaseValueField<DbxForgePickableFieldProps<T, M, H>, T | T[]> {\n  readonly type: typeof FORGE_PICKABLE_LIST_FIELD_TYPE;\n}\n","import { computed, Directive, effect, input, type InputSignal, type OnInit } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { type Maybe, type PrimativeKey, filterUniqueValues, convertMaybeToArray, filterEmptyArrayValues, type ArrayOrValue, type Configurable } from '@dereekb/util';\nimport { type LoadingState, successResult, startWithBeginLoading, mapLoadingStateResults } from '@dereekb/rxjs';\nimport { BehaviorSubject, combineLatest, debounceTime, distinctUntilChanged, first, map, mergeMap, of, shareReplay, startWith, switchMap, type Observable } from 'rxjs';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { type FieldTree } from '@angular/forms/signals';\nimport { type DynamicText, type FieldMeta, type ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { createResolvedErrorsSignal, shouldShowErrors } from '@ng-forge/dynamic-forms/integration';\nimport { type PickableValueFieldDisplayFunction, type PickableValueFieldDisplayValue, type PickableValueFieldHashFunction, type PickableValueFieldValue } from '../../../../field/selection/pickable/pickable';\nimport { type PickableItemFieldItem } from '../../../../field/selection/pickable/pickable.item';\nimport { type DbxForgePickableFieldProps } from './pickable.field';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport { cleanSubscription, completeOnDestroy } from '@dereekb/dbx-core';\n\n/**\n * Display value augmented with its computed hash for deduplication.\n */\ninterface PickableDisplayValueWithHash<T, M = unknown, H extends PrimativeKey = PrimativeKey> extends PickableValueFieldDisplayValue<T, M> {\n  _hash: H;\n}\n\n// MARK: Abstract Directive\n/**\n * Abstract base directive for forge pickable item fields that manages value loading,\n * display caching, text filtering, and selection state.\n *\n * Subclasses provide the specific UI presentation (chips, lists, etc.).\n * This mirrors the formly {@link AbstractDbxPickableItemFieldDirective} pattern.\n */\n@Directive()\nexport abstract class AbstractForgePickableItemFieldDirective<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> implements OnInit {\n  // MARK: ng-forge ValueFieldComponent Inputs\n  readonly field = input.required<FieldTree<T | T[]>>();\n  readonly key = input.required<string>();\n  readonly label = input<DynamicText | undefined>();\n  readonly placeholder = input<DynamicText | undefined>();\n  readonly className = input<string>('');\n  readonly tabIndex = input<number | undefined>();\n  readonly props = input<DbxForgePickableFieldProps<T, M, H> | undefined>();\n  readonly meta = input<FieldMeta | undefined>();\n  readonly validationMessages = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n  readonly inputCtrl = new FormControl<string>('');\n\n  private readonly _clearDisplayHashMapSub = cleanSubscription();\n  private readonly _displayHashMap = completeOnDestroy(new BehaviorSubject<Map<H, PickableDisplayValueWithHash<T, M, H>>>(new Map()));\n  private readonly _valuesSubject = completeOnDestroy(new BehaviorSubject<T[]>([]));\n\n  // MARK: Computed Signals\n  readonly labelSignal = computed(() => {\n    const l = this.label();\n    return typeof l === 'string' ? l : undefined;\n  });\n\n  readonly hintSignal = computed(() => this.props()?.hint);\n  readonly multiSelectSignal = computed(() => this.props()?.multiSelect ?? true);\n  readonly isDisabled = dbxForgeFieldDisabled();\n  readonly readonlySignal = computed(() => {\n    const fieldGetter = this.field();\n    const fieldState = typeof fieldGetter === 'function' ? (fieldGetter as any)() : undefined;\n    return fieldState?.readonly?.() ?? false;\n  });\n  readonly isDisabledOrReadonlySignal = computed(() => {\n    const readonly = this.readonlySignal();\n    return this.isDisabled() || readonly;\n  });\n  readonly showSelectAllButtonSignal = computed(() => this.props()?.showSelectAllButton ?? false);\n  readonly showTextFilterSignal = computed(() => {\n    const props = this.props();\n    return this.props()?.showTextFilter ?? Boolean(props?.filterValues);\n  });\n  readonly filterLabelSignal = computed(() => this.props()?.filterLabel);\n  readonly footerConfigSignal = computed(() => this.props()?.footerConfig);\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as InputSignal<any>, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as InputSignal<any>);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaRequiredSignal = computed(() => (this.field()().required() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const props = this.props();\n    const hintId = this.hintIdSignal();\n    let result: Maybe<string> = null;\n\n    if (this.errorsToDisplaySignal().length > 0) {\n      result = errorId;\n    } else if (props?.hint) {\n      result = hintId;\n    }\n\n    return result;\n  });\n\n  private get _pickOnlyOne(): boolean {\n    const p = this.props();\n    const asArrayValue = p?.asArrayValue ?? true;\n    const multiSelect = p?.multiSelect ?? true;\n    return asArrayValue === false || multiSelect === false;\n  }\n\n  private _hashForValue(): PickableValueFieldHashFunction<T, H> {\n    return this.props()?.hashForValue ?? ((x) => x as unknown as H);\n  }\n\n  // MARK: Observables\n  readonly filterInputValueString$: Observable<Maybe<string>> = this.inputCtrl.valueChanges.pipe(startWith(undefined), debounceTime(200), distinctUntilChanged(), shareReplay(1));\n\n  readonly loadResultsDisplayValues$: Observable<PickableDisplayValueWithHash<T, M, H>[]> = toObservable(this.props).pipe(\n    switchMap((p) => {\n      const loadFn = p?.loadValues;\n\n      if (!loadFn) {\n        return of([] as PickableDisplayValueWithHash<T, M, H>[]);\n      }\n\n      return loadFn().pipe(switchMap((values) => this._loadDisplayValuesForFieldValues(values)));\n    }),\n    shareReplay(1)\n  );\n\n  readonly displayValuesState$: Observable<LoadingState<PickableDisplayValueWithHash<T, M, H>[]>> = combineLatest([this.loadResultsDisplayValues$, this._valuesSubject]).pipe(\n    switchMap(([displayValues, currentValues]) => {\n      const hashForValue = this._hashForValue();\n      const displayValuesMap = new Map(displayValues.map((x) => [x._hash, x]));\n      const valuesNotInDisplayMap: T[] = [];\n\n      currentValues.forEach((x) => {\n        const key = hashForValue(x);\n        if (!displayValuesMap.has(key)) {\n          valuesNotInDisplayMap.push(x);\n        }\n      });\n\n      if (valuesNotInDisplayMap.length) {\n        return this._loadDisplayValuesForFieldValuesState(valuesNotInDisplayMap.map((value) => ({ value }))).pipe(\n          map((x) =>\n            mapLoadingStateResults(x, {\n              mapValue: (loadedValues: Configurable<PickableDisplayValueWithHash<T, M, H>>[]) => {\n                loadedValues.forEach((v) => (v.isUnknown = v.isUnknown ?? true));\n                return [...displayValues, ...(loadedValues as PickableDisplayValueWithHash<T, M, H>[])];\n              }\n            })\n          )\n        );\n      }\n\n      return of(successResult(displayValues));\n    }),\n    shareReplay(1)\n  );\n\n  readonly filteredSearchResults$: Observable<PickableDisplayValueWithHash<T, M, H>[]> = this.loadResultsDisplayValues$.pipe(\n    switchMap((values) =>\n      this.filterInputValueString$.pipe(\n        switchMap((text) =>\n          combineLatest([this._filterValues(text, values), this.displayValuesState$]).pipe(\n            map(([filteredValueKeys, displayState]) => {\n              const hashForValue = this._hashForValue();\n              const displayValues = displayState?.value ?? [];\n              const valueHashSet = new Set(filteredValueKeys.map((x) => hashForValue(x)));\n              return displayValues.filter((x) => !(x as PickableValueFieldDisplayValue<T, M>).isUnknown && valueHashSet.has(x._hash));\n            })\n          )\n        )\n      )\n    ),\n    shareReplay(1)\n  );\n\n  readonly items$: Observable<PickableItemFieldItem<T, M>[]> = combineLatest([this.filteredSearchResults$, this._valuesSubject]).pipe(\n    map(([displayValues, values]) => {\n      const hashForValue = this._hashForValue();\n      const selectedHashSet = new Set(values.map((x) => hashForValue(x)));\n      let items: PickableItemFieldItem<T, M>[] = displayValues.map((x) => ({ itemValue: x, key: String(x._hash), selected: selectedHashSet.has(x._hash) }));\n\n      const sortItems = this.props()?.sortItems;\n      if (sortItems) {\n        items = sortItems(items);\n      }\n\n      return items;\n    }),\n    shareReplay(1)\n  );\n\n  readonly itemsSignal = toSignal(this.items$, { initialValue: [] as PickableItemFieldItem<T, M>[] });\n\n  readonly noItemsAvailable$ = this.items$.pipe(\n    map((x) => x.length === 0),\n    distinctUntilChanged()\n  );\n\n  readonly noItemsAvailableSignal = toSignal(this.noItemsAvailable$, { initialValue: false });\n\n  readonly allSelectedSignal = computed(() => {\n    const items = this.itemsSignal();\n    return items.length > 0 && items.every((x) => x.selected);\n  });\n\n  // Sync field value to _valuesSubject\n  private readonly _syncFieldValueEffect = effect(() => {\n    const fieldGetter = this.field();\n    const fieldState = typeof fieldGetter === 'function' ? (fieldGetter as any)() : undefined;\n    const fieldValue = fieldState?.value?.() as Maybe<T | T[]>;\n    // Drop nullish/empty-string entries — ng-forge's default string seed for a\n    // T-typed field turns into [''] through convertMaybeToArray and would\n    // otherwise show up as a phantom selection when the user picks an item.\n    const values = filterEmptyArrayValues(convertMaybeToArray(fieldValue as ArrayOrValue<T>));\n    this._valuesSubject.next(values);\n  });\n\n  // MARK: Lifecycle\n  ngOnInit(): void {\n    const p = this.props();\n    if (p?.refreshDisplayValues$) {\n      this._clearDisplayHashMapSub.subscription = p.refreshDisplayValues$.subscribe(() => this._displayHashMap.next(new Map()));\n    }\n  }\n\n  // MARK: Template Actions\n  itemClicked(item: PickableItemFieldItem<T, M>): void {\n    if (!item.disabled) {\n      if (item.selected) {\n        this._removeValue(item.itemValue.value);\n      } else {\n        this._addValue(item.itemValue.value);\n      }\n    }\n  }\n\n  // MARK: Protected\n  protected _addValue(value: T): void {\n    const currentValues = this._valuesSubject.getValue();\n\n    if (this._pickOnlyOne) {\n      this._setValues([value]);\n    } else {\n      this._setValues([...currentValues, value]);\n    }\n  }\n\n  protected _removeValue(value: T): void {\n    const hashForValue = this._hashForValue();\n    const hashToFilter = hashForValue(value);\n    const values = this._valuesSubject.getValue().filter((x) => hashForValue(x) !== hashToFilter);\n    this._setValues(values);\n  }\n\n  protected _setValues(values: T[]): void {\n    const hashForValue = this._hashForValue();\n    values = filterUniqueValues(values, hashForValue);\n\n    const filterSelectedValues = this.props()?.filterSelectedValues;\n\n    if (filterSelectedValues != null) {\n      values = filterSelectedValues({ beforeValues: this._valuesSubject.getValue(), afterValues: values });\n    }\n\n    if (this._pickOnlyOne) {\n      values = [values[0]].filter((x) => x != null);\n    }\n\n    this._valuesSubject.next(values);\n    this._setFieldValue(values);\n  }\n\n  // MARK: Private\n  private _setFieldValue(values: T[]): void {\n    const fieldGetter = this.field();\n\n    if (fieldGetter && typeof fieldGetter === 'function') {\n      const p = this.props();\n      const asArrayValue = p?.asArrayValue ?? true;\n      let newValue: Maybe<T | T[]> = values;\n\n      if (!asArrayValue) {\n        newValue = values[0];\n      }\n\n      const fieldState = (fieldGetter as any)();\n      if (fieldState?.value?.set) {\n        // Use null (not undefined) for \"no value\": single-value mode yields `values[0]` === undefined\n        // when the selection is empty, and undefined orphans the Signal Forms field (NG01902/NG01901).\n        fieldState.value.set(newValue ?? null);\n      }\n    }\n  }\n\n  private _filterValues(text: Maybe<string>, values: PickableDisplayValueWithHash<T, M, H>[]): Observable<T[]> {\n    const p = this.props();\n    const filterFn = p?.filterValues;\n    const skipOnEmpty = p?.skipFilterFnOnEmpty ?? true;\n    return !filterFn || (skipOnEmpty && !text) ? of(values.map((x) => x.value)) : filterFn(text, values);\n  }\n\n  private _loadDisplayValuesForFieldValues(values: PickableValueFieldValue<T, M>[]): Observable<PickableDisplayValueWithHash<T, M, H>[]> {\n    return this._getDisplayValuesForFieldValues(values);\n  }\n\n  private _loadDisplayValuesForFieldValuesState(values: PickableValueFieldValue<T, M>[]): Observable<LoadingState<PickableDisplayValueWithHash<T, M, H>[]>> {\n    return this._getDisplayValuesForFieldValues(values).pipe(\n      map((displayValues) => successResult(displayValues)),\n      startWithBeginLoading(),\n      shareReplay(1)\n    );\n  }\n\n  private _getDisplayValuesForFieldValues(values: PickableValueFieldValue<T, M>[]): Observable<PickableDisplayValueWithHash<T, M, H>[]> {\n    const hashForValue = this._hashForValue();\n    const displayForValue: PickableValueFieldDisplayFunction<T, M> = this.props()?.displayForValue ?? ((vals) => of(vals.map((v) => ({ ...v, label: String(v.value) }))));\n\n    return this._displayHashMap.pipe(\n      mergeMap((displayMap) => {\n        const mappingResult = values.map((x) => [x, hashForValue(x.value)] as [PickableValueFieldValue<T, M>, H]).map(([x, hash], i) => [i, hash, x, displayMap.get(hash)] as [number, H, PickableValueFieldValue<T, M>, PickableDisplayValueWithHash<T, M, H>]);\n\n        const hasDisplay = mappingResult.filter((x) => Boolean(x[3]));\n        const needsDisplay = mappingResult.filter((x) => !x[3]);\n\n        if (needsDisplay.length > 0) {\n          const displayValuesObs = displayForValue(needsDisplay.map((x) => x[2]));\n\n          return displayValuesObs.pipe(\n            first(),\n            map((displayResults: PickableValueFieldDisplayValue<T, M>[]) => {\n              const displayResultsWithHash: PickableDisplayValueWithHash<T, M, H>[] = displayResults.map((x) => {\n                (x as PickableDisplayValueWithHash<T, M, H>)._hash = hashForValue(x.value);\n                return x as PickableDisplayValueWithHash<T, M, H>;\n              });\n\n              const valueIndexHashMap = new Map(displayResultsWithHash.map((x) => [x._hash, x]));\n              displayResultsWithHash.forEach((x) => displayMap.set(x._hash, x));\n\n              return mappingResult.map((x) => x[3] ?? valueIndexHashMap.get(x[1]));\n            })\n          );\n        }\n\n        return of(hasDisplay.map((x) => x[3]));\n      })\n    );\n  }\n}\n","import { type PrimativeKey } from '@dereekb/util';\nimport { configureDbxForgeFormFieldWrapper } from '../../wrapper/formfield/formfield.wrapper';\nimport { FORGE_PICKABLE_CHIP_FIELD_TYPE, type DbxForgePickableChipFieldDef } from './pickable.field';\nimport { type DbxForgeFieldFunctionDef, dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, dbxForgeBuildFieldDef } from '../../field';\nimport type { DbxForgeField } from '../../../form/forge.form';\n\n// MARK: Pickable Chip Field\n/**\n * Configuration for a forge pickable chip field.\n */\nexport interface DbxForgePickableChipFieldConfig<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends DbxForgeFieldFunctionDef<DbxForgePickableChipFieldDef<T, M, H>> {}\n\nexport type DbxForgePickableChipFieldFunction = <T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey>(config: DbxForgePickableChipFieldConfig<T, M, H>) => DbxForgeField<DbxForgePickableChipFieldDef<T, M, H>>;\n\n/**\n * Selection field rendering selected values as Material chips. Defaults to multi-select; flip to single-select via the underlying props.\n *\n * @param config - Pickable chip field configuration\n * @returns A {@link DbxForgeFormFieldWrapperFieldDef} wrapping a pickable chip field\n *\n * @dbxFormField\n * @dbxFormSlug pickable-chip\n * @dbxFormTier field-factory\n * @dbxFormProduces T | T[]\n * @dbxFormArrayOutput optional\n * @dbxFormNgFormType dbx-pickable-chip\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgePickableChipFieldConfig<T, M, H>\n * @dbxFormPropsInterface DbxForgePickableFieldProps\n * @dbxFormGeneric <T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey>\n *\n * @example\n * ```typescript\n * dbxForgePickableChipField<Tag>({ key: 'tags', label: 'Tags', props: { loadValues: () => loadTags$, displayForValue: displayTag } })\n * ```\n */\nexport const dbxForgePickableChipField = dbxForgeFieldFunction<DbxForgePickableChipFieldConfig>({\n  type: FORGE_PICKABLE_CHIP_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(),\n  buildFieldDef: dbxForgeBuildFieldDef((x) => {\n    // configure form field wrapper\n    x.configure(configureDbxForgeFormFieldWrapper);\n  })\n}) as DbxForgePickableChipFieldFunction;\n","import { type PrimativeKey } from '@dereekb/util';\nimport { configureDbxForgeFormFieldWrapper } from '../../wrapper/formfield/formfield.wrapper';\nimport { FORGE_PICKABLE_LIST_FIELD_TYPE, type DbxForgePickableListFieldDef } from './pickable.field';\nimport { type DbxForgeFieldFunctionDef, dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, dbxForgeBuildFieldDef } from '../../field';\nimport type { DbxForgeField } from '../../../form/forge.form';\n\n// MARK: Pickable List Field\n/**\n * Configuration for a forge pickable list field.\n */\nexport interface DbxForgePickableListFieldConfig<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends DbxForgeFieldFunctionDef<DbxForgePickableListFieldDef<T, M, H>> {}\n\nexport type DbxForgePickableListFieldFunction = <T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey>(config: DbxForgePickableListFieldConfig<T, M, H>) => DbxForgeField<DbxForgePickableListFieldDef<T, M, H>>;\n\n/**\n * Scrollable-list variant of `pickable-chip` — same API, different presentation. Prefer this when the option set is large.\n *\n * @param config - Pickable list field configuration\n * @returns A {@link DbxForgeFormFieldWrapperFieldDef} wrapping a pickable list field\n *\n * @dbxFormField\n * @dbxFormSlug pickable-list\n * @dbxFormTier field-factory\n * @dbxFormProduces T | T[]\n * @dbxFormArrayOutput optional\n * @dbxFormNgFormType dbx-pickable-list\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgePickableListFieldConfig<T, M, H>\n * @dbxFormPropsInterface DbxForgePickableFieldProps\n * @dbxFormGeneric <T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey>\n *\n * @example\n * ```typescript\n * dbxForgePickableListField<Item>({ key: 'items', props: { loadValues, displayForValue } })\n * ```\n */\nexport const dbxForgePickableListField = dbxForgeFieldFunction<DbxForgePickableListFieldConfig>({\n  type: FORGE_PICKABLE_LIST_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(),\n  buildFieldDef: dbxForgeBuildFieldDef((x) => {\n    // configure form field wrapper\n    x.configure(configureDbxForgeFormFieldWrapper);\n  })\n}) as DbxForgePickableListFieldFunction;\n","import { Component, ElementRef, inject } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatDivider } from '@angular/material/divider';\nimport { DbxInjectionComponent } from '@dereekb/dbx-core';\nimport { type PrimativeKey } from '@dereekb/util';\nimport { AbstractForgePickableItemFieldDirective } from './pickable.field.directive';\nimport { setupMetaTracking } from '@ng-forge/dynamic-forms/integration';\n\n/**\n * Forge ValueFieldComponent for pickable chip selection.\n *\n * Renders available values as Material chips with optional text filtering, select-all toggle,\n * and custom display/hash functions. Bridges the FieldTree signal form model with the\n * pickable value loading and caching pipeline.\n */\n@Component({\n  selector: 'dbx-forge-pickable-chip-field',\n  templateUrl: './pickable-chip.field.component.html',\n  imports: [ReactiveFormsModule, MatChipsModule, MatIconModule, MatDivider, DbxInjectionComponent]\n})\nexport class DbxForgePickableChipFieldComponent<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends AbstractForgePickableItemFieldDirective<T, M, H> {\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  constructor() {\n    super();\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'mat-chip-listbox' });\n  }\n\n  toggleAll(): void {\n    if (this.allSelectedSignal()) {\n      this._setValues([]);\n    } else {\n      const items = this.itemsSignal();\n      const allValues = items.filter((x) => !x.disabled).map((x) => x.itemValue.value);\n      this._setValues(allValues);\n    }\n  }\n}\n","<div class=\"dbx-pickable-item-field\">\n  @if (showTextFilterSignal()) {\n    <div class=\"dbx-pickable-item-field-filter\">\n      @if (filterLabelSignal()) {\n        <div class=\"dbx-label\">{{ filterLabelSignal() }}</div>\n      }\n      <input class=\"dbx-forge-bare-input\" [placeholder]=\"'Filter'\" [formControl]=\"inputCtrl\" />\n      <mat-divider></mat-divider>\n    </div>\n  }\n  <div class=\"dbx-pickable-item-field-chips\">\n    <mat-chip-listbox [multiple]=\"multiSelectSignal()\" [selectable]=\"!isDisabledOrReadonlySignal()\" [disabled]=\"isDisabledOrReadonlySignal()\" [attr.aria-invalid]=\"ariaInvalidSignal()\" [attr.aria-describedby]=\"ariaDescribedBySignal()\">\n      @if (showSelectAllButtonSignal() && multiSelectSignal() && !isDisabledOrReadonlySignal()) {\n        <mat-chip-option (click)=\"toggleAll()\" [selected]=\"allSelectedSignal()\">\n          <span class=\"dbx-chip-label\">All</span>\n        </mat-chip-option>\n      }\n      @for (item of itemsSignal(); track item.key) {\n        <mat-chip-option (click)=\"itemClicked(item)\" [selected]=\"item.selected\" [disabled]=\"readonlySignal() || item.disabled\">\n          @if (item.itemValue.icon) {\n            <mat-icon matChipAvatar>{{ item.itemValue.icon }}</mat-icon>\n          }\n          <span class=\"dbx-chip-label\">{{ item.itemValue.label }}</span>\n          @if (item.itemValue.sublabel) {\n            <span class=\"dbx-chip-sublabel\">{{ item.itemValue.sublabel }}</span>\n          }\n        </mat-chip-option>\n      }\n    </mat-chip-listbox>\n    <dbx-injection [config]=\"footerConfigSignal()\"></dbx-injection>\n  </div>\n  @if (noItemsAvailableSignal()) {\n    <output class=\"dbx-label\">No items match this filter.</output>\n  }\n</div>\n","import { Component, ElementRef, inject } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatListModule, type MatSelectionListChange } from '@angular/material/list';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatDivider } from '@angular/material/divider';\nimport { DbxInjectionComponent } from '@dereekb/dbx-core';\nimport { type PrimativeKey } from '@dereekb/util';\nimport { AbstractForgePickableItemFieldDirective } from './pickable.field.directive';\nimport { setupMetaTracking } from '@ng-forge/dynamic-forms/integration';\n\n/**\n * Forge ValueFieldComponent for pickable list selection.\n *\n * Renders available values as a `mat-selection-list` with checkbox-based selection.\n * Supports text filtering, select-all toggle, and custom display/hash functions.\n * Uses `mat-list-option` items with icon, label, and sublabel content projection.\n */\n@Component({\n  selector: 'dbx-forge-pickable-list-field',\n  templateUrl: './pickable-list.field.component.html',\n  imports: [ReactiveFormsModule, MatListModule, MatIconModule, MatDivider, DbxInjectionComponent]\n})\nexport class DbxForgePickableListFieldComponent<T = unknown, M = unknown, H extends PrimativeKey = PrimativeKey> extends AbstractForgePickableItemFieldDirective<T, M, H> {\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  constructor() {\n    super();\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'mat-selection-list' });\n  }\n\n  onSelectionChange(event: MatSelectionListChange): void {\n    const selectedValues = event.source.selectedOptions.selected.map((option) => option.value as T);\n    this._setValues(selectedValues);\n  }\n\n  toggleAll(): void {\n    if (this.allSelectedSignal()) {\n      this._setValues([]);\n    } else {\n      const items = this.itemsSignal();\n      const allValues = items.filter((x) => !x.disabled).map((x) => x.itemValue.value);\n      this._setValues(allValues);\n    }\n  }\n}\n","<div class=\"dbx-pickable-item-field dbx-pickable-item-field-list\">\n  @if (showTextFilterSignal()) {\n    <div class=\"dbx-pickable-item-field-filter\">\n      @if (filterLabelSignal()) {\n        <div class=\"dbx-label\">{{ filterLabelSignal() }}</div>\n      }\n      <input class=\"dbx-forge-bare-input\" [placeholder]=\"'Filter'\" [formControl]=\"inputCtrl\" />\n      <mat-divider></mat-divider>\n    </div>\n  }\n  @if (showSelectAllButtonSignal() && multiSelectSignal() && !isDisabledOrReadonlySignal()) {\n    <div class=\"dbx-pickable-item-field-select-all\">\n      <button class=\"dbx-pickable-select-all-button\" type=\"button\" (click)=\"toggleAll()\">{{ allSelectedSignal() ? 'Deselect All' : 'Select All' }}</button>\n      <mat-divider></mat-divider>\n    </div>\n  }\n  <div class=\"dbx-pickable-item-field-list-content\">\n    <mat-selection-list [multiple]=\"multiSelectSignal()\" [disabled]=\"isDisabledOrReadonlySignal()\" (selectionChange)=\"onSelectionChange($event)\" [attr.aria-invalid]=\"ariaInvalidSignal()\" [attr.aria-describedby]=\"ariaDescribedBySignal()\">\n      @for (item of itemsSignal(); track item.key) {\n        <mat-list-option class=\"dbx-list-view-item\" [value]=\"item.itemValue.value\" [selected]=\"item.selected\" [disabled]=\"readonlySignal() || item.disabled\">\n          @if (item.itemValue.icon) {\n            <mat-icon matListItemIcon>{{ item.itemValue.icon }}</mat-icon>\n          }\n          <div class=\"dbx-default-pickable-item-field-list-item dbx-flex-bar\">\n            <span class=\"dbx-chip-label\">{{ item.itemValue.label }}</span>\n            @if (item.itemValue.sublabel) {\n              <span class=\"dbx-chip-sublabel\">({{ item.itemValue.sublabel }})</span>\n            }\n          </div>\n        </mat-list-option>\n      }\n    </mat-selection-list>\n  </div>\n  <dbx-injection [config]=\"footerConfigSignal()\"></dbx-injection>\n  @if (noItemsAvailableSignal()) {\n    <output class=\"dbx-label\">No items match this filter.</output>\n  }\n</div>\n","import { type Maybe, type PrimativeKey } from '@dereekb/util';\nimport { type BaseValueField } from '@ng-forge/dynamic-forms';\nimport { type Observable } from 'rxjs';\nimport { type SourceSelectDisplayFunction, type SourceSelectLoadSourcesFunction, type SourceSelectMetaValueReader, type SourceSelectOpenFunction, type SourceSelectValueMetaLoader } from '../../../../field/selection/sourceselect/sourceselect';\nimport { type DbxForgeFieldFunctionDef, dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, dbxForgeBuildFieldDef } from '../../field';\n\n// MARK: Field Type Name\n/**\n * The custom forge field type name for the source select field.\n */\nexport const FORGE_SOURCE_SELECT_FIELD_TYPE = 'dbx-source-select' as const;\n\n// MARK: Props\n/**\n * Props interface for the forge source select field.\n *\n * Passed via the `props` property on the forge field definition.\n */\nexport interface DbxForgeSourceSelectFieldProps<T extends PrimativeKey = PrimativeKey, M = unknown> {\n  readonly openSource?: Maybe<SourceSelectOpenFunction<M>>;\n  readonly loadSources?: Maybe<SourceSelectLoadSourcesFunction<M>>;\n  readonly valueReader: SourceSelectMetaValueReader<T, M>;\n  readonly metaLoader: SourceSelectValueMetaLoader<T, M>;\n  readonly displayForValue: SourceSelectDisplayFunction<T, M>;\n  readonly selectButtonIcon?: Maybe<string>;\n  readonly multiple?: Maybe<boolean>;\n  readonly refreshDisplayValues$?: Maybe<Observable<unknown>>;\n  readonly filterable?: Maybe<boolean>;\n  readonly filterableGroups?: Maybe<boolean>;\n  readonly hint?: Maybe<string>;\n}\n\n// MARK: Field Def\n/**\n * Forge field definition interface for the source select field.\n */\nexport interface DbxForgeSourceSelectFieldDef<T extends PrimativeKey = PrimativeKey, M = unknown> extends BaseValueField<DbxForgeSourceSelectFieldProps<T, M>, T | T[]> {\n  readonly type: typeof FORGE_SOURCE_SELECT_FIELD_TYPE;\n}\n\n// MARK: Source Select Field\n/**\n * Configuration for a forge source select field.\n */\nexport interface DbxForgeSourceSelectFieldConfig<T extends PrimativeKey = PrimativeKey, M = unknown> extends DbxForgeFieldFunctionDef<DbxForgeSourceSelectFieldDef<T, M>> {}\n\nexport type DbxForgeSourceSelectFieldFunction = <T extends PrimativeKey = PrimativeKey, M = unknown>(config: DbxForgeSourceSelectFieldConfig<T, M>) => DbxForgeSourceSelectFieldDef<T, M>;\n\n/**\n * Selection field that stores just the value key (`T`) but resolves full metadata (`M`) async for display. Use for reference fields where the form should store only the id.\n *\n * The component uses `<mat-form-field>` with `[formField]` for native ng-forge value binding,\n * proper Material rendering, and built-in logic (hidden/disabled/readonly) support.\n *\n * @param config - Source select field configuration\n * @returns A {@link DbxForgeSourceSelectFieldDef}\n *\n * @dbxFormField\n * @dbxFormSlug source-select\n * @dbxFormTier field-factory\n * @dbxFormProduces T | T[]\n * @dbxFormArrayOutput optional\n * @dbxFormNgFormType dbx-source-select\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeSourceSelectFieldConfig<T, M>\n * @dbxFormGeneric <T extends PrimativeKey = PrimativeKey, M = unknown>\n *\n * @example\n * ```typescript\n * dbxForgeSourceSelectField<string, User>({ key: 'userId', props: { valueReader: (u) => u.id, metaLoader, displayForValue } })\n * ```\n */\nexport const dbxForgeSourceSelectField = dbxForgeFieldFunction<DbxForgeSourceSelectFieldConfig>({\n  type: FORGE_SOURCE_SELECT_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(),\n  buildFieldDef: dbxForgeBuildFieldDef(() => {\n    // no-op\n  })\n}) as DbxForgeSourceSelectFieldFunction;\n","import { Component, computed, effect, ElementRef, inject, input, type OnDestroy, type OnInit, viewChild } from '@angular/core';\nimport { FormField, type FieldTree } from '@angular/forms/signals';\nimport { MatError, MatFormField, MatLabel, MatSuffix } from '@angular/material/form-field';\nimport { MatOptgroup, MatOption, MatSelect } from '@angular/material/select';\nimport { MatHint } from '@angular/material/input';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe, createResolvedErrorsSignal, setupMetaTracking, shouldShowErrors } from '@ng-forge/dynamic-forms/integration';\nimport { MATERIAL_CONFIG } from '@ng-forge/dynamic-forms-material';\nimport { AsyncPipe } from '@angular/common';\nimport { type Maybe, type PrimativeKey, addToSetCopy, asArray, convertMaybeToArray, filterEmptyArrayValues, filterMaybeArrayValues, lastValue, makeValuesGroupMap, mergeArrays, separateValues, setContainsAllValues, setsAreEquivalent, sortByStringFunction } from '@dereekb/util';\nimport { filterMaybe, type LoadingState, isLoadingStateWithDefinedValue, isLoadingStateLoading, type LoadingStateWithDefinedValue, startWithBeginLoading, successResult, beginLoading, mapLoadingStateValueWithOperator, loadingStateContext, type WorkUsingContext, valueFromFinishedLoadingState } from '@dereekb/rxjs';\nimport { DbxActionModule, DbxActionSnackbarErrorDirective, DbxButtonComponent, DbxLoadingComponent } from '@dereekb/dbx-web';\nimport { BehaviorSubject, combineLatest, distinctUntilChanged, first, map, mergeMap, of, scan, shareReplay, switchMap, tap, type Observable } from 'rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport {\n  type SourceSelectDisplayValue,\n  type SourceSelectDisplayValueGroup,\n  type SourceSelectLoadSource,\n  type SourceSelectLoadSourceLoadingState,\n  type SourceSelectOpenSourceResult,\n  type SourceSelectOptions,\n  type SourceSelectValue,\n  type SourceSelectValueGroup\n} from '../../../../field/selection/sourceselect/sourceselect';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport type { DbxForgeSourceSelectFieldProps } from './sourceselect.field';\nimport { cleanSubscription, completeOnDestroy } from '@dereekb/dbx-core';\n\ninterface SelectFieldOpenSourceMap<T extends PrimativeKey = PrimativeKey, M = unknown> {\n  readonly values: SourceSelectValue<T, M>[];\n  readonly valuesSet: Set<T>;\n}\n\n// MARK: Source Select Field Component\n/**\n * Forge ValueFieldComponent for source-select fields.\n *\n * Renders a Material select dropdown inside `<mat-form-field>` populated from multiple data sources\n * (open source dialogs, loaded sources, and form control values).\n * Merges values, deduplicates by key, groups options by label,\n * and caches display values and metadata for performance.\n *\n * Uses `[formField]` for native ng-forge value binding, `<mat-form-field>` for proper\n * Material rendering, and `[attr.hidden]` for built-in logic (hidden/disabled) support.\n */\n@Component({\n  selector: 'dbx-forge-source-select-field',\n  templateUrl: './sourceselect.field.component.html',\n  imports: [DbxActionSnackbarErrorDirective, MatFormField, MatLabel, MatSelect, MatOption, MatOptgroup, MatHint, MatError, MatSuffix, FormField, DynamicTextPipe, AsyncPipe, DbxButtonComponent, DbxActionModule, DbxLoadingComponent],\n  host: {\n    '[id]': '`${key()}`',\n    '[attr.data-testid]': 'key()',\n    '[class]': 'className()',\n    '[attr.hidden]': 'field()().hidden() || null'\n  }\n})\nexport class DbxForgeSourceSelectFieldComponent<T extends PrimativeKey = PrimativeKey, M = unknown> implements OnInit, OnDestroy {\n  private readonly materialConfig = inject(MATERIAL_CONFIG, { optional: true });\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  // ng-forge ValueFieldComponent inputs\n  readonly field = input.required<FieldTree<T | T[]>>();\n  readonly key = input.required<string>();\n  readonly label = input<DynamicText | undefined>();\n  readonly placeholder = input<DynamicText | undefined>();\n  readonly className = input<string>('');\n  readonly tabIndex = input<number | undefined>();\n  readonly props = input<DbxForgeSourceSelectFieldProps<T, M> | undefined>();\n  readonly meta = input<FieldMeta | undefined>();\n  readonly validationMessages = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  private readonly _cacheMetaSub = cleanSubscription();\n  private readonly _clearDisplayHashMapSub = cleanSubscription();\n  private readonly _valueMetaHashMap = completeOnDestroy(new BehaviorSubject<Map<T, SourceSelectValue<T, M>>>(new Map()));\n  private readonly _displayHashMap = completeOnDestroy(new BehaviorSubject<Map<T, SourceSelectDisplayValue<T, M>>>(new Map()));\n  private readonly _fromOpenSource = completeOnDestroy(new BehaviorSubject<SelectFieldOpenSourceMap<T, M>>({ values: [], valuesSet: new Set() }));\n  private readonly _loadSources = completeOnDestroy(new BehaviorSubject<Maybe<Observable<SourceSelectLoadSource<M>[]>>>(undefined));\n  private readonly _valuesSubject = completeOnDestroy(new BehaviorSubject<T[]>([]));\n  private readonly _filterText$ = completeOnDestroy(new BehaviorSubject<string>(''));\n\n  readonly buttonElement = viewChild<string, ElementRef<HTMLElement>>('button', { read: ElementRef<HTMLElement> });\n  readonly filterInputElement = viewChild<string, ElementRef<HTMLInputElement>>('filterInput', { read: ElementRef<HTMLInputElement> });\n\n  // Computed signals from props\n  readonly hintSignal = computed(() => this.props()?.hint);\n\n  // Material config\n  readonly effectiveAppearanceSignal = computed(() => this.materialConfig?.appearance ?? 'outline');\n  readonly effectiveSubscriptSizingSignal = computed(() => this.materialConfig?.subscriptSizing ?? 'dynamic');\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as any, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as any);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaRequiredSignal = computed(() => (this.field()().required() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const hintId = this.hintIdSignal();\n    if (this.errorsToDisplaySignal().length > 0) return errorId;\n    if (this.props()?.hint) return hintId;\n    return null;\n  });\n\n  readonly multipleSignal = computed(() => this.props()?.multiple ?? false);\n  readonly showOpenSourceButtonSignal = computed(() => Boolean(this.props()?.openSource));\n  readonly selectButtonIconSignal = computed(() => this.props()?.selectButtonIcon ?? 'add');\n  readonly filterableSignal = computed(() => this.props()?.filterable !== false);\n  readonly filterableGroupsSignal = computed(() => this.props()?.filterableGroups !== false);\n  readonly selectPanelClassSignal = computed(() => (this.filterableSignal() ? 'dbx-source-select-filterable-panel' : ''));\n\n  readonly values$: Observable<T[]> = this._valuesSubject.asObservable().pipe(shareReplay(1));\n\n  readonly allValuesEverSelected$: Observable<T[]> = this.values$.pipe(\n    scan((acc, values) => {\n      let result: Set<T> = acc;\n      if (!setContainsAllValues(acc, values)) {\n        result = addToSetCopy(acc, values);\n      }\n      return result;\n    }, new Set<T>()),\n    distinctUntilChanged(),\n    map((x) => Array.from(x)),\n    shareReplay(1)\n  );\n\n  readonly sourceSelectValuesFromValuesState$: Observable<LoadingState<SourceSelectValue<T, M>[]>> = this.allValuesEverSelected$.pipe(\n    distinctUntilChanged(),\n    switchMap((values: T[]) => this._loadSourceSelectValueForValues(values)),\n    shareReplay(1)\n  );\n\n  readonly loadSources$: Observable<LoadingState<SourceSelectValueGroup<T, M>[]>> = this._loadSources.pipe(\n    filterMaybe(),\n    switchMap((loadSource) => {\n      const p = this.props();\n      const valueReader = p?.valueReader;\n\n      if (!valueReader) {\n        return of(successResult([] as SourceSelectValueGroup<T, M>[]));\n      }\n\n      return loadSource.pipe(\n        switchMap((sources: SourceSelectLoadSource<M>[]) => {\n          const sourceObs: Observable<SourceSelectLoadSourceLoadingState<M>>[] = sources.map((x) => x.meta.pipe(map((metaState) => ({ ...metaState, label: x.label }))));\n\n          if (sourceObs.length === 0) {\n            return of(successResult([] as SourceSelectValueGroup<T, M>[]));\n          }\n\n          return combineLatest(sourceObs).pipe(\n            map((x) => {\n              const statesWithValues = x.filter((y) => isLoadingStateWithDefinedValue(y));\n              const loading = x.some(isLoadingStateLoading);\n              const value: SourceSelectValueGroup<T, M>[] = statesWithValues.map((y) => ({\n                label: y.label,\n                values: y.value.map((meta) => ({ meta, value: valueReader(meta) }))\n              }));\n\n              return { loading, value };\n            })\n          );\n        })\n      );\n    })\n  );\n\n  readonly fromOpenSource$: Observable<SourceSelectValueGroup<T, M>> = this._fromOpenSource.pipe(\n    distinctUntilChanged((a, b) => setsAreEquivalent(a.valuesSet, b.valuesSet)),\n    map((x) => ({ label: '', values: x.values })),\n    shareReplay(1)\n  );\n\n  readonly valueGroupsFromSourcesState$: Observable<LoadingStateWithDefinedValue<SourceSelectValueGroup<T, M>[]>> = combineLatest([this.fromOpenSource$, this.loadSources$]).pipe(\n    map(([fromOpenSourceGroup, loadSources]) => {\n      const loadSourcesValue = loadSources.value ?? [];\n      const value: SourceSelectValueGroup<T, M>[] = [fromOpenSourceGroup, ...loadSourcesValue];\n      return { loading: loadSources.loading, value };\n    }),\n    shareReplay(1)\n  );\n\n  readonly allValueGroupsState$: Observable<LoadingState<SourceSelectValueGroup<T, M>[]>> = this.sourceSelectValuesFromValuesState$.pipe(\n    switchMap((sourceSelectValuesFromValues: LoadingState<SourceSelectValue<T, M>[]>) => {\n      if (isLoadingStateWithDefinedValue(sourceSelectValuesFromValues)) {\n        const valuesFromValuesGroup: SourceSelectValueGroup<T, M> = { label: '', values: sourceSelectValuesFromValues.value };\n\n        return this.valueGroupsFromSourcesState$.pipe(\n          map((sourcesState) => ({\n            loading: sourceSelectValuesFromValues.loading || sourcesState.loading,\n            value: [valuesFromValuesGroup, ...sourcesState.value]\n          }))\n        );\n      }\n\n      return of(beginLoading<SourceSelectValueGroup<T, M>[]>({}));\n    }),\n    shareReplay(1)\n  );\n\n  readonly allOptionGroupsState$: Observable<LoadingState<SourceSelectDisplayValueGroup<T, M>[]>> = this.allValueGroupsState$.pipe(\n    mapLoadingStateValueWithOperator(\n      switchMap((groups: SourceSelectValueGroup<T, M>[]) => {\n        const allGroupsReducedByLabel = makeValuesGroupMap(groups, (x) => x.label) as Map<string, SourceSelectValueGroup<T, M>[]>;\n        const valuesEncountered = new Set<T>();\n        const allUniqueValues: SourceSelectValue<T, M>[] = [];\n        const simplifiedValuesGroups: SourceSelectValueGroup<T, M>[] = [];\n\n        Array.from(allGroupsReducedByLabel.entries())\n          .sort(sortByStringFunction((x) => x[0]))\n          .forEach(([label, groups]) => {\n            const values: SourceSelectValue<T, M>[] = [];\n\n            groups.forEach((group) => {\n              group.values.forEach((selectValue) => {\n                if (!valuesEncountered.has(selectValue.value)) {\n                  values.push(selectValue);\n                  allUniqueValues.push(selectValue);\n                  valuesEncountered.add(selectValue.value);\n                }\n              });\n            });\n\n            if (values.length > 0) {\n              simplifiedValuesGroups.push({ label, values });\n            }\n          });\n\n        return this._getDisplayValuesForSelectValues(allUniqueValues).pipe(\n          map((displayValues) => {\n            const displayValuesMap = new Map(displayValues.map((x) => [x.value, x]));\n\n            const displayGroups: SourceSelectDisplayValueGroup<T, M>[] = simplifiedValuesGroups.map((valueGroup) => ({\n              label: valueGroup.label,\n              values: filterMaybeArrayValues(valueGroup.values.map((x) => displayValuesMap.get(x.value)))\n            }));\n\n            return displayGroups;\n          })\n        );\n      })\n    ),\n    shareReplay(1)\n  );\n\n  readonly allOptionGroups$: Observable<SourceSelectDisplayValueGroup<T, M>[]> = this.allOptionGroupsState$.pipe(\n    valueFromFinishedLoadingState(),\n    map((x) => x ?? []),\n    shareReplay(1)\n  );\n\n  readonly options$: Observable<SourceSelectOptions<T, M>> = this.allOptionGroups$.pipe(\n    map((x) => {\n      const { included: groupedValues, excluded: nonGroupedGroup } = separateValues(x, (y) => Boolean(y.label));\n      return { nonGroupedValues: nonGroupedGroup[0]?.values ?? [], groupedValues };\n    }),\n    shareReplay(1)\n  );\n\n  readonly filteredOptions$: Observable<SourceSelectOptions<T, M>> = combineLatest([this.options$, this._filterText$, this.values$]).pipe(\n    map(([options, filterText, currentValues]) => {\n      if (!filterText) return options;\n\n      const lowerFilter = filterText.toLowerCase();\n      const selectedSet = new Set(currentValues);\n      const matches = (dv: SourceSelectDisplayValue<T, M>) => selectedSet.has(dv.value) || dv.label.toLowerCase().includes(lowerFilter);\n      const filterGroups = this.filterableGroupsSignal();\n\n      return {\n        nonGroupedValues: options.nonGroupedValues.filter(matches),\n        groupedValues: options.groupedValues\n          .map((g) => {\n            const groupLabelMatches = filterGroups && g.label.toLowerCase().includes(lowerFilter);\n            const filteredValues = groupLabelMatches ? g.values : g.values.filter(matches);\n            return { label: g.label, values: filteredValues };\n          })\n          .filter((g: SourceSelectDisplayValueGroup<T, M>) => g.values.length > 0)\n      };\n    }),\n    shareReplay(1)\n  );\n\n  readonly filteredNonGroupedValuesSignal = toSignal(this.filteredOptions$.pipe(map((x) => x.nonGroupedValues)));\n  readonly filteredGroupedOptionsSignal = toSignal(this.filteredOptions$.pipe(map((x) => x.groupedValues)));\n\n  readonly context = loadingStateContext({ obs: this.allOptionGroupsState$ });\n\n  // Sync field value to _valuesSubject\n  private readonly _syncFieldValueEffect = effect(() => {\n    const fieldGetter = this.field();\n    if (!fieldGetter) return;\n\n    // FieldTree is a signal — call it to get the field state, then read .value()\n    const fieldState = typeof fieldGetter === 'function' ? (fieldGetter as any)() : undefined;\n    const fieldValue = fieldState?.value?.() as Maybe<T | T[]>;\n    // ng-forge can seed the field with the empty-string primitive default; treat nullish/empty as unset.\n    const values = filterEmptyArrayValues(fieldValue == null ? [] : convertMaybeToArray(fieldValue));\n    this._valuesSubject.next(values);\n  });\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'mat-select' });\n  }\n\n  ngOnInit(): void {\n    const p = this.props();\n\n    this._loadSources.next(p?.loadSources?.() || of([]));\n\n    if (p?.refreshDisplayValues$) {\n      this._clearDisplayHashMapSub.subscription = p.refreshDisplayValues$.subscribe(() => this._displayHashMap.next(new Map()));\n    }\n\n    // Cache meta values from sources\n    this._cacheMetaSub.subscription = this.valueGroupsFromSourcesState$.subscribe((x) => {\n      const hashMap = this._valueMetaHashMap.value;\n      x.value.forEach((group) => group.values.forEach((v) => hashMap.set(v.value, v)));\n    });\n  }\n\n  ngOnDestroy(): void {\n    this.context.destroy();\n  }\n\n  onSelectOpenedChange(opened: boolean): void {\n    if (opened) {\n      setTimeout(() => {\n        const inputEl = this.filterInputElement();\n        if (inputEl) {\n          inputEl.nativeElement.focus();\n        }\n      });\n    } else {\n      this._filterText$.next('');\n    }\n  }\n\n  onFilterInput(event: Event): void {\n    const input = event.target as HTMLInputElement;\n    this._filterText$.next(input.value);\n  }\n\n  onFilterKeydown(event: KeyboardEvent): void {\n    if (event.key !== 'Escape' && event.key !== 'Tab') {\n      event.stopPropagation();\n    }\n  }\n\n  readonly handleSelectOptions: WorkUsingContext<unknown> = (_, context) => {\n    const p = this.props();\n    const openSource = p?.openSource;\n    const origin = this.buttonElement();\n\n    if (openSource && origin) {\n      const sourceObs = openSource({ origin });\n      context.startWorkingWithObservable(\n        sourceObs.pipe(\n          first(),\n          tap((result: SourceSelectOpenSourceResult<M>) => {\n            const valueReader = p?.valueReader;\n            if (!valueReader) return;\n\n            const valuesToAdd = mergeArrays([result.select, result.options]);\n            if (valuesToAdd.length) {\n              this._addToOpenSourceMap(valuesToAdd);\n            }\n\n            if (result.set) {\n              this._setCurrentValue(result.set.map((x) => valueReader(x)));\n            } else if (result.select) {\n              this._addToCurrentValue(result.select.map((x) => valueReader(x)));\n            }\n          })\n        )\n      );\n    } else {\n      context.reject();\n    }\n  };\n\n  // MARK: Internal\n  private _addToOpenSourceMap(input: M[]): void {\n    const p = this.props();\n    const valueReader = p?.valueReader;\n    if (!valueReader) return;\n\n    const { values: meta, valuesSet: initialValues } = this._fromOpenSource.value;\n    const newMetaFromInput: SourceSelectValue<T, M>[] = [];\n    const valuesSet = new Set(initialValues);\n\n    input.forEach((x) => {\n      const value = valueReader(x);\n      if (!valuesSet.has(value)) {\n        newMetaFromInput.push({ meta: x, value });\n        valuesSet.add(value);\n      }\n    });\n\n    if (newMetaFromInput.length > 0) {\n      this._fromOpenSource.next({ values: [...meta, ...newMetaFromInput], valuesSet });\n    }\n  }\n\n  private _addToCurrentValue(values: T[]): void {\n    const currentValue = asArray(this._valuesSubject.getValue());\n    this._setCurrentValue([...currentValue, ...values]);\n  }\n\n  private _setCurrentValue(newValueArray: T[]): void {\n    const p = this.props();\n    const multiple = p?.multiple ?? false;\n    const sanitized = filterEmptyArrayValues(newValueArray);\n    const value = multiple ? sanitized : lastValue(sanitized);\n    const valuesArray = convertMaybeToArray(value);\n    this._valuesSubject.next(valuesArray);\n    this._setFieldValue(value);\n  }\n\n  private _setFieldValue(value: Maybe<T | T[]>): void {\n    const fieldGetter = this.field();\n    if (!fieldGetter || typeof fieldGetter !== 'function') return;\n\n    const fieldState = (fieldGetter as any)();\n    if (fieldState?.value?.set) {\n      // Use null (not undefined) for \"no value\" — undefined orphans the Signal Forms field (NG01902/NG01901).\n      fieldState.value.set(value ?? null);\n    }\n  }\n\n  private _loadSourceSelectValueForValues(values: T[]): Observable<LoadingState<SourceSelectValue<T, M>[]>> {\n    return this._getSourceSelectValueForValues(values).pipe(\n      map((sourceSelectValues: SourceSelectValue<T, M>[]) => successResult(sourceSelectValues)),\n      startWithBeginLoading(),\n      shareReplay(1)\n    );\n  }\n\n  private _getSourceSelectValueForValues(values: T[]): Observable<SourceSelectValue<T, M>[]> {\n    const p = this.props();\n    const valueReader = p?.valueReader;\n    const metaLoader = p?.metaLoader;\n\n    if (!valueReader || !metaLoader) {\n      return of([]);\n    }\n\n    return this._valueMetaHashMap.pipe(\n      mergeMap((metaMap) => {\n        const mappingResult = values.map((hash, i) => [i, hash, metaMap.get(hash)] as [number, T, SourceSelectValue<T, M>]);\n        const { included: hasMeta, excluded: needsMeta } = separateValues(mappingResult, (x) => Boolean(x[2]));\n\n        if (needsMeta.length > 0) {\n          return metaLoader(needsMeta.map((x) => x[1])).pipe(\n            first(),\n            map((metaResults) => {\n              const metaResultsMapping: SourceSelectValue<T, M>[] = metaResults.filter((meta) => meta != null).map((meta) => ({ meta, value: valueReader(meta) }));\n              const valueIndexHashMap = new Map(metaResultsMapping.map((x) => [x.value, x]));\n              metaResultsMapping.forEach((x) => metaMap.set(x.value, x));\n              return mappingResult.map((x) => x[2] ?? valueIndexHashMap.get(x[1])).filter((x) => x != null);\n            })\n          );\n        }\n\n        return of(hasMeta.map((x) => x[2]));\n      })\n    );\n  }\n\n  private _getDisplayValuesForSelectValues(values: SourceSelectValue<T, M>[]): Observable<SourceSelectDisplayValue<T, M>[]> {\n    const p = this.props();\n    const displayForValue = p?.displayForValue;\n\n    if (!displayForValue) {\n      return of(values.map((v) => ({ ...v, label: String(v.value) })));\n    }\n\n    return this._displayHashMap.pipe(\n      mergeMap((displayMap) => {\n        const mappingResult = values.map((x) => [x, x.value] as [SourceSelectValue<T, M>, T]).map(([x, hash], i) => [i, hash, x, displayMap.get(hash)] as [number, T, SourceSelectValue<T, M>, SourceSelectDisplayValue<T, M>]);\n        const hasDisplay = mappingResult.filter((x) => Boolean(x[3]));\n        const needsDisplay = mappingResult.filter((x) => !x[3]);\n\n        if (needsDisplay.length > 0) {\n          return displayForValue(needsDisplay.map((x) => x[2])).pipe(\n            first(),\n            map((displayResults: SourceSelectDisplayValue<T, M>[]) => {\n              const displayResultsMapping: [SourceSelectDisplayValue<T, M>, T][] = displayResults.map((x) => [x, x.value]);\n              const valueIndexHashMap = new Map(displayResultsMapping.map(([x, hash]) => [hash, x]));\n              displayResultsMapping.forEach(([x, hash]) => displayMap.set(hash, x));\n              return mappingResult.map((x) => x[3] ?? valueIndexHashMap.get(x[1]));\n            })\n          );\n        }\n\n        return of(hasDisplay.map((x) => x[3]));\n      })\n    );\n  }\n}\n","@let f = field();\n@let selectId = key() + '-select';\n\n<mat-form-field class=\"dbx-w100\" [appearance]=\"effectiveAppearanceSignal()\" [subscriptSizing]=\"effectiveSubscriptSizingSignal()\">\n  @if (label(); as label) {\n    <mat-label>{{ label | dynamicText | async }}</mat-label>\n  }\n\n  <mat-select [id]=\"selectId\" [formField]=\"f\" [multiple]=\"multipleSignal()\" [panelClass]=\"selectPanelClassSignal()\" (openedChange)=\"onSelectOpenedChange($event)\" [attr.aria-invalid]=\"ariaInvalidSignal()\" [attr.aria-required]=\"ariaRequiredSignal()\" [attr.aria-describedby]=\"ariaDescribedBySignal()\">\n    @if (filterableSignal()) {\n      <div class=\"dbx-source-select-filter-container\">\n        <input #filterInput class=\"dbx-forge-bare-input dbx-source-select-filter-input\" type=\"text\" placeholder=\"Type to filter...\" (input)=\"onFilterInput($event)\" (keydown)=\"onFilterKeydown($event)\" />\n      </div>\n    }\n    @for (value of filteredNonGroupedValuesSignal(); track value.value) {\n      <mat-option [value]=\"value.value\">{{ value.label }}</mat-option>\n    }\n    @for (optionGroup of filteredGroupedOptionsSignal(); track optionGroup.label) {\n      <mat-optgroup [label]=\"optionGroup.label\">\n        @for (value of optionGroup.values; track value.value) {\n          <mat-option [value]=\"value.value\">{{ value.label }}</mat-option>\n        }\n      </mat-optgroup>\n    }\n  </mat-select>\n\n  @if (showOpenSourceButtonSignal() && !isDisabled()) {\n    <div matSuffix class=\"dbx-source-select-field-suffix\">\n      <dbx-action dbxActionValue [dbxActionHandler]=\"handleSelectOptions\" dbxActionSnackbarError>\n        <dbx-button #button dbxActionButton [fab]=\"true\" [iconOnly]=\"true\" [icon]=\"selectButtonIconSignal()\"></dbx-button>\n      </dbx-action>\n    </div>\n  }\n\n  <dbx-loading class=\"dbx-source-select-field-loading\" [linear]=\"true\" [context]=\"context\"></dbx-loading>\n\n  @if (errorsToDisplaySignal()[0]; as error) {\n    <mat-error [id]=\"errorIdSignal()\">{{ error.message }}</mat-error>\n  } @else if (hintSignal()) {\n    <mat-hint [id]=\"hintIdSignal()\">{{ hintSignal() }}</mat-hint>\n  }\n</mat-form-field>\n","import { type PrimativeKey, type ReadKeyFunction } from '@dereekb/util';\nimport { type ListLoadingState } from '@dereekb/rxjs';\nimport { type AbstractDbxSelectionListWrapperDirective } from '@dereekb/dbx-web';\nimport { type Observable } from 'rxjs';\nimport { type Type } from '@angular/core';\nimport type { BaseValueField } from '@ng-forge/dynamic-forms';\nimport { configureDbxForgeFormFieldWrapper } from '../../wrapper/formfield/formfield.wrapper';\nimport { type DbxForgeFieldFunctionDef, dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, dbxForgeBuildFieldDef } from '../../field';\nimport type { DbxForgeField } from '../../../form/forge.form';\n\n// MARK: Field Type Name\n/**\n * The custom forge field type name for the list selection field.\n */\nexport const FORGE_LIST_SELECTION_FIELD_TYPE = 'dbx-list-selection' as const;\n\n// MARK: Props\n/**\n * Max-height value for the rendered list. Either a CSS length passthrough\n * (`'60vh'`, `'400px'`, …), a number interpreted as pixels, or `'none'` to\n * remove the cap entirely.\n */\nexport type DbxForgeListSelectionFieldMaxHeight = string | number;\n\n/**\n * Props interface for the forge list selection field.\n *\n * Passed via the `props` property on the forge field definition.\n */\nexport interface DbxForgeListSelectionFieldProps<T = unknown, C extends AbstractDbxSelectionListWrapperDirective<T> = AbstractDbxSelectionListWrapperDirective<T>, K extends PrimativeKey = PrimativeKey> {\n  /**\n   * List component class to render items from. Can be provided as an Observable for lazy loading.\n   */\n  readonly listComponentClass: Observable<Type<C>>;\n  /**\n   * Read key function to extract the identifier from each item.\n   */\n  readonly readKey: ReadKeyFunction<T, K>;\n  /**\n   * Observable that provides the items to select.\n   */\n  readonly state$: Observable<ListLoadingState<T>>;\n  /**\n   * Function that signals to load more items.\n   */\n  readonly loadMore?: () => void;\n  /**\n   * Hint text shown below the field.\n   */\n  readonly hint?: string;\n  /**\n   * When `false`, render the list bare without the surrounding Material\n   * form-field wrapper (no notched outline, no notch label, no hint chrome\n   * below). The label/hint inputs become inert in that mode. Defaults to `true`.\n   */\n  readonly wrapped?: boolean;\n  /**\n   * Override the default 300px max-height cap on the rendered list.\n   *\n   * - `undefined` (default) — leave the existing CSS variable alone.\n   * - `'none'` — remove the cap entirely (the list grows to fit its content).\n   * - `number` — interpreted as pixels (`{value}px`).\n   * - `string` — passthrough (e.g. `'60vh'`, `'clamp(200px, 50vh, 600px)'`).\n   */\n  readonly maxHeight?: DbxForgeListSelectionFieldMaxHeight;\n}\n\n// MARK: Field Def\n/**\n * Forge field definition interface for the list selection field.\n */\nexport interface DbxForgeListSelectionFieldDef<T = unknown, C extends AbstractDbxSelectionListWrapperDirective<T> = AbstractDbxSelectionListWrapperDirective<T>, K extends PrimativeKey = PrimativeKey> extends BaseValueField<DbxForgeListSelectionFieldProps<T, C, K>, K[]> {\n  readonly type: typeof FORGE_LIST_SELECTION_FIELD_TYPE;\n}\n\n// MARK: List Selection Field\n/**\n * Configuration for a forge list selection field.\n */\nexport interface DbxForgeListSelectionFieldConfig<T = unknown, C extends AbstractDbxSelectionListWrapperDirective<T> = AbstractDbxSelectionListWrapperDirective<T>, K extends PrimativeKey = PrimativeKey> extends DbxForgeFieldFunctionDef<DbxForgeListSelectionFieldDef<T, C, K>> {}\n\nexport type DbxForgeListSelectionFieldFunction = <T = unknown, C extends AbstractDbxSelectionListWrapperDirective<T> = AbstractDbxSelectionListWrapperDirective<T>, K extends PrimativeKey = PrimativeKey>(config: DbxForgeListSelectionFieldConfig<T, C, K>) => DbxForgeField<DbxForgeListSelectionFieldDef<T, C, K>>;\n\n/**\n * Multi-select backed by a lazy-loadable custom list component. Use when you need complete control over item layout and pagination.\n *\n * @param config - List selection field configuration\n * @returns A {@link DbxForgeFormFieldWrapperFieldDef} wrapping a list selection field\n *\n * @dbxFormField\n * @dbxFormSlug list-selection\n * @dbxFormTier field-factory\n * @dbxFormProduces K[]\n * @dbxFormArrayOutput yes\n * @dbxFormNgFormType dbx-list-selection\n * @dbxFormWrapperPattern material-form-field-wrapped\n * @dbxFormConfigInterface DbxForgeListSelectionFieldConfig<T, C, K>\n * @dbxFormGeneric <T = unknown, C extends AbstractDbxSelectionListWrapperDirective<T> = AbstractDbxSelectionListWrapperDirective<T>, K extends PrimativeKey = PrimativeKey>\n *\n * @example\n * ```typescript\n * dbxForgeListSelectionField<Item, MyListComponent, string>({ key: 'items', props: { listComponentClass, readKey: (i) => i.id, state$ } })\n * ```\n */\nexport const dbxForgeListSelectionField = dbxForgeFieldFunction<DbxForgeListSelectionFieldConfig>({\n  type: FORGE_LIST_SELECTION_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder(),\n  buildFieldDef: dbxForgeBuildFieldDef((x) => {\n    const props = x.getProps();\n\n    if (props?.wrapped !== false) {\n      x.configure(configureDbxForgeFormFieldWrapper);\n    }\n  })\n}) as DbxForgeListSelectionFieldFunction;\n","import { Component, computed, effect, ElementRef, inject, input, type OnInit, type Type } from '@angular/core';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { type Maybe, type PrimativeKey, readKeysFrom, convertMaybeToArray, hasDifferentValues, isSelectedDecisionFunctionFactory } from '@dereekb/util';\nimport { DbxInjectionComponent, type DbxInjectionComponentConfig, cleanSubscription, completeOnDestroy } from '@dereekb/dbx-core';\nimport { switchMapFilterMaybe, distinctUntilHasDifferentValues } from '@dereekb/rxjs';\nimport { type AbstractDbxSelectionListWrapperDirective, type ListSelectionState, type DbxValueListItemDecisionFunction, dbxValueListItemDecisionFunction, DbxListModifierModule } from '@dereekb/dbx-web';\nimport { BehaviorSubject, map, type Observable, shareReplay } from 'rxjs';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { type FieldTree } from '@angular/forms/signals';\nimport { type DynamicText, type FieldMeta, type ValidationMessages } from '@ng-forge/dynamic-forms';\nimport { createResolvedErrorsSignal, setupMetaTracking, shouldShowErrors } from '@ng-forge/dynamic-forms/integration';\nimport { type DbxForgeListSelectionFieldProps } from './list.field';\nimport { dbxForgeFieldDisabled } from '../../field.util';\n\n// MARK: List Selection Field Component\n/**\n * Forge ValueFieldComponent for list-based selection.\n *\n * Renders items via a custom {@link AbstractDbxSelectionListWrapperDirective} component\n * and tracks selected items by key. Bridges the FieldTree signal form model\n * with the dbx-web list selection infrastructure.\n */\n@Component({\n  selector: 'dbx-forge-list-selection-field',\n  templateUrl: './list.field.component.html',\n  imports: [DbxListModifierModule, DbxInjectionComponent, MatDividerModule]\n})\nexport class DbxForgeListSelectionFieldComponent<T = unknown, C extends AbstractDbxSelectionListWrapperDirective<T> = AbstractDbxSelectionListWrapperDirective<T>, K extends PrimativeKey = PrimativeKey> implements OnInit {\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  // ng-forge ValueFieldComponent inputs\n  readonly field = input.required<FieldTree<K[]>>();\n  readonly key = input.required<string>();\n  readonly label = input<DynamicText | undefined>();\n  readonly placeholder = input<DynamicText | undefined>();\n  readonly className = input<string>('');\n  readonly tabIndex = input<number | undefined>();\n  readonly props = input<DbxForgeListSelectionFieldProps<T, C, K> | undefined>();\n  readonly meta = input<FieldMeta | undefined>();\n  readonly validationMessages = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n  readonly isDisabled$ = toObservable(this.isDisabled);\n\n  private readonly _selectionEventSub = cleanSubscription();\n  private readonly _loadMoreSub = cleanSubscription();\n  private readonly _listComponentClassObs = completeOnDestroy(new BehaviorSubject<Maybe<Observable<Type<C>>>>(undefined));\n  private readonly _valuesSubject = completeOnDestroy(new BehaviorSubject<K[]>([]));\n\n  readonly labelSignal = computed(() => {\n    const l = this.label();\n    return typeof l === 'string' ? l : undefined;\n  });\n\n  readonly hintSignal = computed(() => this.props()?.hint);\n\n  /**\n   * Resolves the configured `maxHeight` prop into a CSS length string for the\n   * `--dbx-forge-list-item-field-height` custom property. Returns `null` when\n   * the prop is absent so the existing 300px default in `_list.scss` wins.\n   */\n  readonly maxHeightCssVarSignal = computed<Maybe<string>>(() => {\n    const raw = this.props()?.maxHeight;\n\n    if (raw == null) {\n      return null;\n    }\n\n    if (raw === 'none') {\n      return 'none';\n    }\n\n    if (typeof raw === 'number') {\n      return `${raw}px`;\n    }\n\n    return raw;\n  });\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as any, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as any);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const hintId = this.hintIdSignal();\n    if (this.errorsToDisplaySignal().length > 0) return errorId;\n    if (this.props()?.hint) return hintId;\n    return null;\n  });\n\n  readonly listComponentClass$ = this._listComponentClassObs.pipe(switchMapFilterMaybe());\n\n  readonly config$: Observable<DbxInjectionComponentConfig<C>> = this.listComponentClass$.pipe(\n    map((componentClass) => {\n      const p = this.props();\n      const loadMore = p?.loadMore;\n      const state$ = p?.state$;\n\n      const config: DbxInjectionComponentConfig<C> = {\n        componentClass,\n        init: (listView) => {\n          listView.setSelectionMode('select');\n          listView.setDisabled(this.isDisabled$);\n\n          if (state$) {\n            listView.setState(state$);\n          }\n\n          if (loadMore != null) {\n            this._loadMoreSub.subscription = listView.loadMore.subscribe(() => loadMore());\n          }\n\n          this._selectionEventSub.subscription = listView.selectionChange.subscribe((x: ListSelectionState<T>) => this._updateForSelection(x));\n        }\n      };\n\n      return config;\n    })\n  );\n\n  readonly values$: Observable<K[]> = this._valuesSubject.asObservable().pipe(shareReplay(1));\n\n  readonly isSelectedModifierFunction$: Observable<DbxValueListItemDecisionFunction<T>> = this.values$.pipe(\n    distinctUntilHasDifferentValues<K[], K>(),\n    map((values: K[]) => {\n      const p = this.props();\n      const readKey = p?.readKey;\n\n      if (!readKey) {\n        return dbxValueListItemDecisionFunction(() => false);\n      }\n\n      return dbxValueListItemDecisionFunction(isSelectedDecisionFunctionFactory<T, K>({ readKey })(values));\n    }),\n    shareReplay(1)\n  );\n\n  readonly configSignal = toSignal(this.config$);\n  readonly isSelectedModifierFunctionSignal = toSignal(this.isSelectedModifierFunction$);\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'dbx-injection' });\n\n    // Sync field value to _valuesSubject\n    effect(() => {\n      const fieldGetter = this.field();\n      if (!fieldGetter) return;\n\n      const fieldState = typeof fieldGetter === 'function' ? (fieldGetter as any)() : undefined;\n      const fieldValue = fieldState?.value?.() as Maybe<K[]>;\n      const values = fieldValue == null ? [] : convertMaybeToArray(fieldValue);\n      this._valuesSubject.next(values);\n    });\n  }\n\n  ngOnInit(): void {\n    const p = this.props();\n    if (p?.listComponentClass) {\n      this._listComponentClassObs.next(p.listComponentClass);\n    }\n  }\n\n  // MARK: Internal\n  private _updateForSelection(list: ListSelectionState<T>): void {\n    if (this.isDisabled()) return;\n\n    const p = this.props();\n    const readKey = p?.readKey;\n\n    if (!readKey) return;\n\n    const items = list.items.filter((x) => x.selected).map((x) => x.itemValue);\n    const values = readKeysFrom(readKey, items);\n    this._setValues(values);\n  }\n\n  private _setValues(values: Maybe<K[]>): void {\n    const currentValues = this._valuesSubject.getValue();\n\n    if (currentValues == null || hasDifferentValues(currentValues, values)) {\n      this._valuesSubject.next(values ?? []);\n      this._setFieldValue(values ?? []);\n    }\n  }\n\n  private _setFieldValue(values: K[]): void {\n    const fieldGetter = this.field();\n    if (!fieldGetter || typeof fieldGetter !== 'function') return;\n\n    const fieldState = (fieldGetter as any)();\n    if (fieldState?.value?.set) {\n      fieldState.value.set(values);\n    }\n  }\n}\n","<div class=\"dbx-forge-list-item-field\" [class.dbx-forge-list-field-disabled]=\"isDisabled()\" [style.--dbx-forge-list-item-field-height]=\"maxHeightCssVarSignal()\" dbxListItemModifier [dbxListItemIsSelectedModifier]=\"isSelectedModifierFunctionSignal()\" [attr.aria-invalid]=\"ariaInvalidSignal()\">\n  <div class=\"dbx-forge-list-item-field-content\">\n    <dbx-injection [config]=\"configSignal()\"></dbx-injection>\n  </div>\n</div>\n","import type { MatMultiCheckboxField } from '@ng-forge/dynamic-forms-material';\nimport { dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../field';\nimport type { DbxForgeField } from '../../form/forge.form';\n\n/**\n * Configuration for a forge multi-checkbox (checklist) field.\n */\nexport interface DbxForgeChecklistFieldConfig<T = unknown> extends DbxForgeFieldFunctionDef<MatMultiCheckboxField<T>> {}\n\n/**\n * Generic function type for dbxForgeChecklistField to preserve caller generics.\n */\nexport type DbxForgeChecklistFieldFunction = <T = unknown>(config: DbxForgeChecklistFieldConfig<T>) => DbxForgeField<MatMultiCheckboxField<T>>;\n\n/**\n * Multi-checkbox group. Use for small static option sets where every option is visible at once.\n *\n * @param config - Checklist field configuration\n * @returns A validated {@link MatMultiCheckboxField} with type `'multi-checkbox'`\n *\n * @dbxFormField\n * @dbxFormSlug checklist\n * @dbxFormTier field-factory\n * @dbxFormProduces T[]\n * @dbxFormArrayOutput yes\n * @dbxFormNgFormType multi-checkbox\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeChecklistFieldConfig<T>\n * @dbxFormGeneric <T = unknown>\n *\n * @example\n * ```typescript\n * dbxForgeChecklistField<string>({ key: 'flags', props: { options: [{ value: 'a', label: 'A' }, { value: 'b', label: 'B' }] } })\n * ```\n */\nexport const dbxForgeChecklistField = dbxForgeFieldFunction<DbxForgeChecklistFieldConfig>({\n  type: 'multi-checkbox' as const,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder()\n}) as DbxForgeChecklistFieldFunction;\n","import { Component, computed, ElementRef, inject, input } from '@angular/core';\nimport { type DbxInjectionComponentConfig, DbxInjectionComponent } from '@dereekb/dbx-core';\nimport { type FieldTree } from '@angular/forms/signals';\nimport { type DynamicText, type FieldMeta, type ValidationMessages, type BaseValueField } from '@ng-forge/dynamic-forms';\nimport { setupMetaTracking } from '@ng-forge/dynamic-forms/integration';\nimport { type Maybe } from '@dereekb/util';\nimport { dbxForgeFieldDisabled } from '../field.util';\n\n// MARK: Forge Component Field Props\n/**\n * The custom forge field type name for the component field.\n */\nexport const FORGE_COMPONENT_FIELD_TYPE = 'dbx-component' as const;\n\n/**\n * Props interface for the forge component field.\n *\n * Passed via the `props` property on the forge field definition.\n * Contains the {@link DbxInjectionComponentConfig} for rendering an arbitrary Angular component.\n */\nexport interface DbxForgeComponentFieldProps<T = unknown> {\n  /**\n   * The injection component configuration that describes which component to render.\n   */\n  readonly componentField: DbxInjectionComponentConfig<T>;\n  /**\n   * Whether to visually indicate the disabled state on this component.\n   *\n   * Defaults to `true`. Set to `false` for display-only components that should\n   * remain visually unchanged when the form is disabled.\n   */\n  readonly allowDisabledEffects?: boolean;\n}\n\n/**\n * Forge field definition interface for the component field.\n */\nexport interface DbxForgeComponentFieldDef<T = unknown> extends BaseValueField<DbxForgeComponentFieldProps<T>, unknown> {\n  readonly type: typeof FORGE_COMPONENT_FIELD_TYPE;\n}\n\n/**\n * Forge ValueFieldComponent that renders a custom Angular component via dynamic injection.\n *\n * Uses {@link DbxInjectionComponent} to instantiate the component class specified in the\n * field's `props.componentField` configuration. This is the forge equivalent of\n * the formly `DbxFormComponentFieldComponent`.\n */\n@Component({\n  selector: 'dbx-forge-component-field',\n  template: `\n    <div class=\"dbx-form-component\" dbx-injection [config]=\"configSignal()\"></div>\n  `,\n  imports: [DbxInjectionComponent],\n  host: {\n    '[class]': 'className()',\n    '[class.dbx-forge-disabled]': 'showDisabledStateSignal()'\n  }\n})\nexport class DbxForgeComponentFieldComponent<T = unknown> {\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  // ng-forge ValueFieldComponent inputs\n  readonly field = input.required<FieldTree<unknown>>();\n  readonly key = input.required<string>();\n  readonly label = input<DynamicText | undefined>();\n  readonly placeholder = input<DynamicText | undefined>();\n  readonly className = input<string>('');\n  readonly tabIndex = input<number | undefined>();\n  readonly props = input<DbxForgeComponentFieldProps<T> | undefined>();\n  readonly meta = input<FieldMeta | undefined>();\n  readonly validationMessages = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n  readonly showDisabledStateSignal = computed(() => {\n    const props = this.props();\n    return this.isDisabled() && (props?.allowDisabledEffects ?? true);\n  });\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'dbx-injection' });\n  }\n\n  readonly configSignal = computed((): Maybe<DbxInjectionComponentConfig<T>> => {\n    return this.props()?.componentField;\n  });\n}\n","import { FORGE_COMPONENT_FIELD_TYPE, type DbxForgeComponentFieldDef, type DbxForgeComponentFieldProps } from './component.field.component';\nimport { dbxForgeFieldFunction, type DbxForgeFieldFunctionDef } from '../field';\nimport type { DbxForgeField } from '../../form/forge.form';\n\n// MARK: Config\n/**\n * Internal config with required key for the factory.\n */\ntype _DbxForgeComponentFieldConfig<T = unknown> = Omit<DbxForgeFieldFunctionDef<DbxForgeComponentFieldDef<T>>, 'props'> & {\n  readonly props: DbxForgeComponentFieldProps<T>;\n};\n\n/**\n * Configuration for a forge field that renders a custom Angular component.\n */\nexport type DbxForgeComponentFieldConfig<T = unknown> = Omit<_DbxForgeComponentFieldConfig<T>, 'key'> & {\n  /**\n   * Key for the field. Optional for display-only components.\n   */\n  readonly key?: string;\n};\n\n/**\n * Counter for generating unique keys when no explicit key is provided.\n *\n * Each invocation gets a unique key so that ng-forge's field reconciliation\n * (`reconcileFields`) treats a config change as a new field rather than\n * preserving the stale instance whose captured `props` never update.\n */\nlet _componentFieldCounter = 0;\n\n/**\n * Generic function type for dbxForgeComponentField to preserve caller generics.\n */\nexport type DbxForgeComponentFieldFunction = <T = unknown>(config: DbxForgeComponentFieldConfig<T>) => DbxForgeField<DbxForgeComponentFieldDef<T>>;\n\nconst _dbxForgeComponentField = dbxForgeFieldFunction<_DbxForgeComponentFieldConfig>({\n  type: FORGE_COMPONENT_FIELD_TYPE\n});\n\n/**\n * Escape hatch — injects any Angular component as the field renderer via DbxInjection. Use when no existing form field fits.\n *\n * Uses {@link DbxInjectionComponent} to dynamically inject any Angular component\n * into the form. Generates a unique key when none is provided so that ng-forge's\n * field reconciliation treats each config change as a new field instance.\n *\n * @param config - Component field configuration.\n * @returns A validated {@link DbxForgeComponentFieldDef}\n *\n * @dbxFormField\n * @dbxFormSlug component-field\n * @dbxFormTier field-factory\n * @dbxFormProduces T\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType component\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeComponentFieldConfig<T>\n * @dbxFormGeneric <T = unknown>\n *\n * @example\n * ```typescript\n * dbxForgeComponentField<MyValue>({ key: 'custom', props: { component: MyCustomComp } })\n * ```\n */\nexport const dbxForgeComponentField: DbxForgeComponentFieldFunction = (config) => {\n  return _dbxForgeComponentField({\n    ...config,\n    key: config.key || `_component_${++_componentFieldCounter}`\n  } as _DbxForgeComponentFieldConfig) as any;\n};\n","import { Component, computed, effect, ElementRef, inject, input, type OnDestroy, type OnInit } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule, FormControl } from '@angular/forms';\nimport { Editor, NgxEditorModule } from '@bobbyquantum/ngx-editor';\nimport { debounceTime } from 'rxjs';\nimport { filterMaybe } from '@dereekb/rxjs';\nimport { type Maybe } from '@dereekb/util';\nimport { CompactContextStore, mapCompactModeObs } from '@dereekb/dbx-web';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { NgClass } from '@angular/common';\nimport { type FieldTree } from '@angular/forms/signals';\nimport { type DynamicText, type FieldMeta, type ValidationMessages, type BaseValueField } from '@ng-forge/dynamic-forms';\nimport { createResolvedErrorsSignal, setupMetaTracking, shouldShowErrors } from '@ng-forge/dynamic-forms/integration';\nimport { dbxForgeFieldDisabled } from '../field.util';\nimport { toggleDisableFormControl } from '../../../form/form';\nimport { cleanSubscription } from '@dereekb/dbx-core';\n\n// MARK: Forge Text Editor Field Props\n/**\n * Props interface for the forge text editor field.\n *\n * Passed via the `props` property on the forge field definition.\n */\nexport interface DbxForgeTextEditorFieldProps {\n  /**\n   * Minimum text length.\n   */\n  readonly minLength?: number;\n  /**\n   * Maximum text length.\n   */\n  readonly maxLength?: number;\n  /**\n   * Hint text shown below the editor.\n   */\n  readonly hint?: string;\n}\n\n/**\n * The custom forge field type name for the text editor field.\n */\nexport const FORGE_TEXT_EDITOR_FIELD_TYPE = 'dbx-texteditor' as const;\n\n/**\n * Forge field definition interface for the text editor field.\n */\nexport interface DbxForgeTextEditorFieldDef extends BaseValueField<DbxForgeTextEditorFieldProps, string> {\n  readonly type: typeof FORGE_TEXT_EDITOR_FIELD_TYPE;\n}\n\n/**\n * Forge ValueFieldComponent for rich text editing powered by ngx-editor.\n *\n * Wraps the existing ngx-editor integration from the formly text editor component\n * as a standalone ng-forge dynamic forms component. Outputs HTML format.\n * Supports compact mode via {@link CompactContextStore}.\n */\n@Component({\n  selector: 'dbx-forge-texteditor-field',\n  templateUrl: './texteditor.field.component.html',\n  imports: [NgClass, NgxEditorModule, FormsModule, ReactiveFormsModule]\n})\nexport class DbxForgeTextEditorFieldComponent implements OnInit, OnDestroy {\n  private readonly _compactContextStore = inject(CompactContextStore, { optional: true });\n  private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n  // ng-forge ValueFieldComponent inputs\n  readonly field = input.required<FieldTree<string>>();\n  readonly key = input.required<string>();\n  readonly label = input<DynamicText | undefined>();\n  readonly placeholder = input<DynamicText | undefined>();\n  readonly className = input<string>('');\n  readonly tabIndex = input<number | undefined>();\n  readonly props = input<DbxForgeTextEditorFieldProps | undefined>();\n  readonly meta = input<FieldMeta | undefined>();\n  readonly validationMessages = input<ValidationMessages | undefined>();\n  readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n  private _editor!: Editor;\n  private readonly _editorValueSub = cleanSubscription();\n  private readonly _syncFromFieldSub = cleanSubscription();\n\n  readonly editorFormControl = new FormControl<string>('', { nonNullable: true });\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  readonly compactClass$ = mapCompactModeObs(this._compactContextStore?.mode$, {\n    compact: 'dbx-texteditor-field-compact'\n  }).pipe(filterMaybe());\n\n  readonly compactClassSignal = toSignal(this.compactClass$, { initialValue: '' });\n\n  readonly labelSignal = computed(() => {\n    const l = this.label();\n    return typeof l === 'string' ? l : undefined;\n  });\n\n  readonly placeholderSignal = computed(() => {\n    const p = this.placeholder();\n    return typeof p === 'string' ? p : '';\n  });\n\n  readonly descriptionSignal = computed(() => this.props()?.hint);\n\n  // Error handling\n  readonly resolvedErrors = createResolvedErrorsSignal(this.field as any, this.validationMessages, this.defaultValidationMessages);\n  readonly showErrors = shouldShowErrors(this.field as any);\n  readonly errorsToDisplaySignal = computed(() => (this.showErrors() ? this.resolvedErrors() : []));\n\n  // ARIA\n  protected readonly hintIdSignal = computed(() => `${this.key()}-hint`);\n  protected readonly errorIdSignal = computed(() => `${this.key()}-error`);\n  protected readonly ariaInvalidSignal = computed(() => (this.showErrors() ? 'true' : null));\n  protected readonly ariaDescribedBySignal = computed(() => {\n    const errorId = this.errorIdSignal();\n    const hintId = this.hintIdSignal();\n    if (this.errorsToDisplaySignal().length > 0) return errorId;\n    if (this.props()?.hint) return hintId;\n    return null;\n  });\n\n  constructor() {\n    setupMetaTracking(this.elementRef, this.meta, { selector: 'ngx-editor' });\n  }\n\n  get editor(): Editor {\n    return this._editor;\n  }\n\n  // Disabled state propagation\n  private readonly _disabledEffect = effect(() => {\n    const disabled = this.isDisabled();\n    toggleDisableFormControl(this.editorFormControl, disabled);\n  });\n\n  private readonly _syncFieldToEditor = effect(() => {\n    const fieldSignal = this.field();\n    const node = fieldSignal ? (fieldSignal as any)() : undefined;\n    const fieldValue = node?.value?.() as Maybe<string>;\n\n    if (fieldValue !== undefined && fieldValue !== this.editorFormControl.value) {\n      this.editorFormControl.setValue(fieldValue ?? '', { emitEvent: false });\n    }\n  });\n\n  ngOnInit(): void {\n    this._editor = new Editor({});\n\n    // Watch for FormControl value changes (updated by ngx-editor's formControl binding)\n    // and push to FieldTree. Use debounceTime to batch rapid changes.\n    this._editorValueSub.subscription = this.editorFormControl.valueChanges.pipe(debounceTime(50)).subscribe((value) => {\n      this._setFieldValue(value);\n    });\n  }\n\n  ngOnDestroy(): void {\n    if (this._editor != null) {\n      this._editor.destroy();\n    }\n  }\n\n  private _setFieldValue(value: string): void {\n    const fieldSignal = this.field();\n\n    if (!fieldSignal) {\n      return;\n    }\n\n    // field() returns a signal wrapper; calling it returns the FieldNode\n    const node = (fieldSignal as any)();\n\n    if (node?.value?.set) {\n      node.value.set(value);\n    }\n  }\n}\n","<div class=\"dbx-texteditor-field\" [ngClass]=\"compactClassSignal()\" [class.dbx-texteditor-field-disabled]=\"isDisabled()\">\n  @if (labelSignal()) {\n    <span class=\"dbx-label\">{{ labelSignal() }}</span>\n  }\n  <div class=\"dbx-texteditor-field-content\">\n    <div class=\"dbx-texteditor-field-input\">\n      <ngx-editor [editor]=\"editor\" outputFormat=\"html\" [placeholder]=\"placeholderSignal()\" [formControl]=\"editorFormControl\" [attr.aria-invalid]=\"ariaInvalidSignal()\" [attr.aria-describedby]=\"ariaDescribedBySignal()\"></ngx-editor>\n    </div>\n    <div class=\"dbx-texteditor-field-menu\">\n      <ngx-editor-menu [editor]=\"editor\" [disabled]=\"isDisabled()\"></ngx-editor-menu>\n    </div>\n  </div>\n  @if (errorsToDisplaySignal()[0]; as error) {\n    <div class=\"dbx-form-description dbx-form-error\" [id]=\"errorIdSignal()\">{{ error.message }}</div>\n  } @else if (descriptionSignal()) {\n    <div class=\"dbx-form-description\" [id]=\"hintIdSignal()\">{{ descriptionSignal() }}</div>\n  }\n</div>\n","import { filterFromPOJO } from '@dereekb/util';\nimport { FORGE_TEXT_EDITOR_FIELD_TYPE, type DbxForgeTextEditorFieldDef } from './texteditor.field.component';\nimport { dbxForgeFieldFunction, dbxForgeFieldFunctionConfigPropsWithHintBuilder, type DbxForgeFieldFunctionDef } from '../field';\n\n// MARK: Config\n/**\n * Configuration for a forge rich text editor field.\n */\nexport interface DbxForgeTextEditorFieldConfig extends DbxForgeFieldFunctionDef<DbxForgeTextEditorFieldDef> {}\n\n/**\n * Rich HTML text editor (ngx-editor). Output is the serialized HTML string.\n *\n * Uses ngx-editor under the hood, outputting HTML format.\n * The field defaults to an empty string.\n *\n * @param config - Text editor field configuration\n * @returns A validated {@link DbxForgeTextEditorFieldDef}\n *\n * @dbxFormField\n * @dbxFormSlug text-editor\n * @dbxFormTier field-factory\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormNgFormType texteditor\n * @dbxFormWrapperPattern unwrapped\n * @dbxFormConfigInterface DbxForgeTextEditorFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeTextEditorField({ key: 'content', label: 'Body', maxLength: 10000 })\n * ```\n */\nexport const dbxForgeTextEditorField = dbxForgeFieldFunction<DbxForgeTextEditorFieldConfig>({\n  type: FORGE_TEXT_EDITOR_FIELD_TYPE,\n  buildProps: dbxForgeFieldFunctionConfigPropsWithHintBuilder((config) =>\n    filterFromPOJO({\n      minLength: config.minLength,\n      maxLength: config.maxLength\n    })\n  )\n});\n","import type { ArrayItemDefinitionTemplate } from '@ng-forge/dynamic-forms';\n\n/**\n * Produces a clone of an array-item template with `value` pre-populated on each\n * leaf field based on the source item's values.\n *\n * ng-forge's `insertAt(index, template)` event creates a new array slot initialized\n * from the provided field-definition template — it does not accept a raw value. To\n * duplicate an existing item, we walk the template tree and stamp the source\n * values onto each field definition's `value` property.\n *\n * Behavior:\n * - Leaf fields receive `value` from `source[field.key]`.\n * - Container/group fields recurse into `source[field.key]` when that sub-value\n *   is an object; otherwise the nested source is passed through unchanged.\n * - Fields missing from `source` keep their original `value` (or default).\n * - Non-object / null source values short-circuit and return the template unchanged.\n *\n * Returns a new template; the input is not mutated.\n *\n * @param template - The array-item field-definition template to clone.\n * @param sourceItem - The existing item whose values should be stamped onto the clone. Non-object values (null/undefined/primitive) cause the template to be returned unchanged.\n * @returns A new `ArrayItemDefinitionTemplate` with `value` populated on each leaf field, or the input `template` reference when `sourceItem` is not an object.\n *\n * @example\n * ```ts\n * // Duplicate an existing item by cloning its template with its values stamped in\n * const template = [\n *   { key: 'name', type: 'input', value: '' },\n *   { key: 'disabled', type: 'checkbox', value: false }\n * ];\n * const duplicated = dbxForgeArrayFieldTemplateWithItemValues(template, { name: 'hello', disabled: true });\n * // duplicated[0].value === 'hello', duplicated[1].value === true\n * ```\n */\nexport function dbxForgeArrayFieldTemplateWithItemValues(template: ArrayItemDefinitionTemplate, sourceItem: unknown): ArrayItemDefinitionTemplate {\n  let result: ArrayItemDefinitionTemplate = template;\n\n  if (sourceItem != null && typeof sourceItem === 'object') {\n    const source = sourceItem as Record<string, unknown>;\n\n    // Template may be a single FieldDef (primitive item) or FieldDef[] (object/container item)\n    if (Array.isArray(template)) {\n      result = template.map((field) => _withValuesFromSource(field, source)) as ArrayItemDefinitionTemplate;\n    } else {\n      result = _withValuesFromSource(template as unknown, source) as ArrayItemDefinitionTemplate;\n    }\n  }\n\n  return result;\n}\n\nfunction _withValuesFromSource(field: unknown, source: Record<string, unknown>): unknown {\n  let result: unknown = field;\n\n  if (field != null && typeof field === 'object') {\n    const node = field as { key?: string; type?: string; fields?: unknown[] };\n    const isContainer = (node.type === 'container' || node.type === 'group') && Array.isArray(node.fields);\n\n    if (isContainer) {\n      // For the outer array-item container (whose key is synthetic like 'x-container'),\n      // the source record is the item itself. Nested groups/containers look up their\n      // own sub-object by key when available.\n      const sourceForChildren = typeof node.key === 'string' && node.key in source && source[node.key] != null && typeof source[node.key] === 'object' ? (source[node.key] as Record<string, unknown>) : source;\n\n      result = {\n        ...node,\n        fields: (node.fields as unknown[]).map((child) => _withValuesFromSource(child, sourceForChildren))\n      };\n    } else if (typeof node.key === 'string') {\n      const nextValue = source[node.key];\n\n      if (nextValue !== undefined) {\n        result = { ...node, value: nextValue };\n      }\n    }\n  }\n\n  return result;\n}\n","import { Component, computed, inject, input, viewChild, ViewContainerRef } from '@angular/core';\nimport { arrayEvent, type ArrayItemDefinitionTemplate, EventDispatcher, type FieldWrapper } from '@ng-forge/dynamic-forms';\nimport { type WrapperFieldInputs, DynamicTextPipe } from '@ng-forge/dynamic-forms/integration';\nimport { AsyncPipe } from '@angular/common';\nimport { type CdkDragDrop, CdkDropList } from '@angular/cdk/drag-drop';\nimport { type DbxButtonStyle, DbxButtonComponent } from '@dereekb/dbx-web';\nimport { type IndexNumber } from '@dereekb/util';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport { type DbxForgeArrayFieldWrapperProps } from './array-field.wrapper';\nimport { dbxForgeArrayFieldTemplateWithItemValues } from './array-field.duplicate';\nimport { DbxForgeFormContextService } from '../../../form/forge.context.service';\n\n/**\n * Forge wrapper component that wraps an ng-forge `array` field with\n * a section header (label + hint), a cdkDropList for drag-and-drop reordering,\n * and the array field content.\n *\n * Provides {@link DbxForgeArrayFieldState} so element wrappers can inject it\n * for coordinated add/remove/reorder operations.\n */\n@Component({\n  selector: 'dbx-forge-array-field-wrapper',\n  templateUrl: './array-field.wrapper.component.html',\n  imports: [DynamicTextPipe, AsyncPipe, CdkDropList, DbxButtonComponent]\n})\nexport class DbxForgeArrayFieldWrapperComponent implements FieldWrapper {\n  readonly fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });\n\n  readonly fieldInputs = input<WrapperFieldInputs>();\n\n  private readonly dispatcher = inject(EventDispatcher);\n  private readonly _formContextService = inject(DbxForgeFormContextService);\n\n  /**\n   * Wrapper config props passed via addWrappers({ type, props }).\n   * ng-forge delivers wrapper config properties (with `type` stripped) as individual inputs.\n   */\n  readonly props = input<DbxForgeArrayFieldWrapperProps>();\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  readonly labelSignal = computed(() => this.props()?.label ?? '');\n  readonly hintSignal = computed(() => this.props()?.hint ?? '');\n  readonly disableRearrangeSignal = computed(() => this.props()?.disableRearrange ?? false);\n  readonly allowAddSignal = computed(() => this.props()?.allowAdd ?? true);\n  readonly addTextSignal = computed<string>(() => {\n    const text = this.props()?.addText;\n    return typeof text === 'string' ? text : 'Add';\n  });\n\n  readonly addButtonStyleSignal = computed<DbxButtonStyle>(() => this.props()?.addButtonStyle ?? { type: 'raised', color: 'primary' });\n\n  /**\n   * Current item count read reactively from the form value.\n   */\n  readonly itemCountSignal = computed(() => this._readArrayValue().length);\n\n  /**\n   * Whether the array has reached its configured `maxLength`. When true, the\n   * add button is disabled. Returns false when `maxLength` is not set.\n   */\n  readonly atMaxLengthSignal = computed(() => {\n    const itemCount = this.itemCountSignal();\n    const maxLength = this.props()?.maxLength;\n    return typeof maxLength === 'number' && itemCount >= maxLength;\n  });\n\n  /**\n   * Add button disabled state — combines the standard disabled flag with the\n   * `maxLength` cap so clicking past the limit is prevented.\n   */\n  readonly addButtonDisabledSignal = computed(() => {\n    const atMaxLength = this.atMaxLengthSignal();\n    return this.isDisabled() || atMaxLength;\n  });\n\n  drop(event: CdkDragDrop<unknown>): void {\n    if (event.previousIndex === event.currentIndex) {\n      return;\n    }\n\n    this.move(event.previousIndex, event.currentIndex);\n  }\n  // MARK: Accessors\n  /**\n   * Returns the array field key from the wrapper's field inputs.\n   *\n   * @returns The array field key, or an empty string if not available.\n   */\n  private _arrayKey(): string {\n    return this.fieldInputs()?.key ?? '';\n  }\n\n  /**\n   * Returns the item template from the wrapper props.\n   *\n   * ng-forge requires an explicit template for every dynamic add operation.\n   * The template is the container field definition (with element wrappers)\n   * built by {@link dbxForgeArrayField} and passed via wrapper props.\n   *\n   * @returns The array item definition template, or undefined if not configured.\n   */\n  private _itemTemplate(): ArrayItemDefinitionTemplate | undefined {\n    return this.props()?.itemTemplate;\n  }\n\n  // MARK: Array Value Access\n  /**\n   * Returns the current items for this array field.\n   *\n   * Reads the parent form value from {@link DbxForgeFormContextService} (which\n   * mirrors `DynamicForm.formValue()`) and indexes by the array's key. The\n   * wrapper's `fieldInputs.field.value()` is unreliable here — it reports\n   * undefined in some render phases — so we source the value from the\n   * DynamicForm signal instead.\n   *\n   * @returns The current array items, or an empty array if unavailable.\n   */\n  private _readArrayValue(): unknown[] {\n    const key = this._arrayKey();\n    if (!key) {\n      return [];\n    }\n\n    const formValue = this._formContextService.formValue();\n    const value = formValue[key];\n    return Array.isArray(value) ? value : [];\n  }\n\n  // MARK: Operations\n  /**\n   * Moves an array item from one index to another.\n   *\n   * Strategy:\n   * 1. Insert a new item at toIndex (ng-forge creates a new resolved item)\n   * 2. Remove the original item at fromIndex (adjusted for the insertion shift)\n   * 3. Patch the form value so the moved item's data ends up at the correct position\n   *\n   * @param fromIndex - The source index of the item to move.\n   * @param toIndex - The destination index for the item.\n   */\n  move(fromIndex: number, toIndex: number): void {\n    const template = this._itemTemplate();\n    const key = this._arrayKey();\n\n    if (!template || !key || fromIndex === toIndex) {\n      return;\n    }\n\n    this.dispatcher.dispatch(arrayEvent(key).move(fromIndex, toIndex));\n  }\n\n  /**\n   * Appends a new item to the end of the array using the item template.\n   *\n   * No-ops when the array has reached its configured `maxLength`.\n   */\n  addItem(): void {\n    const template = this._itemTemplate();\n    const key = this._arrayKey();\n\n    if (!template || !key || this.atMaxLengthSignal()) {\n      return;\n    }\n\n    this.dispatcher.dispatch(arrayEvent(key).append(template));\n  }\n\n  /**\n   * Removes an item at the given index.\n   *\n   * @param index - The index of the item to remove.\n   */\n  removeItem(index: number): void {\n    const key = this._arrayKey();\n\n    if (!key) {\n      return;\n    }\n\n    this.dispatcher.dispatch(arrayEvent(key).removeAt(index));\n  }\n\n  /**\n   * Duplicates the item at `fromIndex`, inserting a copy at `toIndex`.\n   *\n   * ng-forge's array slots are managed through `arrayEvent` dispatches — writing\n   * a bigger value into the form doesn't create a new slot. We read the source\n   * item from the form value, stamp its fields onto the template via\n   * {@link dbxForgeArrayFieldTemplateWithItemValues}, and dispatch `insertAt`\n   * so the slot is registered AND initialized with the duplicated values in a\n   * single event (back-to-back dispatches don't settle reliably).\n   *\n   * @param fromIndex - The index of the item to duplicate.\n   * @param toIndex - The index at which to insert the duplicated item.\n   */\n  duplicateItem(fromIndex: IndexNumber, toIndex: IndexNumber): void {\n    const template = this._itemTemplate();\n    const key = this._arrayKey();\n\n    if (!template || !key) {\n      return;\n    }\n\n    const items = this._readArrayValue();\n\n    if (fromIndex < 0 || fromIndex >= items.length) {\n      return;\n    }\n\n    const source = items[fromIndex];\n    const templateWithValues = dbxForgeArrayFieldTemplateWithItemValues(template, source);\n    const boundedTo = Math.max(0, Math.min(toIndex, items.length));\n\n    this.dispatcher.dispatch(arrayEvent(key).insertAt(boundedTo, templateWithValues));\n  }\n}\n","<div class=\"dbx-form-repeat-array\">\n  @if (labelSignal(); as labelText) {\n    <div class=\"dbx-form-repeat-array-header\">\n      <h4 class=\"dbx-form-repeat-array-title\">{{ labelText | dynamicText | async }}</h4>\n    </div>\n  }\n  @if (hintSignal(); as hintText) {\n    <p class=\"dbx-form-repeat-array-hint\">{{ hintText | dynamicText | async }}</p>\n  }\n  <div class=\"dbx-form-repeat-array-content\" cdkDropList [cdkDropListDisabled]=\"disableRearrangeSignal()\" (cdkDropListDropped)=\"drop($event)\">\n    <ng-container #fieldComponent></ng-container>\n  </div>\n  @if (allowAddSignal()) {\n    <div class=\"dbx-form-repeat-array-footer\">\n      <dbx-button [text]=\"addTextSignal()\" [buttonStyle]=\"addButtonStyleSignal()\" [disabled]=\"addButtonDisabledSignal()\" (buttonClick)=\"addItem()\"></dbx-button>\n    </div>\n  }\n</div>\n","import { Component, computed, inject, input, viewChild, ViewContainerRef } from '@angular/core';\nimport { CdkDrag, CdkDragHandle, CdkDragPlaceholder } from '@angular/cdk/drag-drop';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport type { DynamicText, FieldWrapper } from '@ng-forge/dynamic-forms';\nimport { type WrapperFieldInputs, ARRAY_CONTEXT } from '@ng-forge/dynamic-forms/integration';\nimport { type IndexNumber } from '@dereekb/util';\nimport { type DbxButtonDisplayStylePair, type DbxButtonStyle, type DbxChipDisplay, DbxButtonComponent, DbxButtonSpacerDirective, DbxChipDirective } from '@dereekb/dbx-web';\nimport { dbxForgeFieldDisabled } from '../../field.util';\nimport { type DbxForgeArrayFieldElementWrapperProps, type DbxForgeArrayItemEvaluationFn } from './array-field.element.wrapper';\nimport { DbxForgeArrayFieldWrapperComponent } from './array-field.wrapper.component';\nimport { DbxForgeFormContextService } from '../../../form/forge.context.service';\n\n/**\n * Default display for the per-item index chip — small, grey background.\n */\nconst DEFAULT_INDEX_CHIP_DISPLAY: DbxChipDisplay = {\n  label: '',\n  value: '',\n  small: true,\n  color: 'grey'\n};\n\n/**\n * Default display + style for the per-item duplicate button.\n */\nconst DEFAULT_DUPLICATE_BUTTON: DbxButtonDisplayStylePair = {\n  style: { type: 'stroked', color: 'primary' },\n  display: { text: 'Duplicate' }\n};\n\n/**\n * Forge wrapper component that wraps a single array item with\n * a drag handle, item label, and remove button.\n */\n@Component({\n  selector: 'dbx-forge-array-field-element-wrapper',\n  templateUrl: './array-field.element.wrapper.component.html',\n  imports: [CdkDrag, CdkDragHandle, CdkDragPlaceholder, DbxChipDirective, MatIconModule, MatButtonModule, DbxButtonComponent, DbxButtonSpacerDirective]\n})\nexport class DbxForgeArrayFieldElementWrapperComponent implements FieldWrapper {\n  readonly fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });\n\n  private readonly parent = inject(DbxForgeArrayFieldWrapperComponent);\n  private readonly formContextService = inject(DbxForgeFormContextService);\n\n  readonly arrayContext = inject(ARRAY_CONTEXT);\n\n  // Disabled state\n  readonly isDisabled = dbxForgeFieldDisabled();\n\n  // Props from wrapper config (ng-forge passes wrapper config properties as individual inputs)\n  readonly fieldInputs = input<WrapperFieldInputs>();\n  readonly props = input<DbxForgeArrayFieldElementWrapperProps>();\n\n  readonly disableRearrangeSignal = computed(() => this.props()?.disableRearrange ?? false);\n\n  readonly showIndexChipSignal = computed(() => this.props()?.showIndexChip ?? true);\n\n  readonly indexChipDisplaySignal = computed<DbxChipDisplay>(() => {\n    const displayFn = this.props()?.indexChipDisplay;\n    let result: DbxChipDisplay = DEFAULT_INDEX_CHIP_DISPLAY;\n\n    if (typeof displayFn === 'function') {\n      const ctx = this.formContextService.createArrayItemEvaluationContext({ arrayContext: this.arrayContext, reactive: true });\n      result = (displayFn as DbxForgeArrayItemEvaluationFn<DbxChipDisplay>)(ctx);\n    }\n\n    return result;\n  });\n\n  readonly allowRemoveSignal = computed(() => {\n    const allowRemove = this.props()?.allowRemove;\n    let result: boolean;\n\n    if (typeof allowRemove === 'function') {\n      const ctx = this.formContextService.createArrayItemEvaluationContext({ arrayContext: this.arrayContext, reactive: true });\n      result = (allowRemove as DbxForgeArrayItemEvaluationFn<boolean>)(ctx);\n    } else {\n      result = allowRemove ?? true;\n    }\n\n    return result;\n  });\n\n  readonly removeTextSignal = computed<string>(() => {\n    const text = this.props()?.removeText;\n    return typeof text === 'string' ? text : 'Remove';\n  });\n\n  readonly removeButtonStyleSignal = computed<DbxButtonStyle>(() => this.props()?.removeButtonStyle ?? { type: 'stroked', color: 'warn' });\n\n  /**\n   * Resolves {@link DbxForgeArrayFieldElementWrapperProps.allowDuplicate} to either\n   * `false` (hide the button) or a target {@link IndexNumber}. `true` maps to the\n   * default insert position — immediately after the source item.\n   */\n  readonly duplicateTargetIndexSignal = computed<false | IndexNumber>(() => {\n    const allowDuplicate = this.props()?.allowDuplicate;\n    const currentIndex = this.arrayContext.index();\n    let result: false | IndexNumber = false;\n\n    if (allowDuplicate != null && allowDuplicate !== false) {\n      let resolved: boolean | IndexNumber;\n\n      if (typeof allowDuplicate === 'function') {\n        const ctx = this.formContextService.createArrayItemEvaluationContext({ arrayContext: this.arrayContext, reactive: true });\n        resolved = (allowDuplicate as DbxForgeArrayItemEvaluationFn<boolean | IndexNumber>)(ctx);\n      } else {\n        resolved = allowDuplicate;\n      }\n\n      if (resolved === true) {\n        result = currentIndex + 1;\n      } else if (resolved !== false) {\n        result = resolved;\n      }\n    }\n\n    return result;\n  });\n\n  readonly allowDuplicateSignal = computed(() => this.duplicateTargetIndexSignal() !== false);\n\n  readonly duplicateButtonSignal = computed<DbxButtonDisplayStylePair>(() => {\n    const duplicateButton = this.props()?.duplicateButton;\n    let result: DbxButtonDisplayStylePair;\n\n    if (typeof duplicateButton === 'function') {\n      const ctx = this.formContextService.createArrayItemEvaluationContext({ arrayContext: this.arrayContext, reactive: true });\n      result = (duplicateButton as DbxForgeArrayItemEvaluationFn<DbxButtonDisplayStylePair>)(ctx);\n    } else {\n      result = duplicateButton ?? DEFAULT_DUPLICATE_BUTTON;\n    }\n\n    return result;\n  });\n\n  readonly labelSignal = computed(() => {\n    const props = this.props();\n    const index = this.arrayContext.index();\n    const labelForEntry = props?.labelForEntry;\n    // When the index chip is visible, it already shows the position —\n    // skip the \"1.\" prefix on the label to avoid duplication.\n    const showChip = this.showIndexChipSignal();\n    const prefix = showChip ? '' : `${index + 1}.`;\n    let result = prefix;\n\n    if (labelForEntry != null) {\n      let label: DynamicText;\n\n      if (typeof labelForEntry === 'function') {\n        const ctx = this.formContextService.createArrayItemEvaluationContext({ arrayContext: this.arrayContext, reactive: true });\n        label = (labelForEntry as DbxForgeArrayItemEvaluationFn<DynamicText>)(ctx);\n      } else {\n        label = labelForEntry;\n      }\n\n      if (label != null && label !== '') {\n        result = prefix ? `${prefix} ${label}` : `${label}`;\n      }\n    }\n\n    return result;\n  });\n\n  removeItem(): void {\n    this.parent.removeItem(this.arrayContext.index());\n  }\n\n  duplicateItem(): void {\n    const targetIndex = this.duplicateTargetIndexSignal();\n\n    if (targetIndex !== false) {\n      this.parent.duplicateItem(this.arrayContext.index(), targetIndex);\n    }\n  }\n}\n","<div class=\"dbx-form-repeat-array-field\" cdkDrag cdkDragLockAxis=\"y\" [cdkDragDisabled]=\"disableRearrangeSignal()\">\n  <ng-template cdkDragPlaceholder>\n    <div class=\"dbx-form-repeat-array-drag-placeholder\"></div>\n  </ng-template>\n  @if (showIndexChipSignal()) {\n    <dbx-chip [display]=\"indexChipDisplaySignal()\">{{ arrayContext.index() + 1 }}</dbx-chip>\n  }\n  <div class=\"dbx-content-navbar dbx-form-repeat-array-bar dbx-flex-bar\">\n    @if (!disableRearrangeSignal()) {\n      <button mat-icon-button type=\"button\" cdkDragHandle class=\"dbx-form-repeat-array-drag-button\" [disabled]=\"isDisabled()\" aria-label=\"Drag to reorder\">\n        <mat-icon>drag_handle</mat-icon>\n      </button>\n      <dbx-button-spacer></dbx-button-spacer>\n    }\n    <span class=\"dbx-form-repeat-array-label\">{{ labelSignal() }}</span>\n    <span class=\"spacer\"></span>\n    @if (allowDuplicateSignal()) {\n      <dbx-button class=\"dbx-button-spacer\" [buttonDisplay]=\"duplicateButtonSignal().display\" [buttonStyle]=\"duplicateButtonSignal().style\" [disabled]=\"isDisabled()\" (buttonClick)=\"duplicateItem()\"></dbx-button>\n    }\n    @if (allowRemoveSignal()) {\n      <dbx-button [text]=\"removeTextSignal()\" [buttonStyle]=\"removeButtonStyleSignal()\" [disabled]=\"isDisabled()\" (buttonClick)=\"removeItem()\"></dbx-button>\n    }\n  </div>\n  <div class=\"dbx-form-repeat-array-field-content\">\n    <ng-container #fieldComponent></ng-container>\n  </div>\n</div>\n","import { Component, computed, input, viewChild, ViewContainerRef } from '@angular/core';\nimport type { FieldWrapper, ValidationError } from '@ng-forge/dynamic-forms';\nimport { DynamicTextPipe, interpolateParams, type WrapperFieldInputs } from '@ng-forge/dynamic-forms/integration';\nimport { AsyncPipe } from '@angular/common';\nimport { type DbxForgeFormFieldWrapperProps } from './formfield.wrapper';\n\n/**\n * Forge wrapper field component that renders child fields inside a Material-style\n * outlined container with a notched outline, floating label, and hint/error subscript.\n *\n * Reads wrapper config (label, hint, className) from component inputs\n * and the parent {@link FieldSignalContext} to observe form validation state.\n */\n@Component({\n  selector: 'dbx-forge-form-field-wrapper',\n  templateUrl: './formfield.wrapper.component.html',\n  styles: [\n    `\n      .dbx-forge-form-field-wrapper {\n        position: relative;\n        margin-top: 8px;\n      }\n\n      /* --- Notched outline --- */\n      .dbx-forge-form-field-outline {\n        display: flex;\n        position: absolute;\n        top: 0;\n        right: 0;\n        left: 0;\n        bottom: 0;\n        pointer-events: none;\n      }\n\n      .dbx-forge-form-field-outline-leading {\n        border: 1px solid var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.38)));\n        border-right: none;\n        border-radius: var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small, 4px)) 0 0 var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small, 4px));\n        width: 12px;\n      }\n\n      .dbx-forge-form-field-outline-notch {\n        border-bottom: 1px solid var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.38)));\n        display: flex;\n        align-items: flex-start;\n        max-width: calc(100% - 24px);\n      }\n\n      .dbx-forge-form-field-outline-notch-empty {\n        border-top: 1px solid var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.38)));\n        width: 0;\n        padding: 0;\n      }\n\n      .dbx-forge-form-field-outline-label {\n        display: inline-block;\n        transform: translateY(-50%);\n        pointer-events: auto;\n        padding: 0 4px;\n        background: var(--mat-sys-surface, white);\n        white-space: nowrap;\n        -moz-osx-font-smoothing: grayscale;\n        -webkit-font-smoothing: antialiased;\n        font-family: var(--mat-form-field-outlined-label-text-populated-font, var(--mat-sys-body-small-font));\n        font-size: var(--mat-form-field-outlined-label-text-populated-size, var(--mat-sys-body-small-size));\n        line-height: var(--mat-form-field-outlined-label-text-populated-line-height, var(--mat-sys-body-small-line-height));\n        letter-spacing: var(--mat-form-field-outlined-label-text-populated-tracking, var(--mat-sys-body-small-tracking));\n        font-weight: var(--mat-form-field-outlined-label-text-populated-weight, var(--mat-sys-body-small-weight));\n        color: var(--mat-form-field-outlined-label-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));\n      }\n\n      .dbx-forge-form-field-outline-trailing {\n        border: 1px solid var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.38)));\n        border-left: none;\n        border-radius: 0 var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small, 4px)) var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small, 4px)) 0;\n        flex-grow: 1;\n      }\n\n      /* --- Hover state --- */\n      .dbx-forge-form-field-wrapper:hover .dbx-forge-form-field-outline-leading,\n      .dbx-forge-form-field-wrapper:hover .dbx-forge-form-field-outline-notch,\n      .dbx-forge-form-field-wrapper:hover .dbx-forge-form-field-outline-trailing {\n        border-color: var(--mat-form-field-outlined-hover-outline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));\n      }\n\n      /* --- Focus state --- */\n      .dbx-forge-form-field-wrapper:focus-within .dbx-forge-form-field-outline-leading,\n      .dbx-forge-form-field-wrapper:focus-within .dbx-forge-form-field-outline-notch,\n      .dbx-forge-form-field-wrapper:focus-within .dbx-forge-form-field-outline-trailing {\n        border-color: var(--mat-form-field-outlined-focus-outline-color, var(--mat-sys-primary));\n        border-width: 2px;\n      }\n\n      .dbx-forge-form-field-wrapper:focus-within .dbx-forge-form-field-outline-label {\n        color: var(--mat-form-field-outlined-focus-label-text-color, var(--mat-sys-primary));\n        padding: 0 3px;\n      }\n\n      /* --- Error state (including when focused) --- */\n      .dbx-forge-form-field-wrapper-error .dbx-forge-form-field-outline-leading,\n      .dbx-forge-form-field-wrapper-error .dbx-forge-form-field-outline-notch,\n      .dbx-forge-form-field-wrapper-error .dbx-forge-form-field-outline-trailing,\n      .dbx-forge-form-field-wrapper-error:focus-within .dbx-forge-form-field-outline-leading,\n      .dbx-forge-form-field-wrapper-error:focus-within .dbx-forge-form-field-outline-notch,\n      .dbx-forge-form-field-wrapper-error:focus-within .dbx-forge-form-field-outline-trailing {\n        border-color: var(--mat-form-field-outlined-error-outline-color, var(--mat-sys-error, #f44336));\n      }\n\n      .dbx-forge-form-field-wrapper-error .dbx-forge-form-field-outline-label,\n      .dbx-forge-form-field-wrapper-error:focus-within .dbx-forge-form-field-outline-label {\n        color: var(--mat-form-field-outlined-error-label-text-color, var(--mat-sys-error, #f44336));\n      }\n\n      /* --- Content area --- */\n      .dbx-forge-form-field-content {\n        position: relative;\n        padding: var(--mat-form-field-container-vertical-padding, 16px) 16px 8px;\n        min-height: 56px;\n        box-sizing: border-box;\n      }\n\n      /* --- Disabled state --- */\n      .dbx-forge-form-field-wrapper-disabled .dbx-forge-form-field-content {\n        opacity: 0.38;\n        pointer-events: none;\n      }\n\n      .dbx-forge-form-field-wrapper-disabled .dbx-forge-form-field-outline-leading,\n      .dbx-forge-form-field-wrapper-disabled .dbx-forge-form-field-outline-notch,\n      .dbx-forge-form-field-wrapper-disabled .dbx-forge-form-field-outline-trailing {\n        border-color: var(--mat-form-field-outlined-disabled-outline-color, rgba(0, 0, 0, 0.12));\n      }\n\n      .dbx-forge-form-field-wrapper-disabled:hover .dbx-forge-form-field-outline-leading,\n      .dbx-forge-form-field-wrapper-disabled:hover .dbx-forge-form-field-outline-notch,\n      .dbx-forge-form-field-wrapper-disabled:hover .dbx-forge-form-field-outline-trailing {\n        border-color: var(--mat-form-field-outlined-disabled-outline-color, rgba(0, 0, 0, 0.12));\n      }\n\n      .dbx-forge-form-field-wrapper-disabled .dbx-forge-form-field-outline-label {\n        color: var(--mat-form-field-outlined-disabled-label-text-color, rgba(0, 0, 0, 0.38));\n      }\n    `\n  ],\n  imports: [DynamicTextPipe, AsyncPipe],\n  host: {\n    // `mat-form-field-animations-enabled` is intentionally retained: it gates\n    // the 300ms subscript fade animation via Material's\n    // `.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper { animation-duration: 300ms; }`\n    // rule and does not cause the `.mat-mdc-form-field` style leak. The\n    // `mat-mdc-form-field` host class was removed because Material lazy-loads\n    // `display: inline-flex; line-height: 24px; ...` onto that selector once\n    // any real `mat-form-field` is instantiated, which distorted this wrapper.\n    class: 'dbx-forge-form-field mat-form-field-animations-enabled',\n    '[class]': 'classNameSignal()'\n  }\n})\nexport class DbxForgeFormFieldWrapperComponent implements FieldWrapper {\n  readonly fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });\n\n  // Props from wrapper config\n  readonly fieldInputs = input<WrapperFieldInputs>();\n\n  /**\n   * Wrapper config props passed via `addWrappers({ type, props })`.\n   * ng-forge delivers wrapper config properties (with `type` stripped) as individual inputs.\n   */\n  readonly props = input<DbxForgeFormFieldWrapperProps>();\n\n  // Read-only field tree from the wrapped field\n  private readonly formStateSignal = computed(() => this.fieldInputs()?.field);\n\n  // Disabled state\n  readonly isDisabledSignal = computed(() => this.formStateSignal()?.disabled());\n\n  /**\n   * Resolved notch label. Prefers a wrapper-level `props.label` override and\n   * falls back to the wrapped field's own label.\n   */\n  readonly labelSignal = computed(() => {\n    const fieldInputs = this.fieldInputs();\n    return this.props()?.label ?? fieldInputs?.label;\n  });\n\n  readonly hintSignal = computed(() => (this.fieldInputs()?.props as any)?.hint);\n  readonly classNameSignal = computed(() => this.fieldInputs()?.className ?? '');\n\n  // Key for ARIA IDs\n  private readonly keySignal = computed(() => this.fieldInputs()?.key ?? '');\n\n  // Validation state from form tree\n  private readonly childErrorsSignal = computed(() => this.formStateSignal()?.errors() as readonly ValidationError[] | undefined);\n\n  /**\n   * Whether errors should be displayed.\n   *\n   * Shows when the field is invalid and has errors. Does not gate on touched/dirty\n   * because this wrapper targets non-standard fields (sliders, custom components)\n   * where standard blur-based touch behavior may not apply.\n   */\n  readonly showErrorsSignal = computed(() => {\n    const childErrors = this.childErrorsSignal();\n    return (this.formStateSignal()?.invalid() ?? false) && (childErrors?.length ?? 0) > 0;\n  });\n\n  readonly hasError = this.showErrorsSignal;\n\n  /**\n   * Resolves the first error message using the same priority as ng-forge's\n   * `resolveErrorMessage`: field-level `validationMessages` -> form-level\n   * `defaultValidationMessages` -> `error.message` -> error kind.\n   *\n   * Uses `interpolateParams` for `{{param}}` placeholder substitution.\n   */\n  readonly firstErrorMessageSignal = computed(() => {\n    const errors = this.childErrorsSignal();\n    const error = errors?.[0];\n\n    if (!error) {\n      return '';\n    }\n\n    const inputs = this.fieldInputs();\n    const fieldMessages = inputs?.validationMessages ?? {};\n    const defaultMessages = inputs?.defaultValidationMessages ?? {};\n    const message = fieldMessages[error.kind] ?? defaultMessages[error.kind] ?? error.message ?? error.kind;\n    return interpolateParams(message, error);\n  });\n\n  /**\n   * Whether any child field has `required` state, used to show the asterisk in the label.\n   */\n  readonly isRequiredSignal = computed(() => this.formStateSignal()?.required());\n\n  // ARIA IDs\n  protected readonly labelIdSignal = computed(() => `${this.keySignal()}-label`);\n  protected readonly errorIdSignal = computed(() => `${this.keySignal()}-error`);\n  protected readonly hintIdSignal = computed(() => `${this.keySignal()}-hint`);\n}\n","<div class=\"dbx-forge-form-field-wrapper\" [class.dbx-forge-form-field-wrapper-error]=\"hasError()\" [class.dbx-forge-form-field-wrapper-disabled]=\"isDisabledSignal()\" role=\"group\" [attr.aria-labelledby]=\"labelSignal() ? labelIdSignal() : null\">\n  <div class=\"dbx-forge-form-field-outline\">\n    <div class=\"dbx-forge-form-field-outline-leading\"></div>\n    <div class=\"dbx-forge-form-field-outline-notch\" [class.dbx-forge-form-field-outline-notch-empty]=\"!labelSignal()\">\n      @if (labelSignal(); as labelText) {\n        <span class=\"dbx-forge-form-field-outline-label\" [id]=\"labelIdSignal()\">\n          {{ labelText | dynamicText | async }}\n          @if (isRequiredSignal()) {\n            <span aria-hidden=\"true\" class=\"mat-mdc-form-field-required-marker mdc-floating-label--required\"></span>\n          }\n        </span>\n      }\n    </div>\n    <div class=\"dbx-forge-form-field-outline-trailing\"></div>\n  </div>\n  <div class=\"dbx-forge-form-field-content\">\n    <ng-container #fieldComponent></ng-container>\n  </div>\n</div>\n<div class=\"mat-mdc-form-field-subscript-wrapper mat-mdc-form-field-bottom-align mat-mdc-form-field-subscript-dynamic-size\">\n  @if (showErrorsSignal()) {\n    <div class=\"mat-mdc-form-field-error-wrapper\">\n      <div class=\"mat-mdc-form-field-error mat-mdc-form-field-bottom-align\" [id]=\"errorIdSignal()\">{{ firstErrorMessageSignal() }}</div>\n    </div>\n  } @else if (hintSignal(); as hint) {\n    <div class=\"mat-mdc-form-field-hint-wrapper\">\n      <div class=\"mat-mdc-form-field-hint mat-mdc-form-field-bottom-align\" [id]=\"hintIdSignal()\">{{ hint }}</div>\n    </div>\n  }\n</div>\n","import type { DbxSectionHeaderConfig } from '@dereekb/dbx-web';\n\n// MARK: Wrapper Type\n/**\n * Registered wrapper type name for the section wrapper.\n *\n * Used in {@link WrapperConfig.type} to identify this wrapper when building\n * wrapper chains.\n */\nexport const DBX_FORGE_SECTION_WRAPPER_TYPE_NAME = 'dbx-forge-section' as const;\n\n/**\n * Configuration for the section wrapper type.\n *\n * Wraps child fields inside a `<dbx-section>` or `<dbx-subsection>` component\n * with proper semantic structure, header, and content area styling.\n *\n * @example\n * ```typescript\n * const wrapper: DbxForgeSectionWrapper = {\n *   type: 'dbx-forge-section',\n *   headerConfig: { header: 'Contact Info', h: 3 },\n *   elevate: true,\n * };\n * ```\n */\nexport interface DbxForgeSectionWrapper {\n  readonly type: typeof DBX_FORGE_SECTION_WRAPPER_TYPE_NAME;\n  /**\n   * Section header configuration.\n   */\n  readonly headerConfig: DbxSectionHeaderConfig;\n  /**\n   * Whether to apply elevated card styling to the section.\n   */\n  readonly elevate?: boolean;\n  /**\n   * Whether to render as a `<dbx-subsection>` instead of `<dbx-section>`.\n   */\n  readonly subsection?: boolean;\n}\n\n/**\n * Section wrapper config — attach via a field's `wrappers: []` array for a semantic section with header and optional card elevation.\n *\n * @param config - The section wrapper configuration without the `type` property.\n * @returns A complete {@link DbxForgeSectionWrapper} config with the type set.\n *\n * @dbxFormField\n * @dbxFormSlug section-wrapper\n * @dbxFormTier primitive\n * @dbxFormProduces WrapperConfig\n * @dbxFormReturns WrapperConfig\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeSectionWrapper\n *\n * @example\n * ```typescript\n * dbxForgeSectionWrapper({ headerConfig: { text: 'Contact Details' } })\n * ```\n */\nexport function dbxForgeSectionWrapper(config: Omit<DbxForgeSectionWrapper, 'type'>): DbxForgeSectionWrapper {\n  return { type: DBX_FORGE_SECTION_WRAPPER_TYPE_NAME, ...config };\n}\n\n/**\n * Subsection variant of `section-wrapper` — defaults to heading level 4 and `subsection: true`.\n *\n * @param config - The subsection wrapper configuration without the `type` and `subsection` properties.\n * @returns A complete {@link DbxForgeSectionWrapper} config with `type` and `subsection: true` set.\n *\n * @dbxFormField\n * @dbxFormSlug subsection-wrapper\n * @dbxFormTier primitive\n * @dbxFormProduces WrapperConfig\n * @dbxFormReturns WrapperConfig\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeSectionWrapper\n *\n * @example\n * ```typescript\n * dbxForgeSubsectionWrapper({ headerConfig: { text: 'Options' } })\n * ```\n */\nexport function dbxForgeSubsectionWrapper(config: Omit<DbxForgeSectionWrapper, 'type' | 'subsection'>): DbxForgeSectionWrapper {\n  return { type: DBX_FORGE_SECTION_WRAPPER_TYPE_NAME, subsection: true, ...config };\n}\n","import type { BaseValueField } from '@ng-forge/dynamic-forms';\n\n// MARK: Field Type\nexport const FORGE_INFO_BUTTON_FIELD_TYPE_NAME = 'dbx-forge-info-button' as const;\n\n/**\n * Props interface for the forge info button field.\n */\nexport interface DbxForgeInfoButtonFieldProps {\n  /**\n   * Callback invoked when the info button is clicked.\n   */\n  readonly onInfoClick: () => void;\n  /**\n   * Accessible label for the info button.\n   */\n  readonly ariaLabel?: string;\n}\n\n/**\n * Forge field definition for an info button.\n */\nexport interface DbxForgeInfoButtonFieldDef extends BaseValueField<DbxForgeInfoButtonFieldProps, unknown> {\n  readonly type: typeof FORGE_INFO_BUTTON_FIELD_TYPE_NAME;\n}\n","// MARK: Wrapper Type\n/**\n * Registered wrapper type name for the info wrapper.\n *\n * Used in {@link WrapperConfig.type} to identify this wrapper when building\n * wrapper chains.\n */\nexport const DBX_FORGE_INFO_WRAPPER_TYPE_NAME = 'dbx-forge-info' as const;\n\n/**\n * Configuration for the info wrapper type.\n *\n * Renders an info icon button beside the wrapped content inside a flex layout.\n *\n * @example\n * ```typescript\n * const wrapper: DbxForgeInfoWrapper = {\n *   type: 'dbx-forge-info',\n *   onInfoClick: () => openHelpDialog(),\n *   ariaLabel: 'Show help for this field',\n * };\n * ```\n */\nexport interface DbxForgeInfoWrapper {\n  readonly type: typeof DBX_FORGE_INFO_WRAPPER_TYPE_NAME;\n  /**\n   * Callback invoked when the info button is clicked.\n   */\n  readonly onInfoClick: () => void;\n  /**\n   * Accessible label for the info button.\n   */\n  readonly ariaLabel?: string;\n}\n\n/**\n * Creates an info wrapper config for use in a field's `wrappers` array.\n *\n * @param config - The info wrapper configuration without the `type` property.\n * @returns A complete {@link DbxForgeInfoWrapper} config with the type set.\n *\n * @example\n * ```typescript\n * dbxForgeNameField({\n *   wrappers: [dbxForgeInfoWrapper({ onInfoClick: () => openHelp() })]\n * })\n * ```\n */\nexport function dbxForgeInfoWrapper(config: Omit<DbxForgeInfoWrapper, 'type'>): DbxForgeInfoWrapper {\n  return { type: DBX_FORGE_INFO_WRAPPER_TYPE_NAME, ...config };\n}\n","import type { MaybeObservableOrValue } from '@dereekb/rxjs';\n\n// MARK: Wrapper Type\n/**\n * Registered wrapper type name for the style wrapper.\n *\n * Used in {@link WrapperConfig.type} to identify this wrapper when building\n * wrapper chains.\n */\nexport const DBX_FORGE_STYLE_WRAPPER_TYPE_NAME = 'dbx-forge-style' as const;\n\n/**\n * A map of CSS style properties to their values, used with `[ngStyle]`.\n */\nexport type DbxForgeStyleObject = { [styleProperty: string]: unknown };\n\n/**\n * Configuration for the style wrapper type.\n *\n * Applies dynamic CSS classes and inline styles around wrapped content.\n * Supports both static values and reactive observables via `ObservableOrValue`.\n *\n * @example\n * ```typescript\n * const wrapper: DbxForgeStyleWrapper = {\n *   type: 'dbx-forge-style',\n *   classGetter: 'highlight-section',\n *   styleGetter: { background: 'rgba(255,0,0,0.3)' },\n * };\n * ```\n */\nexport interface DbxForgeStyleWrapper {\n  readonly type: typeof DBX_FORGE_STYLE_WRAPPER_TYPE_NAME;\n  /**\n   * Observable or static value providing CSS class names via `[ngClass]`.\n   */\n  readonly classGetter?: MaybeObservableOrValue<string>;\n  /**\n   * Observable or static value providing inline styles via `[ngStyle]`.\n   */\n  readonly styleGetter?: MaybeObservableOrValue<DbxForgeStyleObject>;\n}\n\n/**\n * Style wrapper config — applies dynamic CSS classes (`ngClass`) and/or inline styles (`ngStyle`) to any field via its `wrappers: []`.\n *\n * @param config - The style wrapper configuration without the `type` property.\n * @returns A complete {@link DbxForgeStyleWrapper} config with the type set.\n *\n * @dbxFormField\n * @dbxFormSlug style-wrapper\n * @dbxFormTier primitive\n * @dbxFormProduces WrapperConfig\n * @dbxFormReturns WrapperConfig\n * @dbxFormArrayOutput no\n * @dbxFormConfigInterface DbxForgeStyleWrapper\n *\n * @example\n * ```typescript\n * dbxForgeStyleWrapper({ classGetter: 'highlighted' })\n * ```\n */\nexport function dbxForgeStyleWrapper(config: Omit<DbxForgeStyleWrapper, 'type'>): DbxForgeStyleWrapper {\n  return { type: DBX_FORGE_STYLE_WRAPPER_TYPE_NAME, ...config };\n}\n","import { Component, computed, inject, viewChild, ViewContainerRef } from '@angular/core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport type { FieldWrapper } from '@ng-forge/dynamic-forms';\nimport { FIELD_SIGNAL_CONTEXT } from '@ng-forge/dynamic-forms/integration';\n\n/**\n * Forge wrapper component that renders child fields with a loading\n * indicator shown during async validation.\n *\n * Implements {@link FieldWrapper} and monitors the field tree's\n * pending signal to detect when async validators are running.\n */\n@Component({\n  selector: 'dbx-forge-working-wrapper',\n  template: `\n    <div class=\"dbx-forge-working-wrapper\">\n      <ng-container #fieldComponent></ng-container>\n      @if (showLoadingSignal()) {\n        <mat-progress-bar mode=\"indeterminate\" class=\"dbx-forge-working-bar\"></mat-progress-bar>\n      }\n    </div>\n  `,\n  imports: [MatProgressBarModule]\n})\nexport class DbxForgeWorkingWrapperComponent implements FieldWrapper {\n  readonly fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });\n\n  private readonly fieldSignalContext = inject(FIELD_SIGNAL_CONTEXT);\n\n  readonly showLoadingSignal = computed((): boolean => {\n    return this.fieldSignalContext.form().pending();\n  });\n}\n","// MARK: Wrapper Type\n/**\n * Registered wrapper type name for the working wrapper.\n *\n * Used in {@link WrapperConfig.type} to identify this wrapper when building\n * wrapper chains.\n */\nexport const DBX_FORGE_WORKING_WRAPPER_TYPE_NAME = 'dbx-forge-working-wrapper' as const;\n\n/**\n * Configuration for the working wrapper type.\n *\n * Shows an indeterminate progress bar when any child field has pending\n * async validation. No additional configuration is needed — the wrapper\n * monitors the form tree's pending state automatically.\n *\n * @example\n * ```typescript\n * const wrapper: DbxForgeWorkingWrapper = {\n *   type: 'dbx-forge-working-wrapper',\n * };\n * ```\n */\nexport interface DbxForgeWorkingWrapper {\n  readonly type: typeof DBX_FORGE_WORKING_WRAPPER_TYPE_NAME;\n}\n","import { NgModule } from '@angular/core';\nimport { DbxForgeFormComponent } from './forge.component';\n\n/**\n * Default template for a view that extends AbstractSyncForgeFormDirective or AbstractConfigAsyncForgeFormDirective.\n */\nexport const DBX_FORGE_FORM_COMPONENT_TEMPLATE = `<dbx-forge></dbx-forge>` as const;\n\n/**\n * Default providers for a view that extends AbstractSyncForgeFormDirective or AbstractConfigAsyncForgeFormDirective.\n */\nexport { provideDbxForgeFormContext as dbxForgeFormComponentProviders } from './forge.context';\n\nconst dbxForgeFormComponentImports = [DbxForgeFormComponent];\n\n/**\n * Default imports module for a view that extends AbstractSyncForgeFormDirective or AbstractConfigAsyncForgeFormDirective.\n */\n@NgModule({\n  imports: dbxForgeFormComponentImports,\n  exports: dbxForgeFormComponentImports\n})\nexport class DbxForgeFormComponentImportsModule {}\n","import { Directive, inject, input, type OnInit, effect, model } from '@angular/core';\nimport { type FormConfig } from '@ng-forge/dynamic-forms';\nimport { type Maybe } from '@dereekb/util';\nimport { type Observable } from 'rxjs';\nimport { filterMaybe, type MaybeObservableOrValue, maybeValueFromObservableOrValue } from '@dereekb/rxjs';\nimport { DbxForgeFormContext } from './forge.context';\nimport { distinctUntilChanged } from 'rxjs/operators';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { type DbxFormDisabledKey } from '../../form/form';\nimport { cleanSubscription } from '@dereekb/dbx-core';\n\n/**\n * Base directive for forge form components. Injects the DbxForgeFormContext and\n * provides utility methods for form interaction.\n */\n@Directive()\nexport abstract class AbstractForgeFormDirective<T = unknown> {\n  readonly context = inject(DbxForgeFormContext<T>, { self: true });\n  readonly disabled = input(false);\n\n  protected readonly _disabledEffect = effect(() => {\n    if (this.disabled()) {\n      this.context.setDisabled('directive', true);\n    } else {\n      this.context.setDisabled('directive', false);\n    }\n  });\n\n  getValue(): Observable<T> {\n    return this.context.getValue();\n  }\n\n  setValue(value: Maybe<Partial<T>>): void {\n    this.context.setValue(value);\n  }\n\n  resetForm(): void {\n    this.context.resetForm();\n  }\n\n  clearValue(): void {\n    this.context.setValue(undefined);\n  }\n\n  setDisabled(key?: DbxFormDisabledKey, disabled?: boolean): void {\n    this.context.setDisabled(key, disabled);\n  }\n}\n\n/**\n * Base directive for forge forms with static (synchronous) FormConfig.\n */\n@Directive()\nexport abstract class AbstractSyncForgeFormDirective<T = unknown> extends AbstractForgeFormDirective<T> implements OnInit {\n  abstract readonly formConfig: FormConfig;\n\n  ngOnInit(): void {\n    this.context.config = this.formConfig;\n  }\n}\n\n/**\n * Base directive for forge forms with dynamic (Observable) FormConfig.\n */\n@Directive()\nexport abstract class AbstractAsyncForgeFormDirective<T = unknown> extends AbstractForgeFormDirective<T> implements OnInit {\n  abstract readonly formConfig$: Observable<Maybe<FormConfig>>;\n\n  private readonly _configSub = cleanSubscription();\n\n  ngOnInit(): void {\n    // TODO: Can probably move this to constructor().\n    this._configSub.subscription = this.formConfig$.pipe(distinctUntilChanged(), filterMaybe()).subscribe((formConfig) => {\n      this.context.config = formConfig;\n    });\n  }\n}\n\n/**\n * Base directive for forge forms driven by an external config input that gets\n * transformed into a FormConfig Observable.\n *\n * Uses toObservable to convert the signal-based input into an Observable stream,\n * then pipes through maybeValueFromObservableOrValue to unwrap nested observables.\n */\n@Directive()\nexport abstract class AbstractConfigAsyncForgeFormDirective<T = unknown, C = unknown> extends AbstractAsyncForgeFormDirective<T> {\n  /**\n   * The forge form config input.\n   */\n  readonly config = model<MaybeObservableOrValue<C>>();\n\n  readonly currentConfig$: Observable<Maybe<C>> = toObservable(this.config).pipe(maybeValueFromObservableOrValue());\n\n  /**\n   * Subclasses must implement this to map C → FormConfig.\n   * For simple cases where C is FormConfig, just pipe through directly.\n   */\n  abstract override readonly formConfig$: Observable<Maybe<FormConfig>>;\n}\n","import { Component } from '@angular/core';\nimport { type Maybe } from '@dereekb/util';\nimport { type FormConfig } from '@ng-forge/dynamic-forms';\nimport { type Observable } from 'rxjs';\nimport { DBX_FORGE_FORM_COMPONENT_TEMPLATE, dbxForgeFormComponentProviders, DbxForgeFormComponentImportsModule } from './forge.component.template';\nimport { AbstractConfigAsyncForgeFormDirective } from './forge.directive';\n\n/**\n * A basic forge form that takes in the config and passes it off as form-config.\n *\n * Useful for tests.\n */\n@Component({\n  selector: 'dbx-forge-form',\n  template: DBX_FORGE_FORM_COMPONENT_TEMPLATE,\n  providers: dbxForgeFormComponentProviders(),\n  imports: [DbxForgeFormComponentImportsModule]\n})\nexport class DbxForgeAsyncConfigFormComponent<O = unknown, C extends FormConfig = FormConfig> extends AbstractConfigAsyncForgeFormDirective<O, C> {\n  readonly formConfig$: Observable<Maybe<FormConfig>> = this.currentConfig$;\n}\n","import { provideDynamicForm, type WrapperTypeDefinition } from '@ng-forge/dynamic-forms';\nimport { type FieldTypeDefinition, valueFieldMapper } from '@ng-forge/dynamic-forms/integration';\nimport { withMaterialFields } from '@ng-forge/dynamic-forms-material';\nimport { phoneFieldMapper } from './field/value/phone/phone.field.component';\nimport { dateTimeFieldMapper } from './field/value/date/datetime.field.component';\nimport { fixedDateRangeFieldMapper } from './field/value/date/fixeddaterange.field.component';\nimport { dateRangeFieldMapper } from './field/value/date/daterange.field.component';\nimport { timeDurationFieldMapper } from './field/value/duration/duration.field.component';\nimport {\n  FORGE_PHONE_FIELD_TYPE,\n  FORGE_DATETIME_FIELD_TYPE,\n  FORGE_FIXEDDATERANGE_FIELD_TYPE,\n  FORGE_DATERANGE_FIELD_TYPE,\n  FORGE_TIMEDURATION_FIELD_TYPE,\n  DBX_FORGE_SEARCHABLE_TEXT_FIELD_TYPE_NAME,\n  DBX_FORGE_SEARCHABLE_CHIP_FIELD_TYPE_NAME,\n  FORGE_PICKABLE_CHIP_FIELD_TYPE,\n  FORGE_PICKABLE_LIST_FIELD_TYPE,\n  FORGE_VALUE_SELECTION_FIELD_TYPE,\n  FORGE_LIST_SELECTION_FIELD_TYPE,\n  FORGE_SOURCE_SELECT_FIELD_TYPE,\n  FORGE_TEXT_EDITOR_FIELD_TYPE,\n  FORGE_COMPONENT_FIELD_TYPE,\n  FORGE_EXPAND_FIELD_TYPE_NAME,\n  FORGE_INFO_BUTTON_FIELD_TYPE_NAME,\n  DBX_FORGE_FORM_FIELD_WRAPPER_NAME,\n  DBX_FORGE_SECTION_WRAPPER_TYPE_NAME,\n  DBX_FORGE_STYLE_WRAPPER_TYPE_NAME,\n  DBX_FORGE_INFO_WRAPPER_TYPE_NAME,\n  DBX_FORGE_WORKING_WRAPPER_TYPE_NAME,\n  DBX_FORGE_FLEX_WRAPPER_TYPE_NAME,\n  DBX_FORGE_ARRAY_FIELD_WRAPPER_NAME,\n  DBX_FORGE_ARRAY_FIELD_ELEMENT_WRAPPER_NAME\n} from './field';\n\n/**\n * All custom dbx-form forge field type definitions.\n */\nexport const DBX_FORGE_FIELD_TYPES: FieldTypeDefinition[] = [\n  // -- Value fields with custom mappers --\n  {\n    name: FORGE_PHONE_FIELD_TYPE,\n    loadComponent: () => import('./field/value/phone/phone.field.component').then((m) => m.DbxForgePhoneFieldComponent),\n    mapper: phoneFieldMapper\n  },\n  {\n    name: FORGE_DATETIME_FIELD_TYPE,\n    loadComponent: () => import('./field/value/date/datetime.field.component').then((m) => m.DbxForgeDateTimeFieldComponent),\n    mapper: dateTimeFieldMapper\n  },\n  {\n    name: FORGE_DATERANGE_FIELD_TYPE,\n    loadComponent: () => import('./field/value/date/daterange.field.component').then((m) => m.DbxForgeDateRangeFieldComponent),\n    mapper: dateRangeFieldMapper\n  },\n  {\n    name: FORGE_FIXEDDATERANGE_FIELD_TYPE,\n    loadComponent: () => import('./field/value/date/fixeddaterange.field.component').then((m) => m.DbxForgeFixedDateRangeFieldComponent),\n    mapper: fixedDateRangeFieldMapper\n  },\n  {\n    name: FORGE_TIMEDURATION_FIELD_TYPE,\n    loadComponent: () => import('./field/value/duration/duration.field.component').then((m) => m.DbxForgeTimeDurationFieldComponent),\n    mapper: timeDurationFieldMapper\n  },\n  // -- Selection fields --\n  {\n    name: DBX_FORGE_SEARCHABLE_TEXT_FIELD_TYPE_NAME,\n    loadComponent: () => import('./field/selection/searchable/searchable-text.field.component').then((m) => m.DbxForgeSearchableTextFieldComponent),\n    mapper: valueFieldMapper\n  },\n  {\n    name: DBX_FORGE_SEARCHABLE_CHIP_FIELD_TYPE_NAME,\n    loadComponent: () => import('./field/selection/searchable/searchable-chip.field.component').then((m) => m.DbxForgeSearchableChipFieldComponent),\n    mapper: valueFieldMapper\n  },\n  {\n    name: FORGE_PICKABLE_CHIP_FIELD_TYPE,\n    loadComponent: () => import('./field/selection/pickable/pickable-chip.field.component').then((m) => m.DbxForgePickableChipFieldComponent),\n    mapper: valueFieldMapper\n  },\n  {\n    name: FORGE_PICKABLE_LIST_FIELD_TYPE,\n    loadComponent: () => import('./field/selection/pickable/pickable-list.field.component').then((m) => m.DbxForgePickableListFieldComponent),\n    mapper: valueFieldMapper\n  },\n  {\n    name: FORGE_VALUE_SELECTION_FIELD_TYPE,\n    loadComponent: () => import('./field/selection/selection.field.component').then((m) => m.DbxForgeValueSelectionFieldComponent),\n    mapper: valueFieldMapper\n  },\n  {\n    name: FORGE_LIST_SELECTION_FIELD_TYPE,\n    loadComponent: () => import('./field/selection/list/list.field.component').then((m) => m.DbxForgeListSelectionFieldComponent),\n    mapper: valueFieldMapper\n  },\n  {\n    name: FORGE_SOURCE_SELECT_FIELD_TYPE,\n    loadComponent: () => import('./field/selection/sourceselect/sourceselect.field.component').then((m) => m.DbxForgeSourceSelectFieldComponent),\n    mapper: valueFieldMapper\n  },\n  // -- Other fields --\n  {\n    name: FORGE_TEXT_EDITOR_FIELD_TYPE,\n    loadComponent: () => import('./field/texteditor/texteditor.field.component').then((m) => m.DbxForgeTextEditorFieldComponent),\n    mapper: valueFieldMapper\n  },\n  {\n    name: FORGE_COMPONENT_FIELD_TYPE,\n    loadComponent: () => import('./field/component/component.field.component').then((m) => m.DbxForgeComponentFieldComponent),\n    mapper: valueFieldMapper\n  },\n  // -- Wrapper-related fields --\n  {\n    name: FORGE_EXPAND_FIELD_TYPE_NAME,\n    loadComponent: () => import('./field/wrapper/expand/expand.field.component').then((m) => m.DbxForgeExpandFieldComponent),\n    mapper: valueFieldMapper\n  },\n  {\n    name: FORGE_INFO_BUTTON_FIELD_TYPE_NAME,\n    loadComponent: () => import('./field/wrapper/info/info.field.component').then((m) => m.DbxForgeInfoButtonFieldComponent),\n    mapper: valueFieldMapper\n  }\n];\n\n/**\n * All custom dbx-form forge wrapper type definitions.\n */\nexport const DBX_FORGE_FIELD_WRAPPER_TYPES: WrapperTypeDefinition[] = [\n  {\n    wrapperName: DBX_FORGE_FORM_FIELD_WRAPPER_NAME,\n    loadComponent: () => import('./field/wrapper/formfield/formfield.wrapper.component').then((m) => m.DbxForgeFormFieldWrapperComponent)\n  },\n  {\n    wrapperName: DBX_FORGE_SECTION_WRAPPER_TYPE_NAME,\n    loadComponent: () => import('./field/wrapper/section/section.wrapper.component').then((m) => m.DbxForgeSectionWrapperComponent)\n  },\n  {\n    wrapperName: DBX_FORGE_STYLE_WRAPPER_TYPE_NAME,\n    loadComponent: () => import('./field/wrapper/style/style.wrapper.component').then((m) => m.DbxForgeStyleWrapperComponent)\n  },\n  {\n    wrapperName: DBX_FORGE_INFO_WRAPPER_TYPE_NAME,\n    loadComponent: () => import('./field/wrapper/info/info.wrapper.component').then((m) => m.DbxForgeInfoWrapperComponent)\n  },\n  {\n    wrapperName: DBX_FORGE_WORKING_WRAPPER_TYPE_NAME,\n    loadComponent: () => import('./field/wrapper/working/working.wrapper.component').then((m) => m.DbxForgeWorkingWrapperComponent)\n  },\n  {\n    wrapperName: DBX_FORGE_FLEX_WRAPPER_TYPE_NAME,\n    loadComponent: () => import('./field/wrapper/flex/flex.wrapper.component').then((m) => m.DbxForgeFlexWrapperComponent)\n  },\n  {\n    wrapperName: DBX_FORGE_ARRAY_FIELD_WRAPPER_NAME,\n    loadComponent: () => import('./field/wrapper/array-field/array-field.wrapper.component').then((m) => m.DbxForgeArrayFieldWrapperComponent)\n  },\n  {\n    wrapperName: DBX_FORGE_ARRAY_FIELD_ELEMENT_WRAPPER_NAME,\n    loadComponent: () => import('./field/wrapper/array-field/array-field.element.wrapper.component').then((m) => m.DbxForgeArrayFieldElementWrapperComponent)\n  }\n];\n\n/**\n * Registers ng-forge dynamic form field declarations with Material Design field types\n * and custom dbx field types (phone, datetime, fixeddaterange, timeduration,\n * searchable text, searchable chip, text editor, component).\n *\n * Pass additional field types from extension packages (e.g. `DBX_FORGE_CALENDAR_FIELD_TYPES`,\n * `DBX_FORGE_MAPBOX_FIELD_TYPES`) to register them in the same `provideDynamicForm()` call.\n * Only one `provideDynamicForm()` call should exist per app — multiple calls overwrite\n * rather than merge.\n *\n * Add this to your app's providers alongside provideDbxFormConfiguration().\n *\n * @param additionalFieldTypes - Extra field type definitions from extension packages to register alongside the built-in types.\n * @returns The providers that register all forge field types with ng-forge's dynamic form system.\n *\n * @example\n * ```typescript\n * provideDbxForgeFormFieldDeclarations(\n *   ...DBX_FORGE_CALENDAR_FIELD_TYPES,\n *   ...DBX_FORGE_MAPBOX_FIELD_TYPES\n * )\n * ```\n */\nexport function provideDbxForgeFormFieldDeclarations(...additionalFieldTypes: FieldTypeDefinition[]) {\n  return provideDynamicForm(...withMaterialFields(), ...DBX_FORGE_FIELD_TYPES, ...DBX_FORGE_FIELD_WRAPPER_TYPES, ...additionalFieldTypes);\n}\n","import { type Maybe } from '@dereekb/util';\nimport { type MatInputField, type MatInputProps } from '@ng-forge/dynamic-forms-material';\nimport { dbxForgeTextField } from '../field';\nimport { type DbxForgeField } from '../form';\n\nexport interface DbxForgePresetSearchFormFieldsValue {\n  readonly search: string;\n}\n\nexport interface DbxForgePresetSearchFormFieldsConfig {\n  readonly key?: string;\n  readonly label?: string;\n  readonly placeholder?: string;\n  /**\n   * Escape hatch for Material form field styling (appearance, floatLabel, hideRequiredMarker, subscriptSizing, etc.).\n   * Forwarded to the underlying forge text field's `props`. `type` is fixed to `'text'`.\n   */\n  readonly props?: Partial<Omit<MatInputProps, 'type'>>;\n}\n\n/**\n * Creates a forge field array for a simple search form with a single text input.\n *\n * @param config - Optional search field configuration with label and placeholder.\n * @returns The forge field defs for the search form.\n */\nexport function dbxForgePresetSearchFormFields(config: Maybe<DbxForgePresetSearchFormFieldsConfig>) {\n  const { key = 'search', label, placeholder = 'Search', props } = config ?? {};\n\n  const field: DbxForgeField<MatInputField> = dbxForgeTextField({\n    key,\n    label,\n    placeholder,\n    autocomplete: false,\n    props\n  });\n\n  return [field];\n}\n","import { Component, output } from '@angular/core';\nimport { type FormConfig } from '@ng-forge/dynamic-forms';\nimport { type Maybe } from '@dereekb/util';\nimport { map, type Observable } from 'rxjs';\nimport { AbstractConfigAsyncForgeFormDirective } from '../form/forge.directive';\nimport { DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders } from '../form/forge.component.template';\nimport { DbxFormValueChangeDirective } from '../../form/io/form.change.directive';\nimport { dbxForgePresetSearchFormFields, type DbxForgePresetSearchFormFieldsConfig, type DbxForgePresetSearchFormFieldsValue } from './preset.form';\n\n@Component({\n  selector: 'dbx-form-search-form',\n  template: `\n    <dbx-forge (dbxFormValueChange)=\"searchChanged($event)\"></dbx-forge>\n  `,\n  providers: dbxForgeFormComponentProviders(),\n  imports: [DbxForgeFormComponentImportsModule, DbxFormValueChangeDirective],\n  host: {\n    class: 'd-block dbx-form-search-form'\n  }\n})\nexport class DbxForgePresetSearchFormComponent extends AbstractConfigAsyncForgeFormDirective<DbxForgePresetSearchFormFieldsValue, DbxForgePresetSearchFormFieldsConfig> {\n  // eslint-disable-next-line @angular-eslint/no-output-native\n  readonly search = output<string>();\n\n  readonly formConfig$: Observable<Maybe<FormConfig>> = this.currentConfig$.pipe(map((config) => ({ fields: dbxForgePresetSearchFormFields(config) }) as FormConfig));\n\n  searchChanged(value: Maybe<DbxForgePresetSearchFormFieldsValue>) {\n    this.search.emit(value?.search ?? '');\n  }\n}\n","import { capitalizeFirstLetter, type Maybe } from '@dereekb/util';\nimport type { ValidatorConfig } from '@ng-forge/dynamic-forms';\nimport { dbxForgeTextField, type DbxForgeTextFieldConfig } from '../field/value/text/text.field';\nimport { dbxForgeEmailField, type DbxForgeEmailFieldConfig } from '../field/value/text/text.additional.field';\nimport { type MatInputField } from '@ng-forge/dynamic-forms-material';\nimport { type DbxForgeField } from '../form';\n\n/**\n * Validation kind used on the verify password field to indicate the passwords do not match.\n */\nexport const DBX_FORGE_PASSWORDS_MATCH_VALIDATION_KIND = 'passwordsMatch';\n\n/**\n * Default validation message used when the passwords do not match.\n */\nexport const DEFAULT_DBX_FORGE_PASSWORDS_MATCH_VALIDATION_MESSAGE = 'The passwords do not match.';\n\n/**\n * Default autocomplete value for password fields.\n */\nexport const DEFAULT_DBX_FORGE_TEXT_PASSWORD_AUTOCOMPLETE = 'current-password';\n\n/**\n * Default autocomplete value for verify password fields.\n */\nexport const DEFAULT_DBX_FORGE_TEXT_VERIFY_PASSWORD_AUTOCOMPLETE = 'new-password';\n\n// MARK: Password Field\n/**\n * Configuration for a forge password field.\n */\nexport interface DbxForgeTextPasswordFieldConfig extends Omit<DbxForgeTextFieldConfig, 'inputType' | 'key'>, Partial<Pick<DbxForgeTextFieldConfig, 'key'>> {}\n\n/**\n * Convenience type for the password parameters (length/pattern constraints) of a forge password field.\n */\nexport type DbxForgeTextPasswordFieldPasswordParameters = Partial<Pick<DbxForgeTextFieldConfig, 'maxLength' | 'minLength' | 'pattern'>>;\n\n/**\n * Password input (HTML `type=\"password\"`) with secure autocomplete defaults.\n *\n * Defaults to the key `'password'` and label `'Password'` unless overridden.\n *\n * @param config - Optional configuration for the password field.\n * @returns A {@link MatInputField} with password input type.\n *\n * @dbxFormSlug password-field\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeTextPasswordFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeTextPasswordField({ key: 'password', required: true })\n * ```\n */\nexport function dbxForgeTextPasswordField(config?: DbxForgeTextPasswordFieldConfig) {\n  return dbxForgeTextField({\n    key: 'password',\n    autocomplete: DEFAULT_DBX_FORGE_TEXT_PASSWORD_AUTOCOMPLETE,\n    ...config,\n    label: config?.label ?? 'Password',\n    inputType: 'password',\n    required: true\n  });\n}\n\n/**\n * Companion to `password-field` for sign-up flows. Defaults `autocomplete` to `new-password`. Pair with `password-with-verify-fields` for cross-field equality validation.\n *\n * Defaults to the key `'verifyPassword'` and label `'Verify Password'` unless overridden.\n *\n * @param config - Optional configuration for the verify password field.\n * @returns A {@link MatInputField} with password input type.\n *\n * @dbxFormSlug verify-password-field\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative password-field\n * @dbxFormConfigInterface DbxForgeTextPasswordFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeTextVerifyPasswordField({ key: 'verifyPassword' })\n * ```\n */\nexport function dbxForgeTextVerifyPasswordField(config?: DbxForgeTextPasswordFieldConfig) {\n  return dbxForgeTextPasswordField({\n    key: 'verifyPassword',\n    label: 'Verify Password',\n    autocomplete: DEFAULT_DBX_FORGE_TEXT_VERIFY_PASSWORD_AUTOCOMPLETE,\n    ...config,\n    required: true\n  });\n}\n\n// MARK: Password With Verify Field\n/**\n * Configuration for a forge password field group that includes a verification (confirm) password field.\n */\nexport interface DbxForgeTextPasswordWithVerifyFieldConfig {\n  /**\n   * Optional configuration for the primary password field.\n   */\n  readonly password?: DbxForgeTextPasswordFieldConfig;\n  /**\n   * Optional configuration for the verify/confirm password field.\n   */\n  readonly verifyPassword?: DbxForgeTextPasswordFieldConfig;\n}\n\n/**\n * Password + verify-password pair with cross-field equality validation wired up. Drop-in for sign-up flows.\n *\n * The verify password field uses an expression-based custom validator that compares the\n * verify field value against the primary password field's value via `formValue`.\n *\n * @param config - Configuration for the password and verify password fields.\n * @returns A tuple of `[passwordField, verifyPasswordField]`\n *\n * @dbxFormSlug password-with-verify-fields\n * @dbxFormProduces FieldDef[]\n * @dbxFormArrayOutput no\n * @dbxFormFieldTemplate password-field, verify-password-field\n * @dbxFormConfigInterface DbxForgeTextPasswordWithVerifyFieldConfig\n *\n * @example\n * ```typescript\n * dbxForgeTextPasswordWithVerifyField({ password: { required: true } })\n * ```\n */\nexport function dbxForgeTextPasswordWithVerifyField(config?: DbxForgeTextPasswordWithVerifyFieldConfig) {\n  /**\n   * Utilize the verify password autocomplete if it is for a new password.\n   */\n  const passwordFieldAutocomplete = config?.password?.autocomplete ?? DEFAULT_DBX_FORGE_TEXT_VERIFY_PASSWORD_AUTOCOMPLETE;\n  const passwordField = dbxForgeTextPasswordField({ ...config?.password, autocomplete: passwordFieldAutocomplete });\n  const passwordKey = passwordField.key;\n  const verifyPasswordKey = config?.verifyPassword?.key ?? `verify${capitalizeFirstLetter(passwordKey)}`;\n  const verifyPasswordLabel = config?.verifyPassword?.label ?? `Verify ${passwordField.label ?? 'Password'}`;\n\n  const matchValidator: ValidatorConfig = {\n    type: 'custom',\n    expression: `fieldValue === formValue.${passwordKey}`,\n    kind: DBX_FORGE_PASSWORDS_MATCH_VALIDATION_KIND\n  };\n\n  const inputValidators = config?.verifyPassword?.validators ?? [];\n  const inputValidationMessages = config?.verifyPassword?.validationMessages;\n\n  const verifyPasswordField = dbxForgeTextVerifyPasswordField({\n    ...config?.password,\n    ...config?.verifyPassword,\n    key: verifyPasswordKey,\n    label: verifyPasswordLabel,\n    validators: [...inputValidators, matchValidator],\n    validationMessages: {\n      [DBX_FORGE_PASSWORDS_MATCH_VALIDATION_KIND]: DEFAULT_DBX_FORGE_PASSWORDS_MATCH_VALIDATION_MESSAGE,\n      ...inputValidationMessages\n    }\n  });\n\n  return [passwordField, verifyPasswordField] as const;\n}\n\n// MARK: Username Login Fields\n/**\n * Value type exported by dbxForgeUsernameLoginField().\n */\nexport interface DbxForgeDefaultUsernameLoginFieldValue {\n  readonly username: string;\n}\n\n/**\n * Value type exported by dbxForgeUsernamePasswordLoginFields().\n */\nexport interface DbxForgeDefaultUsernameLoginFieldsValue extends DbxForgeDefaultUsernameLoginFieldValue {\n  readonly password: string;\n  readonly verifyPassword?: string;\n}\n\n/**\n * Configuration for the username field in a forge login form.\n */\nexport interface DbxForgeUsernameLoginFieldUsernameConfig {\n  /**\n   * Configuration for an email-based username field.\n   */\n  readonly email?: Omit<DbxForgeEmailFieldConfig, 'key'>;\n  /**\n   * Configuration for a plain text username field.\n   */\n  readonly username?: Omit<DbxForgeTextFieldConfig, 'key'>;\n}\n\n/**\n * Input type for the username field configuration.\n *\n * Can be the string `'email'` or `'username'` for quick defaults,\n * or a full {@link DbxForgeUsernameLoginFieldUsernameConfig} object for custom configuration.\n */\nexport type DbxForgeUsernameLoginFieldUsernameConfigInput = 'email' | 'username' | DbxForgeUsernameLoginFieldUsernameConfig;\n\n/**\n * Configuration for forge username/password login fields.\n */\nexport interface DbxForgeUsernameLoginFieldsConfig {\n  /**\n   * Username field configuration. Use `'email'` or `'username'` for defaults,\n   * or provide a custom config.\n   */\n  readonly username: DbxForgeUsernameLoginFieldUsernameConfigInput;\n  /**\n   * Optional configuration for the password field.\n   */\n  readonly password?: DbxForgeTextPasswordFieldConfig;\n  /**\n   * Whether to include a verify password field, or a custom configuration for it.\n   * Set to `true` for defaults, `false`/`undefined` to omit, or pass a config object.\n   */\n  readonly verifyPassword?: Maybe<boolean | DbxForgeTextPasswordFieldConfig>;\n}\n\n/**\n * Complete login/signup field set: username, password, and optional verify-password. Drop into the top-level `fields: []`.\n *\n * When `verifyPassword` is provided, a second password field is added with a custom\n * validator that ensures both password values match.\n *\n * @param config - Login fields configuration.\n * @returns The forge field definitions for the login form.\n *\n * @dbxFormSlug username-password-login-fields\n * @dbxFormProduces FieldDef[]\n * @dbxFormArrayOutput no\n * @dbxFormFieldTemplate username-login-field, password-field, verify-password-field\n * @dbxFormConfigInterface DbxForgeUsernameLoginFieldsConfig\n *\n * @example\n * ```typescript\n * dbxForgeUsernamePasswordLoginFields({ username: 'email', verifyPassword: true })\n * ```\n */\nexport function dbxForgeUsernamePasswordLoginFields(config: DbxForgeUsernameLoginFieldsConfig) {\n  const { username, password, verifyPassword } = config;\n  const usernameField = dbxForgeUsernameLoginField(username);\n\n  let result: DbxForgeField<MatInputField>[];\n\n  if (verifyPassword) {\n    const [passwordField, verifyPasswordField] = dbxForgeTextPasswordWithVerifyField({\n      password,\n      verifyPassword: verifyPassword === true ? undefined : verifyPassword\n    });\n\n    result = [usernameField, passwordField, verifyPasswordField];\n  } else {\n    const passwordField = dbxForgeTextPasswordField(password);\n    result = [usernameField, passwordField];\n  }\n\n  return result;\n}\n\n/**\n * Username field for login forms. Accepts `\"email\"` or `\"username\"` as shorthand presets, or a full config object.\n *\n * Supports email or plain text input based on the provided configuration.\n *\n * @param username - Either `'email'`, `'username'`, or a full config object.\n * @returns A forge field definition for the username input.\n *\n * @dbxFormSlug username-login-field\n * @dbxFormProduces string\n * @dbxFormArrayOutput no\n * @dbxFormFieldDerivative text\n * @dbxFormConfigInterface DbxForgeUsernameLoginFieldUsernameConfigInput\n *\n * @example\n * ```typescript\n * dbxForgeUsernameLoginField({ username: 'email' })\n * ```\n */\nexport function dbxForgeUsernameLoginField(username: DbxForgeUsernameLoginFieldUsernameConfigInput) {\n  let usernameFieldConfig: DbxForgeUsernameLoginFieldUsernameConfig = username as DbxForgeUsernameLoginFieldUsernameConfig;\n\n  if (typeof username === 'string') {\n    if (username === 'email') {\n      usernameFieldConfig = { email: { required: true } };\n    } else {\n      usernameFieldConfig = { username: { required: true } };\n    }\n  }\n\n  let result: DbxForgeField<MatInputField>;\n\n  if (usernameFieldConfig.email) {\n    result = dbxForgeEmailField({ ...usernameFieldConfig.email, key: 'username', autocomplete: 'email' });\n  } else {\n    result = dbxForgeTextField({ ...usernameFieldConfig.username, key: 'username', autocomplete: 'username', required: true });\n  }\n\n  return result;\n}\n","/**\n * A function that takes a search string and returns matching string results.\n */\n\nimport { type TimezoneInfo, allTimezoneInfos, timezoneInfoForSystem, searchTimezoneInfos } from '@dereekb/date';\nimport { of, type Observable } from 'rxjs';\nimport type { SearchableValueFieldDisplayFn, SearchableValueFieldDisplayValue, SearchableValueFieldStringSearchFn, SearchableValueFieldValue } from '../../field';\n\nexport type TestStringSearchFunction = (text: string) => string[];\n\n/**\n * Creates a search function for timezone strings that searches across all known timezone infos.\n *\n * When the search string is empty, the system timezone is returned first, followed by all timezones.\n *\n * @returns A {@link SearchableValueFieldStringSearchFn} for searching timezone values.\n * @__NO_SIDE_EFFECTS__\n */\nexport function timezoneStringSearchFunction(): SearchableValueFieldStringSearchFn<string, TimezoneInfo> {\n  const timezoneInfos = allTimezoneInfos();\n\n  return (search: string) => {\n    let searchResults;\n\n    if (search.length === 0) {\n      searchResults = [timezoneInfoForSystem(), ...timezoneInfos];\n    } else {\n      searchResults = searchTimezoneInfos(search, timezoneInfos);\n    }\n\n    return of(searchResults.map((meta) => ({ value: meta.timezone, meta })));\n  };\n}\n/**\n * Display function for timezone string values in a searchable field.\n *\n * Maps each timezone value to a display object with the timezone name as the label\n * and its abbreviation as the sublabel.\n *\n * @param values - The timezone values to convert to display values.\n * @param values - The timezone values to convert to display values.\n * @returns An observable emitting display values with label and sublabel.\n */\n\nexport const DISPLAY_FOR_TIMEZONE_STRING_VALUE: SearchableValueFieldDisplayFn<string, TimezoneInfo> = (values: SearchableValueFieldValue<string, TimezoneInfo>[]) => {\n  const timezoneInfos = allTimezoneInfos();\n\n  const displayValues: SearchableValueFieldDisplayValue<string, TimezoneInfo>[] = values.map((x) => {\n    const meta = x.meta ?? timezoneInfos.find((y) => x.value === y.timezone); // attempt to find the metadata in the timeInfos if it isn't provided.\n    return { ...x, label: x.value, sublabel: meta?.abbreviation ?? 'Unknown' };\n  });\n\n  const obs: Observable<SearchableValueFieldDisplayValue<string, TimezoneInfo>[]> = of(displayValues);\n  return obs;\n};\n","import { type TimezoneString } from '@dereekb/util';\nimport { type TimezoneInfo } from '@dereekb/date';\nimport { timezoneStringSearchFunction, DISPLAY_FOR_TIMEZONE_STRING_VALUE } from '../../shared/template/timezone';\nimport { dbxForgeSearchableTextField, type DbxForgeSearchableTextFieldConfig } from '../field/selection/searchable/searchable-text.field';\n\n/**\n * Configuration for a forge timezone string field.\n *\n * Omits search-related properties that are internally configured.\n */\nexport interface DbxForgeTimezoneStringFieldConfig extends Omit<DbxForgeSearchableTextFieldConfig<TimezoneString, TimezoneInfo>, 'key' | 'search' | 'displayForValue' | 'searchOnEmptyText' | 'allowStringValues' | 'showClearValue'>, Partial<Pick<DbxForgeSearchableTextFieldConfig<TimezoneString, TimezoneInfo>, 'key'>> {}\n\n/**\n * Creates a forge searchable field for selecting a timezone.\n *\n * Defaults to the key `'timezone'` and label `'Timezone'`. Searches all known timezones\n * and displays the timezone name with its abbreviation.\n *\n * @param config - Optional configuration overrides for the timezone field.\n * @returns A forge searchable text field definition for timezone selection.\n *\n * @example\n * ```typescript\n * const field = dbxForgeTimezoneStringField();\n * const fieldWithKey = dbxForgeTimezoneStringField({ key: 'tz', label: 'Select Timezone' });\n * ```\n */\nexport function dbxForgeTimezoneStringField(config: DbxForgeTimezoneStringFieldConfig = {}) {\n  return dbxForgeSearchableTextField<TimezoneString, TimezoneInfo>({\n    key: 'timezone',\n    label: 'Timezone',\n    ...config,\n    props: {\n      ...config.props,\n      searchOnEmptyText: true,\n      allowStringValues: false,\n      showClearValue: true,\n      search: timezoneStringSearchFunction(),\n      displayForValue: DISPLAY_FOR_TIMEZONE_STRING_VALUE\n    }\n  });\n}\n","import { dbxForgeWebsiteUrlValidator, type DbxForgeWebsiteUrlValidatorConfig } from '../field/field.util.validation';\nimport { dbxForgeTextField, type DbxForgeTextFieldConfig } from '../field/value/text/text.field';\n\n/**\n * Configuration for a forge website URL text field.\n */\nexport interface DbxForgeWebsiteUrlFieldConfig extends Omit<DbxForgeTextFieldConfig, 'inputType' | 'key'>, Partial<Pick<DbxForgeTextFieldConfig, 'key'>>, DbxForgeWebsiteUrlValidatorConfig {}\n\n/**\n * Creates a forge text field configured for website URL input, with website URL validation.\n *\n * Defaults to the key `'website'` and label `'Website Url'` unless overridden in the config.\n *\n * @param config - Optional configuration for the website URL field.\n * @returns A {@link MatInputField} for website URL input.\n *\n * @example\n * ```typescript\n * const field = dbxForgeWebsiteUrlField();\n * ```\n */\nexport function dbxForgeWebsiteUrlField(config?: DbxForgeWebsiteUrlFieldConfig) {\n  return dbxForgeTextField(\n    {\n      key: 'website',\n      ...config,\n      label: config?.label ?? 'Website Url',\n      inputType: 'text'\n    },\n    (x) => {\n      x.addValidation(dbxForgeWebsiteUrlValidator(config));\n    }\n  );\n}\n","import type { AsyncCustomValidator } from '@ng-forge/dynamic-forms';\nimport { rxResource } from '@angular/core/rxjs-interop';\nimport { type Observable, of } from 'rxjs';\nimport { dbxForgeTextField, type DbxForgeTextFieldConfig } from '../field/value/text/text.field';\nimport type { DbxForgeField } from '../form/forge.form';\nimport type { MatInputField } from '@ng-forge/dynamic-forms-material';\nimport { DBX_FORGE_WORKING_WRAPPER_TYPE_NAME } from '../field';\n\n// MARK: Validator\n/**\n * The default validator name used in the field's validators array and the customFnConfig registration.\n */\nexport const FORGE_FIELD_VALUE_IS_AVAILABLE_VALIDATOR_NAME = 'fieldValueIsAvailable';\n\n/**\n * Function that checks whether a value is available.\n *\n * @returns An observable that emits `true` if the value is available, `false` otherwise.\n */\nexport type DbxForgeFieldValueIsAvailableCheckFn<T> = (value: T) => Observable<boolean>;\n\n/**\n * Configuration for the forge field-value-is-available async validator.\n */\nexport interface DbxForgeFieldValueIsAvailableValidatorConfig<T> {\n  /**\n   * Function that checks whether the entered value is available.\n   */\n  readonly checkValueIsAvailable: DbxForgeFieldValueIsAvailableCheckFn<T>;\n  /**\n   * Custom error message displayed when the value is not available.\n   *\n   * Defaults to 'This value is not available.'.\n   */\n  readonly isNotAvailableErrorMessage?: string;\n  /**\n   * Optional custom validator name. Defaults to {@link FORGE_FIELD_VALUE_IS_AVAILABLE_VALIDATOR_NAME}.\n   *\n   * Useful when multiple availability fields exist in the same form to avoid name collisions.\n   */\n  readonly validatorName?: string;\n  /**\n   * Optional throttle delay in milliseconds between availability checks.\n   */\n  readonly throttle?: number;\n}\n\n/**\n * Internal params shape for the availability-check rxResource.\n *\n * Includes the `checkValueIsAvailable` function passed via `ValidatorConfig.params`\n * so that a single reusable validator can serve multiple fields.\n */\ninterface DbxForgeAvailabilityCheckParams {\n  readonly value: unknown;\n  readonly checkValueIsAvailable?: DbxForgeFieldValueIsAvailableCheckFn<unknown>;\n}\n\n/**\n * Creates the reusable async validator for availability checks.\n *\n * This validator reads the `checkValueIsAvailable` function from\n * the `ValidatorConfig.params` at runtime, allowing a single registered function\n * to serve multiple fields with different check functions.\n *\n * @returns An {@link AsyncCustomValidator} that delegates to a per-field `checkValueIsAvailable` function.\n */\nfunction _createReusableAvailabilityValidator(): AsyncCustomValidator {\n  return {\n    params: (ctx, config): DbxForgeAvailabilityCheckParams => ({\n      value: ctx.value(),\n      checkValueIsAvailable: config?.['checkValueIsAvailable'] as DbxForgeFieldValueIsAvailableCheckFn<unknown> | undefined\n    }),\n    factory: (paramsSignal) => {\n      return rxResource<boolean, DbxForgeAvailabilityCheckParams>({\n        params: () => paramsSignal() as DbxForgeAvailabilityCheckParams,\n        stream: ({ params }) => {\n          const result: Observable<boolean> = !params.value || !params.checkValueIsAvailable ? of(true) : params.checkValueIsAvailable(params.value);\n          return result;\n        }\n      });\n    },\n    onSuccess: (result) => {\n      return result === false ? { kind: FORGE_FIELD_VALUE_IS_AVAILABLE_VALIDATOR_NAME } : null;\n    },\n    onError: () => null\n  };\n}\n\n/**\n * Singleton reusable availability validator.\n *\n * Registered once per form via `reusableDefinition: true` and referenced by `functionName`.\n * Each field passes its own `checkValueIsAvailable` via `ValidatorConfig.params`.\n */\nconst _REUSABLE_AVAILABILITY_VALIDATOR = _createReusableAvailabilityValidator();\n\n// MARK: Text Field\n/**\n * Configuration for a forge text field that includes an async availability check.\n */\nexport interface DbxForgeTextAvailableFieldConfig extends DbxForgeTextFieldConfig, Omit<DbxForgeFieldValueIsAvailableValidatorConfig<string>, 'checkValueIsAvailable'> {\n  /**\n   * Function that checks whether the entered value is available.\n   */\n  readonly checkValueIsAvailable: DbxForgeFieldValueIsAvailableCheckFn<string>;\n}\n\n/**\n * Creates a forge text field with an async availability validator.\n *\n * The validator function and validation messages are auto-registered into the field's `_formConfig`,\n * so callers using {@link dbxForgeFinalizeFormConfig} get everything wired automatically.\n *\n * @param config - Configuration for the text field and availability validation.\n * @returns A {@link DbxForgeField} text field with the validator and messages registered in `_formConfig`.\n *\n * @example\n * ```typescript\n * const field = dbxForgeTextIsAvailableField({\n *   key: 'username',\n *   label: 'Username',\n *   checkValueIsAvailable: (value) => userService.isAvailable(value),\n *   isNotAvailableErrorMessage: 'Username is already taken'\n * });\n *\n * const formConfig = dbxForgeFinalizeFormConfig({\n *   fields: [field, ...otherFields]\n * }).config;\n * ```\n */\nexport function dbxForgeTextIsAvailableField(config: DbxForgeTextAvailableFieldConfig): DbxForgeField<MatInputField> {\n  const { checkValueIsAvailable, isNotAvailableErrorMessage = 'This value is not available.', validatorName = FORGE_FIELD_VALUE_IS_AVAILABLE_VALIDATOR_NAME, throttle: _throttle, ...textConfig } = config;\n\n  return dbxForgeTextField(textConfig, (x) => {\n    x.addWrappers({\n      type: DBX_FORGE_WORKING_WRAPPER_TYPE_NAME\n    });\n\n    x.addValidation({\n      validators: [\n        {\n          type: 'async' as const,\n          fn: _REUSABLE_AVAILABILITY_VALIDATOR,\n          functionName: validatorName,\n          reusableDefinition: true,\n          params: {\n            checkValueIsAvailable\n          }\n        }\n      ],\n      formValidationMessages: { [validatorName]: isNotAvailableErrorMessage }\n    });\n  });\n}\n","import { type DateTimePresetConfiguration } from './datetime';\n\nexport const DEFAULT_DATE_TIME_FIELD_MENU_PRESETS_PRESETS: DateTimePresetConfiguration[] = [\n  {\n    label: '6:00AM',\n    timeString: '6:00AM'\n  },\n  {\n    label: '8:00AM',\n    timeString: '8:00AM'\n  },\n  {\n    label: '10:00AM',\n    timeString: '10:00AM'\n  },\n  {\n    label: 'Noon',\n    timeString: '12:00PM'\n  },\n  {\n    label: '2:00PM',\n    timeString: '2:00PM'\n  },\n  {\n    label: '5:00PM',\n    timeString: '5:00PM'\n  },\n  {\n    label: 'Midnight',\n    timeString: '12:00AM'\n  }\n];\n","import { caseInsensitiveFilterByIndexOfDecisionFactory, type LabeledValue, type Maybe, type SearchStringFilterFunction, searchStringFilterFunction } from '@dereekb/util';\nimport { type Observable, of } from 'rxjs';\nimport { type PickableValueFieldDisplayFunction, type PickableValueFieldDisplayValue, type PickableValueFieldFilterFunction, type PickableValueFieldLoadValuesFunction, type PickableValueFieldValue } from './pickable';\n\n/**\n * Case-insensitive filter function that matches pickable display values by their label using indexOf.\n */\nexport const filterPickableItemFieldValuesByLabelFilterFunction: SearchStringFilterFunction<PickableValueFieldDisplayValue<any>> = searchStringFilterFunction({\n  readStrings: (x) => [x.label],\n  decisionFactory: caseInsensitiveFilterByIndexOfDecisionFactory\n});\n\n/**\n * Filters pickable display values by label text, returning their underlying values.\n *\n * Returns all values when filter text is empty.\n *\n * @param filterText - Text to filter by.\n * @param values - Display values to filter.\n * @returns Observable emitting the filtered value array.\n */\nexport function filterPickableItemFieldValuesByLabel<T>(filterText: Maybe<string>, values: PickableValueFieldDisplayValue<T>[]): Observable<T[]> {\n  const filteredValues = filterText ? filterPickableItemFieldValuesByLabelFilterFunction(filterText, values) : values;\n  return of(filteredValues.map((x) => x.value));\n}\n\n// MARK: PickableValueFieldValuesConfigForStaticLabeledValues\n/**\n * Subset of pickable field props derived from a static set of labeled values.\n */\nexport interface PickableValueFieldValuesConfigForStaticLabeledValues<T, M extends LabeledValue<T>> {\n  readonly loadValues: PickableValueFieldLoadValuesFunction<T, M>;\n  readonly displayForValue: PickableValueFieldDisplayFunction<T, M>;\n  readonly filterValues: PickableValueFieldFilterFunction<T, M>;\n}\n\n/**\n * Configuration for creating a pickable field from a static set of labeled values.\n */\nexport interface PickableValueFieldValuesConfigForStaticLabeledValuesConfig<T, M extends LabeledValue<T>> {\n  readonly allOptions: M[];\n  readonly unknownOptionLabel?: string;\n}\n\n/**\n * Creates `loadValues`, `displayForValue`, and `filterValues` functions from a static array of labeled values.\n *\n * Simplifies pickable field setup when all options are known upfront.\n *\n * @param input - Array of labeled values or a config object with options and unknown label.\n * @returns Props subset for configuring a pickable field.\n *\n * @example\n * ```typescript\n * const config = pickableValueFieldValuesConfigForStaticLabeledValues([\n *   { value: 'a', label: 'Option A' },\n *   { value: 'b', label: 'Option B' }\n * ]);\n * ```\n */\nexport function pickableValueFieldValuesConfigForStaticLabeledValues<T, M extends LabeledValue<T>>(input: M[] | PickableValueFieldValuesConfigForStaticLabeledValuesConfig<T, M>): PickableValueFieldValuesConfigForStaticLabeledValues<T, M> {\n  const config = Array.isArray(input) ? { allOptions: input } : input;\n  const { allOptions, unknownOptionLabel = 'UNKNOWN' } = config;\n  const values: PickableValueFieldValue<T, M>[] = allOptions.map((meta) => ({ value: meta.value, meta }));\n  const optionsMap = new Map(allOptions.map((x) => [x.value, x]));\n\n  return {\n    loadValues: () => of(values),\n    filterValues: filterPickableItemFieldValuesByLabel, // auto filter by label\n    displayForValue: (values: PickableValueFieldValue<T, M>[]) =>\n      of(\n        values.map((x) => {\n          const meta = x.meta ?? optionsMap.get(x.value);\n          return { ...x, meta, label: meta?.label ?? unknownOptionLabel };\n        })\n      )\n  };\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Provides vertical spacing after a form.\n *\n * Can be used as an element (`<dbx-form-spacer>`), attribute (`[dbxFormSpacer]`), or CSS class (`.dbx-form-spacer`).\n *\n * @selector `dbx-form-spacer,[dbxFormSpacer],.dbx-form-spacer`\n */\n@Directive({\n  selector: 'dbx-form-spacer,[dbxFormSpacer],.dbx-form-spacer',\n  host: {\n    class: 'd-block dbx-form-spacer'\n  }\n})\nexport class DbxFormSpacerDirective {}\n","import { type AbstractControl, type ValidationErrors, type ValidatorFn } from '@angular/forms';\n\n/**\n * Angular form validator that requires the control value to be truthy.\n *\n * @returns A ValidatorFn that fails when the value is falsy.\n */\nexport function isTruthy(): ValidatorFn {\n  // eslint-disable-next-line dereekb-util/prefer-maybe-type -- Angular's ValidatorFn returns exactly `ValidationErrors | null` (no `undefined`).\n  return (control: AbstractControl): ValidationErrors | null => {\n    const value: boolean | undefined = control.value;\n\n    if (!value) {\n      return {\n        isTruthy: value\n      };\n    }\n\n    return {};\n  };\n}\n","import { Validators, type ValidatorFn } from '@angular/forms';\nimport { HAS_WEBSITE_DOMAIN_NAME_REGEX } from '@dereekb/util';\n\n/**\n * Angular form validator that checks whether the control value matches a website domain name pattern.\n *\n * @returns A ValidatorFn that validates against the domain name regex.\n */\nexport function isDomain(): ValidatorFn {\n  return Validators.pattern(HAS_WEBSITE_DOMAIN_NAME_REGEX);\n}\n","import { type AbstractControl, type ValidatorFn } from '@angular/forms';\nimport { type KeyValueTupleFilter, allObjectsAreEqual, type EqualityComparatorFunction, KeyValueTypleValueFilter, type ObjectMap, valuesFromPOJO } from '@dereekb/util';\n\nexport const FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY = 'fieldValuesAreEqual';\n\nexport interface FieldValuesAreEqualValidatorConfig<T extends object = object> {\n  /**\n   * Keys of the value to match on.\n   *\n   * If none are defined, then all fields from the control are matched.\n   */\n  readonly keysFilter?: (keyof T)[];\n\n  /**\n   * Full filter to use, if defined.\n   */\n  readonly valuesFilter?: KeyValueTupleFilter<T>;\n\n  /**\n   * Optional equivalence comparator.\n   */\n  readonly isEqual?: EqualityComparatorFunction<T>;\n\n  /**\n   * Custom message for this validator.\n   */\n  readonly message?: string;\n}\n\n/**\n * Validator for validating all values within an object.\n *\n * This is useful for validating a control group where two or more values are expected to be the same, such as a password and a password verification field.\n *\n * @param config\n * @returns\n */\nexport function fieldValuesAreEqualValidator<T extends object = object>(config: FieldValuesAreEqualValidatorConfig<T> = {}): ValidatorFn {\n  const { keysFilter, valuesFilter: inputValuesFilter, isEqual = (a, b) => a === b, message = 'Field values are not equal.' } = config;\n\n  const valuesFilter: KeyValueTupleFilter<T, keyof T> = inputValuesFilter ?? {\n    valueFilter: KeyValueTypleValueFilter.NONE, // keep all values. Null/undefined should be processed.\n    keysFilter\n  };\n\n  return (control: AbstractControl) => {\n    const object: ObjectMap<T> = control.value;\n    const values: T[] = valuesFromPOJO(object as T, valuesFilter);\n    const isValid = allObjectsAreEqual(values, isEqual);\n\n    if (isValid) {\n      return null;\n    }\n\n    return {\n      [FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY]: { message }\n    };\n  };\n}\n","/* eslint-disable dereekb-util/prefer-maybe-type -- Angular's ValidatorFn returns exactly `ValidationErrors | null`; widening to `Maybe<...>` adds `undefined` and breaks the contract (TS2322). */\nimport { type AbstractControl, type ValidationErrors, type ValidatorFn, Validators } from '@angular/forms';\nimport { isNumberDivisibleBy, nearestDivisibleValues } from '@dereekb/util';\n\n/**\n * Merges the use of the min and max validator.\n *\n * @param min\n * @param max\n * @returns\n */\nexport function isInRange(min: number = Number.MIN_SAFE_INTEGER, max: number = Number.MAX_SAFE_INTEGER): ValidatorFn {\n  const minFn = Validators.min(min);\n  const maxFn = Validators.max(max);\n\n  return (control: AbstractControl): ValidationErrors | null => {\n    const minError = minFn(control);\n    const maxError = maxFn(control);\n\n    let errors: ValidationErrors | null = null;\n\n    if (minError || maxError) {\n      errors = {\n        ...minError,\n        ...maxError\n      };\n    }\n\n    return errors;\n  };\n}\n\nexport const IS_DIVISIBLE_BY_VALIDATION_KEY = 'isDivisibleBy';\n\nexport interface IsDivisibleByError {\n  value: number;\n  nearest: number;\n  divisor: number;\n  message: string;\n}\n\n/**\n * Angular Form ValidationFn for checking isDivisibleBy the input divisor.\n *\n * @param divisor - The non-zero divisor every input value must be divisible by.\n * @returns A `ValidatorFn` that emits an `isDivisibleBy` error when the control value is not divisible by `divisor`.\n * @throws {Error} When `divisor` is zero.\n */\nexport function isDivisibleBy(divisor: number): ValidatorFn {\n  if (divisor === 0) {\n    throw new Error('Divisior must be greater than zero.');\n  }\n\n  return (control: AbstractControl): ValidationErrors | null => {\n    const value: number | undefined = control.value;\n\n    if (value != null && !isNumberDivisibleBy(value, divisor)) {\n      const nearest = nearestDivisibleValues(value, divisor);\n      return {\n        [IS_DIVISIBLE_BY_VALIDATION_KEY]: {\n          value,\n          divisor,\n          nearest,\n          message: `Number must by divisible by ${divisor}. The two nearest valid values are ${nearest.nearestFloor} and ${nearest.nearestCeil}.`\n        }\n      };\n    }\n\n    return {};\n  };\n}\n","import { first, switchMap, map, type Observable, of, catchError } from 'rxjs';\nimport { type AbstractControl, type AsyncValidatorFn } from '@angular/forms';\nimport { asyncPusherCache } from '@dereekb/rxjs';\n\nexport const FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY = 'fieldValueIsAvailable';\nexport const FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY = 'fieldValueIsAvailableError';\n\nexport type FieldValueIsAvailableValidatorFunction<T> = (value: T) => Observable<boolean>;\n\nexport interface FieldValueIsAvailableValidatorConfig<T> {\n  /**\n   * How long to wait in between value changes.\n   */\n  readonly throttle?: number;\n\n  /**\n   * Returns an observable that checks whether or not the value is currently available.\n   *\n   * @param value\n   */\n  readonly checkValueIsAvailable: FieldValueIsAvailableValidatorFunction<T>;\n\n  /**\n   * Custom message for this validator.\n   */\n  readonly message?: string;\n}\n\n/**\n * Validator for validating all values within an object.\n *\n * This is useful for validating a control group where two or more values are expected to be the same, such as a password and a password verification field.\n *\n * @param config\n * @returns\n */\nexport function fieldValueIsAvailableValidator<T>(config: FieldValueIsAvailableValidatorConfig<T>): AsyncValidatorFn {\n  const { throttle = 400, checkValueIsAvailable, message = 'This value is not available.' } = config;\n\n  const pusher = asyncPusherCache<T>({\n    throttle\n  });\n\n  return (control: AbstractControl) =>\n    pusher(control.valueChanges)(control.value as T).pipe(\n      switchMap((x) => checkValueIsAvailable(x)),\n      map((isAvailable) => {\n        if (isAvailable) {\n          return null;\n        }\n\n        return {\n          [FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY]: { message }\n        };\n      }),\n      catchError(() =>\n        of({\n          [FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY]: { message: 'An error occured.' }\n        })\n      ),\n      first()\n    );\n}\n","import { type EnvironmentProviders, makeEnvironmentProviders, type Provider } from '@angular/core';\nimport { provideDateFnsAdapter } from '@angular/material-date-fns-adapter';\nimport { MAT_DATE_LOCALE } from '@angular/material/core';\nimport { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';\nimport { enUS } from 'date-fns/locale';\nimport { type DateTimePresetConfiguration, DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN, DEFAULT_DATE_TIME_FIELD_MENU_PRESETS_PRESETS } from './field';\nimport { type Maybe } from '@dereekb/util';\n\nexport interface ProvideDbxFormConfigurationConfig {\n  readonly provideDateAdapter?: boolean;\n  readonly defaultDateTimePresets?: Maybe<DateTimePresetConfiguration[]>;\n}\n\n/**\n * Provides the core dbx-form configuration including Material form field defaults,\n * date adapter, and optional date-time presets.\n *\n * @param config - Optional configuration for the date adapter and default date-time presets.\n * @returns Environment providers for dbx-form.\n */\nexport function provideDbxFormConfiguration(config?: ProvideDbxFormConfigurationConfig): EnvironmentProviders {\n  const { provideDateAdapter, defaultDateTimePresets } = config ?? {};\n\n  const providers: Provider[] = [\n    {\n      provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,\n      useValue: {\n        subscriptSizing: 'dynamic',\n        floatLabel: 'always',\n        appearance: 'outline'\n      }\n    },\n    {\n      provide: DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN,\n      useValue: defaultDateTimePresets ?? DEFAULT_DATE_TIME_FIELD_MENU_PRESETS_PRESETS\n    }\n  ];\n\n  if (provideDateAdapter !== false) {\n    providers.push(provideDateFnsAdapter(), {\n      provide: MAT_DATE_LOCALE,\n      useValue: enUS\n    });\n  }\n\n  return makeEnvironmentProviders(providers);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","TIME_OUTPUT_THROTTLE_TIME","map","throttleTime","distinctUntilChanged","shareReplay","startWith","switchMap","filter","first","skip","i1","i5","i8","i4","combineLatestWith","DatePickerDateRange","debounceTime","i3","isE164PhoneNumberFunction","tap","dbxForgeFormComponentProviders","i1.DbxForgeFormComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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