{"version":3,"file":"core-testing.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/core/testing/breakpoint-observer.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/core/testing/event-objects.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/core/testing/dispatch-events.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/core/testing/element-focus.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/core/testing/mock-ng-zone.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/core/testing/month-constants.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/core/testing/type-in-element.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/core/testing/variant.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/angular/core/testing/wrapped-error-message.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nexport class FakeMediaQueryList {\n  /** The callback for change events. */\n  private _listeners: ((mql: MediaQueryListEvent) => void)[] = [];\n\n  constructor(\n    public matches: boolean,\n    public media: string,\n  ) {}\n\n  /** Toggles the matches state and \"emits\" a change event. */\n  setMatches(matches: boolean) {\n    this.matches = matches;\n\n    /** Simulate an asynchronous task. */\n    setTimeout(() => {\n      this._listeners.forEach((listener) => listener(this as any));\n    });\n  }\n\n  /** Registers a callback method for change events. */\n  addListener(callback: (mql: MediaQueryListEvent) => void) {\n    this._listeners.push(callback);\n  }\n\n  /** Removes a callback method from the change events. */\n  removeListener(callback: (mql: MediaQueryListEvent) => void) {\n    const index = this._listeners.indexOf(callback);\n\n    if (index > -1) {\n      this._listeners.splice(index, 1);\n    }\n  }\n}\n\n@Injectable()\nexport class FakeMediaMatcher {\n  defaultMatches: boolean = true;\n\n  /** A map of match media queries. */\n  private _queries = new Map<string, FakeMediaQueryList>();\n\n  /** The number of distinct queries created in the media matcher during a test. */\n  get queryCount(): number {\n    return this._queries.size;\n  }\n\n  /** Fakes the match media response to be controlled in tests. */\n  matchMedia(query: string): FakeMediaQueryList {\n    const mql = new FakeMediaQueryList(this.defaultMatches, query);\n    this._queries.set(query, mql);\n    return mql;\n  }\n\n  /** Clears all queries from the map of queries. */\n  clear() {\n    this._queries.clear();\n  }\n\n  /** Toggles the matching state of the provided query. */\n  setMatchesQuery(query: string, matches: boolean) {\n    if (this._queries.has(query)) {\n      this._queries.get(query)!.setMatches(matches);\n    } else {\n      throw Error('This query is not being observed.');\n    }\n  }\n}\n","import { ModifierKeys } from '@angular/cdk/testing';\n\n/** Used to generate unique IDs for events. */\nlet uniqueIds = 0;\n\n/**\n * Creates a browser MouseEvent with the specified options.\n * @docs-private\n */\nexport function createMouseEvent(\n  type: string,\n  clientX = 0,\n  clientY = 0,\n  offsetX = 0,\n  offsetY = 0,\n  button = 0,\n  modifiers: ModifierKeys = {},\n) {\n  // Note: We cannot determine the position of the mouse event based on the screen\n  // because the dimensions and position of the browser window are not available\n  // To provide reasonable `screenX` and `screenY` coordinates, we simply use the\n  // client coordinates as if the browser is opened in fullscreen.\n  const screenX = clientX;\n  const screenY = clientY;\n\n  const event = new MouseEvent(type, {\n    bubbles: true,\n    cancelable: true,\n    composed: true, // Required for shadow DOM events.\n    view: window,\n    detail: 1,\n    relatedTarget: null,\n    screenX,\n    screenY,\n    clientX,\n    clientY,\n    ctrlKey: modifiers.control,\n    altKey: modifiers.alt,\n    shiftKey: modifiers.shift,\n    metaKey: modifiers.meta,\n    button: button,\n    buttons: 1,\n  });\n\n  // The `MouseEvent` constructor doesn't allow us to pass these properties into the constructor.\n  // Override them to `1`, because they're used for fake screen reader event detection.\n  if (offsetX != null) {\n    defineReadonlyEventProperty(event, 'offsetX', offsetX);\n  }\n\n  if (offsetY != null) {\n    defineReadonlyEventProperty(event, 'offsetY', offsetY);\n  }\n\n  return event;\n}\n\n/**\n * Creates a browser `PointerEvent` with the specified options. Pointer events\n * by default will appear as if they are the primary pointer of their type.\n * https://www.w3.org/TR/pointerevents2/#dom-pointerevent-isprimary.\n *\n * For example, if pointer events for a multi-touch interaction are created, the non-primary\n * pointer touches would need to be represented by non-primary pointer events.\n *\n * @docs-private\n */\nexport function createPointerEvent(\n  type: string,\n  clientX = 0,\n  clientY = 0,\n  offsetX?: number,\n  offsetY?: number,\n  options: PointerEventInit = { isPrimary: true },\n) {\n  const event = new PointerEvent(type, {\n    bubbles: true,\n    cancelable: true,\n    composed: true, // Required for shadow DOM events.\n    view: window,\n    clientX,\n    clientY,\n    ...options,\n  });\n\n  if (offsetX != null) {\n    defineReadonlyEventProperty(event, 'offsetX', offsetX);\n  }\n\n  if (offsetY != null) {\n    defineReadonlyEventProperty(event, 'offsetY', offsetY);\n  }\n\n  return event;\n}\n\n/**\n * Creates a browser TouchEvent with the specified pointer coordinates.\n * @docs-private\n */\nexport function createTouchEvent(type: string, pageX = 0, pageY = 0, clientX = 0, clientY = 0) {\n  // We cannot use the `TouchEvent` or `Touch` because Firefox and Safari lack support.\n  // TODO: Switch to the constructor API when it is available for Firefox and Safari.\n  const event = document.createEvent('UIEvent');\n  const touchDetails = { pageX, pageY, clientX, clientY, identifier: uniqueIds++ };\n\n  // TS3.6 removes the initUIEvent method and suggests porting to \"new UIEvent()\".\n  (event as any).initUIEvent(type, true, true, window, 0);\n\n  // Most of the browsers don't have a \"initTouchEvent\" method that can be used to define\n  // the touch details.\n  defineReadonlyEventProperty(event, 'touches', [touchDetails]);\n  defineReadonlyEventProperty(event, 'targetTouches', [touchDetails]);\n  defineReadonlyEventProperty(event, 'changedTouches', [touchDetails]);\n\n  return event;\n}\n\n/**\n * Creates a keyboard event with the specified key and modifiers.\n * @docs-private\n */\nexport function createKeyboardEvent(\n  type: string,\n  keyCode: number = 0,\n  key: string = '',\n  modifiers: ModifierKeys = {},\n) {\n  return new KeyboardEvent(type, {\n    bubbles: true,\n    cancelable: true,\n    composed: true, // Required for shadow DOM events.\n    view: window,\n    keyCode: keyCode,\n    key: key,\n    shiftKey: modifiers.shift,\n    metaKey: modifiers.meta,\n    altKey: modifiers.alt,\n    ctrlKey: modifiers.control,\n  });\n}\n\n/**\n * Creates a fake event object with any desired event type.\n * @docs-private\n */\nexport function createFakeEvent(type: string, bubbles = false, cancelable = true, composed = true) {\n  return new Event(type, { bubbles, cancelable, composed });\n}\n\n/**\n * Defines a readonly property on the given event object. Readonly properties on an event object\n * are always set as configurable as that matches default readonly properties for DOM event objects.\n */\nfunction defineReadonlyEventProperty(event: Event, propertyName: string, value: any) {\n  Object.defineProperty(event, propertyName, { get: () => value, configurable: true });\n}\n","import { ModifierKeys } from '@angular/cdk/testing';\n\nimport {\n  createFakeEvent,\n  createKeyboardEvent,\n  createMouseEvent,\n  createPointerEvent,\n  createTouchEvent,\n} from './event-objects';\n\n/**\n * Utility to dispatch any event on a Node.\n * @docs-private\n */\nexport function dispatchEvent<T extends Event>(node: Node | Window, event: T): T {\n  node.dispatchEvent(event);\n  return event;\n}\n\n/**\n * Shorthand to dispatch a fake event on a specified node.\n * @docs-private\n */\nexport function dispatchFakeEvent(node: Node | Window, type: string, bubbles?: boolean): Event {\n  return dispatchEvent(node, createFakeEvent(type, bubbles));\n}\n\n/**\n * Shorthand to dispatch a keyboard event with a specified key code and\n * optional modifiers.\n * @docs-private\n */\nexport function dispatchKeyboardEvent(\n  node: Node,\n  type: string,\n  keyCode?: number,\n  key?: string,\n  modifiers?: ModifierKeys,\n): KeyboardEvent {\n  return dispatchEvent(node, createKeyboardEvent(type, keyCode, key, modifiers));\n}\n\n/**\n * Shorthand to dispatch a mouse event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchMouseEvent(\n  node: Node,\n  type: string,\n  clientX = 0,\n  clientY = 0,\n  offsetX?: number,\n  offsetY?: number,\n  button?: number,\n  modifiers?: ModifierKeys,\n): MouseEvent {\n  return dispatchEvent(\n    node,\n    createMouseEvent(type, clientX, clientY, offsetX, offsetY, button, modifiers),\n  );\n}\n\n/**\n * Shorthand to dispatch a pointer event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchPointerEvent(\n  node: Node,\n  type: string,\n  clientX = 0,\n  clientY = 0,\n  offsetX?: number,\n  offsetY?: number,\n  options?: PointerEventInit,\n): PointerEvent {\n  return dispatchEvent(\n    node,\n    createPointerEvent(type, clientX, clientY, offsetX, offsetY, options),\n  ) as PointerEvent;\n}\n\n/**\n * Shorthand to dispatch a touch event on the specified coordinates.\n * @docs-private\n */\nexport function dispatchTouchEvent(\n  node: Node,\n  type: string,\n  pageX = 0,\n  pageY = 0,\n  clientX = 0,\n  clientY = 0,\n) {\n  return dispatchEvent(node, createTouchEvent(type, pageX, pageY, clientX, clientY));\n}\n","import { dispatchFakeEvent } from './dispatch-events';\n\nfunction triggerFocusChange(element: HTMLElement, event: 'focus' | 'blur') {\n  let eventFired = false;\n  const handler = () => (eventFired = true);\n  element.addEventListener(event, handler);\n  element[event]();\n  element.removeEventListener(event, handler);\n  if (!eventFired) {\n    dispatchFakeEvent(element, event);\n  }\n}\n\n/**\n * Patches an elements focus and blur methods to emit events consistently and predictably.\n * This is necessary, because some browsers can call the focus handlers asynchronously,\n * while others won't fire them at all if the browser window is not focused.\n * @docs-private\n */\n// TODO: Check if this element focus patching is still needed for local testing,\n// where browser is not necessarily focused.\nexport function patchElementFocus(element: HTMLElement) {\n  element.focus = () => dispatchFakeEvent(element, 'focus');\n  element.blur = () => dispatchFakeEvent(element, 'blur');\n}\n\n/** @docs-private */\nexport function triggerFocus(element: HTMLElement) {\n  triggerFocusChange(element, 'focus');\n}\n\n/** @docs-private */\nexport function triggerBlur(element: HTMLElement) {\n  triggerFocusChange(element, 'blur');\n}\n","import { EventEmitter, Injectable, NgZone } from '@angular/core';\n\n/**\n * Mock synchronous NgZone implementation that can be used\n * to flush out `onStable` subscriptions in tests.\n */\n@Injectable()\nexport class MockNgZone extends NgZone {\n  override onStable: EventEmitter<any> = new EventEmitter(false);\n\n  constructor() {\n    super({ enableLongStackTrace: false });\n  }\n\n  override run(fn: Function): any {\n    return fn();\n  }\n\n  override runOutsideAngular(fn: Function): any {\n    return fn();\n  }\n\n  simulateZoneExit(): void {\n    this.onStable.emit(null);\n  }\n}\n","/**\n * When constructing a Date, the month is zero-based. This can be confusing, since people are\n * used to seeing them one-based. So we create these aliases to make writing the tests easier.\n * @docs-private\n */\nexport const JAN = 0,\n  FEB = 1,\n  MAR = 2,\n  APR = 3,\n  MAY = 4,\n  JUN = 5,\n  JUL = 6,\n  AUG = 7,\n  SEP = 8,\n  OCT = 9,\n  NOV = 10,\n  DEC = 11;\n","import { PERIOD } from '@angular/cdk/keycodes';\nimport { getNoKeysSpecifiedError, ModifierKeys } from '@angular/cdk/testing';\n\nimport { dispatchFakeEvent, dispatchKeyboardEvent } from './dispatch-events';\nimport { triggerFocus } from './element-focus';\n\n/** Input types for which the value can be entered incrementally. */\nconst incrementalInputTypes = new Set([\n  'text',\n  'email',\n  'hidden',\n  'password',\n  'search',\n  'tel',\n  'url',\n]);\n\n/**\n * Checks whether the given Element is a text input element.\n * @docs-private\n */\nexport function isTextInput(element: Element): element is HTMLInputElement | HTMLTextAreaElement {\n  const nodeName = element.nodeName.toLowerCase();\n  return nodeName === 'input' || nodeName === 'textarea';\n}\n\n/**\n * If keys have been specified, focuses an input, sets its value and dispatches\n * the `input` event, simulating the user typing.\n * @param element Element onto which to set the value.\n * @param keys The keys to send to the element.\n * @docs-private\n */\nexport function typeInElement(\n  element: HTMLElement,\n  ...keys: (string | { keyCode?: number; key?: string })[]\n): void;\n\n/**\n * If keys have been specified, focuses an input, sets its value and dispatches\n * the `input` event, simulating the user typing.\n * @param element Element onto which to set the value.\n * @param modifiers Modifier keys that are held while typing.\n * @param keys The keys to send to the element.\n * @docs-private\n */\nexport function typeInElement(\n  element: HTMLElement,\n  modifiers: ModifierKeys,\n  ...keys: (string | { keyCode?: number; key?: string })[]\n): void;\n\nexport function typeInElement(element: HTMLElement, ...modifiersAndKeys: any[]) {\n  const first = modifiersAndKeys[0];\n  let modifiers: ModifierKeys;\n  let rest: (string | { keyCode?: number; key?: string })[];\n  if (\n    first !== undefined &&\n    typeof first !== 'string' &&\n    first.keyCode === undefined &&\n    first.key === undefined\n  ) {\n    modifiers = first;\n    rest = modifiersAndKeys.slice(1);\n  } else {\n    modifiers = {};\n    rest = modifiersAndKeys;\n  }\n  const isInput = isTextInput(element);\n  const inputType = element.getAttribute('type') || 'text';\n  const keys: { keyCode?: number; key?: string }[] = rest\n    .map((k) =>\n      typeof k === 'string'\n        ? k.split('').map((c) => ({ keyCode: c.toUpperCase().charCodeAt(0), key: c }))\n        : [k],\n    )\n    .reduce((arr, k) => arr.concat(k), []);\n\n  // Throw an error if no keys have been specified. Calling this function with no\n  // keys should not result in a focus event being dispatched unexpectedly.\n  if (keys.length === 0) {\n    throw getNoKeysSpecifiedError();\n  }\n\n  // We simulate the user typing in a value by incrementally assigning the value below. The problem\n  // is that for some input types, the browser won't allow for an invalid value to be set via the\n  // `value` property which will always be the case when going character-by-character. If we detect\n  // such an input, we have to set the value all at once or listeners to the `input` event (e.g.\n  // the `ReactiveFormsModule` uses such an approach) won't receive the correct value.\n  const enterValueIncrementally =\n    inputType === 'number'\n      ? // The value can be set character by character in number inputs if it doesn't have any decimals.\n        keys.every((key) => key.key !== '.' && key.key !== '-' && key.keyCode !== PERIOD)\n      : incrementalInputTypes.has(inputType);\n\n  triggerFocus(element);\n\n  // When we aren't entering the value incrementally, assign it all at once ahead\n  // of time so that any listeners to the key events below will have access to it.\n  if (!enterValueIncrementally) {\n    (element as HTMLInputElement).value = keys.reduce((value, key) => value + (key.key || ''), '');\n  }\n\n  for (const key of keys) {\n    dispatchKeyboardEvent(element, 'keydown', key.keyCode, key.key, modifiers);\n    dispatchKeyboardEvent(element, 'keypress', key.keyCode, key.key, modifiers);\n    if (isInput && key.key && key.key.length === 1 && enterValueIncrementally) {\n      (element as HTMLInputElement | HTMLTextAreaElement).value += key.key;\n      dispatchFakeEvent(element, 'input');\n    }\n    dispatchKeyboardEvent(element, 'keyup', key.keyCode, key.key, modifiers);\n  }\n\n  // Since we weren't dispatching `input` events while sending the keys, we have to do it now.\n  if (!enterValueIncrementally) {\n    dispatchFakeEvent(element, 'input');\n  }\n}\n\n/**\n * Clears the text in an input or textarea element.\n * @docs-private\n */\nexport function clearElement(element: HTMLInputElement | HTMLTextAreaElement) {\n  triggerFocus(element as HTMLElement);\n  element.value = '';\n  dispatchFakeEvent(element, 'input');\n}\n","import { ComponentFixture } from '@angular/core/testing';\nimport { ɵvariant } from '@sbb-esta/angular/core';\n\ndeclare function beforeEach(action: () => void): void;\ndeclare function afterEach(action: () => void): void;\n\nexport function switchToLean(fixture?: ComponentFixture<any>) {\n  beforeEach(() => {\n    document.documentElement.classList.add('sbb-lean');\n    ɵvariant.next('lean');\n    if (fixture) {\n      fixture.detectChanges();\n    }\n  });\n\n  afterEach(() => {\n    document.documentElement.classList.remove('sbb-lean');\n    ɵvariant.next('standard');\n    if (fixture) {\n      fixture.detectChanges();\n    }\n  });\n}\n","/**\n * Gets a RegExp used to detect an angular wrapped error message.\n * See https://github.com/angular/angular/issues/8348\n */\nexport function wrappedErrorMessage(e: Error) {\n  const escapedMessage = e.message.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n  return new RegExp(escapedMessage);\n}\n"],"names":["FakeMediaQueryList","matches","media","_listeners","constructor","setMatches","setTimeout","forEach","listener","addListener","callback","push","removeListener","index","indexOf","splice","FakeMediaMatcher","defaultMatches","_queries","Map","queryCount","size","matchMedia","query","mql","set","clear","setMatchesQuery","has","get","Error","deps","target","i0","ɵɵFactoryTarget","Injectable","decorators","uniqueIds","createMouseEvent","type","clientX","clientY","offsetX","offsetY","button","modifiers","screenX","screenY","event","MouseEvent","bubbles","cancelable","composed","view","window","detail","relatedTarget","ctrlKey","control","altKey","alt","shiftKey","shift","metaKey","meta","buttons","defineReadonlyEventProperty","createPointerEvent","options","isPrimary","PointerEvent","createTouchEvent","pageX","pageY","document","createEvent","touchDetails","identifier","initUIEvent","createKeyboardEvent","keyCode","key","KeyboardEvent","createFakeEvent","Event","propertyName","value","Object","defineProperty","configurable","dispatchEvent","node","dispatchFakeEvent","dispatchKeyboardEvent","dispatchMouseEvent","dispatchPointerEvent","dispatchTouchEvent","triggerFocusChange","element","eventFired","handler","addEventListener","removeEventListener","patchElementFocus","focus","blur","triggerFocus","triggerBlur","MockNgZone","NgZone","onStable","EventEmitter","enableLongStackTrace","run","fn","runOutsideAngular","simulateZoneExit","emit","JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC","incrementalInputTypes","Set","isTextInput","nodeName","toLowerCase","typeInElement","modifiersAndKeys","first","rest","undefined","slice","isInput","inputType","getAttribute","keys","map","k","split","c","toUpperCase","charCodeAt","reduce","arr","concat","length","getNoKeysSpecifiedError","enterValueIncrementally","every","PERIOD","clearElement","switchToLean","fixture","beforeEach","documentElement","classList","add","ɵvariant","next","detectChanges","afterEach","remove","wrappedErrorMessage","e","escapedMessage","message","replace","RegExp"],"mappings":";;;;;;MAEaA,kBAAkB,CAAA;EAKpBC,OAAA;EACAC,KAAA;AAJDC,EAAAA,UAAU,GAA2C,EAAE;AAE/DC,EAAAA,WACSA,CAAAH,OAAgB,EAChBC,KAAa,EAAA;IADb,IAAO,CAAAD,OAAA,GAAPA,OAAO;IACP,IAAK,CAAAC,KAAA,GAALA,KAAK;AACX;EAGHG,UAAUA,CAACJ,OAAgB,EAAA;IACzB,IAAI,CAACA,OAAO,GAAGA,OAAO;AAGtBK,IAAAA,UAAU,CAAC,MAAK;MACd,IAAI,CAACH,UAAU,CAACI,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAAC,IAAW,CAAC,CAAC;AAC9D,KAAC,CAAC;AACJ;EAGAC,WAAWA,CAACC,QAA4C,EAAA;AACtD,IAAA,IAAI,CAACP,UAAU,CAACQ,IAAI,CAACD,QAAQ,CAAC;AAChC;EAGAE,cAAcA,CAACF,QAA4C,EAAA;IACzD,MAAMG,KAAK,GAAG,IAAI,CAACV,UAAU,CAACW,OA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