{"version":3,"file":"date-picker.bundle.mjs","sources":["../../../../node_modules/govuk-frontend/dist/govuk/common/index.mjs","../../../../node_modules/govuk-frontend/dist/govuk/errors/index.mjs","../../../../node_modules/govuk-frontend/dist/govuk/component.mjs","../../../../node_modules/govuk-frontend/dist/govuk/common/configuration.mjs","../../../../src/moj/components/date-picker/date-picker.mjs"],"sourcesContent":["function getBreakpoint(name) {\n  const property = `--govuk-breakpoint-${name}`;\n  const value = window.getComputedStyle(document.documentElement).getPropertyValue(property);\n  return {\n    property,\n    value: value || undefined\n  };\n}\nfunction setFocus($element, options = {}) {\n  var _options$onBeforeFocu;\n  const isFocusable = $element.getAttribute('tabindex');\n  if (!isFocusable) {\n    $element.setAttribute('tabindex', '-1');\n  }\n  function onFocus() {\n    $element.addEventListener('blur', onBlur, {\n      once: true\n    });\n  }\n  function onBlur() {\n    var _options$onBlur;\n    (_options$onBlur = options.onBlur) == null || _options$onBlur.call($element);\n    if (!isFocusable) {\n      $element.removeAttribute('tabindex');\n    }\n  }\n  $element.addEventListener('focus', onFocus, {\n    once: true\n  });\n  (_options$onBeforeFocu = options.onBeforeFocus) == null || _options$onBeforeFocu.call($element);\n  $element.focus();\n}\nfunction isInitialised($root, moduleName) {\n  return $root instanceof HTMLElement && $root.hasAttribute(`data-${moduleName}-init`);\n}\n\n/**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * Some browsers will load and run our JavaScript but GOV.UK Frontend\n * won't be supported.\n *\n * @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support\n * @returns {boolean} Whether GOV.UK Frontend is supported on this page\n */\nfunction isSupported($scope = document.body) {\n  if (!$scope) {\n    return false;\n  }\n  return $scope.classList.contains('govuk-frontend-supported');\n}\nfunction isArray(option) {\n  return Array.isArray(option);\n}\nfunction isObject(option) {\n  return !!option && typeof option === 'object' && !isArray(option);\n}\nfunction isScope($scope) {\n  return !!$scope && ($scope instanceof Element || $scope instanceof Document);\n}\nfunction formatErrorMessage(Component, message) {\n  return `${Component.moduleName}: ${message}`;\n}\n/**\n * @typedef ComponentWithModuleName\n * @property {string} moduleName - Name of the component\n */\n\nexport { formatErrorMessage, getBreakpoint, isInitialised, isObject, isScope, isSupported, setFocus };\n//# sourceMappingURL=index.mjs.map\n","import { isObject, formatErrorMessage } from '../common/index.mjs';\n\nclass GOVUKFrontendError extends Error {\n  constructor(...args) {\n    super(...args);\n    this.name = 'GOVUKFrontendError';\n  }\n}\nclass SupportError extends GOVUKFrontendError {\n  /**\n   * Checks if GOV.UK Frontend is supported on this page\n   *\n   * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support\n   */\n  constructor($scope = document.body) {\n    const supportMessage = 'noModule' in HTMLScriptElement.prototype ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet' : 'GOV.UK Frontend is not supported in this browser';\n    super($scope ? supportMessage : 'GOV.UK Frontend initialised without `<script type=\"module\">`');\n    this.name = 'SupportError';\n  }\n}\nclass ConfigError extends GOVUKFrontendError {\n  constructor(...args) {\n    super(...args);\n    this.name = 'ConfigError';\n  }\n}\nclass ElementError extends GOVUKFrontendError {\n  constructor(messageOrOptions) {\n    let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';\n    if (isObject(messageOrOptions)) {\n      const {\n        component,\n        identifier,\n        element,\n        expectedType\n      } = messageOrOptions;\n      message = identifier;\n      message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';\n      if (component) {\n        message = formatErrorMessage(component, message);\n      }\n    }\n    super(message);\n    this.name = 'ElementError';\n  }\n}\nclass InitError extends GOVUKFrontendError {\n  constructor(componentOrMessage) {\n    const message = typeof componentOrMessage === 'string' ? componentOrMessage : formatErrorMessage(componentOrMessage, `Root element (\\`$root\\`) already initialised`);\n    super(message);\n    this.name = 'InitError';\n  }\n}\n/**\n * @import { ComponentWithModuleName } from '../common/index.mjs'\n */\n\nexport { ConfigError, ElementError, GOVUKFrontendError, InitError, SupportError };\n//# sourceMappingURL=index.mjs.map\n","import { isInitialised, isSupported } from './common/index.mjs';\nimport { InitError, ElementError, SupportError } from './errors/index.mjs';\n\nclass Component {\n  /**\n   * Returns the root element of the component\n   *\n   * @protected\n   * @returns {RootElementType} - the root element of component\n   */\n  get $root() {\n    return this._$root;\n  }\n  constructor($root) {\n    this._$root = void 0;\n    const childConstructor = this.constructor;\n    if (typeof childConstructor.moduleName !== 'string') {\n      throw new InitError(`\\`moduleName\\` not defined in component`);\n    }\n    if (!($root instanceof childConstructor.elementType)) {\n      throw new ElementError({\n        element: $root,\n        component: childConstructor,\n        identifier: 'Root element (`$root`)',\n        expectedType: childConstructor.elementType.name\n      });\n    } else {\n      this._$root = $root;\n    }\n    childConstructor.checkSupport();\n    this.checkInitialised();\n    const moduleName = childConstructor.moduleName;\n    this.$root.setAttribute(`data-${moduleName}-init`, '');\n  }\n  checkInitialised() {\n    const constructor = this.constructor;\n    const moduleName = constructor.moduleName;\n    if (moduleName && isInitialised(this.$root, moduleName)) {\n      throw new InitError(constructor);\n    }\n  }\n  static checkSupport() {\n    if (!isSupported()) {\n      throw new SupportError();\n    }\n  }\n}\n\n/**\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n */\n\n/**\n * @typedef {typeof Component & ChildClass} ChildClassConstructor\n */\nComponent.elementType = HTMLElement;\n\nexport { Component };\n//# sourceMappingURL=component.mjs.map\n","import { Component } from '../component.mjs';\nimport { ConfigError } from '../errors/index.mjs';\nimport { isObject, formatErrorMessage, isScope } from './index.mjs';\n\nconst configOverride = Symbol.for('configOverride');\nclass ConfigurableComponent extends Component {\n  [configOverride](param) {\n    return {};\n  }\n\n  /**\n   * Returns the root element of the component\n   *\n   * @protected\n   * @returns {ConfigurationType} - the root element of component\n   */\n  get config() {\n    return this._config;\n  }\n  constructor($root, config) {\n    super($root);\n    this._config = void 0;\n    const childConstructor = this.constructor;\n    if (!isObject(childConstructor.defaults)) {\n      throw new ConfigError(formatErrorMessage(childConstructor, 'Config passed as parameter into constructor but no defaults defined'));\n    }\n    const datasetConfig = normaliseDataset(childConstructor, this._$root.dataset);\n    this._config = mergeConfigs(childConstructor.defaults, config != null ? config : {}, this[configOverride](datasetConfig), datasetConfig);\n  }\n}\nfunction normaliseString(value, property) {\n  const trimmedValue = value ? value.trim() : '';\n  let output;\n  let outputType = property == null ? void 0 : property.type;\n  if (!outputType) {\n    if (['true', 'false'].includes(trimmedValue)) {\n      outputType = 'boolean';\n    }\n    if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n      outputType = 'number';\n    }\n  }\n  switch (outputType) {\n    case 'boolean':\n      output = trimmedValue === 'true';\n      break;\n    case 'number':\n      output = Number(trimmedValue);\n      break;\n    default:\n      output = value;\n  }\n  return output;\n}\nfunction normaliseDataset(Component, dataset) {\n  if (!isObject(Component.schema)) {\n    throw new ConfigError(formatErrorMessage(Component, 'Config passed as parameter into constructor but no schema defined'));\n  }\n  const out = {};\n  const entries = Object.entries(Component.schema.properties);\n  for (const entry of entries) {\n    const [namespace, property] = entry;\n    const field = namespace.toString();\n    if (field in dataset) {\n      out[field] = normaliseString(dataset[field], property);\n    }\n    if ((property == null ? void 0 : property.type) === 'object') {\n      out[field] = extractConfigByNamespace(Component.schema, dataset, namespace);\n    }\n  }\n  return out;\n}\nfunction normaliseOptions(scopeOrOptions) {\n  let $scope = document;\n  let onError;\n  if (isObject(scopeOrOptions)) {\n    const options = scopeOrOptions;\n    if (isScope(options.scope) || options.scope === null) {\n      $scope = options.scope;\n    }\n    if (typeof options.onError === 'function') {\n      onError = options.onError;\n    }\n  }\n  if (isScope(scopeOrOptions)) {\n    $scope = scopeOrOptions;\n  } else if (scopeOrOptions === null) {\n    $scope = null;\n  } else if (typeof scopeOrOptions === 'function') {\n    onError = scopeOrOptions;\n  }\n  return {\n    scope: $scope,\n    onError\n  };\n}\nfunction mergeConfigs(...configObjects) {\n  const formattedConfigObject = {};\n  for (const configObject of configObjects) {\n    for (const key of Object.keys(configObject)) {\n      const option = formattedConfigObject[key];\n      const override = configObject[key];\n      if (isObject(option) && isObject(override)) {\n        formattedConfigObject[key] = mergeConfigs(option, override);\n      } else {\n        formattedConfigObject[key] = override;\n      }\n    }\n  }\n  return formattedConfigObject;\n}\nfunction validateConfig(schema, config) {\n  const validationErrors = [];\n  for (const [name, conditions] of Object.entries(schema)) {\n    const errors = [];\n    if (Array.isArray(conditions)) {\n      for (const {\n        required,\n        errorMessage\n      } of conditions) {\n        if (!required.every(key => !!config[key])) {\n          errors.push(errorMessage);\n        }\n      }\n      if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n        validationErrors.push(...errors);\n      }\n    }\n  }\n  return validationErrors;\n}\nfunction extractConfigByNamespace(schema, dataset, namespace) {\n  const property = schema.properties[namespace];\n  if ((property == null ? void 0 : property.type) !== 'object') {\n    return;\n  }\n  const newObject = {\n    [namespace]: {}\n  };\n  for (const [key, value] of Object.entries(dataset)) {\n    let current = newObject;\n    const keyParts = key.split('.');\n    for (const [index, name] of keyParts.entries()) {\n      if (isObject(current)) {\n        if (index < keyParts.length - 1) {\n          if (!isObject(current[name])) {\n            current[name] = {};\n          }\n          current = current[name];\n        } else if (key !== namespace) {\n          current[name] = normaliseString(value);\n        }\n      }\n    }\n  }\n  return newObject[namespace];\n}\n/**\n * Schema for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} Schema\n * @property {Record<keyof ConfigurationType, SchemaProperty | undefined>} properties - Schema properties\n * @property {SchemaCondition<ConfigurationType>[]} [anyOf] - List of schema conditions\n */\n/**\n * Schema property for component config\n *\n * @typedef {object} SchemaProperty\n * @property {'string' | 'boolean' | 'number' | 'object'} type - Property type\n */\n/**\n * Schema condition for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} SchemaCondition\n * @property {(keyof ConfigurationType)[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n * @property {Schema<ConfigurationType>} [schema] - The schema of the component configuration\n * @property {ConfigurationType} [defaults] - The default values of the configuration of the component\n */\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>\n */\n/**\n * @import { CompatibleClass, Config, CreateAllOptions, OnErrorCallback } from '../init.mjs'\n */\n\nexport { ConfigurableComponent, configOverride, extractConfigByNamespace, mergeConfigs, normaliseDataset, normaliseOptions, normaliseString, validateConfig };\n//# sourceMappingURL=configuration.mjs.map\n","import { ConfigurableComponent } from 'govuk-frontend'\n\n/**\n * @augments {ConfigurableComponent<DatePickerConfig>}\n */\nexport class DatePicker extends ConfigurableComponent {\n  /**\n   * @param {Element | null} $root - HTML element to use for date picker\n   * @param {DatePickerConfig} [config] - Date picker config\n   */\n  constructor($root, config = {}) {\n    super($root, config)\n\n    const $input =\n      this.config.input.element ??\n      this.$root.querySelector(this.config.input.selector)\n\n    if (!$input || !($input instanceof HTMLInputElement)) {\n      return this\n    }\n\n    this.$input = $input\n\n    this.dayLabels = [\n      'Monday',\n      'Tuesday',\n      'Wednesday',\n      'Thursday',\n      'Friday',\n      'Saturday',\n      'Sunday'\n    ]\n\n    this.monthLabels = [\n      'January',\n      'February',\n      'March',\n      'April',\n      'May',\n      'June',\n      'July',\n      'August',\n      'September',\n      'October',\n      'November',\n      'December'\n    ]\n\n    this.currentDate = new Date()\n    this.currentDate.setHours(0, 0, 0, 0)\n    this.calendarDays = /** @type {DSCalendarDay[]} */ ([])\n    this.excludedDates = /** @type {Date[]} */ ([])\n    this.excludedDays = /** @type {number[]} */ ([])\n\n    this.buttonClass = 'moj-datepicker__button'\n    this.selectedDayButtonClass = 'moj-datepicker__button--selected'\n    this.currentDayButtonClass = 'moj-datepicker__button--current'\n    this.todayButtonClass = 'moj-datepicker__button--today'\n\n    this.setOptions()\n    this.initControls()\n  }\n\n  initControls() {\n    this.id = `datepicker-${this.$input.id}`\n\n    this.$dialog = this.createDialog()\n    this.createCalendarHeaders()\n\n    const $componentWrapper = document.createElement('div')\n    const $inputWrapper = document.createElement('div')\n    $componentWrapper.classList.add('moj-datepicker__wrapper')\n    $inputWrapper.classList.add('govuk-input__wrapper')\n\n    this.$input.parentElement.insertBefore($componentWrapper, this.$input)\n    $componentWrapper.appendChild($inputWrapper)\n    $inputWrapper.appendChild(this.$input)\n\n    $inputWrapper.insertAdjacentHTML('beforeend', this.toggleTemplate())\n    $componentWrapper.insertAdjacentElement('beforeend', this.$dialog)\n\n    this.$calendarButton = /** @type {HTMLButtonElement} */ (\n      this.$root.querySelector('.moj-js-datepicker-toggle')\n    )\n\n    this.$dialogTitle = /** @type {HTMLHeadingElement} */ (\n      this.$dialog.querySelector('.moj-js-datepicker-month-year')\n    )\n\n    this.createCalendar()\n\n    this.$prevMonthButton = /** @type {HTMLButtonElement} */ (\n      this.$dialog.querySelector('.moj-js-datepicker-prev-month')\n    )\n\n    this.$prevYearButton = /** @type {HTMLButtonElement} */ (\n      this.$dialog.querySelector('.moj-js-datepicker-prev-year')\n    )\n\n    this.$nextMonthButton = /** @type {HTMLButtonElement} */ (\n      this.$dialog.querySelector('.moj-js-datepicker-next-month')\n    )\n\n    this.$nextYearButton = /** @type {HTMLButtonElement} */ (\n      this.$dialog.querySelector('.moj-js-datepicker-next-year')\n    )\n\n    this.$cancelButton = /** @type {HTMLButtonElement} */ (\n      this.$dialog.querySelector('.moj-js-datepicker-cancel')\n    )\n\n    this.$okButton = /** @type {HTMLButtonElement} */ (\n      this.$dialog.querySelector('.moj-js-datepicker-ok')\n    )\n\n    // add event listeners\n    this.$prevMonthButton.addEventListener('click', (event) =>\n      this.focusPreviousMonth(event, false)\n    )\n    this.$prevYearButton.addEventListener('click', (event) =>\n      this.focusPreviousYear(event, false)\n    )\n    this.$nextMonthButton.addEventListener('click', (event) =>\n      this.focusNextMonth(event, false)\n    )\n    this.$nextYearButton.addEventListener('click', (event) =>\n      this.focusNextYear(event, false)\n    )\n    this.$cancelButton.addEventListener('click', (event) => {\n      event.preventDefault()\n      this.closeDialog()\n    })\n    this.$okButton.addEventListener('click', () => {\n      this.selectDate(this.currentDate)\n    })\n\n    const $dialogButtons = this.$dialog.querySelectorAll(\n      'button:not([disabled=\"true\"])'\n    )\n\n    this.$firstButtonInDialog = $dialogButtons[0]\n    this.$lastButtonInDialog = $dialogButtons[$dialogButtons.length - 1]\n    this.$firstButtonInDialog.addEventListener('keydown', (event) =>\n      this.firstButtonKeydown(event)\n    )\n    this.$lastButtonInDialog.addEventListener('keydown', (event) =>\n      this.lastButtonKeydown(event)\n    )\n\n    this.$calendarButton.addEventListener('click', (event) =>\n      this.toggleDialog(event)\n    )\n\n    this.$dialog.addEventListener('keydown', (event) => {\n      if (event.key === 'Escape') {\n        this.closeDialog()\n        event.preventDefault()\n        event.stopPropagation()\n      }\n    })\n\n    document.body.addEventListener('mouseup', (event) => {\n      this.backgroundClick(event)\n    })\n\n    // populates calendar with initial dates, avoids Wave errors about null buttons\n    this.updateCalendar()\n  }\n\n  createDialog() {\n    const titleId = `datepicker-title-${this.$input.id}`\n    const $dialog = document.createElement('div')\n\n    $dialog.id = this.id\n    $dialog.setAttribute('class', 'moj-datepicker__dialog')\n    $dialog.setAttribute('role', 'dialog')\n    $dialog.setAttribute('aria-modal', 'true')\n    $dialog.setAttribute('aria-labelledby', titleId)\n    $dialog.innerHTML = this.dialogTemplate(titleId)\n    $dialog.hidden = true\n\n    return $dialog\n  }\n\n  createCalendar() {\n    const $tbody = this.$dialog.querySelector('tbody')\n    let dayCount = 0\n    for (let i = 0; i < 6; i++) {\n      // create row\n      const $row = $tbody.insertRow(i)\n\n      for (let j = 0; j < 7; j++) {\n        // create cell (day)\n        const $cell = document.createElement('td')\n        $row.appendChild($cell)\n        const $dateButton = document.createElement('button')\n        $dateButton.setAttribute('type', 'button')\n        $cell.appendChild($dateButton)\n\n        const calendarDay = new DSCalendarDay($dateButton, dayCount, i, j, this)\n        this.calendarDays.push(calendarDay)\n        dayCount++\n      }\n    }\n  }\n\n  toggleTemplate() {\n    return `<button class=\"moj-datepicker__toggle moj-js-datepicker-toggle\" type=\"button\" aria-haspopup=\"dialog\" aria-controls=\"${this.id}\" aria-expanded=\"false\">\n            <span class=\"govuk-visually-hidden\">Choose date</span>\n            <svg width=\"32\" height=\"24\" focusable=\"false\" class=\"moj-datepicker-icon\" aria-hidden=\"true\" role=\"img\" viewBox=\"0 0 22 22\">\n              <path\n                fill=\"currentColor\"\n                fill-rule=\"evenodd\"\n                clip-rule=\"evenodd\"\n                d=\"M16.1333 2.93333H5.86668V4.4C5.86668 5.21002 5.21003 5.86667 4.40002 5.86667C3.59 5.86667 2.93335 5.21002 2.93335 4.4V2.93333H2C0.895431 2.93333 0 3.82877 0 4.93334V19.2667C0 20.3712 0.89543 21.2667 2 21.2667H20C21.1046 21.2667 22 20.3712 22 19.2667V4.93333C22 3.82876 21.1046 2.93333 20 2.93333H19.0667V4.4C19.0667 5.21002 18.41 5.86667 17.6 5.86667C16.79 5.86667 16.1333 5.21002 16.1333 4.4V2.93333ZM20.5333 8.06667H1.46665V18.8C1.46665 19.3523 1.91436 19.8 2.46665 19.8H19.5333C20.0856 19.8 20.5333 19.3523 20.5333 18.8V8.06667Z\"\n              ></path>\n              <rect x=\"3.66669\" width=\"1.46667\" height=\"5.13333\" rx=\"0.733333\" fill=\"currentColor\"></rect>\n              <rect x=\"16.8667\" width=\"1.46667\" height=\"5.13333\" rx=\"0.733333\" fill=\"currentColor\"></rect>\n            </svg>\n          </button>`\n  }\n\n  /**\n   * HTML template for calendar dialog\n   *\n   * @param {string} [titleId] - Id attribute for dialog title\n   * @returns {string}\n   */\n  dialogTemplate(titleId) {\n    return `<div class=\"moj-datepicker__dialog-header\">\n            <div class=\"moj-datepicker__dialog-navbuttons\">\n              <button type=\"button\" class=\"moj-datepicker__button moj-js-datepicker-prev-year\">\n                <span class=\"govuk-visually-hidden\">Previous year</span>\n                <svg width=\"44\" height=\"40\" viewBox=\"0 0 44 40\" fill=\"none\" fill=\"none\" focusable=\"false\" aria-hidden=\"true\" role=\"img\">\n                  <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M23.1643 20L28.9572 14.2071L27.5429 12.7929L20.3358 20L27.5429 27.2071L28.9572 25.7929L23.1643 20Z\" fill=\"currentColor\"/>\n                  <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M17.1643 20L22.9572 14.2071L21.5429 12.7929L14.3358 20L21.5429 27.2071L22.9572 25.7929L17.1643 20Z\" fill=\"currentColor\"/>\n                </svg>\n              </button>\n\n              <button type=\"button\" class=\"moj-datepicker__button moj-js-datepicker-prev-month\">\n                <span class=\"govuk-visually-hidden\">Previous month</span>\n                <svg width=\"44\" height=\"40\" viewBox=\"0 0 44 40\" fill=\"none\" focusable=\"false\" aria-hidden=\"true\" role=\"img\">\n                  <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M20.5729 20L25.7865 14.2071L24.5137 12.7929L18.0273 20L24.5137 27.2071L25.7865 25.7929L20.5729 20Z\" fill=\"currentColor\"/>\n                </svg>\n              </button>\n            </div>\n\n            <h2 id=\"${titleId}\" class=\"moj-datepicker__dialog-title moj-js-datepicker-month-year\" aria-live=\"polite\">June 2020</h2>\n\n            <div class=\"moj-datepicker__dialog-navbuttons\">\n              <button type=\"button\" class=\"moj-datepicker__button moj-js-datepicker-next-month\">\n                <span class=\"govuk-visually-hidden\">Next month</span>\n                <svg width=\"44\" height=\"40\" viewBox=\"0 0 44 40\" fill=\"none\"  focusable=\"false\" aria-hidden=\"true\" role=\"img\">\n                  <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M23.4271 20L18.2135 14.2071L19.4863 12.7929L25.9727 20L19.4863 27.2071L18.2135 25.7929L23.4271 20Z\" fill=\"currentColor\"/>\n                </svg>\n              </button>\n\n              <button type=\"button\" class=\"moj-datepicker__button moj-js-datepicker-next-year\">\n                <span class=\"govuk-visually-hidden\">Next year</span>\n                <svg width=\"44\" height=\"40\" viewBox=\"0 0 44 40\" fill=\"none\" fill=\"none\" focusable=\"false\" aria-hidden=\"true\" role=\"img\">\n                  <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M20.8357 20L15.0428 14.2071L16.4571 12.7929L23.6642 20L16.4571 27.2071L15.0428 25.7929L20.8357 20Z\" fill=\"currentColor\"/>\n                  <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M26.8357 20L21.0428 14.2071L22.4571 12.7929L29.6642 20L22.4571 27.2071L21.0428 25.7929L26.8357 20Z\" fill=\"currentColor\"/>\n                </svg>\n              </button>\n            </div>\n          </div>\n\n          <table class=\"moj-datepicker__calendar moj-js-datepicker-grid\" role=\"application\" aria-labelledby=\"${titleId}\">\n            <thead>\n              <tr></tr>\n            </thead>\n\n            <tbody></tbody>\n          </table>\n\n          <div class=\"govuk-button-group\">\n            <button type=\"button\" class=\"govuk-button moj-js-datepicker-ok\">Select</button>\n            <button type=\"button\" class=\"govuk-button govuk-button--secondary moj-js-datepicker-cancel\">Close</button>\n          </div>`\n  }\n\n  createCalendarHeaders() {\n    this.dayLabels.forEach((day) => {\n      const html = `<th scope=\"col\"><span aria-hidden=\"true\">${day.substring(0, 3)}</span><span class=\"govuk-visually-hidden\">${day}</span></th>`\n      const $headerRow = this.$dialog.querySelector('thead > tr')\n      $headerRow.insertAdjacentHTML('beforeend', html)\n    })\n  }\n\n  /**\n   * Pads given number with leading zeros\n   *\n   * @param {number} value - The value to be padded\n   * @param {number} length - The length in characters of the output\n   * @returns {string}\n   */\n  leadingZeros(value, length = 2) {\n    let ret = value.toString()\n\n    while (ret.length < length) {\n      ret = `0${ret}`\n    }\n\n    return ret\n  }\n\n  setOptions() {\n    this.setMinAndMaxDatesOnCalendar()\n    this.setExcludedDates()\n    this.setExcludedDays()\n    this.setWeekStartDay()\n  }\n\n  setMinAndMaxDatesOnCalendar() {\n    if (this.config.minDate) {\n      this.minDate = this.formattedDateFromString(this.config.minDate, null)\n      if (this.minDate && this.currentDate < this.minDate) {\n        this.currentDate = this.minDate\n      }\n    }\n\n    if (this.config.maxDate) {\n      this.maxDate = this.formattedDateFromString(this.config.maxDate, null)\n      if (this.maxDate && this.currentDate > this.maxDate) {\n        this.currentDate = this.maxDate\n      }\n    }\n  }\n\n  setExcludedDates() {\n    if (this.config.excludedDates) {\n      this.excludedDates = this.config.excludedDates\n        .replace(/\\s+/, ' ')\n        .split(' ')\n        .map((item) => {\n          return item.includes('-')\n            ? this.parseDateRangeString(item)\n            : [this.formattedDateFromString(item)]\n        })\n        .reduce((dates, items) => dates.concat(items))\n        .filter((date) => date)\n    }\n  }\n\n  /**\n   * Parses a daterange string into an array of dates\n   *\n   * @param {string} datestring - A daterange string in the format \"dd/mm/yyyy-dd/mm/yyyy\"\n   */\n  parseDateRangeString(datestring) {\n    const dates = []\n    const [startDate, endDate] = datestring\n      .split('-')\n      .map((d) => this.formattedDateFromString(d, null))\n\n    if (startDate && endDate) {\n      const date = new Date(startDate.getTime())\n      /* eslint-disable no-unmodified-loop-condition */\n      while (date <= endDate) {\n        dates.push(new Date(date))\n        date.setDate(date.getDate() + 1)\n      }\n      /* eslint-enable no-unmodified-loop-condition */\n    }\n    return dates\n  }\n\n  setExcludedDays() {\n    if (this.config.excludedDays) {\n      // lowercase and arrange dayLabels to put indexOf sunday == 0 for comparison\n      // with getDay() function\n      const weekDays = this.dayLabels.map((item) => item.toLowerCase())\n      if (this.config.weekStartDay === 'monday') {\n        weekDays.unshift(weekDays.pop())\n      }\n\n      this.excludedDays = this.config.excludedDays\n        .replace(/\\s+/, ' ')\n        .toLowerCase()\n        .split(' ')\n        .map((item) => weekDays.indexOf(item))\n        .filter((item) => item !== -1)\n    }\n  }\n\n  setWeekStartDay() {\n    const weekStartDayParam = this.config.weekStartDay\n    if (weekStartDayParam && weekStartDayParam.toLowerCase() === 'sunday') {\n      this.config.weekStartDay = 'sunday'\n      // Rotate dayLabels array to put Sunday as the first item\n      this.dayLabels.unshift(this.dayLabels.pop())\n    } else {\n      this.config.weekStartDay = 'monday'\n    }\n  }\n\n  /**\n   * Determine if a date is selectable\n   *\n   * @param {Date} date - the date to check\n   * @returns {boolean}\n   */\n  isExcludedDate(date) {\n    // This comparison does not work correctly - it will exclude the mindate itself\n    // see: https://github.com/ministryofjustice/moj-frontend/issues/923\n    if (this.minDate && this.minDate > date) {\n      return true\n    }\n\n    // This comparison works as expected - the maxdate will not be excluded\n    if (this.maxDate && this.maxDate < date) {\n      return true\n    }\n\n    for (const excludedDate of this.excludedDates) {\n      if (date.toDateString() === excludedDate.toDateString()) {\n        return true\n      }\n    }\n\n    if (this.excludedDays.includes(date.getDay())) {\n      return true\n    }\n\n    return false\n  }\n\n  /**\n   * Get a Date object from a string\n   *\n   * @param {string} dateString - string in the format d/m/yyyy dd/mm/yyyy\n   * @param {Date} fallback - date object to return if formatting fails\n   * @returns {Date}\n   */\n  formattedDateFromString(dateString, fallback = new Date()) {\n    let formattedDate = null\n    // Accepts d/m/yyyy and dd/mm/yyyy\n    const dateFormatPattern = /(\\d{1,2})([-/,. ])(\\d{1,2})\\2(\\d{4})/\n\n    if (!dateFormatPattern.test(dateString)) return fallback\n\n    const match = dateFormatPattern.exec(dateString)\n    const day = match[1]\n    const month = match[3]\n    const year = match[4]\n\n    formattedDate = new Date(Number(year), Number(month) - 1, Number(day))\n    if (\n      formattedDate instanceof Date &&\n      Number.isFinite(formattedDate.getTime())\n    ) {\n      return formattedDate\n    }\n    return fallback\n  }\n\n  /**\n   * Get a formatted date string from a Date object\n   *\n   * @param {Date} date - date to format to a string\n   * @returns {string}\n   */\n  formattedDateFromDate(date) {\n    if (this.config.leadingZeros) {\n      return `${this.leadingZeros(date.getDate())}/${this.leadingZeros(date.getMonth() + 1)}/${date.getFullYear()}`\n    }\n\n    return `${date.getDate()}/${date.getMonth() + 1}/${date.getFullYear()}`\n  }\n\n  /**\n   * Get a human readable date in the format Monday 2 March 2024\n   *\n   * @param {Date} date - Date to format\n   * @returns {string}\n   */\n  formattedDateHuman(date) {\n    return `${this.dayLabels[(date.getDay() + 6) % 7]} ${date.getDate()} ${this.monthLabels[date.getMonth()]} ${date.getFullYear()}`\n  }\n\n  /**\n   * @param {MouseEvent} event - Click event\n   */\n  backgroundClick(event) {\n    if (\n      this.isOpen() &&\n      event.target instanceof Node &&\n      !this.$dialog.contains(event.target) &&\n      !this.$input.contains(event.target) &&\n      !this.$calendarButton.contains(event.target)\n    ) {\n      event.preventDefault()\n      this.closeDialog()\n    }\n  }\n\n  /**\n   * @param {KeyboardEvent} event - Keydown event\n   */\n  firstButtonKeydown(event) {\n    if (event.key === 'Tab' && event.shiftKey) {\n      this.$lastButtonInDialog.focus()\n      event.preventDefault()\n    }\n  }\n\n  /**\n   * @param {KeyboardEvent} event - Keydown event\n   */\n  lastButtonKeydown(event) {\n    if (event.key === 'Tab' && !event.shiftKey) {\n      this.$firstButtonInDialog.focus()\n      event.preventDefault()\n    }\n  }\n\n  // render calendar\n  updateCalendar() {\n    this.$dialogTitle.innerHTML = `${this.monthLabels[this.currentDate.getMonth()]} ${this.currentDate.getFullYear()}`\n\n    const day = this.currentDate\n    const firstOfMonth = new Date(day.getFullYear(), day.getMonth(), 1)\n    let dayOfWeek\n\n    if (this.config.weekStartDay === 'monday') {\n      dayOfWeek = firstOfMonth.getDay() === 0 ? 6 : firstOfMonth.getDay() - 1 // Change logic to make Monday first day of week, i.e. 0\n    } else {\n      dayOfWeek = firstOfMonth.getDay()\n    }\n\n    firstOfMonth.setDate(firstOfMonth.getDate() - dayOfWeek)\n\n    const thisDay = new Date(firstOfMonth)\n\n    // loop through our days\n    for (const calendarDay of this.calendarDays) {\n      const hidden = thisDay.getMonth() !== day.getMonth()\n      const disabled = this.isExcludedDate(thisDay)\n\n      calendarDay.update(thisDay, hidden, disabled)\n\n      thisDay.setDate(thisDay.getDate() + 1)\n    }\n  }\n\n  /**\n   * @param {boolean} [focus] - Focus the day button\n   */\n  setCurrentDate(focus = true) {\n    const { currentDate } = this\n    this.calendarDays.forEach((calendarDay) => {\n      calendarDay.$button.classList.add('moj-datepicker__button')\n      calendarDay.$button.classList.add('moj-datepicker__calendar-day')\n      calendarDay.$button.setAttribute('tabindex', '-1')\n      calendarDay.$button.classList.remove(this.selectedDayButtonClass)\n      const calendarDayDate = calendarDay.date\n      calendarDayDate.setHours(0, 0, 0, 0)\n\n      const today = new Date()\n      today.setHours(0, 0, 0, 0)\n\n      if (\n        calendarDayDate.getTime() ===\n        currentDate.getTime() /* && !calendarDay.button.disabled */\n      ) {\n        if (focus) {\n          calendarDay.$button.setAttribute('tabindex', '0')\n          calendarDay.$button.focus()\n          calendarDay.$button.classList.add(this.selectedDayButtonClass)\n        }\n      }\n\n      if (\n        this.inputDate &&\n        calendarDayDate.getTime() === this.inputDate.getTime()\n      ) {\n        calendarDay.$button.classList.add(this.currentDayButtonClass)\n        calendarDay.$button.setAttribute('aria-current', 'date')\n      } else {\n        calendarDay.$button.classList.remove(this.currentDayButtonClass)\n        calendarDay.$button.removeAttribute('aria-current')\n      }\n\n      if (calendarDayDate.getTime() === today.getTime()) {\n        calendarDay.$button.classList.add(this.todayButtonClass)\n      } else {\n        calendarDay.$button.classList.remove(this.todayButtonClass)\n      }\n    })\n\n    // if no date is tab-able, make the first non-disabled date tab-able\n    if (!focus) {\n      const enabledDays = this.calendarDays.filter((calendarDay) => {\n        return (\n          window.getComputedStyle(calendarDay.$button).display === 'block' &&\n          !calendarDay.$button.disabled\n        )\n      })\n\n      enabledDays[0].$button.setAttribute('tabindex', '0')\n\n      this.currentDate = enabledDays[0].date\n    }\n  }\n\n  /**\n   * @param {Date} date - Date to select\n   */\n  selectDate(date) {\n    if (this.isExcludedDate(date)) {\n      return\n    }\n\n    this.$calendarButton.querySelector('span').innerText =\n      `Choose date. Selected date is ${this.formattedDateHuman(date)}`\n    this.$input.value = this.formattedDateFromDate(date)\n\n    const changeEvent = new Event('change', { bubbles: true, cancelable: true })\n    this.$input.dispatchEvent(changeEvent)\n\n    this.closeDialog()\n  }\n\n  isOpen() {\n    return this.$dialog.classList.contains('moj-datepicker__dialog--open')\n  }\n\n  /**\n   * @param {MouseEvent} event - Click event\n   */\n  toggleDialog(event) {\n    event.preventDefault()\n    if (this.isOpen()) {\n      this.closeDialog()\n    } else {\n      this.setMinAndMaxDatesOnCalendar()\n      this.openDialog()\n    }\n  }\n\n  openDialog() {\n    this.$dialog.hidden = false\n    this.$dialog.classList.add('moj-datepicker__dialog--open')\n    this.$calendarButton.setAttribute('aria-expanded', 'true')\n\n    // position the dialog\n    // if input is wider than dialog pin it to the right\n    if (this.$input.offsetWidth > this.$dialog.offsetWidth) {\n      this.$dialog.style.right = `0px`\n    }\n    this.$dialog.style.top = `${this.$input.offsetHeight + 3}px`\n\n    // get the date from the input element\n    this.inputDate = this.formattedDateFromString(this.$input.value)\n    // move current date to the closest selectable date if it is out of range\n    if (this.minDate && this.minDate > this.inputDate) {\n      this.inputDate = new Date(this.minDate.getTime())\n    }\n    if (this.maxDate && this.maxDate < this.inputDate) {\n      this.inputDate = new Date(this.maxDate.getTime())\n    }\n    if (this.minDate && this.maxDate && this.minDate > this.maxDate) {\n      console.error('min date is after max date. No dates will be selectable')\n    }\n\n    this.currentDate = this.inputDate\n    this.currentDate.setHours(0, 0, 0, 0)\n\n    this.updateCalendar()\n    this.setCurrentDate()\n  }\n\n  closeDialog() {\n    this.$dialog.hidden = true\n    this.$dialog.classList.remove('moj-datepicker__dialog--open')\n    this.$calendarButton.setAttribute('aria-expanded', 'false')\n    this.$calendarButton.focus()\n  }\n\n  /**\n   * @param {Date} date - Date to go to\n   * @param {boolean} [focus] - Focus the day button\n   */\n  goToDate(date, focus) {\n    const current = this.currentDate\n    this.currentDate = date\n\n    if (\n      current.getMonth() !== this.currentDate.getMonth() ||\n      current.getFullYear() !== this.currentDate.getFullYear()\n    ) {\n      this.updateCalendar()\n    }\n\n    this.setCurrentDate(focus)\n  }\n\n  // day navigation\n  focusNextDay() {\n    const date = new Date(this.currentDate)\n    date.setDate(date.getDate() + 1)\n    this.goToDate(date)\n  }\n\n  focusPreviousDay() {\n    const date = new Date(this.currentDate)\n    date.setDate(date.getDate() - 1)\n    this.goToDate(date)\n  }\n\n  // week navigation\n  focusNextWeek() {\n    const date = new Date(this.currentDate)\n    date.setDate(date.getDate() + 7)\n    this.goToDate(date)\n  }\n\n  focusPreviousWeek() {\n    const date = new Date(this.currentDate)\n    date.setDate(date.getDate() - 7)\n    this.goToDate(date)\n  }\n\n  focusFirstDayOfWeek() {\n    const date = new Date(this.currentDate)\n    const firstDayOfWeekIndex = this.config.weekStartDay === 'sunday' ? 0 : 1\n    const dayOfWeek = date.getDay()\n    const diff =\n      dayOfWeek >= firstDayOfWeekIndex\n        ? dayOfWeek - firstDayOfWeekIndex\n        : 6 - dayOfWeek\n\n    date.setDate(date.getDate() - diff)\n    date.setHours(0, 0, 0, 0)\n\n    this.goToDate(date)\n  }\n\n  focusLastDayOfWeek() {\n    const date = new Date(this.currentDate)\n    const lastDayOfWeekIndex = this.config.weekStartDay === 'sunday' ? 6 : 0\n    const dayOfWeek = date.getDay()\n    const diff =\n      dayOfWeek <= lastDayOfWeekIndex\n        ? lastDayOfWeekIndex - dayOfWeek\n        : 7 - dayOfWeek\n\n    date.setDate(date.getDate() + diff)\n    date.setHours(0, 0, 0, 0)\n\n    this.goToDate(date)\n  }\n\n  /**\n   * Month navigation\n   *\n   * @param {KeyboardEvent | MouseEvent} event - Key press or click event\n   * @param {boolean} [focus] - Focus the day button\n   */\n  focusNextMonth(event, focus = true) {\n    event.preventDefault()\n    const date = new Date(this.currentDate)\n    date.setMonth(date.getMonth() + 1, 1)\n    this.goToDate(date, focus)\n  }\n\n  /**\n   * @param {KeyboardEvent | MouseEvent} event - Key press or click event\n   * @param {boolean} [focus] - Focus the day button\n   */\n  focusPreviousMonth(event, focus = true) {\n    event.preventDefault()\n    const date = new Date(this.currentDate)\n    date.setMonth(date.getMonth() - 1, 1)\n    this.goToDate(date, focus)\n  }\n\n  /**\n   * Year navigation\n   *\n   * @param {KeyboardEvent | MouseEvent} event - Key press or click event\n   * @param {boolean} [focus] - Focus the day button\n   */\n  focusNextYear(event, focus = true) {\n    event.preventDefault()\n    const date = new Date(this.currentDate)\n    date.setFullYear(date.getFullYear() + 1, date.getMonth(), 1)\n    this.goToDate(date, focus)\n  }\n\n  /**\n   * @param {KeyboardEvent | MouseEvent} event - Key press or click event\n   * @param {boolean} [focus] - Focus the day button\n   */\n  focusPreviousYear(event, focus = true) {\n    event.preventDefault()\n    const date = new Date(this.currentDate)\n    date.setFullYear(date.getFullYear() - 1, date.getMonth(), 1)\n    this.goToDate(date, focus)\n  }\n\n  /**\n   * Name for the component used when initialising using data-module attributes.\n   */\n  static moduleName = 'moj-date-picker'\n\n  /**\n   * Date picker default config\n   *\n   * @type {DatePickerConfig}\n   */\n  static defaults = Object.freeze({\n    leadingZeros: false,\n    weekStartDay: 'monday',\n    input: {\n      selector: '.moj-js-datepicker-input'\n    }\n  })\n\n  /**\n   * Date picker config schema\n   *\n   * @satisfies {Schema<DatePickerConfig>}\n   */\n  static schema = Object.freeze(\n    /** @type {const} */ ({\n      properties: {\n        excludedDates: { type: 'string' },\n        excludedDays: { type: 'string' },\n        leadingZeros: { type: 'boolean' },\n        maxDate: { type: 'string' },\n        minDate: { type: 'string' },\n        weekStartDay: { type: 'string' },\n        input: { type: 'object' }\n      }\n    })\n  )\n}\n\nclass DSCalendarDay {\n  /**\n   *\n   * @param {HTMLButtonElement} $button\n   * @param {number} index\n   * @param {number} row\n   * @param {number} column\n   * @param {DatePicker} picker\n   */\n  constructor($button, index, row, column, picker) {\n    this.index = index\n    this.row = row\n    this.column = column\n    this.$button = $button\n    this.picker = picker\n    this.date = new Date()\n    this.$button.addEventListener('keydown', this.keyPress.bind(this))\n    this.$button.addEventListener('click', this.click.bind(this))\n  }\n\n  /**\n   * @param {Date} day - the Date for the calendar day\n   * @param {boolean} hidden - visibility of the day\n   * @param {boolean} disabled - is the day selectable or excluded\n   */\n  update(day, hidden, disabled) {\n    const label = day.getDate()\n    let accessibleLabel = this.picker.formattedDateHuman(day)\n\n    if (disabled) {\n      this.$button.setAttribute('aria-disabled', 'true')\n      accessibleLabel = `Excluded date, ${accessibleLabel}`\n    } else {\n      this.$button.removeAttribute('aria-disabled')\n    }\n\n    if (hidden) {\n      this.$button.style.display = 'none'\n    } else {\n      this.$button.style.display = 'block'\n    }\n    this.$button.setAttribute(\n      'data-testid',\n      this.picker.formattedDateFromDate(day)\n    )\n\n    this.$button.innerHTML = `<span class=\"govuk-visually-hidden\">${accessibleLabel}</span><span aria-hidden=\"true\">${label}</span>`\n    this.date = new Date(day)\n  }\n\n  /**\n   * @param {MouseEvent} event - Click event\n   */\n  click(event) {\n    this.picker.goToDate(this.date)\n    this.picker.selectDate(this.date)\n\n    event.stopPropagation()\n    event.preventDefault()\n  }\n\n  /**\n   * @param {KeyboardEvent} event - Keydown event\n   */\n  keyPress(event) {\n    let calendarNavKey = true\n\n    switch (event.key) {\n      case 'ArrowLeft':\n        this.picker.focusPreviousDay()\n        break\n      case 'ArrowRight':\n        this.picker.focusNextDay()\n        break\n      case 'ArrowUp':\n        this.picker.focusPreviousWeek()\n        break\n      case 'ArrowDown':\n        this.picker.focusNextWeek()\n        break\n      case 'Home':\n        this.picker.focusFirstDayOfWeek()\n        break\n      case 'End':\n        this.picker.focusLastDayOfWeek()\n        break\n      case 'PageUp': {\n        if (event.shiftKey) {\n          this.picker.focusPreviousYear(event)\n        } else {\n          this.picker.focusPreviousMonth(event)\n        }\n        break\n      }\n      case 'PageDown': {\n        if (event.shiftKey) {\n          this.picker.focusNextYear(event)\n        } else {\n          this.picker.focusNextMonth(event)\n        }\n        break\n      }\n      default:\n        calendarNavKey = false\n        break\n    }\n\n    if (calendarNavKey) {\n      event.preventDefault()\n      event.stopPropagation()\n    }\n  }\n}\n\n/**\n * Date picker config\n *\n * @typedef {object} DatePickerConfig\n * @property {string} [excludedDates] - Dates that cannot be selected\n * @property {string} [excludedDays] - Days that cannot be selected\n * @property {boolean} [leadingZeros] - Whether to add leading zeroes when populating the field\n * @property {string} [minDate] - The earliest available date\n * @property {string} [maxDate] - The latest available date\n * @property {string} [weekStartDay] - First day of the week in calendar view\n * @property {object} [input] - Input config\n * @property {string} [input.selector] - Selector for the input element\n * @property {Element | null} [input.element] - HTML element for the input\n */\n\n/**\n * @import { Schema } from 'govuk-frontend/dist/govuk/common/configuration.mjs'\n */\n"],"names":["isInitialised","$root","moduleName","HTMLElement","hasAttribute","isSupported","$scope","document","body","classList","contains","isArray","option","Array","isObject","formatErrorMessage","Component","message","GOVUKFrontendError","Error","constructor","args","name","SupportError","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","_$root","childConstructor","elementType","checkSupport","checkInitialised","setAttribute","configOverride","Symbol","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","normaliseDataset","dataset","mergeConfigs","normaliseString","value","property","trimmedValue","trim","output","outputType","type","includes","length","isFinite","Number","schema","out","entries","Object","properties","entry","namespace","field","toString","extractConfigByNamespace","configObjects","formattedConfigObject","configObject","key","keys","override","newObject","current","keyParts","split","index","DatePicker","_this$config$input$el","$input","input","querySelector","selector","HTMLInputElement","dayLabels","monthLabels","currentDate","Date","setHours","calendarDays","excludedDates","excludedDays","buttonClass","selectedDayButtonClass","currentDayButtonClass","todayButtonClass","setOptions","initControls","id","$dialog","createDialog","createCalendarHeaders","$componentWrapper","createElement","$inputWrapper","add","parentElement","insertBefore","appendChild","insertAdjacentHTML","toggleTemplate","insertAdjacentElement","$calendarButton","$dialogTitle","createCalendar","$prevMonthButton","$prevYearButton","$nextMonthButton","$nextYearButton","$cancelButton","$okButton","addEventListener","event","focusPreviousMonth","focusPreviousYear","focusNextMonth","focusNextYear","preventDefault","closeDialog","selectDate","$dialogButtons","querySelectorAll","$firstButtonInDialog","$lastButtonInDialog","firstButtonKeydown","lastButtonKeydown","toggleDialog","stopPropagation","backgroundClick","updateCalendar","titleId","innerHTML","dialogTemplate","hidden","$tbody","dayCount","i","$row","insertRow","j","$cell","$dateButton","calendarDay","DSCalendarDay","push","forEach","day","html","substring","$headerRow","leadingZeros","ret","setMinAndMaxDatesOnCalendar","setExcludedDates","setExcludedDays","setWeekStartDay","minDate","formattedDateFromString","maxDate","replace","map","item","parseDateRangeString","reduce","dates","items","concat","filter","date","datestring","startDate","endDate","d","getTime","setDate","getDate","weekDays","toLowerCase","weekStartDay","unshift","pop","indexOf","weekStartDayParam","isExcludedDate","excludedDate","toDateString","getDay","dateString","fallback","formattedDate","dateFormatPattern","test","match","exec","month","year","formattedDateFromDate","getMonth","getFullYear","formattedDateHuman","isOpen","target","Node","shiftKey","focus","firstOfMonth","dayOfWeek","thisDay","disabled","update","setCurrentDate","$button","remove","calendarDayDate","today","inputDate","removeAttribute","enabledDays","window","getComputedStyle","display","innerText","changeEvent","Event","bubbles","cancelable","dispatchEvent","openDialog","offsetWidth","style","right","top","offsetHeight","console","error","goToDate","focusNextDay","focusPreviousDay","focusNextWeek","focusPreviousWeek","focusFirstDayOfWeek","firstDayOfWeekIndex","diff","focusLastDayOfWeek","lastDayOfWeekIndex","setMonth","setFullYear","freeze","row","column","picker","keyPress","bind","click","label","accessibleLabel","calendarNavKey"],"mappings":"AAmFO,SAASA,aAAaA,CAACC,KAAK,EAAEC,UAAU,EAAE;EAC/C,OACED,KAAK,YAAYE,WAAW,IAC5BF,KAAK,CAACG,YAAY,CAAC,CAAA,KAAA,EAAQF,UAAU,CAAA,KAAA,CAAO,CAAC;AAEjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,WAAWA,CAACC,MAAM,GAAGC,QAAQ,CAACC,IAAI,EAAE;EAClD,IAAI,CAACF,MAAM,EAAE;AACX,IAAA,OAAO,KAAK;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