{"version":3,"file":"ng-primitives-select.mjs","sources":["../../../../packages/ng-primitives/select/src/native-select/native-select-state.ts","../../../../packages/ng-primitives/select/src/native-select/native-select.ts","../../../../packages/ng-primitives/select/src/select/select-state.ts","../../../../packages/ng-primitives/select/src/select-dropdown/select-dropdown-state.ts","../../../../packages/ng-primitives/select/src/select-dropdown/select-dropdown.ts","../../../../packages/ng-primitives/select/src/select-input/select-input-state.ts","../../../../packages/ng-primitives/select/src/select-input/select-input.ts","../../../../packages/ng-primitives/select/src/select-list/select-list-state.ts","../../../../packages/ng-primitives/select/src/select-list/select-list.ts","../../../../packages/ng-primitives/select/src/select-option/select-option-state.ts","../../../../packages/ng-primitives/select/src/select-option/select-option.ts","../../../../packages/ng-primitives/select/src/select-portal/select-portal-state.ts","../../../../packages/ng-primitives/select/src/select-portal/select-portal.ts","../../../../packages/ng-primitives/select/src/config/select-config.ts","../../../../packages/ng-primitives/select/src/select/select.ts","../../../../packages/ng-primitives/select/src/ng-primitives-select.ts"],"sourcesContent":["import { signal, Signal } from '@angular/core';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { controlled, createPrimitive, deprecatedSetter } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\n\nexport interface NgpNativeSelectState {\n  /**\n   * Whether the select is disabled.\n   */\n  readonly disabled: Signal<boolean>;\n\n  /**\n   * Set the disabled state of the select.\n   * @param value The disabled state.\n   */\n  setDisabled(value: boolean): void;\n}\n\nexport interface NgpNativeSelectProps {\n  /**\n   * The id of the select. If not provided, a unique id will be generated.\n   */\n  readonly id?: Signal<string>;\n\n  /**\n   * Whether the select is disabled.\n   */\n  readonly disabled?: Signal<boolean>;\n}\n\nexport const [\n  NgpNativeSelectStateToken,\n  ngpNativeSelect,\n  injectNativeSelectState,\n  provideNativeSelectState,\n] = createPrimitive(\n  'NgpNativeSelect',\n  ({\n    disabled: _disabled = signal(false),\n    id = signal(uniqueId('ngp-native-select')),\n  }: NgpNativeSelectProps) => {\n    const disabled = controlled(_disabled);\n    // Setup interactions\n    ngpInteractions({\n      hover: true,\n      press: true,\n      focus: true,\n      focusVisible: true,\n      disabled: disabled,\n    });\n    // Binds `disabled` from this input *and* the form control status, so there must not be a\n    // second binding here - the last writer wins, and one keyed on the input alone re-enables\n    // the element whenever that input changes while the form control is still disabled.\n    ngpFormControl({ id: id, disabled: disabled });\n\n    function setDisabled(value: boolean): void {\n      disabled.set(value);\n    }\n\n    return {\n      disabled: deprecatedSetter(disabled, 'setDisabled', setDisabled),\n      setDisabled,\n    } satisfies NgpNativeSelectState;\n  },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpNativeSelect, provideNativeSelectState } from './native-select-state';\n\n/**\n * Apply the `ngpNativeSelect` directive to a select element that you want to enhance.\n */\n@Directive({\n  selector: 'select[ngpNativeSelect]',\n  exportAs: 'ngpNativeSelect',\n  providers: [provideNativeSelectState()],\n})\nexport class NgpNativeSelect {\n  /**\n   * The id of the select. If not provided, a unique id will be generated.\n   */\n  readonly id = input<string>(uniqueId('ngp-native-select'));\n\n  /**\n   * Whether the select is disabled.\n   */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpNativeSelectDisabled',\n    transform: booleanAttribute,\n  });\n\n  constructor() {\n    ngpNativeSelect({\n      id: this.id,\n      disabled: this.disabled,\n    });\n  }\n}\n","import {\n  computed,\n  effect,\n  ElementRef,\n  Signal,\n  signal,\n  untracked,\n  WritableSignal,\n} from '@angular/core';\nimport { activeDescendantManager } from 'ng-primitives/a11y';\nimport { ngpFormControl } from 'ng-primitives/form-field';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { domSort, injectElementRef } from 'ng-primitives/internal';\nimport { NgpPlacement } from 'ng-primitives/portal';\nimport type { NgpFlip, NgpOffset, NgpOverlay } from 'ng-primitives/portal';\nimport {\n  attrBinding,\n  controlled,\n  createPrimitive,\n  dataBinding,\n  deprecatedSetter,\n  emitter,\n  listener,\n  SetterOptions,\n  StateInjectionOptions,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable } from 'rxjs';\nimport type { NgpSelectDropdownState } from '../select-dropdown/select-dropdown-state';\nimport type { NgpSelectInputState } from '../select-input/select-input-state';\nimport type { NgpSelectListState } from '../select-list/select-list-state';\nimport type { NgpSelectOptionState } from '../select-option/select-option-state';\nimport { NgpSelectPortalState } from '../select-portal/select-portal-state';\n\nexport interface NgpSelectOpenOptions {\n  /**\n   * Which option to activate once the dropdown has opened and its options have registered.\n   * A selected option always wins over this preference. Defaults to `'first'`.\n   */\n  readonly activate?: 'first' | 'last';\n}\n\nexport interface NgpSelectState<T> {\n  /**\n   * @internal Access the select element.\n   */\n  readonly elementRef: ElementRef<HTMLElement>;\n\n  /** The unique id of the select. */\n  readonly id: Signal<string>;\n\n  /** The value of the select. */\n  readonly value: WritableSignal<T | undefined>;\n\n  /** Whether the select is multiple selection. */\n  readonly multiple: Signal<boolean>;\n\n  /** Whether the select is disabled. */\n  readonly disabled: WritableSignal<boolean>;\n\n  /** The comparator function used to compare options. */\n  readonly compareWith: Signal<(a: T | undefined, b: T | undefined) => boolean>;\n\n  /** The position of the dropdown. */\n  readonly placement: Signal<NgpPlacement>;\n\n  /** The container for the dropdown. */\n  readonly container: WritableSignal<HTMLElement | string | null>;\n\n  /** Whether the dropdown should flip when there is not enough space. Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options. */\n  readonly flip: Signal<NgpFlip>;\n\n  /**\n   * Define the offset of the select dropdown relative to the trigger.\n   * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n   */\n  readonly offset: Signal<NgpOffset>;\n\n  /**\n   * A function that will scroll the active option into view. This can be overridden\n   * for cases such as virtual scrolling where we cannot scroll the option directly because\n   * it may not be rendered.\n   */\n  readonly scrollToOption: Signal<((index: number) => void) | undefined>;\n\n  /**\n   * Provide all the option values to the select. This is useful for virtual scrolling scenarios\n   * where not all options are rendered in the DOM. This is not an alternative to adding the options\n   * in the DOM, it is only to provide the select with the full list of options. This list should match\n   * the order of the options as they would appear in the DOM.\n   */\n  readonly allOptions: Signal<T[] | undefined>;\n\n  /**\n   * Store the select portal.\n   * @internal\n   */\n  readonly portal: WritableSignal<NgpSelectPortalState | undefined>;\n\n  /**\n   * Store the select dropdown.\n   * @internal\n   */\n  readonly dropdown: WritableSignal<NgpSelectDropdownState | undefined>;\n\n  /**\n   * Store the select list, when a dedicated listbox wraps the options\n   * (e.g. when the popup also contains a filter input).\n   * @internal\n   */\n  readonly list: Signal<NgpSelectListState | undefined>;\n\n  /**\n   * Store the select options.\n   * @internal\n   */\n  readonly options: WritableSignal<NgpSelectOptionState[]>;\n\n  /**\n   * Access the overlay\n   * @internal\n   */\n  readonly overlay: Signal<NgpOverlay<void> | null | undefined>;\n\n  /**\n   * The open state of the select.\n   * @internal\n   */\n  readonly open: Signal<boolean>;\n\n  /**\n   * The options sorted by their index or DOM position.\n   * @internal\n   */\n  readonly sortedOptions: Signal<NgpSelectOptionState[]>;\n\n  /**\n   * The active key descendant manager.\n   * @internal\n   */\n  readonly activeDescendantManager: ReturnType<typeof activeDescendantManager>;\n\n  /**\n   * Open the dropdown.\n   * @internal\n   */\n  openDropdown(options?: NgpSelectOpenOptions): Promise<void>;\n\n  /**\n   * Close the dropdown.\n   * @internal\n   */\n  closeDropdown(): void;\n\n  /**\n   * Handle the overlay being closed (e.g. via outside click or Escape).\n   * Emits the openChange event and resets the active descendant.\n   * @internal\n   */\n  onOverlayClose(): void;\n\n  /**\n   * Toggle the dropdown.\n   * @internal\n   */\n  toggleDropdown(): Promise<void>;\n\n  /**\n   * Select an option.\n   * @param index The index of the option to select.\n   * @internal\n   */\n  selectOption(id: string): void;\n\n  /**\n   * Deselect an option.\n   * @param option The option to deselect.\n   * @internal\n   */\n  deselectOption(option: NgpSelectOptionState): void;\n\n  /**\n   * Toggle the selection of an option.\n   * @param id The id of the option to toggle.\n   * @internal\n   */\n  toggleOption(id: string): void;\n\n  /**\n   * Determine if an option is selected.\n   * @param option The option to check.\n   * @internal\n   */\n  isOptionSelected(option: T): boolean;\n\n  /**\n   * Activate the next option in the list if there is one.\n   * If there is no option currently active, activate the selected option or the first option.\n   * @internal\n   */\n  activateNextOption(): void;\n\n  /**\n   * Activate the previous option in the list if there is one.\n   * @internal\n   */\n  activatePreviousOption(): void;\n\n  /**\n   * Register the dropdown portal with the select.\n   * @param portal The dropdown portal.\n   * @internal\n   */\n  registerPortal(portal: NgpSelectPortalState): void;\n\n  /**\n   * Register the dropdown with the select.\n   * @param dropdown The dropdown to register.\n   * @internal\n   */\n  registerDropdown(dropdown: NgpSelectDropdownState): void;\n\n  /**\n   * Register the input with the select.\n   * @param input The input to register.\n   * @internal\n   */\n  registerInput(input: NgpSelectInputState): void;\n\n  /**\n   * Unregister the input from the select.\n   * @param input The input to unregister.\n   * @internal\n   */\n  unregisterInput(input: NgpSelectInputState): void;\n\n  /**\n   * Register the list with the select.\n   * @param list The list to register.\n   * @internal\n   */\n  registerList(list: NgpSelectListState): void;\n\n  /**\n   * Unregister the list from the select.\n   * @param list The list to unregister.\n   * @internal\n   */\n  unregisterList(list: NgpSelectListState): void;\n\n  /**\n   * Register an option with the select.\n   * @param option The option to register.\n   * @internal\n   */\n  registerOption(option: NgpSelectOptionState): void;\n\n  /**\n   * Unregister an option from the select.\n   * @param option The option to unregister.\n   * @internal\n   */\n  unregisterOption(option: NgpSelectOptionState): void;\n\n  /**\n   * Focus the select.\n   * @internal\n   */\n  focus(): void;\n\n  /**\n   * Programmatically set the value of the select. Fires `onValueChange` and\n   * emits on `valueChange` by default. Pass `{ emit: false }` for cases like\n   * form `writeValue` where the internal state should sync without notifying.\n   */\n  setValue(value: T | undefined, options?: SetterOptions): void;\n\n  /**\n   * Programmatically set the disabled state of the select. Used by the form\n   * `setDisabledState` integration.\n   */\n  setDisabled(disabled: boolean): void;\n\n  /**\n   * Set the container in which the dropdown should be attached. Takes effect the\n   * next time the dropdown is opened; it does not move a dropdown that is already\n   * open.\n   * @param container - The new container\n   */\n  setContainer(container: HTMLElement | string | null): void;\n\n  /**\n   * Observable that emits whenever the value changes.\n   */\n  readonly valueChange: Observable<T | undefined>;\n}\n\nexport interface NgpSelectProps<T> {\n  /** The unique id of the select. */\n  readonly id?: Signal<string>;\n\n  /** The value of the select. */\n  readonly value?: Signal<T | undefined>;\n\n  /** Event emitted when the value changes. */\n  readonly onValueChange?: (value: T) => void;\n\n  /** Whether the select is multiple selection. */\n  readonly multiple?: Signal<boolean>;\n\n  /** Whether the select is disabled. */\n  readonly disabled?: Signal<boolean>;\n\n  /** Emit when the dropdown open state changes. */\n  readonly onOpenChange?: (open: boolean) => void;\n\n  /** The comparator function used to compare options. */\n  readonly compareWith?: Signal<(a: T | undefined, b: T | undefined) => boolean>;\n\n  /** The position of the dropdown. */\n  readonly placement?: Signal<NgpPlacement>;\n\n  /** The container for the dropdown. */\n  readonly container?: Signal<HTMLElement | string | null>;\n\n  /** Whether the dropdown should flip when there is not enough space. Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options. */\n  readonly flip?: Signal<NgpFlip>;\n\n  /**\n   * Define the offset of the select dropdown relative to the trigger.\n   * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n   */\n  readonly offset?: Signal<NgpOffset>;\n\n  /**\n   * A function that will scroll the active option into view. This can be overridden\n   * for cases such as virtual scrolling where we cannot scroll the option directly because\n   * it may not be rendered.\n   */\n  readonly scrollToOption?: Signal<((index: number) => void) | undefined>;\n\n  /**\n   * Provide all the option values to the select. This is useful for virtual scrolling scenarios\n   * where not all options are rendered in the DOM. This is not an alternative to adding the options\n   * in the DOM, it is only to provide the select with the full list of options. This list should match\n   * the order of the options as they would appear in the DOM.\n   */\n  readonly allOptions?: Signal<T[] | undefined>;\n}\n\nexport const [NgpSelectStateToken, ngpSelect, _injectSelectState, provideSelectState] =\n  createPrimitive(\n    'NgpSelect',\n    <T>({\n      id = signal(uniqueId('ngp-select')),\n      value: _value = signal<T | undefined>(undefined),\n      multiple = signal(false),\n      disabled: _disabled = signal(false),\n      compareWith = signal<(a: T | undefined, b: T | undefined) => boolean>(Object.is),\n      placement = signal<NgpPlacement>('bottom'),\n      container: _container,\n      flip = signal<NgpFlip>(true),\n      offset = signal<NgpOffset>(0),\n      scrollToOption = signal<((index: number) => void) | undefined>(undefined),\n      allOptions = signal<T[] | undefined>(undefined),\n      onValueChange,\n      onOpenChange,\n    }: NgpSelectProps<T>): NgpSelectState<T> => {\n      const elementRef = injectElementRef<HTMLElement>();\n      const value = controlled(_value);\n      const disabled = controlled(_disabled, false);\n      const container = controlled(_container, 'body');\n      const valueChangeEmitter = emitter<T | undefined>();\n\n      function setValue(newValue: T | undefined, options?: SetterOptions): void {\n        value.set(newValue);\n        if (options?.emit !== false) {\n          onValueChange?.(newValue as T);\n          valueChangeEmitter.emit(newValue);\n        }\n      }\n\n      function setDisabled(isDisabled: boolean): void {\n        disabled.set(isDisabled);\n      }\n\n      function setContainer(newContainer: HTMLElement | string | null): void {\n        container.set(newContainer);\n      }\n\n      ngpInteractions({\n        focus: true,\n        focusWithin: true,\n        hover: true,\n        press: true,\n        disabled,\n      });\n\n      ngpFormControl({ id, disabled });\n\n      const portal = signal<NgpSelectPortalState | undefined>(undefined);\n      const dropdown = signal<NgpSelectDropdownState | undefined>(undefined);\n      const input = signal<NgpSelectInputState | undefined>(undefined);\n      const list = signal<NgpSelectListState | undefined>(undefined);\n      const options = signal<NgpSelectOptionState[]>([]);\n\n      const overlay = computed(() => portal()?.overlay());\n      const open = computed(() => overlay()?.isOpen() ?? false);\n\n      const sortedOptions = computed(() =>\n        domSort(\n          options(),\n          option => option.elementRef.nativeElement,\n          option => option.index?.(),\n        ),\n      );\n\n      const activeDescendantManagerInstance = activeDescendantManager({\n        // we must wrap the signal in a computed to ensure it is not used before it is defined\n        disabled: computed(() => disabled()),\n        wrap: signal(true),\n        count: computed(() => allOptions()?.length ?? options().length),\n        getItemId: index => getOptionAtIndex(index)?.id(),\n        isItemDisabled: index => getOptionAtIndex(index)?.disabled() ?? false,\n        scrollIntoView: index => {\n          const isPositioned = portal()?.overlay()?.isPositioned() ?? false;\n\n          if (!isPositioned || index === -1) {\n            return;\n          }\n\n          scrollTo(index);\n        },\n      });\n\n      // When the visible (or virtual) options change while open, revalidate so the\n      // active index can't point at a removed option and leave a stale aria-activedescendant.\n      effect(() => {\n        sortedOptions();\n        allOptions();\n\n        if (open()) {\n          untracked(() => activeDescendantManagerInstance.validate());\n        }\n      });\n\n      // Host bindings\n      attrBinding(elementRef, 'role', () => (input() ? null : 'combobox'));\n      attrBinding(elementRef, 'id', id);\n      attrBinding(elementRef, 'aria-expanded', () => (input() ? undefined : open()));\n      attrBinding(elementRef, 'aria-controls', () =>\n        input() ? undefined : open() ? (list()?.id() ?? dropdown()?.id()) : undefined,\n      );\n      attrBinding(elementRef, 'aria-activedescendant', () =>\n        input() ? undefined : open() ? activeDescendantManagerInstance.id() : undefined,\n      );\n      attrBinding(elementRef, 'tabindex', () => {\n        if (input() || disabled()) return -1;\n        return 0;\n      });\n      dataBinding(elementRef, 'data-open', () => (open() ? '' : null));\n      dataBinding(elementRef, 'data-disabled', () => (disabled() ? '' : null));\n      dataBinding(elementRef, 'data-multiple', () => (multiple() ? '' : null));\n\n      // Event listeners\n      listener(elementRef, 'click', onClick);\n      listener(elementRef, 'keydown', handleKeydown);\n      listener(elementRef, 'blur', onBlur);\n\n      function onClick(event: MouseEvent): void {\n        // if the click originated from the input, let the input keep focus. the event only\n        // reaches us when the dropdown is rendered into a container inside the select element.\n        if (event.target === input()?.elementRef.nativeElement) {\n          return;\n        }\n\n        void toggleDropdown();\n      }\n\n      /**\n       * Open the dropdown.\n       * @internal\n       */\n      async function openDropdown(options?: NgpSelectOpenOptions): Promise<void> {\n        if (disabled() || open()) {\n          return;\n        }\n\n        onOpenChange?.(true);\n        await portal()?.show();\n\n        input()?.focus();\n\n        let selectedOptionIdx = -1;\n\n        // if we have been provided with allOptions, we need to find the selected option(s) from that list\n        if (allOptions()) {\n          selectedOptionIdx = allOptions()!.findIndex(option => isOptionSelected(option));\n        }\n\n        // if we don't have allOptions, find the selected option(s) from the registered options\n        if (selectedOptionIdx === -1) {\n          // if there is a selected option(s), set the active descendant to the first selected option\n          selectedOptionIdx = sortedOptions().findIndex(option => isOptionSelected(option.value()));\n        }\n\n        // if after checking there is a selected option, set the active descendant to the first option\n        if (selectedOptionIdx !== -1) {\n          // scroll to and activate the selected option\n          scrollTo(selectedOptionIdx);\n          activeDescendantManagerInstance.activateByIndex(selectedOptionIdx);\n          return;\n        }\n\n        // handled here, not by the caller, because options only register after the portal resolves\n        if (options?.activate === 'last') {\n          // reset so the index stays -1, not 0, when there is nothing to activate\n          activeDescendantManagerInstance.reset();\n          activeDescendantManagerInstance.last();\n\n          const activeIndex = activeDescendantManagerInstance.index();\n\n          // the manager's own scroll is skipped until the overlay is positioned\n          if (activeIndex !== -1) {\n            scrollTo(activeIndex);\n          }\n\n          return;\n        }\n\n        activeDescendantManagerInstance.first();\n      }\n\n      /**\n       * Close the dropdown.\n       * @internal\n       */\n      function closeDropdown(): void {\n        if (!open()) {\n          return;\n        }\n\n        // the search input is about to be removed, so don't let focus fall back to the body\n        if (document.activeElement === input()?.elementRef.nativeElement) {\n          focus();\n        }\n\n        portal()?.hide();\n      }\n\n      /**\n       * Handle the overlay being closed (whether via imperative closeDropdown(),\n       * outside click, or Escape). Emits openChange(false) and resets the active\n       * descendant. Wired in from select-portal-state.ts via the overlay onClose\n       * config — this is the single source of truth for the close-side emit so\n       * external close paths (outside click, Escape) also fire openChange.\n       * @internal\n       */\n      function onOverlayClose(): void {\n        onOpenChange?.(false);\n        activeDescendantManagerInstance.reset();\n      }\n\n      /**\n       * Toggle the dropdown.\n       * @internal\n       */\n      async function toggleDropdown(): Promise<void> {\n        if (open()) {\n          closeDropdown();\n        } else {\n          await openDropdown();\n        }\n      }\n\n      /**\n       * Select an option.\n       * @param index The index of the option to select.\n       * @internal\n       */\n      function selectOption(id: string): void {\n        if (disabled()) {\n          return;\n        }\n\n        const option = sortedOptions().find(opt => opt.id() === id);\n\n        if (!option) {\n          setValue(undefined, { emit: false });\n          closeDropdown();\n          return;\n        }\n\n        const optionValue = option.value();\n\n        // If the option has no associated value, treat it as non-selectable.\n        if (optionValue === undefined) {\n          return;\n        }\n\n        if (multiple()) {\n          // if the option is already selected, do nothing\n          if (isOptionSelected(optionValue)) {\n            return;\n          }\n\n          const newValue = [...((value() ?? []) as T[]), optionValue as T];\n\n          // add the option to the value\n          setValue(newValue as T | undefined);\n        } else {\n          setValue(optionValue as T | undefined);\n\n          // close the dropdown on single selection\n          closeDropdown();\n        }\n      }\n\n      /**\n       * Deselect an option.\n       * @param option The option to deselect.\n       * @internal\n       */\n      function deselectOption(option: NgpSelectOptionState): void {\n        const optionValue = option.value();\n\n        // Options without values cannot be deselected (and should never be selected).\n        if (optionValue === undefined) {\n          return;\n        }\n\n        // if the select is disabled or the option is not selected, do nothing\n        // if the select is single selection, we don't allow deselecting\n        if (disabled() || !isOptionSelected(optionValue) || !multiple()) {\n          return;\n        }\n\n        const values = (value() as T[]) ?? [];\n\n        const newValue = values.filter(v => !compareWith()(v, optionValue as T));\n\n        // remove the option from the value\n        setValue(newValue as T | undefined);\n      }\n\n      /**\n       * Toggle the selection of an option.\n       * @param id The id of the option to toggle.\n       * @internal\n       */\n      function toggleOption(id: string): void {\n        if (disabled()) {\n          return;\n        }\n\n        const option = sortedOptions().find(opt => opt.id() === id);\n\n        if (!option) {\n          return;\n        }\n\n        const optionValue = option.value();\n\n        // Options without values cannot be toggled.\n        if (optionValue === undefined) {\n          return;\n        }\n\n        // if the state is single selection, we don't allow toggling\n        if (!multiple()) {\n          // always select the option in single selection mode even if it is already selected so that we update the input\n          selectOption(id);\n          return;\n        }\n\n        // otherwise toggle the option\n        if (isOptionSelected(optionValue)) {\n          deselectOption(option);\n        } else {\n          selectOption(id);\n        }\n      }\n\n      /**\n       * Determine if an option is selected.\n       * @param option The option to check.\n       * @internal\n       */\n      function isOptionSelected(option: T): boolean {\n        if (disabled()) {\n          return false;\n        }\n\n        const currentValue = value();\n\n        // Only treat `undefined` as \"no selection\" (allow '', 0, false).\n        if (currentValue === undefined) {\n          return false;\n        }\n\n        if (multiple()) {\n          return Array.isArray(currentValue) && currentValue.some(v => compareWith()(option, v));\n        }\n\n        return compareWith()(option, currentValue as T);\n      }\n\n      /**\n       * Activate the next option in the list if there is one.\n       * If there is no option currently active, activate the selected option or the first option.\n       * @internal\n       */\n      function activateNextOption(): void {\n        if (disabled()) {\n          return;\n        }\n\n        const currentOptions = sortedOptions();\n\n        // if there are no options, do nothing\n        if (currentOptions.length === 0) {\n          return;\n        }\n\n        // if there is no active option, activate the first option\n        if (activeDescendantManagerInstance.index() === -1) {\n          const selectedOption = currentOptions.findIndex(option =>\n            isOptionSelected(option.value()),\n          );\n\n          // if there is a selected option(s), set the active descendant to the first selected option\n          const targetOption = selectedOption !== -1 ? selectedOption : 0;\n\n          activeDescendantManagerInstance.activateByIndex(targetOption, { origin: 'keyboard' });\n          return;\n        }\n\n        // otherwise activate the next option\n        activeDescendantManagerInstance.next({ origin: 'keyboard' });\n      }\n\n      /**\n       * Activate the previous option in the list if there is one.\n       * @internal\n       */\n      function activatePreviousOption(): void {\n        if (disabled()) {\n          return;\n        }\n        const currentOptions = sortedOptions();\n        // if there are no options, do nothing\n        if (currentOptions.length === 0) {\n          return;\n        }\n        // if there is no active option, activate the last option\n        if (activeDescendantManagerInstance.index() === -1) {\n          const selectedOption = currentOptions.findIndex(option =>\n            isOptionSelected(option.value()),\n          );\n          // if there is a selected option(s), set the active descendant to the first selected option\n          const targetOption = selectedOption !== -1 ? selectedOption : currentOptions.length - 1;\n          activeDescendantManagerInstance.activateByIndex(targetOption, { origin: 'keyboard' });\n          return;\n        }\n        // otherwise activate the previous option\n        activeDescendantManagerInstance.previous({ origin: 'keyboard' });\n      }\n\n      /**\n       * Register the dropdown portal with the select.\n       * @param portal The dropdown portal.\n       * @internal\n       */\n      function registerPortal(portalInstance: NgpSelectPortalState): void {\n        portal.set(portalInstance);\n      }\n\n      /**\n       * Register the dropdown with the select.\n       * @param dropdown The dropdown to register.\n       * @internal\n       */\n      function registerDropdown(dropdownInstance: NgpSelectDropdownState): void {\n        dropdown.set(dropdownInstance);\n      }\n\n      /**\n       * Register the input with the select.\n       * @param inputInstance The input to register.\n       * @internal\n       */\n      function registerInput(inputInstance: NgpSelectInputState): void {\n        input.set(inputInstance);\n      }\n\n      /**\n       * Unregister the input from the select.\n       * @param inputInstance The input to unregister.\n       * @internal\n       */\n      function unregisterInput(inputInstance: NgpSelectInputState): void {\n        if (input() === inputInstance) {\n          input.set(undefined);\n        }\n      }\n\n      /**\n       * Register the list with the select.\n       * @param listInstance The list to register.\n       * @internal\n       */\n      function registerList(listInstance: NgpSelectListState): void {\n        list.set(listInstance);\n      }\n\n      /**\n       * Unregister the list from the select.\n       * @param listInstance The list to unregister.\n       * @internal\n       */\n      function unregisterList(listInstance: NgpSelectListState): void {\n        if (list() === listInstance) {\n          list.set(undefined);\n        }\n      }\n\n      /**\n       * Register an option with the select.\n       * @param option The option to register.\n       * @internal\n       */\n      function registerOption(option: NgpSelectOptionState): void {\n        options.update(current => [...current, option]);\n      }\n\n      /**\n       * Unregister an option from the select.\n       * @param option The option to unregister.\n       * @internal\n       */\n      function unregisterOption(option: NgpSelectOptionState): void {\n        options.update(current => current.filter(o => o !== option));\n      }\n\n      /**\n       * Focus the select.\n       * @internal\n       */\n      function focus(): void {\n        elementRef.nativeElement.focus();\n      }\n\n      /** Handle keydown events for accessibility. */\n      function handleKeydown(event: KeyboardEvent): void {\n        // if the event originated from the input element, let the input handle it. the event only\n        // bubbles here when the dropdown is rendered into a container inside the select element.\n        if (event.target === input()?.elementRef.nativeElement) {\n          return;\n        }\n\n        switch (event.key) {\n          case 'ArrowDown':\n            if (open()) {\n              activateNextOption();\n            } else {\n              void openDropdown();\n            }\n            event.preventDefault();\n            break;\n          case 'ArrowUp':\n            if (open()) {\n              activatePreviousOption();\n            } else {\n              void openDropdown({ activate: 'last' });\n            }\n            event.preventDefault();\n            break;\n          case 'Home':\n            if (open()) {\n              activeDescendantManagerInstance.first({ origin: 'keyboard' });\n            }\n            event.preventDefault();\n            break;\n          case 'End':\n            if (open()) {\n              activeDescendantManagerInstance.last({ origin: 'keyboard' });\n            }\n            event.preventDefault();\n            break;\n          case 'Enter':\n            if (open()) {\n              const activeId = activeDescendantManagerInstance.id();\n\n              if (activeId) {\n                const option = sortedOptions().find(opt => opt.id() === activeId);\n                option?.select();\n              }\n            } else {\n              void openDropdown();\n            }\n            event.preventDefault();\n            break;\n          case ' ':\n            void toggleDropdown();\n            event.preventDefault();\n            break;\n        }\n      }\n\n      function onBlur(event: FocusEvent): void {\n        const relatedTarget = event.relatedTarget as HTMLElement;\n\n        // if the blur was caused by focus moving to the dropdown, don't close\n        if (relatedTarget && dropdown()?.elementRef.nativeElement.contains(relatedTarget)) {\n          return;\n        }\n\n        // if the blur was caused by focus moving to the input, don't close. opening the\n        // dropdown moves focus from the trigger to the input, which blurs the trigger.\n        if (relatedTarget === input()?.elementRef.nativeElement) {\n          return;\n        }\n\n        closeDropdown();\n        event.preventDefault();\n      }\n\n      function scrollTo(index: number): void {\n        const customScrollToOption = scrollToOption();\n\n        if (customScrollToOption) {\n          customScrollToOption(index);\n          return;\n        }\n        const option = getOptionAtIndex(index);\n        if (option) {\n          option.scrollIntoView();\n        }\n      }\n\n      function getOptionAtIndex(index: number): NgpSelectOptionState | undefined {\n        // if the option has an index, use that to get the option because this is required for virtual scrolling scenarios\n        const optionIndex = options().findIndex(opt => opt.index?.() === index);\n\n        if (optionIndex !== -1) {\n          return options()[optionIndex];\n        }\n\n        return sortedOptions()[index];\n      }\n\n      return {\n        elementRef,\n        id,\n        value: deprecatedSetter(value, 'setValue', v => setValue(v)),\n        multiple,\n        disabled: deprecatedSetter(disabled, 'setDisabled', setDisabled),\n        compareWith,\n        placement,\n        container: deprecatedSetter(container, 'setContainer', setContainer),\n        flip,\n        offset,\n        scrollToOption,\n        allOptions,\n        portal,\n        dropdown,\n        list: list.asReadonly(),\n        options,\n        overlay,\n        open,\n        sortedOptions,\n        activeDescendantManager: activeDescendantManagerInstance,\n        openDropdown,\n        closeDropdown,\n        onOverlayClose,\n        toggleDropdown,\n        selectOption,\n        deselectOption,\n        toggleOption,\n        isOptionSelected,\n        activateNextOption,\n        activatePreviousOption,\n        setValue,\n        setDisabled,\n        setContainer,\n        valueChange: valueChangeEmitter.asObservable(),\n        registerPortal,\n        registerDropdown,\n        registerInput,\n        unregisterInput,\n        registerList,\n        unregisterList,\n        registerOption,\n        unregisterOption,\n        focus,\n      } satisfies NgpSelectState<T>;\n    },\n  );\n\nexport function injectSelectState<T>(options?: StateInjectionOptions): Signal<NgpSelectState<T>> {\n  return _injectSelectState(options) as Signal<NgpSelectState<T>>;\n}\n","import { ElementRef, Signal, signal } from '@angular/core';\nimport { injectElementRef, observeResize } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  createPrimitive,\n  StateInjectionOptions,\n  styleBinding,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectState } from '../select/select-state';\n\nexport interface NgpSelectDropdownState {\n  /**\n   * @internal Access the element reference.\n   */\n  readonly elementRef: ElementRef<HTMLElement>;\n\n  /** The id of the dropdown. */\n  readonly id: Signal<string>;\n}\n\nexport interface NgpSelectDropdownProps {\n  /** The id of the dropdown. */\n  readonly id?: Signal<string>;\n}\n\nexport const [\n  NgpSelectDropdownStateToken,\n  ngpSelectDropdown,\n  _injectSelectDropdownState,\n  provideSelectDropdownState,\n] = createPrimitive(\n  'NgpSelectDropdown',\n  ({ id: _id = signal(uniqueId('ngp-select-dropdown')) }: NgpSelectDropdownProps) => {\n    const elementRef = injectElementRef<HTMLElement>();\n    const selectState = injectSelectState();\n\n    const selectDimensions = observeResize(() => selectState().elementRef.nativeElement);\n    // The select's own overlay, not one injected: a dropdown rendered in place would find an\n    // enclosing overlay and replace that overlay's properties.\n    selectState().overlay()?.registerAvailableSizePrefix('--ngp-select');\n    // Host bindings\n    // When a dedicated ngpSelectList owns the options, the dropdown becomes a dialog\n    // wrapping the input + listbox; otherwise the dropdown is itself the listbox.\n    attrBinding(elementRef, 'role', () => (selectState().list() ? 'dialog' : 'listbox'));\n    attrBinding(elementRef, 'id', _id);\n    // aria-multiselectable is not allowed on a dialog, so ngpSelectList carries it instead\n    attrBinding(elementRef, 'aria-multiselectable', () =>\n      selectState().list() ? null : selectState().multiple(),\n    );\n    styleBinding(elementRef, 'left.px', () => selectState().overlay()?.position()?.x ?? null);\n    styleBinding(elementRef, 'top.px', () => selectState().overlay()?.position()?.y ?? null);\n    styleBinding(\n      elementRef,\n      '--ngp-select-transform-origin',\n      () => selectState().overlay()?.transformOrigin() ?? null,\n    );\n    styleBinding(\n      elementRef,\n      '--ngp-select-available-width.px',\n      () => selectState().overlay()?.availableWidth() ?? null,\n    );\n    styleBinding(\n      elementRef,\n      '--ngp-select-available-height.px',\n      () => selectState().overlay()?.availableHeight() ?? null,\n    );\n    styleBinding(elementRef, '--ngp-select-width.px', () => selectDimensions().width ?? null);\n\n    const state = {\n      elementRef,\n      id: _id,\n    } satisfies NgpSelectDropdownState;\n\n    selectState().registerDropdown(state);\n\n    return state;\n  },\n);\n\nexport function injectSelectDropdownState(\n  options?: StateInjectionOptions,\n): Signal<NgpSelectDropdownState> {\n  return _injectSelectDropdownState(options) as Signal<NgpSelectDropdownState>;\n}\n","import { Directive, input } from '@angular/core';\nimport { provideControlContainerIsolation } from 'ng-primitives/portal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpSelectDropdown } from './select-dropdown-state';\n\n@Directive({\n  selector: '[ngpSelectDropdown]',\n  exportAs: 'ngpSelectDropdown',\n  providers: [provideControlContainerIsolation()],\n})\nexport class NgpSelectDropdown {\n  /** The id of the dropdown. */\n  readonly id = input<string>(uniqueId('ngp-select-dropdown'));\n\n  constructor() {\n    ngpSelectDropdown({\n      id: this.id,\n    });\n  }\n}\n","import { afterNextRender, ElementRef, inject, Injector, Signal, signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  createPrimitive,\n  dataBinding,\n  listener,\n  onDestroy,\n  StateInjectionOptions,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectState } from '../select/select-state';\n\nexport interface NgpSelectInputState {\n  /**\n   * @internal Access the element reference.\n   */\n  readonly elementRef: ElementRef<HTMLInputElement>;\n\n  /** The id of the input. */\n  readonly id: Signal<string>;\n\n  /**\n   * Focus the input field.\n   * @internal\n   */\n  focus(): void;\n}\n\nexport interface NgpSelectInputProps {\n  /** The id of the input. */\n  readonly id?: Signal<string>;\n}\n\nexport const [\n  NgpSelectInputStateToken,\n  ngpSelectInput,\n  _injectSelectInputState,\n  provideSelectInputState,\n] = createPrimitive(\n  'NgpSelectInput',\n  ({ id = signal(uniqueId('ngp-select-input')) }: NgpSelectInputProps) => {\n    const elementRef = injectElementRef<HTMLInputElement>();\n    const selectState = injectSelectState();\n    const injector = inject(Injector);\n\n    ngpInteractions({\n      focus: true,\n      hover: true,\n      press: true,\n      disabled: selectState().disabled,\n    });\n\n    // Static host bindings\n    attrBinding(elementRef, 'role', 'combobox');\n    attrBinding(elementRef, 'type', 'text');\n    attrBinding(elementRef, 'autocomplete', 'off');\n    attrBinding(elementRef, 'autocorrect', 'off');\n    attrBinding(elementRef, 'spellcheck', 'false');\n    attrBinding(elementRef, 'aria-autocomplete', 'list');\n    attrBinding(elementRef, 'id', id);\n\n    // Dynamic host bindings\n    attrBinding(elementRef, 'aria-expanded', () => selectState().open());\n    attrBinding(elementRef, 'aria-controls', () => {\n      if (!selectState().open()) {\n        return undefined;\n      }\n      return selectState().list()?.id() ?? selectState().dropdown()?.id();\n    });\n    attrBinding(elementRef, 'aria-activedescendant', () =>\n      selectState().open() ? selectState().activeDescendantManager.id() : undefined,\n    );\n    attrBinding(elementRef, 'disabled', () => (selectState().disabled() ? '' : null));\n    dataBinding(elementRef, 'data-open', () => (selectState().open() ? '' : null));\n    dataBinding(elementRef, 'data-disabled', () => (selectState().disabled() ? '' : null));\n    dataBinding(elementRef, 'data-multiple', () => (selectState().multiple() ? '' : null));\n\n    // Event listeners\n    listener(elementRef, 'keydown', handleKeydown);\n    listener(elementRef, 'blur', onBlur);\n\n    // options are focusable, so a click in the list would pull focus out of the search field\n    const dropdown = selectState().dropdown();\n    if (dropdown) {\n      listener(dropdown.elementRef, 'mousedown', event => {\n        if (\n          selectState()\n            .list()\n            ?.elementRef.nativeElement.contains(event.target as Node)\n        ) {\n          event.preventDefault();\n        }\n      });\n    }\n\n    /** The input only exists while the dropdown is open, so no key here needs to open it. */\n    function handleKeydown(event: KeyboardEvent): void {\n      switch (event.key) {\n        case 'ArrowDown':\n          selectState().activateNextOption();\n          event.preventDefault();\n          break;\n        case 'ArrowUp':\n          selectState().activatePreviousOption();\n          event.preventDefault();\n          break;\n        case 'Home':\n          // let the caret move within the search term\n          break;\n        case 'End':\n          // let the caret move within the search term\n          break;\n        case 'Enter': {\n          const activeId = selectState().activeDescendantManager.id();\n          const option = activeId\n            ? selectState()\n                .sortedOptions()\n                .find(opt => opt.id() === activeId)\n            : undefined;\n\n          // a single selection closes the dropdown, which hands focus back to the trigger\n          option?.select();\n          event.preventDefault();\n          break;\n        }\n        case 'Tab':\n          // the dropdown is portaled to the end of the body, so close it (focusing the trigger)\n          // and let the browser tab on from the select's place in the page\n          if (!selectState().elementRef.nativeElement.contains(elementRef.nativeElement)) {\n            selectState().closeDropdown();\n          }\n          break;\n        case 'Escape':\n          selectState().closeDropdown();\n          event.preventDefault();\n          break;\n      }\n    }\n\n    function onBlur(event: FocusEvent): void {\n      const relatedTarget = event.relatedTarget as HTMLElement;\n\n      // if the blur was caused by focus moving into the dropdown, don't close\n      if (\n        relatedTarget &&\n        selectState().dropdown()?.elementRef.nativeElement.contains(relatedTarget)\n      ) {\n        return;\n      }\n\n      // if the blur was caused by focus moving to the select trigger, don't close\n      if (relatedTarget && selectState().elementRef.nativeElement.contains(relatedTarget)) {\n        return;\n      }\n\n      selectState().closeDropdown();\n    }\n\n    /**\n     * Focus the input field.\n     * @internal\n     */\n    function focus(): void {\n      elementRef.nativeElement.focus({ preventScroll: true });\n    }\n\n    const state = {\n      elementRef,\n      id,\n      focus,\n    } satisfies NgpSelectInputState;\n\n    selectState().registerInput(state);\n\n    afterNextRender(\n      () => {\n        if (ngDevMode) {\n          const insideDropdown = selectState()\n            .dropdown()\n            ?.elementRef.nativeElement.contains(elementRef.nativeElement);\n\n          if (!insideDropdown) {\n            console.error(\n              '[ngpSelectInput]: The input must be placed inside the element with the ngpSelectDropdown directive. For an editable trigger, use ngpCombobox instead.',\n            );\n          }\n\n          if (!selectState().list()) {\n            console.error(\n              '[ngpSelectInput]: When using ngpSelectInput, the options must be wrapped in an element with the ngpSelectList directive (role=\"listbox\"). Without it the input (role=\"combobox\") is nested inside the listbox, which is invalid.',\n            );\n          }\n        }\n\n        // the input is only rendered once the dropdown has opened, so move focus to it.\n        if (selectState().open()) {\n          focus();\n        }\n      },\n      { injector },\n    );\n\n    onDestroy(() => selectState().unregisterInput(state));\n\n    return state;\n  },\n);\n\nexport function injectSelectInputState(\n  options?: StateInjectionOptions,\n): Signal<NgpSelectInputState> {\n  return _injectSelectInputState(options) as Signal<NgpSelectInputState>;\n}\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpSelectInput } from './select-input-state';\n\n@Directive({\n  selector: 'input[ngpSelectInput]',\n  exportAs: 'ngpSelectInput',\n})\nexport class NgpSelectInput {\n  /** The id of the input. */\n  readonly id = input<string>(uniqueId('ngp-select-input'));\n\n  /** Access the select input state. */\n  protected readonly state = ngpSelectInput({\n    id: this.id,\n  });\n\n  /**\n   * Focus the input field.\n   * @internal\n   */\n  focus(): void {\n    this.state.focus();\n  }\n}\n","import { ElementRef, Signal, signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  createPrimitive,\n  onDestroy,\n  StateInjectionOptions,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectState } from '../select/select-state';\n\nexport interface NgpSelectListState {\n  /**\n   * @internal Access the element reference.\n   */\n  readonly elementRef: ElementRef<HTMLElement>;\n\n  /** The id of the list. */\n  readonly id: Signal<string>;\n}\n\nexport interface NgpSelectListProps {\n  /** The id of the list. */\n  readonly id?: Signal<string>;\n}\n\nexport const [\n  NgpSelectListStateToken,\n  ngpSelectList,\n  _injectSelectListState,\n  provideSelectListState,\n] = createPrimitive(\n  'NgpSelectList',\n  ({ id: _id = signal(uniqueId('ngp-select-list')) }: NgpSelectListProps) => {\n    const elementRef = injectElementRef<HTMLElement>();\n    const selectState = injectSelectState();\n\n    // Host bindings\n    attrBinding(elementRef, 'role', 'listbox');\n    attrBinding(elementRef, 'id', _id);\n    attrBinding(elementRef, 'aria-multiselectable', () => selectState().multiple());\n\n    const state = {\n      elementRef,\n      id: _id,\n    } satisfies NgpSelectListState;\n\n    selectState().registerList(state);\n\n    onDestroy(() => selectState().unregisterList(state));\n\n    return state;\n  },\n);\n\nexport function injectSelectListState(options?: StateInjectionOptions): Signal<NgpSelectListState> {\n  return _injectSelectListState(options) as Signal<NgpSelectListState>;\n}\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpSelectList } from './select-list-state';\n\n@Directive({\n  selector: '[ngpSelectList]',\n  exportAs: 'ngpSelectList',\n})\nexport class NgpSelectList {\n  /** The id of the list. */\n  readonly id = input<string>(uniqueId('ngp-select-list'));\n\n  constructor() {\n    ngpSelectList({\n      id: this.id,\n    });\n  }\n}\n","import { computed, ElementRef, Signal, signal } from '@angular/core';\nimport { ngpInteractions } from 'ng-primitives/interactions';\nimport { injectElementRef, scrollIntoViewIfNeeded } from 'ng-primitives/internal';\nimport {\n  attrBinding,\n  createPrimitive,\n  dataBinding,\n  listener,\n  onDestroy,\n  StateInjectionOptions,\n} from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectState } from '../select/select-state';\n\nexport interface NgpSelectOptionState {\n  /**\n   * @internal Access the element reference.\n   */\n  readonly elementRef: ElementRef<HTMLElement>;\n\n  /** The id of the option. */\n  readonly id: Signal<string>;\n\n  /** The value of the option. */\n  readonly value: Signal<any>;\n\n  /** The disabled state of the option. */\n  readonly disabled: Signal<boolean>;\n\n  /** The index of the option in the list. */\n  readonly index: Signal<number | undefined>;\n\n  /**\n   * Whether this option is the active descendant.\n   * @internal\n   */\n  readonly active: Signal<boolean>;\n\n  /**\n   * Whether this option is selected.\n   * @internal\n   */\n  readonly selected: Signal<boolean>;\n\n  /**\n   * Select the option.\n   * @internal\n   */\n  select(): void;\n\n  /**\n   * Scroll the option into view.\n   * @internal\n   */\n  scrollIntoView(): void;\n\n  /**\n   * Activate on pointer enter.\n   * @internal\n   */\n  activateOnPointerEnter(): void;\n\n  /**\n   * Deactivate on pointer leave.\n   * @internal\n   */\n  deactivateOnPointerLeave(): void;\n\n  /**\n   * Emit activated event.\n   * @internal\n   */\n  emitActivated(): void;\n}\n\nexport interface NgpSelectOptionProps {\n  /** The id of the option. */\n  readonly id?: Signal<string>;\n\n  /** The value of the option. */\n  readonly value?: Signal<any>;\n\n  /** The disabled state of the option. */\n  readonly disabled?: Signal<boolean>;\n\n  /** The index of the option in the list. */\n  readonly index?: Signal<number | undefined>;\n\n  /** Callback when option is activated. */\n  readonly onActivated?: () => void;\n}\n\nexport const [\n  NgpSelectOptionStateToken,\n  ngpSelectOption,\n  _injectSelectOptionState,\n  provideSelectOptionState,\n] = createPrimitive(\n  'NgpSelectOption',\n  ({\n    id = signal(uniqueId('ngp-select-option')),\n    value = signal<any>(undefined),\n    disabled = signal(false),\n    index = signal<number | undefined>(undefined),\n    onActivated,\n  }: NgpSelectOptionProps) => {\n    const elementRef = injectElementRef<HTMLElement>();\n    const selectState = injectSelectState();\n\n    ngpInteractions({\n      hover: true,\n      press: true,\n      disabled: disabled,\n    });\n    // Computed states\n    const active = computed(() => {\n      const idx = index();\n\n      if (idx !== undefined) {\n        return selectState().activeDescendantManager.index() === idx;\n      }\n\n      return selectState().activeDescendantManager.id() === id();\n    });\n\n    const selected = computed(() => {\n      const val = value();\n      const stateValue = selectState().value();\n\n      if (val === undefined) {\n        return false;\n      }\n\n      if (selectState().multiple()) {\n        return (\n          Array.isArray(stateValue) && stateValue.some(v => selectState().compareWith()(val, v))\n        );\n      }\n\n      if (stateValue === undefined) {\n        return false;\n      }\n\n      return selectState().compareWith()(val, stateValue);\n    });\n\n    // Host bindings\n    attrBinding(elementRef, 'role', 'option');\n    attrBinding(elementRef, 'tabindex', -1);\n    attrBinding(elementRef, 'id', id);\n    attrBinding(elementRef, 'aria-selected', () => (selected() ? 'true' : undefined));\n    dataBinding(elementRef, 'data-selected', () => (selected() ? '' : null));\n    dataBinding(elementRef, 'data-active', () => (active() ? '' : null));\n    dataBinding(elementRef, 'data-disabled', () => (disabled() ? '' : null));\n\n    // Event listeners\n    listener(elementRef, 'click', () => select());\n    listener(elementRef, 'pointerenter', () => activateOnPointerEnter());\n    listener(elementRef, 'pointerleave', () => deactivateOnPointerLeave());\n\n    // Methods\n    function select(): void {\n      if (disabled()) {\n        return;\n      }\n\n      onActivated?.();\n      selectState().toggleOption(id());\n    }\n\n    function scrollIntoView(): void {\n      scrollIntoViewIfNeeded(elementRef.nativeElement);\n    }\n\n    function activateOnPointerEnter(): void {\n      const idx = index();\n\n      if (idx !== undefined) {\n        selectState().activeDescendantManager.activateByIndex(idx, {\n          scroll: false,\n          origin: 'pointer',\n        });\n        return;\n      }\n\n      selectState().activeDescendantManager.activateById(id(), {\n        scroll: false,\n        origin: 'pointer',\n      });\n    }\n\n    function deactivateOnPointerLeave(): void {\n      if (selectState().activeDescendantManager.id() === id()) {\n        selectState().activeDescendantManager.reset({ origin: 'pointer' });\n      }\n    }\n\n    const state = {\n      elementRef,\n      id,\n      value,\n      disabled,\n      index,\n      active,\n      selected,\n      select,\n      scrollIntoView,\n      activateOnPointerEnter,\n      deactivateOnPointerLeave,\n      emitActivated: () => onActivated?.(),\n    } satisfies NgpSelectOptionState;\n\n    selectState().registerOption(state);\n\n    onDestroy(() => {\n      selectState().unregisterOption(state);\n    });\n\n    return state;\n  },\n);\n\nexport function injectSelectOptionState(\n  options?: StateInjectionOptions,\n): Signal<NgpSelectOptionState> {\n  return _injectSelectOptionState(options) as Signal<NgpSelectOptionState>;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectState } from '../select/select-state';\nimport { ngpSelectOption } from './select-option-state';\n\n@Directive({\n  selector: '[ngpSelectOption]',\n  exportAs: 'ngpSelectOption',\n})\nexport class NgpSelectOption {\n  /** Access the select state. */\n  protected readonly selectState = injectSelectState();\n\n  /** The id of the option. */\n  readonly id = input<string>(uniqueId('ngp-select-option'));\n\n  /** @required The value of the option. */\n  readonly value = input<any>(undefined, {\n    alias: 'ngpSelectOptionValue',\n  });\n\n  /** The disabled state of the option. */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpSelectOptionDisabled',\n    transform: booleanAttribute,\n  });\n\n  /** The index of the option in the list. */\n  readonly index = input<number | undefined>(undefined, {\n    alias: 'ngpSelectOptionIndex',\n  });\n\n  /**\n   * Event emitted when the option is activated via click or keyboard.\n   * This is useful for options without values that need custom behavior.\n   */\n  readonly activated = output<void>({\n    alias: 'ngpSelectOptionActivated',\n  });\n\n  /** Access the select option state */\n  protected readonly state = ngpSelectOption({\n    id: this.id,\n    value: this.value,\n    disabled: this.disabled,\n    index: this.index,\n    onActivated: () => this.activated.emit(),\n  });\n\n  /**\n   * Select the option.\n   * @internal\n   */\n  select(): void {\n    this.state.select();\n  }\n\n  /**\n   * Scroll the option into view.\n   * @internal\n   */\n  scrollIntoView(): void {\n    this.state.scrollIntoView();\n  }\n}\n","import { inject, Injector, Signal, signal, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { createOverlay, NgpOverlay, NgpOverlayConfig } from 'ng-primitives/portal';\nimport { createPrimitive, StateInjectionOptions } from 'ng-primitives/state';\nimport { injectSelectState } from '../select/select-state';\n\nexport interface NgpSelectPortalState {\n  /**\n   * The overlay that manages the dropdown.\n   * @internal\n   */\n  readonly overlay: Signal<NgpOverlay<void> | null>;\n\n  /**\n   * Show the portal.\n   * @internal\n   */\n  show(): Promise<void>;\n\n  /**\n   * Hide the portal.\n   * @internal\n   */\n  hide(): void;\n\n  /**\n   * Destroy the overlay. The directive class calls this from ngOnDestroy so\n   * the overlay's onClose callback fires while the parent NgpSelect's output\n   * bindings are still attached — destroyRef.onDestroy callbacks fire after\n   * Angular has already torn those bindings down, which would prevent\n   * openChange(false) from reaching the consumer on fixture.destroy().\n   * @internal\n   */\n  destroy(): void;\n}\n\nexport interface NgpSelectPortalProps {\n  // No props needed, injected from context\n}\n\nexport const [\n  NgpSelectPortalStateToken,\n  ngpSelectPortal,\n  _injectSelectPortalState,\n  provideSelectPortalState,\n] = createPrimitive('NgpSelectPortal', ({}: NgpSelectPortalProps): NgpSelectPortalState => {\n  // the portal renders its own template, which never changes\n  const templateRef = signal(inject(TemplateRef));\n  const viewContainerRef = inject(ViewContainerRef);\n  const injector = inject(Injector);\n  const selectState = injectSelectState();\n  const overlay = signal<NgpOverlay<void> | null>(null);\n\n  // Methods\n  async function show(): Promise<void> {\n    if (!overlay()) {\n      createOverlayInstance();\n    }\n\n    return overlay()?.show();\n  }\n\n  function hide(): void {\n    overlay()?.hide();\n  }\n\n  function destroy(): void {\n    overlay()?.destroy();\n  }\n\n  function createOverlayInstance(): void {\n    const overlayConfig: NgpOverlayConfig<void> = {\n      content: templateRef,\n      viewContainerRef,\n      triggerElement: selectState().elementRef.nativeElement,\n      injector,\n      placement: selectState().placement,\n      offset: selectState().offset(),\n      flip: selectState().flip(),\n      container: selectState().container,\n      closeOnOutsideClick: true,\n      closeOnEscape: true,\n      restoreFocus: false,\n      scrollBehaviour: 'reposition',\n      onClose: () => selectState().onOverlayClose(),\n    };\n\n    overlay.set(createOverlay(overlayConfig));\n  }\n\n  const state = {\n    overlay,\n    show,\n    hide,\n    destroy,\n  } satisfies NgpSelectPortalState;\n\n  selectState().registerPortal(state);\n\n  return state;\n});\n\nexport function injectSelectPortalState(\n  options?: StateInjectionOptions,\n): Signal<NgpSelectPortalState> {\n  return _injectSelectPortalState(options) as Signal<NgpSelectPortalState>;\n}\n","import { Directive, OnDestroy } from '@angular/core';\nimport { ngpSelectPortal } from './select-portal-state';\n\n@Directive({\n  selector: '[ngpSelectPortal]',\n  exportAs: 'ngpSelectPortal',\n})\nexport class NgpSelectPortal implements OnDestroy {\n  protected readonly state = ngpSelectPortal({});\n\n  /**\n   * Attach the portal.\n   * @internal\n   */\n  show(): Promise<void> {\n    return this.state.show();\n  }\n\n  /**\n   * Detach the portal.\n   * @internal\n   */\n  detach(): void {\n    this.state.hide();\n  }\n\n  ngOnDestroy(): void {\n    this.state.destroy();\n  }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpFlip, NgpOffset, NgpPlacement } from 'ng-primitives/portal';\n\nexport interface NgpSelectConfig {\n  /**\n   * The default placement for the select dropdown.\n   * @default 'bottom'\n   */\n  placement: NgpPlacement;\n\n  /**\n   * The container element or selector for the select dropdown.\n   * This can be used to control where the dropdown is rendered in the DOM.\n   * @default 'body'\n   */\n  container: HTMLElement | string | null;\n\n  /**\n   * Whether the select dropdown should flip when there is not enough space.\n   * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n   * @default true\n   */\n  flip: NgpFlip;\n\n  /**\n   * Define the offset of the select dropdown relative to the trigger.\n   * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n   * @default 0\n   */\n  offset: NgpOffset;\n}\n\nexport const defaultSelectConfig: NgpSelectConfig = {\n  placement: 'bottom',\n  container: 'body',\n  flip: true,\n  offset: 0,\n};\n\nexport const NgpSelectConfigToken = new InjectionToken<NgpSelectConfig>('NgpSelectConfigToken');\n\n/**\n * Provide the default Select configuration\n * @param config The Select configuration\n * @returns The provider\n */\nexport function provideSelectConfig(config: Partial<NgpSelectConfig>): Provider[] {\n  return [\n    {\n      provide: NgpSelectConfigToken,\n      useValue: { ...defaultSelectConfig, ...config },\n    },\n  ];\n}\n\n/**\n * Inject the Select configuration\n * @returns The global Select configuration\n */\nexport function injectSelectConfig(): NgpSelectConfig {\n  return inject(NgpSelectConfigToken, { optional: true }) ?? defaultSelectConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport {\n  coerceFlip,\n  coerceOffset,\n  NgpFlip,\n  NgpFlipInput,\n  NgpOffset,\n  NgpOffsetInput,\n  NgpPlacement,\n} from 'ng-primitives/portal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectSelectConfig } from '../config/select-config';\nimport { ngpSelect, provideSelectState } from './select-state';\n\n/**\n * Ideally we would use a generic type here, unfortunately, unlike in React,\n * we cannot infer the type based on another input. For example, if multiple\n * is true, we cannot infer that the value is an array of T. Using a union\n * type is not ideal either because it requires the user to handle multiple cases.\n * Using a generic also isn't ideal because we need to use T as both an array and\n * a single value.\n *\n * Any seems to be used by Angular Material, ng-select, and other libraries\n * so we will use it here as well.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype T = any;\n\n@Directive({\n  selector: '[ngpSelect]',\n  exportAs: 'ngpSelect',\n  providers: [provideSelectState()],\n})\nexport class NgpSelect {\n  /** Access the select configuration. */\n  protected readonly config = injectSelectConfig();\n\n  /** The unique id of the select. */\n  readonly id = input(uniqueId('ngp-select'));\n\n  /** The value of the select. */\n  readonly value = input<T>(undefined, {\n    alias: 'ngpSelectValue',\n  });\n\n  /** Event emitted when the value changes. */\n  readonly valueChange = output<T>({\n    alias: 'ngpSelectValueChange',\n  });\n\n  /** Whether the select is multiple selection. */\n  readonly multiple = input<boolean, BooleanInput>(false, {\n    alias: 'ngpSelectMultiple',\n    transform: booleanAttribute,\n  });\n\n  /** Whether the select is disabled. */\n  readonly disabled = input<boolean, BooleanInput>(false, {\n    alias: 'ngpSelectDisabled',\n    transform: booleanAttribute,\n  });\n\n  /** Emit when the dropdown open state changes. */\n  readonly openChange = output<boolean>({\n    alias: 'ngpSelectOpenChange',\n  });\n\n  /** The comparator function used to compare options. */\n  readonly compareWith = input<(a: T | undefined, b: T | undefined) => boolean>(Object.is, {\n    alias: 'ngpSelectCompareWith',\n  });\n\n  /** The position of the dropdown. */\n  readonly placement = input<NgpPlacement>(this.config.placement, {\n    alias: 'ngpSelectDropdownPlacement',\n  });\n\n  /** The container for the dropdown. */\n  readonly container = input<HTMLElement | string | null>(this.config.container, {\n    alias: 'ngpSelectDropdownContainer',\n  });\n\n  /** Whether the dropdown should flip when there is not enough space. Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options. */\n  readonly flip = input<NgpFlip, NgpFlipInput>(this.config.flip, {\n    alias: 'ngpSelectDropdownFlip',\n    transform: coerceFlip,\n  });\n\n  /**\n   * Define the offset of the select dropdown relative to the trigger.\n   * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n   * @default 0\n   */\n  readonly offset = input<NgpOffset, NgpOffsetInput>(this.config.offset, {\n    alias: 'ngpSelectDropdownOffset',\n    transform: coerceOffset,\n  });\n\n  /**\n   * A function that will scroll the active option into view. This can be overridden\n   * for cases such as virtual scrolling where we cannot scroll the option directly because\n   * it may not be rendered.\n   */\n  readonly scrollToOption = input<(index: number) => void>(undefined, {\n    alias: 'ngpSelectScrollToOption',\n  });\n\n  /**\n   * Provide all the option values to the select. This is useful for virtual scrolling scenarios\n   * where not all options are rendered in the DOM. This is not an alternative to adding the options\n   * in the DOM, it is only to provide the select with the full list of options. This list should match\n   * the order of the options as they would appear in the DOM.\n   */\n  readonly allOptions = input<T[]>(undefined, { alias: 'ngpSelectOptions' });\n\n  /** The state of the select. */\n  protected readonly state = ngpSelect<T>({\n    id: this.id,\n    value: this.value,\n    multiple: this.multiple,\n    disabled: this.disabled,\n    compareWith: this.compareWith,\n    placement: this.placement,\n    container: this.container,\n    flip: this.flip,\n    offset: this.offset,\n    scrollToOption: this.scrollToOption,\n    allOptions: this.allOptions,\n    onValueChange: value => this.valueChange.emit(value),\n    onOpenChange: open => this.openChange.emit(open),\n  });\n\n  /** @internal Access the select element. */\n  readonly elementRef = this.state.elementRef;\n\n  /**\n   * Store the select portal.\n   * @internal\n   */\n  readonly portal = this.state.portal;\n\n  /**\n   * Store the select dropdown.\n   * @internal\n   */\n  readonly dropdown = this.state.dropdown;\n\n  /**\n   * Store the select options.\n   * @internal\n   */\n  readonly options = this.state.options;\n\n  /**\n   * Access the overlay\n   * @internal\n   */\n  readonly overlay = this.state.overlay;\n\n  /**\n   * The open state of the select.\n   * @internal\n   */\n  readonly open = this.state.open;\n\n  /**\n   * The options sorted by their index or DOM position.\n   * @internal\n   */\n  readonly sortedOptions = this.state.sortedOptions;\n\n  /**\n   * The active key descendant manager.\n   * @internal\n   */\n  readonly activeDescendantManager = this.state.activeDescendantManager;\n\n  /**\n   * Open the dropdown.\n   * @internal\n   */\n  openDropdown(): Promise<void> {\n    return this.state.openDropdown();\n  }\n\n  /**\n   * Close the dropdown.\n   * @internal\n   */\n  closeDropdown(): void {\n    return this.state.closeDropdown();\n  }\n\n  /**\n   * Toggle the dropdown.\n   * @internal\n   */\n  toggleDropdown(): Promise<void> {\n    return this.state.toggleDropdown();\n  }\n\n  /**\n   * Select an option.\n   * @param id The id of the option to select.\n   * @internal\n   */\n  selectOption(id: string): void {\n    this.state.selectOption(id);\n  }\n\n  /**\n   * Determine if an option is selected.\n   * @param option The option to check.\n   * @internal\n   */\n  isOptionSelected(option: T): boolean {\n    return this.state.isOptionSelected(option);\n  }\n\n  /**\n   * Activate the next option in the list if there is one.\n   * If there is no option currently active, activate the selected option or the first option.\n   * @internal\n   */\n  activateNextOption(): void {\n    this.state.activateNextOption();\n  }\n\n  /**\n   * Activate the previous option in the list if there is one.\n   * @internal\n   */\n  activatePreviousOption(): void {\n    this.state.activatePreviousOption();\n  }\n\n  /**\n   * Focus the select.\n   * @internal\n   */\n  focus(): void {\n    this.state.focus();\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA+BO,MAAM,CACX,yBAAyB,EACzB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACzB,GAAG,eAAe,CACjB,iBAAiB,EACjB,CAAC,EACC,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,EACnC,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,GACrB,KAAI;AACzB,IAAA,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,CAAC;;AAEtC,IAAA,eAAe,CAAC;AACd,QAAA,KAAK,EAAE,IAAI;AACX,QAAA,KAAK,EAAE,IAAI;AACX,QAAA,KAAK,EAAE,IAAI;AACX,QAAA,YAAY,EAAE,IAAI;AAClB,QAAA,QAAQ,EAAE,QAAQ;AACnB,KAAA,CAAC;;;;IAIF,cAAc,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAE9C,SAAS,WAAW,CAAC,KAAc,EAAA;AACjC,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;IACrB;IAEA,OAAO;QACL,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC;QAChE,WAAW;KACmB;AAClC,CAAC;;AC3DH;;AAEG;MAMU,eAAe,CAAA;AAc1B,IAAA,WAAA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