{"version":3,"file":"mn-angular-lib-calendar.mjs","sources":["../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-month/calendar-month.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-month/calendar-month.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event-default/calendar-event-default.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event-default/calendar-event-default.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event/calendar-event.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-event/calendar-event.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-week/calendar-week.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-week/calendar-week.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-day/calendar-day.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-day/calendar-day.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-event-row/upcoming-event-row.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-event-row/upcoming-event-row.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-events/upcoming-events.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/upcoming-events/upcoming-events.component.html","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-view/calendar-view.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-calendar/components/calendar-view/calendar-view.component.html","../../../projects/mn-angular-lib/calendar/src/mn-date-selector-bar/mn-date-selector-bar.component.ts","../../../projects/mn-angular-lib/calendar/src/mn-date-selector-bar/mn-date-selector-bar.component.html","../../../projects/mn-angular-lib/calendar/public-api.ts","../../../projects/mn-angular-lib/calendar/mn-angular-lib-calendar.ts"],"sourcesContent":["import {\n  ChangeDetectorRef,\n  Component,\n  EventEmitter,\n  inject,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport {\n  CalendarConfig,\n  DEFAULT_CALENDAR_CONFIG,\n  MonthItem,\n  resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/**\n * Month grid view showing a 7Ã—6 grid of day cells.\n *\n * Each cell displays the day number and up to 3 coloured dots representing\n * events on that day. Clicking a cell emits `dayClicked`.\n */\n@Component({\n  selector: 'mn-calendar-month',\n  standalone: true,\n  imports: [CommonModule],\n  templateUrl: './calendar-month.component.html',\n})\nexport class CalendarMonthComponent implements OnInit, OnDestroy {\n  private readonly lang = inject(MnLanguageService);\n  private readonly cdr = inject(ChangeDetectorRef);\n\n  /**\n   * Accessible name for this control. Resolved through the conventional\n   * `mnCalendar.monthView` key so an app can translate it, falling back to English when the\n   * key is not defined rather than leaking the raw key into the UI.\n   */\n  get monthViewLabel(): string {\n    return this.lang.translateIfPresent('mnCalendar.monthView') ?? 'Month view';\n  }\n\n  /** The date whose month is displayed. */\n  @Input() focusDay!: Date;\n  /** Observable that emits the full event list whenever it changes. */\n  @Input() eventsChanged!: Observable<CalendarEvent[]>;\n  /** Observable that emits when the focus day changes. */\n  @Input() focusDayChanged!: Observable<Date>;\n  /** Resolved calendar configuration passed from the parent view. */\n  @Input() config?: CalendarConfig;\n  /** Emits the date of a clicked day cell. */\n  @Output() dayClicked = new EventEmitter<Date>();\n\n  monthItems: MonthItem[] = [];\n  /** Short weekday column headers (e.g. \"Mon\"), kept compact for the narrow columns. */\n  weekdayLabels: string[];\n  /** Word shown after the \"+N\" overflow count (e.g. \"more\"), from config. */\n  moreEventsLabel = DEFAULT_CALENDAR_CONFIG.moreEventsLabel;\n\n  private events: CalendarEvent[] = [];\n  private destroy$ = new Subject<void>();\n  private formatter: CalendarDateFormatter;\n\n  constructor() {\n    this.formatter = new DefaultCalendarDateFormatter();\n    this.weekdayLabels = DEFAULT_CALENDAR_CONFIG.shortDayNames;\n  }\n\n  ngOnInit() {\n    const resolved = this.config\n      ? resolveCalendarConfig(this.config)\n      : { ...DEFAULT_CALENDAR_CONFIG };\n    this.weekdayLabels = resolved.shortDayNames;\n    this.moreEventsLabel = resolved.moreEventsLabel;\n    this.buildMonth();\n\n    // Both subscriptions mark the view: the grid is rebuilt into plain fields, so in a zoneless\n    // app nothing else tells Angular this component has to be re-rendered. Without it a month\n    // whose events arrive from a stream — a fetch, a parent seeding its list — stays blank until\n    // some unrelated interaction happens to trigger change detection.\n    if (this.eventsChanged) {\n      this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n        this.events = events;\n        this.buildMonth();\n        this.cdr.markForCheck();\n      });\n    }\n\n    if (this.focusDayChanged) {\n      this.focusDayChanged.pipe(takeUntil(this.destroy$)).subscribe((date) => {\n        this.focusDay = date;\n        this.buildMonth();\n        this.cdr.markForCheck();\n      });\n    }\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  /** Emits the clicked day's date. */\n  onDayClick(date: Date) {\n    this.dayClicked.emit(date);\n  }\n\n  /** trackBy for day name headers. */\n  trackByDayName(index: number): number {\n    return index;\n  }\n\n  /** trackBy for month grid cells. */\n  trackByMonthItem(_index: number, item: MonthItem): number {\n    return item.date.getTime();\n  }\n\n  /** trackBy for event dots. */\n  trackByEventDot(_index: number, event: CalendarEvent): string {\n    return event.id;\n  }\n\n  /** Builds the 42-cell month grid (6 rows Ã— 7 columns). */\n  private buildMonth() {\n    if (!this.focusDay) return;\n\n    const year = this.focusDay.getFullYear();\n    const month = this.focusDay.getMonth();\n    const firstDay = new Date(year, month, 1);\n    const lastDay = new Date(year, month + 1, 0);\n\n    let startOffset = firstDay.getDay() - 1;\n    if (startOffset < 0) startOffset = 6;\n\n    const today = new Date();\n    this.monthItems = [];\n\n    for (let i = startOffset - 1; i >= 0; i--) {\n      const date = new Date(year, month, -i);\n      this.monthItems.push(this.createMonthItem(date, false, today));\n    }\n\n    for (let d = 1; d <= lastDay.getDate(); d++) {\n      const date = new Date(year, month, d);\n      this.monthItems.push(this.createMonthItem(date, true, today));\n    }\n\n    const remaining = 42 - this.monthItems.length;\n    for (let i = 1; i <= remaining; i++) {\n      const date = new Date(year, month + 1, i);\n      this.monthItems.push(this.createMonthItem(date, false, today));\n    }\n  }\n\n  private createMonthItem(date: Date, isCurrentMonth: boolean, today: Date): MonthItem {\n    const isToday = this.formatter.isSameDay(date, today);\n    const dayEvents = this.events.filter(\n      (e) =>\n        this.formatter.isSameDay(e.startTime, date) ||\n        this.formatter.isSameDay(e.endTime, date) ||\n        (e.startTime < date && e.endTime > date),\n    );\n\n    return {\n      date,\n      dayNumber: date.getDate(),\n      isCurrentMonth,\n      isToday,\n      events: dayEvents,\n    };\n  }\n}\n","<!-- Month grid. Cells are grouped by space rather than boxed by borders, in\n     keeping with the date-selector-bar: no rules, soft rounded cells, a hover\n     wash, and today marked by a tinted number alone (no circle). -->\n<!-- Rows are a compact fixed height rather than stretched to fill the container:\n     a month with few events shouldn't leave each cell mostly empty. The panel\n     scrolls if the grid is taller than the space it's given. -->\n<div [attr.aria-label]=\"monthViewLabel\" class=\"w-full flex flex-col\" role=\"grid\">\n  <div class=\"grid grid-cols-7 pb-2\">\n    @for (day of weekdayLabels; track day) {\n      <div class=\"pl-2 text-left text-[11px] font-semibold uppercase tracking-wide opacity-45\" role=\"columnheader\">{{ day }}</div>\n    }\n  </div>\n  <div class=\"grid grid-cols-7 gap-1 auto-rows-[minmax(92px,auto)]\">\n    @for (item of monthItems; track item.date.getTime()) {\n      <div\n        class=\"flex flex-col gap-1 min-h-0 overflow-hidden rounded-xl p-1.5 cursor-pointer transition-colors hover:bg-base-200 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none\"\n        [class.opacity-40]=\"!item.isCurrentMonth\"\n        (keyup.enter)=\"onDayClick(item.date)\"\n        (click)=\"onDayClick(item.date)\"\n        tabindex=\"0\"\n        role=\"gridcell\"\n        [attr.aria-label]=\"item.date.toDateString()\">\n        <span class=\"text-[13px] font-bold leading-none tabular-nums\" [class.text-primary]=\"item.isToday\">{{ item.dayNumber }}</span>\n        <div class=\"flex flex-col gap-0.5 min-h-0\">\n          @for (event of item.events.slice(0, 3); track $index) {\n            <div\n              class=\"flex items-center overflow-hidden rounded-md border-l-[3px] px-1.5 py-0.5 text-[11px] leading-tight\"\n              [style.background-color]=\"event.color.secondaryColor\"\n              [style.border-left-color]=\"event.color.primaryColor\"\n              [style.color]=\"event.color.primaryColor\"\n              [title]=\"event.title\">\n              <span class=\"truncate font-semibold\">{{ event.title }}</span>\n            </div>\n          }\n          <!-- Overflow indicator. Styled as a pill that lights up on hover so it\n               reads as actionable; the whole cell already navigates to the Day\n               view for this date on click / Enter, where every event is listed. -->\n          @if (item.events.length > 3) {\n            <span class=\"mt-0.5 inline-flex w-fit items-center rounded-md px-1.5 py-0.5 text-[10.5px] font-semibold opacity-60 transition-colors hover:bg-base-300 hover:opacity-100 motion-reduce:transition-none\">\n              +{{ item.events.length - 3 }} {{ moreEventsLabel }}\n            </span>\n          }\n        </div>\n      </div>\n    }\n  </div>\n</div>\n","import {\n  ChangeDetectorRef,\n  Component,\n  OnInit,\n  inject,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CALENDAR_DATE_FORMATTER, CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\n\n/**\n * Default event renderer used when no custom component is provided.\n *\n * Displays the event title, formatted time range, and optional description\n * with the event's colour scheme applied as background and left-border accent.\n */\n@Component({\n  selector: 'mn-calendar-event-default',\n  standalone: true,\n  imports: [CommonModule],\n  templateUrl: './calendar-event-default.component.html',\n})\nexport class CalendarEventDefaultComponent implements CalendarEventData, OnInit {\n  private cdr = inject(ChangeDetectorRef);\n\n  /** The event to render. Set by {@link CalendarEventComponent} after creation. */\n  event!: CalendarEvent;\n  formattedTime = '';\n\n  private formatter: CalendarDateFormatter;\n\n  constructor() {\n    const formatter = inject<CalendarDateFormatter | null>(CALENDAR_DATE_FORMATTER, {\n      optional: true,\n    });\n\n    this.formatter = formatter ?? new DefaultCalendarDateFormatter();\n  }\n\n  async ngOnInit() {\n    if (this.event) {\n      const start = await this.formatter.formatTime(this.event.startTime);\n      const end = await this.formatter.formatTime(this.event.endTime);\n      this.formattedTime = `${start} - ${end}`;\n      this.cdr.markForCheck();\n    }\n  }\n}\n","<!-- The shared event chip: a colored spine and a tinted fill from the event's own\n     colours, so it reads the same in week, day and month. Text inherits the\n     event's primary colour, keeping it legible on either theme. -->\n<div class=\"h-full overflow-hidden cursor-pointer rounded-lg border-l-[3px] px-2 py-1 text-xs\"\n     [style.background-color]=\"event.color.secondaryColor\"\n     [style.border-left-color]=\"event.color.primaryColor\"\n     [style.color]=\"event.color.primaryColor\">\n  <div class=\"truncate font-semibold\">{{ event.title }}</div>\n  <div class=\"truncate text-[11px] opacity-85\">{{ formattedTime }}</div>\n  @if (event.description) {\n    <div class=\"truncate text-[11px] opacity-75\">{{ event.description }}</div>\n  }\n</div>\n","import {\n  Component,\n  Input,\n  Output,\n  EventEmitter,\n  ViewChild,\n  ViewContainerRef,\n  AfterViewInit,\n  Type,\n  OnChanges,\n  SimpleChanges,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventDefaultComponent } from '../calendar-event-default/calendar-event-default.component';\n\n/**\n * Dynamic event renderer that injects a custom or default event component\n * into its view container.\n *\n * The component to render is resolved in this order:\n * 1. `customComponent` input (set on the parent week/day view)\n * 2. `event.component` (per-event override)\n * 3. {@link CalendarEventDefaultComponent} (library default)\n */\n@Component({\n  selector: 'mn-calendar-event',\n  standalone: true,\n  imports: [CommonModule],\n  templateUrl: './calendar-event.component.html',\n})\nexport class CalendarEventComponent implements AfterViewInit, OnChanges {\n  /** The event data to render. */\n  @Input() event!: CalendarEvent;\n  /** Optional custom component type that overrides the default renderer. */\n  @Input() customComponent?: Type<CalendarEventData>;\n  /** Emits when the rendered event is clicked. */\n  @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n  @ViewChild('eventContainer', { read: ViewContainerRef, static: true })\n  eventContainer!: ViewContainerRef;\n\n  private rendered = false;\n\n  ngAfterViewInit() {\n    this.renderComponent();\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    if (this.rendered && (changes['event'] || changes['customComponent'])) {\n      this.renderComponent();\n    }\n  }\n\n  /** Emits the event click. */\n  onEventClick() {\n    this.eventClicked.emit(this.event);\n  }\n\n  /** Creates the event component dynamically and sets its `event` property. */\n  private renderComponent() {\n    if (!this.eventContainer) return;\n    this.eventContainer.clear();\n    const component =\n      this.customComponent ?? this.event?.component ?? CalendarEventDefaultComponent;\n    const ref = this.eventContainer.createComponent(component);\n    (ref.instance as CalendarEventData).event = this.event;\n    ref.changeDetectorRef.detectChanges();\n    this.rendered = true;\n  }\n}\n","<!-- Host for the dynamically-rendered event component. Click/keyboard handling and\n     the focus ring live on the week/day event wrapper, so this stays presentational\n     to avoid a second, redundant tab stop per event. -->\n<div class=\"h-full w-full\">\n  <ng-template #eventContainer></ng-template>\n</div>\n","import {\n  ChangeDetectorRef,\n  Component,\n  EventEmitter,\n  inject,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n  Type,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport {\n  CalendarConfig,\n  ColumnDay,\n  DEFAULT_CALENDAR_CONFIG,\n  HourRow,\n  resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventLayoutService } from 'mn-angular-lib/calendar-core';\nimport { CalendarUtility } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventComponent } from '../calendar-event/calendar-event.component';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/** Extended hour row with a pre-resolved display label. */\ntype DisplayHourRow = {\n  hourLabel: string;\n} & HourRow;\n\n/**\n * Week grid view showing 7 day columns with half-hour time slots.\n *\n * Overlapping events within the same day are laid out in sub-columns\n * so they appear side-by-side rather than stacked.\n */\n@Component({\n  selector: 'mn-calendar-week',\n  standalone: true,\n  imports: [CommonModule, CalendarEventComponent],\n  templateUrl: './calendar-week.component.html',\n  providers: [CalendarEventLayoutService],\n})\nexport class CalendarWeekComponent implements OnInit, OnDestroy {\n  private readonly lang = inject(MnLanguageService);\n\n  /**\n   * Accessible name for this control. Resolved through the conventional\n   * `mnCalendar.weekView` key so an app can translate it, falling back to English when the\n   * key is not defined rather than leaking the raw key into the UI.\n   */\n  get weekViewLabel(): string {\n    return this.lang.translateIfPresent('mnCalendar.weekView') ?? 'Week view';\n  }\n\n  private layoutService = inject(CalendarEventLayoutService);\n  private cdr = inject(ChangeDetectorRef);\n\n  /** The date around which the week is centred. */\n  @Input() focusDay!: Date;\n  /** Observable that emits the full event list whenever it changes. */\n  @Input() eventsChanged!: Observable<CalendarEvent[]>;\n  /** Observable that emits when the focus day changes. */\n  @Input() focusDayChanged!: Observable<Date>;\n  /** Resolved calendar configuration passed from the parent view. */\n  @Input() config?: CalendarConfig;\n  /** Optional custom event renderer component. */\n  @Input() calendarEventComponent?: Type<CalendarEventData>;\n  /** Emits when a calendar event is clicked. */\n  @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n  columns: ColumnDay[] = [];\n  hourRows: DisplayHourRow[] = [];\n  displayEvents: CalendarEvent[] = [];\n  totalRows = 0;\n  currentTimeRow = 0;\n  currentTimeCol = '';\n  /** The current time, formatted for the label riding the now-line. */\n  currentTimeLabel = '';\n  gridTemplateColumns = 'repeat(7, 1fr)';\n\n  private dayColumnMap: { subColumns: number; startCol: number }[] = [];\n  private events: CalendarEvent[] = [];\n  private destroy$ = new Subject<void>();\n  private formatter: CalendarDateFormatter;\n  private resolvedConfig!: CalendarConfig;\n  private currentTimeInterval?: ReturnType<typeof setInterval>;\n\n  constructor() {\n    this.formatter = new DefaultCalendarDateFormatter();\n  }\n\n  ngOnInit() {\n    this.resolvedConfig = this.config\n      ? resolveCalendarConfig(this.config)\n      : { ...DEFAULT_CALENDAR_CONFIG };\n    this.buildColumns();\n    this.updateCurrentTime();\n    this.currentTimeInterval = setInterval(() => this.updateCurrentTime(), 60000);\n\n    if (this.eventsChanged) {\n      this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n        this.events = events;\n        this.refreshEvents();\n        this.cdr.markForCheck();\n      });\n    }\n\n    if (this.focusDayChanged) {\n      this.focusDayChanged.pipe(takeUntil(this.destroy$)).subscribe((date) => {\n        this.focusDay = date;\n        this.buildColumns();\n        this.refreshEvents();\n        this.updateCurrentTime();\n        this.cdr.markForCheck();\n      });\n    }\n\n    // Build hour rows asynchronously (formatTimeI returns a Promise).\n    this.buildHourRows().then(() => this.cdr.markForCheck());\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n    if (this.currentTimeInterval) clearInterval(this.currentTimeInterval);\n  }\n\n  /** Returns the CSS `grid-row` value for an event based on its start/end times. */\n  getEventRow(event: CalendarEvent): string {\n    const startRow = CalendarUtility.getCorrectRow(\n      event.startTime.getHours(),\n      event.startTime.getMinutes(),\n      this.resolvedConfig.startHour,\n    );\n    const endRow = CalendarUtility.getCorrectRow(\n      event.endTime.getHours(),\n      event.endTime.getMinutes(),\n      this.resolvedConfig.startHour,\n    );\n    return `${startRow} / ${Math.max(endRow, startRow + 1)}`;\n  }\n\n  /** Returns the CSS `grid-column` span for a day header, accounting for sub-columns. */\n  getHeaderColumn(dayIndex: number): string {\n    if (!this.dayColumnMap.length) return `${dayIndex + 2} / span 1`;\n    const dayInfo = this.dayColumnMap[dayIndex];\n    return `${dayInfo.startCol + 1} / span ${dayInfo.subColumns}`;\n  }\n\n  /** Returns the CSS `grid-column` value for an event within its day's sub-columns. */\n  getEventColumn(event: CalendarEvent): string {\n    const dayIdx = this.columns.findIndex((c) => this.formatter.isSameDay(c.date, event.startTime));\n    if (dayIdx < 0) return '1 / span 1';\n    const dayInfo = this.dayColumnMap[dayIdx];\n    const subCol = (event.column ?? 0) + dayInfo.startCol;\n    const width = event.width ?? 1;\n    return `${subCol} / span ${width}`;\n  }\n\n  /** Forwards event click to parent. */\n  onEventClick(event: CalendarEvent) {\n    this.eventClicked.emit(event);\n  }\n\n  /** trackBy for hour rows. */\n  trackByHour(_index: number, row: DisplayHourRow): number {\n    return row.hour;\n  }\n\n  /** trackBy for day columns. */\n  trackByColumn(_index: number, col: ColumnDay): number {\n    return col.date.getTime();\n  }\n\n  /** trackBy for events. */\n  trackByEvent(_index: number, event: CalendarEvent): string {\n    return event.id;\n  }\n\n  private async buildHourRows() {\n    const hours = this.resolvedConfig.endHour - this.resolvedConfig.startHour;\n    this.totalRows = hours * 2;\n\n    const rows: DisplayHourRow[] = [];\n    for (let i = 0; i < hours; i++) {\n      const hour = this.resolvedConfig.startHour + i;\n      const label = await this.formatter.formatTimeI(hour, 0);\n      rows.push({\n        hour,\n        topRow: i * 2 + 1,\n        bottomRow: i * 2 + 3,\n        hourLabel: label,\n      });\n    }\n    this.hourRows = rows;\n  }\n\n  /** Builds the 7 day columns for the current week (Mondayâ€“Sunday). */\n  private buildColumns() {\n    if (!this.focusDay) return;\n\n    const shortNames = this.resolvedConfig.shortDayNames;\n    const today = new Date();\n\n    const day = this.focusDay.getDay();\n    const mondayOffset = day === 0 ? -6 : 1 - day;\n    const monday = new Date(this.focusDay);\n    monday.setDate(this.focusDay.getDate() + mondayOffset);\n\n    this.columns = [];\n    for (let i = 0; i < 7; i++) {\n      const date = new Date(monday);\n      date.setDate(monday.getDate() + i);\n      this.columns.push({\n        date,\n        dayName: shortNames[i],\n        dayNumber: date.getDate(),\n        isToday: this.formatter.isSameDay(date, today),\n      });\n    }\n  }\n\n  /** Filters, splits, and lays out events for the current week. */\n  private refreshEvents() {\n    if (!this.columns.length) return;\n\n    const rangeStart = this.columns[0].date;\n    const rangeEnd = new Date(this.columns[6].date);\n    rangeEnd.setHours(23, 59, 59, 999);\n\n    const filtered = this.events.filter((e) =>\n      this.layoutService.eventsOverlap(e.startTime, e.endTime, rangeStart, rangeEnd),\n    );\n\n    this.displayEvents = this.layoutService.calculateMultiDayEvents(\n      filtered,\n      this.resolvedConfig.startHour,\n      this.resolvedConfig.endHour,\n      rangeStart,\n      rangeEnd,\n    );\n\n    // Assign columns per day so overlapping events within a day get sub-columns\n    for (let i = 0; i < 7; i++) {\n      const dayStart = new Date(this.columns[i].date);\n      dayStart.setHours(0, 0, 0, 0);\n      const dayEnd = new Date(this.columns[i].date);\n      dayEnd.setHours(23, 59, 59, 999);\n\n      const dayEvents = this.displayEvents.filter((e) =>\n        this.formatter.isSameDay(e.startTime, this.columns[i].date),\n      );\n\n      this.layoutService.assignColumnsToEvents(dayEvents);\n      this.layoutService.assignWidthsToEvents(dayEvents, dayStart, dayEnd);\n    }\n\n    this.buildGridColumns();\n    this.updateCurrentTime();\n  }\n\n  /** Computes the CSS grid-template-columns string based on per-day sub-column counts. */\n  private buildGridColumns() {\n    this.dayColumnMap = [];\n    let currentCol = 1;\n\n    for (let i = 0; i < 7; i++) {\n      const dayEvents = this.displayEvents.filter((e) =>\n        this.formatter.isSameDay(e.startTime, this.columns[i].date),\n      );\n\n      let maxSubCols = 1;\n      for (const e of dayEvents) {\n        maxSubCols = Math.max(maxSubCols, (e.column ?? 0) + (e.width ?? 1));\n      }\n\n      this.dayColumnMap.push({ subColumns: maxSubCols, startCol: currentCol });\n      currentCol += maxSubCols;\n    }\n\n    const parts: string[] = [];\n    for (const day of this.dayColumnMap) {\n      for (let j = 0; j < day.subColumns; j++) {\n        parts.push(`${1 / day.subColumns}fr`);\n      }\n    }\n    this.gridTemplateColumns = parts.join(' ');\n  }\n\n  /** Updates the current-time red line position. */\n  private updateCurrentTime() {\n    const now = new Date();\n    const dayIdx = this.columns.findIndex((c) => this.formatter.isSameDay(c.date, now));\n    if (dayIdx >= 0 && this.dayColumnMap.length > 0) {\n      const dayInfo = this.dayColumnMap[dayIdx];\n      this.currentTimeCol = `${dayInfo.startCol} / span ${dayInfo.subColumns}`;\n      this.currentTimeRow = CalendarUtility.getCorrectRow(\n        now.getHours(),\n        now.getMinutes(),\n        this.resolvedConfig.startHour,\n      );\n      // formatTime is async; refresh the label and re-render when it resolves.\n      this.formatter.formatTime(now).then((label) => {\n        this.currentTimeLabel = label;\n        this.cdr.markForCheck();\n      });\n    } else {\n      this.currentTimeCol = '';\n      this.currentTimeRow = 0;\n      this.currentTimeLabel = '';\n    }\n    // See calendar-day: the setInterval tick marks nothing by itself.\n    this.cdr.markForCheck();\n  }\n}\n","<!-- Week grid. Hour rules are quiet hairlines; today's column header is a tinted\n     number (no fill); the current time is a line carrying a small time bubble.\n     Dynamic row/column placement stays inline — the layout maths lives in TS. -->\n<div [attr.aria-label]=\"weekViewLabel\" class=\"w-full h-full flex flex-col overflow-hidden\" role=\"grid\">\n  <div class=\"grid\" [style.grid-template-columns]=\"'60px ' + gridTemplateColumns\">\n    <div></div>\n    @for (col of columns; track col.dayName; let i = $index) {\n      <div class=\"py-2 px-1 text-center\"\n        [style.grid-column]=\"getHeaderColumn(i)\"\n        role=\"columnheader\">\n        <span class=\"block text-[11px] font-semibold uppercase tracking-wide opacity-50\">{{ col.dayName }}</span>\n        <span class=\"text-lg font-bold tabular-nums\" [class.text-primary]=\"col.isToday\">{{ col.dayNumber }}</span>\n      </div>\n    }\n  </div>\n  <div class=\"grid grid-cols-[60px_1fr] flex-1 min-h-0 overflow-hidden items-stretch\">\n    <div class=\"grid h-full min-h-0\" [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\">\n      @for (row of hourRows; track row.topRow) {\n        <div class=\"flex items-start justify-end min-h-0 overflow-hidden pr-2 text-[11px] tabular-nums opacity-50\"\n          [style.grid-row]=\"row.topRow + '/' + row.bottomRow\">\n          {{ row.hourLabel }}\n        </div>\n      }\n    </div>\n    <div class=\"grid relative auto-rows-fr h-full min-h-0\"\n      [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\"\n      [style.grid-template-columns]=\"gridTemplateColumns\">\n      @for (row of hourRows; track row.topRow) {\n        <div class=\"border-t border-base-200 pointer-events-none min-h-0\"\n          [style.grid-row]=\"row.topRow + '/' + row.bottomRow\"\n          [style.grid-column]=\"'1 / -1'\">\n        </div>\n      }\n      @if (currentTimeRow > 0 && currentTimeCol) {\n        <div class=\"relative z-[2] pointer-events-none\"\n          [style.grid-row]=\"currentTimeRow\"\n          [style.grid-column]=\"currentTimeCol\">\n          <div class=\"absolute -left-1 -top-1 h-2 w-2 rounded-full bg-error\"></div>\n          <div class=\"h-0.5 w-full bg-error\"></div>\n          <div class=\"absolute left-0 top-0 -translate-x-2 -translate-y-1/2 rounded-full bg-error px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-error-content shadow\">{{ currentTimeLabel }}</div>\n        </div>\n      }\n      @for (event of displayEvents; track $index) {\n        <div class=\"z-[1] min-h-0 overflow-hidden rounded-lg p-0.5 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-primary\"\n          [style.grid-row]=\"getEventRow(event)\"\n          [style.grid-column]=\"getEventColumn(event)\"\n             (click)=\"onEventClick(event)\"\n             (keyup.enter)=\"onEventClick(event)\"\n             tabindex=\"0\">\n          <mn-calendar-event [customComponent]=\"calendarEventComponent\" [event]=\"event\"></mn-calendar-event>\n        </div>\n      }\n    </div>\n  </div>\n</div>\n","import {\n  ChangeDetectorRef,\n  Component,\n  EventEmitter,\n  inject,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n  Type,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport {\n  CalendarConfig,\n  DEFAULT_CALENDAR_CONFIG,\n  HourRow,\n  resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventLayoutService } from 'mn-angular-lib/calendar-core';\nimport { CalendarUtility } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventComponent } from '../calendar-event/calendar-event.component';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/** Extended hour row with a pre-resolved display label. */\ntype DisplayHourRow = {\n  hourLabel: string;\n} & HourRow;\n\n/**\n * Day grid view showing a single day with half-hour time slots.\n *\n * Shares the same layout algorithm as the week view via\n * {@link CalendarEventLayoutService}.\n */\n@Component({\n  selector: 'mn-calendar-day',\n  standalone: true,\n  imports: [CommonModule, CalendarEventComponent],\n  templateUrl: './calendar-day.component.html',\n  providers: [CalendarEventLayoutService],\n})\nexport class CalendarDayComponent implements OnInit, OnDestroy {\n  private readonly lang = inject(MnLanguageService);\n\n  /**\n   * Accessible name for this control. Resolved through the conventional\n   * `mnCalendar.dayView` key so an app can translate it, falling back to English when the\n   * key is not defined rather than leaking the raw key into the UI.\n   */\n  get dayViewLabel(): string {\n    return this.lang.translateIfPresent('mnCalendar.dayView') ?? 'Day view';\n  }\n\n  private layoutService = inject(CalendarEventLayoutService);\n  private cdr = inject(ChangeDetectorRef);\n\n  /** The date to display. */\n  @Input() focusDay!: Date;\n  /** Observable that emits the full event list whenever it changes. */\n  @Input() eventsChanged!: Observable<CalendarEvent[]>;\n  /** Observable that emits when the focus day changes. */\n  @Input() focusDayChanged!: Observable<Date>;\n  /** Resolved calendar configuration passed from the parent view. */\n  @Input() config?: CalendarConfig;\n  /** Optional custom event renderer component. */\n  @Input() calendarEventComponent?: Type<CalendarEventData>;\n  /** Emits when a calendar event is clicked. */\n  @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n  hourRows: DisplayHourRow[] = [];\n  displayEvents: CalendarEvent[] = [];\n  totalRows = 0;\n  totalColumns = 1;\n  currentTimeRow = 0;\n  /** The current time, formatted for the label riding the now-line. */\n  currentTimeLabel = '';\n  isToday = false;\n  dayName = '';\n\n  private events: CalendarEvent[] = [];\n  private destroy$ = new Subject<void>();\n  private formatter: CalendarDateFormatter;\n  private resolvedConfig!: CalendarConfig;\n  private currentTimeInterval?: ReturnType<typeof setInterval>;\n\n  constructor() {\n    this.formatter = new DefaultCalendarDateFormatter();\n  }\n\n  ngOnInit() {\n    this.resolvedConfig = this.config\n      ? resolveCalendarConfig(this.config)\n      : { ...DEFAULT_CALENDAR_CONFIG };\n    this.updateDayInfo();\n    this.updateCurrentTime();\n    this.currentTimeInterval = setInterval(() => this.updateCurrentTime(), 60000);\n\n    if (this.eventsChanged) {\n      this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n        this.events = events;\n        this.refreshEvents();\n        this.cdr.markForCheck();\n      });\n    }\n\n    if (this.focusDayChanged) {\n      this.focusDayChanged.pipe(takeUntil(this.destroy$)).subscribe((date) => {\n        this.focusDay = date;\n        this.updateDayInfo();\n        this.refreshEvents();\n        this.updateCurrentTime();\n        this.cdr.markForCheck();\n      });\n    }\n\n    // Build hour rows asynchronously (formatTimeI returns a Promise).\n    this.buildHourRows().then(() => this.cdr.markForCheck());\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n    if (this.currentTimeInterval) clearInterval(this.currentTimeInterval);\n  }\n\n  /** Returns the CSS `grid-row` value for an event. */\n  getEventRow(event: CalendarEvent): string {\n    const startRow = CalendarUtility.getCorrectRow(\n      event.startTime.getHours(),\n      event.startTime.getMinutes(),\n      this.resolvedConfig.startHour,\n    );\n    const endRow = CalendarUtility.getCorrectRow(\n      event.endTime.getHours(),\n      event.endTime.getMinutes(),\n      this.resolvedConfig.startHour,\n    );\n    return `${startRow} / ${Math.max(endRow, startRow + 1)}`;\n  }\n\n  /** Returns the CSS `grid-column` value for an event within its sub-columns. */\n  getEventColumn(event: CalendarEvent): string {\n    const col = (event.column ?? 0) + 1;\n    const width = event.width ?? 1;\n    return `${col} / span ${width}`;\n  }\n\n  /** Forwards event click to parent. */\n  onEventClick(event: CalendarEvent) {\n    this.eventClicked.emit(event);\n  }\n\n  /** trackBy for hour rows. */\n  trackByHour(_index: number, row: DisplayHourRow): number {\n    return row.hour;\n  }\n\n  /** trackBy for events. */\n  trackByEvent(_index: number, event: CalendarEvent): string {\n    return event.id;\n  }\n\n  private async buildHourRows() {\n    const hours = this.resolvedConfig.endHour - this.resolvedConfig.startHour;\n    this.totalRows = hours * 2;\n\n    const rows: DisplayHourRow[] = [];\n    for (let i = 0; i < hours; i++) {\n      const hour = this.resolvedConfig.startHour + i;\n      const label = await this.formatter.formatTimeI(hour, 0);\n      rows.push({\n        hour,\n        topRow: i * 2 + 1,\n        bottomRow: i * 2 + 3,\n        hourLabel: label,\n      });\n    }\n    this.hourRows = rows;\n  }\n\n  /** Updates the day name and isToday flag. */\n  private updateDayInfo() {\n    if (!this.focusDay) return;\n    const today = new Date();\n    this.isToday = this.formatter.isSameDay(this.focusDay, today);\n    const longNames = this.resolvedConfig.longDayNames;\n    const dayIdx = this.focusDay.getDay();\n    const mondayIdx = dayIdx === 0 ? 6 : dayIdx - 1;\n    this.dayName = longNames[mondayIdx];\n  }\n\n  /** Filters, splits, and lays out events for the focus day. */\n  private refreshEvents() {\n    if (!this.focusDay) return;\n\n    const rangeStart = new Date(this.focusDay);\n    rangeStart.setHours(0, 0, 0, 0);\n    const rangeEnd = new Date(this.focusDay);\n    rangeEnd.setHours(23, 59, 59, 999);\n\n    const filtered = this.events.filter((e) =>\n      this.layoutService.eventsOverlap(e.startTime, e.endTime, rangeStart, rangeEnd),\n    );\n\n    this.displayEvents = this.layoutService.calculateMultiDayEvents(\n      filtered,\n      this.resolvedConfig.startHour,\n      this.resolvedConfig.endHour,\n      rangeStart,\n      rangeEnd,\n    );\n\n    this.layoutService.assignColumnsToEvents(this.displayEvents);\n    this.layoutService.assignWidthsToEvents(this.displayEvents, rangeStart, rangeEnd);\n\n    this.totalColumns = this.displayEvents.reduce(\n      (max, e) => Math.max(max, (e.column ?? 0) + (e.width ?? 1)),\n      1,\n    );\n  }\n\n  /** Updates the current-time red line position. */\n  private updateCurrentTime() {\n    const now = new Date();\n    if (this.focusDay && this.formatter.isSameDay(this.focusDay, now)) {\n      this.currentTimeRow = CalendarUtility.getCorrectRow(\n        now.getHours(),\n        now.getMinutes(),\n        this.resolvedConfig.startHour,\n      );\n      this.isToday = true;\n      // formatTime is async; refresh the label and re-render when it resolves.\n      this.formatter.formatTime(now).then((label) => {\n        this.currentTimeLabel = label;\n        this.cdr.markForCheck();\n      });\n    } else {\n      this.currentTimeRow = 0;\n      this.isToday = false;\n      this.currentTimeLabel = '';\n    }\n    // The minute tick is a bare setInterval, so neither branch is reached through anything\n    // Angular wraps. Only the `then` above marked anything, which left a view opened on a\n    // day that stops being today painting its \"now\" line forever.\n    this.cdr.markForCheck();\n  }\n}\n","<!-- Day grid. One column, its header centered over that column (the toolbar\n     already names the date). Today's number is tinted, not filled; the now-line\n     carries a time bubble that overhangs into the gutter. -->\n<div [attr.aria-label]=\"dayViewLabel\" class=\"w-full h-full flex flex-col overflow-hidden\" role=\"grid\">\n  <div class=\"grid grid-cols-[60px_1fr]\">\n    <div></div>\n    <div class=\"flex items-center justify-center gap-2 py-2 px-1\" role=\"columnheader\">\n      <span class=\"text-[11px] font-semibold uppercase tracking-wide opacity-50\">{{ dayName }}</span>\n      <span class=\"text-base font-bold tabular-nums\" [class.text-primary]=\"isToday\">{{ focusDay.getDate() }}</span>\n    </div>\n  </div>\n  <div class=\"grid grid-cols-[60px_1fr] flex-1 min-h-0 overflow-hidden items-stretch\">\n    <div class=\"grid h-full min-h-0\" [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\">\n      @for (row of hourRows; track row.topRow) {\n        <div class=\"flex items-start justify-end min-h-0 overflow-hidden pr-2 text-[11px] tabular-nums opacity-50\"\n          [style.grid-row]=\"row.topRow + '/' + row.bottomRow\">\n          {{ row.hourLabel }}\n        </div>\n      }\n    </div>\n    <div class=\"grid relative auto-rows-fr h-full min-h-0\"\n      [style.grid-template-rows]=\"'repeat(' + totalRows + ', minmax(1.5rem, 1fr))'\"\n      [style.grid-template-columns]=\"'repeat(' + totalColumns + ', 1fr)'\">\n      @for (row of hourRows; track row.topRow) {\n        <div class=\"border-t border-base-200 pointer-events-none min-h-0\"\n          [style.grid-row]=\"row.topRow + '/' + row.bottomRow\"\n          [style.grid-column]=\"'1 / -1'\">\n        </div>\n      }\n      @if (currentTimeRow > 0 && isToday) {\n        <div class=\"relative z-[2] pointer-events-none\"\n          [style.grid-row]=\"currentTimeRow\"\n          [style.grid-column]=\"'1 / -1'\">\n          <div class=\"absolute -left-1 -top-1 h-2 w-2 rounded-full bg-error\"></div>\n          <div class=\"h-0.5 w-full bg-error\"></div>\n          <div class=\"absolute left-0 top-0 -translate-x-2 -translate-y-1/2 rounded-full bg-error px-1.5 py-0.5 text-[10px] font-bold tabular-nums text-error-content shadow\">{{ currentTimeLabel }}</div>\n        </div>\n      }\n      @for (event of displayEvents; track $index) {\n        <div class=\"z-[1] min-h-0 overflow-hidden rounded-lg p-0.5 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-primary\"\n          [style.grid-row]=\"getEventRow(event)\"\n          [style.grid-column]=\"getEventColumn(event)\"\n             (click)=\"onEventClick(event)\"\n             (keyup.enter)=\"onEventClick(event)\"\n             tabindex=\"0\">\n          <mn-calendar-event [customComponent]=\"calendarEventComponent\" [event]=\"event\"></mn-calendar-event>\n        </div>\n      }\n    </div>\n  </div>\n</div>\n","import {\n  ChangeDetectorRef,\n  Component,\n  Input,\n  OnInit,\n  Output,\n  EventEmitter,\n  inject,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CALENDAR_DATE_FORMATTER, CalendarDateFormatter } from 'mn-angular-lib/calendar-core';\nimport { DefaultCalendarDateFormatter } from 'mn-angular-lib/calendar-core';\n\n/**\n * Renders a single row in the upcoming-events sidebar.\n * Shows the event title, formatted date/time, and optional description.\n */\n@Component({\n  selector: 'mn-upcoming-event-row',\n  standalone: true,\n  imports: [CommonModule],\n  templateUrl: './upcoming-event-row.component.html',\n})\nexport class UpcomingEventRowComponent implements OnInit {\n  /** The event to display. */\n  @Input() event!: CalendarEvent;\n  /** Emits the event when this row is clicked. */\n  @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n  formattedDate = '';\n\n  private formatter: CalendarDateFormatter;\n\n  /** Marks the view when the awaited time string lands (see {@link ngOnInit}). */\n  private readonly cdr = inject(ChangeDetectorRef);\n\n  constructor() {\n    const formatter = inject<CalendarDateFormatter | null>(CALENDAR_DATE_FORMATTER, {\n      optional: true,\n    });\n\n    this.formatter = formatter ?? new DefaultCalendarDateFormatter();\n  }\n\n  async ngOnInit() {\n    if (this.event) {\n      const start = await this.formatter.formatTime(this.event.startTime);\n      const end = await this.formatter.formatTime(this.event.endTime);\n      this.formattedDate = `${start} - ${end}`;\n      // The first render already happened with the empty string; nothing schedules a second\n      // one for a value written after an await. Same fix as calendar-event-default.\n      this.cdr.markForCheck();\n    }\n  }\n}\n","<!-- Sidebar row in the shared chip language: a colored rail from the event's own\n     colour, a hover wash, and space-grouped content — no boxed borders. -->\n<div (click)=\"eventClicked.emit(event)\"\n     (keyup.enter)=\"eventClicked.emit(event)\"\n     class=\"grid grid-cols-[3px_1fr] items-stretch gap-2.5 mb-1.5 cursor-pointer rounded-lg p-2 transition-colors hover:bg-base-200 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-primary motion-reduce:transition-none\"\n     tabindex=\"0\">\n  <div class=\"rounded-full\" [style.background-color]=\"event.color.primaryColor\"></div>\n  <div class=\"min-w-0\">\n    <div class=\"truncate text-[13px] font-semibold\">{{ event.title }}</div>\n    <div class=\"text-xs tabular-nums opacity-60\">{{ formattedDate }}</div>\n    @if (event.description) {\n      <div class=\"truncate text-xs opacity-50\">{{ event.description }}</div>\n    }\n  </div>\n</div>\n","import {\n  ChangeDetectorRef,\n  Component,\n  EventEmitter,\n  inject,\n  Input,\n  OnChanges,\n  OnDestroy,\n  OnInit,\n  Output,\n  SimpleChanges,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Observable, Subject, takeUntil } from 'rxjs';\nimport { CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport {\n  CalendarConfig,\n  DEFAULT_CALENDAR_CONFIG,\n  resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { UpcomingEventRowComponent } from '../upcoming-event-row/upcoming-event-row.component';\nimport { MnLanguageService } from 'mn-angular-lib/core';\n\n/**\n * Sidebar component that lists the next 10 upcoming events\n * (events whose end time is in the future), sorted by start time.\n */\n@Component({\n  selector: 'mn-upcoming-events',\n  standalone: true,\n  imports: [CommonModule, UpcomingEventRowComponent],\n  templateUrl: './upcoming-events.component.html',\n})\nexport class UpcomingEventsComponent implements OnInit, OnChanges, OnDestroy {\n  private readonly lang = inject(MnLanguageService);\n  private readonly cdr = inject(ChangeDetectorRef);\n\n  /**\n   * Accessible name for this control. Resolved through the conventional\n   * `mnCalendar.upcomingEvents` key so an app can translate it, falling back to English when the\n   * key is not defined rather than leaking the raw key into the UI.\n   */\n  get upcomingEventsLabel(): string {\n    return this.lang.translateIfPresent('mnCalendar.upcomingEvents') ?? 'Upcoming events';\n  }\n\n  /** Observable that emits the full event list whenever it changes. */\n  @Input() eventsChanged!: Observable<CalendarEvent[]>;\n  /** Resolved calendar configuration passed from the parent view. */\n  @Input() config?: CalendarConfig;\n  /** Emits when an upcoming event row is clicked. */\n  @Output() eventClicked = new EventEmitter<CalendarEvent>();\n\n  upcomingEvents: CalendarEvent[] = [];\n  title: string;\n  noEventsMessage: string;\n\n  private destroy$ = new Subject<void>();\n\n  constructor() {\n    this.title = DEFAULT_CALENDAR_CONFIG.upcomingEventsTitle;\n    this.noEventsMessage = DEFAULT_CALENDAR_CONFIG.noUpcomingEvents;\n  }\n\n  /** Re-read labels when the config input changes (e.g. after a locale switch). */\n  ngOnChanges(changes: SimpleChanges) {\n    if (changes['config'] && this.config) {\n      const resolved = resolveCalendarConfig(this.config);\n      this.title = resolved.upcomingEventsTitle;\n      this.noEventsMessage = resolved.noUpcomingEvents;\n    }\n  }\n\n  ngOnInit() {\n    const resolved = this.config\n      ? resolveCalendarConfig(this.config)\n      : { ...DEFAULT_CALENDAR_CONFIG };\n    this.title = resolved.upcomingEventsTitle;\n    this.noEventsMessage = resolved.noUpcomingEvents;\n\n    // Marked because the list is a plain field: in a zoneless app a stream emission is not by\n    // itself a reason for Angular to re-render, so the sidebar would keep showing the events it\n    // was first given.\n    if (this.eventsChanged) {\n      this.eventsChanged.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n        const now = new Date();\n        this.upcomingEvents = events\n          .filter((e) => e.endTime > now)\n          .sort((a, b) => a.startTime.getTime() - b.startTime.getTime())\n          .slice(0, 10);\n        this.cdr.markForCheck();\n      });\n    }\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  /** trackBy for upcoming event rows. */\n  trackByEvent(_index: number, event: CalendarEvent): string {\n    return event.id;\n  }\n}\n","<div [attr.aria-label]=\"upcomingEventsLabel\" class=\"p-4\" role=\"complementary\">\n  <div class=\"mb-3 flex items-center gap-2\">\n    <h3 class=\"text-sm font-bold tracking-wide\">{{ title }}</h3>\n    @if (upcomingEvents.length) {\n      <span class=\"text-xs font-semibold tabular-nums opacity-45\">{{ upcomingEvents.length }}</span>\n    }\n  </div>\n  @for (event of upcomingEvents; track $index) {\n    <mn-upcoming-event-row\n      [event]=\"event\"\n      (eventClicked)=\"eventClicked.emit($event)\">\n    </mn-upcoming-event-row>\n  }\n  @if (upcomingEvents.length === 0) {\n    <div class=\"text-sm opacity-50\">{{ noEventsMessage }}</div>\n  }\n</div>\n","import {\n  ChangeDetectorRef,\n  Component,\n  DestroyRef,\n  EventEmitter,\n  HostListener,\n  inject,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n  Type,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { LucideDynamicIcon } from '@lucide/angular';\nimport { BehaviorSubject, skip, Subject, takeUntil } from 'rxjs';\nimport { CalendarButton, CalendarEvent } from 'mn-angular-lib/calendar-core';\nimport { CalendarEventData } from 'mn-angular-lib/calendar-core';\nimport {\n  CALENDAR_CONFIG,\n  CalendarConfig,\n  CalendarView,\n  DEFAULT_CALENDAR_CONFIG,\n  MN_CALENDAR_CONFIG,\n  provideMnCalendarConfig,\n  resolveCalendarConfig,\n} from 'mn-angular-lib/calendar-core';\nimport { MnLanguageService } from 'mn-angular-lib/core';\nimport { CalendarMonthComponent } from '../calendar-month/calendar-month.component';\nimport { CalendarWeekComponent } from '../calendar-week/calendar-week.component';\nimport { CalendarDayComponent } from '../calendar-day/calendar-day.component';\nimport { UpcomingEventsComponent } from '../upcoming-events/upcoming-events.component';\nimport { MnButton } from 'mn-angular-lib/button';\nimport { MnDatetime } from 'mn-angular-lib/forms';\nimport * as lucide from 'lucide';\nimport { lucideIcons } from 'mn-angular-lib/core';\n\n/** Lucide icons this file renders. */\nconst ICONS = lucideIcons({ ChevronLeft: lucide.ChevronLeft, ChevronRight: lucide.ChevronRight });\n\n/** Gives each calendar instance a unique id to tie its tabs to its view panel. */\nlet instanceCounter = 0;\n\n/**\n * Main calendar orchestrator component.\n *\n * Provides a toolbar with view switching (month / week / day), date navigation,\n * and an optional action button. The active view and an upcoming-events sidebar\n * are rendered inside a responsive grid layout.\n *\n * All configuration (visible hours, locale, labels, mobile breakpoint) is read\n * from the `mn-config.json5` system via {@link MN_CALENDAR_CONFIG}, falling back\n * to the legacy {@link CALENDAR_CONFIG} injection token, then to built-in defaults.\n * Date formatting is delegated to the {@link CALENDAR_DATE_FORMATTER} token.\n *\n * @example\n * ```html\n * <mn-calendar-view\n *   [showButton]=\"true\"\n *   [buttonTitle]=\"'New Event'\"\n *   [NewCalendarItemsEvent]=\"eventsEmitter\"\n *   (RequestNewCalendarItemsEvent)=\"loadEvents($event)\"\n *   (CalendarItemClickedEvent)=\"onEventClick($event)\"\n *   (ButtonClickedEvent)=\"openModal()\">\n * </mn-calendar-view>\n * ```\n */\n@Component({\n  selector: 'mn-calendar-view',\n  standalone: true,\n  imports: [\n    CommonModule,\n    FormsModule,\n    CalendarMonthComponent,\n    CalendarWeekComponent,\n    CalendarDayComponent,\n    UpcomingEventsComponent,\n    MnButton,\n    MnDatetime,\n    LucideDynamicIcon,\n  ],\n  templateUrl: './calendar-view.component.html',\n  providers: [provideMnCalendarConfig(DEFAULT_CALENDAR_CONFIG)],\n  styles: [\n    `\n      :host {\n        display: flex;\n        flex-direction: column;\n        width: 100%;\n        height: 100%;\n      }\n    `,\n  ],\n})\nexport class CalendarViewComponent implements OnInit, OnDestroy {\n  /** Lucide icons the template renders. */\n  protected readonly icons = ICONS;\n\n  /**\n   * Accessible name for this control. Resolved through the conventional\n   * `mnCalendar.calendarView` key so an app can translate it, falling back to English when the\n   * key is not defined rather than leaking the raw key into the UI.\n   */\n  get calendarViewLabel(): string {\n    return this.lang.translateIfPresent('mnCalendar.calendarView') ?? 'Calendar view';\n  }\n\n  /** Whether to show the action button in the toolbar. */\n  @Input() showButton = false;\n  /** Label text for the action button. */\n  @Input() buttonTitle = '';\n  /** Array of buttons to display in the toolbar's top-right area. */\n  @Input() buttons: CalendarButton[] = [];\n  /** Custom event renderer component type. */\n  @Input() CalendarEventComponent?: Type<CalendarEventData>;\n  /** Observable or EventEmitter that pushes new event arrays into the calendar. */\n  @Input() NewCalendarItemsEvent?: EventEmitter<CalendarEvent[]>;\n\n  /** Emits when the calendar needs fresh event data (e.g. after navigation). */\n  @Output() RequestNewCalendarItemsEvent = new EventEmitter<Date>();\n  /** Emits when a calendar event is clicked. */\n  @Output() CalendarItemClickedEvent = new EventEmitter<CalendarEvent>();\n  /** Emits when the action button is clicked. */\n  @Output() ButtonClickedEvent = new EventEmitter<void>();\n\n  readonly CalendarView = CalendarView;\n  /** Ties the view tabs to the panel they control, uniquely per calendar. */\n  readonly panelId = `mn-calendar-panel-${++instanceCounter}`;\n  currentView = CalendarView.WEEK;\n  focusDay = new Date();\n  viewOptions: { value: CalendarView; label: string }[] = [];\n  isMobileView = false;\n\n  /** BehaviorSubject so late-subscribing child views receive the last emitted events. */\n  internalEventsChanged = new BehaviorSubject<CalendarEvent[]>([]);\n  /** Subject for broadcasting focus-day changes to child views. */\n  internalFocusDayChanged = new Subject<Date>();\n\n  private destroy$ = new Subject<void>();\n  protected config: CalendarConfig;\n  /** Reference to the injected mn-config object (mutated in-place on locale change). */\n  private readonly mnConfigRef: CalendarConfig | null;\n  private readonly destroyRef = inject(DestroyRef);\n  private readonly lang = inject(MnLanguageService);\n  private readonly cdr = inject(ChangeDetectorRef);\n\n  constructor() {\n    const mnConfig = inject<CalendarConfig | null>(MN_CALENDAR_CONFIG, { optional: true });\n    const legacyConfig = inject<CalendarConfig | null>(CALENDAR_CONFIG, { optional: true });\n\n    // Keep a reference to the injected config so we can re-read it after locale changes.\n    this.mnConfigRef = mnConfig;\n    // Priority: mn-config system > legacy CALENDAR_CONFIG > built-in defaults\n    const raw = mnConfig ?? legacyConfig ?? undefined;\n    this.config = resolveCalendarConfig(raw as Partial<CalendarConfig> | undefined);\n  }\n\n  @HostListener('window:resize')\n  onResize() {\n    this.checkMobileView();\n  }\n\n  ngOnInit() {\n    this.rebuildFromConfig();\n\n    // Re-resolve config when locale changes (supports $translate in mn-config). Marked because\n    // the labels it rebuilds are plain fields: a locale switch arrives on a stream, which in a\n    // zoneless app is not by itself a reason for Angular to re-render the toolbar.\n    const sub = this.lang.locale$.pipe(skip(1)).subscribe(() => {\n      this.rebuildFromConfig();\n      this.cdr.markForCheck();\n    });\n    this.destroyRef.onDestroy(() => sub.unsubscribe());\n\n    this.checkMobileView();\n    this.RequestNewCalendarItemsEvent.emit(this.focusDay);\n\n    if (this.NewCalendarItemsEvent) {\n      this.NewCalendarItemsEvent.pipe(takeUntil(this.destroy$)).subscribe((events) => {\n        this.internalEventsChanged.next(events);\n      });\n    }\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  /** Switches the active view. On mobile, forces day view. */\n  switchView(view: CalendarView) {\n    if (this.isMobileView) {\n      this.currentView = CalendarView.DAY;\n      return;\n    }\n    this.currentView = view;\n  }\n\n  /**\n   * Names the stretch of time on screen — the day, the week, or the month. It is\n   * the toolbar's orientation: without it, navigating leaves you somewhere with\n   * no label. Announced politely, so stepping through says where you landed.\n   */\n  get periodLabel(): string {\n    const locale = this.config.locale;\n\n    if (this.currentView === CalendarView.MONTH) {\n      return this.focusDay.toLocaleDateString(locale, { month: 'long', year: 'numeric' });\n    }\n\n    if (this.currentView === CalendarView.DAY) {\n      // No weekday: the view's own column header already says which day it is,\n      // and the year only earns its place once it stops being the obvious one.\n      return this.focusDay.toLocaleDateString(locale, {\n        day: 'numeric',\n        month: 'long',\n        ...(this.focusDay.getFullYear() !== new Date().getFullYear() ? { year: 'numeric' } : {}),\n      });\n    }\n\n    const start = this.startOfWeek(this.focusDay);\n    const end = new Date(start);\n    end.setDate(end.getDate() + 6);\n    // Only repeat what actually changes across the week's two ends.\n    const from =\n      start.getFullYear() !== end.getFullYear()\n        ? start.toLocaleDateString(locale, { day: 'numeric', month: 'short', year: 'numeric' })\n        : start.toLocaleDateString(locale, {\n            day: 'numeric',\n            ...(start.getMonth() !== end.getMonth() ? { month: 'short' } : {}),\n          });\n    const to = end.toLocaleDateString(locale, { day: 'numeric', month: 'short', year: 'numeric' });\n    return `${from} – ${to}`;\n  }\n\n  /** The focus day as YYYY-MM-DD, for the toolbar's date picker. */\n  get focusDayString(): string {\n    const pad = (n: number) => n.toString().padStart(2, '0');\n    const d = this.focusDay;\n    return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n  }\n\n  /**\n   * Steps the calendar by one unit of whatever is on screen: a day in day view,\n   * a week in week view, a month in month view. Navigating by the visible unit is\n   * what makes one pair of arrows serve all three.\n   */\n  navigate(step: number) {\n    const next = new Date(this.focusDay);\n\n    switch (this.currentView) {\n      case CalendarView.DAY:\n        next.setDate(next.getDate() + step);\n        break;\n      case CalendarView.WEEK:\n        next.setDate(next.getDate() + step * 7);\n        break;\n      default:\n        this.setFocusDay(this.addMonths(this.focusDay, step));\n        return;\n    }\n\n    this.setFocusDay(next);\n  }\n\n  /** Returns the calendar to today. */\n  goToToday() {\n    this.setFocusDay(new Date());\n  }\n\n  /**\n   * Handles the toolbar date picker.\n   * @param value The date string in YYYY-MM-DD format.\n   */\n  onPickDate(value: string) {\n    if (!value) return;\n    const picked = new Date(value + 'T00:00:00');\n    if (isNaN(picked.getTime())) return;\n    this.setFocusDay(picked);\n  }\n\n  /** Handles a day click from the month view â€” switches to day view. */\n  onMonthDayClick(date: Date) {\n    this.currentView = CalendarView.DAY;\n    this.setFocusDay(date);\n  }\n\n  /** Forwards a child event click to the parent output. */\n  onEventClick(event: CalendarEvent) {\n    this.CalendarItemClickedEvent.emit(event);\n  }\n\n  /** trackBy for view option buttons. */\n  trackByView(_index: number, item: { value: CalendarView }): string {\n    return item.value;\n  }\n\n  /** Rebuilds view options and labels from the current config. */\n  private rebuildFromConfig() {\n    // Re-resolve from the injected config reference which is mutated in-place by the provider on locale change.\n    if (this.mnConfigRef) {\n      this.config = resolveCalendarConfig(this.mnConfigRef as Partial<CalendarConfig>);\n    }\n    this.viewOptions = [\n      { value: CalendarView.MONTH, label: this.config.viewLabels['MONTH'] ?? 'Month' },\n      { value: CalendarView.WEEK, label: this.config.viewLabels['WEEK'] ?? 'Week' },\n      { value: CalendarView.DAY, label: this.config.viewLabels['DAY'] ?? 'Day' },\n    ];\n  }\n\n  private checkMobileView() {\n    const wasMobile = this.isMobileView;\n    const width = window.innerWidth;\n    // Honour the configured mobile breakpoint (default 768) rather than a hard-coded\n    // width: a seven-column week is cramped well before a phone's width, so the day\n    // view takes over earlier — and consumers can tune where via `mobileBreakpoint`.\n    const breakpoint = this.config.mobileBreakpoint;\n    this.isMobileView = width < breakpoint;\n    if (this.isMobileView && !wasMobile) {\n      this.currentView = CalendarView.DAY;\n    }\n  }\n\n  /**\n   * Adds months without the end-of-month overflow `setMonth` alone produces —\n   * 31 January plus one month is 28 February, not 3 March.\n   */\n  private addMonths(date: Date, months: number): Date {\n    const day = date.getDate();\n    const shifted = new Date(date);\n    shifted.setDate(1);\n    shifted.setMonth(shifted.getMonth() + months);\n    const lastDayOfMonth = new Date(shifted.getFullYear(), shifted.getMonth() + 1, 0).getDate();\n    shifted.setDate(Math.min(day, lastDayOfMonth));\n    return shifted;\n  }\n\n  /** Monday of the week containing `date`, matching the grid the views draw. */\n  private startOfWeek(date: Date): Date {\n    const start = new Date(date);\n    start.setHours(0, 0, 0, 0);\n    start.setDate(start.getDate() - ((start.getDay() + 6) % 7));\n    return start;\n  }\n\n  private setFocusDay(date: Date) {\n    this.focusDay = date;\n    this.internalFocusDayChanged.next(date);\n    this.RequestNewCalendarItemsEvent.emit(date);\n  }\n}\n","<div class=\"w-full h-full flex flex-col\" role=\"application\" aria-label=\"Calendar\">\n\n  <!-- Toolbar has one layout below the desktop (`lg`) width and one at it. Below\n       `lg`: a controls row (Today anchored left, the right-hand cluster anchored\n       right) with the ‹ date › nav centred on its own row beneath — the same\n       shape from phone through tablet, so nothing wraps into a lopsided diagonal.\n       At `lg`, where the upcoming-events sidebar also appears, the nav folds up\n       inline after Today and the whole toolbar becomes a single row. The one JS\n       breakpoint (`mobileBreakpoint`) governs the phone controls — icon-only\n       picker, hidden view-switcher, forced day view — not the toolbar's shape. -->\n  <div class=\"flex flex-wrap items-center gap-x-3 gap-y-2 py-3\">\n\n    <button (click)=\"goToToday()\"\n            [data]=\"{ variant: 'outline', size: 'md', color: 'primary' }\"\n            class=\"shrink-0\"\n            mnButton\n            type=\"button\">\n      {{ config.todayLabel }}\n    </button>\n\n    <!-- Stepping through time. The arrows sit either side of the date they move,\n         so the control and the thing it controls read as one unit. Below `lg` it\n         sits centred on its own row (basis-full, ordered last) — a period header\n         above the grid, tight rather than flinging the arrows to the row's edges.\n         At `lg` it folds inline right after Today, taking a stable min-width so\n         the arrows don't jitter as the label's length changes. -->\n    <div class=\"flex basis-full order-last justify-center items-center gap-1\n                lg:basis-auto lg:order-none lg:justify-start\">\n      <button (click)=\"navigate(-1)\"\n              [attr.aria-label]=\"config.previousLabel\"\n              [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n              class=\"shrink-0\"\n              mnButton\n              type=\"button\">\n        <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronLeft\"></svg>\n      </button>\n\n      <h2 aria-live=\"polite\"\n          class=\"text-center text-base font-semibold whitespace-nowrap px-1 lg:min-w-56\">\n        {{ periodLabel }}\n      </h2>\n\n      <button (click)=\"navigate(1)\"\n              [attr.aria-label]=\"config.nextLabel\"\n              [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n              class=\"shrink-0\"\n              mnButton\n              type=\"button\">\n        <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronRight\"></svg>\n      </button>\n    </div>\n\n    <!-- Right-hand controls travel together as one cluster with `ml-auto`, so they\n         hold to the right of the row on every width — and when space runs short the\n         whole group wraps to a new line as a unit rather than stranding a lone\n         button. On desktop the cluster lands above the upcoming-events sidebar,\n         using that otherwise-empty space. -->\n    <div class=\"ml-auto flex items-center gap-2\">\n      <!-- On mobile the picker collapses to its icon-only variant. -->\n      <mn-lib-datetime (ngModelChange)=\"onPickDate($event)\"\n                       [ngModel]=\"focusDayString\"\n                       [props]=\"{ id: panelId + '-date', mode: 'date', placeholder: config.pickDateLabel, size: 'md', borderRadius: 'lg', hover: true, iconOnly: isMobileView }\"\n                       class=\"block\"></mn-lib-datetime>\n\n      <!-- View switcher (month / week / day) — hidden on mobile, which is forced to day view. -->\n      @if (!isMobileView) {\n        <div [attr.aria-label]=\"calendarViewLabel\" class=\"flex border border-base-300 rounded-md overflow-hidden\"\n             role=\"tablist\">\n          @for (view of viewOptions; track view.value) {\n            <button\n              (click)=\"switchView(view.value)\"\n              [attr.aria-controls]=\"panelId\"\n              [attr.aria-selected]=\"currentView === view.value\"\n              [data]=\"{ size: 'md', variant: currentView === view.value ? 'fill' : 'text', color: 'primary' }\"\n              mnButton\n              role=\"tab\"\n              type=\"button\">\n              {{ view.label }}\n            </button>\n          }\n        </div>\n      }\n\n      <!-- Action buttons (custom buttons + optional showButton CTA). -->\n      @if (buttons.length || showButton) {\n        @for (btn of buttons; track btn.label) {\n          <button (click)=\"btn.onClick()\" [data]=\"btn.buttonData || {}\" mnButton type=\"button\">\n            {{ btn.label }}\n          </button>\n        }\n        @if (showButton) {\n          <button (click)=\"ButtonClickedEvent.emit()\" [data]=\"{}\" mnButton type=\"button\">\n            {{ buttonTitle }}\n          </button>\n        }\n      }\n    </div>\n\n  </div>\n\n  <div class=\"grid grid-cols-1 lg:grid-cols-[1fr_220px] gap-3 flex-1 min-h-0\">\n    <div [id]=\"panelId\" class=\"min-w-0 min-h-0 overflow-hidden overflow-y-auto\" role=\"tabpanel\">\n      @if (currentView === CalendarView.MONTH) {\n        <mn-calendar-month\n          [focusDay]=\"focusDay\"\n          [eventsChanged]=\"internalEventsChanged\"\n          [focusDayChanged]=\"internalFocusDayChanged\"\n          [config]=\"config\"\n          (dayClicked)=\"onMonthDayClick($event)\">\n        </mn-calendar-month>\n      }\n      @if (currentView === CalendarView.WEEK) {\n        <mn-calendar-week\n          [focusDay]=\"focusDay\"\n          [eventsChanged]=\"internalEventsChanged\"\n          [focusDayChanged]=\"internalFocusDayChanged\"\n          [config]=\"config\"\n          [calendarEventComponent]=\"CalendarEventComponent\"\n          (eventClicked)=\"onEventClick($event)\">\n        </mn-calendar-week>\n      }\n      @if (currentView === CalendarView.DAY) {\n        <mn-calendar-day\n          [focusDay]=\"focusDay\"\n          [eventsChanged]=\"internalEventsChanged\"\n          [focusDayChanged]=\"internalFocusDayChanged\"\n          [config]=\"config\"\n          [calendarEventComponent]=\"CalendarEventComponent\"\n          (eventClicked)=\"onEventClick($event)\">\n        </mn-calendar-day>\n      }\n    </div>\n    <div class=\"hidden lg:block border-l border-base-300 overflow-auto\">\n      <mn-upcoming-events\n        [eventsChanged]=\"internalEventsChanged\"\n        [config]=\"config\"\n        (eventClicked)=\"onEventClick($event)\">\n      </mn-upcoming-events>\n    </div>\n  </div>\n\n</div>\n","import {\n  afterNextRender,\n  ChangeDetectionStrategy,\n  Component,\n  computed,\n  DestroyRef,\n  ElementRef,\n  inject,\n  Injector,\n  input,\n  linkedSignal,\n  OnInit,\n  output,\n  signal,\n  viewChildren,\n} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule} from '@angular/forms';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport { LucideDynamicIcon } from '@lucide/angular';\nimport {MnButton} from 'mn-angular-lib/button';\nimport {MnDatetime} from 'mn-angular-lib/forms';\nimport {MnLanguageService} from 'mn-angular-lib/core';\nimport * as lucide from 'lucide';\nimport { lucideIcons } from 'mn-angular-lib/core';\n\n/** Lucide icons this file renders. */\nconst ICONS = lucideIcons({ ChevronLeft: lucide.ChevronLeft, ChevronRight: lucide.ChevronRight });\n\n/**\n * How the bar arranges itself at its current width.\n *\n * - `inline` — the day strip and Today share one row, under the month header. The\n *   strip never stacks: as space runs out it shows fewer days rather than adding a\n *   row.\n * - `compact` — too narrow even for a three-day strip, so the days give way to a\n *   date picker sitting beside Today, still under the month header.\n *\n * Resolved from the bar's own width — not the viewport — so a bar in a narrow\n * sidebar lays itself out like a phone even on a wide screen.\n */\nexport type DateSelectorBarLayout = 'compact' | 'inline';\n\n/** Represents a single day tile in the date selector. */\nexport type DayTile = {\n  /** The full date object (at midnight). */\n  date: Date;\n  /** Short day name (e.g. 'ma', 'Mon'). */\n  dayName: string;\n  /** Day-of-month number. */\n  dayNumber: number;\n  /** Short month name (e.g. 'mei', 'Jun'). */\n  monthName: string;\n  /**\n   * Whether this tile is the first day of a month within the visible strip. The\n   * days either side of it move apart, so the break is visible without a label —\n   * the month header above the strip names both months.\n   */\n  startsNewMonth: boolean;\n  /** Whether this tile is the currently selected date. */\n  isSelected: boolean;\n  /** Whether this tile represents today. */\n  isToday: boolean;\n  /** Full, locale-formatted date used as the tile's accessible name. */\n  accessibleLabel: string;\n};\n\n/** A full week: the most days the strip shows, and the size it aligns to. */\nconst DAYS_IN_WEEK = 7;\n/** Fewest days worth showing before the picker takes over instead. */\nconst MIN_TILE_COUNT = 3;\n/** `Date.getDay()` value for Monday. */\nconst MONDAY = 1;\n/**\n * Width one day occupies. Days are sized by their content: a three-letter weekday\n * and a two-digit number at their set sizes measure about 72px including padding,\n * plus the `gap-1` beside it. Rounded up, because coming in under the real width\n * overflows the strip into the arrow beside it.\n */\nconst TILE_SLOT_WIDTH = 80;\n/** Space reserved for the two borderless window arrows and their gaps. */\nconst ARROWS_ZONE_WIDTH = 88;\n/**\n * Space the Today button claims, including the bar's own horizontal padding and\n * the gap beside it.\n */\nconst CONTROLS_ZONE_WIDTH = 150;\n/**\n * Everything on the controls row that isn't a day tile. The month is a full-width\n * header on its own line now, so it no longer competes with the days for room —\n * which is why more of them fit at a given width than they used to.\n */\nconst RESERVED_WIDTH = ARROWS_ZONE_WIDTH + CONTROLS_ZONE_WIDTH;\n/** Below this the strip can't hold even {@link MIN_TILE_COUNT} days. */\nconst COMPACT_MAX_WIDTH = MIN_TILE_COUNT * TILE_SLOT_WIDTH + RESERVED_WIDTH;\n/** Assumed width before the first measurement (and during server-side rendering). */\nconst UNMEASURED_WIDTH = 960;\n\n/** Counter used to give each bar instance a unique date-picker id. */\nlet instanceCounter = 0;\n\n/**\n * Reusable, responsive date selector bar.\n *\n * Renders a \"Today\" button, a month header, previous/next arrows and a strip of\n * day tiles. Selecting a tile or pressing \"Today\" emits the chosen day via\n * {@link dateSelected}. The arrows only shift the visible days and never emit.\n *\n * Given room, the strip is a whole week running Monday to Sunday, so the weekday\n * columns hold still as you page and no weekday appears twice. As the bar narrows\n * it shows fewer days rather than adding a second row — a partial strip has no\n * week to align to, so it slides to keep the selection in view instead. Narrower\n * still, and the days give way to a date picker beside Today, which keeps every\n * date reachable on a phone rather than leaving a strip too cramped to use.\n *\n * Selecting a day already on the strip leaves it exactly where it is; a selection\n * from outside moves the strip to where that day is. The arrows page by whatever\n * is on show, without touching the selection.\n *\n * The component carries no hard-coded copy: button, placeholder and assistive\n * text are supplied through the label inputs, and day/month names follow\n * {@link locale} (falling back to the active {@link MnLanguageService} locale).\n *\n * @example\n * ```html\n * <mn-date-selector-bar\n *   [selectedDate]=\"focusDay\"\n *   [todayLabel]=\"'Today'\"\n *   [pickDateLabel]=\"'Pick a date'\"\n *   [locale]=\"'nl-NL'\"\n *   (dateSelected)=\"onDaySelected($event)\">\n * </mn-date-selector-bar>\n * ```\n */\n@Component({\n  selector: 'mn-date-selector-bar',\n  standalone: true,\n  imports: [\n    CommonModule,\n    FormsModule,\n    MnButton,\n    MnDatetime,\n    LucideDynamicIcon,\n  ],\n  templateUrl: './mn-date-selector-bar.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  // Styling lives entirely in the template as Tailwind utilities, as elsewhere in\n  // the library — there is no stylesheet for this component.\n  host: {class: 'block'},\n})\nexport class MnDateSelectorBar implements OnInit {\n  /** Lucide icons the template renders. */\n  protected readonly icons = ICONS;\n\n  /** The currently selected date, provided by the parent. */\n  readonly selectedDate = input<Date>(this.getToday());\n  /** Label for the \"Today\" button. */\n  readonly todayLabel = input<string>('Today');\n  /** Placeholder for the date picker shown in place of a too-cramped week strip. */\n  readonly pickDateLabel = input<string>('Pick a date');\n  /** Accessible name for the previous-week arrow. */\n  readonly previousLabel = input<string>('Show the previous week');\n  /** Accessible name for the next-week arrow. */\n  readonly nextLabel = input<string>('Show the next week');\n  /** Accessible name for the day strip as a whole. */\n  readonly dayStripLabel = input<string>('Select a day');\n  /**\n   * BCP 47 locale used to format day/month names. When empty, the active\n   * {@link MnLanguageService} locale is used.\n   */\n  readonly locale = input<string>('');\n  /** Emits when the user selects a new date. */\n  readonly dateSelected = output<Date>();\n\n  /** Unique id for this instance's date picker, so several bars can coexist. */\n  readonly pickerId = `mn-dsb-date-${++instanceCounter}`;\n\n  private readonly destroyRef = inject(DestroyRef);\n  private readonly injector = inject(Injector);\n  private readonly host = inject(ElementRef<HTMLElement>);\n  private readonly lang = inject(MnLanguageService);\n\n  private readonly tileButtons = viewChildren<ElementRef<HTMLButtonElement>>('tileButton');\n\n  /** The bar's own width in px, tracked so the layout follows its container. */\n  private readonly containerWidth = signal<number>(0);\n  /** Bumped whenever the active language changes so name formatting re-runs. */\n  private readonly localeTick = signal(0);\n\n  /** How the bar is arranged at the current width. */\n  readonly layout = computed<DateSelectorBarLayout>(() =>\n    (this.containerWidth() || UNMEASURED_WIDTH) >= COMPACT_MAX_WIDTH ? 'inline' : 'compact',\n  );\n\n  /** Whether the day strip is shown, or the picker has taken its place. */\n  readonly showDayStrip = computed<boolean>(() => this.layout() === 'inline');\n\n  /**\n   * Days in the visible strip: a full week where there's room, fewer as the bar\n   * narrows. The bar drops days rather than adding a second row, so it stays one\n   * line at every width it can.\n   */\n  readonly tileCount = computed<number>(() => {\n    if (!this.showDayStrip()) return 0;\n    const width = this.containerWidth() || UNMEASURED_WIDTH;\n    const fits = Math.floor((width - RESERVED_WIDTH) / TILE_SLOT_WIDTH);\n    return Math.min(DAYS_IN_WEEK, Math.max(MIN_TILE_COUNT, fits));\n  });\n\n\n  /** Effective locale: explicit input, else the active app locale. */\n  private readonly effectiveLocale = computed<string>(() => {\n    this.localeTick();\n    return this.locale() || this.lang.locale;\n  });\n\n  /**\n   * First day of the visible strip — the week's Monday when a whole week is on\n   * show, otherwise whatever start keeps the selection in view.\n   *\n   * The strip holds still while the selection stays on screen; a selection\n   * outside it moves to where that day is. The arrows write here directly to page\n   * away from the selection.\n   */\n  private readonly windowStart = linkedSignal<{selected: number; count: number}, Date>({\n    source: () => ({selected: this.selectedDate().getTime(), count: this.tileCount()}),\n    computation: (source, previous) => {\n      const selected = new Date(source.selected);\n      const {count} = source;\n      const anchored = this.anchorFor(selected, count);\n      if (!previous || count === 0) return anchored;\n\n      const current = previous.value;\n      const holdsSelection = (() => {\n        const offset = this.daysBetween(current, selected);\n        return offset >= 0 && offset < count;\n      })();\n\n      // A whole week must also still be Monday-aligned to be worth keeping —\n      // otherwise a strip that grew back to seven would keep a stale start.\n      const stillValid = count === DAYS_IN_WEEK\n        ? holdsSelection && current.getDay() === MONDAY\n        : holdsSelection;\n\n      return stillValid ? current : anchored;\n    },\n  });\n\n  /**\n   * Index of the tile that is currently keyboard-reachable (roving tabindex).\n   * Tracks the selection so Tab lands on the selected day, falling back to Monday\n   * when the selection has been paged out of sight.\n   */\n  private readonly focusedIndex = linkedSignal<number, number>({\n    source: () => this.selectedDate().getTime(),\n    computation: () => Math.max(0, this.indexOfSelected()),\n  });\n\n  /** The visible days, derived from the window start and the current selection. */\n  readonly dayTiles = computed<DayTile[]>(() => {\n    const count = this.tileCount();\n    if (count === 0) return [];\n\n    const start = this.windowStart();\n    const selected = this.selectedDate();\n    const today = this.getToday();\n    const locale = this.effectiveLocale();\n\n    const tiles: DayTile[] = [];\n    let previousMonth = -1;\n    let previousYear = -1;\n\n    for (let i = 0; i < count; i++) {\n      const date = new Date(start);\n      date.setDate(start.getDate() + i);\n\n      const month = date.getMonth();\n      const year = date.getFullYear();\n      const startsNewMonth = i > 0 && (month !== previousMonth || year !== previousYear);\n\n      tiles.push({\n        date,\n        dayName: date.toLocaleDateString(locale, {weekday: 'short'}),\n        dayNumber: date.getDate(),\n        monthName: date.toLocaleDateString(locale, {month: 'short'}),\n        startsNewMonth,\n        isSelected: this.isSameDay(date, selected),\n        isToday: this.isSameDay(date, today),\n        accessibleLabel: date.toLocaleDateString(locale, {\n          weekday: 'long',\n          day: 'numeric',\n          month: 'long',\n          year: 'numeric',\n        }),\n      });\n\n      previousMonth = month;\n      previousYear = year;\n    }\n\n    return tiles;\n  });\n\n  /**\n   * The month the strip is currently in, spelled out for the header that titles\n   * the bar — so the days below are never just loose numbers. Reads as a range\n   * when the strip straddles two months, and carries both years when it straddles\n   * two of those.\n   */\n  readonly monthCaption = computed<string>(() => {\n    const locale = this.effectiveLocale();\n    const tiles = this.dayTiles();\n\n    // With no strip to describe — the compact layout — the header names the\n    // month the selection sits in, so the bar is never unlabelled.\n    if (!tiles.length) {\n      return this.selectedDate().toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n    }\n\n    const first = tiles[0].date;\n    const last = tiles[tiles.length - 1].date;\n\n    if (first.getFullYear() !== last.getFullYear()) {\n      const from = first.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n      const to = last.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n      return `${from} – ${to}`;\n    }\n\n    if (first.getMonth() !== last.getMonth()) {\n      const from = first.toLocaleDateString(locale, {month: 'long'});\n      const to = last.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n      return `${from} – ${to}`;\n    }\n\n    return first.toLocaleDateString(locale, {month: 'long', year: 'numeric'});\n  });\n\n  /** The selected date formatted as YYYY-MM-DD for the date-picker input. */\n  readonly selectedDateString = computed<string>(() => {\n    const d = this.selectedDate();\n    const pad = (n: number) => n.toString().padStart(2, '0');\n    return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n  });\n\n  /**\n   * Props for the compact-layout date picker. Sized to match the Today button it\n   * sits beside, and filling the rest of the row so it stays an easy tap target.\n   */\n  readonly pickerProps = computed(() => ({\n    id: this.pickerId,\n    mode: 'date' as const,\n    placeholder: this.pickDateLabel(),\n    size: 'md' as const,\n    borderRadius: 'lg' as const,\n    hover: true,\n    fullWidth: true,\n  }));\n\n  ngOnInit(): void {\n    // Re-format names when the active language changes.\n    this.lang.locale$\n      .pipe(takeUntilDestroyed(this.destroyRef))\n      .subscribe(() => this.localeTick.update((v) => v + 1));\n\n    this.observeOwnWidth();\n  }\n\n  /** Shows the days before the visible ones, without changing the selection. */\n  navigatePrevious(): void {\n    this.shiftWindow(-1);\n  }\n\n  /** Shows the days after the visible ones, without changing the selection. */\n  navigateNext(): void {\n    this.shiftWindow(1);\n  }\n\n  /** Returns to today: brings today into the strip and selects it. */\n  goToToday(): void {\n    const today = this.getToday();\n    // Move explicitly: when today is already selected the window signal has no new\n    // source value to react to, but the user still expects to land on it.\n    this.windowStart.set(this.anchorFor(today, this.tileCount()));\n    // Only emit when today isn't already selected, so pressing \"Today\" while on\n    // today doesn't trigger a redundant reload.\n    if (!this.isSameDay(today, this.selectedDate())) {\n      this.dateSelected.emit(today);\n    }\n  }\n\n  /** Selects a date and emits it, unless it is already the selected day. */\n  selectDate(date: Date): void {\n    // Re-selecting the current day is a no-op: emitting again would make\n    // consumers reload for no change.\n    if (this.isSameDay(date, this.selectedDate())) return;\n    this.dateSelected.emit(date);\n  }\n\n  /**\n   * Handles the date-picker model change: shows the picked day's week and emits\n   * it (unless it is already the selected day).\n   * @param value The date string in YYYY-MM-DD format.\n   */\n  onDateModelChanged(value: string): void {\n    if (!value) return;\n    const picked = new Date(value + 'T00:00:00');\n    if (isNaN(picked.getTime())) return;\n\n    this.windowStart.set(this.anchorFor(picked, this.tileCount()));\n    // Picking the day that's already selected shouldn't re-emit.\n    if (!this.isSameDay(picked, this.selectedDate())) {\n      this.dateSelected.emit(picked);\n    }\n  }\n\n  /** Whether the tile at `index` is the one reachable with Tab. */\n  isTabbable(index: number): boolean {\n    return index === this.focusedIndex();\n  }\n\n  /** Remembers which tile last held focus, so Tab returns to it. */\n  onTileFocus(index: number): void {\n    this.focusedIndex.set(index);\n  }\n\n  /**\n   * Moves focus across the week with the arrow keys. Running off either end turns\n   * the page to the neighbouring week and lands on the day that continues the run,\n   * so the weeks read as one continuous calendar.\n   */\n  onTileKeydown(event: KeyboardEvent, index: number): void {\n    const lastIndex = this.tileCount() - 1;\n\n    switch (event.key) {\n      case 'ArrowRight':\n        event.preventDefault();\n        if (index < lastIndex) {\n          this.moveFocusTo(index + 1);\n        } else {\n          // Off the end: turn the page and land on the day that continues the run.\n          this.shiftWindow(1);\n          this.moveFocusTo(0);\n        }\n        break;\n\n      case 'ArrowLeft':\n        event.preventDefault();\n        if (index > 0) {\n          this.moveFocusTo(index - 1);\n        } else {\n          this.shiftWindow(-1);\n          this.moveFocusTo(lastIndex);\n        }\n        break;\n\n      case 'Home':\n        event.preventDefault();\n        this.moveFocusTo(0);\n        break;\n\n      case 'End':\n        event.preventDefault();\n        this.moveFocusTo(lastIndex);\n        break;\n\n      default:\n        break;\n    }\n  }\n\n  /** trackBy key for day tiles. */\n  trackByTile(_index: number, tile: DayTile): number {\n    return tile.date.getTime();\n  }\n\n  /**\n   * Moves the strip by `pages` of whatever it is currently showing. Paging by the\n   * visible count is what keeps a full week Monday-aligned — seven days forward\n   * from a Monday is the next Monday.\n   */\n  private shiftWindow(pages: number): void {\n    const next = new Date(this.windowStart());\n    next.setDate(next.getDate() + pages * this.tileCount());\n    this.windowStart.set(next);\n  }\n\n  /** Focuses the tile at `index` once the week has rendered. */\n  private moveFocusTo(index: number): void {\n    this.focusedIndex.set(index);\n    afterNextRender(\n      () => this.tileButtons()[index]?.nativeElement.focus(),\n      {injector: this.injector},\n    );\n  }\n\n  /** Index of the selected day within the visible week, or -1 when off-week. */\n  private indexOfSelected(): number {\n    return this.dayTiles().findIndex((tile) => tile.isSelected);\n  }\n\n  /**\n   * Where the strip should start to show `date` among `count` days: the week's\n   * Monday when a whole week is on show, otherwise centred on the day, since a\n   * partial strip has no week to align to.\n   */\n  private anchorFor(date: Date, count: number): Date {\n    if (count === DAYS_IN_WEEK) return this.startOfWeek(date);\n\n    const start = new Date(date);\n    start.setHours(0, 0, 0, 0);\n    start.setDate(start.getDate() - Math.floor(count / 2));\n    return start;\n  }\n\n  /**\n   * Returns the Monday of the week containing `date`. `getDay()` counts from\n   * Sunday, so the shift maps Sunday to the end of the week rather than the start.\n   */\n  private startOfWeek(date: Date): Date {\n    const start = new Date(date);\n    start.setHours(0, 0, 0, 0);\n    start.setDate(start.getDate() - ((start.getDay() + 6) % 7));\n    return start;\n  }\n\n  /** Whole calendar days from `from` to `to`, ignoring time of day and DST. */\n  private daysBetween(from: Date, to: Date): number {\n    const a = Date.UTC(from.getFullYear(), from.getMonth(), from.getDate());\n    const b = Date.UTC(to.getFullYear(), to.getMonth(), to.getDate());\n    return Math.round((b - a) / 86400000);\n  }\n\n  /** Tracks the bar's own width so the layout responds to its container. */\n  private observeOwnWidth(): void {\n    const element = this.host.nativeElement;\n    this.containerWidth.set(element.getBoundingClientRect().width);\n\n    if (typeof ResizeObserver === 'undefined') return;\n\n    const observer = new ResizeObserver((entries) => {\n      const width = entries[0]?.contentRect.width ?? 0;\n      if (width > 0) this.containerWidth.set(width);\n    });\n    observer.observe(element);\n    this.destroyRef.onDestroy(() => observer.disconnect());\n  }\n\n  /** Returns a Date object for today at midnight. */\n  private getToday(): Date {\n    const now = new Date();\n    now.setHours(0, 0, 0, 0);\n    return now;\n  }\n\n  /** Checks whether two dates fall on the same calendar day. */\n  private isSameDay(a: Date, b: Date): boolean {\n    return (\n      a.getFullYear() === b.getFullYear() &&\n      a.getMonth() === b.getMonth() &&\n      a.getDate() === b.getDate()\n    );\n  }\n}\n","<!-- Date selector bar. Layout is driven by the bar's own measured width, so it\n     rearranges for the space the bar was given, not for the viewport. The strip\n     never stacks: as room runs out it shows fewer days, then hands over to the\n     picker. Nothing here is boxed — spacing does the grouping, not borders. -->\n<div class=\"flex flex-col gap-2 px-4 py-3\">\n\n  <!-- Month header. Titles the whole bar so the day numbers below are never loose:\n       it names the month the strip is in (or, when compact, the month the\n       selection sits in), reading as a range where the strip crosses a boundary.\n       On its own line it has room to be spelled out, and no longer steals width\n       from the days the way the old inline caption did. -->\n  <div aria-hidden=\"true\"\n       class=\"text-center text-sm font-semibold tracking-wide whitespace-nowrap opacity-80\">\n    {{ monthCaption() }}\n  </div>\n\n  <!-- Controls row. Today and the strip travel together as one centred cluster, so\n       Today sits right beside the days instead of stranded against the far edge;\n       the gap between them matches the strip's own spacing. When the strip gives\n       way to the picker, the picker fills the row and Today anchors its left. -->\n  <div class=\"flex items-center justify-center gap-3\">\n\n    <!-- Today: returns the strip and the selection to the current day. Outlined\n         rather than filled, so the one filled-primary element on the bar is the\n         selected day — Today shares the primary accent without competing with it. -->\n    <button (click)=\"goToToday()\"\n            [data]=\"{ variant: 'outline', color: 'primary', size: 'md' }\"\n            class=\"shrink-0\"\n            mnButton\n            type=\"button\">\n      {{ todayLabel() }}\n    </button>\n\n    <!-- Too narrow for a usable strip, so the picker takes its place beside Today.\n         Every date stays reachable on a phone, in one tap rather than by paging;\n         the month header above keeps the compact bar labelled like the wide one. -->\n    @if (!showDayStrip()) {\n      <mn-lib-datetime (ngModelChange)=\"onDateModelChanged($event)\"\n                       [ngModel]=\"selectedDateString()\"\n                       [props]=\"pickerProps()\"\n                       class=\"block min-w-0 flex-1\"></mn-lib-datetime>\n    }\n\n    <!-- Arrows and days, sized to their own content so the row can centre them\n         together with Today as a single cluster — rather than the days drifting to\n         the middle of the leftover space, away from the button. -->\n    @if (showDayStrip()) {\n      <div [attr.aria-label]=\"dayStripLabel()\"\n           class=\"flex min-w-0 items-center gap-3\"\n           role=\"group\">\n        <button (click)=\"navigatePrevious()\"\n                [attr.aria-label]=\"previousLabel()\"\n                [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n                class=\"shrink-0\"\n                mnButton\n                type=\"button\">\n          <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronLeft\"></svg>\n        </button>\n\n        <!-- Days read on one line so each sits at the same height as the buttons\n             either side of it. Roving tabindex: one day is in the tab order, the\n             arrow keys move between the rest and page the strip at either end. -->\n        <div class=\"flex min-w-0 gap-1\">\n          @for (tile of dayTiles(); track tile.date.getTime(); let i = $index) {\n            <!-- Selected is the filled pill; today is called out by its number\n                 alone, tinted primary — no box, in keeping with a bar that groups\n                 by spacing rather than borders. When today is also the selected\n                 day the fill takes over, since there is nothing left to tell apart.\n                 A month break is marked by extra breathing room rather than a rule,\n                 so the run of days stays unbroken; the header names both months. -->\n            <button #tileButton\n                    (click)=\"selectDate(tile.date)\"\n                    (focus)=\"onTileFocus(i)\"\n                    (keydown)=\"onTileKeydown($event, i)\"\n                    [attr.aria-current]=\"tile.isToday ? 'date' : null\"\n                    [attr.aria-label]=\"tile.accessibleLabel\"\n                    [attr.aria-pressed]=\"tile.isSelected\"\n                    [attr.tabindex]=\"isTabbable(i) ? 0 : -1\"\n                    [class.bg-primary]=\"tile.isSelected\"\n                    [class.hover:bg-base-200]=\"!tile.isSelected\"\n                    [class.ml-3]=\"tile.startsNewMonth\"\n                    [class.text-primary-content]=\"tile.isSelected\"\n                    class=\"flex min-w-16 shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-lg px-3 py-2 text-sm transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary motion-reduce:transition-none\"\n                    type=\"button\">\n              <span [class.opacity-60]=\"!tile.isSelected\"\n                    [class.opacity-90]=\"tile.isSelected\"\n                    aria-hidden=\"true\"\n                    class=\"text-xs font-medium uppercase\">\n                {{ tile.dayName }}\n              </span>\n              <!-- Today's number carries the primary tint, unless the tile is\n                   filled — then it wears the fill's own text colour instead. -->\n              <span [class.text-primary]=\"tile.isToday && !tile.isSelected\"\n                    aria-hidden=\"true\"\n                    class=\"font-bold tabular-nums\">{{ tile.dayNumber }}</span>\n            </button>\n          }\n        </div>\n\n        <button (click)=\"navigateNext()\"\n                [attr.aria-label]=\"nextLabel()\"\n                [data]=\"{ variant: 'text', size: 'md', color: 'gray' }\"\n                class=\"shrink-0\"\n                mnButton\n                type=\"button\">\n          <svg [size]=\"18\" [lucideIcon]=\"icons.ChevronRight\"></svg>\n        </button>\n      </div>\n    }\n  </div>\n</div>\n","/**\n * Public API of the `mn-angular-lib/calendar` entry point: calendar views and the date selector bar.\n *\n * Each entry point is its own module in the published package, so a consumer's bundler\n * splits it into the chunk that uses it instead of loading the whole library at startup.\n * The root `mn-angular-lib` entry re-exports every entry point.\n */\nexport { CalendarViewComponent } from './src/mn-calendar/components/calendar-view/calendar-view.component';\nexport { CalendarWeekComponent } from './src/mn-calendar/components/calendar-week/calendar-week.component';\nexport { CalendarDayComponent } from './src/mn-calendar/components/calendar-day/calendar-day.component';\nexport { CalendarMonthComponent } from './src/mn-calendar/components/calendar-month/calendar-month.component';\nexport { CalendarEventComponent } from './src/mn-calendar/components/calendar-event/calendar-event.component';\nexport { CalendarEventDefaultComponent } from './src/mn-calendar/components/calendar-event-default/calendar-event-default.component';\nexport { UpcomingEventsComponent } from './src/mn-calendar/components/upcoming-events/upcoming-events.component';\nexport { UpcomingEventRowComponent } from './src/mn-calendar/components/upcoming-event-row/upcoming-event-row.component';\nexport * from './src/mn-date-selector-bar';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ICONS","instanceCounter"],"mappings":";;;;;;;;;;;;;;AAuBA;;;;;AAKG;MAOU,sBAAsB,CAAA;AAChB,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAChC,IAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAEhD;;;;AAIG;AACH,IAAA,IAAI,cAAc,GAAA;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,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