@ethlete/components 1.0.0-next.82 → 1.0.0-next.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/design/loader.ts +1 -0
  3. package/design/sdk/components/switch/switch.css +1 -1
  4. package/fesm2022/ethlete-components-testing.mjs +5 -1
  5. package/fesm2022/ethlete-components-testing.mjs.map +1 -1
  6. package/fesm2022/ethlete-components.mjs +2816 -473
  7. package/fesm2022/ethlete-components.mjs.map +1 -1
  8. package/generators/icons/generator.js +10 -3
  9. package/package.json +1 -1
  10. package/src/lib/avatar/avatar.component.css +12 -7
  11. package/src/lib/badge/badge.component.css +2 -3
  12. package/src/lib/banner/banner.component.css +7 -1
  13. package/src/lib/breadcrumb/breadcrumb.component.css +7 -4
  14. package/src/lib/button/button-properties-styles.component.css +6 -0
  15. package/src/lib/button/button.component.css +15 -1
  16. package/src/lib/carousel/carousel-autoplay-styles.component.css +8 -2
  17. package/src/lib/carousel/carousel.component.css +62 -4
  18. package/src/lib/collapse/collapse.component.css +43 -0
  19. package/src/lib/command-palette/command-palette.component.css +4 -4
  20. package/src/lib/empty-state/empty-state.component.css +3 -1
  21. package/src/lib/forms/cascader/cascader-panel.component.css +1 -1
  22. package/src/lib/forms/choice-field/choice-field.component.css +39 -0
  23. package/src/lib/forms/date-time/date-range-presets.component.css +1 -1
  24. package/src/lib/forms/dropzone/dropzone-crop.component.css +114 -0
  25. package/src/lib/forms/dropzone/dropzone-item.component.css +16 -0
  26. package/src/lib/forms/dropzone/dropzone-preview-styles.component.css +17 -1
  27. package/src/lib/forms/dropzone/dropzone-row-styles.component.css +85 -0
  28. package/src/lib/forms/form-field/form-field-text-shell-styles.component.css +31 -7
  29. package/src/lib/forms/form-field/form-field.component.css +45 -11
  30. package/src/lib/forms/form-field/hint.component.css +1 -3
  31. package/src/lib/forms/select/select-extras-styles.component.css +9 -3
  32. package/src/lib/forms/select/select-option-styles.component.css +26 -3
  33. package/src/lib/forms/select/select-panel.component.css +4 -4
  34. package/src/lib/forms/selection-list/segmented-button-group/segmented-button-group.component.css +5 -1
  35. package/src/lib/forms/selection-list/segmented-button-group/segmented-button.component.css +13 -1
  36. package/src/lib/loader/progress-bar/progress-bar.component.css +9 -0
  37. package/src/lib/loader/spinner/spinner-styles.component.css +1 -7
  38. package/src/lib/match/match-card.component.css +106 -12
  39. package/src/lib/match/match-participant.component.css +31 -0
  40. package/src/lib/menu/menu-item.component.css +4 -0
  41. package/src/lib/menu/menu-search-styles.component.css +1 -1
  42. package/src/lib/menu/menu-selection-item.component.css +4 -0
  43. package/src/lib/menu/menu.component.css +20 -10
  44. package/src/lib/overlay/floating-tip-styles.component.css +11 -5
  45. package/src/lib/overlay/overlay-container.component.css +2 -3
  46. package/src/lib/picture/picture.component.css +1 -0
  47. package/src/lib/progress-steps/progress-step.component.css +26 -6
  48. package/src/lib/skeleton/skeleton.component.css +33 -4
  49. package/src/lib/standings/standings.component.css +119 -0
  50. package/src/lib/stat-tile/stat-tile.component.css +23 -0
  51. package/src/lib/table/table-row-box-styles.component.css +15 -3
  52. package/src/lib/table/table-sticky-columns-styles.component.css +2 -2
  53. package/src/lib/table/table.component.css +10 -4
  54. package/src/lib/timeline/timeline-item.component.css +10 -0
  55. package/src/lib/toggletip/toggletip.component.css +2 -2
  56. package/src/lib/tooltip/tooltip.component.css +12 -6
  57. package/types/ethlete-components-testing.d.ts +2 -0
  58. package/types/ethlete-components.d.ts +928 -90
package/CHANGELOG.md CHANGED
@@ -1,5 +1,75 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.0-next.84
4
+
5
+ ### Minor Changes
6
+
7
+ - Add the `--et-form-field-supporting-inset` token to `et-form-field`. It sets the inline-start inset of the static label, hint, errors, warnings and description. It defaults to the control's padding-inline plus border width; set `0px` to align them with the frame edge.
8
+ - `et-match-card` takes badges: mark an element inside the card with `etMatchCardBadge="<label>"` and it is drawn in the meta row, while its label joins the card's accessible name (`matchName` gets `badges`).
9
+ - `et-match-card` gains a `loading` skeleton state (`match` may be `null`), a `cancelled` status, font tokens (`--et-match-card-*-font-*`), and participants take an optional `country` drawn as a flag and name.
10
+
11
+ ### Patch Changes
12
+
13
+ - A loading `et-menu-item` that triggers a submenu no longer opens it on click, hover or ArrowRight.
14
+
15
+ ## 1.0.0-next.83
16
+
17
+ ### Minor Changes
18
+
19
+ - Add `--et-banner-border-width` (borderless banners and query errors) and the stat tile label tokens `--et-stat-tile-label-text-transform` and `--et-stat-tile-label-letter-spacing`.
20
+ - `et-breadcrumb` takes `--et-breadcrumb-*` tokens for its item, hover, current and separator colours, font size, line height and letter spacing.
21
+ - Add carousel colour tokens for the dots, the countdown ring track and the controls row.
22
+ - `et-carousel` takes `controlsPosition: 'below' | 'overlay'` to lay its control bar over the track, and `pauseTogglePosition` to place the always-rendered autoplay pause control at either end of the bar or in a top corner of the track.
23
+ - Add `labelPosition` and `layout="subgrid"` to `et-choice-field`, and a `--et-select-option-outline-color-active` token to the select
24
+ - Add et-collapse, a height-expand wrapper with an etCollapse headless directive.
25
+ - `et-dropzone` gets a `layout` input: `'row'` shows a single file as one compact input-height row with thumbnail, size, upload date, status and actions. The single-file preview now shows the upload date and the server error too.
26
+ - Dropzone entries show size, upload date and thumbnail from `resolveExisting` or the new `selectFileInfo` response mapping, expose `response()`, `mimeType()` and `uploadedAt()`, and show a failed file's server message on the entry.
27
+ - `et-dropzone` takes a `crop` config: picked images open an aspect-locked crop step (drag, corner handles, arrow keys) and upload as the cropped file. The headless `etDropzoneCrop` directives hold the crop state.
28
+ - `et-empty-state` exposes `--et-empty-state-icon-color` for its icon.
29
+ - Badge exposes `--et-badge-letter-spacing` and `--et-badge-max-width`, and avatar exposes `--et-avatar-size`. A badge no longer sets `align-self` / `justify-self: start`, so it follows its parent's `align-items` / `justify-items` instead of sitting at the start of the cross axis.
30
+ - Tooltip and toggletip expose public CSS tokens: `--et-floating-tip-radius`, `--et-floating-tip-max-width`, `--et-toggletip-letter-spacing` and `--et-toggletip-min-width`. Defaults are unchanged.
31
+ - Tooltip and toggletip expose `--et-floating-tip-background`, `--et-floating-tip-color` and `--et-floating-tip-border`.
32
+ - `et-form-error` shows a generic fallback text (`errorFallback` in the form field labels) instead of an empty row for an error kind without a text.
33
+ - Add `labelPosition` and a `--et-form-field-label-gap` token to `et-form-field`
34
+ - Add `et-form-field` tokens for the border colour at rest, on hover and on focus, the focus ring width, the value colour, the label font weight and letter spacing, and the value letter spacing
35
+ - Add `etInputClear` (`INPUT_CLEAR_IMPORTS`), an opt-in clear button for `et-input`, and a `clear()` method on `et-input`.
36
+ - The match card padding tokens take a `block inline` pair, e.g. `--et-match-card-compact-padding: 12px 8px`.
37
+ - Add a `loading` input to `et-menu-item`, `et-menu-checkbox-item` and `et-menu-radio-item` that shows a spinner, sets `aria-busy` and blocks activation while the item stays focusable.
38
+ - Add `backdropClick()` to the overlay ref and a `backdropClick` output to the headless overlay directive, emitting on every backdrop click whether or not the overlay closes.
39
+ - Add a `position` input to `et-picture` that sets the focal point a `fit` crop keeps in view.
40
+ - `et-progress-bar` takes a `roundedEnd` input that rounds the end of the determinate fill with `--et-progress-bar-border-radius`. The default fill still ends square.
41
+ - Add `--et-progress-step-marker-ring-width` and `--et-progress-step-marker-ring-color` tokens to `et-progress-step`.
42
+ - Breaking: `ProgressStepLabels` needs a `skipped` key, and `ProgressStepsComponent.orientation` moved to its `etProgressSteps` host directive; pin `orientation="horizontal"` to keep the old row.
43
+ - Add headless `etProgressSteps`/`etProgressStep` and `etTimeline`/`etTimelineItem` directives, a `skipped` progress step state, a `status` on `et-timeline-item`, `[etProgressStepContent]`/`[etProgressStepMarker]` slots, and an `auto` progress steps orientation (the new default) that stacks into a column instead of overflowing.
44
+ - `[formControl]` and `[(ngModel)]` on `et-*` form controls are now supported through Angular's custom control mode; the forms guide lists the known gaps and workarounds.
45
+ - Add `et-select` tokens for the panel colours, the option hover, active and selected colours, the check colour and position, an option divider and the load-more row colours, and `provideSelectIcons()` to swap the chevron, clear and check glyphs
46
+ - `et-spinner` without a bound `diameter` now takes its size from an inherited `--et-spinner-size`. The unread `--et-spinner-stroke-width` token is removed.
47
+ - `et-standings` rows expand: an `ng-template[etStandingsRowDetail]` adds a chevron toggle per row and renders its own column-aligned rows underneath. `expandedRows` is two-way bindable, `expandMode` picks `'single'` or `'multiple'` (default).
48
+ - `et-stat-tile` gets `align`, `labelPosition`, a registered `--et-stat-tile-label-letter-spacing` token and a `'rank'` format that shows `#<n>`.
49
+ - Add `visibleFrom` to table columns to render a column only from a breakpoint up, and `availableColumns()` for the columns a chooser lists.
50
+ - Add table tokens for the header typography and row min height, per-row background and hover background, and the hover radius.
51
+ - Let an `et-table` `rowLink` answer with `{ commands, queryParams?, fragment?, title? }` or `{ href, title? }`, rendering `title` on the row anchor.
52
+ - The select search, date, time, range, duration, tag and phone inputs take an `autocomplete` input like `et-input`.
53
+ - Add `provideFormErrorMessages()` and `formErrorContext()`, which hand a form error resolver the validator value typed per error kind.
54
+
55
+ ### Patch Changes
56
+
57
+ - The `spinner()` design mock sets `diameter` and `strokeWidth` on `et-spinner`, so a mock that `ng()` renders as the real component keeps its size.
58
+ - `et-button` centres its icon on the label's cap height instead of the line box, so the icon no longer sits up to 3 px low (lg/xl, any font).
59
+ - The dropzone crop stage now also sets `-webkit-user-select: none`, so Safari 18.6 no longer selects the image while you drag the crop frame.
60
+ - Declare `FormCheckboxControl` on `et-switch` and `FormValueControl` on the radio group and segmented button group so the `[formField]` contract is compile-checked.
61
+ - The icons generator now imports the generated icon name types from the icons file, so an app build checks `etIcon` names instead of accepting any `string`.
62
+ - New `--et-menu-border-radius` token (default `10px`) sets the menu panel's corner radius.
63
+ - `--et-menu-item-font-weight` is unregistered: unset, menu items keep the inherited page weight.
64
+ - New `--et-menu-item-font-weight` token (default `400`) sets the menu item weight.
65
+ - The public menu, menu search, cascader panel, date range presets and command palette tokens now inherit, so a value set on `:root` reaches the detached overlay panel.
66
+ - New `--et-overlay-backdrop-filter` token (default `none`) sets the overlay backdrop's `backdrop-filter`.
67
+ - `--et-overlay-backdrop-color` set on `:root` or an ancestor now reaches the backdrop.
68
+ - The built-in error texts show the bound of a reactive `min`, `max`, `minlength` and `maxlength` error.
69
+ - `et-segmented-button-group` keeps its button row inside the container: short labels keep their width, longer labels truncate with an ellipsis instead of overflowing.
70
+ - Skeleton: add `--et-skeleton-color`, `--et-skeleton-highlight-color`, `--et-skeleton-display` and `--et-skeleton-direction`, keep a nested skeleton silent, and let a `shape="rect"` item keep its `aspect-ratio`.
71
+ - Apply a changed `hidden` from a new `et-table` `columns` value; the last write between it and `setColumnVisible` wins.
72
+
3
73
  ## 1.0.0-next.82
4
74
 
5
75
  ### Minor Changes
package/design/loader.ts CHANGED
@@ -115,6 +115,7 @@ export const spinner = (options: SpinnerMockOptions = {}) => {
115
115
  const attributes = [
116
116
  options.attributes,
117
117
  `class="${classes}"`,
118
+ `diameter="${diameter}" strokeWidth="${strokeWidth}"`,
118
119
  `role="progressbar" aria-label="Loading"${progressAttributes(options.value)}`,
119
120
  `data-et-frozen-at style="--et-spinner-size: ${diameter}px; --et-spinner-stroke-width: ${strokeWidth}px; --et-spinner-frozen-at: ${options.frozenAt ?? 0.3}"`,
120
121
  ].filter(Boolean);
@@ -22,7 +22,7 @@
22
22
  }
23
23
 
24
24
  et-switch[aria-checked='true'] .et-switch-track {
25
- box-shadow: inset 0 0 0 1px var(--et-theme-color-ink-solid);
25
+ box-shadow: inset 0 0 0 1px light-dark(var(--et-theme-color-ink-solid), transparent);
26
26
  }
27
27
 
28
28
  et-switch[data-indeterminate] {
@@ -1,6 +1,6 @@
1
1
  import { ApplicationRef, signal } from "@angular/core";
2
2
  import { TestBed } from "@angular/core/testing";
3
- import { ReplaySubject, map } from "rxjs";
3
+ import { ReplaySubject, Subject, map } from "rxjs";
4
4
  import { OVERLAY_REF, SelectDirective, TabBarDirective } from "@ethlete/components";
5
5
  const tick = () => TestBed.inject(ApplicationRef).tick();
6
6
  const flushFrames = () => new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(() => resolve())));
@@ -190,6 +190,7 @@ const createTestOverlayRef = (config = {}) => {
190
190
  const closeGuards = /* @__PURE__ */ new Set();
191
191
  const closed = signal(false, ...ngDevMode ? [{ debugName: "closed" }] : /* istanbul ignore next */ []);
192
192
  const busy = signal(false, ...ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []);
193
+ const backdropClick$ = new Subject();
193
194
  const afterOpened$ = new ReplaySubject(1);
194
195
  const beforeClosed$ = new ReplaySubject(1);
195
196
  const afterClosed$ = new ReplaySubject(1);
@@ -212,6 +213,7 @@ const createTestOverlayRef = (config = {}) => {
212
213
  beforeClosed$.complete();
213
214
  afterClosed$.next(event);
214
215
  afterClosed$.complete();
216
+ backdropClick$.complete();
215
217
  };
216
218
  const mapResult = (subject) => subject.pipe(map((event) => event.result));
217
219
  return {
@@ -234,6 +236,8 @@ const createTestOverlayRef = (config = {}) => {
234
236
  beforeClosedEvent: () => beforeClosed$.asObservable(),
235
237
  afterClosed: () => mapResult(afterClosed$),
236
238
  afterClosedEvent: () => afterClosed$.asObservable(),
239
+ backdropClick: () => backdropClick$.asObservable(),
240
+ emitBackdropClick: (event = new MouseEvent("click")) => backdropClick$.next(event),
237
241
  closeCalls,
238
242
  isClosed: closed.asReadonly()
239
243
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ethlete-components-testing.mjs","names":[],"sources":["../../../../libs/components/testing/driver-core.ts","../../../../libs/components/testing/control-driver.ts","../../../../libs/components/testing/overlay-control-driver.ts","../../../../libs/components/testing/date-picker-driver.ts","../../../../libs/components/testing/fake-overlay-ref.ts","../../../../libs/components/testing/field-control-driver.ts","../../../../libs/components/testing/select-driver.ts","../../../../libs/components/testing/tabs-driver.ts","../../../../libs/components/testing/test-environment.ts"],"sourcesContent":["import { ApplicationRef, Type } from '@angular/core';\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\n\nexport const tick = () => TestBed.inject(ApplicationRef).tick();\n\nexport const flushFrames = () =>\n new Promise<void>((resolve) => requestAnimationFrame(() => requestAnimationFrame(() => resolve())));\n\nexport const resetOverlays = () =>\n document.querySelectorAll('.et-overlay-runtime-entry').forEach((entry) => entry.remove());\n\n/**\n * The newest overlay pane in the document.\n *\n * Overlays render into the document, not into the fixture, and jsdom fires no transition events -\n * so a pane stuck in its leave transition stays reachable. Scope every pane query through here, or\n * a stale pane answers it.\n */\nexport const latestPane = () =>\n Array.from(document.querySelectorAll<HTMLElement>('.et-overlay-runtime-pane')).at(-1) ?? null;\n\nexport const hostDirective = <T>(fixture: ComponentFixture<unknown>, type: Type<T>) =>\n fixture.debugElement.children[0]!.injector.get(type);\n\nexport const directiveAt = <T>(fixture: ComponentFixture<unknown>, type: Type<T>, selector: string) => {\n const node = fixture.debugElement.query(\n (candidate) => (candidate.nativeElement as Element | null)?.matches?.(selector) ?? false,\n );\n\n if (!node) throw new Error(`No element in the fixture matches \"${selector}\"`);\n\n return node.injector.get(type);\n};\n\nexport const hostElement = (fixture: ComponentFixture<unknown>) =>\n fixture.debugElement.children[0]!.nativeElement as HTMLElement;\n\n/**\n * Queries the fixture's root element, narrowing `nativeElement` (typed `any`) to `HTMLElement`\n * once - a generic call directly through `fixture.nativeElement.querySelectorAll<E>(...)` fails\n * with TS2347 and collapses every downstream member access to `{}`.\n */\nexport const queryAll = <E extends Element = HTMLElement>(fixture: ComponentFixture<unknown>, selector: string) =>\n Array.from((fixture.nativeElement as HTMLElement).querySelectorAll<E>(selector));\n\n/** Single-result counterpart of {@link queryAll}. */\nexport const query = <E extends Element = HTMLElement>(fixture: ComponentFixture<unknown>, selector: string) =>\n (fixture.nativeElement as HTMLElement).querySelector<E>(selector);\n\nexport const pressKey = (target: EventTarget, key: string, init: KeyboardEventInit = {}) => {\n const event = new KeyboardEvent('keydown', { key, bubbles: true, cancelable: true, ...init });\n\n target.dispatchEvent(event);\n tick();\n\n return event;\n};\n\nexport const focusEvent = (target: EventTarget, type: 'focus' | 'blur') => {\n target.dispatchEvent(new FocusEvent(type));\n tick();\n};\n\nexport const pointerEnter = (target: EventTarget) => {\n target.dispatchEvent(new PointerEvent('pointerenter', { bubbles: false }));\n tick();\n};\n\nexport const pointerEvent = (target: EventTarget, type: string, init: PointerEventInit = {}) => {\n target.dispatchEvent(new PointerEvent(type, { bubbles: true, ...init }));\n tick();\n};\n\nexport const setInputValue = (input: HTMLInputElement, value: string) => {\n input.value = value;\n input.dispatchEvent(new Event('input', { bubbles: true }));\n tick();\n};\n\nexport const focusField = (field: HTMLInputElement) => {\n field.focus();\n field.dispatchEvent(new FocusEvent('focus'));\n tick();\n};\n\nexport const typeInField = (field: HTMLInputElement, text: string) => {\n field.focus();\n setInputValue(field, text);\n};\n\n/**\n * Types `text` one character at a time, each with its own `input` event and the caret left after\n * the inserted character - what a real keyboard produces. Use it instead of {@link typeInField}\n * whenever the control reads or rewrites the element between keystrokes; a whole-string\n * {@link setInputValue} hides every defect that only appears mid-entry.\n */\nexport const typeChars = (field: HTMLInputElement, text: string) => {\n field.focus();\n\n for (const char of text) {\n const caret = field.selectionStart ?? field.value.length;\n\n field.value = field.value.slice(0, caret) + char + field.value.slice(caret);\n field.setSelectionRange(caret + 1, caret + 1);\n field.dispatchEvent(new InputEvent('input', { bubbles: true, inputType: 'insertText' }));\n tick();\n }\n};\n\nexport const blurField = (field: HTMLInputElement) => {\n field.blur();\n field.dispatchEvent(new Event('blur'));\n tick();\n};\n\nexport const pointerDownOutside = () => {\n document.body.dispatchEvent(new Event('pointerdown', { bubbles: true }));\n tick();\n};\n\nexport type ClipboardPayload = Readonly<Record<string, string>>;\n\n/** jsdom has no `DataTransfer`, so the clipboard payload is faked onto the event. */\nexport const pasteInto = (target: EventTarget, payload: ClipboardPayload | string) => {\n const event = new Event('paste', { bubbles: true, cancelable: true });\n const data = typeof payload === 'string' ? { 'text/plain': payload } : payload;\n\n Object.defineProperty(event, 'clipboardData', { value: { getData: (type: string) => data[type] ?? '' } });\n target.dispatchEvent(event);\n tick();\n};\n\nexport const textOf = (element: Element | null | undefined) => element?.textContent?.trim() ?? null;\n","import { Type } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { directiveAt, hostDirective, hostElement, tick } from './driver-core';\n\nexport type ControlDriverOptions = {\n /** Matches the element carrying the directive, when the host template nests it. */\n directiveSelector?: string;\n};\n\n/** The host, the directive under test, and queries scoped to the fixture - what every driver needs. */\nexport const createControlDriver = <T, D>(\n fixture: ComponentFixture<T>,\n directiveType: Type<D>,\n { directiveSelector }: ControlDriverOptions = {},\n) => {\n const control = directiveSelector\n ? directiveAt(fixture, directiveType, directiveSelector)\n : hostDirective(fixture, directiveType);\n\n const root = fixture.nativeElement as HTMLElement;\n\n const query = <E extends HTMLElement = HTMLElement>(selector: string) => root.querySelector<E>(selector);\n const queryAll = <E extends HTMLElement = HTMLElement>(selector: string) =>\n Array.from(root.querySelectorAll<E>(selector));\n\n return {\n fixture,\n host: fixture.componentInstance,\n control,\n detectChanges: () => fixture.detectChanges(),\n tick,\n\n element: () => hostElement(fixture),\n directive: <X>(type: Type<X>, selector?: string) =>\n selector ? directiveAt(fixture, type, selector) : hostDirective(fixture, type),\n query,\n queryAll,\n text: (selector: string) => query(selector)?.textContent?.trim() ?? null,\n\n click: (element: HTMLElement) => {\n element.click();\n tick();\n },\n };\n};\n","import { Type } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { ControlDriverOptions, createControlDriver } from './control-driver';\nimport { flushFrames, latestPane, pointerDownOutside, pressKey, resetOverlays, tick } from './driver-core';\n\nexport type OverlayControlDriverOptions<D> = ControlDriverOptions & {\n /** The element the user clicks to open the overlay. */\n triggerSelector?: string;\n /** How this control closes its overlay from code. */\n hide: (control: D) => void;\n};\n\n/**\n * The plumbing every overlay-backed form control driver needs: the host component, the directive,\n * the trigger, the overlay pane, and the open/close dance jsdom needs two frames for.\n */\nexport const createOverlayControlDriver = <T, D>(\n fixture: ComponentFixture<T>,\n directiveType: Type<D>,\n { triggerSelector = '[role=\"combobox\"]', hide, ...controlOptions }: OverlayControlDriverOptions<D>,\n) => {\n const base = createControlDriver(fixture, directiveType, controlOptions);\n\n const pane = () => latestPane();\n const paneEl = <E extends HTMLElement = HTMLElement>(selector: string) => pane()?.querySelector<E>(selector) ?? null;\n const paneEls = <E extends HTMLElement = HTMLElement>(selector: string) =>\n Array.from(pane()?.querySelectorAll<E>(selector) ?? []);\n\n const trigger = <E extends HTMLElement = HTMLElement>() => base.query<E>(triggerSelector)!;\n\n const settle = async () => {\n await flushFrames();\n tick();\n };\n\n const settleOpen = async () => {\n await settle();\n await settle();\n };\n\n return {\n ...base,\n settle,\n trigger,\n\n pane,\n paneEl,\n paneEls,\n\n open: async () => {\n trigger().click();\n tick();\n await settleOpen();\n },\n close: async () => {\n hide(base.control);\n tick();\n await settle();\n },\n // jsdom fires no transition events, so a leaving pane would linger and shadow the next open\n closeAndRemovePanes: () => {\n hide(base.control);\n tick();\n resetOverlays();\n tick();\n },\n press: (key: string) => pressKey(trigger(), key),\n escape: () => pressKey(document, 'Escape'),\n pointerDownOutside,\n clickInPane: (selector: string) => {\n paneEl(selector)!.click();\n tick();\n },\n };\n};\n","import { Type } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { blurField, focusField, pressKey, textOf, tick, typeChars, typeInField } from './driver-core';\nimport { ControlDriverOptions } from './control-driver';\nimport { createOverlayControlDriver } from './overlay-control-driver';\n\n/**\n * Types masked date/time text one character at a time, with the caret tracking the insertion -\n * what `InputMaskDirective`'s live reformatting needs, unlike a whole-string {@link typeInField}.\n */\nexport const typeMasked = (field: HTMLInputElement, text: string) => typeChars(field, text);\n\n/**\n * Driver for every date-time control that pairs text fields with a picker overlay: date, date\n * range, date-time, time and time range. The picker trigger is matched by its directive, so a test\n * host can put it on any element; the fields are matched by CSS, defaulting to the only `input`.\n */\nexport const createDatePickerDriver = <T, D extends { closePicker: () => void }>(\n fixture: ComponentFixture<T>,\n directiveType: Type<D>,\n options: ControlDriverOptions = {},\n) => {\n const base = createOverlayControlDriver(fixture, directiveType, {\n ...options,\n triggerSelector: '[etdatepickertrigger]',\n hide: (control) => control.closePicker(),\n });\n\n const dayCell = (label: string) =>\n base\n .paneEls<HTMLButtonElement>('.et-calendar-cell')\n .find((cell) => textOf(cell) === label && !cell.hasAttribute('data-outside-month')) ?? null;\n\n const field = (selector = 'input') => base.query<HTMLInputElement>(selector)!;\n\n return {\n ...base,\n dayCell,\n clickDayCell: (label: string) => {\n dayCell(label)!.click();\n tick();\n },\n field,\n fields: () => base.queryAll<HTMLInputElement>('input'),\n type: (text: string, selector?: string) => typeInField(field(selector), text),\n typeMasked: (text: string, selector?: string) => typeMasked(field(selector), text),\n typeAndBlur: (text: string, selector?: string) => {\n typeInField(field(selector), text);\n blurField(field(selector));\n },\n focusField: (selector?: string) => focusField(field(selector)),\n blurField: (selector?: string) => blurField(field(selector)),\n pressInField: (key: string, selector?: string) => pressKey(field(selector), key),\n };\n};\n\nexport type DatePickerDriver<T, D extends { closePicker: () => void }> = ReturnType<\n typeof createDatePickerDriver<T, D>\n>;\n","import { Provider, signal } from '@angular/core';\nimport { OverlayRuntimeCloseEvent, OverlayRuntimeCloseSource } from '@ethlete/core';\nimport { ReplaySubject, map } from 'rxjs';\nimport { OVERLAY_REF, OverlayCloseGuard, OverlayConfig, OverlayRef } from '@ethlete/components';\n\nexport type TestOverlayRef<TComponent extends object = object, TResult = unknown> = OverlayRef<TComponent, TResult> & {\n /** Every `close()` / `forceClose()` call, in order, including ones a close guard vetoed. */\n readonly closeCalls: readonly { result: TResult | undefined; source: OverlayRuntimeCloseSource; forced: boolean }[];\n /** Whether a close got past the close guards. */\n readonly isClosed: () => boolean;\n};\n\n/**\n * A standalone `OverlayRef` for unit-testing an overlay component without opening it: `close(result)`\n * runs the registered close guards, records the call and emits `beforeClosed` / `afterClosed`\n * (replayed, so a late subscriber still sees the result). Pair it with {@link provideTestOverlayRef}.\n *\n * @example\n * const ref = createTestOverlayRef<ProductResult>();\n * TestBed.configureTestingModule({ providers: [provideTestOverlayRef(ref)] });\n * // … press the component's save button …\n * expect(ref.closeCalls.at(-1)?.result).toEqual({ saved: true });\n */\nexport const createTestOverlayRef = <TResult = unknown, TComponent extends object = object>(\n config: OverlayConfig = {},\n): TestOverlayRef<TComponent, TResult> => {\n const closeCalls: { result: TResult | undefined; source: OverlayRuntimeCloseSource; forced: boolean }[] = [];\n const closeGuards = new Set<OverlayCloseGuard<TResult>>();\n const closed = signal(false);\n const busy = signal(false);\n const afterOpened$ = new ReplaySubject<void>(1);\n const beforeClosed$ = new ReplaySubject<OverlayRuntimeCloseEvent<TResult | undefined>>(1);\n const afterClosed$ = new ReplaySubject<OverlayRuntimeCloseEvent<TResult | undefined>>(1);\n\n afterOpened$.next();\n afterOpened$.complete();\n\n const requestClose = (result: TResult | undefined, source: OverlayRuntimeCloseSource, forced: boolean) => {\n closeCalls.push({ result, source, forced });\n\n if (closed()) return;\n\n const event = { result, source };\n\n if (!forced && [...closeGuards].some((guard) => !guard(event))) return;\n\n closed.set(true);\n beforeClosed$.next(event);\n beforeClosed$.complete();\n afterClosed$.next(event);\n afterClosed$.complete();\n };\n\n const mapResult = (subject: ReplaySubject<OverlayRuntimeCloseEvent<TResult | undefined>>) =>\n subject.pipe(map((event) => event.result));\n\n return {\n id: config.id ?? 'et-test-overlay',\n elements: null,\n config,\n headerTemplate: signal(null).asReadonly(),\n layout: signal(null).asReadonly(),\n componentInstance: () => null,\n close: (result) => requestClose(result, 'api', false),\n busy,\n forceClose: (result, source = 'api') => requestClose(result, source, true),\n registerCloseGuard: (guard) => {\n closeGuards.add(guard);\n\n return () => closeGuards.delete(guard);\n },\n updatePositionStrategy: () => undefined,\n afterOpened: () => afterOpened$.asObservable(),\n beforeClosed: () => mapResult(beforeClosed$),\n beforeClosedEvent: () => beforeClosed$.asObservable(),\n afterClosed: () => mapResult(afterClosed$),\n afterClosedEvent: () => afterClosed$.asObservable(),\n closeCalls,\n isClosed: closed.asReadonly(),\n };\n};\n\n/** Provides `ref` (a fresh {@link createTestOverlayRef} by default) as `OVERLAY_REF`, so `definition.injectRef()` resolves it. */\nexport const provideTestOverlayRef = <TResult = unknown>(\n ref: TestOverlayRef<object, TResult> = createTestOverlayRef<TResult>(),\n): Provider[] => [{ provide: OVERLAY_REF, useValue: ref }];\n","import { Type } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { ControlDriverOptions, createControlDriver } from './control-driver';\nimport { blurField, focusField, pointerEvent, pressKey, setInputValue, typeChars } from './driver-core';\n\nexport type FieldControlDriverOptions = ControlDriverOptions & {\n /** Matches the editable field, when it is not the host's only `input`. */\n fieldSelector?: string;\n};\n\n/**\n * The plumbing every text-field form control driver needs: the host component, the directive, the\n * native field, and the value / focus / key events a user produces on it.\n */\nexport const createFieldControlDriver = <T, D>(\n fixture: ComponentFixture<T>,\n directiveType: Type<D>,\n { fieldSelector = 'input', ...controlOptions }: FieldControlDriverOptions = {},\n) => {\n const base = createControlDriver(fixture, directiveType, controlOptions);\n\n const field = () => base.query<HTMLInputElement>(fieldSelector)!;\n\n return {\n ...base,\n\n field,\n fieldValue: () => field().value,\n placeholder: () => field().placeholder,\n\n type: (text: string) => setInputValue(field(), text),\n /** Types one character at a time - what a keyboard produces, unlike `type`'s single event. */\n typeChars: (text: string) => typeChars(field(), text),\n typeAndBlur: (text: string) => {\n setInputValue(field(), text);\n blurField(field());\n },\n focus: () => focusField(field()),\n blur: () => blurField(field()),\n\n press: (key: string, init: KeyboardEventInit = {}) => pressKey(field(), key, init),\n pointer: pointerEvent,\n };\n};\n\nexport type FieldControlDriver<T, D> = ReturnType<typeof createFieldControlDriver<T, D>>;\n","import { ComponentFixture } from '@angular/core/testing';\nimport { pasteInto, pointerEnter, pressKey, setInputValue, textOf, tick } from './driver-core';\nimport { ControlDriverOptions } from './control-driver';\nimport { createOverlayControlDriver } from './overlay-control-driver';\nimport { SelectDirective } from '@ethlete/components';\n\nexport const createSelectDriver = <T>(fixture: ComponentFixture<T>, controlOptions: ControlDriverOptions = {}) => {\n const base = createOverlayControlDriver(fixture, SelectDirective, {\n triggerSelector: '[etselecttrigger], [role=\"combobox\"]',\n hide: (select) => select.hide(),\n ...controlOptions,\n });\n\n // a trigger-inline search renders in the fixture, a panel-hosted one in the pane\n const searchInput = () =>\n (base.query<HTMLInputElement>('input[etselectsearch]') ?? base.paneEl<HTMLInputElement>('input[etselectsearch]'))!;\n\n const options = () => base.paneEls('[role=\"option\"]');\n const visibleOptions = () => base.paneEls('[role=\"option\"]:not([data-filtered])');\n const activeOption = () => base.paneEl('[role=\"option\"][data-active]');\n const optionByLabel = (label: string) => visibleOptions().find((option) => textOf(option) === label) ?? null;\n const chips = () => base.queryAll('et-chip');\n const chipRemoveButton = (index: number) => chips()[index]!.querySelector<HTMLElement>('.et-chip-remove-button');\n const optionGroups = () => base.paneEls('[role=\"group\"]');\n const virtualBody = () => base.paneEl('.et-select-virtual-options')!;\n\n return {\n ...base,\n select: base.control,\n\n searchInput,\n valueEl: () => base.query('.et-select-value'),\n valueText: () => textOf(base.query('.et-select-value')),\n chips,\n chipLabels: () => chips().map(textOf),\n chipRemoveButton,\n\n listbox: () => base.paneEl('[role=\"listbox\"]'),\n paneText: () => textOf(base.pane()),\n options,\n visibleOptions,\n activeOption,\n activeLabel: () => textOf(activeOption()),\n optionLabels: () => options().map(textOf),\n visibleLabels: () => visibleOptions().map(textOf),\n optionByLabel,\n\n optionGroups,\n groupsHidden: () => optionGroups().map((group) => group.hasAttribute('hidden')),\n groupOptionCounts: () => optionGroups().map((group) => group.querySelectorAll('[role=\"option\"]').length),\n groupLabel: (index: number) => {\n const labelledBy = optionGroups()[index]?.getAttribute('aria-labelledby');\n\n return labelledBy ? textOf(base.paneEl(`#${labelledBy}`)) : null;\n },\n\n virtualPadding: () => ({\n start: parseFloat(virtualBody().style.paddingBlockStart),\n end: parseFloat(virtualBody().style.paddingBlockEnd),\n }),\n\n clickOption: (index: number) => {\n options()[index]!.click();\n tick();\n },\n clickOptionByLabel: (label: string) => {\n optionByLabel(label)!.click();\n tick();\n },\n removeChip: (index: number) => {\n chipRemoveButton(index)!.click();\n tick();\n },\n hover: (element: HTMLElement) => pointerEnter(element),\n type: (text: string) => setInputValue(searchInput(), text),\n pressInSearch: (key: string) => pressKey(searchInput(), key),\n paste: (text: string) => pasteInto(searchInput(), text),\n };\n};\n\nexport type SelectDriver<T> = ReturnType<typeof createSelectDriver<T>>;\n","import { ComponentFixture } from '@angular/core/testing';\nimport { ControlDriverOptions, createControlDriver } from './control-driver';\nimport { pressKey } from './driver-core';\nimport { TabBarDirective } from '@ethlete/components';\n\nexport type TabBarDriverOptions = ControlDriverOptions & {\n /** Matches every trigger inside the bar. Defaults to the role every `TabBarTriggerDirective` host carries. */\n triggerSelector?: string;\n};\n\n/**\n * Wraps a mounted `[etTabBar]` host with the roving-tabindex vocabulary its keyboard model needs:\n * which trigger is currently the tab stop, and dispatching a key from wherever focus actually is.\n */\nexport const createTabBarDriver = <T>(fixture: ComponentFixture<T>, options: TabBarDriverOptions = {}) => {\n const { triggerSelector = '[role=\"tab\"]', ...controlOptions } = options;\n const base = createControlDriver(fixture, TabBarDirective, controlOptions);\n\n const triggers = () => base.queryAll<HTMLButtonElement>(triggerSelector);\n\n const trigger = (index: number) => {\n const el = triggers()[index];\n\n if (!el) throw new Error(`No tab trigger at index ${index}`);\n\n return el;\n };\n\n /** The trigger the roving-tabindex model made the tab stop - `tabindex=\"0\"` among the bar's triggers. */\n const tabbableTrigger = () => triggers().find((el) => el.getAttribute('tabindex') === '0') ?? null;\n\n const focusTabbable = () => {\n const el = tabbableTrigger();\n\n if (!el) throw new Error('No tabbable trigger - the roving-tabindex lookup found nothing');\n\n el.focus();\n base.tick();\n };\n\n /** Dispatches `key` from wherever focus currently is, falling back to the roving tab stop. */\n const press = (key: string, init?: KeyboardEventInit) => {\n const target = (document.activeElement as HTMLElement | null) ?? tabbableTrigger();\n\n if (!target) throw new Error('No focused trigger to dispatch the keydown on');\n\n return pressKey(target, key, init);\n };\n\n return {\n ...base,\n triggers,\n trigger,\n tabbableTrigger,\n focusTabbable,\n press,\n focusedIndex: () => base.control.focusedIndex(),\n selectedIndex: () => base.control.selectedIndex(),\n };\n};\n","class ResizeObserverFake {\n constructor(callback: ResizeObserverCallback) {\n void callback;\n }\n\n observe() {\n return undefined;\n }\n\n unobserve() {\n return undefined;\n }\n\n disconnect() {\n return undefined;\n }\n}\n\nclass IntersectionObserverFake {\n public readonly root = null;\n public readonly rootMargin = '';\n public readonly thresholds: number[] = [];\n\n constructor(callback: IntersectionObserverCallback) {\n void callback;\n }\n\n observe() {\n return undefined;\n }\n\n unobserve() {\n return undefined;\n }\n\n disconnect() {\n return undefined;\n }\n\n takeRecords(): IntersectionObserverEntry[] {\n return [];\n }\n}\n\nclass AnimationFake extends EventTarget {\n public finished: Promise<AnimationFake>;\n public currentTime: number | null = 0;\n public playState = 'finished';\n public onfinish: (() => void) | null = null;\n public oncancel: (() => void) | null = null;\n\n // An animation settles once: without the latch a `cancel()` before the queued auto-finish would fire\n // `oncancel` and then `onfinish`. It is set before notifying, so a handler that re-enters\n // `cancel()`/`finish()` is a no-op.\n private settled = false;\n\n constructor() {\n super();\n this.finished = Promise.resolve(this);\n queueMicrotask(() => this.finish());\n }\n\n cancel() {\n if (this.settled) return;\n this.settled = true;\n this.playState = 'idle';\n this.dispatchEvent(new Event('cancel'));\n this.oncancel?.();\n }\n\n finish() {\n if (this.settled) return;\n this.settled = true;\n this.playState = 'finished';\n this.dispatchEvent(new Event('finish'));\n this.onfinish?.();\n }\n\n play() {\n return undefined;\n }\n\n pause() {\n return undefined;\n }\n\n reverse() {\n return undefined;\n }\n\n commitStyles() {\n return undefined;\n }\n}\n\nconst fakeMediaQueryList = (query: string): MediaQueryList => ({\n matches: false,\n media: query,\n onchange: null,\n addListener: () => undefined,\n removeListener: () => undefined,\n addEventListener: () => undefined,\n removeEventListener: () => undefined,\n dispatchEvent: () => false,\n});\n\nconst defineMissing = (target: object, key: string, value: unknown) => {\n if (Reflect.get(target, key)) return;\n\n Object.defineProperty(target, key, { configurable: true, value, writable: true });\n};\n\n/**\n * Installs the browser APIs jsdom lacks and `@ethlete/components` needs to render: `ResizeObserver`,\n * `IntersectionObserver`, `matchMedia`, `Element.prototype.animate` and `Element.prototype.scroll`. Call it once in a test setup file;\n * an API that already exists is left alone. The fakes never report: observers never fire, no media query\n * matches, and an animation finishes on the next microtask.\n */\nexport const setupComponentsTestEnvironment = () => {\n defineMissing(globalThis, 'ResizeObserver', ResizeObserverFake);\n defineMissing(globalThis, 'IntersectionObserver', IntersectionObserverFake);\n defineMissing(globalThis, 'matchMedia', fakeMediaQueryList);\n defineMissing(Element.prototype, 'animate', () => new AnimationFake() as unknown as Animation);\n defineMissing(Element.prototype, 'scroll', () => undefined);\n};\n"],"mappings":";;;;AAGA,MAAa,aAAa,QAAQ,OAAO,cAAc,CAAC,CAAC,KAAI;AAE7D,MAAa,oBACX,IAAI,SAAe,YAAY,4BAA4B,4BAA4B,QAAO,CAAE,CAAC,CAAC;AAEpG,MAAa,sBACX,SAAS,iBAAiB,2BAA2B,CAAC,CAAC,SAAS,UAAU,MAAM,OAAM,CAAE;AAS1F,MAAa,mBACX,MAAM,KAAK,SAAS,iBAA8B,0BAA0B,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK;AAE3F,MAAa,iBAAoB,SAAoC,SACnE,QAAQ,aAAa,SAAS,EAAG,CAAC,SAAS,IAAI,IAAI;AAErD,MAAa,eAAkB,SAAoC,MAAe,aAAoB;CACpG,MAAM,OAAO,QAAQ,aAAa,OAC/B,cAAe,UAAU,eAAkC,UAAU,QAAQ,KAAK,KAAK;CAG1F,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,sCAAsC,SAAQ,EAAG;CAE5E,OAAO,KAAK,SAAS,IAAI,IAAI;AAC/B;AAEA,MAAa,eAAe,YAC1B,QAAQ,aAAa,SAAS,EAAG,CAAC;AAOpC,MAAa,YAA6C,SAAo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KAAK,cAAc,IAAI,MAAM,QAAQ,CAAC;EACtC,KAAK,WAAU;CACjB;CAEA,OAAI,CAEJ;CAEA,QAAK,CAEL;CAEA,UAAO,CAEP;CAEA,eAAY,CAEZ;AACD;AAED,MAAM,sBAAsB,WAAmC;CAC7D,SAAS;CACT,OAAO;CACP,UAAU;CACV,mBAAmB;CACnB,sBAAsB;CACtB,wBAAwB;CACxB,2BAA2B;CAC3B,qBAAqB;AACtB;AAED,MAAM,iBAAiB,QAAgB,KAAa,UAAkB;CACpE,IAAI,QAAQ,IAAI,QAAQ,GAAG,GAAG;CAE9B,OAAO,eAAe,QAAQ,KAAK;EAAE,cAAc;EAAM;EAAO,UAAU;CAAI,CAAE;AAClF;AAQA,MAAa,uCAAsC;CACjD,cAAc,YAAY,kBAAkB,kBAAkB;CAC9D,cAAc,YAAY,wBAAwB,wBAAwB;CAC1E,cAAc,YAAY,cAAc,kBAAkB;CAC1D,cAAc,QAAQ,WAAW,iBAAiB,IAAI,cAAa,CAA0B;CAC7F,cAAc,QAAQ,WAAW,gBAAgB,MAAS;AAC5D"}
1
+ {"version":3,"file":"ethlete-components-testing.mjs","names":[],"sources":["../../../../libs/components/testing/driver-core.ts","../../../../libs/components/testing/control-driver.ts","../../../../libs/components/testing/overlay-control-driver.ts","../../../../libs/components/testing/date-picker-driver.ts","../../../../libs/components/testing/fake-overlay-ref.ts","../../../../libs/components/testing/field-control-driver.ts","../../../../libs/components/testing/select-driver.ts","../../../../libs/components/testing/tabs-driver.ts","../../../../libs/components/testing/test-environment.ts"],"sourcesContent":["import { ApplicationRef, Type } from '@angular/core';\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\n\nexport const tick = () => TestBed.inject(ApplicationRef).tick();\n\nexport const flushFrames = () =>\n new Promise<void>((resolve) => requestAnimationFrame(() => requestAnimationFrame(() => resolve())));\n\nexport const resetOverlays = () =>\n document.querySelectorAll('.et-overlay-runtime-entry').forEach((entry) => entry.remove());\n\n/**\n * The newest overlay pane in the document.\n *\n * Overlays render into the document, not into the fixture, and jsdom fires no transition events -\n * so a pane stuck in its leave transition stays reachable. Scope every pane query through here, or\n * a stale pane answers it.\n */\nexport const latestPane = () =>\n Array.from(document.querySelectorAll<HTMLElement>('.et-overlay-runtime-pane')).at(-1) ?? null;\n\nexport const hostDirective = <T>(fixture: ComponentFixture<unknown>, type: Type<T>) =>\n fixture.debugElement.children[0]!.injector.get(type);\n\nexport const directiveAt = <T>(fixture: ComponentFixture<unknown>, type: Type<T>, selector: string) => {\n const node = fixture.debugElement.query(\n (candidate) => (candidate.nativeElement as Element | null)?.matches?.(selector) ?? false,\n );\n\n if (!node) throw new Error(`No element in the fixture matches \"${selector}\"`);\n\n return node.injector.get(type);\n};\n\nexport const hostElement = (fixture: ComponentFixture<unknown>) =>\n fixture.debugElement.children[0]!.nativeElement as HTMLElement;\n\n/**\n * Queries the fixture's root element, narrowing `nativeElement` (typed `any`) to `HTMLElement`\n * once - a generic call directly through `fixture.nativeElement.querySelectorAll<E>(...)` fails\n * with TS2347 and collapses every downstream member access to `{}`.\n */\nexport const queryAll = <E extends Element = HTMLElement>(fixture: ComponentFixture<unknown>, selector: string) =>\n Array.from((fixture.nativeElement as HTMLElement).querySelectorAll<E>(selector));\n\n/** Single-result counterpart of {@link queryAll}. */\nexport const query = <E extends Element = HTMLElement>(fixture: ComponentFixture<unknown>, selector: string) =>\n (fixture.nativeElement as HTMLElement).querySelector<E>(selector);\n\nexport const pressKey = (target: EventTarget, key: string, init: KeyboardEventInit = {}) => {\n const event = new KeyboardEvent('keydown', { key, bubbles: true, cancelable: true, ...init });\n\n target.dispatchEvent(event);\n tick();\n\n return event;\n};\n\nexport const focusEvent = (target: EventTarget, type: 'focus' | 'blur') => {\n target.dispatchEvent(new FocusEvent(type));\n tick();\n};\n\nexport const pointerEnter = (target: EventTarget) => {\n target.dispatchEvent(new PointerEvent('pointerenter', { bubbles: false }));\n tick();\n};\n\nexport const pointerEvent = (target: EventTarget, type: string, init: PointerEventInit = {}) => {\n target.dispatchEvent(new PointerEvent(type, { bubbles: true, ...init }));\n tick();\n};\n\nexport const setInputValue = (input: HTMLInputElement, value: string) => {\n input.value = value;\n input.dispatchEvent(new Event('input', { bubbles: true }));\n tick();\n};\n\nexport const focusField = (field: HTMLInputElement) => {\n field.focus();\n field.dispatchEvent(new FocusEvent('focus'));\n tick();\n};\n\nexport const typeInField = (field: HTMLInputElement, text: string) => {\n field.focus();\n setInputValue(field, text);\n};\n\n/**\n * Types `text` one character at a time, each with its own `input` event and the caret left after\n * the inserted character - what a real keyboard produces. Use it instead of {@link typeInField}\n * whenever the control reads or rewrites the element between keystrokes; a whole-string\n * {@link setInputValue} hides every defect that only appears mid-entry.\n */\nexport const typeChars = (field: HTMLInputElement, text: string) => {\n field.focus();\n\n for (const char of text) {\n const caret = field.selectionStart ?? field.value.length;\n\n field.value = field.value.slice(0, caret) + char + field.value.slice(caret);\n field.setSelectionRange(caret + 1, caret + 1);\n field.dispatchEvent(new InputEvent('input', { bubbles: true, inputType: 'insertText' }));\n tick();\n }\n};\n\nexport const blurField = (field: HTMLInputElement) => {\n field.blur();\n field.dispatchEvent(new Event('blur'));\n tick();\n};\n\nexport const pointerDownOutside = () => {\n document.body.dispatchEvent(new Event('pointerdown', { bubbles: true }));\n tick();\n};\n\nexport type ClipboardPayload = Readonly<Record<string, string>>;\n\n/** jsdom has no `DataTransfer`, so the clipboard payload is faked onto the event. */\nexport const pasteInto = (target: EventTarget, payload: ClipboardPayload | string) => {\n const event = new Event('paste', { bubbles: true, cancelable: true });\n const data = typeof payload === 'string' ? { 'text/plain': payload } : payload;\n\n Object.defineProperty(event, 'clipboardData', { value: { getData: (type: string) => data[type] ?? '' } });\n target.dispatchEvent(event);\n tick();\n};\n\nexport const textOf = (element: Element | null | undefined) => element?.textContent?.trim() ?? null;\n","import { Type } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { directiveAt, hostDirective, hostElement, tick } from './driver-core';\n\nexport type ControlDriverOptions = {\n /** Matches the element carrying the directive, when the host template nests it. */\n directiveSelector?: string;\n};\n\n/** The host, the directive under test, and queries scoped to the fixture - what every driver needs. */\nexport const createControlDriver = <T, D>(\n fixture: ComponentFixture<T>,\n directiveType: Type<D>,\n { directiveSelector }: ControlDriverOptions = {},\n) => {\n const control = directiveSelector\n ? directiveAt(fixture, directiveType, directiveSelector)\n : hostDirective(fixture, directiveType);\n\n const root = fixture.nativeElement as HTMLElement;\n\n const query = <E extends HTMLElement = HTMLElement>(selector: string) => root.querySelector<E>(selector);\n const queryAll = <E extends HTMLElement = HTMLElement>(selector: string) =>\n Array.from(root.querySelectorAll<E>(selector));\n\n return {\n fixture,\n host: fixture.componentInstance,\n control,\n detectChanges: () => fixture.detectChanges(),\n tick,\n\n element: () => hostElement(fixture),\n directive: <X>(type: Type<X>, selector?: string) =>\n selector ? directiveAt(fixture, type, selector) : hostDirective(fixture, type),\n query,\n queryAll,\n text: (selector: string) => query(selector)?.textContent?.trim() ?? null,\n\n click: (element: HTMLElement) => {\n element.click();\n tick();\n },\n };\n};\n","import { Type } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { ControlDriverOptions, createControlDriver } from './control-driver';\nimport { flushFrames, latestPane, pointerDownOutside, pressKey, resetOverlays, tick } from './driver-core';\n\nexport type OverlayControlDriverOptions<D> = ControlDriverOptions & {\n /** The element the user clicks to open the overlay. */\n triggerSelector?: string;\n /** How this control closes its overlay from code. */\n hide: (control: D) => void;\n};\n\n/**\n * The plumbing every overlay-backed form control driver needs: the host component, the directive,\n * the trigger, the overlay pane, and the open/close dance jsdom needs two frames for.\n */\nexport const createOverlayControlDriver = <T, D>(\n fixture: ComponentFixture<T>,\n directiveType: Type<D>,\n { triggerSelector = '[role=\"combobox\"]', hide, ...controlOptions }: OverlayControlDriverOptions<D>,\n) => {\n const base = createControlDriver(fixture, directiveType, controlOptions);\n\n const pane = () => latestPane();\n const paneEl = <E extends HTMLElement = HTMLElement>(selector: string) => pane()?.querySelector<E>(selector) ?? null;\n const paneEls = <E extends HTMLElement = HTMLElement>(selector: string) =>\n Array.from(pane()?.querySelectorAll<E>(selector) ?? []);\n\n const trigger = <E extends HTMLElement = HTMLElement>() => base.query<E>(triggerSelector)!;\n\n const settle = async () => {\n await flushFrames();\n tick();\n };\n\n const settleOpen = async () => {\n await settle();\n await settle();\n };\n\n return {\n ...base,\n settle,\n trigger,\n\n pane,\n paneEl,\n paneEls,\n\n open: async () => {\n trigger().click();\n tick();\n await settleOpen();\n },\n close: async () => {\n hide(base.control);\n tick();\n await settle();\n },\n // jsdom fires no transition events, so a leaving pane would linger and shadow the next open\n closeAndRemovePanes: () => {\n hide(base.control);\n tick();\n resetOverlays();\n tick();\n },\n press: (key: string) => pressKey(trigger(), key),\n escape: () => pressKey(document, 'Escape'),\n pointerDownOutside,\n clickInPane: (selector: string) => {\n paneEl(selector)!.click();\n tick();\n },\n };\n};\n","import { Type } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { blurField, focusField, pressKey, textOf, tick, typeChars, typeInField } from './driver-core';\nimport { ControlDriverOptions } from './control-driver';\nimport { createOverlayControlDriver } from './overlay-control-driver';\n\n/**\n * Types masked date/time text one character at a time, with the caret tracking the insertion -\n * what `InputMaskDirective`'s live reformatting needs, unlike a whole-string {@link typeInField}.\n */\nexport const typeMasked = (field: HTMLInputElement, text: string) => typeChars(field, text);\n\n/**\n * Driver for every date-time control that pairs text fields with a picker overlay: date, date\n * range, date-time, time and time range. The picker trigger is matched by its directive, so a test\n * host can put it on any element; the fields are matched by CSS, defaulting to the only `input`.\n */\nexport const createDatePickerDriver = <T, D extends { closePicker: () => void }>(\n fixture: ComponentFixture<T>,\n directiveType: Type<D>,\n options: ControlDriverOptions = {},\n) => {\n const base = createOverlayControlDriver(fixture, directiveType, {\n ...options,\n triggerSelector: '[etdatepickertrigger]',\n hide: (control) => control.closePicker(),\n });\n\n const dayCell = (label: string) =>\n base\n .paneEls<HTMLButtonElement>('.et-calendar-cell')\n .find((cell) => textOf(cell) === label && !cell.hasAttribute('data-outside-month')) ?? null;\n\n const field = (selector = 'input') => base.query<HTMLInputElement>(selector)!;\n\n return {\n ...base,\n dayCell,\n clickDayCell: (label: string) => {\n dayCell(label)!.click();\n tick();\n },\n field,\n fields: () => base.queryAll<HTMLInputElement>('input'),\n type: (text: string, selector?: string) => typeInField(field(selector), text),\n typeMasked: (text: string, selector?: string) => typeMasked(field(selector), text),\n typeAndBlur: (text: string, selector?: string) => {\n typeInField(field(selector), text);\n blurField(field(selector));\n },\n focusField: (selector?: string) => focusField(field(selector)),\n blurField: (selector?: string) => blurField(field(selector)),\n pressInField: (key: string, selector?: string) => pressKey(field(selector), key),\n };\n};\n\nexport type DatePickerDriver<T, D extends { closePicker: () => void }> = ReturnType<\n typeof createDatePickerDriver<T, D>\n>;\n","import { Provider, signal } from '@angular/core';\nimport { OverlayRuntimeCloseEvent, OverlayRuntimeCloseSource } from '@ethlete/core';\nimport { ReplaySubject, Subject, map } from 'rxjs';\nimport { OVERLAY_REF, OverlayCloseGuard, OverlayConfig, OverlayRef } from '@ethlete/components';\n\nexport type TestOverlayRef<TComponent extends object = object, TResult = unknown> = OverlayRef<TComponent, TResult> & {\n /** Every `close()` / `forceClose()` call, in order, including ones a close guard vetoed. */\n readonly closeCalls: readonly { result: TResult | undefined; source: OverlayRuntimeCloseSource; forced: boolean }[];\n /** Whether a close got past the close guards. */\n readonly isClosed: () => boolean;\n /** Emits on `backdropClick()`. */\n readonly emitBackdropClick: (event?: MouseEvent) => void;\n};\n\n/**\n * A standalone `OverlayRef` for unit-testing an overlay component without opening it: `close(result)`\n * runs the registered close guards, records the call and emits `beforeClosed` / `afterClosed`\n * (replayed, so a late subscriber still sees the result). Pair it with {@link provideTestOverlayRef}.\n *\n * @example\n * const ref = createTestOverlayRef<ProductResult>();\n * TestBed.configureTestingModule({ providers: [provideTestOverlayRef(ref)] });\n * // … press the component's save button …\n * expect(ref.closeCalls.at(-1)?.result).toEqual({ saved: true });\n */\nexport const createTestOverlayRef = <TResult = unknown, TComponent extends object = object>(\n config: OverlayConfig = {},\n): TestOverlayRef<TComponent, TResult> => {\n const closeCalls: { result: TResult | undefined; source: OverlayRuntimeCloseSource; forced: boolean }[] = [];\n const closeGuards = new Set<OverlayCloseGuard<TResult>>();\n const closed = signal(false);\n const busy = signal(false);\n const backdropClick$ = new Subject<MouseEvent>();\n const afterOpened$ = new ReplaySubject<void>(1);\n const beforeClosed$ = new ReplaySubject<OverlayRuntimeCloseEvent<TResult | undefined>>(1);\n const afterClosed$ = new ReplaySubject<OverlayRuntimeCloseEvent<TResult | undefined>>(1);\n\n afterOpened$.next();\n afterOpened$.complete();\n\n const requestClose = (result: TResult | undefined, source: OverlayRuntimeCloseSource, forced: boolean) => {\n closeCalls.push({ result, source, forced });\n\n if (closed()) return;\n\n const event = { result, source };\n\n if (!forced && [...closeGuards].some((guard) => !guard(event))) return;\n\n closed.set(true);\n beforeClosed$.next(event);\n beforeClosed$.complete();\n afterClosed$.next(event);\n afterClosed$.complete();\n backdropClick$.complete();\n };\n\n const mapResult = (subject: ReplaySubject<OverlayRuntimeCloseEvent<TResult | undefined>>) =>\n subject.pipe(map((event) => event.result));\n\n return {\n id: config.id ?? 'et-test-overlay',\n elements: null,\n config,\n headerTemplate: signal(null).asReadonly(),\n layout: signal(null).asReadonly(),\n componentInstance: () => null,\n close: (result) => requestClose(result, 'api', false),\n busy,\n forceClose: (result, source = 'api') => requestClose(result, source, true),\n registerCloseGuard: (guard) => {\n closeGuards.add(guard);\n\n return () => closeGuards.delete(guard);\n },\n updatePositionStrategy: () => undefined,\n afterOpened: () => afterOpened$.asObservable(),\n beforeClosed: () => mapResult(beforeClosed$),\n beforeClosedEvent: () => beforeClosed$.asObservable(),\n afterClosed: () => mapResult(afterClosed$),\n afterClosedEvent: () => afterClosed$.asObservable(),\n backdropClick: () => backdropClick$.asObservable(),\n emitBackdropClick: (event = new MouseEvent('click')) => backdropClick$.next(event),\n closeCalls,\n isClosed: closed.asReadonly(),\n };\n};\n\n/** Provides `ref` (a fresh {@link createTestOverlayRef} by default) as `OVERLAY_REF`, so `definition.injectRef()` resolves it. */\nexport const provideTestOverlayRef = <TResult = unknown>(\n ref: TestOverlayRef<object, TResult> = createTestOverlayRef<TResult>(),\n): Provider[] => [{ provide: OVERLAY_REF, useValue: ref }];\n","import { Type } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\nimport { ControlDriverOptions, createControlDriver } from './control-driver';\nimport { blurField, focusField, pointerEvent, pressKey, setInputValue, typeChars } from './driver-core';\n\nexport type FieldControlDriverOptions = ControlDriverOptions & {\n /** Matches the editable field, when it is not the host's only `input`. */\n fieldSelector?: string;\n};\n\n/**\n * The plumbing every text-field form control driver needs: the host component, the directive, the\n * native field, and the value / focus / key events a user produces on it.\n */\nexport const createFieldControlDriver = <T, D>(\n fixture: ComponentFixture<T>,\n directiveType: Type<D>,\n { fieldSelector = 'input', ...controlOptions }: FieldControlDriverOptions = {},\n) => {\n const base = createControlDriver(fixture, directiveType, controlOptions);\n\n const field = () => base.query<HTMLInputElement>(fieldSelector)!;\n\n return {\n ...base,\n\n field,\n fieldValue: () => field().value,\n placeholder: () => field().placeholder,\n\n type: (text: string) => setInputValue(field(), text),\n /** Types one character at a time - what a keyboard produces, unlike `type`'s single event. */\n typeChars: (text: string) => typeChars(field(), text),\n typeAndBlur: (text: string) => {\n setInputValue(field(), text);\n blurField(field());\n },\n focus: () => focusField(field()),\n blur: () => blurField(field()),\n\n press: (key: string, init: KeyboardEventInit = {}) => pressKey(field(), key, init),\n pointer: pointerEvent,\n };\n};\n\nexport type FieldControlDriver<T, D> = ReturnType<typeof createFieldControlDriver<T, D>>;\n","import { ComponentFixture } from '@angular/core/testing';\nimport { pasteInto, pointerEnter, pressKey, setInputValue, textOf, tick } from './driver-core';\nimport { ControlDriverOptions } from './control-driver';\nimport { createOverlayControlDriver } from './overlay-control-driver';\nimport { SelectDirective } from '@ethlete/components';\n\nexport const createSelectDriver = <T>(fixture: ComponentFixture<T>, controlOptions: ControlDriverOptions = {}) => {\n const base = createOverlayControlDriver(fixture, SelectDirective, {\n triggerSelector: '[etselecttrigger], [role=\"combobox\"]',\n hide: (select) => select.hide(),\n ...controlOptions,\n });\n\n // a trigger-inline search renders in the fixture, a panel-hosted one in the pane\n const searchInput = () =>\n (base.query<HTMLInputElement>('input[etselectsearch]') ?? base.paneEl<HTMLInputElement>('input[etselectsearch]'))!;\n\n const options = () => base.paneEls('[role=\"option\"]');\n const visibleOptions = () => base.paneEls('[role=\"option\"]:not([data-filtered])');\n const activeOption = () => base.paneEl('[role=\"option\"][data-active]');\n const optionByLabel = (label: string) => visibleOptions().find((option) => textOf(option) === label) ?? null;\n const chips = () => base.queryAll('et-chip');\n const chipRemoveButton = (index: number) => chips()[index]!.querySelector<HTMLElement>('.et-chip-remove-button');\n const optionGroups = () => base.paneEls('[role=\"group\"]');\n const virtualBody = () => base.paneEl('.et-select-virtual-options')!;\n\n return {\n ...base,\n select: base.control,\n\n searchInput,\n valueEl: () => base.query('.et-select-value'),\n valueText: () => textOf(base.query('.et-select-value')),\n chips,\n chipLabels: () => chips().map(textOf),\n chipRemoveButton,\n\n listbox: () => base.paneEl('[role=\"listbox\"]'),\n paneText: () => textOf(base.pane()),\n options,\n visibleOptions,\n activeOption,\n activeLabel: () => textOf(activeOption()),\n optionLabels: () => options().map(textOf),\n visibleLabels: () => visibleOptions().map(textOf),\n optionByLabel,\n\n optionGroups,\n groupsHidden: () => optionGroups().map((group) => group.hasAttribute('hidden')),\n groupOptionCounts: () => optionGroups().map((group) => group.querySelectorAll('[role=\"option\"]').length),\n groupLabel: (index: number) => {\n const labelledBy = optionGroups()[index]?.getAttribute('aria-labelledby');\n\n return labelledBy ? textOf(base.paneEl(`#${labelledBy}`)) : null;\n },\n\n virtualPadding: () => ({\n start: parseFloat(virtualBody().style.paddingBlockStart),\n end: parseFloat(virtualBody().style.paddingBlockEnd),\n }),\n\n clickOption: (index: number) => {\n options()[index]!.click();\n tick();\n },\n clickOptionByLabel: (label: string) => {\n optionByLabel(label)!.click();\n tick();\n },\n removeChip: (index: number) => {\n chipRemoveButton(index)!.click();\n tick();\n },\n hover: (element: HTMLElement) => pointerEnter(element),\n type: (text: string) => setInputValue(searchInput(), text),\n pressInSearch: (key: string) => pressKey(searchInput(), key),\n paste: (text: string) => pasteInto(searchInput(), text),\n };\n};\n\nexport type SelectDriver<T> = ReturnType<typeof createSelectDriver<T>>;\n","import { ComponentFixture } from '@angular/core/testing';\nimport { ControlDriverOptions, createControlDriver } from './control-driver';\nimport { pressKey } from './driver-core';\nimport { TabBarDirective } from '@ethlete/components';\n\nexport type TabBarDriverOptions = ControlDriverOptions & {\n /** Matches every trigger inside the bar. Defaults to the role every `TabBarTriggerDirective` host carries. */\n triggerSelector?: string;\n};\n\n/**\n * Wraps a mounted `[etTabBar]` host with the roving-tabindex vocabulary its keyboard model needs:\n * which trigger is currently the tab stop, and dispatching a key from wherever focus actually is.\n */\nexport const createTabBarDriver = <T>(fixture: ComponentFixture<T>, options: TabBarDriverOptions = {}) => {\n const { triggerSelector = '[role=\"tab\"]', ...controlOptions } = options;\n const base = createControlDriver(fixture, TabBarDirective, controlOptions);\n\n const triggers = () => base.queryAll<HTMLButtonElement>(triggerSelector);\n\n const trigger = (index: number) => {\n const el = triggers()[index];\n\n if (!el) throw new Error(`No tab trigger at index ${index}`);\n\n return el;\n };\n\n /** The trigger the roving-tabindex model made the tab stop - `tabindex=\"0\"` among the bar's triggers. */\n const tabbableTrigger = () => triggers().find((el) => el.getAttribute('tabindex') === '0') ?? null;\n\n const focusTabbable = () => {\n const el = tabbableTrigger();\n\n if (!el) throw new Error('No tabbable trigger - the roving-tabindex lookup found nothing');\n\n el.focus();\n base.tick();\n };\n\n /** Dispatches `key` from wherever focus currently is, falling back to the roving tab stop. */\n const press = (key: string, init?: KeyboardEventInit) => {\n const target = (document.activeElement as HTMLElement | null) ?? tabbableTrigger();\n\n if (!target) throw new Error('No focused trigger to dispatch the keydown on');\n\n return pressKey(target, key, init);\n };\n\n return {\n ...base,\n triggers,\n trigger,\n tabbableTrigger,\n focusTabbable,\n press,\n focusedIndex: () => base.control.focusedIndex(),\n selectedIndex: () => base.control.selectedIndex(),\n };\n};\n","class ResizeObserverFake {\n constructor(callback: ResizeObserverCallback) {\n void callback;\n }\n\n observe() {\n return undefined;\n }\n\n unobserve() {\n return undefined;\n }\n\n disconnect() {\n return undefined;\n }\n}\n\nclass IntersectionObserverFake {\n public readonly root = null;\n public readonly rootMargin = '';\n public readonly thresholds: number[] = [];\n\n constructor(callback: IntersectionObserverCallback) {\n void callback;\n }\n\n observe() {\n return undefined;\n }\n\n unobserve() {\n return undefined;\n }\n\n disconnect() {\n return undefined;\n }\n\n takeRecords(): IntersectionObserverEntry[] {\n return [];\n }\n}\n\nclass AnimationFake extends EventTarget {\n public finished: Promise<AnimationFake>;\n public currentTime: number | null = 0;\n public playState = 'finished';\n public onfinish: (() => void) | null = null;\n public oncancel: (() => void) | null = null;\n\n // An animation settles once: without the latch a `cancel()` before the queued auto-finish would fire\n // `oncancel` and then `onfinish`. It is set before notifying, so a handler that re-enters\n // `cancel()`/`finish()` is a no-op.\n private settled = false;\n\n constructor() {\n super();\n this.finished = Promise.resolve(this);\n queueMicrotask(() => this.finish());\n }\n\n cancel() {\n if (this.settled) return;\n this.settled = true;\n this.playState = 'idle';\n this.dispatchEvent(new Event('cancel'));\n this.oncancel?.();\n }\n\n finish() {\n if (this.settled) return;\n this.settled = true;\n this.playState = 'finished';\n this.dispatchEvent(new Event('finish'));\n this.onfinish?.();\n }\n\n play() {\n return undefined;\n }\n\n pause() {\n return undefined;\n }\n\n reverse() {\n return undefined;\n }\n\n commitStyles() {\n return undefined;\n }\n}\n\nconst fakeMediaQueryList = (query: string): MediaQueryList => ({\n matches: false,\n media: query,\n onchange: null,\n addListener: () => undefined,\n removeListener: () => undefined,\n addEventListener: () => undefined,\n removeEventListener: () => undefined,\n dispatchEvent: () => false,\n});\n\nconst defineMissing = (target: object, key: string, value: unknown) => {\n if (Reflect.get(target, key)) return;\n\n Object.defineProperty(target, key, { configurable: true, value, writable: true });\n};\n\n/**\n * Installs the browser APIs jsdom lacks and `@ethlete/components` needs to render: `ResizeObserver`,\n * `IntersectionObserver`, `matchMedia`, `Element.prototype.animate` and `Element.prototype.scroll`. Call it once in a test setup file;\n * an API that already exists is left alone. The fakes never report: observers never fire, no media query\n * matches, and an animation finishes on the next microtask.\n */\nexport const setupComponentsTestEnvironment = () => {\n defineMissing(globalThis, 'ResizeObserver', ResizeObserverFake);\n defineMissing(globalThis, 'IntersectionObserver', IntersectionObserverFake);\n defineMissing(globalThis, 'matchMedia', fakeMediaQueryList);\n defineMissing(Element.prototype, 'animate', () => new AnimationFake() as unknown as Animation);\n defineMissing(Element.prototype, 'scroll', () => undefined);\n};\n"],"mappings":";;;;AAGA,MAAa,aAAa,QAAQ,OAAO,cAAc,CAAC,CAAC,KAAI;AAE7D,MAAa,oBACX,IAAI,SAAe,YAAY,4BAA4B,4BAA4B,QAAO,CAAE,CAAC,CAAC;AAEpG,MAAa,sBACX,SAAS,iBAAiB,2BAA2B,CAAC,CAAC,SAAS,UAAU,MAAM,OAAM,CAAE;AAS1F,MAAa,mBACX,MAAM,KAAK,SAAS,iBAA8B,0BAA0B,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK;AAE3F,MAAa,iBAAoB,SAAoC,SACnE,QAAQ,aAAa,SAAS,EAAG,CAAC,SAAS,IAAI,IAAI;AAErD,MAAa,eAAkB,SAAoC,MAAe,aAAoB;CACpG,MAAM,OAAO,QAAQ,aAAa,OAC/B,cAAe,UAAU,eAAkC,UAAU,QAAQ,KAAK,KAAK;CAG1F,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,sCAAsC,SAAQ,EAAG;CAE5E,OAAO,KAAK,SAAS,IAAI,IAAI;AAC/B;AAEA,MAAa,eAAe,YAC1B,QAAQ,aAAa,SAAS,EAAG,CAAC;AAOpC,MAAa,YAA6C,SAAoC,a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