@propelinc/citrus-ui 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/README.md +21 -15
  2. package/dist/index.cdn.css +1 -0
  3. package/dist/index.cdn.mjs +21718 -0
  4. package/dist/index.cdn.mjs.map +1 -0
  5. package/dist/styles/main.css +466 -62
  6. package/dist/styles/utils.css +390 -0
  7. package/package.json +5 -3
  8. package/src/components/CTextField.vue +11 -5
  9. package/src/styles/_core.scss +1 -0
  10. package/src/styles/_reset.scss +93 -78
  11. package/src/styles/utils.scss +50 -0
  12. package/dist/colors/colors.d.ts +0 -31
  13. package/dist/colors/theme.d.ts +0 -3
  14. package/dist/colors/util-classes.d.ts +0 -11
  15. package/dist/components/CAccordion.vue.d.ts +0 -21
  16. package/dist/components/CAccordionItem.vue.d.ts +0 -41
  17. package/dist/components/CAppBar.vue.d.ts +0 -156
  18. package/dist/components/CBadge.vue.d.ts +0 -52
  19. package/dist/components/CBottomSheet.vue.d.ts +0 -226
  20. package/dist/components/CButton/CButton.vue.d.ts +0 -231
  21. package/dist/components/CButton/types.d.ts +0 -5
  22. package/dist/components/CButtonStack.vue.d.ts +0 -24
  23. package/dist/components/CCard.vue.d.ts +0 -107
  24. package/dist/components/CCardFooter.vue.d.ts +0 -26
  25. package/dist/components/CCardHeader.vue.d.ts +0 -3
  26. package/dist/components/CCardSection.vue.d.ts +0 -17
  27. package/dist/components/CCheckbox.vue.d.ts +0 -145
  28. package/dist/components/CCol.vue.d.ts +0 -21
  29. package/dist/components/CDivider.vue.d.ts +0 -17
  30. package/dist/components/CDobField.vue.d.ts +0 -2109
  31. package/dist/components/CDobSelect.vue.d.ts +0 -398
  32. package/dist/components/CEmailField.vue.d.ts +0 -699
  33. package/dist/components/CExpandTransition.vue.d.ts +0 -19
  34. package/dist/components/CFadeTransition.vue.d.ts +0 -3
  35. package/dist/components/CFileInput.vue.d.ts +0 -98
  36. package/dist/components/CFixedPageFooter.vue.d.ts +0 -106
  37. package/dist/components/CForm.vue.d.ts +0 -29
  38. package/dist/components/CFormFieldCounter.vue.d.ts +0 -42
  39. package/dist/components/CIconButton.vue.d.ts +0 -390
  40. package/dist/components/CLabel.vue.d.ts +0 -32
  41. package/dist/components/CListItem.vue.d.ts +0 -208
  42. package/dist/components/CListItemContent.vue.d.ts +0 -27
  43. package/dist/components/CListItemIcon.vue.d.ts +0 -54
  44. package/dist/components/CLoader.vue.d.ts +0 -73
  45. package/dist/components/CLogo.vue.d.ts +0 -19
  46. package/dist/components/CMaskedTextField.vue.d.ts +0 -2012
  47. package/dist/components/CMenu.vue.d.ts +0 -6
  48. package/dist/components/CMenuItem.vue.d.ts +0 -170
  49. package/dist/components/CMenuLabel.vue.d.ts +0 -3
  50. package/dist/components/CModal.vue.d.ts +0 -206
  51. package/dist/components/CModalLoading.vue.d.ts +0 -230
  52. package/dist/components/CNotification.vue.d.ts +0 -589
  53. package/dist/components/CPhoneField.vue.d.ts +0 -2088
  54. package/dist/components/CPill.vue.d.ts +0 -42
  55. package/dist/components/CPillGroup.vue.d.ts +0 -70
  56. package/dist/components/CPopup.vue.d.ts +0 -21
  57. package/dist/components/CProgressLinear.vue.d.ts +0 -61
  58. package/dist/components/CProgressRing.vue.d.ts +0 -103
  59. package/dist/components/CRadio.vue.d.ts +0 -73
  60. package/dist/components/CRadioGroup.vue.d.ts +0 -123
  61. package/dist/components/CRebrand.vue.d.ts +0 -28
  62. package/dist/components/CRow.vue.d.ts +0 -67
  63. package/dist/components/CSafeArea.vue.d.ts +0 -18
  64. package/dist/components/CSectionHeader.vue.d.ts +0 -28
  65. package/dist/components/CSelect.vue.d.ts +0 -293
  66. package/dist/components/CSkeleton.vue.d.ts +0 -3
  67. package/dist/components/CSkeletonLoaderCard.vue.d.ts +0 -21
  68. package/dist/components/CSkeletonLoaderCircle.vue.d.ts +0 -5
  69. package/dist/components/CSkeletonLoaderText.vue.d.ts +0 -44
  70. package/dist/components/CSlideFadeTransition.vue.d.ts +0 -58
  71. package/dist/components/CSplitInput.vue.d.ts +0 -2131
  72. package/dist/components/CSquaredIcon.vue.d.ts +0 -47
  73. package/dist/components/CSsnField.vue.d.ts +0 -2083
  74. package/dist/components/CStatusDot.vue.d.ts +0 -27
  75. package/dist/components/CSwitch.vue.d.ts +0 -54
  76. package/dist/components/CSwitchListItem.vue.d.ts +0 -392
  77. package/dist/components/CTextArea.vue.d.ts +0 -240
  78. package/dist/components/CTextField.vue.d.ts +0 -647
  79. package/dist/components/CTextLink.vue.d.ts +0 -55
  80. package/dist/components/CThirdPartyLogo.vue.d.ts +0 -128
  81. package/dist/components/CTimeago.vue.d.ts +0 -12
  82. package/dist/components/CToast.vue.d.ts +0 -458
  83. package/dist/components/CToastsList.vue.d.ts +0 -430
  84. package/dist/components/CValidationMessage.vue.d.ts +0 -45
  85. package/dist/components/CZipcodeField.vue.d.ts +0 -2080
  86. package/dist/components/index.d.ts +0 -66
  87. package/dist/components/internal/CCloseButton.vue.d.ts +0 -14
  88. package/dist/composables/accessibility.d.ts +0 -1
  89. package/dist/composables/animation.d.ts +0 -12
  90. package/dist/composables/binding.d.ts +0 -19
  91. package/dist/composables/colors.d.ts +0 -13
  92. package/dist/composables/elements.d.ts +0 -3
  93. package/dist/composables/fields.d.ts +0 -9
  94. package/dist/composables/gestures.d.ts +0 -53
  95. package/dist/composables/i18n.d.ts +0 -3
  96. package/dist/composables/id.d.ts +0 -11
  97. package/dist/composables/input-mask.d.ts +0 -18
  98. package/dist/composables/router.d.ts +0 -30
  99. package/dist/composables/slots.d.ts +0 -2
  100. package/dist/composables/toast.d.ts +0 -21
  101. package/dist/composables/validations.d.ts +0 -77
  102. package/dist/index.css +0 -1
  103. package/dist/index.d.ts +0 -8
  104. package/dist/index.mjs +0 -4999
  105. package/dist/index.mjs.map +0 -1
  106. package/dist/plugin.d.ts +0 -3
  107. package/dist/services/animation.d.ts +0 -17
  108. package/dist/services/directives/index.d.ts +0 -2
  109. package/dist/services/directives/scroll-into-view.d.ts +0 -7
  110. package/dist/services/directives/tap-animation.d.ts +0 -6
  111. package/dist/services/id.d.ts +0 -22
  112. package/dist/services/injections/accordions.d.ts +0 -3
  113. package/dist/services/injections/animations.d.ts +0 -2
  114. package/dist/services/injections/buttons.d.ts +0 -4
  115. package/dist/services/injections/forms.d.ts +0 -6
  116. package/dist/services/injections/icon-buttons.d.ts +0 -3
  117. package/dist/services/injections/pills.d.ts +0 -4
  118. package/dist/services/injections/radio.d.ts +0 -10
  119. package/dist/theme/icons.d.ts +0 -36
  120. package/dist/types/CForm.d.ts +0 -12
  121. package/dist/types/font-awesome.d.ts +0 -5
  122. package/dist/types.d.ts +0 -12
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/services/injections/accordions.ts","../src/components/CAccordion.vue","../src/composables/animation.ts","../src/composables/binding.ts","../src/components/CAccordionItem.vue","../src/colors/colors.ts","../src/components/CFadeTransition.vue","../src/composables/colors.ts","../src/components/CLoader.vue","../src/services/injections/icon-buttons.ts","../src/components/CAppBar.vue","../src/components/CBadge.vue","../src/services/injections/buttons.ts","../src/components/CButtonStack.vue","../src/services/directives/scroll-into-view.ts","../src/services/directives/tap-animation.ts","../src/components/internal/CCloseButton.vue","../src/composables/elements.ts","../src/composables/gestures.ts","../src/composables/slots.ts","../src/services/animation.ts","../src/components/CBottomSheet.vue","../../../node_modules/.pnpm/vue-router@4.5.1_vue@3.5.18_typescript@5.9.3_/node_modules/vue-router/dist/vue-router.mjs","../src/composables/router.ts","../src/components/CButton/CButton.vue","../src/components/CCardHeader.vue","../src/components/CCard.vue","../src/components/CCardFooter.vue","../src/components/CCardSection.vue","../src/components/CValidationMessage.vue","../src/composables/id.ts","../src/services/injections/forms.ts","../src/composables/validations.ts","../src/components/CCheckbox.vue","../src/components/CCol.vue","../src/components/CDivider.vue","../src/components/CFormFieldCounter.vue","../src/composables/accessibility.ts","../src/components/CIconButton.vue","../src/composables/i18n.ts","../src/components/CTextField.vue","../src/composables/input-mask.ts","../src/components/CMaskedTextField.vue","../../shared-utils/src/dates.ts","../../shared-utils/src/validators.ts","../src/components/CDobField.vue","../src/components/CSelect.vue","../src/components/CDobSelect.vue","../src/components/CEmailField.vue","../src/services/injections/animations.ts","../src/components/CExpandTransition.vue","../src/components/CFileInput.vue","../src/components/CFixedPageFooter.vue","../src/components/CForm.vue","../src/components/CLabel.vue","../src/components/CListItemContent.vue","../src/components/CSquaredIcon.vue","../src/components/CListItemIcon.vue","../src/components/CListItem.vue","../src/assets/logos/propel/icon.svg","../src/assets/logos/propel/lockup.svg","../src/components/CLogo.vue","../src/components/CMenu.vue","../src/components/CMenuItem.vue","../src/components/CMenuLabel.vue","../src/components/CModal.vue","../src/components/CModalLoading.vue","../src/components/CNotification.vue","../src/composables/fields.ts","../src/components/CPhoneField.vue","../src/services/injections/pills.ts","../src/components/CPill.vue","../src/components/CPillGroup.vue","../src/components/CPopup.vue","../src/components/CProgressLinear.vue","../src/components/CProgressRing.vue","../src/services/injections/radio.ts","../src/components/CRadio.vue","../src/components/CRadioGroup.vue","../src/components/CRebrand.vue","../src/components/CRow.vue","../src/components/CSafeArea.vue","../src/components/CSectionHeader.vue","../src/components/CSkeleton.vue","../src/components/CSkeletonLoaderCard.vue","../src/components/CSkeletonLoaderCircle.vue","../src/components/CSkeletonLoaderText.vue","../src/components/CSlideFadeTransition.vue","../src/components/CSplitInput.vue","../src/components/CSsnField.vue","../src/components/CStatusDot.vue","../src/components/CSwitch.vue","../src/components/CSwitchListItem.vue","../src/components/CTextArea.vue","../src/components/CTextLink.vue","../src/components/CThirdPartyLogo.vue","../src/components/CTimeago.vue","../src/components/CToast.vue","../src/composables/toast.ts","../src/components/CToastsList.vue","../src/components/CZipcodeField.vue","../src/plugin.ts","../src/colors/theme.ts","../src/theme/icons.ts","../src/types.ts"],"sourcesContent":["import type { InjectionKey, Ref } from 'vue';\n\nexport const FLUID = Symbol('fluid') as InjectionKey<Ref<boolean>>;\nexport const ON_TOGGLE = Symbol('on-toggle') as InjectionKey<() => void>;\n","<template>\n <div ref=\"accordion\" data-test=\"accordion\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type SlDetails from '@shoelace-style/shoelace/dist/components/details/details';\nimport { defineComponent, nextTick, provide, ref, toRefs } from 'vue';\n\nimport { FLUID, ON_TOGGLE } from '@propelinc/citrus-ui/src/services/injections/accordions';\n\nexport default defineComponent({\n name: 'CAccordion',\n props: {\n /** Removes horizontal padding for all items inside */\n fluid: { type: Boolean, default: false },\n },\n emits: ['change'],\n setup(props, { emit }) {\n const { fluid } = toRefs(props);\n provide(FLUID, fluid);\n\n const accordion = ref<HTMLDivElement | null>(null);\n provide(ON_TOGGLE, async () => {\n await nextTick();\n const accordionItems: SlDetails[] = Array.from(\n accordion.value!.querySelectorAll('[data-accordion-item]')\n );\n const openItems = accordionItems.reduce<number[]>((acc, item, index) => {\n return item.hasAttribute('open') ? [...acc, index] : acc;\n }, []);\n emit('change', openItems);\n });\n\n return { accordion };\n },\n});\n</script>\n","import type { ElementAnimation } from '@shoelace-style/shoelace/dist/utilities/animation-registry.js';\nimport {\n getAnimation,\n setAnimation,\n} from '@shoelace-style/shoelace/dist/utilities/animation-registry.js';\nimport type { Ref } from 'vue';\nimport { isRef, onMounted, ref, unref, watch } from 'vue';\n\ntype MaybeRef<T> = T | Ref<T>;\n\nexport function useShoelaceAnimation(\n el: Ref<Element | null>,\n animationName: string,\n animation: MaybeRef<ElementAnimation | 'default' | null>\n): void {\n let defaultAnimation: ElementAnimation | null = null;\n\n onMounted(() => {\n if (el.value) {\n defaultAnimation = getAnimation(el.value, animationName, { dir: 'ltr' });\n\n const animationValue = unref(animation);\n if (animationValue !== 'default') {\n setAnimation(el.value, animationName, animationValue);\n }\n }\n });\n\n if (isRef(animation)) {\n watch(animation, () => {\n if (el.value) {\n const nextAnimation = animation.value === 'default' ? defaultAnimation : animation.value;\n setAnimation(el.value, animationName, nextAnimation);\n }\n });\n }\n}\n\nconst TAP_ANIMATION_DURATION_MS = 100;\n\nexport function useTapAnimation({\n el,\n keyframes,\n}: {\n el: Ref<Element | null>;\n keyframes: { default: Keyframe; pressed: Keyframe };\n}): Record<string, () => void> {\n const downAnimation = ref<Animation | null>(null);\n const upAnimation = ref<Animation | null>(null);\n\n function onPointerDown(): void {\n if (!el.value) {\n return;\n }\n\n upAnimation.value?.cancel();\n upAnimation.value = null;\n\n downAnimation.value?.cancel();\n downAnimation.value = el.value.animate([keyframes.default, keyframes.pressed], {\n duration: TAP_ANIMATION_DURATION_MS,\n fill: 'forwards',\n });\n }\n\n async function onPointerUp(): Promise<void> {\n if (!downAnimation.value || upAnimation.value || !el.value) {\n return;\n }\n\n // NOTE(mohan): Cancelling the animation will cause the finished promise to\n // throw an error.\n await downAnimation.value.finished.catch(() => {});\n if (!el.value) {\n // NOTE(slanden): This can happen if the element is removed from the DOM\n // while the down animation is running.\n return;\n }\n upAnimation.value = el.value.animate([keyframes.pressed, keyframes.default], {\n duration: TAP_ANIMATION_DURATION_MS,\n fill: 'forwards',\n });\n\n await upAnimation.value.finished.catch(() => {});\n upAnimation.value = null;\n downAnimation.value = null;\n }\n\n return {\n pointerdown: onPointerDown,\n pointerup: onPointerUp,\n pointerleave: onPointerUp,\n pointercancel: onPointerUp,\n };\n}\n","import type { Ref } from 'vue';\nimport { ref, watch } from 'vue';\n\n/**\n * A composable that creates a ref that tracks the value of the provided ref.\n *\n * Whenever the provided ref changes, the returned ref updates, but not the\n * other way around. When the returned ref changes, the `onChange` callback is\n * called (if provided).\n *\n * Useful for components that need to respond both to user input and to\n * programmatic changes.\n *\n * @param value - The value to bind to the internal value.\n * @param options.onChange - A callback function that is called when the\n * internal value changes.\n * @returns A ref to the internal value.\n */\nexport function useInternalValue<T>(\n value: Ref<T>,\n options: { onChange?: (value: T) => void } = {}\n): Ref<T> {\n const internalValue = ref(value.value) as Ref<T>;\n watch(value, (value) => {\n internalValue.value = value;\n });\n watch(internalValue, (newInternalValue) => {\n if (newInternalValue !== value.value) {\n options.onChange?.(newInternalValue);\n }\n });\n\n return internalValue;\n}\n","<!-- eslint-disable vue/no-deprecated-slot-attribute -->\n<template>\n <sl-details\n ref=\"details\"\n data-test=\"accordion-item\"\n data-accordion-item\n class=\"c-accordion-item\"\n :class=\"{ 'c-accordion-item--fluid': injectedOrPropFluid }\"\n :open=\"internalValue || undefined\"\n @sl-show=\"onChange(true)\"\n @sl-hide.stop=\"onChange(false)\"\n >\n <FontAwesomeIcon slot=\"expand-icon\" :icon=\"faChevronDown\" />\n <FontAwesomeIcon slot=\"collapse-icon\" :icon=\"faChevronDown\" />\n <div slot=\"summary\" class=\"c-accordion-item__header\" data-test=\"accordion-item-header\">\n <slot name=\"header\" />\n </div>\n <div data-test=\"accordion-item-content\" class=\"c-accordion-item__content\">\n <slot />\n </div>\n </sl-details>\n</template>\n\n<script lang=\"ts\">\nimport { faChevronDown } from '@fortawesome/pro-regular-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport '@shoelace-style/shoelace/dist/components/details/details';\nimport type SlDetails from '@shoelace-style/shoelace/dist/components/details/details';\nimport type { PropType } from 'vue';\nimport { computed, defineComponent, inject, ref } from 'vue';\n\nimport { useShoelaceAnimation } from '@propelinc/citrus-ui/src/composables/animation';\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\nimport { FLUID, ON_TOGGLE } from '@propelinc/citrus-ui/src/services/injections/accordions';\n\nexport default defineComponent({\n name: 'CAccordionItem',\n components: { FontAwesomeIcon },\n props: {\n /** Controls whether the item is open */\n value: { type: Boolean, default: false },\n /** Removes horizontal padding from the content */\n fluid: { type: Boolean as PropType<boolean | null>, default: null },\n },\n emits: ['input'],\n setup(props, { emit }) {\n const details = ref<SlDetails | null>(null);\n useShoelaceAnimation(details, 'details.show', {\n keyframes: [{ height: '0' }, { height: 'auto' }],\n options: { duration: 200, easing: 'ease' },\n });\n useShoelaceAnimation(details, 'details.hide', {\n keyframes: [{ height: 'auto' }, { height: '0' }],\n options: { duration: 200, easing: 'ease' },\n });\n\n const fluid = inject(FLUID, ref(false));\n const injectedOrPropFluid = computed(() => {\n return props.fluid !== null ? props.fluid : (fluid.value ?? false);\n });\n\n const value = computed(() => props.value);\n const internalValue = useInternalValue(value, { onChange: (value) => emit('input', value) });\n\n const injectedToggleItem = inject(ON_TOGGLE, undefined);\n const onChange = (value: boolean): void => {\n internalValue.value = value;\n injectedToggleItem?.();\n emit('input', value);\n };\n\n return {\n internalValue,\n faChevronDown,\n details,\n injectedOrPropFluid,\n onChange,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-accordion-item {\n &::part(base) {\n background: transparent;\n border: none;\n }\n\n &::part(header) {\n padding: 16px;\n }\n\n &::part(summary) {\n @include subheadline;\n\n padding-right: 16px;\n }\n\n &::part(summary-icon) {\n rotate: 0;\n transition-duration: 200ms;\n }\n\n &[open]::part(summary-icon) {\n rotate: 180deg;\n }\n\n &::part(content) {\n padding: 0 16px 16px;\n }\n\n & + & {\n border-top: $border;\n }\n}\n\n.c-accordion-item--fluid {\n &::part(content) {\n padding: 0;\n }\n}\n\n.c-accordion-item__header {\n width: 100%;\n}\n\n.c-accordion-item__content {\n box-sizing: border-box;\n}\n</style>\n","// NOTE(ej): This file is a manual copy of /styles/colors.scss\n// These files should be kept in sync.\n// NOTE(cshdllr): The navy colors are still here for backwards compatibility.\n\nexport type HexColor = `#${string}`;\nexport type RgbaColor = `rgba(${number}, ${number}, ${number}, ${number})`;\n\n/**\n * CSS color value from the palette (hex or rgba). Use this type when a value\n * may be either format, e.g. gray colors are rgba, others are hex.\n */\nexport type CssColor = HexColor | RgbaColor;\n\nconst BLACK = '#000000';\nconst GRAY_100 = 'rgba(0, 0, 0, 0.04)';\nconst GRAY_200 = 'rgba(0, 0, 0, 0.1)';\nconst GRAY_300 = 'rgba(0, 0, 0, 0.31)';\nconst GRAY_400 = 'rgba(0, 0, 0, 0.48)';\nconst GRAY_500 = 'rgba(0, 0, 0, 0.69)';\nconst GREEN_500 = '#1f7400';\nconst GOLD_500 = '#f47500';\nconst RED_500 = '#cd000c';\n\n/**\n * Maps a color name to its corresponding CSS color (hex or rgba).\n * Gray neutrals use rgba for transparency; other colors use hex.\n *\n * NOTE: Please write hex codes in lowercase letters\n */\nconst Colors: Record<string, CssColor> = {\n ACCENT_BLUE: '#5560cb',\n ACCENT_BLUE_SHADE_1: '#404898',\n ACCENT_BLUE_SHADE_2: '#2f3570',\n ACCENT_GREEN: '#49a24c',\n ACCENT_GREEN_SHADE_1: '#3a823d',\n ACCENT_GREEN_SHADE_2: '#17551a',\n ACCENT_ORANGE: '#ffa895',\n ACCENT_ORANGE_SHADE_1: '#e15c1b',\n ACCENT_ORANGE_SHADE_2: '#a9440b',\n ACCENT_PINK: '#d75fae',\n ACCENT_PINK_SHADE_1: '#7c3872',\n ACCENT_PINK_SHADE_2: '#56204e',\n ACCENT_RED_SHADE_1: '#981d31',\n ACCENT_RED_SHADE_2: '#701323',\n ALERT_RED: '#c34459',\n BACKGROUND: GRAY_100,\n BLACK,\n GRAY_100,\n // NOTE(slanden): the in-app browser cannot handle transparency in rgba colors,\n // which get rendered as black, so we fall back to the hex color instead.\n GRAY_100_HEX: '#f5f4f3',\n GRAY_200,\n GRAY_300,\n GRAY_400,\n GRAY_500,\n NAVY: BLACK,\n NAVY_TINT_1: GRAY_500,\n NAVY_TINT_2: GRAY_400,\n NAVY_TINT_3: GRAY_300,\n NAVY_TINT_4: GRAY_200,\n NAVY_TINT_5: GRAY_100,\n NEUTRAL: GRAY_100,\n NEUTRAL_SHADE: GRAY_200,\n NEUTRAL_SHADE_2: '#707070',\n ORANGE: '#ffa895',\n ORANGE_TINT_1: '#fdcab7',\n ORANGE_TINT_2: '#ffdbce',\n PINK: '#f6a0d1',\n PINK_TINT_1: '#fdc3e4',\n PINK_TINT_2: '#ffdef1',\n PROVIDERS_BLUE: '#a3b0f9',\n PROVIDERS_BLUE_TINT_1: '#d1d7fc',\n PROVIDERS_BLUE_TINT_2: '#e8ebfd',\n PROVIDERS_GREEN: '#49a24c',\n PROVIDERS_GREEN_TINT_1: '#b3f6a2',\n PROVIDERS_GREEN_TINT_2: '#d1fac7',\n TEXT_PRIMARY: BLACK,\n TEXT_SECONDARY: GRAY_500,\n TEXT_PLACEHOLDER: GRAY_400,\n TEXT_DISABLED: GRAY_300,\n WHITE: '#ffffff',\n YELLOW: '#ffc200',\n YELLOW_100: '#ffdc6b',\n YELLOW_TINT_1: '#ffdc6b',\n YELLOW_TINT_2: '#fee69a',\n BLUE_100: '#e0edff',\n BLUE_200: '#b2cffa',\n BLUE_300: '#7a95f8',\n BLUE_400: '#496ae0',\n BLUE_500: '#1a43d7',\n BORDER: GRAY_200,\n BUTTON_BACKGROUND: BLACK,\n GOLD_500,\n GOLD_400: '#f99500',\n GOLD_300: '#ffc120',\n GOLD_200: '#fcde74',\n GOLD_100: '#fff0ba',\n GREEN_500,\n GREEN_400: '#3fa41c',\n GREEN_300: '#8bc95a',\n GREEN_200: '#b8da96',\n GREEN_100: '#dcf2cb',\n PURPLE_500: '#6431d0',\n PURPLE_400: '#804fe8',\n PURPLE_300: '#ac8eff',\n PURPLE_200: '#cdbcff',\n PURPLE_100: '#ebe4ff',\n RED_500,\n RED_400: '#f52323',\n RED_300: '#ff6969',\n RED_200: '#ffaaa5',\n RED_100: '#ffe5dd',\n STATUS_SUCCESS: GREEN_500,\n STATUS_WARNING: GOLD_500,\n STATUS_ERROR: RED_500,\n};\n\nexport default Colors;\n\n/**\n * This is a type predicate that will allow TypeScript to know that the string tested is a\n * HexColor within the scope of the narrowing.\n */\nexport function isHexColor(color?: string): color is HexColor {\n if (!color) {\n return false;\n }\n\n return /^#([0-9A-Fa-f]{3}){1,2}$/i.test(color);\n}\n\nexport function isRgbaColor(color?: string): color is RgbaColor {\n if (!color) {\n return false;\n }\n\n // Alpha may be integer 0–255 or decimal 0–1 (e.g. 0.04, 0.69)\n return /^rgba\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*\\d{1,3}\\s*,\\s*[\\d.]+\\s*\\)$/i.test(color);\n}\n\nexport function isCssColor(color?: string): color is CssColor {\n return isHexColor(color) || isRgbaColor(color);\n}\n\n/**\n * This is a type predicate that will allow TypeScript to know that the string tested is a\n * key of the Colors object.\n */\nexport function isColorKey(color?: string): color is keyof typeof Colors {\n if (!color) {\n return false;\n }\n\n return Object.keys(Colors).includes(color);\n}\n\n/**\n * Validates a string as either a hex color or a color key.\n */\nexport function isValidColor(value: string): boolean {\n if (value === 'default') {\n return true;\n }\n\n if (isHexColor(value)) {\n return true;\n }\n\n // Normalize any strings to SCREAMING_CASE\n const normalizedKey = value.toUpperCase().replace(/-/g, '_');\n\n return isColorKey(normalizedKey);\n}\n","<template>\n <Transition mode=\"out-in\" name=\"fade\">\n <slot />\n </Transition>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({});\n</script>\n\n<style lang=\"scss\" scoped>\n.fade-enter-active,\n.fade-leave-active {\n transition: opacity 300ms ease-out;\n}\n\n.fade-enter,\n.fade-leave-to {\n opacity: 0;\n}\n</style>\n","import type { MaybeRefOrGetter, Ref } from 'vue';\nimport { computed, toValue } from 'vue';\n\nimport Colors, {\n type CssColor,\n isColorKey,\n isCssColor,\n} from '@propelinc/citrus-ui/src/colors/colors';\n\n/**\n * Maps from a color name or hex code to its corresponding CSS color value.\n * Gray neutrals resolve to rgba(); other palette colors are hex.\n *\n * @param name - The color to resolve. Can be in kebab case, SCREAMING_SNAKE_CASE, or a hex code from the palette.\n * @returns The CSS color value (hex or rgba) and whether the color is valid.\n */\nexport function useCssColor(name: MaybeRefOrGetter<string | undefined>): {\n cssColor: Ref<CssColor | undefined>;\n isValidColor: Ref<boolean>;\n} {\n const normalizedColor = computed(() =>\n isCssColor(toValue(name)) ? (toValue(name)?.toLowerCase() as CssColor) : undefined\n );\n const normalizedName = computed(() => {\n if (!toValue(name)) {\n return undefined;\n }\n\n // If it is a CSS color already, we don't need to know its name\n if (isCssColor(toValue(name))) {\n return undefined;\n }\n\n return toValue(name)?.replace(/-/g, '_').toUpperCase();\n });\n\n const cssColor = computed(() => {\n // If we're given a color key, return the palette value (hex or rgba)\n if (normalizedName.value && isColorKey(normalizedName.value)) {\n return Colors[normalizedName.value];\n }\n\n // If we're given a CSS color AND it's in the palette, return it\n if (\n isCssColor(normalizedColor.value) &&\n Object.values(Colors).includes(normalizedColor.value)\n ) {\n return normalizedColor.value;\n }\n\n return undefined;\n });\n\n const isValidColor = computed(() => {\n return cssColor.value !== undefined;\n });\n\n return { cssColor, isValidColor };\n}\n","<template>\n <span\n :aria-label=\"accessibleText || $t('Loading...')\"\n class=\"c-loader\"\n :data-size=\"computedSize\"\n data-test=\"loader\"\n role=\"progressbar\"\n :style=\"{\n '--indicator-color': indicatorColorCode,\n '--loader-size': SIZE_TO_FONT_SIZE[computedSize],\n '--track-color': trackColorCode,\n '--track-width': SIZE_TO_TRACK_WIDTH[computedSize],\n }\"\n >\n <svg class=\"c-loader__svg\">\n <circle class=\"c-loader__track\" />\n <circle class=\"c-loader__indicator\" />\n </svg>\n </span>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, computed, defineComponent } from 'vue';\n\nimport Colors, { type HexColor, isValidColor } from '@propelinc/citrus-ui/src/colors/colors';\nimport { useCssColor } from '@propelinc/citrus-ui/src/composables/colors';\n\ntype Size = 'sm' | 'md' | 'lg';\n\nconst SIZE_TO_FONT_SIZE: Record<Size, `${number}px`> = {\n sm: '20px',\n md: '26px',\n lg: '32px',\n};\n\nconst SIZE_TO_TRACK_WIDTH: Record<Size, `${number}px`> = {\n sm: '2.5px',\n md: '3px',\n lg: '3px',\n};\n\nexport default defineComponent({\n props: {\n /** Customizes screen reader only text alternative, should be translated */\n accessibleText: { type: String, default: undefined },\n /** Sets the color of the indicator of the loader */\n color: {\n type: String as PropType<HexColor | keyof typeof Colors>,\n default: 'default',\n validator: isValidColor,\n },\n /** @deprecated Shows a smaller version of the loading icon */\n small: { type: Boolean, default: false },\n /** Sets the size of the loader */\n size: { type: String as PropType<Size>, default: 'lg' },\n /** Sets the color of the track of the loader */\n trackColor: {\n type: String as PropType<HexColor | keyof typeof Colors>,\n default: 'default',\n validator: isValidColor,\n },\n },\n setup(props) {\n const computedColor = computed(() => {\n return props.color === 'default' ? 'black' : props.color;\n });\n\n const computedTrackColor = computed(() => {\n // If _any_ trackColor is provided, use that\n if (props.trackColor !== 'default') {\n return props.trackColor;\n }\n\n // trackColor is 'default', determine which default color it should use\n if (props.color === 'white' || props.color === Colors.WHITE) {\n return 'gray-500';\n }\n\n return 'gray-200';\n });\n\n const computedSize = computed((): Size => {\n if (props.small) {\n return 'sm';\n }\n return props.size;\n });\n\n const { cssColor: indicatorColorCode } = useCssColor(computedColor);\n const { cssColor: trackColorCode } = useCssColor(computedTrackColor);\n\n return {\n computedSize,\n indicatorColorCode,\n SIZE_TO_FONT_SIZE,\n SIZE_TO_TRACK_WIDTH,\n trackColorCode,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n.c-loader {\n display: inline-flex;\n font-size: var(--loader-size);\n height: 1em;\n width: 1em;\n\n &__svg {\n flex: 1 1 auto;\n height: 100%;\n overflow: visible;\n width: 100%;\n }\n\n &__indicator,\n &__track {\n cx: 0.5em;\n cy: 0.5em;\n fill: none;\n r: calc(0.5em - var(--track-width) / 2);\n stroke-width: var(--track-width);\n }\n\n &__indicator {\n animation: spin 2000ms linear infinite;\n stroke: var(--indicator-color);\n stroke-dasharray: 150% 75%;\n stroke-linecap: round;\n transform-origin: 50% 50%;\n }\n\n &__track {\n stroke: var(--track-color);\n transform-origin: 0% 0%;\n }\n\n @keyframes spin {\n 0% {\n stroke-dasharray: 0.05em 3em;\n transform: rotate(0deg);\n }\n\n 50% {\n stroke-dasharray: 1.375em 1.375em;\n transform: rotate(450deg);\n }\n\n 100% {\n stroke-dasharray: 0.05em 3em;\n transform: rotate(1080deg);\n }\n }\n}\n</style>\n","import type { InjectionKey, Ref } from 'vue';\n\nexport const TERTIARY = Symbol('tertiary') as InjectionKey<Ref<boolean>>;\nexport const INHERIT_COLOR = Symbol('inherit-color') as InjectionKey<Ref<boolean>>;\n","<template>\n <header\n data-test=\"app-bar\"\n class=\"c-app-bar\"\n :class=\"{\n 'c-app-bar--fixed': fixed,\n 'c-app-bar--border': border,\n }\"\n :style=\"{\n '--c-app-bar-background-color': bgCssColor,\n '--c-app-bar-color': textCssColor,\n }\"\n :data-background-color=\"bgCssColor\"\n :data-color=\"textCssColor\"\n >\n <div class=\"c-app-bar__left\" data-test=\"app-bar-left\">\n <slot name=\"left\" />\n </div>\n\n <div data-test=\"app-bar-title\" class=\"c-app-bar__title\">\n <CFadeTransition>\n <CLoader\n v-if=\"loading\"\n key=\"loader\"\n data-test=\"app-bar-loader\"\n class=\"c-app-bar__loader\"\n small\n :color=\"textCssColor\"\n :accessible-text=\"loaderAccessibleText\"\n />\n <h1\n v-else-if=\"!loading && title\"\n key=\"title\"\n class=\"c-app-bar__title-content\"\n data-test=\"app-bar-title-text\"\n >\n {{ title }}\n </h1>\n <div v-else key=\"slot\" class=\"c-app-bar__title-content\">\n <slot name=\"title\" />\n </div>\n </CFadeTransition>\n </div>\n\n <div class=\"c-app-bar__right\" data-test=\"app-bar-right\">\n <slot name=\"right\" />\n </div>\n </header>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue';\nimport { computed, defineComponent, provide, ref } from 'vue';\n\nimport type { HexColor } from '@propelinc/citrus-ui/src/colors/colors';\nimport Colors, {\n isHexColor,\n isRgbaColor,\n isValidColor,\n} from '@propelinc/citrus-ui/src/colors/colors';\nimport CFadeTransition from '@propelinc/citrus-ui/src/components/CFadeTransition.vue';\nimport CLoader from '@propelinc/citrus-ui/src/components/CLoader.vue';\nimport { useCssColor } from '@propelinc/citrus-ui/src/composables/colors';\nimport {\n INHERIT_COLOR as INHERIT_COLOR_ICON_BUTTON,\n TERTIARY as TERTIARY_ICON_BUTTON,\n} from '@propelinc/citrus-ui/src/services/injections/icon-buttons';\n\nexport default defineComponent({\n components: { CLoader, CFadeTransition },\n props: {\n /**\n * Used to set the background color of the app bar. Needs to accept either a hex code or a\n * a valid color key from the Colors object.\n */\n backgroundColor: {\n type: String as PropType<HexColor | keyof typeof Colors>,\n default: 'default',\n validator: isValidColor,\n },\n color: {\n type: String as PropType<HexColor | keyof typeof Colors>,\n default: undefined,\n validator: isValidColor,\n },\n /** If true, the app bar will be fixed to the top of the viewport. */\n fixed: { type: Boolean, default: false },\n /** If true, the app bar will have a bottom border. */\n border: { type: Boolean, default: false },\n /** Shows text in the center of the component. Typically used for page names. Overrides the title slot. */\n title: { type: String, default: '' },\n /** Shows a loading spinner. Overrides the title slot. */\n loading: { type: Boolean, default: false },\n /** Adds screen reader only text alternative to loading icon, text should be translated */\n loaderAccessibleText: { type: String, default: '' },\n },\n setup(props) {\n provide(TERTIARY_ICON_BUTTON, ref(true));\n provide(INHERIT_COLOR_ICON_BUTTON, ref(true));\n\n const initialBackgroundColor = computed(() => {\n if (props.backgroundColor === 'default') {\n return Colors.WHITE;\n }\n\n return props.backgroundColor;\n });\n\n const { cssColor: bgCssColor } = useCssColor(initialBackgroundColor);\n\n /**\n * This text color is computed based on the background color's luminance.\n * Dark backgrounds get white text, light backgrounds get black text.\n * Supports both hex and rgba (e.g. gray palette); rgba is composited over white for luminance.\n *\n * This is overridden by the `color` prop.\n */\n const calculatedTextColor = computed(() => {\n const color = bgCssColor.value;\n if (!color) {\n return Colors.BLACK;\n }\n\n let r: number;\n let g: number;\n let b: number;\n\n if (isHexColor(color)) {\n const hex = color.substring(1);\n const fullHex = hex.length === 3 ? hex.replace(/(.)/g, '$1$1') : hex;\n r = parseInt(fullHex.substring(0, 2), 16) / 255;\n g = parseInt(fullHex.substring(2, 4), 16) / 255;\n b = parseInt(fullHex.substring(4, 6), 16) / 255;\n } else if (isRgbaColor(color)) {\n const match = color.match(\n /^rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*([\\d.]+)\\s*\\)$/i\n );\n if (!match) {\n return Colors.BLACK;\n }\n const ra = Number(match[1]) / 255;\n const ga = Number(match[2]) / 255;\n const ba = Number(match[3]) / 255;\n const a = Number(match[4]);\n // Composite over white to get effective RGB for luminance\n r = ra * a + (1 - a);\n g = ga * a + (1 - a);\n b = ba * a + (1 - a);\n } else {\n return Colors.BLACK;\n }\n\n // Calculate relative luminance using sRGB coefficients\n const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n // Use white text if background is dark enough (luminance < 0.5)\n return luminance < 0.5 ? Colors.WHITE : Colors.BLACK;\n });\n\n const { cssColor: userTextCssColor } = useCssColor(() => props.color);\n\n const textCssColor = computed(() => {\n if (userTextCssColor.value) {\n return userTextCssColor.value;\n }\n\n return calculatedTextColor.value;\n });\n\n return { bgCssColor, textCssColor };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/utils/typography';\n\n@mixin app-bar-button-container {\n align-items: center;\n display: flex;\n flex: none;\n min-width: $button-size-medium;\n}\n\n.c-app-bar {\n align-items: center;\n background-color: var(--c-app-bar-background-color);\n color: var(--c-app-bar-color);\n display: flex;\n gap: 8px;\n height: $app-bar-height;\n padding: 0 8px;\n}\n\n.c-app-bar--fixed {\n left: 0;\n position: fixed;\n right: 0;\n top: env(safe-area-inset-top);\n z-index: 5;\n}\n\n.c-app-bar--border {\n border-bottom: $border;\n}\n\n.c-app-bar__left {\n @include app-bar-button-container;\n\n justify-content: flex-start;\n}\n\n.c-app-bar__right {\n @include app-bar-button-container;\n\n justify-content: flex-end;\n}\n\n.c-app-bar__title {\n @include subheadline;\n\n flex: auto;\n overflow: hidden;\n text-align: center;\n}\n\n.c-app-bar__loader {\n // Vertically center the loader\n transform: translateY(3px);\n}\n\n.c-app-bar__title-content {\n @include subheadline;\n @include text-overflow-ellipsis;\n}\n</style>\n","<template>\n <span\n class=\"c-badge\"\n :data-test=\"dataTest\"\n :data-color=\"color\"\n :data-text-color=\"textColor\"\n :style=\"computedStyle\"\n >\n <slot>\n {{ text }}\n </slot>\n </span>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue';\n\nimport { useCssColor } from '@propelinc/citrus-ui/src/composables/colors';\n\nexport default defineComponent({\n props: {\n /** Sets the text of the badge, can also use default slot */\n text: { type: String, default: undefined },\n /** Adds a unique data-test attribute for testing to the container */\n dataTest: { type: String, default: 'badge' },\n /** Sets the background color */\n color: { type: String, default: 'purple-200' },\n /** Sets the text color */\n textColor: { type: String, default: 'text-primary' },\n },\n setup(props) {\n const { cssColor: backgroundCssColor } = useCssColor(() => props.color);\n const { cssColor: textCssColor } = useCssColor(() => props.textColor);\n\n const computedStyle = computed(() => {\n const style: Record<string, string> = {};\n\n if (backgroundCssColor.value) {\n style['--c-badge-background-color'] = backgroundCssColor.value;\n }\n\n if (textCssColor.value) {\n style['--c-badge-text-color'] = textCssColor.value;\n }\n\n return style;\n });\n\n return { computedStyle };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-badge {\n --height: 24px;\n\n @include eyebrow;\n\n background-color: var(--c-badge-background-color);\n border: none;\n border-radius: 4px;\n color: var(--c-badge-text-color);\n display: inline-block;\n height: var(--height);\n\n // Override the line-height of the eyebrow mixin so the text is vertically centered\n line-height: var(--height);\n padding-inline: 12px;\n white-space: nowrap;\n}\n</style>\n","import type { InjectionKey, Ref } from 'vue';\n\nexport const BLOCK = Symbol('block') as InjectionKey<Ref<boolean>>;\nexport const LARGE = Symbol('large') as InjectionKey<Ref<boolean>>;\nexport const BOUNCE_AMOUNT = Symbol('bounce-amount') as InjectionKey<number>;\n","<template>\n <component :is=\"tag\" class=\"c-button-stack\" data-test=\"c-button-stack\">\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, provide, ref, toRefs } from 'vue';\n\nimport { BLOCK, LARGE } from '@propelinc/citrus-ui/src/services/injections/buttons';\n\nexport default defineComponent({\n props: {\n tag: { type: String, default: 'div' },\n large: { type: Boolean, default: null },\n },\n setup(props) {\n const { large } = toRefs(props);\n\n provide(BLOCK, ref(true));\n provide(LARGE, large);\n },\n});\n</script>\n\n<style scoped>\n/**\n * FIXME: https://linear.app/slanden/issue/FE-37/remove-exported-margins\n * These are exported margins, would be preferable to use a Flex column with gap instead\n */\n:deep() {\n .c-button + .c-button {\n margin-top: 8px;\n }\n}\n</style>\n","import type { DebouncedFunc } from 'lodash';\nimport { debounce } from 'lodash';\nimport type { Directive } from 'vue';\n\ninterface ScrollIntoViewElement extends HTMLElement {\n scrollDirective?: {\n focusable: HTMLInputElement | HTMLTextAreaElement;\n scrollIfNeeded: DebouncedFunc<() => void>;\n focusListener: () => void;\n blurListener: () => void;\n };\n}\n\n// NOTE(mohan): This is to support browsers without visualViewport.\nconst getViewport = (): Window | VisualViewport => window.visualViewport ?? window;\n\nconst scrollToElement = (element: Element): void => {\n const rect = element.getBoundingClientRect();\n const windowHeight = window.innerHeight || document.documentElement.clientHeight;\n\n // Check if element is obscured by header or footer\n const appHeight = document.getElementById('app')?.clientHeight;\n const estimatedHeaderHeight =\n document.getElementsByClassName('app-bar c-app-bar')[0]?.clientHeight || 64;\n const estimatedFooterHeight =\n document.getElementsByClassName('c-fixed-page-footer')[0]?.clientHeight ||\n document.getElementsByClassName('scrollable-footer')[0]?.clientHeight ||\n 0;\n const contentStartY = appHeight\n ? windowHeight - (appHeight - estimatedHeaderHeight)\n : estimatedHeaderHeight;\n const contentEndY = windowHeight - estimatedFooterHeight;\n\n const isObscuredByHeader = rect.top < contentStartY;\n const isObscuredByFooter = rect.bottom > contentEndY;\n\n if (isObscuredByHeader || isObscuredByFooter) {\n element.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n};\n\n/**\n * This directive scrolls the element into view when the input inside it is focused.\n *\n * It also listens for viewport size changes, so it can scroll again if the keyboard pops up.\n */\nexport const scrollIntoView: Directive = {\n beforeMount(el: ScrollIntoViewElement): void {\n const inputEl = el.querySelector('input,textarea');\n if (!inputEl) {\n return;\n }\n\n el.scrollDirective = {\n focusable: inputEl as HTMLInputElement | HTMLTextAreaElement,\n scrollIfNeeded: debounce((): void => {\n scrollToElement(el);\n }, 300),\n focusListener: (): void => {\n if (el.scrollDirective) {\n el.scrollDirective.scrollIfNeeded();\n // When focused, we track the viewport size, so we can scroll again if the keyboard pops up.\n getViewport().addEventListener('resize', el.scrollDirective.scrollIfNeeded);\n }\n },\n blurListener: (): void => {\n if (el.scrollDirective) {\n el.scrollDirective.scrollIfNeeded.cancel();\n getViewport().removeEventListener('resize', el.scrollDirective.scrollIfNeeded);\n }\n },\n };\n\n inputEl.addEventListener('focus', el.scrollDirective!.focusListener);\n inputEl.addEventListener('blur', el.scrollDirective!.blurListener);\n },\n\n unmounted(el: ScrollIntoViewElement): void {\n if (el.scrollDirective) {\n el.scrollDirective.scrollIfNeeded.cancel();\n el.scrollDirective.focusable.removeEventListener('focus', el.scrollDirective.focusListener);\n el.scrollDirective.focusable.removeEventListener('blur', el.scrollDirective.blurListener);\n getViewport().removeEventListener('resize', el.scrollDirective.scrollIfNeeded);\n }\n },\n};\n","import { ref } from 'vue';\nimport type { Directive, DirectiveBinding } from 'vue';\n\nimport { useTapAnimation } from '../../composables/animation';\n\ninterface TapAnimationValue {\n bounceAmount?: number;\n}\n\ninterface TapAnimationElement extends HTMLElement {\n __tapAnimationCleanup?: () => void;\n}\n\nconst DEFAULT_BOUNCE_AMOUNT = 0.94;\n\nfunction setupTapAnimation(el: HTMLElement, bounceAmount: number): void {\n const animationListeners = useTapAnimation({\n el: ref(el),\n keyframes: {\n default: { transform: 'scale(1)' },\n pressed: { transform: `scale(${bounceAmount})` },\n },\n });\n\n // Add event listeners\n Object.entries(animationListeners).forEach(([event, handler]) => {\n el.addEventListener(event, handler);\n });\n\n // The cleanup function is essential here to ensure that all event listeners added by the directive are removed\n // when the directive is unbound. Without this cleanup, the event listeners would remain attached to the element,\n // potentially causing memory leaks and unexpected behavior. This function is called in the 'unbind' hook to properly\n // clean up the element.\n (el as TapAnimationElement).__tapAnimationCleanup = (): void => {\n Object.entries(animationListeners).forEach(([event, handler]) => {\n el.removeEventListener(event, handler);\n });\n };\n}\n\nexport const tapAnimation: Directive<HTMLElement, TapAnimationValue> = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding<TapAnimationValue>): void {\n // Check for reduced motion preference\n const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n if (prefersReducedMotion) {\n return;\n }\n\n const bounceAmount = binding.value?.bounceAmount ?? DEFAULT_BOUNCE_AMOUNT;\n setupTapAnimation(el, bounceAmount);\n },\n\n updated(el: HTMLElement, binding: DirectiveBinding<TapAnimationValue>): void {\n // Check for reduced motion preference\n const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n if (prefersReducedMotion) {\n return;\n }\n\n // If bounce amount changes, we need to re-mount the directive\n if (binding.value?.bounceAmount !== binding.oldValue?.bounceAmount) {\n (el as TapAnimationElement).__tapAnimationCleanup?.();\n const bounceAmount = binding.value?.bounceAmount ?? DEFAULT_BOUNCE_AMOUNT;\n setupTapAnimation(el, bounceAmount);\n }\n },\n\n unmounted(el: HTMLElement): void {\n (el as TapAnimationElement).__tapAnimationCleanup?.();\n },\n};\n","<template>\n <button\n v-tap-animation\n class=\"c-close-button\"\n data-test=\"c-close-button\"\n :aria-label=\"$t('Close')\"\n :disabled=\"disabled\"\n @click=\"onClick\"\n >\n <font-awesome-icon :icon=\"faXmark\" />\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\n\nimport { tapAnimation as vTapAnimation } from '@propelinc/citrus-ui/src/services/directives';\n\ndefineProps<{\n disabled?: boolean;\n}>();\n\nconst emit = defineEmits(['click', 'focus', 'blur']);\n\nconst onClick = (): void => {\n emit('click');\n};\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/button';\n\n.c-close-button {\n align-items: center;\n border-radius: 50%;\n cursor: pointer;\n display: flex;\n font-size: $font-size-icon-medium;\n height: 36px;\n justify-content: center;\n padding: 8px;\n width: 36px;\n\n @include button-theme-close;\n\n &:focus {\n /**\n * This is a workaround to get the focus ring to work with the button. Since we're not using Shoelace,\n * we need to use the focus ring styles from Shoelace. Long term, we should create a custom focus ring styles.\n */\n outline: var(--sl-focus-ring-width) solid var(--sl-focus-ring-color);\n outline-offset: var(--sl-focus-ring-offset);\n }\n}\n</style>\n","import type { Ref } from 'vue';\nimport { onBeforeUnmount, onMounted, ref, watch } from 'vue';\n\n// NOTE(mohan): A simplified port of vueuse/core's useResizeObserver.\n// vueuse has type errors because our version of vue is so old.\nexport function useResizeObserver(\n element: Ref<HTMLElement | null>,\n callback: (entries: ResizeObserverEntry[]) => void\n): void {\n if (!('ResizeObserver' in window)) {\n return;\n }\n\n let observer: ResizeObserver | null = null;\n\n watch(\n element,\n (value) => {\n if (value) {\n observer = new ResizeObserver(callback);\n observer.observe(value);\n }\n },\n { immediate: true }\n );\n\n onBeforeUnmount(() => {\n if (observer) {\n observer.disconnect();\n observer = null;\n }\n });\n}\n\nexport function useShoelaceShadowParts<T extends string>(\n shoelaceComponent: Ref<HTMLElement | null>,\n parts: T[]\n): Record<T, Ref<HTMLElement | null>> {\n const shadowParts = parts.reduce<Record<T, Ref<HTMLElement | null>>>(\n (acc, part) => {\n return { ...acc, [part]: ref<HTMLElement | null>(null) };\n },\n {} as Record<T, Ref<HTMLElement | null>>\n );\n\n onMounted(async () => {\n if (!shoelaceComponent.value) {\n return;\n }\n\n try {\n await customElements.whenDefined(shoelaceComponent.value.tagName.toLowerCase());\n } catch {\n // TODO: (kyleshevlin) we had to stub out Shoelace component in tests, which causes this to fail\n // because there is no tagName for the stubbed component\n // Silently handle error\n return;\n }\n\n // Make sure the component hasn't been destroyed at this point.\n const shadowRoot = shoelaceComponent.value?.shadowRoot;\n if (!shadowRoot) {\n return;\n }\n\n for (const part of parts) {\n shadowParts[part].value = shadowRoot.querySelector(`[part=\"${part}\"]`);\n }\n });\n\n return shadowParts;\n}\n","import type { Ref } from 'vue';\nimport { computed, onMounted, ref, watch } from 'vue';\n\nexport interface Coordinate {\n x: number;\n y: number;\n}\n\ninterface SimplifiedPointerEvent {\n position: Coordinate;\n timestamp: number;\n}\n\ntype DragCallback = (dragDetails: {\n /** How far the user has dragged in pixels */\n distance: Coordinate;\n /** Velocity of drag in pixels/ms */\n velocity: Coordinate;\n}) => void;\n\n/**\n * Listens for drag events on the provided element and tracks the distance and\n * velocity of the drag.\n *\n * @param element - The element to listen for drag events on.\n * @param options.onDragEnd - A callback that is called when the drag ends.\n * @returns An object containing the drag distance and velocity.\n */\nexport const useDragListener = (\n element: Ref<HTMLElement | null>,\n options?: {\n onDragEnd?: DragCallback;\n }\n): {\n dragDistance: Ref<Coordinate | null>;\n dragVelocity: Ref<Coordinate | null>;\n} => {\n const startDragTouch = ref<SimplifiedPointerEvent | null>(null);\n const lastDragTouch = ref<SimplifiedPointerEvent | null>(null);\n\n const dragVelocity = ref<Coordinate | null>(null);\n const dragDistance = computed(() => {\n if (!startDragTouch.value || !lastDragTouch.value) {\n return { x: 0, y: 0 };\n }\n return {\n x: lastDragTouch.value.position.x - startDragTouch.value.position.x,\n y: lastDragTouch.value.position.y - startDragTouch.value.position.y,\n };\n });\n\n const simplifyEvent = (event: TouchEvent): SimplifiedPointerEvent => {\n const { clientX: x, clientY: y } = event.touches[0];\n return { position: { x, y }, timestamp: event.timeStamp };\n };\n\n const touchStartListener = (event: TouchEvent): void => {\n startDragTouch.value = simplifyEvent(event);\n lastDragTouch.value = startDragTouch.value;\n };\n\n const touchMoveListener = (event: TouchEvent): void => {\n const newEvent = simplifyEvent(event);\n if (lastDragTouch.value) {\n const timeDelta = newEvent.timestamp - lastDragTouch.value.timestamp;\n dragVelocity.value = {\n x: (newEvent.position.x - lastDragTouch.value.position.x) / timeDelta,\n y: (newEvent.position.y - lastDragTouch.value.position.y) / timeDelta,\n };\n }\n lastDragTouch.value = newEvent;\n };\n\n const touchEndListener = (): void => {\n options?.onDragEnd?.({\n distance: dragDistance.value,\n velocity: dragVelocity.value ?? { x: 0, y: 0 },\n });\n startDragTouch.value = null;\n lastDragTouch.value = null;\n dragVelocity.value = null;\n };\n\n const addListeners = (element: HTMLElement | null): void => {\n if (element) {\n element.addEventListener('touchstart', touchStartListener);\n element.addEventListener('touchmove', touchMoveListener);\n element.addEventListener('touchend', touchEndListener);\n }\n };\n\n const removeListeners = (element: HTMLElement | null): void => {\n if (element) {\n element.removeEventListener('touchstart', touchStartListener);\n element.removeEventListener('touchmove', touchMoveListener);\n element.removeEventListener('touchend', touchEndListener);\n }\n };\n\n onMounted(async () => {\n addListeners(element.value);\n });\n\n watch(element, (newElement, oldElement) => {\n removeListeners(oldElement);\n addListeners(newElement);\n });\n\n return { dragDistance, dragVelocity };\n};\n\n/**\n * Adds listeners to the provided element to prevent it from emitting touch\n * events when it is scrolling.\n *\n * @param element - A scrollable element inside a draggable component.\n */\nexport const useScrollBoundary = (element: Ref<HTMLElement | null>): void => {\n const isScrolling = ref(false);\n const onScroll = (): void => {\n isScrolling.value = true;\n };\n\n const onTouchEvent = (event: TouchEvent): void => {\n if (isScrolling.value) {\n event.stopPropagation();\n }\n };\n const onTouchEnd = (event: TouchEvent): void => {\n onTouchEvent(event);\n isScrolling.value = false;\n };\n\n const addListeners = (element: HTMLElement | null): void => {\n if (element) {\n element.addEventListener('scroll', onScroll);\n element.addEventListener('touchstart', onTouchEvent);\n element.addEventListener('touchmove', onTouchEvent);\n element.addEventListener('touchend', onTouchEnd);\n }\n };\n\n const removeListeners = (element: HTMLElement | null): void => {\n if (element) {\n element.removeEventListener('scroll', onScroll);\n element.removeEventListener('touchstart', onTouchEvent);\n element.removeEventListener('touchmove', onTouchEvent);\n element.removeEventListener('touchend', onTouchEnd);\n }\n };\n\n onMounted(() => {\n addListeners(element.value);\n });\n\n watch(element, (newElement, oldElement) => {\n removeListeners(oldElement);\n addListeners(newElement);\n });\n};\n\n/**\n * Clamps a value in between the provided min and max values. As the value\n * increases above 0, it will approach the max, but will never reach it (and\n * vice versa for the min).\n *\n * This can be used to create a \"springy\" effect where as a user pulls further\n * on an element, it will move less and less.\n *\n * @param value - The value to clamp.\n * @param options.min - The minimum value to keep the value above.\n * @param options.max - The maximum value to keep the value below.\n * @param options.resistance - The resistance value which determines how quickly\n * the value approaches the min or max.\n * @returns The clamped value.\n */\nexport const useElasticClamp = (\n value: Ref<number | null>,\n options?: Ref<{ min?: number; max?: number; resistance?: number }>\n): Ref<number> => {\n return computed(() => {\n if (value.value === null) {\n return 0;\n }\n\n const resistance = options?.value?.resistance ?? 7;\n const { min, max } = options?.value ?? {};\n const absValue = Math.abs(value.value);\n if (min && value.value < 0) {\n return (min * absValue) / (absValue - min * resistance);\n } else if (max && value.value > 0) {\n return (max * absValue) / (absValue + max * resistance);\n } else {\n return value.value;\n }\n });\n};\n","import type { Ref, VNode } from 'vue';\nimport { Comment, Fragment, computed, useSlots } from 'vue';\n\n/**\n * Recursively checks if a VNode or its children are visible.\n */\nfunction isVisible(vnode: VNode): boolean {\n if (vnode.type === Comment) {\n return false;\n }\n\n // Handle fragments and templates recursively\n if (vnode.type === Fragment || vnode.type === 'template') {\n const children = vnode.children;\n\n // Empty fragment is not visible\n if (!children || (Array.isArray(children) && children.length === 0)) {\n return false;\n }\n\n // If fragment has children, check if any child is visible\n if (Array.isArray(children)) {\n return children.some((child) => {\n // Only check VNode children (filter out strings, numbers, etc.)\n if (typeof child === 'object' && child !== null && 'type' in child) {\n return isVisible(child as VNode);\n }\n // Non-VNode children (like strings) are considered visible\n return true;\n });\n }\n }\n\n // All other vnodes are visible\n return true;\n}\n\nexport function useSlotHasContent(key: string): Ref<boolean> {\n const slots = useSlots();\n\n return computed(() => {\n const slot = slots[key];\n\n if (!slot) {\n return false;\n }\n\n const slotContent = slot();\n\n // NOTE(slanden): In Vue 3, nodes which are rendered conditionally with v-if\n // are rendered as a comment like `<!--v-if--/>` when the condition is false.\n // We need to filter these out to get only actually rendered content.\n const visibleContent = slotContent.filter(isVisible);\n\n return visibleContent.length > 0;\n });\n}\n","import type { ElementAnimation } from '@shoelace-style/shoelace/dist/utilities/animation-registry.js';\n\nexport interface AnimationOptions {\n /** The starting progress through the animation from 0 to 1 */\n start?: number;\n /** The duration of the animation in milliseconds */\n duration?: number;\n /** The easing function to use for the animation */\n easing?: string;\n /** The endimum distance to slide */\n end?: number;\n}\n\nconst DEFAULT_DURATION = 300;\nconst DEFAULT_EASING = 'ease';\n\nexport function fadeIn({\n start = 0,\n duration = DEFAULT_DURATION,\n easing = DEFAULT_EASING,\n}: AnimationOptions = {}): ElementAnimation {\n return {\n keyframes: [\n { opacity: start, offset: 0 },\n { opacity: 1, offset: 1 },\n ],\n options: { duration, easing },\n };\n}\n\nexport function fadeOut({\n start = 0,\n duration = DEFAULT_DURATION,\n easing = DEFAULT_EASING,\n}: AnimationOptions = {}): ElementAnimation {\n return {\n keyframes: [\n { opacity: 1 - start, offset: 0 },\n { opacity: 0, offset: 1 },\n ],\n options: { duration, easing },\n };\n}\n\nexport function slideUp({\n start = 0,\n duration = DEFAULT_DURATION,\n easing = DEFAULT_EASING,\n}: AnimationOptions = {}): ElementAnimation {\n return {\n keyframes: [\n { translate: `0 ${(1 - start) * 100}%`, offset: 0 },\n { translate: '0 0', offset: 1 },\n ],\n options: { duration, easing },\n };\n}\n\nexport function slideDown({\n start = 0,\n duration = DEFAULT_DURATION,\n easing = DEFAULT_EASING,\n}: AnimationOptions = {}): ElementAnimation {\n return {\n keyframes: [\n { translate: `0 ${start * 100}%`, offset: 0 },\n { translate: '0 100%', offset: 1 },\n ],\n options: { duration, easing },\n };\n}\n\nexport function slideRight({\n start = 0,\n duration = DEFAULT_DURATION,\n easing = DEFAULT_EASING,\n end = 1,\n}: AnimationOptions = {}): ElementAnimation {\n return {\n keyframes: [\n { translate: `${start * 100}% 0`, offset: 0 },\n { translate: `${end * 100}% 0`, offset: 1 },\n ],\n options: { duration, easing },\n };\n}\n\nexport function slideLeft({\n start = 0,\n duration = DEFAULT_DURATION,\n easing = DEFAULT_EASING,\n end = 1,\n}: AnimationOptions = {}): ElementAnimation {\n return {\n keyframes: [\n { translate: `${-start * 100}% 0`, offset: 0 },\n { translate: `${-end * 100}% 0`, offset: 1 },\n ],\n options: { duration, easing },\n };\n}\n","<!-- eslint-disable vue/no-deprecated-slot-attribute -->\n<template>\n <!--\n For no-header prop below:\n See https://vuejs.org/guide/extras/web-components#passing-dom-properties\n Shoelace does not seem to properly specify the no-header prop; otherwise\n a false value resolves to no-header=\"false\" which is actually truthy\n -->\n <sl-drawer\n ref=\"sheet\"\n class=\"c-bottom-sheet\"\n :class=\"{\n 'c-bottom-sheet--hide-overlay': !overlay,\n 'c-bottom-sheet--hide-title': hideTitle,\n 'c-bottom-sheet--with-footer': footerHasContent,\n 'c-bottom-sheet--with-dismiss': isDismissVisible,\n }\"\n :style=\"{\n '--panel-transform': panelTransform,\n '--background-color-hex-code': backgroundCssColor,\n '--overlay-opacity': overlayOpacity,\n '--size': fixedSize || undefined,\n }\"\n :data-test=\"getDataTestAttr()\"\n :open=\"animatedValue || undefined\"\n :no-header=\"hideTitle || undefined\"\n :label=\"ariaLabel\"\n placement=\"bottom\"\n :contained=\"contained || undefined\"\n :divided=\"divided || undefined\"\n @sl-request-close=\"onRequestClose\"\n @sl-hide=\"handleDismiss\"\n @sl-after-hide=\"onAfterClose\"\n @sl-after-show=\"$emit('opened')\"\n >\n <div slot=\"label\" :data-test=\"value ? `${dataTest}-title` : null\">\n <slot name=\"header\">{{ title }}</slot>\n </div>\n\n <slot name=\"image\" />\n\n <div class=\"c-bottom-sheet__body\" :data-test=\"getDataTestAttr('body')\">\n <slot name=\"body\" />\n </div>\n\n <!-- NOTE(andrew): This renders in the body when the title is hidden because the header-actions\n slot is not rendered when the title is hidden. Previously this only rendered in the body but\n this caused issues on iOS where a scrollable body renders in a separate layer and the button\n got rendered invisibly underneath the header. This is intentionally placed after the body so\n it renders on top. -->\n <div\n v-if=\"isDismissVisible\"\n :slot=\"hideTitle ? undefined : 'header-actions'\"\n class=\"c-bottom-sheet__actions\"\n >\n <c-close-button\n :data-test=\"getDataTestAttr('dismiss')\"\n :disabled=\"disableDismiss\"\n @click=\"internalValue = false\"\n />\n </div>\n\n <CButtonStack v-if=\"footerHasContent\" slot=\"footer\" :data-test=\"getDataTestAttr('footer')\">\n <slot name=\"footer\" />\n </CButtonStack>\n </sl-drawer>\n</template>\n\n<script lang=\"ts\">\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\nimport '@shoelace-style/shoelace/dist/components/drawer/drawer.js';\nimport type SlDrawer from '@shoelace-style/shoelace/dist/components/drawer/drawer.js';\nimport type { ElementAnimation } from '@shoelace-style/shoelace/dist/utilities/animation-registry.js';\nimport { setAnimation } from '@shoelace-style/shoelace/dist/utilities/animation-registry.js';\nimport type { Ref } from 'vue';\nimport { computed, defineComponent, nextTick, onMounted, ref, toRefs } from 'vue';\n\nimport CButtonStack from '@propelinc/citrus-ui/src/components/CButtonStack.vue';\nimport CCloseButton from '@propelinc/citrus-ui/src/components/internal/CCloseButton.vue';\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\nimport { useCssColor } from '@propelinc/citrus-ui/src/composables/colors';\nimport { useShoelaceShadowParts } from '@propelinc/citrus-ui/src/composables/elements';\nimport {\n useDragListener,\n useElasticClamp,\n useScrollBoundary,\n} from '@propelinc/citrus-ui/src/composables/gestures';\nimport { useSlotHasContent } from '@propelinc/citrus-ui/src/composables/slots';\nimport { fadeIn, fadeOut, slideDown, slideUp } from '@propelinc/citrus-ui/src/services/animation';\n\n/** Minimum distance, in pixels, the user has to drag for it to be considered a\n * successful swipe. */\nconst MIN_SWIPE_DISTANCE = 100;\n/** The minimum speed, in pixels per millisecond, the user has to drag down for\n * it to be considered a successful swipe. */\nconst MIN_SWIPE_VELOCITY = 0.75;\n/** The minimum speed, in pixels per millisecond, to animate the sheet sliding\n * down after a successful swipe. */\nconst MIN_DISMISS_VELOCITY = 1.5;\n/** Minimum duration, in milliseconds, for the slide down animation after a\n * successful drag. */\nconst MIN_DISMISS_DURATION = 100;\n/** Maximum distance the sheet can move in a direction it can't be dragged. */\nconst DRAG_CLAMP_DISTANCE = 240;\n/** Fallback height for the sheet if the actual height is unknown. */\nconst SHEET_HEIGHT_FALLBACK = 300;\n\n/**\n * Was having issues with the useShoelaceAnimation composable not updating the animation quickly\n * enough using the `watch` or `watchEffect` hooks, so we're just going to set the animations\n * directly whenever we need to change the animation.\n */\nfunction setCustomAnimation(\n el: Ref<Element | null>,\n name: string,\n animation: ElementAnimation\n): void {\n if (!el.value) {\n return;\n }\n\n setAnimation(el.value, name, animation);\n}\n\nexport default defineComponent({\n components: { CButtonStack, CCloseButton },\n props: {\n /** Aria label for the bottom sheet. This is required if title is hidden */\n ariaLabel: { type: String, default: '' },\n /** Background color of the bottom sheet */\n backgroundColor: { type: String, default: '' },\n /** Prefix for test selectors */\n dataTest: { type: String, default: 'bottom-sheet' },\n /** Disables the dismiss button */\n disableDismiss: { type: Boolean, default: false },\n /** Divided into header, body, and footer slots */\n divided: { type: Boolean, default: false },\n /** Fixed size, in CSS units. By default the drawer sizes itself to its contents. */\n fixedSize: { type: String, default: '' },\n /** Hides the dismiss 'x' button */\n hideDismiss: { type: Boolean, default: false },\n /** Allows for hiding the entire title bar, both the title and the dismiss 'x' button */\n hideTitle: { type: Boolean, default: false },\n /** Toggles the background behind the sheet. If there's no overlay, the sheet\n * stays open as the user interacts with background content.' */\n overlay: { type: Boolean, default: true },\n /** Prevents the sheet from being dismissed when tapping on the overlay. If\n * there is no overlay then this property is ignored, as the sheet always\n * stays open. */\n persistent: { type: Boolean, default: false },\n /** If true, the bottom sheet will be contained within the viewport. */\n contained: { type: Boolean, default: false },\n /** Do not animate in the bottom sheet if it starts open. */\n skipInitialAnimation: { type: Boolean, default: false },\n /** The title of the bottom sheet */\n title: { type: String, default: '' },\n /** Controls whether or not the bottom sheet is showing */\n value: { type: Boolean, default: false },\n },\n emits: ['input', 'opened', 'closed'],\n setup(props, { emit }) {\n // NOTE(slanden): Temporarily disabling because it's causing a lot of errors\n // in the console - uses from CMS aren't specifying aria-label.\n // watchEffect(() => {\n // if (props.hideTitle && !props.ariaLabel) {\n // console.error('CBottomSheet: aria-label is required when title is hidden');\n // }\n // });\n\n // value: Value provided using props which can open/close the bottom sheet.\n // internalValue: Tracks the open/closed state and lets the bottom sheet open and close even if\n // the external value doesn't change.\n // animatedValue: Same as internalValue but starts at false so the bottom sheet animates if it\n // starts in an open state.\n const { value } = toRefs(props);\n const internalValue = useInternalValue(value, { onChange: (value) => emit('input', value) });\n const mounted = ref(false);\n const animatedValue = computed(() => {\n // To animate in the bottom sheet we mount the component with the sheet closed.\n if (!props.skipInitialAnimation && !mounted.value) {\n return false;\n }\n return internalValue.value;\n });\n const { cssColor: backgroundCssColor } = useCssColor(() => props.backgroundColor);\n onMounted(async () => {\n // The bottom sheet does not animate unless we wait a tick. We don't know exactly why this\n // is necessary.\n await nextTick();\n mounted.value = true;\n });\n\n const sheet = ref<SlDrawer | null>(null);\n const { panel, overlay, body } = useShoelaceShadowParts(sheet, ['panel', 'overlay', 'body']);\n useScrollBoundary(body);\n\n // NOTE(mohan): There are three parts to the bottom sheet animation:\n // 1. CSS variables. These are used when we want to set the exact height and\n // opacity, i.e. when the user is actively moving the sheet.\n // 2. The built-in Shoelace show and hide animations. If a user has swiped\n // the sheet away, we calculate the exact animation that will smoothly\n // continue the swipe and then dismiss the shoelace drawer.\n // 3. Manually-called web animations. These are used when the sheet is being\n // restored to its original position after a drag that was not fast or\n // long enough to count as a swipe.\n setCustomAnimation(sheet, 'drawer.showBottom', slideUp());\n setCustomAnimation(sheet, 'drawer.overlay.show', fadeIn());\n setCustomAnimation(sheet, 'drawer.hideBottom', slideDown());\n setCustomAnimation(sheet, 'drawer.overlay.hide', fadeOut());\n\n const handleDismiss = (): void => {\n internalValue.value = false;\n };\n\n const onRequestClose = (event: Event): void => {\n if (props.persistent) {\n event.preventDefault();\n }\n };\n\n const onAfterClose = (): void => {\n // Reset the exit animations in case they were changed in a drag event\n setCustomAnimation(sheet, 'drawer.hideBottom', slideDown());\n setCustomAnimation(sheet, 'drawer.overlay.hide', fadeOut());\n emit('closed');\n };\n\n /**\n * Helper function to calculate the distance ratio of the sheet's transform.\n */\n const getTransformDistanceRatio = (distance: number): number => {\n return distance / (panel.value?.clientHeight ?? SHEET_HEIGHT_FALLBACK);\n };\n\n const { dragDistance } = useDragListener(panel, {\n onDragEnd: async ({ distance, velocity }) => {\n const shouldDismiss =\n !props.persistent && (distance.y > MIN_SWIPE_DISTANCE || velocity.y > MIN_SWIPE_VELOCITY);\n\n if (shouldDismiss) {\n const remainingDismissDistance = panel.value!.clientHeight - dragDistance.value!.y;\n const dismissDuration = Math.max(\n remainingDismissDistance / Math.max(velocity.y, MIN_DISMISS_VELOCITY),\n MIN_DISMISS_DURATION\n );\n const dismissStart = getTransformDistanceRatio(distance.y);\n\n // Here we set the custom animations to complete the dismissal animation smoothly\n // from the point where the user ended their drag event.\n setCustomAnimation(\n sheet,\n 'drawer.hideBottom',\n slideDown({ start: dismissStart, duration: dismissDuration })\n );\n setCustomAnimation(\n sheet,\n 'drawer.overlay.hide',\n fadeOut({ start: dismissStart, duration: dismissDuration })\n );\n handleDismiss();\n } else {\n /**\n * This is when the user's drag event fails to trigger a dismissal\n * We need to restore the sheet to its original position\n */\n const start = 1 - getTransformDistanceRatio(dragDistance.value!.y);\n const slideUpAnimation = slideUp({ start });\n const fadeInAnimation = fadeIn({ start });\n\n // Here we imperatively animate the sheet and overlay back to their original positions\n panel.value?.animate(slideUpAnimation.keyframes, slideUpAnimation.options);\n overlay.value?.animate(fadeInAnimation.keyframes, fadeInAnimation.options);\n }\n },\n });\n\n /**\n * The distance that the sheet has been currently dragged\n */\n const transformDistance = useElasticClamp(\n computed(() => dragDistance.value?.y ?? 0),\n computed(() => ({\n min: -DRAG_CLAMP_DISTANCE,\n max: props.persistent ? DRAG_CLAMP_DISTANCE : undefined,\n }))\n );\n\n const transformDistanceRatio = computed(() =>\n getTransformDistanceRatio(transformDistance.value)\n );\n\n const panelTransform = computed(() => `translateY(${transformDistance.value}px)`);\n\n const overlayOpacity = computed(() => {\n const result = 1 - transformDistanceRatio.value;\n\n if (isNaN(result)) {\n return 1;\n }\n\n return result;\n });\n\n // NOTE(mohan): We show data-test attributes only when the sheet is open.\n // This helps simplify testing assertions.\n const getDataTestAttr = (suffix?: string): string | null => {\n const dataTest = suffix ? `${props.dataTest}-${suffix}` : props.dataTest;\n return internalValue.value ? dataTest : null;\n };\n\n const footerHasContent = useSlotHasContent('footer');\n\n const isDismissVisible = computed(\n () => (!props.persistent && !props.hideDismiss) || props.disableDismiss\n );\n\n return {\n backgroundCssColor,\n animatedValue,\n dragDistance,\n faXmark,\n footerHasContent,\n getDataTestAttr,\n handleDismiss,\n internalValue,\n isDismissVisible,\n onRequestClose,\n overlayOpacity,\n panelTransform,\n onAfterClose,\n sheet,\n transformDistance,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/utils/a11y';\n\n.c-bottom-sheet {\n --size: auto;\n --header-spacing: 24px;\n --body-spacing: 0;\n --bottom-padding: max(env(safe-area-inset-bottom, 0px), 16px);\n --footer-spacing: 12px 24px var(--bottom-padding);\n\n &::part(header-actions) {\n padding: 0;\n }\n\n &::part(close-button) {\n @include sr-only;\n }\n\n &::part(panel) {\n background: var(--background-color-hex-code, $color-white);\n border-radius: 12px 12px 0 0;\n max-height: 90%;\n overflow: visible;\n transform: var(--panel-transform, none);\n\n &::after {\n background: var(--background-color-hex-code, $color-white);\n bottom: -100px;\n content: '';\n height: 101px;\n left: 0;\n position: absolute;\n right: 0;\n }\n }\n\n &::part(body) {\n border-radius: 12px 12px 0 0;\n\n /**\n * NOTE (kyleshevlin) adding position: relative here fixed an issue where certain actions (like\n * clicking a checkbox) would hijack the bottom sheet body up and off the screen.\n */\n position: relative;\n }\n\n &::part(title) {\n @include large-headline;\n\n padding-bottom: 16px;\n }\n\n // Note(kayliegh): Add space to prevent long titles from colliding with dismiss button\n &--with-dismiss::part(title) {\n margin-right: 28px;\n }\n\n &::part(overlay) {\n opacity: var(--overlay-opacity, 1);\n }\n}\n\n.c-bottom-sheet__actions {\n position: absolute;\n right: 16px;\n top: 16px;\n}\n\n.c-bottom-sheet__body {\n padding: 0 24px var(--bottom-padding);\n\n // NOTE(andrew): When there is a footer the bottom inset is handled by the footer and we just add\n // spacing above the footer.\n .c-bottom-sheet--with-footer & {\n padding-bottom: 12px;\n }\n}\n\n.c-bottom-sheet--hide-title {\n // NOTE(mohan): When there is no title, we need to add some spacing to the top\n // of the body so it doesn't touch the top of the panel.\n .c-bottom-sheet__body {\n padding-top: 16px;\n }\n}\n\n.c-bottom-sheet--hide-overlay {\n &::part(overlay) {\n display: none;\n }\n}\n</style>\n","/*!\n * vue-router v4.5.1\n * (c) 2025 Eduardo San Martin Morote\n * @license MIT\n */\nimport { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, shallowReactive, nextTick } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\nconst isBrowser = typeof document !== 'undefined';\n\n/**\n * Allows differentiating lazy components from functional components and vue-class-component\n * @internal\n *\n * @param component\n */\nfunction isRouteComponent(component) {\n return (typeof component === 'object' ||\n 'displayName' in component ||\n 'props' in component ||\n '__vccOpts' in component);\n}\nfunction isESModule(obj) {\n return (obj.__esModule ||\n obj[Symbol.toStringTag] === 'Module' ||\n // support CF with dynamic imports that do not\n // add the Module string tag\n (obj.default && isRouteComponent(obj.default)));\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value)\n ? value.map(fn)\n : fn(value);\n }\n return newParams;\n}\nconst noop = () => { };\n/**\n * Typesafe alternative to Array.isArray\n * https://github.com/microsoft/TypeScript/pull/48228\n */\nconst isArray = Array.isArray;\n\nfunction warn(msg) {\n // avoid using ...args as it breaks in older Edge builds\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, ['[Vue Router warn]: ' + msg].concat(args));\n}\n\n/**\n * Encoding Rules (␣ = Space)\n * - Path: ␣ \" < > # ? { }\n * - Query: ␣ \" < > # & =\n * - Hash: ␣ \" < > `\n *\n * On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n * defines some extra characters to be encoded. Most browsers do not encode them\n * in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n * also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n * plus `-._~`. This extra safety should be applied to query by patching the\n * string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n * should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n * into a `/` if directly typed in. The _backtick_ (`````) should also be\n * encoded everywhere because some browsers like FF encode it when directly\n * written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n */\n// const EXTRA_RESERVED_RE = /[!'()*]/g\n// const encodeReservedReplacer = (c: string) => '%' + c.charCodeAt(0).toString(16)\nconst HASH_RE = /#/g; // %23\nconst AMPERSAND_RE = /&/g; // %26\nconst SLASH_RE = /\\//g; // %2F\nconst EQUAL_RE = /=/g; // %3D\nconst IM_RE = /\\?/g; // %3F\nconst PLUS_RE = /\\+/g; // %2B\n/**\n * NOTE: It's not clear to me if we should encode the + symbol in queries, it\n * seems to be less flexible than not doing so and I can't find out the legacy\n * systems requiring this for regular requests like text/html. In the standard,\n * the encoding of the plus character is only mentioned for\n * application/x-www-form-urlencoded\n * (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n * leave the plus character as is in queries. To be more flexible, we allow the\n * plus character on the query, but it can also be manually encoded by the user.\n *\n * Resources:\n * - https://url.spec.whatwg.org/#urlencoded-parsing\n * - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n */\nconst ENC_BRACKET_OPEN_RE = /%5B/g; // [\nconst ENC_BRACKET_CLOSE_RE = /%5D/g; // ]\nconst ENC_CARET_RE = /%5E/g; // ^\nconst ENC_BACKTICK_RE = /%60/g; // `\nconst ENC_CURLY_OPEN_RE = /%7B/g; // {\nconst ENC_PIPE_RE = /%7C/g; // |\nconst ENC_CURLY_CLOSE_RE = /%7D/g; // }\nconst ENC_SPACE_RE = /%20/g; // }\n/**\n * Encode characters that need to be encoded on the path, search and hash\n * sections of the URL.\n *\n * @internal\n * @param text - string to encode\n * @returns encoded string\n */\nfunction commonEncode(text) {\n return encodeURI('' + text)\n .replace(ENC_PIPE_RE, '|')\n .replace(ENC_BRACKET_OPEN_RE, '[')\n .replace(ENC_BRACKET_CLOSE_RE, ']');\n}\n/**\n * Encode characters that need to be encoded on the hash section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeHash(text) {\n return commonEncode(text)\n .replace(ENC_CURLY_OPEN_RE, '{')\n .replace(ENC_CURLY_CLOSE_RE, '}')\n .replace(ENC_CARET_RE, '^');\n}\n/**\n * Encode characters that need to be encoded query values on the query\n * section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeQueryValue(text) {\n return (commonEncode(text)\n // Encode the space as +, encode the + to differentiate it from the space\n .replace(PLUS_RE, '%2B')\n .replace(ENC_SPACE_RE, '+')\n .replace(HASH_RE, '%23')\n .replace(AMPERSAND_RE, '%26')\n .replace(ENC_BACKTICK_RE, '`')\n .replace(ENC_CURLY_OPEN_RE, '{')\n .replace(ENC_CURLY_CLOSE_RE, '}')\n .replace(ENC_CARET_RE, '^'));\n}\n/**\n * Like `encodeQueryValue` but also encodes the `=` character.\n *\n * @param text - string to encode\n */\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, '%23').replace(IM_RE, '%3F');\n}\n/**\n * Encode characters that need to be encoded on the path section of the URL as a\n * param. This function encodes everything {@link encodePath} does plus the\n * slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n * string instead.\n *\n * @param text - string to encode\n * @returns encoded string\n */\nfunction encodeParam(text) {\n return text == null ? '' : encodePath(text).replace(SLASH_RE, '%2F');\n}\n/**\n * Decode text using `decodeURIComponent`. Returns the original text if it\n * fails.\n *\n * @param text - string to decode\n * @returns decoded string\n */\nfunction decode(text) {\n try {\n return decodeURIComponent('' + text);\n }\n catch (err) {\n (process.env.NODE_ENV !== 'production') && warn(`Error decoding \"${text}\". Using original value`);\n }\n return '' + text;\n}\n\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, '');\n/**\n * Transforms a URI into a normalized history location\n *\n * @param parseQuery\n * @param location - URI to normalize\n * @param currentLocation - current absolute location. Allows resolving relative\n * paths. Must start with `/`. Defaults to `/`\n * @returns a normalized history location\n */\nfunction parseURL(parseQuery, location, currentLocation = '/') {\n let path, query = {}, searchString = '', hash = '';\n // Could use URL and URLSearchParams but IE 11 doesn't support it\n // TODO: move to new URL()\n const hashPos = location.indexOf('#');\n let searchPos = location.indexOf('?');\n // the hash appears before the search, so it's not part of the search string\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location.slice(0, searchPos);\n searchString = location.slice(searchPos + 1, hashPos > -1 ? hashPos : location.length);\n query = parseQuery(searchString);\n }\n if (hashPos > -1) {\n path = path || location.slice(0, hashPos);\n // keep the # character\n hash = location.slice(hashPos, location.length);\n }\n // no search and no query\n path = resolveRelativePath(path != null ? path : location, currentLocation);\n // empty path means a relative query or hash `?foo=f`, `#thing`\n return {\n fullPath: path + (searchString && '?') + searchString + hash,\n path,\n query,\n hash: decode(hash),\n };\n}\n/**\n * Stringifies a URL object\n *\n * @param stringifyQuery\n * @param location\n */\nfunction stringifyURL(stringifyQuery, location) {\n const query = location.query ? stringifyQuery(location.query) : '';\n return location.path + (query && '?') + query + (location.hash || '');\n}\n/**\n * Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n *\n * @param pathname - location.pathname\n * @param base - base to strip off\n */\nfunction stripBase(pathname, base) {\n // no base or base is not found at the beginning\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || '/';\n}\n/**\n * Checks if two RouteLocation are equal. This means that both locations are\n * pointing towards the same {@link RouteRecord} and that all `params`, `query`\n * parameters and `hash` are the same\n *\n * @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n * @param a - first {@link RouteLocation}\n * @param b - second {@link RouteLocation}\n */\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return (aLastIndex > -1 &&\n aLastIndex === bLastIndex &&\n isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) &&\n isSameRouteLocationParams(a.params, b.params) &&\n stringifyQuery(a.query) === stringifyQuery(b.query) &&\n a.hash === b.hash);\n}\n/**\n * Check if two `RouteRecords` are equal. Takes into account aliases: they are\n * considered equal to the `RouteRecord` they are aliasing.\n *\n * @param a - first {@link RouteRecord}\n * @param b - second {@link RouteRecord}\n */\nfunction isSameRouteRecord(a, b) {\n // since the original record has an undefined value for aliasOf\n // but all aliases point to the original record, this will always compare\n // the original record\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a)\n ? isEquivalentArray(a, b)\n : isArray(b)\n ? isEquivalentArray(b, a)\n : a === b;\n}\n/**\n * Check if two arrays are the same or if an array with one single entry is the\n * same as another primitive value. Used to check query and parameters\n *\n * @param a - array of values\n * @param b - array of values or a single value\n */\nfunction isEquivalentArray(a, b) {\n return isArray(b)\n ? a.length === b.length && a.every((value, i) => value === b[i])\n : a.length === 1 && a[0] === b;\n}\n/**\n * Resolves a relative path that starts with `.`.\n *\n * @param to - path location we are resolving\n * @param from - currentLocation.path, should start with `/`\n */\nfunction resolveRelativePath(to, from) {\n if (to.startsWith('/'))\n return to;\n if ((process.env.NODE_ENV !== 'production') && !from.startsWith('/')) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split('/');\n const toSegments = to.split('/');\n const lastToSegment = toSegments[toSegments.length - 1];\n // make . and ./ the same (../ === .., ../../ === ../..)\n // this is the same behavior as new URL()\n if (lastToSegment === '..' || lastToSegment === '.') {\n toSegments.push('');\n }\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n // we stay on the same position\n if (segment === '.')\n continue;\n // go up in the from array\n if (segment === '..') {\n // we can't go below zero, but we still need to increment toPosition\n if (position > 1)\n position--;\n // continue\n }\n // we reached a non-relative path, we stop here\n else\n break;\n }\n return (fromSegments.slice(0, position).join('/') +\n '/' +\n toSegments.slice(toPosition).join('/'));\n}\n/**\n * Initial route location where the router is. Can be used in navigation guards\n * to differentiate the initial navigation.\n *\n * @example\n * ```js\n * import { START_LOCATION } from 'vue-router'\n *\n * router.beforeEach((to, from) => {\n * if (from === START_LOCATION) {\n * // initial navigation\n * }\n * })\n * ```\n */\nconst START_LOCATION_NORMALIZED = {\n path: '/',\n // TODO: could we use a symbol in the future?\n name: undefined,\n params: {},\n query: {},\n hash: '',\n fullPath: '/',\n matched: [],\n meta: {},\n redirectedFrom: undefined,\n};\n\nvar NavigationType;\n(function (NavigationType) {\n NavigationType[\"pop\"] = \"pop\";\n NavigationType[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function (NavigationDirection) {\n NavigationDirection[\"back\"] = \"back\";\n NavigationDirection[\"forward\"] = \"forward\";\n NavigationDirection[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\n/**\n * Starting location for Histories\n */\nconst START = '';\n// Generic utils\n/**\n * Normalizes a base by removing any trailing slash and reading the base tag if\n * present.\n *\n * @param base - base to normalize\n */\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n // respect <base> tag\n const baseEl = document.querySelector('base');\n base = (baseEl && baseEl.getAttribute('href')) || '/';\n // strip full URL origin\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, '');\n }\n else {\n base = '/';\n }\n }\n // ensure leading slash when it was removed by the regex above avoid leading\n // slash with hash because the file could be read from the disk like file://\n // and the leading slash would cause problems\n if (base[0] !== '/' && base[0] !== '#')\n base = '/' + base;\n // remove the trailing slash so all other method can just do `base + fullPath`\n // to build an href\n return removeTrailingSlash(base);\n}\n// remove any character before the hash\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n return base.replace(BEFORE_HASH_RE, '#') + location;\n}\n\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0),\n };\n}\nconst computeScrollPosition = () => ({\n left: window.scrollX,\n top: window.scrollY,\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if ('el' in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === 'string' && positionEl.startsWith('#');\n /**\n * `id`s can accept pretty much any characters, including CSS combinators\n * like `>` or `~`. It's still possible to retrieve elements using\n * `document.getElementById('~')` but it needs to be escaped when using\n * `document.querySelector('#\\\\~')` for it to be valid. The only\n * requirements for `id`s are them to be unique on the page and to not be\n * empty (`id=\"\"`). Because of that, when passing an id selector, it should\n * be properly escaped for it to work with `querySelector`. We could check\n * for the id selector to be simple (no CSS combinators `+ >~`) but that\n * would make things inconsistent since they are valid characters for an\n * `id` but would need to be escaped when using `querySelector`, breaking\n * their usage and ending up in no selector returned. Selectors need to be\n * escaped:\n *\n * - `#1-thing` becomes `#\\31 -thing`\n * - `#with~symbols` becomes `#with\\\\~symbols`\n *\n * - More information about the topic can be found at\n * https://mathiasbynens.be/notes/html5-id-class.\n * - Practical example: https://mathiasbynens.be/demo/html5-id\n */\n if ((process.env.NODE_ENV !== 'production') && typeof position.el === 'string') {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n // return to avoid other warnings\n return;\n }\n }\n catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n // return to avoid other warnings\n return;\n }\n }\n }\n const el = typeof positionEl === 'string'\n ? isIdSelector\n ? document.getElementById(positionEl.slice(1))\n : document.querySelector(positionEl)\n : positionEl;\n if (!el) {\n (process.env.NODE_ENV !== 'production') &&\n warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n }\n else {\n scrollToOptions = position;\n }\n if ('scrollBehavior' in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n // consume it so it's not used again\n scrollPositions.delete(key);\n return scroll;\n}\n// TODO: RFC about how to save scroll position\n/**\n * ScrollBehavior instance used by the router to compute and restore the scroll\n * position when navigating.\n */\n// export interface ScrollHandler<ScrollPositionEntry extends HistoryStateValue, ScrollPosition extends ScrollPositionEntry> {\n// // returns a scroll position that can be saved in history\n// compute(): ScrollPositionEntry\n// // can take an extended ScrollPositionEntry\n// scroll(position: ScrollPosition): void\n// }\n// export const scrollHandler: ScrollHandler<ScrollPosition> = {\n// compute: computeScroll,\n// scroll: scrollToPosition,\n// }\n\nlet createBaseLocation = () => location.protocol + '//' + location.host;\n/**\n * Creates a normalized history location from a window.location object\n * @param base - The base path\n * @param location - The window.location object\n */\nfunction createCurrentLocation(base, location) {\n const { pathname, search, hash } = location;\n // allows hash bases like #, /#, #/, #!, #!/, /#!/, or even /folder#end\n const hashPos = base.indexOf('#');\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos))\n ? base.slice(hashPos).length\n : 1;\n let pathFromHash = hash.slice(slicePos);\n // prepend the starting slash to hash so the url starts with /#\n if (pathFromHash[0] !== '/')\n pathFromHash = '/' + pathFromHash;\n return stripBase(pathFromHash, '');\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n // TODO: should it be a stack? a Dict. Check if the popstate listener\n // can trigger twice\n let pauseState = null;\n const popStateHandler = ({ state, }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n // ignore the popstate and reset the pauseState\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n }\n else {\n replace(to);\n }\n // Here we could also revert the navigation by calling history.go(-delta)\n // this listener will have to be adapted to not trigger again and to wait for the url\n // to be updated before triggering the listeners. Some kind of validation function would also\n // need to be passed to the listeners so the navigation can be accepted\n // call all listeners\n listeners.forEach(listener => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta\n ? delta > 0\n ? NavigationDirection.forward\n : NavigationDirection.back\n : NavigationDirection.unknown,\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n // set up the listener and prepare teardown callbacks\n listeners.push(callback);\n const teardown = () => {\n const index = listeners.indexOf(callback);\n if (index > -1)\n listeners.splice(index, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history } = window;\n if (!history.state)\n return;\n history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), '');\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener('popstate', popStateHandler);\n window.removeEventListener('beforeunload', beforeUnloadListener);\n }\n // set up the listeners and prepare teardown callbacks\n window.addEventListener('popstate', popStateHandler);\n // TODO: could we use 'pagehide' or 'visibilitychange' instead?\n // https://developer.chrome.com/blog/page-lifecycle-api/\n window.addEventListener('beforeunload', beforeUnloadListener, {\n passive: true,\n });\n return {\n pauseListeners,\n listen,\n destroy,\n };\n}\n/**\n * Creates a state object\n */\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null,\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history, location } = window;\n // private variables\n const currentLocation = {\n value: createCurrentLocation(base, location),\n };\n const historyState = { value: history.state };\n // build current history entry as this is a fresh navigation\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null,\n }, true);\n }\n function changeLocation(to, state, replace) {\n /**\n * if a base tag is provided, and we are on a normal domain, we have to\n * respect the provided `base` attribute because pushState() will use it and\n * potentially erase anything before the `#` like at\n * https://github.com/vuejs/router/issues/685 where a base of\n * `/folder/#` but a base of `/` would erase the `/folder/` section. If\n * there is no host, the `<base>` tag makes no sense and if there isn't a\n * base tag we can just use everything after the `#`.\n */\n const hashIndex = base.indexOf('#');\n const url = hashIndex > -1\n ? (location.host && document.querySelector('base')\n ? base\n : base.slice(hashIndex)) + to\n : createBaseLocation() + base + to;\n try {\n // BROWSER QUIRK\n // NOTE: Safari throws a SecurityError when calling this function 100 times in 30 seconds\n history[replace ? 'replaceState' : 'pushState'](state, '', url);\n historyState.value = state;\n }\n catch (err) {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('Error with push/replace State', err);\n }\n else {\n console.error(err);\n }\n // Force the navigation, this also resets the call count\n location[replace ? 'replace' : 'assign'](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history.state, buildState(historyState.value.back, \n // keep back and forward entries but override current position\n to, historyState.value.forward, true), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n // Add to current entry the information of where we are going\n // as well as saving the current position\n const currentState = assign({}, \n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value, history.state, {\n forward: to,\n scroll: computeScrollPosition(),\n });\n if ((process.env.NODE_ENV !== 'production') && !history.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\n` +\n `history.replaceState(history.state, '', url)\\n\\n` +\n `You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace,\n };\n}\n/**\n * Creates an HTML5 history. Most common history for single page applications.\n *\n * @param base -\n */\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: '',\n base,\n go,\n createHref: createHref.bind(null, base),\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, 'location', {\n enumerable: true,\n get: () => historyNavigation.location.value,\n });\n Object.defineProperty(routerHistory, 'state', {\n enumerable: true,\n get: () => historyNavigation.state.value,\n });\n return routerHistory;\n}\n\n/**\n * Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n * It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n *\n * @param base - Base applied to all urls, defaults to '/'\n * @returns a history object that can be passed to the router constructor\n */\nfunction createMemoryHistory(base = '') {\n let listeners = [];\n let queue = [[START, {}]];\n let position = 0;\n base = normalizeBase(base);\n function setLocation(location, state = {}) {\n position++;\n if (position !== queue.length) {\n // we are in the middle, we remove everything from here in the queue\n queue.splice(position);\n }\n queue.push([location, state]);\n }\n function triggerListeners(to, from, { direction, delta }) {\n const info = {\n direction,\n delta,\n type: NavigationType.pop,\n };\n for (const callback of listeners) {\n callback(to, from, info);\n }\n }\n const routerHistory = {\n // rewritten by Object.defineProperty\n location: START,\n // rewritten by Object.defineProperty\n state: {},\n base,\n createHref: createHref.bind(null, base),\n replace(to, state) {\n // remove current entry and decrement position\n queue.splice(position--, 1);\n setLocation(to, state);\n },\n push(to, state) {\n setLocation(to, state);\n },\n listen(callback) {\n listeners.push(callback);\n return () => {\n const index = listeners.indexOf(callback);\n if (index > -1)\n listeners.splice(index, 1);\n };\n },\n destroy() {\n listeners = [];\n queue = [[START, {}]];\n position = 0;\n },\n go(delta, shouldTrigger = true) {\n const from = this.location;\n const direction = \n // we are considering delta === 0 going forward, but in abstract mode\n // using 0 for the delta doesn't make sense like it does in html5 where\n // it reloads the page\n delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n position = Math.max(0, Math.min(position + delta, queue.length - 1));\n if (shouldTrigger) {\n triggerListeners(this.location, from, {\n direction,\n delta,\n });\n }\n },\n };\n Object.defineProperty(routerHistory, 'location', {\n enumerable: true,\n get: () => queue[position][0],\n });\n Object.defineProperty(routerHistory, 'state', {\n enumerable: true,\n get: () => queue[position][1],\n });\n return routerHistory;\n}\n\n/**\n * Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n * handle any URL is not possible.\n *\n * @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n * in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n * calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n * after the `#`).\n *\n * @example\n * ```js\n * // at https://example.com/folder\n * createWebHashHistory() // gives a url of `https://example.com/folder#`\n * createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n * // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n * createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n * // you should avoid doing this because it changes the original url and breaks copying urls\n * createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n *\n * // at file:///usr/etc/folder/index.html\n * // for locations with no `host`, the base is ignored\n * createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n * ```\n */\nfunction createWebHashHistory(base) {\n // Make sure this implementation is fine in terms of encoding, specially for IE11\n // for `file://`, directly use the pathname and ignore the base\n // location.pathname contains an initial `/` even at the root: `https://example.com`\n base = location.host ? base || location.pathname + location.search : '';\n // allow the user to provide a `#` in the middle: `/base/#/app`\n if (!base.includes('#'))\n base += '#';\n if ((process.env.NODE_ENV !== 'production') && !base.endsWith('#/') && !base.endsWith('#')) {\n warn(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, '#')}\".`);\n }\n return createWebHistory(base);\n}\n\nfunction isRouteLocation(route) {\n return typeof route === 'string' || (route && typeof route === 'object');\n}\nfunction isRouteName(name) {\n return typeof name === 'string' || typeof name === 'symbol';\n}\n\nconst NavigationFailureSymbol = Symbol((process.env.NODE_ENV !== 'production') ? 'navigation failure' : '');\n/**\n * Enumeration with all possible types for navigation failures. Can be passed to\n * {@link isNavigationFailure} to check for specific failures.\n */\nvar NavigationFailureType;\n(function (NavigationFailureType) {\n /**\n * An aborted navigation is a navigation that failed because a navigation\n * guard returned `false` or called `next(false)`\n */\n NavigationFailureType[NavigationFailureType[\"aborted\"] = 4] = \"aborted\";\n /**\n * A cancelled navigation is a navigation that failed because a more recent\n * navigation finished started (not necessarily finished).\n */\n NavigationFailureType[NavigationFailureType[\"cancelled\"] = 8] = \"cancelled\";\n /**\n * A duplicated navigation is a navigation that failed because it was\n * initiated while already being at the exact same location.\n */\n NavigationFailureType[NavigationFailureType[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\n// DEV only debug messages\nconst ErrorTypeMessages = {\n [1 /* ErrorTypes.MATCHER_NOT_FOUND */]({ location, currentLocation }) {\n return `No match for\\n ${JSON.stringify(location)}${currentLocation\n ? '\\nwhile being at\\n' + JSON.stringify(currentLocation)\n : ''}`;\n },\n [2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */]({ from, to, }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [4 /* ErrorTypes.NAVIGATION_ABORTED */]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [8 /* ErrorTypes.NAVIGATION_CANCELLED */]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [16 /* ErrorTypes.NAVIGATION_DUPLICATED */]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n },\n};\n/**\n * Creates a typed NavigationFailure object.\n * @internal\n * @param type - NavigationFailureType\n * @param params - { from, to }\n */\nfunction createRouterError(type, params) {\n // keep full error messages in cjs versions\n if ((process.env.NODE_ENV !== 'production') || !true) {\n return assign(new Error(ErrorTypeMessages[type](params)), {\n type,\n [NavigationFailureSymbol]: true,\n }, params);\n }\n else {\n return assign(new Error(), {\n type,\n [NavigationFailureSymbol]: true,\n }, params);\n }\n}\nfunction isNavigationFailure(error, type) {\n return (error instanceof Error &&\n NavigationFailureSymbol in error &&\n (type == null || !!(error.type & type)));\n}\nconst propertiesToLog = ['params', 'query', 'hash'];\nfunction stringifyRoute(to) {\n if (typeof to === 'string')\n return to;\n if (to.path != null)\n return to.path;\n const location = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location[key] = to[key];\n }\n return JSON.stringify(location, null, 2);\n}\n\n// default pattern for a param: non-greedy everything but /\nconst BASE_PARAM_PATTERN = '[^/]+?';\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true,\n};\n// Special Regex characters that must be escaped in static tokens\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n * Creates a path parser from an array of Segments (a segment is an array of Tokens)\n *\n * @param segments - array of segments returned by tokenizePath\n * @param extraOptions - optional options for the regexp\n * @returns a PathParser\n */\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n // the amount of scores is the same as the length of segments except for the root segment \"/\"\n const score = [];\n // the regexp as a string\n let pattern = options.start ? '^' : '';\n // extracted keys\n const keys = [];\n for (const segment of segments) {\n // the root segment needs special treatment\n const segmentScores = segment.length ? [] : [90 /* PathScore.Root */];\n // allow trailing slash\n if (options.strict && !segment.length)\n pattern += '/';\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n // resets the score if we are inside a sub-segment /:a-other-:b\n let subSegmentScore = 40 /* PathScore.Segment */ +\n (options.sensitive ? 0.25 /* PathScore.BonusCaseSensitive */ : 0);\n if (token.type === 0 /* TokenType.Static */) {\n // prepend the slash if we are starting a new segment\n if (!tokenIndex)\n pattern += '/';\n pattern += token.value.replace(REGEX_CHARS_RE, '\\\\$&');\n subSegmentScore += 40 /* PathScore.Static */;\n }\n else if (token.type === 1 /* TokenType.Param */) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional,\n });\n const re = regexp ? regexp : BASE_PARAM_PATTERN;\n // the user provided a custom regexp /:id(\\\\d+)\n if (re !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10 /* PathScore.BonusCustomRegExp */;\n // make sure the regexp is valid before using it\n try {\n new RegExp(`(${re})`);\n }\n catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` +\n err.message);\n }\n }\n // when we repeat we must take care of the repeating leading slash\n let subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n // prepend the slash if we are starting a new segment\n if (!tokenIndex)\n subPattern =\n // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2\n ? `(?:/${subPattern})`\n : '/' + subPattern;\n if (optional)\n subPattern += '?';\n pattern += subPattern;\n subSegmentScore += 20 /* PathScore.Dynamic */;\n if (optional)\n subSegmentScore += -8 /* PathScore.BonusOptional */;\n if (repeatable)\n subSegmentScore += -20 /* PathScore.BonusRepeatable */;\n if (re === '.*')\n subSegmentScore += -50 /* PathScore.BonusWildcard */;\n }\n segmentScores.push(subSegmentScore);\n }\n // an empty array like /home/ -> [[{home}], []]\n // if (!segment.length) pattern += '/'\n score.push(segmentScores);\n }\n // only apply the strict bonus to the last score\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001 /* PathScore.BonusStrict */;\n }\n // TODO: dev only warn double trailing slash\n if (!options.strict)\n pattern += '/?';\n if (options.end)\n pattern += '$';\n // allow paths like /dynamic to only match dynamic or dynamic/... but not dynamic_something_else\n else if (options.strict && !pattern.endsWith('/'))\n pattern += '(?:/|$)';\n const re = new RegExp(pattern, options.sensitive ? '' : 'i');\n function parse(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || '';\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split('/') : value;\n }\n return params;\n }\n function stringify(params) {\n let path = '';\n // for optional parameters to allow to be empty\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith('/'))\n path += '/';\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0 /* TokenType.Static */) {\n path += token.value;\n }\n else if (token.type === 1 /* TokenType.Param */) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : '';\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param)\n ? param.join('/')\n : param;\n if (!text) {\n if (optional) {\n // if we have more than one optional param like /:a?-static we don't need to care about the optional param\n if (segment.length < 2) {\n // remove the last slash as we could be at the end\n if (path.endsWith('/'))\n path = path.slice(0, -1);\n // do not append a slash on the next iteration\n else\n avoidDuplicatedSlash = true;\n }\n }\n else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n // avoid empty path when we have multiple optional params\n return path || '/';\n }\n return {\n re,\n score,\n keys,\n parse,\n stringify,\n };\n}\n/**\n * Compares an array of numbers as used in PathParser.score and returns a\n * number. This function can be used to `sort` an array\n *\n * @param a - first array of numbers\n * @param b - second array of numbers\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n * should be sorted first\n */\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n // only keep going if diff === 0\n if (diff)\n return diff;\n i++;\n }\n // if the last subsegment was Static, the shorter segments should be sorted first\n // otherwise sort the longest segment first\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n ? -1\n : 1;\n }\n else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 /* PathScore.Static */ + 40 /* PathScore.Segment */\n ? 1\n : -1;\n }\n return 0;\n}\n/**\n * Compare function that can be used with `sort` to sort an array of PathParser\n *\n * @param a - first PathParser\n * @param b - second PathParser\n * @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n */\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n // do not return if both are equal\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n // if a and b share the same score entries but b has more, sort b first\n return bScore.length - aScore.length;\n // this is the ternary version\n // return aScore.length < bScore.length\n // ? 1\n // : aScore.length > bScore.length\n // ? -1\n // : 0\n}\n/**\n * This allows detecting splats at the end of a path: /home/:id(.*)*\n *\n * @param score - score to check\n * @returns true if the last entry is negative\n */\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\n\nconst ROOT_TOKEN = {\n type: 0 /* TokenType.Static */,\n value: '',\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\n// After some profiling, the cache seems to be unnecessary because tokenizePath\n// (the slowest part of adding a route) is very fast\n// const tokenCache = new Map<string, Token[][]>()\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === '/')\n return [[ROOT_TOKEN]];\n if (!path.startsWith('/')) {\n throw new Error((process.env.NODE_ENV !== 'production')\n ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".`\n : `Invalid path \"${path}\"`);\n }\n // if (tokenCache.has(path)) return tokenCache.get(path)!\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0 /* TokenizerState.Static */;\n let previousState = state;\n const tokens = [];\n // the segment will always be valid because we get into the initial state\n // with the leading /\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n // index on the path\n let i = 0;\n // char at index\n let char;\n // buffer of the value read\n let buffer = '';\n // custom regexp for a param\n let customRe = '';\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0 /* TokenizerState.Static */) {\n segment.push({\n type: 0 /* TokenType.Static */,\n value: buffer,\n });\n }\n else if (state === 1 /* TokenizerState.Param */ ||\n state === 2 /* TokenizerState.ParamRegExp */ ||\n state === 3 /* TokenizerState.ParamRegExpEnd */) {\n if (segment.length > 1 && (char === '*' || char === '+'))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1 /* TokenType.Param */,\n value: buffer,\n regexp: customRe,\n repeatable: char === '*' || char === '+',\n optional: char === '*' || char === '?',\n });\n }\n else {\n crash('Invalid state to consume buffer');\n }\n buffer = '';\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === '\\\\' && state !== 2 /* TokenizerState.ParamRegExp */) {\n previousState = state;\n state = 4 /* TokenizerState.EscapeNext */;\n continue;\n }\n switch (state) {\n case 0 /* TokenizerState.Static */:\n if (char === '/') {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n }\n else if (char === ':') {\n consumeBuffer();\n state = 1 /* TokenizerState.Param */;\n }\n else {\n addCharToBuffer();\n }\n break;\n case 4 /* TokenizerState.EscapeNext */:\n addCharToBuffer();\n state = previousState;\n break;\n case 1 /* TokenizerState.Param */:\n if (char === '(') {\n state = 2 /* TokenizerState.ParamRegExp */;\n }\n else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n }\n else {\n consumeBuffer();\n state = 0 /* TokenizerState.Static */;\n // go back one character if we were not modifying\n if (char !== '*' && char !== '?' && char !== '+')\n i--;\n }\n break;\n case 2 /* TokenizerState.ParamRegExp */:\n // TODO: is it worth handling nested regexp? like :p(?:prefix_([^/]+)_suffix)\n // it already works by escaping the closing )\n // https://paths.esm.dev/?p=AAMeJbiAwQEcDKbAoAAkP60PG2R6QAvgNaA6AFACM2ABuQBB#\n // is this really something people need since you can also write\n // /prefix_:p()_suffix\n if (char === ')') {\n // handle the escaped )\n if (customRe[customRe.length - 1] == '\\\\')\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3 /* TokenizerState.ParamRegExpEnd */;\n }\n else {\n customRe += char;\n }\n break;\n case 3 /* TokenizerState.ParamRegExpEnd */:\n // same as finalizing a param\n consumeBuffer();\n state = 0 /* TokenizerState.Static */;\n // go back one character if we were not modifying\n if (char !== '*' && char !== '?' && char !== '+')\n i--;\n customRe = '';\n break;\n default:\n crash('Unknown state');\n break;\n }\n }\n if (state === 2 /* TokenizerState.ParamRegExp */)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n // tokenCache.set(path, tokens)\n return tokens;\n}\n\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n // warn against params with the same name\n if ((process.env.NODE_ENV !== 'production')) {\n const existingKeys = new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: [],\n });\n if (parent) {\n // both are aliases or both are not aliases\n // we don't want to mix them because the order is used when\n // passing originalRecord in Matcher.addRoute\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\n\n/**\n * Creates a Router Matcher.\n *\n * @internal\n * @param routes - array of initial routes\n * @param globalOptions - global route options\n */\nfunction createRouterMatcher(routes, globalOptions) {\n // normalized ordered array of matchers\n const matchers = [];\n const matcherMap = new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n // used later on to remove by name\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if ((process.env.NODE_ENV !== 'production')) {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n // we might be the child of an alias\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n // generate an array of records to correctly handle aliases\n const normalizedRecords = [mainNormalizedRecord];\n if ('alias' in record) {\n const aliases = typeof record.alias === 'string' ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(\n // we need to normalize again to ensure the `mods` property\n // being non enumerable\n normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord\n ? originalRecord.record.components\n : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord\n ? originalRecord.record\n : mainNormalizedRecord,\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n })));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n // Build up the path for nested routes if the child isn't an absolute\n // route. Only add the / delimiter if the child path isn't empty and if the\n // parent path doesn't have a trailing slash\n if (parent && path[0] !== '/') {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === '/' ? '' : '/';\n normalizedRecord.path =\n parent.record.path + (path && connectingSlash + path);\n }\n if ((process.env.NODE_ENV !== 'production') && normalizedRecord.path === '*') {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\n' +\n 'See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.');\n }\n // create the object beforehand, so it can be passed to children\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if ((process.env.NODE_ENV !== 'production') && parent && path[0] === '/')\n checkMissingParamsInAbsolutePath(matcher, parent);\n // if we are an alias we must tell the original record that we exist,\n // so we can be removed\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if ((process.env.NODE_ENV !== 'production')) {\n checkSameParams(originalRecord, matcher);\n }\n }\n else {\n // otherwise, the first record is the original and others are aliases\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n // remove the route if named and only for the top record (avoid in nested calls)\n // this works because the original record is the first one\n if (isRootAdd && record.name && !isAliasRecord(matcher)) {\n if ((process.env.NODE_ENV !== 'production')) {\n checkSameNameAsAncestor(record, parent);\n }\n removeRoute(record.name);\n }\n }\n // Avoid adding a record that doesn't display anything. This allows passing through records without a component to\n // not be reached and pass through the catch all route\n if (isMatchable(matcher)) {\n insertMatcher(matcher);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n // if there was no original record, then the first one was not an alias and all\n // other aliases (if any) need to reference this record when adding children\n originalRecord = originalRecord || matcher;\n // TODO: add normalized records for more flexibility\n // if (parent && isAliasRecord(originalRecord)) {\n // parent.children.push(originalRecord)\n // }\n }\n return originalMatcher\n ? () => {\n // since other matchers are aliases, they should be removed by the original matcher\n removeRoute(originalMatcher);\n }\n : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n }\n else {\n const index = matchers.indexOf(matcherRef);\n if (index > -1) {\n matchers.splice(index, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n const index = findInsertionIndex(matcher, matchers);\n matchers.splice(index, 0, matcher);\n // only add the original record to the name map\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if ('name' in location && location.name) {\n matcher = matcherMap.get(location.name);\n if (!matcher)\n throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n location,\n });\n // warn if the user is passing invalid params so they can debug it better when they get removed\n if ((process.env.NODE_ENV !== 'production')) {\n const invalidParams = Object.keys(location.params || {}).filter(paramName => !matcher.keys.find(k => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(currentLocation.params, \n // only keep params that exist in the resolved location\n // only keep optional params coming from a parent record\n matcher.keys\n .filter(k => !k.optional)\n .concat(matcher.parent ? matcher.parent.keys.filter(k => k.optional) : [])\n .map(k => k.name)), \n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location.params &&\n paramsFromLocation(location.params, matcher.keys.map(k => k.name)));\n // throws if cannot be stringified\n path = matcher.stringify(params);\n }\n else if (location.path != null) {\n // no need to resolve the path with the matcher as it was provided\n // this also allows the user to control the encoding\n path = location.path;\n if ((process.env.NODE_ENV !== 'production') && !path.startsWith('/')) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n }\n matcher = matchers.find(m => m.re.test(path));\n // matcher should have a value after the loop\n if (matcher) {\n // we know the matcher works because we tested the regexp\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n // location is a relative path\n }\n else {\n // match by name or path of current route\n matcher = currentLocation.name\n ? matcherMap.get(currentLocation.name)\n : matchers.find(m => m.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1 /* ErrorTypes.MATCHER_NOT_FOUND */, {\n location,\n currentLocation,\n });\n name = matcher.record.name;\n // since we are navigating to the same location, we don't need to pick the\n // params like when `name` is provided\n params = assign({}, currentLocation.params, location.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n // reversed order so parents are at the beginning\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched),\n };\n }\n // add initial routes\n routes.forEach(route => addRoute(route));\n function clearRoutes() {\n matchers.length = 0;\n matcherMap.clear();\n }\n return {\n addRoute,\n resolve,\n removeRoute,\n clearRoutes,\n getRoutes,\n getRecordMatcher,\n };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\n/**\n * Normalizes a RouteRecordRaw. Creates a copy\n *\n * @param record\n * @returns the normalized version\n */\nfunction normalizeRouteRecord(record) {\n const normalized = {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: record.aliasOf,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: new Set(),\n updateGuards: new Set(),\n enterCallbacks: {},\n // must be declared afterwards\n // mods: {},\n components: 'components' in record\n ? record.components || null\n : record.component && { default: record.component },\n };\n // mods contain modules and shouldn't be copied,\n // logged or anything. It's just used for internal\n // advanced use cases like data loaders\n Object.defineProperty(normalized, 'mods', {\n value: {},\n });\n return normalized;\n}\n/**\n * Normalize the optional `props` in a record to always be an object similar to\n * components. Also accept a boolean for components.\n * @param record\n */\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n // props does not exist on redirect records, but we can set false directly\n const props = record.props || false;\n if ('component' in record) {\n propsObject.default = props;\n }\n else {\n // NOTE: we could also allow a function to be applied to every component.\n // Would need user feedback for use cases\n for (const name in record.components)\n propsObject[name] = typeof props === 'object' ? props[name] : props;\n }\n return propsObject;\n}\n/**\n * Checks if a record or any of its parent is an alias\n * @param record\n */\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\n/**\n * Merge meta fields of an array of records\n *\n * @param matched - array of matched records\n */\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return (a.name === b.name &&\n a.optional === b.optional &&\n a.repeatable === b.repeatable);\n}\n/**\n * Check if a path and its alias have the same required params\n *\n * @param a - original record\n * @param b - alias record\n */\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\n/**\n * A route with a name and a child with an empty path without a name should warn when adding the route\n *\n * @param mainNormalizedRecord - RouteRecordNormalized\n * @param parent - RouteRecordMatcher\n */\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent &&\n parent.record.name &&\n !mainNormalizedRecord.name &&\n !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkSameNameAsAncestor(record, parent) {\n for (let ancestor = parent; ancestor; ancestor = ancestor.parent) {\n if (ancestor.record.name === record.name) {\n throw new Error(`A route named \"${String(record.name)}\" has been added as a ${parent === ancestor ? 'child' : 'descendant'} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);\n }\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\n/**\n * Performs a binary search to find the correct insertion index for a new matcher.\n *\n * Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n * with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n *\n * @param matcher - new matcher to be inserted\n * @param matchers - existing matchers\n */\nfunction findInsertionIndex(matcher, matchers) {\n // First phase: binary search based on score\n let lower = 0;\n let upper = matchers.length;\n while (lower !== upper) {\n const mid = (lower + upper) >> 1;\n const sortOrder = comparePathParserScore(matcher, matchers[mid]);\n if (sortOrder < 0) {\n upper = mid;\n }\n else {\n lower = mid + 1;\n }\n }\n // Second phase: check for an ancestor with the same score\n const insertionAncestor = getInsertionAncestor(matcher);\n if (insertionAncestor) {\n upper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n if ((process.env.NODE_ENV !== 'production') && upper < 0) {\n // This should never happen\n warn(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n }\n }\n return upper;\n}\nfunction getInsertionAncestor(matcher) {\n let ancestor = matcher;\n while ((ancestor = ancestor.parent)) {\n if (isMatchable(ancestor) &&\n comparePathParserScore(matcher, ancestor) === 0) {\n return ancestor;\n }\n }\n return;\n}\n/**\n * Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n * a component, or name, or redirect, are just used to group other routes.\n * @param matcher\n * @param matcher.record record of the matcher\n * @returns\n */\nfunction isMatchable({ record }) {\n return !!(record.name ||\n (record.components && Object.keys(record.components).length) ||\n record.redirect);\n}\n\n/**\n * Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n * version with the leading `?` and without Should work as URLSearchParams\n\n * @internal\n *\n * @param search - search string to parse\n * @returns a query object\n */\nfunction parseQuery(search) {\n const query = {};\n // avoid creating an object with an empty key and empty value\n // because of split('&')\n if (search === '' || search === '?')\n return query;\n const hasLeadingIM = search[0] === '?';\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split('&');\n for (let i = 0; i < searchParams.length; ++i) {\n // pre decode the + into space\n const searchParam = searchParams[i].replace(PLUS_RE, ' ');\n // allow the = character\n const eqPos = searchParam.indexOf('=');\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n // an extra variable for ts types\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n }\n else {\n query[key] = value;\n }\n }\n return query;\n}\n/**\n * Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n * doesn't prepend a `?`\n *\n * @internal\n *\n * @param query - query object to stringify\n * @returns string version of the query without the leading `?`\n */\nfunction stringifyQuery(query) {\n let search = '';\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n // only null adds the value\n if (value !== undefined) {\n search += (search.length ? '&' : '') + key;\n }\n continue;\n }\n // keep null values\n const values = isArray(value)\n ? value.map(v => v && encodeQueryValue(v))\n : [value && encodeQueryValue(value)];\n values.forEach(value => {\n // skip undefined values in arrays as if they were not present\n // smaller code than using filter\n if (value !== undefined) {\n // only append & with non-empty search\n search += (search.length ? '&' : '') + key;\n if (value != null)\n search += '=' + value;\n }\n });\n }\n return search;\n}\n/**\n * Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n * numbers into strings, removing keys with an undefined value and replacing\n * undefined with null in arrays\n *\n * @param query - query object to normalize\n * @returns a normalized query object\n */\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== undefined) {\n normalizedQuery[key] = isArray(value)\n ? value.map(v => (v == null ? null : '' + v))\n : value == null\n ? value\n : '' + value;\n }\n }\n return normalizedQuery;\n}\n\n/**\n * RouteRecord being rendered by the closest ancestor Router View. Used for\n * `onBeforeRouteUpdate` and `onBeforeRouteLeave`. rvlm stands for Router View\n * Location Matched\n *\n * @internal\n */\nconst matchedRouteKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location matched' : '');\n/**\n * Allows overriding the router view depth to control which component in\n * `matched` is rendered. rvd stands for Router View Depth\n *\n * @internal\n */\nconst viewDepthKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view depth' : '');\n/**\n * Allows overriding the router instance returned by `useRouter` in tests. r\n * stands for router\n *\n * @internal\n */\nconst routerKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router' : '');\n/**\n * Allows overriding the current route returned by `useRoute` in tests. rl\n * stands for route location\n *\n * @internal\n */\nconst routeLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'route location' : '');\n/**\n * Allows overriding the current route used by router-view. Internally this is\n * used when the `route` prop is passed.\n *\n * @internal\n */\nconst routerViewLocationKey = Symbol((process.env.NODE_ENV !== 'production') ? 'router view location' : '');\n\n/**\n * Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n */\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers.slice(),\n reset,\n };\n}\n\nfunction registerGuard(record, name, guard) {\n const removeFromList = () => {\n record[name].delete(guard);\n };\n onUnmounted(removeFromList);\n onDeactivated(removeFromList);\n onActivated(() => {\n record[name].add(guard);\n });\n record[name].add(guard);\n}\n/**\n * Add a navigation guard that triggers whenever the component for the current\n * location is about to be left. Similar to {@link beforeRouteLeave} but can be\n * used in any component. The guard is removed when the component is unmounted.\n *\n * @param leaveGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteLeave(leaveGuard) {\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n warn('getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function');\n return;\n }\n const activeRecord = inject(matchedRouteKey, \n // to avoid warning\n {}).value;\n if (!activeRecord) {\n (process.env.NODE_ENV !== 'production') &&\n warn('No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n return;\n }\n registerGuard(activeRecord, 'leaveGuards', leaveGuard);\n}\n/**\n * Add a navigation guard that triggers whenever the current location is about\n * to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n * component. The guard is removed when the component is unmounted.\n *\n * @param updateGuard - {@link NavigationGuard}\n */\nfunction onBeforeRouteUpdate(updateGuard) {\n if ((process.env.NODE_ENV !== 'production') && !getCurrentInstance()) {\n warn('getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function');\n return;\n }\n const activeRecord = inject(matchedRouteKey, \n // to avoid warning\n {}).value;\n if (!activeRecord) {\n (process.env.NODE_ENV !== 'production') &&\n warn('No active route record was found when calling `onBeforeRouteUpdate()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?');\n return;\n }\n registerGuard(activeRecord, 'updateGuards', updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = fn => fn()) {\n // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place\n const enterCallbackArray = record &&\n // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4 /* ErrorTypes.NAVIGATION_ABORTED */, {\n from,\n to,\n }));\n }\n else if (valid instanceof Error) {\n reject(valid);\n }\n else if (isRouteLocation(valid)) {\n reject(createRouterError(2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */, {\n from: to,\n to: valid,\n }));\n }\n else {\n if (enterCallbackArray &&\n // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray &&\n typeof valid === 'function') {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n // wrapping with Promise.resolve allows it to work with both async and sync guards\n const guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, (process.env.NODE_ENV !== 'production') ? canOnlyBeCalledOnce(next, to, from) : next));\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if ((process.env.NODE_ENV !== 'production') && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : ''}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === 'object' && 'then' in guardReturn) {\n guardCall = guardCall.then(resolvedValue => {\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error('Invalid navigation guard'));\n }\n return resolvedValue;\n });\n }\n else if (guardReturn !== undefined) {\n // @ts-expect-error: _called is added at canOnlyBeCalledOnce\n if (!next._called) {\n warn(message);\n reject(new Error('Invalid navigation guard'));\n return;\n }\n }\n }\n guardCall.catch(err => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function () {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n // @ts-expect-error: we put it in the original one because it's easier to check\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = fn => fn()) {\n const guards = [];\n for (const record of matched) {\n if ((process.env.NODE_ENV !== 'production') && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\"` +\n ` or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if ((process.env.NODE_ENV !== 'production')) {\n if (!rawComponent ||\n (typeof rawComponent !== 'object' &&\n typeof rawComponent !== 'function')) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not` +\n ` a valid component. Received \"${String(rawComponent)}\".`);\n // throw to ensure we stop here but warn to ensure the message isn't\n // missed by the user\n throw new Error('Invalid route component');\n }\n else if ('then' in rawComponent) {\n // warn if user wrote import('/component.vue') instead of () =>\n // import('./component.vue')\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a ` +\n `Promise instead of a function that returns a Promise. Did you ` +\n `write \"import('./MyPage.vue')\" instead of ` +\n `\"() => import('./MyPage.vue')\" ? This will break in ` +\n `production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n }\n else if (rawComponent.__asyncLoader &&\n // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined ` +\n `using \"defineAsyncComponent()\". ` +\n `Write \"() => import('./MyPage.vue')\" instead of ` +\n `\"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n // skip update and leave guards if the route component is not mounted\n if (guardType !== 'beforeRouteEnter' && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n // __vccOpts is added by vue-class-component and contain the regular options\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard &&\n guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n }\n else {\n // start requesting the chunk already\n let componentPromise = rawComponent();\n if ((process.env.NODE_ENV !== 'production') && !('catch' in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then(resolved => {\n if (!resolved)\n throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n const resolvedComponent = isESModule(resolved)\n ? resolved.default\n : resolved;\n // keep the resolved module for plugins like data loaders\n record.mods[name] = resolved;\n // replace the function with the resolved component\n // cannot be null or undefined because we went into the for loop\n record.components[name] = resolvedComponent;\n // __vccOpts is added by vue-class-component and contain the regular options\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return (guard &&\n guardToPromiseFn(guard, to, from, record, name, runWithContext)());\n }));\n }\n }\n }\n return guards;\n}\n/**\n * Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n *\n * @param route - resolved route to load\n */\nfunction loadRouteLocation(route) {\n return route.matched.every(record => record.redirect)\n ? Promise.reject(new Error('Cannot load a route that redirects.'))\n : Promise.all(route.matched.map(record => record.components &&\n Promise.all(Object.keys(record.components).reduce((promises, name) => {\n const rawComponent = record.components[name];\n if (typeof rawComponent === 'function' &&\n !('displayName' in rawComponent)) {\n promises.push(rawComponent().then(resolved => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n const resolvedComponent = isESModule(resolved)\n ? resolved.default\n : resolved;\n // keep the resolved module for plugins like data loaders\n record.mods[name] = resolved;\n // replace the function with the resolved component\n // cannot be null or undefined because we went into the for loop\n record.components[name] = resolvedComponent;\n return;\n }));\n }\n return promises;\n }, [])))).then(() => route);\n}\n\n// TODO: we could allow currentRoute as a prop to expose `isActive` and\n// `isExactActive` behavior should go through an RFC\n/**\n * Returns the internal behavior of a {@link RouterLink} without the rendering part.\n *\n * @param props - a `to` location and an optional `replace` flag\n */\nfunction useLink(props) {\n const router = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n let hasPrevious = false;\n let previousTo = null;\n const route = computed(() => {\n const to = unref(props.to);\n if ((process.env.NODE_ENV !== 'production') && (!hasPrevious || to !== previousTo)) {\n if (!isRouteLocation(to)) {\n if (hasPrevious) {\n warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n }\n else {\n warn(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n }\n }\n previousTo = to;\n hasPrevious = true;\n }\n return router.resolve(to);\n });\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index > -1)\n return index;\n // possible parent record\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 &&\n // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath &&\n // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath\n ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2]))\n : index);\n });\n const isActive = computed(() => activeRecordIndex.value > -1 &&\n includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 &&\n activeRecordIndex.value === currentRoute.matched.length - 1 &&\n isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n const p = router[unref(props.replace) ? 'replace' : 'push'](unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n if (props.viewTransition &&\n typeof document !== 'undefined' &&\n 'startViewTransition' in document) {\n document.startViewTransition(() => p);\n }\n return p;\n }\n return Promise.resolve();\n }\n // devtools only\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value,\n error: null,\n };\n // @ts-expect-error: this is internal\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n // @ts-expect-error: this is internal\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n linkContextDevtools.error = isRouteLocation(unref(props.to))\n ? null\n : 'Invalid \"to\" value';\n }, { flush: 'post' });\n }\n }\n /**\n * NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n */\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate,\n };\n}\nfunction preferSingleVNode(vnodes) {\n return vnodes.length === 1 ? vnodes[0] : vnodes;\n}\nconst RouterLinkImpl = /*#__PURE__*/ defineComponent({\n name: 'RouterLink',\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true,\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: 'page',\n },\n viewTransition: Boolean,\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, 'router-link-active')]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, 'router-link-exact-active')]: link.isExactActive,\n }));\n return () => {\n const children = slots.default && preferSingleVNode(slots.default(link));\n return props.custom\n ? children\n : h('a', {\n 'aria-current': link.isExactActive\n ? props.ariaCurrentValue\n : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value,\n }, children);\n };\n },\n});\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to render a link that triggers a navigation on click.\n */\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n // don't redirect with control keys\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n // don't redirect when preventDefault called\n if (e.defaultPrevented)\n return;\n // don't redirect on right click\n if (e.button !== undefined && e.button !== 0)\n return;\n // don't redirect if `target=\"_blank\"`\n // @ts-expect-error getAttribute does exist\n if (e.currentTarget && e.currentTarget.getAttribute) {\n // @ts-expect-error getAttribute exists\n const target = e.currentTarget.getAttribute('target');\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n // this may be a Weex event which doesn't have this method\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === 'string') {\n if (innerValue !== outerValue)\n return false;\n }\n else {\n if (!isArray(outerValue) ||\n outerValue.length !== innerValue.length ||\n innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\n/**\n * Get the original path value of a record by following its aliasOf\n * @param record\n */\nfunction getOriginalPath(record) {\n return record ? (record.aliasOf ? record.aliasOf.path : record.path) : '';\n}\n/**\n * Utility class to get the active class based on defaults.\n * @param propClass\n * @param globalClass\n * @param defaultClass\n */\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null\n ? propClass\n : globalClass != null\n ? globalClass\n : defaultClass;\n\nconst RouterViewImpl = /*#__PURE__*/ defineComponent({\n name: 'RouterView',\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: 'default',\n },\n route: Object,\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n (process.env.NODE_ENV !== 'production') && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n // The depth changes based on empty components option, which allows passthrough routes e.g. routes with children\n // that are used to reuse the `path` property\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) &&\n !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n // watch at the same time the component instance, the route record we are\n // rendering, and the name\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n // copy reused instances\n if (to) {\n // this will update the instance for new instances as well as reused\n // instances when navigating to a new route\n to.instances[name] = instance;\n // the component instance is reused for a different route or name, so\n // we copy any saved update or leave guards. With async setup, the\n // mounting component will mount before the matchedRoute changes,\n // making instance === oldInstance, so we check if guards have been\n // added before. This works because we remove guards when\n // unmounting/deactivating components\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n // trigger beforeRouteEnter next callbacks\n if (instance &&\n to &&\n // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach(callback => callback(instance));\n }\n }, { flush: 'post' });\n return () => {\n const route = routeToDisplay.value;\n // we need the value at the time we render because when we unmount, we\n // navigated to a different location so the value is different\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n // props from route configuration\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption\n ? routePropsOption === true\n ? route.params\n : typeof routePropsOption === 'function'\n ? routePropsOption(route)\n : routePropsOption\n : null;\n const onVnodeUnmounted = vnode => {\n // remove the instance reference to prevent leak\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef,\n }));\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) &&\n isBrowser &&\n component.ref) {\n // TODO: can display if it's an alias, its props\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta,\n };\n const internalInstances = isArray(component.ref)\n ? component.ref.map(r => r.i)\n : [component.ref.i];\n internalInstances.forEach(instance => {\n // @ts-expect-error\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and <component :is=\"...\"> both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) ||\n component);\n };\n },\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n// export the public type for h/tsx inference\n// also to avoid inline import() in generated d.ts files\n/**\n * Component to display the current route the user is at.\n */\nconst RouterView = RouterViewImpl;\n// warn against deprecated usage with <transition> & <keep-alive>\n// due to functional component being no longer eager in Vue 3\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n const parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n if (parentName &&\n (parentName === 'KeepAlive' || parentName.includes('Transition')) &&\n typeof parentSubTreeType === 'object' &&\n parentSubTreeType.name === 'RouterView') {\n const comp = parentName === 'KeepAlive' ? 'keep-alive' : 'transition';\n warn(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\\n` +\n `Use slot props instead:\\n\\n` +\n `<router-view v-slot=\"{ Component }\">\\n` +\n ` <${comp}>\\n` +\n ` <component :is=\"Component\" />\\n` +\n ` </${comp}>\\n` +\n `</router-view>`);\n }\n}\n\n/**\n * Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n *\n * @param routeLocation - routeLocation to format\n * @param tooltip - optional tooltip\n * @returns a copy of the routeLocation\n */\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map(matched => omit(matched, ['instances', 'children', 'aliasOf'])),\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy,\n },\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display,\n },\n };\n}\n// to support multiple router instances\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n // Take over router.beforeEach and afterEach\n // make sure we are not registering the devtool twice\n if (router.__hasDevtools)\n return;\n router.__hasDevtools = true;\n // increment to support multiple router instances\n const id = routerId++;\n setupDevtoolsPlugin({\n id: 'org.vuejs.router' + (id ? '.' + id : ''),\n label: 'Vue Router',\n packageName: 'vue-router',\n homepage: 'https://router.vuejs.org',\n logo: 'https://router.vuejs.org/logo.png',\n componentStateTypes: ['Routing'],\n app,\n }, api => {\n if (typeof api.now !== 'function') {\n console.warn('[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n }\n // display state added by the router\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: 'Routing',\n key: '$route',\n editable: false,\n value: formatRouteLocation(router.currentRoute.value, 'Current Route'),\n });\n }\n });\n // mark router-link as active and display tags on router views\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : '') + info.path,\n textColor: 0,\n tooltip: 'This component is rendered by &lt;router-view&gt;',\n backgroundColor: PINK_500,\n });\n }\n // if multiple useLink are used\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach(devtoolsData => {\n let label = devtoolsData.route.path;\n let backgroundColor = ORANGE_400;\n let tooltip = '';\n let textColor = 0;\n if (devtoolsData.error) {\n label = devtoolsData.error;\n backgroundColor = RED_100;\n textColor = RED_700;\n }\n else if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = 'This is exactly active';\n }\n else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = 'This link is active';\n }\n node.tags.push({\n label,\n textColor,\n tooltip,\n backgroundColor,\n });\n });\n }\n });\n watch(router.currentRoute, () => {\n // refresh active state\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = 'router:navigations:' + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? ' ' + id : ''} Navigations`,\n color: 0x40a8c4,\n });\n // const errorsLayerId = 'router:errors'\n // api.addTimelineLayer({\n // id: errorsLayerId,\n // label: 'Router Errors',\n // color: 0xea5455,\n // })\n router.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: 'Error during Navigation',\n subtitle: to.fullPath,\n logType: 'error',\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId,\n },\n });\n });\n // attached to `meta` and used to group events\n let navigationId = 0;\n router.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay('beforeEach'),\n from: formatRouteLocation(from, 'Current Location during this navigation'),\n to: formatRouteLocation(to, 'Target location'),\n };\n // Used to group navigations together, hide from devtools\n Object.defineProperty(to.meta, '__navigationId', {\n value: navigationId++,\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: 'Start of navigation',\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId,\n },\n });\n });\n router.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay('afterEach'),\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : '',\n tooltip: 'Navigation Failure',\n value: failure,\n },\n };\n data.status = formatDisplay('❌');\n }\n else {\n data.status = formatDisplay('✅');\n }\n // we set here to have the right order\n data.from = formatRouteLocation(from, 'Current Location during this navigation');\n data.to = formatRouteLocation(to, 'Target location');\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: 'End of navigation',\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? 'warning' : 'default',\n groupId: to.meta.__navigationId,\n },\n });\n });\n /**\n * Inspector of Existing routes\n */\n const routerInspectorId = 'router-inspector:' + id;\n api.addInspector({\n id: routerInspectorId,\n label: 'Routes' + (id ? ' ' + id : ''),\n icon: 'book',\n treeFilterPlaceholder: 'Search routes',\n });\n function refreshRoutesView() {\n // the routes view isn't active\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n // children routes will appear as nested\n let routes = matcher.getRoutes().filter(route => !route.parent ||\n // these routes have a parent with no component which will not appear in the view\n // therefore we still need to include them\n !route.parent.record.components);\n // reset match state to false\n routes.forEach(resetMatchStateOnRouteRecord);\n // apply a match state if there is a payload\n if (payload.filter) {\n routes = routes.filter(route => \n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase()));\n }\n // mark active routes\n routes.forEach(route => markRouteRecordActive(route, router.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree(payload => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n /**\n * Display information about the currently selected route record\n */\n api.on.getInspectorState(payload => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find(route => route.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route),\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? '*' : '?';\n }\n else {\n return key.repeatable ? '+' : '';\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: 'path', value: record.path },\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: 'name',\n value: record.name,\n });\n }\n fields.push({ editable: false, key: 'regexp', value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: 'keys',\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys\n .map(key => `${key.name}${modifierForKey(key)}`)\n .join(' '),\n tooltip: 'Param keys',\n value: route.keys,\n },\n },\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: 'redirect',\n value: record.redirect,\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: 'aliases',\n value: route.alias.map(alias => alias.record.path),\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: 'meta',\n value: route.record.meta,\n });\n }\n fields.push({\n key: 'score',\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map(score => score.join(', ')).join(' | '),\n tooltip: 'Score used to sort routes',\n value: route.score,\n },\n },\n });\n return fields;\n}\n/**\n * Extracted from tailwind palette\n */\nconst PINK_500 = 0xec4899;\nconst BLUE_600 = 0x2563eb;\nconst LIME_500 = 0x84cc16;\nconst CYAN_400 = 0x22d3ee;\nconst ORANGE_400 = 0xfb923c;\n// const GRAY_100 = 0xf4f4f5\nconst DARK = 0x666666;\nconst RED_100 = 0xfee2e2;\nconst RED_700 = 0xb91c1c;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400,\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: 'alias',\n textColor: 0,\n backgroundColor: ORANGE_400,\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: 'matches',\n textColor: 0,\n backgroundColor: PINK_500,\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: 'exact',\n textColor: 0,\n backgroundColor: LIME_500,\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: 'active',\n textColor: 0,\n backgroundColor: BLUE_600,\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === 'string'\n ? `redirect: ${record.redirect}`\n : 'redirects',\n textColor: 0xffffff,\n backgroundColor: DARK,\n });\n }\n // add an id to be able to select it. Using the `path` is not possible because\n // empty path children would collide with their parents\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector),\n };\n}\n// incremental id for route records and inspector state\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n // no route will be active if matched is empty\n // reset the matching state\n const isExactActive = currentRoute.matched.length &&\n isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some(match => isSameRouteRecord(match, route.record));\n }\n route.children.forEach(childRoute => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n // use a regexp without $ at the end to match nested routes better\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, ''), found[2]);\n if (nonEndingRE.test(filter)) {\n // mark children as matches\n route.children.forEach(child => isRouteMatching(child, filter));\n // exception case: `/`\n if (route.record.path !== '/' || filter === '/') {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n // hide the / route\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n // also allow partial matching on the path\n if (!filter.startsWith('/') &&\n (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some(child => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n // @ts-expect-error\n ret[key] = obj[key];\n }\n }\n return ret;\n}\n\n/**\n * Creates a Router instance that can be used by a Vue app.\n *\n * @param options - {@link RouterOptions}\n */\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if ((process.env.NODE_ENV !== 'production') && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\":' +\n ' https://router.vuejs.org/api/interfaces/RouterOptions.html#history');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n // leave the scrollRestoration if no scrollBehavior is provided\n if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {\n history.scrollRestoration = 'manual';\n }\n const normalizeParams = applyToParams.bind(null, paramValue => '' + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = \n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode);\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n if ((process.env.NODE_ENV !== 'production') && !parent) {\n warn(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n }\n record = route;\n }\n else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n }\n else if ((process.env.NODE_ENV !== 'production')) {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map(routeMatcher => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n // const resolve: Router['resolve'] = (rawLocation: RouteLocationRaw, currentLocation) => {\n // const objectLocation = routerLocationAsObject(rawLocation)\n // we create a copy to modify it later\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === 'string') {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href = routerHistory.createHref(locationNormalized.fullPath);\n if ((process.env.NODE_ENV !== 'production')) {\n if (href.startsWith('//'))\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n // locationNormalized is always a new object\n return assign(locationNormalized, matchedRoute, {\n params: decodeParams(matchedRoute.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: undefined,\n href,\n });\n }\n if ((process.env.NODE_ENV !== 'production') && !isRouteLocation(rawLocation)) {\n warn(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n return resolve({});\n }\n let matcherLocation;\n // path could be relative in object as well\n if (rawLocation.path != null) {\n if ((process.env.NODE_ENV !== 'production') &&\n 'params' in rawLocation &&\n !('name' in rawLocation) &&\n // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path,\n });\n }\n else {\n // remove any nullish param\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n // pass encoded values to the matcher, so it can produce encoded path and fullPath\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(targetParams),\n });\n // current location params are decoded, we need to encode them in case the\n // matcher merges the params\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || '';\n if ((process.env.NODE_ENV !== 'production') && hash && !hash.startsWith('#')) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n // the matcher might have merged current location params, so\n // we need to run the decoding again\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path,\n }));\n const href = routerHistory.createHref(fullPath);\n if ((process.env.NODE_ENV !== 'production')) {\n if (href.startsWith('//')) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n }\n else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: \n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery\n ? normalizeQuery(rawLocation.query)\n : (rawLocation.query || {}),\n }, matchedRoute, {\n redirectedFrom: undefined,\n href,\n });\n }\n function locationAsObject(to) {\n return typeof to === 'string'\n ? parseURL(parseQuery$1, to, currentRoute.value.path)\n : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8 /* ErrorTypes.NAVIGATION_CANCELLED */, {\n from,\n to,\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === 'function' ? redirect(to) : redirect;\n if (typeof newTargetLocation === 'string') {\n newTargetLocation =\n newTargetLocation.includes('?') || newTargetLocation.includes('#')\n ? (newTargetLocation = locationAsObject(newTargetLocation))\n : // force empty params\n { path: newTargetLocation };\n // @ts-expect-error: force empty params when a string is passed to let\n // the router parse them again\n newTargetLocation.params = {};\n }\n if ((process.env.NODE_ENV !== 'production') &&\n newTargetLocation.path == null &&\n !('name' in newTargetLocation)) {\n warn(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error('Invalid redirect');\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: newTargetLocation.path != null ? {} : to.params,\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = (pendingLocation = resolve(to));\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n // to could be a string where `replace` is a function\n const replace = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === 'object'\n ? assign({}, data, shouldRedirect.state)\n : data,\n force,\n replace,\n }), \n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation);\n // if it was a redirect we already called `pushWithRedirect` above\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16 /* ErrorTypes.NAVIGATION_DUPLICATED */, { to: toLocation, from });\n // trigger scroll to allow scrolling to the same anchor\n handleScroll(from, from, \n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true, \n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false);\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from))\n .catch((error) => isNavigationFailure(error)\n ? // navigation redirects still mark the router as ready\n isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)\n ? error\n : markAsReady(error) // also returns the error\n : // reject any unknown error\n triggerError(error, toLocation, from))\n .then((failure) => {\n if (failure) {\n if (isNavigationFailure(failure, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n if ((process.env.NODE_ENV !== 'production') &&\n // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) &&\n // and we have done it a couple of times\n redirectedFrom &&\n // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count\n ? // @ts-expect-error\n redirectedFrom._count + 1\n : 1) > 30) {\n warn(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n return Promise.reject(new Error('Infinite redirect in navigation guard'));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace,\n }, locationAsObject(failure.to), {\n state: typeof failure.to === 'object'\n ? assign({}, data, failure.to.state)\n : data,\n force,\n }), \n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation);\n }\n }\n else {\n // if we fail we don't finalize the navigation\n failure = finalizeNavigation(toLocation, from, true, replace, data);\n }\n triggerAfterEach(toLocation, from, failure);\n return failure;\n });\n }\n /**\n * Helper to reject and skip all navigation guards if a new navigation happened\n * @param to\n * @param from\n */\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function runWithContext(fn) {\n const app = installedApps.values().next().value;\n // support Vue < 3.3\n return app && typeof app.runWithContext === 'function'\n ? app.runWithContext(fn)\n : fn();\n }\n // TODO: refactor the whole before guards by internally using router.beforeEach\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n // all components here have been resolved once because we are leaving\n guards = extractComponentsGuards(leavingRecords.reverse(), 'beforeRouteLeave', to, from);\n // leavingRecords is already reversed\n for (const record of leavingRecords) {\n record.leaveGuards.forEach(guard => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeRouteLeave guards\n return (runGuardQueue(guards)\n .then(() => {\n // check global guards beforeEach\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n })\n .then(() => {\n // check in components beforeRouteUpdate\n guards = extractComponentsGuards(updatingRecords, 'beforeRouteUpdate', to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach(guard => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeEnter guards\n return runGuardQueue(guards);\n })\n .then(() => {\n // check the route beforeEnter\n guards = [];\n for (const record of enteringRecords) {\n // do not trigger beforeEnter on reused views\n if (record.beforeEnter) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n }\n else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeEnter guards\n return runGuardQueue(guards);\n })\n .then(() => {\n // NOTE: at this point to.matched is normalized and does not contain any () => Promise<Component>\n // clear existing enterCallbacks, these are added by extractComponentsGuards\n to.matched.forEach(record => (record.enterCallbacks = {}));\n // check in-component beforeRouteEnter\n guards = extractComponentsGuards(enteringRecords, 'beforeRouteEnter', to, from, runWithContext);\n guards.push(canceledNavigationCheck);\n // run the queue of per route beforeEnter guards\n return runGuardQueue(guards);\n })\n .then(() => {\n // check global guards beforeResolve\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n })\n // catch any navigation canceled\n .catch(err => isNavigationFailure(err, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)\n ? err\n : Promise.reject(err)));\n }\n function triggerAfterEach(to, from, failure) {\n // navigation is confirmed, call afterGuards\n // TODO: wrap with error handlers\n afterGuards\n .list()\n .forEach(guard => runWithContext(() => guard(to, from, failure)));\n }\n /**\n * - Cleans up any navigation guards\n * - Changes the url if necessary\n * - Calls the scrollBehavior\n */\n function finalizeNavigation(toLocation, from, isPush, replace, data) {\n // a more recent navigation took place\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n // only consider as push if it's not the first navigation\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n // change URL only if the user did a push/replace and if it's not the initial navigation because\n // it's just reflecting the url\n if (isPush) {\n // on the initial navigation, we want to reuse the scroll position from\n // history state if it exists\n if (replace || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll,\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n // accept current navigation\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n // attach listener to history to trigger navigations\n function setupListeners() {\n // avoid setting up listeners twice due to an invalid first navigation\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router.listening)\n return;\n // cannot be a redirect route because it was in history\n const toLocation = resolve(to);\n // due to dynamic routing, and to hash history with manual navigation\n // (manually changing the url or calling history.hash = '#/somewhere'),\n // there could be a redirect record in history\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true, force: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n // TODO: should be moved to web history?\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from)\n .catch((error) => {\n if (isNavigationFailure(error, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n return error;\n }\n if (isNavigationFailure(error, 2 /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */)) {\n // Here we could call if (info.delta) routerHistory.go(-info.delta,\n // false) but this is bug prone as we have no way to wait the\n // navigation to be finished before calling pushWithRedirect. Using\n // a setTimeout of 16ms seems to work but there is no guarantee for\n // it to work on every browser. So instead we do not restore the\n // history entry and trigger a new navigation as requested by the\n // navigation guard.\n // the error is already handled by router.push we just want to avoid\n // logging the error\n pushWithRedirect(assign(locationAsObject(error.to), {\n force: true,\n }), toLocation\n // avoid an uncaught rejection, let push call triggerError\n )\n .then(failure => {\n // manual change in hash history #916 ending up in the URL not\n // changing, but it was changed by the manual url change, so we\n // need to manually change it ourselves\n if (isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ |\n 16 /* ErrorTypes.NAVIGATION_DUPLICATED */) &&\n !info.delta &&\n info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n })\n .catch(noop);\n // avoid the then branch\n return Promise.reject();\n }\n // do not restore history on unknown direction\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n // unrecognized error, transfer to the global handler\n return triggerError(error, toLocation, from);\n })\n .then((failure) => {\n failure =\n failure ||\n finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation, from, false);\n // revert the navigation\n if (failure) {\n if (info.delta &&\n // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(failure, 8 /* ErrorTypes.NAVIGATION_CANCELLED */)) {\n routerHistory.go(-info.delta, false);\n }\n else if (info.type === NavigationType.pop &&\n isNavigationFailure(failure, 4 /* ErrorTypes.NAVIGATION_ABORTED */ | 16 /* ErrorTypes.NAVIGATION_DUPLICATED */)) {\n // manual change in hash history #916\n // it's like a push but lacks the information of the direction\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n })\n // avoid warnings in the console about uncaught rejections, they are logged by triggerErrors\n .catch(noop);\n });\n }\n // Initialization and Errors\n let readyHandlers = useCallbacks();\n let errorListeners = useCallbacks();\n let ready;\n /**\n * Trigger errorListeners added via onError and throws the error as well\n *\n * @param error - error to throw\n * @param to - location we were navigating to when the error happened\n * @param from - location we were navigating from when the error happened\n * @returns the error as a rejected promise\n */\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorListeners.list();\n if (list.length) {\n list.forEach(handler => handler(error, to, from));\n }\n else {\n if ((process.env.NODE_ENV !== 'production')) {\n warn('uncaught error during route navigation:');\n }\n console.error(error);\n }\n // reject the error no matter there were error listeners or not\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve, reject) => {\n readyHandlers.add([resolve, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n // still not ready if an error happened\n ready = !err;\n setupListeners();\n readyHandlers\n .list()\n .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));\n readyHandlers.reset();\n }\n return err;\n }\n // Scroll behavior\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||\n ((isFirstNavigation || !isPush) &&\n history.state &&\n history.state.scroll) ||\n null;\n return nextTick()\n .then(() => scrollBehavior(to, from, scrollPosition))\n .then(position => position && scrollToPosition(position))\n .catch(err => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = new Set();\n const router = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n clearRoutes: matcher.clearRoutes,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorListeners.add,\n isReady,\n install(app) {\n const router = this;\n app.component('RouterLink', RouterLink);\n app.component('RouterView', RouterView);\n app.config.globalProperties.$router = router;\n Object.defineProperty(app.config.globalProperties, '$route', {\n enumerable: true,\n get: () => unref(currentRoute),\n });\n // this initial navigation is only necessary on client, on server it doesn't\n // make sense because it will create an extra unnecessary navigation and could\n // lead to problems\n if (isBrowser &&\n // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started &&\n currentRoute.value === START_LOCATION_NORMALIZED) {\n // see above\n started = true;\n push(routerHistory.location).catch(err => {\n if ((process.env.NODE_ENV !== 'production'))\n warn('Unexpected error when starting the router:', err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n Object.defineProperty(reactiveRoute, key, {\n get: () => currentRoute.value[key],\n enumerable: true,\n });\n }\n app.provide(routerKey, router);\n app.provide(routeLocationKey, shallowReactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function () {\n installedApps.delete(app);\n // the router is not attached to an app anymore\n if (installedApps.size < 1) {\n // invalidate the current navigation\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n // TODO: this probably needs to be updated so it can be used by vue-termui\n if (((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n addDevtools(app, router, matcher);\n }\n },\n };\n // TODO: type this as NavigationGuardReturn or similar instead of any\n function runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n }\n return router;\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find(record => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n // the type doesn't matter because we are comparing per reference\n if (!from.matched.find(record => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\n\n/**\n * Returns the router instance. Equivalent to using `$router` inside\n * templates.\n */\nfunction useRouter() {\n return inject(routerKey);\n}\n/**\n * Returns the current route location. Equivalent to using `$route` inside\n * templates.\n */\nfunction useRoute(_name) {\n return inject(routeLocationKey);\n}\n\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };\n","import { type ComputedRef, type Ref, computed } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\nimport { useLink } from 'vue-router';\n\ninterface RouterComposableHelpers {\n /**\n * V-bind this to an element to make it accessible as a link.\n */\n linkAttrs: Ref<{\n role?: string;\n tabindex?: string;\n href?: string;\n }>;\n /**\n * The href to link to.\n */\n href: Ref<string | undefined>;\n /**\n * Navigates to the given route or href. If you're not using an `<a>` tag,\n * you'll need to call this on `@click` and on `@keydown.enter`\n */\n navigate: (event: MouseEvent) => Promise<void>;\n}\n\nfunction useLinkAttrs(href: Ref<string | undefined>): ComputedRef<{\n role?: string;\n tabindex?: string;\n href?: string;\n}> {\n return computed(() => (href.value ? { role: 'link', tabindex: '0', href: href.value } : {}));\n}\n\n/**\n * Adds router-link functionality to any component. Accepts an `undefined`\n * route, which disables routing.\n *\n * @param to - The route to link to.\n * @returns A few helpers can be used to link to the given route.\n */\nexport function useRouterLink(to: Ref<RouteLocationRaw | undefined>): RouterComposableHelpers {\n // NOTE(mohan): We need to provide a default here or else `useLink` will throw\n // an error.\n const toWithDefault = computed(() => to.value ?? '');\n const useLinkResult = useLink({ to: toWithDefault });\n const { navigate: _navigate, href: _href } = useLinkResult;\n\n const isRouterLink = computed(() => !!to.value);\n const href = computed(() => (isRouterLink.value ? _href.value : undefined));\n const linkAttrs = useLinkAttrs(href);\n const navigate = async (event: MouseEvent): Promise<void> => {\n if (isRouterLink.value) {\n try {\n await _navigate(event);\n } catch (error) {\n // NOTE(mohan): This matches RouterLink's behavior, which doesn't throw\n // on navigation errors.\n // eslint-disable-next-line no-console\n console.debug(error);\n }\n }\n };\n\n return { linkAttrs, href, navigate };\n}\n","<!-- eslint-disable vue/no-deprecated-slot-attribute -->\n<template>\n <sl-button\n v-bind=\"$attrs\"\n ref=\"button\"\n class=\"c-button\"\n :class=\"{\n 'c-button--block': injectedOrPropBlock,\n 'c-button--has-prefix-icon': hasIcon && iconPosition === 'prefix',\n 'c-button--has-suffix-icon': hasIcon && iconPosition === 'suffix',\n [`c-button-level--${level}`]: level,\n [`c-button-variant--${computedVariant}`]: computedVariant,\n [`c-button-size--${computedSize}`]: computedSize,\n }\"\n :data-block=\"dataBlock\"\n :data-href=\"routerDestinationOrHref\"\n :data-level=\"level\"\n :data-loading=\"dataLoading\"\n :data-size=\"computedSize\"\n data-test=\"button\"\n :data-variant=\"computedVariant\"\n :disabled=\"disabled\"\n :href=\"routerDestinationOrHref\"\n :loading=\"loading || undefined\"\n :size=\"computedSize\"\n :target=\"target\"\n :variant=\"shoelaceVariant\"\n v-on=\"animationListeners\"\n @click=\"onClick\"\n @sl-focus=\"$emit('focus', $event)\"\n @sl-blur=\"$emit('blur', $event)\"\n >\n <span v-if=\"hasIcon\" :slot=\"iconPosition\" data-test=\"button-icon-slot\">\n <slot name=\"icon\">\n <font-awesome-icon v-if=\"icon\" :icon=\"icon\" />\n </slot>\n </span>\n <slot data-test=\"button-default-slot\" />\n </sl-button>\n</template>\n\n<script lang=\"ts\">\nimport type { IconDefinition } from '@fortawesome/fontawesome-svg-core';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport '@shoelace-style/shoelace/dist/components/button/button.js';\nimport type { PropType } from 'vue';\nimport { computed, defineComponent, inject, ref, toRefs } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\n\nimport type {\n ButtonIconPosition,\n ButtonLevel,\n ButtonShoelaceVariant,\n ButtonSize,\n ButtonVariant,\n} from '@propelinc/citrus-ui/src/components/CButton/types';\nimport { useTapAnimation } from '@propelinc/citrus-ui/src/composables/animation';\nimport { useRouterLink } from '@propelinc/citrus-ui/src/composables/router';\nimport { useSlotHasContent } from '@propelinc/citrus-ui/src/composables/slots';\nimport { BLOCK, BOUNCE_AMOUNT, LARGE } from '@propelinc/citrus-ui/src/services/injections/buttons';\n\n/**\n * Shoelace has a set of variants that don't match the variant names we would like to use.\n * This mapping is used to translate the variant names to the correct Shoelace variant names\n * and apply it to the underlying Shoelace button component.\n */\nexport const VARIANT_TO_SHOELACE_VARIANT: Record<ButtonVariant, ButtonShoelaceVariant> = {\n primary: 'primary',\n // Shoelace `default` is an outline style\n secondary: 'default',\n tertiary: 'text',\n};\n\nconst BLOCK_BOUNCE_AMOUNT = 0.96;\nconst BASE_BOUNCE_AMOUNT = 0.94;\n\nexport default defineComponent({\n components: {\n FontAwesomeIcon,\n },\n props: {\n /** Controls whether button appears as full-width */\n block: { type: Boolean, default: false },\n /** Controls whether button is disabled */\n disabled: { type: Boolean, default: false },\n /** Designates the button as an anchor and applies the href attribute */\n href: { type: String, default: undefined },\n /** Chooses an icon to render on the left side of the button */\n icon: {\n type: [String, Array, Object] as PropType<string | string[] | IconDefinition>,\n default: undefined,\n },\n /** Chooses whether to place the icon before or after the button text */\n iconPosition: {\n type: String as PropType<ButtonIconPosition>,\n default: 'prefix',\n validator: (value: string) => ['prefix', 'suffix'].includes(value),\n },\n /**\n * @deprecated use `size` prop instead\n * Controls whether button uses the large variant\n */\n large: { type: Boolean, default: false, deprecated: true },\n /** Controls the level of the button */\n level: {\n type: String as PropType<ButtonLevel>,\n default: 'normal',\n validator: (value: string) => ['normal', 'danger'].includes(value),\n },\n /** Controls whether button is loading */\n loading: { type: Boolean, default: false },\n /**\n * @deprecated use `variant` prop instead\n * Controls whether button uses the secondary variant */\n secondary: { type: Boolean, default: false, deprecated: true },\n /**\n * Controls the size of the button\n * @default 'medium'\n */\n size: {\n type: String as PropType<ButtonSize>,\n default: 'medium',\n validator: (value: string) => ['medium', 'large'].includes(value),\n },\n /** Designates the target attribute. Only use with the href prop. */\n target: { type: String, default: undefined },\n /**\n * @deprecated use `variant` prop instead\n * Controls whether button uses the tertiary variant\n */\n tertiary: { type: Boolean, default: false, deprecated: true },\n /** Controls whether button functions as a router-link */\n to: { type: [Object, String] as PropType<RouteLocationRaw>, default: undefined },\n /**\n * Controls the styling of the button\n * @default 'primary'\n */\n variant: {\n type: String as PropType<ButtonVariant>,\n default: 'primary',\n validator: (value: string) => ['primary', 'secondary', 'tertiary'].includes(value),\n },\n },\n emits: ['click', 'focus', 'blur'],\n setup(props, { emit }) {\n const { block, to } = toRefs(props);\n const { href: routerDestination, navigate } = useRouterLink(to);\n const routerDestinationOrHref = computed(() => routerDestination.value ?? props.href);\n\n const dataLoading = computed<true | undefined>(() => props.loading || undefined);\n\n const injectedBlock = inject(BLOCK, undefined);\n const injectedOrPropBlock = computed(() => injectedBlock?.value ?? props.block);\n const dataBlock = computed<true | undefined>(() => injectedOrPropBlock.value || undefined);\n\n const iconSlotHasContent = useSlotHasContent('icon');\n const hasIcon = computed(() => iconSlotHasContent.value || !!props.icon);\n\n /**\n * Handle the deprecated `secondary` and `tertiary` props.\n */\n const computedVariant = computed((): ButtonVariant => {\n if (props.secondary) {\n return 'secondary';\n }\n\n if (props.tertiary) {\n return 'tertiary';\n }\n\n return props.variant;\n });\n\n /**\n * Map the computed variant to the Shoelace variant\n */\n const shoelaceVariant = computed(() => VARIANT_TO_SHOELACE_VARIANT[computedVariant.value]);\n\n /**\n * The deprecated `large` prop can be injected through a provider.\n */\n const injectedLarge = inject(LARGE, undefined);\n const injectedOrPropsLarge = computed(() => injectedLarge?.value ?? props.large);\n /**\n * Because we want the `size` prop to have a default, it's always supplied.\n * Thus, our only option to respect the deprecated `large` prop is to give it priority.\n */\n const computedSize = computed(() => {\n if (injectedOrPropsLarge.value) {\n return 'large';\n }\n\n return props.size;\n });\n\n function onClick(event: MouseEvent): void {\n /**\n * If the button is disabled or loading, do not take action.\n * This prevents double/extra clicks when an async operation is in progress.\n */\n if (props.disabled || props.loading) {\n return;\n }\n\n navigate(event);\n emit('click', event);\n }\n\n const button = ref<HTMLElement | null>(null);\n const injectedBounceAmount = inject(BOUNCE_AMOUNT, null);\n const bounceAmount = computed(() => {\n /**\n * If the button is disabled or loading, do not animate the button.\n */\n if (props.disabled || props.loading) {\n return 1;\n }\n\n if (injectedBounceAmount) {\n return injectedBounceAmount;\n }\n\n if (block.value) {\n return BLOCK_BOUNCE_AMOUNT;\n }\n\n return BASE_BOUNCE_AMOUNT;\n });\n const animationListeners = useTapAnimation({\n el: button,\n keyframes: {\n default: { transform: 'scale(1)' },\n pressed: { transform: `scale(${bounceAmount.value})` },\n },\n });\n\n return {\n animationListeners,\n button,\n computedSize,\n computedVariant,\n dataBlock,\n dataLoading,\n hasIcon,\n injectedOrPropBlock,\n injectedOrPropsLarge,\n onClick,\n routerDestinationOrHref,\n shoelaceVariant,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/button';\n\n.c-button {\n // Prevents the iOS tap highlight color from showing up on buttons\n -webkit-tap-highlight-color: transparent;\n\n &::part(base) {\n // Included in all buttons so that they line up in rows, even buttons with transparent borders\n border-width: $border-width;\n transition: background-color 0.2s ease-in-out;\n }\n\n &::part(label) {\n padding: 0 16px;\n }\n}\n\n.c-button-size--medium::part(base) {\n --sl-input-height-medium: #{$button-size-medium};\n}\n\n.c-button-size--large::part(base) {\n --sl-input-height-large: #{$button-size-large};\n}\n\n.c-button--has-prefix-icon {\n &::part(base) {\n padding-inline-start: 16px;\n }\n\n &::part(label) {\n padding-inline-start: 8px;\n }\n}\n\n.c-button--has-suffix-icon {\n &::part(base) {\n padding-inline-end: 16px;\n }\n\n &::part(label) {\n padding-inline-end: 8px;\n }\n}\n\n.c-button--block {\n min-width: 100%;\n}\n\n.c-button-variant--primary::part(base) {\n @include button-theme-primary;\n}\n\n.c-button-variant--primary.c-button-level--danger::part(base) {\n @include button-theme-primary-danger;\n}\n\n.c-button-variant--secondary::part(base) {\n @include button-theme-secondary;\n}\n\n.c-button-variant--secondary.c-button-level--danger::part(base) {\n @include button-theme-secondary-danger;\n}\n\n.c-button-variant--tertiary::part(base) {\n @include button-theme-tertiary;\n}\n\n.c-button-variant--tertiary.c-button-level--danger::part(base) {\n @include button-theme-tertiary-danger;\n}\n\n/**\n * Override Shoelace's default disabled styles\n * (The danger styles seem fine)\n */\n:not(.c-button-level--danger) {\n &.c-button-variant--primary[disabled]::part(base) {\n @include button-theme($color-gray-400, $color-gray-200, $color-gray-200);\n }\n\n &.c-button-variant--secondary[disabled]::part(base) {\n @include button-theme($color-gray-300, $color-gray-300, transparent);\n }\n\n &.c-button-variant--tertiary[disabled]::part(base) {\n @include button-theme($color-gray-300, transparent, transparent);\n }\n}\n</style>\n","<template>\n <div v-bind=\"$attrs\" class=\"c-card-header\" data-test=\"card-header\">\n <div data-test=\"card-title\" class=\"c-card-header__title\">\n <slot />\n </div>\n\n <div class=\"c-card-header__append\">\n <slot name=\"append\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, provide, ref } from 'vue';\n\nimport { TERTIARY as TERTIARY_ICON_BUTTON } from '@propelinc/citrus-ui/src/services/injections/icon-buttons';\n\nexport default defineComponent({\n setup() {\n provide(TERTIARY_ICON_BUTTON, ref(true));\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-card-header {\n @include subheadline;\n\n display: flex;\n}\n\n.c-card-header__title {\n flex: 1 1 auto;\n padding: 16px 16px 8px;\n}\n\n.c-card-header__append {\n align-items: center;\n display: flex;\n flex: none;\n\n .c-icon-button {\n margin-right: 8px;\n }\n\n .c-badge {\n margin-right: 8px;\n }\n}\n</style>\n","<template>\n <component\n :is=\"config.element\"\n v-bind=\"config.attrs\"\n data-test=\"card\"\n class=\"c-card\"\n :class=\"{\n 'c-card--tile': tile,\n 'c-card--borderless': borderless,\n 'c-card--link': config.isLink,\n 'c-card--stretch': stretch,\n }\"\n :href=\"href\"\n :style=\"{\n '--background-color': backgroundCssColor,\n '--border-color': borderCssColor,\n }\"\n :to=\"to\"\n >\n <CCardHeader v-if=\"title\">\n {{ title }}\n </CCardHeader>\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue';\nimport { computed, defineComponent, toRefs } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\n\nimport CCardHeader from '@propelinc/citrus-ui/src/components/CCardHeader.vue';\nimport { useCssColor } from '@propelinc/citrus-ui/src/composables/colors';\n\ntype RoutingVariant = 'none' | 'internal' | 'external';\n\nexport interface InternalCardConfig {\n attrs: Record<string, unknown>;\n element: string;\n isLink: boolean;\n}\n\nexport default defineComponent({\n components: { CCardHeader },\n props: {\n /** Sets the border color of the card */\n borderColor: { type: String, default: undefined },\n\n /** Removes the border of the card */\n borderless: { type: Boolean, default: false },\n\n /** Sets the background color of the entire card */\n color: { type: String, default: undefined },\n\n /** Navigates externally on click */\n href: { type: String, default: undefined },\n\n /** Stretches the card vertically to fill the height of the parent container */\n stretch: { type: Boolean, default: false },\n\n /** Toggles a squared-off card style intended to fill the width of the page */\n tile: { type: Boolean, default: false },\n\n /** Sets the title of the card */\n title: { type: String, default: undefined },\n\n /** Navigates within the app on click */\n to: { type: [Object, String] as PropType<RouteLocationRaw | undefined>, default: undefined },\n },\n setup(props, { attrs }) {\n const { href, to } = toRefs(props);\n\n const { cssColor: backgroundCssColor } = useCssColor(() => props.color);\n const { cssColor: borderCssColor } = useCssColor(() => props.borderColor);\n\n const routingVariant = computed<RoutingVariant>(() => {\n if (to.value) {\n return 'internal';\n }\n\n if (href.value) {\n return 'external';\n }\n\n return 'none';\n });\n\n const config = computed<InternalCardConfig>(() => {\n switch (routingVariant.value) {\n case 'internal':\n return {\n attrs,\n element: 'router-link',\n isLink: true,\n };\n\n case 'external':\n return {\n attrs: {\n ...attrs,\n role: 'link',\n tabindex: '0',\n target: '_blank',\n },\n element: 'a',\n isLink: true,\n };\n\n case 'none':\n default:\n return { attrs, element: 'div', isLink: false };\n }\n });\n\n return { config, backgroundCssColor, borderCssColor };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-card {\n --background-color: #{$color-background};\n --border-color: #{$color-border};\n --border-radius: #{$border-radius-next};\n --text-color: #{$color-text-primary};\n\n background-color: var(--background-color);\n border-color: var(--border-color);\n border-radius: var(--border-radius);\n border-style: solid;\n border-width: $border-width;\n color: var(--text-color);\n display: block;\n max-width: 100%;\n overflow: hidden;\n\n /**\n * FIXME: (kyleshevlin - https://linear.app/slanden/issue/FE-37/remove-exported-margins):\n * This is an \"exported margin\" and we should try to remove it. They make composition difficult.\n * Read more here: https://kyleshevlin.com/no-outer-margin\n *\n * For example, imagine we want to have multiple cards in a row. This selector will add a\n * margin-top to every card except the first. That would not be desired.\n *\n * Ideally, layout of sibling cards is always handled by a parent element.\n */\n & + & {\n margin-top: 8px;\n }\n}\n\n.c-card--tile {\n --border-radius: 0;\n\n border-left: none;\n border-right: none;\n}\n\n.c-card--borderless {\n --border-color: transparent;\n}\n\n.c-card--link {\n cursor: pointer;\n}\n\n.c-card--stretch {\n height: 100%;\n}\n</style>\n","<template>\n <CButtonStack v-bind=\"$attrs\" data-test=\"card-footer\" class=\"c-card-footer\">\n <slot />\n </CButtonStack>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nimport CButtonStack from '@propelinc/citrus-ui/src/components/CButtonStack.vue';\n\nexport default defineComponent({\n components: { CButtonStack },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-card-footer {\n padding: 0 16px 16px;\n}\n</style>\n","<template>\n <div\n v-bind=\"$attrs\"\n data-test=\"card-section\"\n class=\"c-card-section\"\n :class=\"{ 'c-card-section--fluid': fluid }\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n /** Removes the padding from the section */\n fluid: { type: Boolean, default: false },\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-card-section {\n padding: 0 16px 16px;\n\n &:first-child:not(.c-card-section--fluid) {\n padding-top: 16px;\n }\n}\n\n.c-card-section--fluid {\n padding: 0;\n}\n</style>\n","<template>\n <div\n v-if=\"!isHidden\"\n :data-test=\"dataTest\"\n class=\"c-validation-message\"\n :class=\"{ 'c-validation-message--invalid': !!validationMessage }\"\n >\n <CFadeTransition aria-live=\"polite\">\n <span v-if=\"validationMessage\" key=\"message\" role=\"alert\" :data-test=\"`${dataTest}-text`\">\n {{ validationMessage }}\n </span>\n <!-- NOTE(mohan): Always keep an empty span to make sure the flex layout is stable. -->\n <span v-else key=\"empty\">\n <slot />\n </span>\n </CFadeTransition>\n\n <slot name=\"append\" />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue';\nimport { computed, defineComponent } from 'vue';\n\nimport CFadeTransition from '@propelinc/citrus-ui/src/components/CFadeTransition.vue';\nimport { useSlotHasContent } from '@propelinc/citrus-ui/src/composables/slots';\n\nexport default defineComponent({\n name: 'CValidationMessage',\n components: { CFadeTransition },\n props: {\n /** Test selector for the component */\n dataTest: { type: String, default: 'validation-message' },\n /** Validation message to display */\n validationMessage: { type: String as PropType<string | null>, default: null },\n /** Whether to hide the component. If \"auto\", the component will automatically\n * hide itself if it has no content. */\n hide: { type: [Boolean, String] as PropType<boolean | 'auto'>, default: false },\n },\n setup(props) {\n const appendSlotHasContent = useSlotHasContent('append');\n const isHidden = computed(() => {\n if (props.hide === 'auto') {\n return !props.validationMessage && !appendSlotHasContent.value;\n } else {\n return props.hide;\n }\n });\n\n return { isHidden };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-validation-message {\n @include caption;\n\n display: flex;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n\n.c-validation-message--invalid {\n color: $color-status-error;\n}\n</style>\n","import type { Ref } from 'vue';\nimport { computed } from 'vue';\n\nlet idCounter = 0;\n\n/**\n * Generates a unique ID for a component.\n *\n * This is a very rudimentary backport of Vue 3.5's `useId` composable that is\n * _not_ stable across server and client.\n *\n * @param id - The ID to use. If not provided, a unique ID will be generated.\n * @returns A computed value that returns the provided ID or a unique ID.\n */\nexport function useId(id: Ref<string | null | undefined>): Ref<string> {\n return computed(() => {\n if (id.value) {\n return id.value;\n } else {\n return `c-${idCounter++}`;\n }\n });\n}\n","import type { InjectionKey } from 'vue';\n\nimport type { ValidationState } from '@propelinc/citrus-ui/src/types/CForm';\n\nexport const VALIDATIONS = Symbol('validations') as InjectionKey<{\n register: (input: ValidationState) => void;\n unregister: (id: string) => void;\n}>;\n","import type { Ref } from 'vue';\nimport { computed, inject, onBeforeUnmount, ref, unref, watch } from 'vue';\n\nimport { VALIDATIONS } from '@propelinc/citrus-ui/src/services/injections/forms';\nimport type { ValidationState } from '@propelinc/citrus-ui/src/types/CForm';\n\nexport type Rule<Value extends string | boolean> = (value: Value) => string | boolean;\nexport type Rules<Value extends string | boolean> = Rule<Value>[];\n\nexport type ValidationEvent = 'blur' | 'input' | 'change';\n\nexport interface UseValidationRuleCheckOptions<Value extends string | boolean> {\n value: Ref<Value>;\n rules: Ref<Rules<Value>>;\n required?: Ref<boolean>;\n onValidationResultChange?: ({\n message,\n valid,\n }: {\n message: string | null;\n valid: boolean;\n }) => void;\n}\n\ninterface UseValidationRuleCheckReturn {\n /** The validation error message, if any. */\n message: Ref<string | null>;\n /** Whether the input element is valid. This is only set after\n * `startValidating` is called. */\n valid: Ref<boolean>;\n /** Whether the input element is valid regardless of whether `startValidating`\n * has been called. */\n passesRules: Ref<boolean>;\n /** Starts the validation process. */\n startValidating: () => boolean;\n /** Clears the validation results. */\n clearValidations: () => void;\n}\n\n/**\n * A composable that provides manual control of validation rules for a form\n * control. For full validation support, please see the `useValidations`\n * composable.\n *\n * @see {@link useValidations}\n *\n * @param options - The options for the composable.\n */\nexport function useValidationRuleCheck<Value extends string | boolean>(\n options: UseValidationRuleCheckOptions<Value>\n): UseValidationRuleCheckReturn {\n const { value, rules, required } = options;\n const active = ref(false);\n\n const message = ref<string | null>(null);\n const valid = ref(true);\n\n const isEmpty = (v: Value): boolean =>\n v === undefined || v === null || (typeof v === 'string' && v.trim() === '');\n\n const requiredRule: Rule<Value> = (val: Value): boolean => {\n return required?.value ? !isEmpty(val) : true;\n };\n\n const rulesResult = computed(() => {\n const allRules: Rules<Value> = [...rules.value, requiredRule];\n for (const rule of allRules) {\n const result = rule(value.value);\n if (result === false || typeof result === 'string') {\n return result;\n }\n }\n return true;\n });\n\n const passesRules = computed(() => rulesResult.value === true);\n\n const validate = (): boolean => {\n if (active.value) {\n valid.value = passesRules.value;\n message.value = typeof rulesResult.value === 'string' ? rulesResult.value : null;\n options.onValidationResultChange?.({ message: message.value, valid: valid.value });\n }\n\n return valid.value;\n };\n\n watch(value, () => validate(), { immediate: true });\n watch(rules, () => validate());\n\n if (required) {\n watch(required, () => validate());\n }\n\n const startValidating = (): boolean => {\n active.value = true;\n return validate();\n };\n\n const clearValidations = (): void => {\n message.value = null;\n valid.value = true;\n active.value = false;\n };\n\n return { message, valid, startValidating, clearValidations, passesRules };\n}\n\nexport interface UseValidationsOptions<Value extends string | boolean> {\n id?: Ref<string>;\n /** The input element. The `aria-invalid` attribute will be set on this\n * element. */\n field?: Ref<HTMLElement | null>;\n /** The value of the input element. */\n value: Ref<Value>;\n /** The validation rules to apply to the input element. */\n rules: Ref<Rules<Value>>;\n /** Value of the required attribute. */\n required?: Ref<boolean>;\n /** Which event to wait for before starting validation. */\n validateOn?: ValidationEvent | Ref<ValidationEvent>;\n}\n\ninterface UseValidationsReturn {\n /** The validation error message, if any. */\n message: Ref<string | null>;\n /** Whether the input element is valid. */\n valid: Ref<boolean | null>;\n /** The event listeners to bind to the component using `v-on`. */\n listeners: Record<string, (event: Event) => void>;\n /** Triggers validation. */\n startValidating: () => boolean;\n /** Clears the validation results. */\n clearValidations: () => void;\n}\n\n/** Registers this field with a parent form to enable form-wide validation. */\nexport type ValidationStateWithOptionalId = Omit<ValidationState, 'id'> & { id?: string };\nexport function useFormValidationSupport(state: ValidationStateWithOptionalId): void {\n const formValidations = inject(VALIDATIONS, null);\n if (formValidations) {\n if (!state.id) {\n throw new Error('id is required to support form validations');\n }\n\n formValidations.register(state as ValidationState);\n }\n\n onBeforeUnmount(() => {\n if (formValidations && state.id) {\n formValidations.unregister(state.id);\n }\n });\n}\n\n/**\n * A composable that provides validation support for form controls. Please make sure to\n * `v-bind` the returned `attrs` and `v-on` the returned `listeners` to the component.\n *\n * @param options - The options for the composable.\n */\nexport function useValidations<Value extends string | boolean>(\n options: UseValidationsOptions<Value>\n): UseValidationsReturn {\n const validateOn = computed(() => unref(options.validateOn) ?? 'blur');\n\n const onValidationResultChange = ({ valid }: { valid: boolean }): void => {\n if (options.field?.value) {\n options.field.value.setAttribute('aria-invalid', valid ? 'false' : 'true');\n }\n };\n\n const { message, valid, startValidating, passesRules, clearValidations } = useValidationRuleCheck(\n {\n value: options.value,\n rules: options.rules,\n required: options.required,\n onValidationResultChange,\n }\n );\n\n useFormValidationSupport({\n id: options.id?.value,\n valid: passesRules,\n validate: startValidating,\n field: options.field,\n });\n\n const onInput = (): void => {\n if (validateOn.value === 'input') {\n startValidating();\n }\n };\n\n const onBlur = (): void => {\n // NOTE(slanden): We always validate on blur, regardless of the validateOn setting.\n startValidating();\n };\n\n const onChange = (): void => {\n if (validateOn.value === 'change') {\n startValidating();\n }\n };\n\n watch(validateOn, (newValue, oldValue): void => {\n if (['input', 'change'].includes(newValue) && newValue !== oldValue) {\n startValidating();\n }\n });\n\n const listeners = { input: onInput, blur: onBlur, change: onChange };\n return { message, valid, listeners, startValidating, clearValidations };\n}\n","<template>\n <div class=\"c-checkbox__container\">\n <label\n class=\"c-checkbox\"\n :class=\"{\n 'c-checkbox--checked': internalValue,\n 'c-checkbox--invalid': !isValidationValid,\n 'c-checkbox--contained': variant === 'contained',\n }\"\n :data-test=\"dataTest\"\n >\n <input\n :id=\"idWithFallback\"\n type=\"checkbox\"\n :data-test=\"`${dataTest}-input`\"\n class=\"c-checkbox__input\"\n :aria-checked=\"internalValue\"\n :aria-describedby=\"`${idWithFallback}-message`\"\n :aria-invalid=\"!isValidationValid\"\n :checked=\"internalValue || undefined\"\n @change=\"onChange\"\n @blur=\"$emit('blur')\"\n @focus=\"$emit('focus')\"\n v-on=\"validationListeners\"\n />\n <span class=\"c-checkbox__control\" :data-test=\"`${dataTest}-control`\">\n <FontAwesomeIcon v-if=\"internalValue\" :icon=\"faCheck\" />\n </span>\n <slot name=\"label\">{{ label }}</slot>\n </label>\n\n <CValidationMessage\n class=\"c-checkbox__message\"\n :data-test=\"`${dataTest}-message`\"\n :validation-message=\"validationMessage\"\n :hide=\"hideDetails\"\n >\n <slot name=\"message\" />\n </CValidationMessage>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { faCheck } from '@fortawesome/pro-regular-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport type { PropType } from 'vue';\nimport { defineComponent, ref, toRefs } from 'vue';\n\nimport CValidationMessage from '@propelinc/citrus-ui/src/components/CValidationMessage.vue';\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\nimport { useId } from '@propelinc/citrus-ui/src/composables/id';\nimport { useValidations } from '@propelinc/citrus-ui/src/composables/validations';\n\nexport default defineComponent({\n name: 'CCheckbox',\n components: { FontAwesomeIcon, CValidationMessage },\n props: {\n /** Assigns the checkbox's id */\n id: { type: String as PropType<string | null>, default: null },\n /** The label text for the checkbox. */\n label: { type: String, default: undefined },\n /** Whether the checkbox is checked */\n value: { type: Boolean, default: false },\n /** A custom data-test selector */\n dataTest: { type: String, default: 'checkbox' },\n /**\n * An array of functions that either return either true / false or a string\n * containing an error message. The component passes the input value as an\n * argument. The input field will enter an error state if a function does\n * not return true.\n * */\n rules: {\n type: Array as PropType<((value: boolean) => string | boolean)[]>,\n default: () => [],\n },\n /** Hides the validation message area. */\n hideDetails: {\n type: [Boolean, String] as PropType<boolean | 'auto'>,\n default: false,\n },\n /** Controls the appearance of the checkbox. */\n variant: {\n type: String as PropType<'contained' | 'minimal'>,\n default: 'contained',\n },\n },\n emits: ['change', 'focus', 'blur'],\n setup(props, { emit }) {\n const { value, rules, id } = toRefs(props);\n const idWithFallback = useId(id);\n\n const internalValue = useInternalValue(value, {\n onChange: (value) => emit('change', value),\n });\n\n const checkbox = ref<HTMLInputElement | null>(null);\n\n const {\n message: validationMessage,\n valid: isValidationValid,\n listeners: validationListeners,\n } = useValidations({\n id: idWithFallback,\n value: internalValue,\n rules,\n validateOn: 'change',\n field: checkbox,\n });\n\n const onChange = (event: Event): void => {\n const target = event.target as HTMLInputElement;\n internalValue.value = !!target.checked;\n };\n\n return {\n checkbox,\n faCheck,\n idWithFallback,\n internalValue,\n onChange,\n validationMessage,\n isValidationValid,\n validationListeners,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/form-fields';\n@import '@propelinc/citrus-ui/src/styles/utils/a11y';\n\n.c-checkbox {\n align-items: flex-start;\n cursor: pointer;\n display: flex;\n gap: 8px;\n transition: border-color $citrus-field-transition-duration ease;\n\n --padding: 12px;\n\n &--contained {\n background-color: $color-background;\n border: $border;\n border-radius: $border-radius-next;\n padding: var(--padding);\n width: 100%;\n\n &.c-checkbox--checked {\n border-color: $color-black;\n border-width: $border-width;\n }\n\n &.c-checkbox--invalid {\n border-color: $color-status-error;\n }\n }\n\n &--invalid {\n color: $color-status-error;\n }\n}\n\n.c-checkbox__input {\n @include sr-only;\n}\n\n.c-checkbox__control {\n align-items: center;\n border: $color-gray-300 solid $border-width;\n border-radius: 4px;\n color: $color-white;\n display: flex;\n flex-shrink: 0;\n height: 22px;\n justify-content: center;\n width: 22px;\n\n .c-checkbox--checked & {\n background-color: $color-black;\n border-color: $color-black;\n }\n\n .c-checkbox--invalid & {\n border-color: $color-status-error;\n }\n}\n\n.c-checkbox__input:focus-visible ~ .c-checkbox__control {\n @include focus-ring;\n}\n\n.c-checkbox__message {\n margin-top: 4px;\n}\n</style>\n","<template>\n <div class=\"c-col\" :class=\"{ [`c-col-${cols}`]: cols }\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n /** Sets the default number of columns the component extends.\n * Available options are: 1 -> 12 and auto. */\n cols: {\n type: String,\n default: null,\n validator: (value: string) => {\n if (value === 'auto' || !value) {\n return true;\n }\n\n return Array.from(Array(12))\n .map((_, i) => `${i + 1}`)\n .includes(value);\n },\n },\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n.c-col {\n flex-basis: 0;\n flex-grow: 1;\n max-width: 100%;\n\n &:not(.c-col-auto) {\n padding: 12px;\n width: 100%;\n }\n}\n\n.c-col-auto {\n flex: 0 0 auto;\n max-width: 100%;\n width: auto;\n}\n\n@for $i from 1 through 12 {\n .c-col-#{$i} {\n flex: 0 0 calc(#{$i} / 12 * 100%);\n max-width: calc(#{$i} / 12 * 100%);\n }\n}\n</style>\n","<template>\n <hr\n class=\"c-divider\"\n :class=\"{ 'c-divider--vertical': vertical }\"\n :aria-orientation=\"vertical ? 'vertical' : 'horizontal'\"\n />\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n /** Displays dividers vertically. */\n vertical: { type: Boolean, default: false },\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-divider {\n border: solid $color-gray-200;\n border-width: thin 0 0;\n display: block;\n flex: 1 1 0px;\n height: 0;\n max-height: 0;\n max-width: 100%;\n transition: inherit;\n}\n\n.c-divider--vertical {\n align-self: stretch;\n border-width: 0 thin 0 0;\n display: inline-flex;\n height: inherit;\n margin: 0 -1px;\n max-height: 100%;\n max-width: 0;\n min-height: 100%;\n vertical-align: text-bottom;\n width: 0;\n}\n</style>\n","<template>\n <div>{{ displayText }}</div>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue';\nimport { computed, defineComponent } from 'vue';\n\nexport default defineComponent({\n name: 'CFormFieldCounter',\n props: {\n /** Sets the denominator of the counter. */\n counter: { type: Number as PropType<number | null>, default: null },\n /** Function or number that determines the numerator of the counter. */\n counterValue: {\n type: [Number, Function] as PropType<number | (() => number | null)>,\n default: null,\n },\n /** Input value of the parent form field */\n value: { type: String, default: '' },\n },\n setup(props) {\n const numerator = computed(() => {\n if (typeof props.counterValue === 'function') {\n return props.counterValue();\n } else if (typeof props.counterValue === 'number') {\n return props.counterValue;\n } else {\n return props.value.length;\n }\n });\n\n const displayText = computed(() => {\n return `${numerator.value}/${props.counter}`;\n });\n\n return { numerator, displayText };\n },\n});\n</script>\n","import { onMounted, useAttrs } from 'vue';\n\nexport function useA11yLabelCheck(componentName: string, props?: Record<string, unknown>): void {\n const attrs = useAttrs();\n\n onMounted(() => {\n const enableCheck = process.env.VUE_APP_DEBUG === 'yes' || process.env.NODE_ENV === 'test';\n if (!enableCheck) {\n return;\n }\n\n if (\n attrs.title ||\n props?.title ||\n attrs['aria-label'] ||\n props?.ariaLabel ||\n attrs['aria-labelledby'] ||\n props?.ariaLabelledby ||\n attrs['aria-hidden'] ||\n props?.ariaHidden\n ) {\n return;\n }\n\n console.error(\n `Missing ${componentName} label. This component won't be intelligible to screen readers. Typically, this is resolved by providing an aria-label.`\n );\n });\n}\n","<template>\n <CButton\n v-bind=\"$attrs\"\n class=\"c-icon-button\"\n :class=\"{\n 'c-icon-button--inherit': inheritColor,\n [`c-icon-button-size--${computedSize}`]: computedSize,\n }\"\n :data-inherit-color=\"inheritColor\"\n :data-size=\"computedSize\"\n data-test=\"icon-button\"\n :disabled=\"disabled\"\n :href=\"href\"\n :level=\"level\"\n :loading=\"loading\"\n :size=\"computedSize\"\n :target=\"target\"\n :to=\"to\"\n :variant=\"computedVariant\"\n @blur=\"$emit('blur', $event)\"\n @click=\"$emit('click', $event)\"\n @focus=\"$emit('focus', $event)\"\n >\n <div\n role=\"img\"\n data-test=\"icon-button-a11y\"\n :aria-label=\"ariaLabel\"\n :aria-labelledby=\"ariaLabelledby\"\n >\n <slot>\n <font-awesome-icon\n v-if=\"icon\"\n class=\"c-icon-button__icon\"\n :class=\"{ 'c-icon-button__icon--spin': spinIcon }\"\n data-test=\"icon-button-icon\"\n :icon=\"icon\"\n />\n </slot>\n </div>\n </CButton>\n</template>\n\n<script lang=\"ts\">\nimport type { IconDefinition } from '@fortawesome/pro-light-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport type { PropType } from 'vue';\nimport { computed, defineComponent, inject, provide } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\n\nimport CButton from '@propelinc/citrus-ui/src/components/CButton/CButton.vue';\nimport type {\n ButtonLevel,\n ButtonSize,\n ButtonVariant,\n} from '@propelinc/citrus-ui/src/components/CButton/types';\nimport { useA11yLabelCheck } from '@propelinc/citrus-ui/src/composables/accessibility';\nimport { BOUNCE_AMOUNT } from '@propelinc/citrus-ui/src/services/injections/buttons';\nimport { INHERIT_COLOR, TERTIARY } from '@propelinc/citrus-ui/src/services/injections/icon-buttons';\n\nexport default defineComponent({\n components: { FontAwesomeIcon, CButton },\n props: {\n /** ARIA label for the button. You must use either this or ariaLabelledby. */\n ariaLabel: { type: String, default: undefined },\n /** ARIA labelledby for the button. You must use either this or ariaLabel. */\n ariaLabelledby: { type: String, default: undefined },\n /** Controls whether button is disabled */\n disabled: { type: Boolean, default: false },\n /** Designates the button as an anchor and applies the href attribute */\n href: { type: String, default: undefined },\n /** Specifies a Font Awesome icon */\n icon: {\n type: [String, Array, Object] as PropType<string | string[] | IconDefinition>,\n default: undefined,\n },\n /**\n * Controls whether button uses the large variant\n * @deprecated Use `size=\"large\"` instead\n */\n large: { type: Boolean, default: false, deprecated: true },\n /**\n * Controls the level of the button\n * @default 'normal'\n */\n level: { type: String as PropType<ButtonLevel>, default: 'normal' },\n /** Controls whether button is loading */\n loading: { type: Boolean, default: false },\n /**\n * Controls whether button uses the secondary variant\n * @deprecated Use `variant=\"secondary\"` instead\n */\n secondary: { type: Boolean, default: false, deprecated: true },\n /**\n * Controls the size of the button\n * @default 'medium'\n */\n size: { type: String as PropType<ButtonSize>, default: 'medium' },\n /** Spins the icon for loading states */\n spinIcon: { type: Boolean, default: false },\n /** Designates the target attribute. Only use with the href prop. */\n target: { type: String, default: undefined },\n /**\n * Controls whether button uses the tertiary variant\n * @deprecated Use `variant=\"tertiary\"` instead\n */\n tertiary: { type: Boolean, default: false, deprecated: true },\n /** Controls whether button functions as a router-link */\n to: { type: [Object, String] as PropType<RouteLocationRaw>, default: undefined },\n /**\n * Controls the variant of the button\n * @default 'primary'\n */\n variant: { type: String as PropType<ButtonVariant>, default: 'primary' },\n },\n emits: ['blur', 'click', 'focus'],\n setup(props) {\n useA11yLabelCheck('CIconButton', props);\n\n const injectedTertiary = inject(TERTIARY, undefined);\n const injectedOrPropTertiary = computed(() => injectedTertiary?.value ?? props.tertiary);\n /**\n * Handle the `variant` prop. `secondary` and `tertiary` are deprecated, but because we set a\n * default `variant`, we need to give them precedence.\n *\n * This is slightly different than the implementation of `computedVariant` in CButton, as\n * `CButton` does not make use of an injected `TERTIARY` value.\n */\n const computedVariant = computed((): ButtonVariant => {\n if (props.secondary) {\n return 'secondary';\n }\n\n if (injectedOrPropTertiary.value) {\n return 'tertiary';\n }\n\n return props.variant;\n });\n\n /**\n * Handle the `size` prop. `large` is deprecated, but because we set a default `size`, we need\n * to give it precedence.\n */\n const computedSize = computed((): ButtonSize => {\n if (props.large) {\n return 'large';\n }\n\n return props.size;\n });\n\n const inheritColor = inject(INHERIT_COLOR, undefined);\n\n provide(BOUNCE_AMOUNT, 0.9);\n\n return { computedSize, computedVariant, inheritColor };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-icon-button::part(base) {\n font-size: $font-size-icon-medium;\n line-height: 0;\n padding: 0;\n width: $button-size-medium;\n}\n\n.c-icon-button--inherit::part(base) {\n color: inherit;\n}\n\n.c-icon-button::part(label) {\n align-items: center;\n display: flex;\n justify-content: center;\n padding: 0;\n}\n\n.c-icon-button-size--large::part(base) {\n width: $button-size-large;\n}\n\n.c-icon-button__icon--spin {\n animation: $loader-spin-animation;\n}\n</style>\n","import { getCurrentInstance } from 'vue';\n\nexport function useTranslation(): {\n t: (key: string, interpolations?: Record<string, string | number>) => string;\n} {\n const currentInstance = getCurrentInstance();\n\n if (!currentInstance || !currentInstance.proxy) {\n throw new Error('useTranslation must be called within a Vue component');\n }\n\n return { t: currentInstance.proxy.$t };\n}\n","<template>\n <div\n class=\"c-text-field\"\n :class=\"[\n {\n 'c-text-field--disabled': disabled,\n 'c-text-field--invalid': !isValidationValid,\n 'c-text-field--hide-label': hideLabel,\n 'c-text-field--focused': isFocused,\n 'c-text-field--medium': size === 'medium',\n 'c-text-field--large': size === 'large',\n },\n $attrs.class,\n ]\"\n :data-test=\"dataTest\"\n :style=\"rootStyles\"\n >\n <label class=\"c-text-field__label\" :for=\"idWithFallback\" :data-test=\"`${dataTest}-label`\">\n <slot name=\"label\">\n {{ label }}\n </slot>\n </label>\n\n <div class=\"c-text-field__container\">\n <div\n v-if=\"prefixSlotHasContent\"\n class=\"c-text-field__prefix\"\n :data-test=\"`${dataTest}-prefix`\"\n >\n <slot name=\"prepend-inner\" />\n </div>\n\n <input\n v-bind=\"fallthroughAttrs\"\n :id=\"idWithFallback\"\n ref=\"input\"\n class=\"c-text-field__input\"\n :class=\"{\n 'c-text-field__input--has-prefix': prefixSlotHasContent,\n 'c-text-field__input--has-suffix': suffixSlotHasContent,\n 'c-text-field__input--clearable': clearable && value,\n 'c-text-field__input--hideable': hideable,\n }\"\n :data-test=\"`${dataTest}-input`\"\n :aria-label=\"ariaLabel || label || undefined\"\n :aria-describedby=\"`${idWithFallback}-validation-message ${idWithFallback}-message`\"\n :aria-invalid=\"isValidationValid ? 'false' : 'true'\"\n :type=\"inputType\"\n :placeholder=\"placeholder\"\n :minlength=\"minlength\"\n :maxlength=\"maxlength\"\n :disabled=\"disabled\"\n :value=\"inputValue\"\n :inputmode=\"inputmode\"\n :required=\"required\"\n @keyup=\"$emit('keyup', $event)\"\n @keydown=\"$emit('keydown', $event)\"\n @keypress=\"$emit('keypress', $event)\"\n @click=\"$emit('click', $event)\"\n @input=\"onInput\"\n @change=\"onChange\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n />\n\n <CIconButton\n v-if=\"clearable && value\"\n :aria-label=\"$t('Clear')\"\n :data-test=\"`${dataTest}-clear`\"\n class=\"c-text-field__clear-btn c-text-field__suffix-btn\"\n type=\"button\"\n tertiary\n :icon=\"faXmark\"\n @click=\"clearInput\"\n />\n\n <CIconButton\n v-if=\"hideable\"\n :aria-label=\"hideToggleAriaLabel\"\n :data-test=\"`${dataTest}-hide-toggle`\"\n :data-hidden=\"inputHidden || undefined\"\n class=\"c-text-field__suffix-btn\"\n type=\"button\"\n tertiary\n :icon=\"inputHidden ? faEye : faEyeSlash\"\n @click=\"toggleHidden\"\n />\n\n <div\n v-if=\"suffixSlotHasContent\"\n class=\"c-text-field__suffix\"\n :data-test=\"`${dataTest}-suffix`\"\n >\n <slot name=\"append\" />\n </div>\n </div>\n\n <CValidationMessage\n :id=\"`${idWithFallback}-validation-message`\"\n class=\"c-text-field__validation-message\"\n :data-test=\"`${dataTest}-validation-message`\"\n :validation-message=\"errorMessage || validationMessage\"\n :hide=\"hideDetails\"\n >\n <template #append>\n <CFormFieldCounter\n v-if=\"counter\"\n :data-test=\"`${dataTest}-counter`\"\n :counter=\"counter\"\n :counter-value=\"counterValue !== null ? counterValue : undefined\"\n :value=\"inputValue\"\n />\n </template>\n </CValidationMessage>\n\n <div\n v-if=\"messageSlotHasContent\"\n :id=\"`${idWithFallback}-message`\"\n class=\"c-text-field__message\"\n :data-test=\"`${dataTest}-message`\"\n >\n <slot name=\"message\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { faEye, faEyeSlash, faXmark } from '@fortawesome/pro-regular-svg-icons';\nimport {\n type PropType,\n type Ref,\n type StyleValue,\n computed,\n defineComponent,\n onMounted,\n ref,\n toRefs,\n} from 'vue';\n\nimport CFormFieldCounter from '@propelinc/citrus-ui/src/components/CFormFieldCounter.vue';\nimport CIconButton from '@propelinc/citrus-ui/src/components/CIconButton.vue';\nimport CValidationMessage from '@propelinc/citrus-ui/src/components/CValidationMessage.vue';\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\nimport { useTranslation } from '@propelinc/citrus-ui/src/composables/i18n';\nimport { useId } from '@propelinc/citrus-ui/src/composables/id';\nimport { useSlotHasContent } from '@propelinc/citrus-ui/src/composables/slots';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\nimport { useValidations } from '@propelinc/citrus-ui/src/composables/validations';\n\n// Export the interface for what this component exposes\nexport interface CTextFieldExposed {\n input: Ref<HTMLInputElement | null>;\n focus: () => void;\n blur: () => void;\n startValidating: () => void;\n}\n\nexport default defineComponent({\n name: 'CTextField',\n components: { CFormFieldCounter, CIconButton, CValidationMessage },\n inheritAttrs: false,\n props: {\n id: { type: String as PropType<string | null>, default: null },\n label: { type: String as PropType<string | null>, default: null },\n ariaLabel: { type: String as PropType<string | null>, default: null },\n placeholder: { type: String, default: '' },\n type: {\n type: String as PropType<\n 'text' | 'password' | 'email' | 'tel' | 'url' | 'search' | 'number' | 'decimal' | 'numeric'\n >,\n default: 'text',\n },\n clearable: { type: Boolean, default: false },\n size: { type: String as PropType<'medium' | 'large'>, default: 'medium' },\n inputmode: {\n type: String as PropType<\n 'text' | 'search' | 'none' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal'\n >,\n default: undefined,\n },\n minlength: { type: [Number, String], default: undefined },\n maxlength: { type: [Number, String], default: undefined },\n disabled: { type: Boolean, default: false },\n hideable: { type: Boolean, default: false },\n hideLabel: { type: Boolean, default: false },\n hideDetails: { type: [Boolean, String] as PropType<boolean | 'auto'>, default: false },\n value: { type: String, default: '' },\n dataTest: { type: String, default: 'text-field' },\n counter: { type: Number as PropType<number | null>, default: null },\n counterValue: {\n type: [Number, Function] as PropType<number | (() => number | null)>,\n default: null,\n },\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n validateOnBlur: { type: Boolean, default: true },\n required: { type: Boolean, default: false },\n /**\n * Overrides the default validation message. If provided, this error message will always\n * be shown, regardless of any other failing validation rules.\n */\n errorMessage: { type: String, default: null },\n },\n emits: [\n 'keyup',\n 'keydown',\n 'keypress',\n 'input',\n 'focus',\n 'blur',\n 'change',\n 'click',\n 'click:hide',\n ],\n setup(props, { attrs, emit, slots, expose }) {\n const { t } = useTranslation();\n\n const isFocused = ref(false);\n const inputHidden = ref(true);\n const inputType = computed(() =>\n props.hideable && inputHidden.value ? 'password' : props.type\n );\n const hideToggleAriaLabel = computed(() => {\n return props.hideable && inputHidden.value ? t('Show input value') : t('Hide input value');\n });\n\n const { id, value, rules, required } = toRefs(props);\n\n const idWithFallback = useId(id);\n\n const inputValue = useInternalValue(value, {\n onChange: (newValue) => {\n emit('input', newValue);\n },\n });\n\n const input: Ref<HTMLInputElement | null> = ref(null);\n const {\n message: validationMessage,\n valid: isValidationValid,\n listeners: validationListeners,\n startValidating,\n } = useValidations({\n id: idWithFallback,\n value: inputValue,\n rules,\n required,\n validateOn: computed(() => (props.validateOnBlur ? 'blur' : 'input')),\n field: input,\n });\n\n const prefixSlotHasContent = useSlotHasContent('prepend-inner');\n const suffixSlotHasContent = useSlotHasContent('append');\n const messageSlotHasContent = useSlotHasContent('message');\n\n const toggleHidden = (): void => {\n inputHidden.value = !inputHidden.value;\n emit('click:hide', inputHidden.value);\n };\n\n const onInput = (event: Event): void => {\n const target = event.target as HTMLInputElement;\n if (target.value !== inputValue.value) {\n inputValue.value = target.value;\n validationListeners.input(event);\n }\n };\n\n const onChange = (event: Event): void => {\n validationListeners.change(event);\n const target = event.target as HTMLInputElement;\n emit('change', target.value);\n };\n\n const onFocus = (event: Event): void => {\n isFocused.value = true;\n emit('focus', event);\n };\n\n const onBlur = (event: Event): void => {\n isFocused.value = false;\n validationListeners.blur(event);\n emit('blur', event);\n };\n\n const clearInput = (): void => {\n emit('input', '');\n };\n\n const focus = (): void => {\n input.value?.focus();\n };\n\n const blur = (): void => {\n input.value?.blur();\n };\n\n onMounted(() => {\n if (!props.label && !slots.label && !props.ariaLabel) {\n console.error(\n 'Missing CTextField label. Please provide a label prop, an ariaLabel prop or pass a label via the label slot.'\n );\n }\n });\n\n const exposedAPI: CTextFieldExposed = { input, focus, blur, startValidating };\n expose(exposedAPI);\n\n const fallthroughAttrs = computed(() => {\n const { class: _, style: __, ...rest } = attrs;\n return rest;\n });\n\n // Need to compute these to cast the type to avoid type errors\n const rootStyles = computed(() => attrs.style as StyleValue);\n\n return {\n faXmark,\n faEye,\n faEyeSlash,\n\n fallthroughAttrs,\n hideToggleAriaLabel,\n idWithFallback,\n input,\n inputHidden,\n inputType,\n inputValue,\n isFocused,\n messageSlotHasContent,\n prefixSlotHasContent,\n rootStyles,\n suffixSlotHasContent,\n isValidationValid,\n validationMessage,\n\n clearInput,\n onBlur,\n onChange,\n onFocus,\n onInput,\n toggleHidden,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/utils/a11y';\n@import '@propelinc/citrus-ui/src/styles/form-fields';\n\n.c-text-field__label {\n @include body-emphasized;\n\n display: inline-block;\n margin-bottom: 8px;\n transition: color $citrus-field-transition-duration ease;\n}\n\n.c-text-field__container {\n align-items: center;\n background-color: $color-background;\n border: $border-width solid $color-gray-200;\n border-radius: $border-radius-next;\n display: flex;\n transition: border-color $citrus-field-transition-duration ease;\n}\n\n.c-text-field--focused .c-text-field__container,\n.c-text-field--invalid .c-text-field__container {\n border-color: $color-black;\n}\n\n.c-text-field--invalid .c-text-field__container {\n color: $color-status-error;\n}\n\n.c-text-field--hide-label .c-text-field__label {\n @include sr-only;\n}\n\n.c-text-field--disabled .c-text-field__label {\n color: $color-text-disabled;\n}\n\n.c-text-field--disabled .c-text-field__container {\n background-color: $color-gray-100;\n color: $color-text-disabled;\n}\n\n.c-text-field__input {\n background-color: transparent;\n border: none;\n border-radius: $border-radius-next;\n flex: 1 1 0%;\n outline: none;\n width: 100%;\n\n &--has-prefix {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n }\n\n &--has-suffix {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n }\n}\n\n.c-text-field__suffix-btn {\n margin-right: 4px;\n}\n\n.c-text-field__clear-btn {\n background: none;\n border: none;\n cursor: pointer;\n font-size: 1rem;\n margin-left: 0.5rem;\n}\n\n/* Size Variants */\n.c-text-field--medium .c-text-field__input {\n padding: 12px 16px;\n\n &--clearable,\n &--hideable {\n padding-right: 0;\n }\n\n &--has-suffix {\n padding-right: 8px;\n }\n}\n\n.c-text-field--large .c-text-field__input {\n padding: 24px;\n\n &--clearable,\n &--hideable {\n padding-right: 0;\n }\n\n &--has-suffix {\n padding-right: 8px;\n }\n}\n\n.c-text-field__prefix {\n flex: 0 0 auto;\n margin-left: 16px;\n}\n\n.c-text-field__suffix {\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n gap: 12px;\n margin-right: 16px;\n}\n\n.c-text-field__validation-message {\n margin-top: 4px;\n}\n\n.c-text-field__message {\n @include caption;\n\n color: $color-gray-500;\n margin-bottom: 16px;\n}\n</style>\n","import { Mask, MaskInput, type MaskInputOptions, type MaskOptions, type MaskaDetail } from 'maska';\nimport { type Ref, computed, watch } from 'vue';\n\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\n\nconst toNumber = (value: number | string | null): number | null => {\n if (value === null || value === '') {\n return null;\n } else if (typeof value === 'number') {\n return value;\n } else {\n const parsed = parseInt(value, 10);\n return isNaN(parsed) ? null : parsed;\n }\n};\n\nexport function useInputMask(\n /** Element to be masked */\n input: Ref<HTMLInputElement | null>,\n /** Value passed into the input */\n value: Ref<string>,\n /**\n * Options for the mask.\n * @see https://beholdr.github.io/maska/v2/#/?id=mask-options\n */\n options: Ref<MaskInputOptions>\n): {\n mask: Ref<Mask>;\n maskedValue: Ref<string>;\n unmaskedValue: Ref<string>;\n} {\n const internalValue = useInternalValue(value);\n\n const maskOptions = computed<MaskInputOptions>((): MaskInputOptions => {\n const onMaska = options.value.onMaska;\n const onMaskaArray = Array.isArray(onMaska) ? onMaska : onMaska ? [onMaska] : [];\n return {\n ...options.value,\n onMaska: [\n (detail: MaskaDetail): void => {\n internalValue.value = detail.unmasked;\n },\n ...onMaskaArray,\n ],\n };\n });\n\n let maskInput: MaskInput | null = null;\n watch(input, (newInput) => {\n if (newInput) {\n maskInput = new MaskInput(newInput, maskOptions.value);\n } else {\n maskInput?.destroy();\n maskInput = null;\n }\n });\n\n const mask = computed(() => new Mask(maskOptions.value));\n const maskedValue = computed(() => {\n return mask.value ? mask.value.masked(internalValue.value) : value.value;\n });\n\n return {\n mask,\n maskedValue,\n unmaskedValue: internalValue,\n };\n}\n\nexport function useMaskedMinLength(\n minlength: Ref<number | string | null>,\n value: Ref<string>,\n options: Ref<MaskOptions>\n): Ref<number | null> {\n const maskTokens = computed(() => {\n // NOTE(mohan): '#', '@', '*' are the default tokens used by maska.\n return ['#', '@', '*', ...Object.keys(options.value.tokens ?? {})];\n });\n\n // NOTE(mohan): We want `minlength` to only include token characters\n // (e.g. '#' or '@') and ignore symbols like '-'. So, we iterate through\n // the mask to see how many characters are required to hit minlength tokens.\n const findMaskedMinLength = (mask: string, minlength: number): number => {\n const maskArray = mask.split('');\n const index = maskArray.findIndex((_, index) => {\n const tokensInSlice = maskArray\n .slice(0, index + 1)\n .filter((char) => maskTokens.value.includes(char));\n return tokensInSlice.length === minlength;\n });\n\n if (index === -1) {\n return mask.length;\n } else {\n // Convert index to length\n return index + 1;\n }\n };\n\n const maskedMinLength = computed(() => {\n const mask = options.value.mask;\n const minlengthValue = toNumber(minlength.value);\n\n if (!minlengthValue) {\n return null;\n } else if (!mask) {\n return minlengthValue;\n } else {\n if (typeof mask === 'function') {\n return findMaskedMinLength(mask(value.value), minlengthValue);\n } else if (typeof mask === 'string') {\n return findMaskedMinLength(mask, minlengthValue);\n } else if (Array.isArray(mask)) {\n return Math.min(...mask.map((m) => findMaskedMinLength(m, minlengthValue!)));\n } else {\n return minlengthValue;\n }\n }\n });\n\n return maskedMinLength;\n}\n\nexport function useMaskedMaxLength(\n maxlength: Ref<number | string | null>,\n options: Ref<MaskOptions>\n): Ref<number | null> {\n return computed(() => {\n const mask = options.value.mask;\n const maxlengthValue = toNumber(maxlength.value);\n if (!maxlengthValue) {\n return null;\n } else if (!mask) {\n return maxlengthValue;\n } else {\n return Math.max(maxlengthValue, mask.length);\n }\n });\n}\n","<template>\n <CTextField\n v-bind=\"$attrs\"\n :id=\"id\"\n ref=\"textField\"\n :data-test=\"dataTest\"\n :data-mask=\"mask\"\n :value=\"maskedValue\"\n :label=\"label\"\n :placeholder=\"placeholder\"\n :minlength=\"maskedMinLength !== null ? maskedMinLength : undefined\"\n :maxlength=\"maskedMaxLength !== null ? maskedMaxLength : undefined\"\n :rules=\"unmaskRules ? unmaskedRules : rules\"\n :counter=\"counter\"\n :counter-value=\"counterValue\"\n @keyup=\"$emit('keyup', $event)\"\n @keydown=\"$emit('keydown', $event)\"\n @keypress=\"$emit('keypress', $event)\"\n @blur=\"$emit('blur', $event)\"\n @focus=\"$emit('focus', $event)\"\n @change=\"$emit('change', $event)\"\n >\n <template #label>\n <slot name=\"label\" />\n </template>\n <template #prepend-inner>\n <slot name=\"prepend-inner\" />\n </template>\n <template #append>\n <slot name=\"append\" />\n </template>\n <template #message>\n <slot name=\"message\" />\n </template>\n </CTextField>\n</template>\n\n<script lang=\"ts\">\nimport type { MaskOptions, MaskTokens, MaskaDetail } from 'maska';\nimport { type PropType, computed, defineComponent, ref, toRefs } from 'vue';\n\nimport CTextField from '@propelinc/citrus-ui/src/components/CTextField.vue';\nimport {\n useInputMask,\n useMaskedMaxLength,\n useMaskedMinLength,\n} from '@propelinc/citrus-ui/src/composables/input-mask';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\n\nexport default defineComponent({\n name: 'CMaskedTextField',\n components: { CTextField },\n props: {\n counter: { type: Number as PropType<number | null>, default: null },\n dataTest: { type: String, default: 'masked-text-field' },\n id: { type: String, default: undefined },\n label: { type: String as PropType<string | null>, default: null },\n mask: {\n type: [String, Array, Function] as PropType<MaskOptions['mask'] | null>,\n required: true,\n },\n minlength: { type: [Number, String], default: null },\n maxlength: { type: [Number, String], default: null },\n placeholder: { type: String, default: undefined },\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n tokens: { type: Object as PropType<MaskTokens | null>, default: null },\n unmaskRules: { type: Boolean, default: true },\n value: { type: String, default: '' },\n },\n emits: ['keyup', 'keydown', 'keypress', 'input', 'focus', 'blur', 'change', 'input:masked'],\n setup(props, { emit, expose }) {\n const { minlength, maxlength, value } = toRefs(props);\n\n const textField = ref<typeof CTextField | null>(null);\n const input = computed(() => textField.value?.input);\n const maskOptions = computed<MaskOptions>(() => {\n return {\n mask: props.mask,\n tokens: {\n // NOTE (ej): For the EBT Card Number we accept a mask 'N' from the server\n // to hide all but the last 4 digits. e.g. XXXXXXXXXXXXXXX2114\n N: { pattern: /[0-9X]/ },\n ...props.tokens,\n },\n onMaska: (detail: MaskaDetail): void => {\n emit('input', detail.unmasked);\n emit('input:masked', detail.masked);\n },\n };\n });\n\n const { maskedValue, mask: inputMask, unmaskedValue } = useInputMask(input, value, maskOptions);\n const maskedMinLength = useMaskedMinLength(minlength, value, maskOptions);\n const maskedMaxLength = useMaskedMaxLength(maxlength, maskOptions);\n const counterValue = computed<number>(() => unmaskedValue.value.length);\n\n const unmaskedRules = computed<Rules<string>>(() => {\n return props.rules.map((rule) => {\n return (value): string | boolean => {\n const unmaskedValue = inputMask.value?.unmasked(value) ?? value;\n return rule(unmaskedValue);\n };\n });\n });\n\n expose({ input });\n\n return {\n counterValue,\n maskedMinLength,\n maskedMaxLength,\n maskedValue,\n textField,\n unmaskedRules,\n };\n },\n});\n</script>\n","export function parseDateFromString(dateString: string): Date | null {\n const date = new Date(dateString);\n if (isNaN(date.getTime())) {\n return null;\n }\n\n return date;\n}\n\nexport function calculateAge(dob: Date): number {\n // https://stackoverflow.com/a/7091965/814589\n const today = new Date();\n let age = today.getFullYear() - dob.getFullYear();\n const monthDiff = today.getMonth() - dob.getMonth();\n if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < dob.getDate())) {\n age--;\n }\n return age;\n}\n","import { calculateAge, parseDateFromString } from './dates';\n\nexport type validator = (v: string) => boolean;\nexport type rule = (v: string) => boolean | string;\n\n// https://gist.github.com/ShirtlessKirk/2134376\nconst makeLuhnChecker = (arr: number[]): ((s: string) => boolean) => {\n return (ccNum: string): boolean => {\n let len = ccNum.length;\n let bit = 1;\n let sum = 0;\n let val = 0;\n while (len) {\n val = parseInt(ccNum.charAt(--len), 10);\n bit ^= 1;\n sum += bit ? arr[val] : val;\n }\n return sum > 0 && sum % 10 === 0;\n };\n};\n\nexport const isLuhnValid = makeLuhnChecker([0, 2, 4, 6, 8, 1, 3, 5, 7, 9]);\n\nexport function createMinLengthValidator(minLength: number): validator {\n return (value: string): boolean => {\n return value.length >= minLength;\n };\n}\n\nexport function ruleFromValidator(validator: validator, errorMessage: string): rule {\n return (v): string | boolean => (v && validator(v) ? true : errorMessage);\n}\n\nexport function minLengthRule(minLength: number, errorMessage: string): rule {\n return ruleFromValidator(createMinLengthValidator(minLength), errorMessage);\n}\n\nexport function isValidDateInAgeRange(\n minAge?: number | null | undefined,\n maxAge?: number | null | undefined\n): rule {\n return (v: string): boolean | string => {\n const dobDate = parseDateFromString(v);\n const age = dobDate ? calculateAge(dobDate) : null;\n const maxAgeTruthy = maxAge !== null && maxAge !== undefined;\n const minAgeTruthy = minAge !== null && minAge !== undefined;\n if (age === null || (maxAgeTruthy && age > maxAge) || (minAgeTruthy && age < minAge)) {\n return false;\n }\n\n return true;\n };\n}\n\n// Uses the same logic that is enforced by providers-identity.\nexport function isValidEmail(email: string): boolean {\n return /^[A-Z0-9]+([-.+_]+[A-Z0-9]+)*@([A-Z0-9]([A-Z0-9-]{0,61}[A-Z0-9])?\\.)+([A-Z]{2,6}|[A-Z0-9-]{2,})$/i.test(\n email\n );\n}\n","<template>\n <CMaskedTextField\n v-bind=\"$attrs\"\n :id=\"id\"\n :data-test=\"dataTest\"\n :value=\"formattedDate\"\n inputmode=\"numeric\"\n name=\"dob\"\n :label=\"computedLabel\"\n :placeholder=\"computedPlaceholder\"\n :mask=\"mask\"\n :minlength=\"dateLength\"\n :maxlength=\"dateLength\"\n :unmask-rules=\"false\"\n :rules=\"computedRules\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n @blur=\"$emit('blur', $event)\"\n @focus=\"$emit('focus', $event)\"\n @input=\"emitIsoDate($event)\"\n >\n <template #label>\n <slot name=\"label\" />\n </template>\n <template #message>\n <slot name=\"message\" />\n </template>\n </CMaskedTextField>\n</template>\n\n<script lang=\"ts\">\nimport dayjs from 'dayjs';\nimport { computed, defineComponent, ref, watch } from 'vue';\nimport type { PropType } from 'vue';\n\nimport CMaskedTextField from '@propelinc/citrus-ui/src/components/CMaskedTextField.vue';\nimport { useTranslation } from '@propelinc/citrus-ui/src/composables/i18n';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\nimport {\n isValidDateInAgeRange,\n minLengthRule as createMinLengthRule,\n} from '@propelinc/shared-utils';\n\nexport default defineComponent({\n name: 'CDobField',\n components: { CMaskedTextField },\n props: {\n /** A custom data-test attribute for the input. */\n dataTest: { type: String, default: 'dob-field' },\n /** A unique id for the input. */\n id: { type: String as PropType<string | undefined>, default: undefined },\n /** The input's label text. */\n label: { type: String as PropType<string | null>, default: null },\n /** The input's placeholder. */\n placeholder: { type: String, default: '' },\n /** Additional validation rules. */\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n /** The value of the input, must have the format YYYY-MM-DD or YYYY. */\n value: { type: String, default: '' },\n /** Toggles the field's year only variant. Changes default label, placeholder, mask and validation\n * behavior */\n yearOnly: { type: Boolean, default: false },\n },\n emits: ['input', 'blur', 'focus', 'change'],\n setup(props, { emit }) {\n const { t } = useTranslation();\n\n const parseDate = (value: string): string => {\n if (props.yearOnly) {\n return value;\n }\n\n if (!value) {\n return '';\n }\n\n const [year, month, day] = value.split('-');\n if (!year || !month || !day) {\n console.warn(`Invalid date format. Expected YYYY-MM-DD, received: ${value}.`);\n return '';\n }\n\n return `${month}${day}${year}`;\n };\n\n const formattedDate = ref<string>(parseDate(props.value));\n\n let lastEmittedValue = props.value;\n\n watch(\n () => props.value,\n (newValue: string) => {\n if (newValue !== lastEmittedValue) {\n formattedDate.value = props.yearOnly ? newValue : parseDate(newValue);\n }\n }\n );\n\n const emitIsoDate = (value: string): void => {\n if (props.yearOnly) {\n emit('input', value);\n } else {\n const month = value.substring(0, 2);\n const day = value.substring(2, 4);\n const year = value.substring(4, 8);\n lastEmittedValue = year && month && day ? `${year}-${month}-${day}` : '';\n emit('input', lastEmittedValue);\n }\n };\n\n const defaultLabel = computed(() => {\n return props.yearOnly ? t('Year of birth') : t('Date of birth');\n });\n\n const defaultPlaceholder = computed(() => {\n return props.yearOnly ? t('YYYY') : t('MM/DD/YYYY');\n });\n\n const validationMessage = computed(() => {\n const inputLabel = props.yearOnly ? t('year of birth') : t('date of birth');\n return t('Please enter a valid {inputLabel}', { inputLabel });\n });\n\n const defaultRules = computed(() => {\n const minLengthRule = createMinLengthRule(props.yearOnly ? 4 : 10, validationMessage.value);\n const maxAgeRule = (v: string): boolean | string =>\n isValidDateInAgeRange(0, 125)(v) || validationMessage.value;\n const validDateRule = (v: string): boolean | string =>\n dayjs(v, 'MM/DD/YYYY', true).isValid() || validationMessage.value;\n\n return [minLengthRule, maxAgeRule, !props.yearOnly ? validDateRule : undefined].filter(\n Boolean\n ) as Rules<string>;\n });\n\n const computedLabel = computed(() => props.label || defaultLabel.value);\n const computedPlaceholder = computed(() => props.placeholder || defaultPlaceholder.value);\n const computedRules = computed(() => [...defaultRules.value, ...props.rules]);\n const dateLength = computed(() => (props.yearOnly ? 4 : 8));\n const mask = computed(() => (props.yearOnly ? '####' : '##/##/####'));\n\n return {\n computedLabel,\n computedPlaceholder,\n computedRules,\n emitIsoDate,\n formattedDate,\n dateLength,\n mask,\n };\n },\n});\n</script>\n","<template>\n <div\n class=\"c-select\"\n :class=\"{\n 'c-select--disabled': disabled,\n 'c-select--invalid': !isValidationValid,\n }\"\n :data-test=\"dataTest\"\n >\n <label\n :for=\"id\"\n class=\"c-select__label\"\n :class=\"{ 'c-select__label--hidden': hideLabel }\"\n :data-test=\"`${dataTest}-label`\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </label>\n <div class=\"c-select__input-container\">\n <select\n :id=\"id\"\n ref=\"select\"\n class=\"c-select__input\"\n :class=\"{\n 'c-select__input--has-value': inputValue && !disabled,\n 'c-select__input--invalid': !isValidationValid,\n 'c-select__input--loading': loading,\n 'c-select__input--disabled': disabled,\n }\"\n :aria-label=\"ariaLabel || label\"\n :data-test=\"`${dataTest}-select`\"\n :value=\"inputValue\"\n :disabled=\"disabled\"\n :required=\"required\"\n @input=\"onInput\"\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @keydown=\"$emit('keydown', $event)\"\n v-on=\"validationListeners\"\n >\n <option v-if=\"placeholder\" value disabled selected>{{ placeholder }}</option>\n <option\n v-for=\"item in items\"\n :key=\"item.value\"\n :value=\"item.value\"\n :disabled=\"item.disabled\"\n data-test=\"option\"\n >\n {{ item.label }}\n </option>\n </select>\n <CLoader v-if=\"loading\" small class=\"c-select__icon\" data-test=\"select-icon-loading\" />\n <FontAwesomeIcon v-else class=\"c-select__icon\" :icon=\"faChevronDown\" />\n </div>\n <CValidationMessage\n class=\"c-select__message\"\n :data-test=\"`${dataTest}-message`\"\n :validation-message=\"validationMessage\"\n :hide=\"hideDetails\"\n >\n <slot name=\"message\" />\n </CValidationMessage>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { faChevronDown } from '@fortawesome/pro-regular-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport { type PropType, defineComponent, ref, toRefs } from 'vue';\n\nimport CLoader from '@propelinc/citrus-ui/src/components/CLoader.vue';\nimport CValidationMessage from '@propelinc/citrus-ui/src/components/CValidationMessage.vue';\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\nimport { useId } from '@propelinc/citrus-ui/src/composables/id';\nimport { useValidations } from '@propelinc/citrus-ui/src/composables/validations';\n\nexport default defineComponent({\n name: 'CSelect',\n components: { CLoader, CValidationMessage, FontAwesomeIcon },\n props: {\n /** The select's label, both visual and screenreader-only */\n label: { type: String, default: undefined },\n /** Overrides label for screenreader-only */\n ariaLabel: { type: String, default: undefined },\n /** Set the select's placeholder text */\n placeholder: { type: String, default: undefined },\n /** Assigns the select input's id */\n id: { type: String, default: undefined },\n /** List of options like `{ label: 'Yes', value: 'yes' }` */\n items: {\n type: Array as PropType<{ label: string; value: string; disabled?: boolean }[]>,\n default: () => [],\n },\n /** Controls whether the select is disabled */\n disabled: { type: Boolean, default: false },\n /** Controls the value of the select */\n value: { type: String, default: '' },\n /** Prefix for test selectors */\n dataTest: { type: String, default: 'select' },\n /** Hides the label and instead labels the field with `aria-label` */\n hideLabel: { type: Boolean, default: false },\n /**\n * Hides the validation message area. Defaults to `false` (show message area even\n * when valid), so validations transition in gracefully.\n *\n * If set to 'auto', the validation message area will only display if there is a message.\n */\n hideDetails: { type: [Boolean, String] as PropType<boolean | 'auto'>, default: false },\n /** Controls whether the select is loading */\n loading: { type: Boolean, default: false },\n /**\n * An array of functions that either return either true / false or a string\n * containing an error message. The component passes the input value as an\n * argument. The input field will enter an error state if a function does\n * not return true.\n * */\n rules: { type: Array as PropType<((value: string) => string | boolean)[]>, default: () => [] },\n /** If true, the select will be required */\n required: { type: Boolean, default: false },\n },\n emits: ['input', 'focus', 'blur', 'keydown'],\n setup(props, { emit, expose }) {\n const { id, value, rules, required } = toRefs(props);\n const idWithFallback = useId(id);\n const inputValue = useInternalValue(value, {\n onChange: (newValue) => emit('input', newValue),\n });\n const select = ref<HTMLSelectElement | null>(null);\n const {\n message: validationMessage,\n valid: isValidationValid,\n listeners: validationListeners,\n startValidating,\n clearValidations,\n } = useValidations({\n id: idWithFallback,\n field: select,\n value: inputValue,\n rules,\n required,\n validateOn: 'blur',\n });\n\n function onInput(event: Event): void {\n const target = event.target as HTMLSelectElement;\n inputValue.value = target.value;\n }\n\n expose({ startValidating, clearValidations });\n\n return {\n inputValue,\n validationListeners,\n validationMessage,\n isValidationValid,\n select,\n faChevronDown,\n\n onInput,\n };\n },\n});\n</script>\n\n<style scoped lang=\"scss\">\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/form-fields';\n\n.c-select {\n display: flex;\n flex-direction: column;\n\n &--disabled {\n color: $color-text-disabled;\n }\n}\n\n.c-select__label {\n @include body-emphasized;\n\n margin-bottom: 8px;\n transition: color $sl-field-transition-duration ease;\n\n &--hidden {\n @include sr-only;\n }\n}\n\n.c-select__input-container {\n align-items: center;\n display: flex;\n position: relative;\n}\n\n.c-select__icon {\n pointer-events: none;\n position: absolute;\n right: 16px;\n}\n\n.c-select__input {\n appearance: none;\n background-color: $color-white;\n border: $border-width solid $color-border;\n border-radius: $border-radius-next;\n color: $color-placeholder-text;\n cursor: pointer;\n flex-grow: 1;\n letter-spacing: $letter-spacing-extend-small;\n max-width: 100%;\n min-height: $button-size-large;\n outline: 0.5px solid transparent;\n padding: 0 36px 0 16px;\n text-overflow: ellipsis;\n transition:\n border-color ease 0.2s,\n outline-color ease 0.2s;\n\n &:focus {\n border-color: $color-black;\n }\n\n &--has-value {\n color: $color-black;\n }\n\n &--invalid {\n border-color: $color-black;\n outline-color: $color-black;\n }\n\n &[disabled] {\n background-color: $color-gray-100;\n }\n}\n\n.c-select__message {\n margin-top: 4px;\n}\n</style>\n","<template>\n <div :id=\"id\" class=\"c-dob-select\" :data-test=\"dataTest\">\n <slot name=\"label\">\n <label\n v-if=\"!hideLabel\"\n class=\"c-dob-select__label\"\n :for=\"`${id}-month`\"\n :data-test=\"`${dataTest}-label`\"\n >{{ computedLabel }}</label\n >\n </slot>\n <div class=\"c-dob-select__container\">\n <c-select\n :id=\"`${id}-month`\"\n class=\"c-dob-select__field\"\n hide-label\n hide-details\n :value=\"localMonth\"\n :data-test=\"`${dataTest}-month`\"\n :aria-label=\"$t('Month')\"\n :placeholder=\"$t('Month')\"\n :items=\"monthOptions\"\n :rules=\"monthRules\"\n :required=\"required\"\n :disabled=\"disabled\"\n @input=\"(localMonth = $event) && emitDate()\"\n @focus=\"$emit('focus')\"\n @blur=\"$emit('blur')\"\n />\n <c-select\n :id=\"`${id}-day`\"\n class=\"c-dob-select__field\"\n hide-label\n hide-details\n :value=\"localDay\"\n :aria-label=\"$t('Day')\"\n :placeholder=\"$t('Day')\"\n :data-test=\"`${dataTest}-day`\"\n :items=\"dayOptions\"\n :rules=\"dayRules\"\n :required=\"required\"\n :disabled=\"disabled\"\n @input=\"(localDay = $event) && emitDate()\"\n @focus=\"$emit('focus')\"\n @blur=\"$emit('blur')\"\n />\n <c-select\n :id=\"`${id}-year`\"\n class=\"c-dob-select__field\"\n hide-label\n hide-details\n :value=\"localYear\"\n :aria-label=\"$t('Year')\"\n :placeholder=\"$t('Year')\"\n :data-test=\"`${dataTest}-year`\"\n :items=\"yearOptions\"\n :rules=\"yearRules\"\n :required=\"required\"\n :disabled=\"disabled\"\n @input=\"(localYear = $event) && emitDate()\"\n @focus=\"$emit('focus')\"\n @blur=\"$emit('blur')\"\n />\n </div>\n <CValidationMessage\n class=\"c-dob-select__messages\"\n :data-test=\"`${dataTest}-messages`\"\n :validation-message=\"message\"\n :hide=\"hideDetails\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport dayjs from 'dayjs';\nimport { type PropType, computed, defineComponent, ref, watch } from 'vue';\n\nimport CSelect from '@propelinc/citrus-ui/src/components/CSelect.vue';\nimport CValidationMessage from '@propelinc/citrus-ui/src/components/CValidationMessage.vue';\nimport { useTranslation } from '@propelinc/citrus-ui/src/composables/i18n';\nimport {\n type Rules,\n useFormValidationSupport,\n} from '@propelinc/citrus-ui/src/composables/validations';\n\nexport default defineComponent({\n name: 'CDobSelect',\n components: { CSelect, CValidationMessage },\n props: {\n dataTest: { type: String, default: 'dob-select' },\n id: { type: String, default: undefined },\n label: { type: String as PropType<string | null>, default: null },\n required: { type: Boolean, default: false },\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n hideLabel: { type: Boolean, default: false },\n hideDetails: { type: Boolean, default: false },\n value: { type: String, default: '' },\n disabled: { type: Boolean, default: false },\n },\n emits: ['input', 'focus', 'blur'],\n setup(props, { emit }) {\n const { t } = useTranslation();\n\n const computedLabel = computed(() => props.label ?? t('Date of birth'));\n\n const localMonth = ref('');\n const localDay = ref('');\n const localYear = ref('');\n\n const hasError = ref(props.required && props.value === '');\n const messages = ref<string[]>([]);\n\n const localValue = computed(() => {\n if (localDay.value && localMonth.value && localYear.value) {\n return `${localYear.value}-${localMonth.value}-${localDay.value}`;\n }\n return '';\n });\n\n const monthRules = computed(() => {\n if (!props.required && !localMonth.value) {\n return [];\n }\n return [(): boolean => localMonth.value !== ''];\n });\n const dayRules = computed(() => {\n if (!props.required && !localDay.value) {\n return [];\n }\n return [(): boolean => localDay.value !== ''];\n });\n const yearRules = computed(() => {\n if (!props.required && !localYear.value) {\n return [];\n }\n return [(): boolean => localYear.value !== ''];\n });\n const message = computed(() => messages.value[0] ?? '');\n\n const monthOptions = Array.from({ length: 12 }, (_, i) => ({\n value: (i + 1).toString().padStart(2, '0'),\n label: dayjs().set('month', i).format('MMM'),\n }));\n\n const dayOptions = computed(() => {\n const year = Number(localYear.value) || 2000;\n const month = Number(localMonth.value) - 1 || 0;\n const daysInMonth = dayjs().year(year).month(month).daysInMonth();\n return Array.from({ length: daysInMonth }, (_, i) => {\n const day = (i + 1).toString();\n return { value: day.padStart(2, '0'), label: day };\n });\n });\n\n const currentYear = dayjs().year();\n const yearOptions = Array.from({ length: 120 }, (_, age) => {\n const year = (currentYear - age).toString();\n return { value: year, label: year };\n });\n\n const validationMessage = t('Please enter a valid {inputLabel}', {\n inputLabel: t('date of birth'),\n });\n\n const localRules = computed(() => {\n if (!props.required && !localValue.value) {\n return [];\n }\n const validDateRule = (v: string): boolean | string =>\n dayjs(v, 'YYYY-MM-DD', true).isValid() || validationMessage;\n return [validDateRule, ...props.rules];\n });\n\n const valid = computed(() => !hasError.value);\n\n const validate = (): boolean => {\n messages.value = localRules.value\n .map((validation) => {\n const validationResult = validation(localValue.value);\n return typeof validationResult === 'string' ? validationResult : '';\n })\n .filter((message) => message !== '');\n\n hasError.value = (props.required && localValue.value === '') || messages.value.length > 0;\n return !hasError.value;\n };\n\n const emitDate = (): void => {\n if (!localValue.value) {\n return;\n }\n\n if (!validate()) {\n // NOTE(ram): An invalid date can only be caused by the day being invalid.\n localDay.value = '';\n emit('input', '');\n return;\n }\n\n emit('input', localValue.value);\n };\n\n watch(\n () => props.value,\n (value) => {\n if (!value || value === localValue.value) {\n return;\n }\n\n const date = dayjs(value, 'YYYY-MM-DD', true);\n if (!date.isValid()) {\n console.error('Invalid date in CDobSelect', value);\n return;\n }\n\n localMonth.value = date.format('MM');\n localDay.value = date.format('DD');\n localYear.value = date.format('YYYY');\n },\n { immediate: true }\n );\n\n useFormValidationSupport({\n id: props.id,\n valid,\n validate,\n });\n\n return {\n localDay,\n localMonth,\n localYear,\n dayRules,\n monthRules,\n yearRules,\n dayOptions,\n monthOptions,\n yearOptions,\n\n computedLabel,\n hasError,\n messages,\n localValue,\n message,\n\n emitDate,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-dob-select__label {\n @include body-emphasized;\n\n display: inline-block;\n margin-bottom: 4px;\n}\n\n.c-dob-select__container {\n display: flex;\n gap: 12px;\n}\n\n.c-dob-select__field {\n flex: auto;\n}\n\n.c-dob-select__messages {\n margin-top: 4px;\n}\n</style>\n","<template>\n <CTextField\n v-bind=\"$attrs\"\n :id=\"id\"\n :value=\"value\"\n :data-test=\"dataTest\"\n type=\"email\"\n name=\"email\"\n :rules=\"[...defaultRules, ...rules]\"\n :label=\"label || $t('Email')\"\n :placeholder=\"placeholder || $t('example@email.com')\"\n @input=\"$emit('input', $event)\"\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @change=\"$emit('change', $event)\"\n >\n <template #label>\n <slot name=\"label\" />\n </template>\n <template #message>\n <slot name=\"message\" />\n </template>\n </CTextField>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, defineComponent } from 'vue';\n\nimport CTextField from '@propelinc/citrus-ui/src/components/CTextField.vue';\nimport { useTranslation } from '@propelinc/citrus-ui/src/composables/i18n';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\nimport { isValidEmail } from '@propelinc/shared-utils';\n\nexport default defineComponent({\n name: 'CEmailField',\n components: { CTextField },\n props: {\n dataTest: { type: String, default: 'email-field' },\n id: { type: String, default: undefined },\n label: { type: String as PropType<string | null>, default: null },\n placeholder: { type: String as PropType<string | null>, default: null },\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n value: { type: String, default: '' },\n },\n emits: ['input', 'focus', 'blur', 'change'],\n setup() {\n const { t } = useTranslation();\n\n const defaultRules = [\n (v: string): string | boolean =>\n !v || isValidEmail(v)\n ? true\n : t('Please enter a valid {inputLabel}', { inputLabel: t('email') }),\n ];\n\n return {\n defaultRules,\n };\n },\n});\n</script>\n","import type { InjectionKey, Ref } from 'vue';\n\nexport const ANIMATIONS_DISABLED = Symbol('animations-disabled') as InjectionKey<Ref<boolean>>;\n","<template>\n <div\n data-test=\"expand-transition\"\n class=\"c-expand-transition\"\n :class=\"{ 'c-expand-transition--disabled': isDisabled }\"\n :style=\"{ height: isDisabled ? undefined : height }\"\n >\n <div ref=\"content\" class=\"c-expand-transition__content\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, inject, ref } from 'vue';\n\nimport { useResizeObserver } from '@propelinc/citrus-ui/src/composables/elements';\nimport { ANIMATIONS_DISABLED } from '@propelinc/citrus-ui/src/services/injections/animations';\n\nexport default defineComponent({\n name: 'CExpandTransition',\n props: { disabled: { type: Boolean, default: false } },\n setup(props) {\n const injectedDisabled = inject(ANIMATIONS_DISABLED, ref(false));\n const isDisabled = computed(() => props.disabled || injectedDisabled.value);\n const content = ref<HTMLElement | null>(null);\n const height = ref<string>('auto');\n\n useResizeObserver(content, ([entry]) => {\n height.value = `${entry.contentRect.height}px`;\n });\n\n return { content, height, isDisabled };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-expand-transition {\n overflow: hidden;\n transition: height 300ms ease;\n}\n\n.c-expand-transition__content {\n // Create a new block formatting context that includes outer margins of children so\n // CExpandTransition measures the height correctly.\n overflow: hidden;\n}\n\n.c-expand-transition--disabled {\n transition: none;\n}\n</style>\n","<template>\n <label class=\"c-file-input\" :class=\"{ 'c-file-input--disabled': disabled }\">\n <p :id=\"`${idWithFallback}-label`\" class=\"c-file-input__label\" :data-test=\"`${dataTest}-label`\">\n <slot name=\"label\">\n {{ label }}\n </slot>\n </p>\n <span :for=\"idWithFallback\" class=\"c-file-input__prompt\" :data-test=\"`${dataTest}-prompt`\">\n <slot name=\"prompt\">\n {{ prompt }}\n </slot>\n </span>\n <input\n :id=\"idWithFallback\"\n :data-test=\"`${dataTest}-input`\"\n class=\"c-file-input__input\"\n type=\"file\"\n :aria-describedby=\"`${idWithFallback}-files`\"\n :multiple=\"multiple\"\n :disabled=\"disabled\"\n :required=\"required\"\n @change=\"onFileChange\"\n />\n\n <div v-if=\"hasValue\" :id=\"`${idWithFallback}-files`\" class=\"c-file-input__files\">\n <span v-if=\"!Array.isArray(inputValue) && inputValue\" class=\"c-file-input__file\">{{\n inputValue.name\n }}</span>\n <template v-if=\"Array.isArray(inputValue)\">\n <span v-for=\"file in inputValue\" :key=\"file.name\" class=\"c-file-input__file\">\n {{ file.name }}\n </span></template\n >\n </div>\n </label>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, computed, defineComponent, toRefs } from 'vue';\n\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\nimport { useId } from '@propelinc/citrus-ui/src/composables/id';\n\nexport default defineComponent({\n name: 'CFileInput',\n props: {\n /** The input's label, both visual and screenreader-only */\n label: { type: String, required: true },\n /** Placholder text to display before a user has selected any files */\n prompt: { type: String, required: true },\n /** The input's value. Either one file or an array of files */\n value: { type: [Array, Object, null] as PropType<File[] | File | null>, default: null },\n /** A unique id for the input */\n id: { type: String, required: true },\n /** Allow the user to upload multiple files */\n multiple: { type: Boolean, default: false },\n /** Controls whether the input is disabled */\n disabled: { type: Boolean, default: false },\n /** Controls whether the input is required */\n required: { type: Boolean, default: false },\n /** A custom data-test string applied to the form field, text field and hide icon */\n dataTest: { type: String, default: 'file-input' },\n },\n emits: ['input'],\n setup(props, { emit }) {\n const { id, value } = toRefs(props);\n const idWithFallback = useId(id);\n const inputValue = useInternalValue(value, {\n onChange: (newValue) => {\n emit('input', newValue);\n },\n });\n const hasValue = computed(() => {\n if (Array.isArray(inputValue.value)) {\n return inputValue.value.length > 0;\n }\n return !!inputValue.value;\n });\n\n function onFileChange(event: Event): void {\n const files = (event.target as HTMLInputElement).files;\n if (!files) {\n inputValue.value = null;\n } else {\n inputValue.value = props.multiple ? Array.from(files) : files[0];\n }\n }\n\n return {\n idWithFallback,\n inputValue,\n hasValue,\n onFileChange,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/utils/a11y';\n@import '@propelinc/citrus-ui/src/styles/button';\n\n.c-file-input {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n position: relative;\n\n &:focus-within {\n .c-file-input__prompt {\n outline: var(--sl-focus-ring);\n outline-offset: var(--sl-focus-ring-offset);\n }\n }\n}\n\n.c-file-input--disabled {\n &:hover {\n .c-file-input__prompt {\n @include button-theme($color-gray-300, $color-gray-300, transparent);\n }\n }\n\n .c-file-input__label {\n color: $color-text-disabled;\n }\n\n .c-file-input__prompt {\n @include button-theme($color-gray-300, $color-gray-300, transparent);\n }\n\n .c-file-input__input {\n cursor: not-allowed;\n }\n}\n\n.c-file-input__label {\n @include body-emphasized;\n\n margin-bottom: var(--sl-spacing-3x-small);\n}\n\n.c-file-input__prompt {\n // NOTE(slanden): these styles are largely copied from sl-button defaults.\n @include button-theme-secondary;\n\n align-items: center;\n border-radius: var(--sl-input-border-radius-medium);\n border-style: solid;\n border-width: $border-width;\n display: inline-flex;\n font-family: var(--sl-input-font-family);\n font-weight: var(--sl-font-weight-semibold);\n height: $button-size-medium;\n justify-content: center;\n padding: 0 20px;\n transition: background-color 0.2s ease-in-out;\n}\n\n.c-file-input__input {\n cursor: pointer;\n height: 100%;\n inset: 0;\n opacity: 0;\n\n // NOTE(slanden): Rather than using the sr-only utility, we actually want to have\n // the file input take up the full space of the label. This allows us to support\n // default file input behavior, like drag-and-drop upload.\n position: absolute;\n width: 100%;\n}\n\n.c-file-input__files {\n display: flex;\n flex-direction: column;\n gap: var(--sl-spacing-3x-small);\n margin-top: var(--sl-spacing-2x-small);\n}\n\n.c-file-input__file {\n @include caption;\n\n word-break: break-word;\n}\n</style>\n","<template>\n <CButtonStack\n ref=\"footer\"\n data-test=\"fixed-page-footer\"\n :tag=\"tag\"\n large\n class=\"c-fixed-page-footer\"\n >\n <div class=\"c-fixed-page-footer__content\">\n <slot />\n </div>\n </CButtonStack>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, onBeforeUnmount, ref } from 'vue';\n\nimport CButtonStack from '@propelinc/citrus-ui/src/components/CButtonStack.vue';\nimport { useResizeObserver } from '@propelinc/citrus-ui/src/composables/elements';\n\nexport default defineComponent({\n name: 'CFixedPageFooter',\n components: { CButtonStack },\n props: {\n /** The HTML tag to render as. Avoid changing this if possible. */\n tag: { type: String, default: 'footer' },\n },\n emits: ['change:height'],\n setup(_, { emit }) {\n const footer = ref<InstanceType<typeof CButtonStack> | null>(null);\n const footerElement = computed(() => (footer.value?.$el as HTMLElement) ?? null);\n useResizeObserver(footerElement, ([entry]) => emit('change:height', entry.contentRect.height));\n onBeforeUnmount(() => emit('change:height', 0));\n\n return { footer };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n$gradient-height: 32px;\n\n.c-fixed-page-footer {\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n\n // This places the footer above any Swiper components in the body which have z-index 1.\n z-index: 1;\n\n &::before {\n // NOTE(mohan): We use rgba instead of `transparent` to avoid a bug in\n // Safari where the gradient starts as tranparent black and fades into a\n // gray.\n background: linear-gradient(\n to bottom,\n rgba(255, 255, 255, 0) 0,\n var(--fixed-page-footer-color, white) $gradient-height\n );\n content: '';\n inset: -$gradient-height 0 0;\n pointer-events: none;\n position: absolute;\n z-index: -1;\n }\n}\n\n// NOTE(mohan): ResizeObservers don't measure padding (at least not in all\n// browsers), so we have to add it to a child element.\n.c-fixed-page-footer__content {\n padding: 0 16px max(env(safe-area-inset-bottom, 0), 8px);\n}\n</style>\n","<template>\n <form ref=\"form\" :data-test=\"dataTest\" novalidate @submit.prevent=\"$emit('submit', $event)\">\n <slot />\n </form>\n</template>\n\n<script lang=\"ts\">\nimport scrollIntoViewIfNeeded from 'scroll-into-view-if-needed';\nimport { computed, defineComponent, onMounted, provide, ref, watch } from 'vue';\n\nimport { VALIDATIONS } from '@propelinc/citrus-ui/src/services/injections/forms';\nimport type { ValidationState } from '@propelinc/citrus-ui/src/types/CForm';\n\ninterface FormValidation {\n id: string;\n validate: () => boolean;\n valid: boolean;\n field?: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null;\n}\n\nexport default defineComponent({\n name: 'CForm',\n props: {\n dataTest: { type: String, default: 'form' },\n // eslint-disable-next-line vue/no-unused-properties\n value: { type: Boolean, default: false },\n },\n emits: ['submit', 'input'],\n setup(_, { expose, emit }) {\n const form = ref<HTMLFormElement | null>(null);\n const inputs = ref<Record<string, FormValidation>>({});\n\n provide(VALIDATIONS, {\n register: (input: ValidationState) => {\n // NOTE(ram): Vue collapses the ref to input.field automatically so we need to adjust types.\n inputs.value = { ...inputs.value, [input.id]: input as unknown as FormValidation };\n },\n unregister: (id: string) => {\n const filteredInputs = { ...inputs.value };\n delete filteredInputs[id];\n inputs.value = filteredInputs;\n },\n });\n\n const inputArray = computed(() => Object.values(inputs.value));\n const getInvalidInputs = (startValidating?: boolean): FormValidation[] => {\n return inputArray.value.filter((input) => {\n return startValidating ? !input.validate() : !input.valid;\n });\n };\n\n // NOTE(mohan): I would love for this to be a computed property, but Vue 2's\n // the reactivity system can't seem to track refs inside of refs, though it\n // should work in Vue 3.\n watch(getInvalidInputs, (newInvalidInputs, oldInvalidInputs) => {\n const newValid = newInvalidInputs.length === 0;\n const oldValid = oldInvalidInputs?.length === 0;\n if (newValid !== oldValid) {\n emit('input', newValid);\n }\n });\n onMounted(() => emit('input', getInvalidInputs().length === 0));\n\n const validate = (): boolean => {\n if (!form.value) {\n return false;\n }\n\n const invalidInputs = getInvalidInputs(true);\n const firstInvalidField = invalidInputs.find((input) => input.field)?.field;\n if (firstInvalidField) {\n scrollIntoViewIfNeeded(firstInvalidField, {\n behavior: 'smooth',\n block: 'center',\n scrollMode: 'if-needed',\n });\n }\n\n return invalidInputs.length === 0;\n };\n\n expose({ validate, inputs: inputArray });\n return { form };\n },\n});\n</script>\n","<template>\n <div class=\"c-label\" :data-test=\"dataTest\">\n <slot name=\"icon\">\n <FontAwesomeIcon v-if=\"icon\" data-test=\"label-icon\" :icon=\"icon\" size=\"xs\" />\n </slot>\n <div class=\"c-label__text\" data-test=\"label-text\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { IconDefinition } from '@fortawesome/fontawesome-svg-core';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport type { PropType } from 'vue';\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n components: { FontAwesomeIcon },\n props: {\n /** Specifies the label's icon, overwritten if icon slot is used */\n icon: {\n type: [Array, String, Object] as PropType<string | string[] | IconDefinition>,\n default: null,\n },\n /** A custom data test string */\n dataTest: { type: String, default: 'label' },\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-label {\n align-items: center;\n background-color: $color-gray-100;\n border-radius: 4px;\n color: $color-text-secondary;\n display: inline-flex;\n font-size: $font-size-small;\n font-weight: $font-weight-semibold;\n gap: 4px;\n height: 24px;\n margin-bottom: 6px;\n padding: 0 12px;\n}\n\n.c-label:not(:last-child) {\n margin-right: 8px;\n}\n</style>\n","<template>\n <div class=\"c-list-item-content\" data-test=\"list-item-content\">\n <slot>\n <div\n v-if=\"title || titleSlotHasContent\"\n class=\"c-list-item-content__title\"\n data-test=\"list-item-title\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div\n v-if=\"label || labelSlotHasContent\"\n class=\"c-list-item-content__label\"\n data-test=\"list-item-label\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </div>\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nimport { useSlotHasContent } from '@propelinc/citrus-ui/src/composables/slots';\n\nexport default defineComponent({\n name: 'CListItemContent',\n props: {\n title: { type: String, default: '' },\n label: { type: String, default: '' },\n },\n setup() {\n const titleSlotHasContent = useSlotHasContent('title');\n const labelSlotHasContent = useSlotHasContent('label');\n\n return { titleSlotHasContent, labelSlotHasContent };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-list-item-content {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.c-list-item-content__title {\n @include subheadline;\n\n align-items: center;\n display: flex;\n\n & + .c-list-item-content__label {\n margin-top: 2px;\n }\n}\n</style>\n","<template>\n <div\n data-test=\"squared-icon\"\n :data-icon=\"icon\"\n :data-color=\"cssColor\"\n class=\"c-squared-icon\"\n :class=\"{ 'c-squared-icon--white-icon': useWhiteIcon, 'c-squared-icon--large': large }\"\n :style=\"{ backgroundColor: cssColor }\"\n >\n <slot>\n <FontAwesomeIcon v-if=\"icon\" data-test=\"squared-icon-icon\" :icon=\"icon\" />\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport { computed, defineComponent, onMounted } from 'vue';\n\nimport { useCssColor } from '@propelinc/citrus-ui/src/composables/colors';\nimport type { FaIconArray, FaPropType } from '@propelinc/citrus-ui/src/types/font-awesome';\n\nexport default defineComponent({\n components: { FontAwesomeIcon },\n props: {\n /** The Font Awesome icon to display */\n icon: { type: [String, Array, Object] as FaPropType, default: null },\n /** The background color */\n color: { type: String, default: 'gray-100' },\n /** Makes the icon and background larger */\n large: { type: Boolean, default: false },\n },\n setup(props) {\n onMounted(() => {\n const enableCheck = process.env.VUE_APP_DEBUG === 'yes' || process.env.NODE_ENV === 'test';\n if (enableCheck && Array.isArray(props.icon)) {\n const [prefix, iconName] = props.icon as FaIconArray;\n if (prefix === 'fal') {\n console.error(\n `We no longer use light Font Awesome icons. Please change ['${prefix}', '${iconName}'] to ['far', '${iconName}'].`\n );\n }\n }\n });\n\n const { cssColor } = useCssColor(() => props.color);\n\n const useWhiteIcon = computed(() => props.color === 'black');\n\n return { cssColor, useWhiteIcon };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n$squared-icon-size: 40px;\n$squared-icon-large-size: 56px;\n\n.c-squared-icon {\n align-items: center;\n border-radius: $border-radius;\n color: $color-text-primary;\n display: flex;\n font-size: $font-size-icon-medium;\n height: $squared-icon-size;\n justify-content: center;\n position: relative;\n width: $squared-icon-size;\n}\n\n.c-squared-icon--white-icon {\n color: $color-white;\n}\n\n.c-squared-icon--large {\n border-radius: $border-radius-next;\n font-size: $font-size-icon-large;\n height: $squared-icon-large-size;\n width: $squared-icon-large-size;\n}\n</style>\n","<template>\n <CSquaredIcon\n v-if=\"icon || iconSlotHasContent\"\n :icon=\"icon\"\n :color=\"iconColor\"\n class=\"c-list-item-icon\"\n >\n <slot name=\"icon\" />\n </CSquaredIcon>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nimport CSquaredIcon from '@propelinc/citrus-ui/src/components/CSquaredIcon.vue';\nimport { useSlotHasContent } from '@propelinc/citrus-ui/src/composables/slots';\n\nexport default defineComponent({\n name: 'CListItemIcon',\n components: { CSquaredIcon },\n props: {\n icon: CSquaredIcon.props.icon,\n iconColor: CSquaredIcon.props.color,\n },\n setup() {\n const iconSlotHasContent = useSlotHasContent('icon');\n\n return { iconSlotHasContent };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-list-item-icon {\n flex: none;\n}\n</style>\n","<template>\n <component\n :is=\"tag\"\n v-bind=\"allAttrs\"\n class=\"c-list-item d-flex flex-col justify-center w-full\"\n :class=\"{ 'c-list-item--is-tappable': isTappable }\"\n :href=\"routerDestinationOrHref\"\n :target=\"target\"\n @click=\"navigate\"\n >\n <div\n class=\"d-flex flex-row gap-3 justify-between w-full p-4\"\n :class=\"{\n 'align-start': align === 'top',\n 'align-center': align !== 'top',\n }\"\n >\n <slot name=\"prepend\">\n <CListItemIcon v-if=\"icon || iconSlotHasContent\" :icon=\"icon\" :icon-color=\"iconColor\">\n <template #icon>\n <slot name=\"icon\" />\n </template>\n </CListItemIcon>\n </slot>\n\n <div class=\"flex-1 d-flex flex-row gap-3 justify-between align-center\">\n <CListItemContent :title=\"title\" :label=\"label\">\n <template v-for=\"slotName in ['title', 'label', 'default']\" #[slotName]>\n <slot :name=\"slotName\" />\n </template>\n </CListItemContent>\n\n <slot name=\"append\">\n <div\n v-if=\"renderActionSlot\"\n data-test=\"list-item-action\"\n class=\"c-list-item__append__action flex-shrink-0\"\n >\n <slot name=\"action\">\n <FontAwesomeIcon\n data-test=\"list-item-action-icon\"\n class=\"c-list-item__append__action-icon\"\n fixed-width\n :icon=\"actionIcon ? actionIcon : faChevronRight\"\n />\n </slot>\n </div>\n </slot>\n </div>\n </div>\n </component>\n</template>\n\n<script lang=\"ts\">\nimport { faChevronRight } from '@fortawesome/pro-regular-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport { type PropType, computed, defineComponent, mergeProps, toRefs } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\n\nimport CListItemContent from '@propelinc/citrus-ui/src/components/CListItemContent.vue';\nimport CListItemIcon from '@propelinc/citrus-ui/src/components/CListItemIcon.vue';\nimport { useRouterLink } from '@propelinc/citrus-ui/src/composables/router';\nimport { useSlotHasContent } from '@propelinc/citrus-ui/src/composables/slots';\nimport type { FaPropType } from '@propelinc/citrus-ui/src/types/font-awesome';\n\nexport default defineComponent({\n components: { FontAwesomeIcon, CListItemIcon, CListItemContent },\n props: {\n /** The Font Awesome icon to display */\n icon: { type: [String, Array, Object] as FaPropType, default: null },\n /** The icon to display on the right side for clickable items, defaulting to right arrow */\n actionIcon: { type: [String, Array, Object] as FaPropType, default: null },\n /** Color of the icon background */\n iconColor: { type: String, default: 'gray-100' },\n /** Emphasized text above body text. Overridden by the default slot. */\n title: { type: String, default: undefined },\n /** Plain body copy. Overridden by the default slot. */\n label: { type: String, default: undefined },\n /** Router location for links within the app */\n to: { type: [String, Object] as PropType<RouteLocationRaw>, default: undefined },\n /** HTML target attribute for links to outside the app */\n target: { type: String, default: undefined },\n /** Location for links to outside the app */\n href: { type: String, default: undefined },\n /** Changes alignment of icon and action icon */\n align: { type: String as PropType<'top' | 'center'>, default: 'center' },\n /** Overrides default behavior to display a chevron in the action slot */\n hideAction: { type: Boolean, default: false },\n },\n setup(props, { attrs }) {\n const { to } = toRefs(props);\n const { href: routerDestination, navigate } = useRouterLink(to);\n const routerDestinationOrHref = computed(() => routerDestination.value ?? props.href);\n\n const isLink = computed(() => !!routerDestinationOrHref.value);\n const isButton = computed(() => !!attrs.onClick);\n const isTappable = computed(() => isLink.value || isButton.value);\n\n const tag = computed(() => {\n if (isLink.value) {\n return 'a';\n } else if (isButton.value) {\n return 'button';\n } else {\n return 'div';\n }\n });\n const tagAttrs = computed(() => {\n if (isButton.value) {\n return { type: 'button' };\n }\n return {};\n });\n\n const actionSlotHasContent = useSlotHasContent('action');\n\n const renderActionSlot = computed(() => {\n if (props.hideAction) {\n return false;\n }\n\n return isTappable.value || actionSlotHasContent.value;\n });\n const iconSlotHasContent = useSlotHasContent('icon');\n\n const allAttrs = computed(() => mergeProps(attrs, tagAttrs.value));\n\n return {\n allAttrs,\n faChevronRight,\n iconSlotHasContent,\n isTappable,\n navigate,\n renderActionSlot,\n routerDestinationOrHref,\n tag,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/utils/a11y';\n\n.c-list-item {\n background: transparent;\n color: $color-text-primary;\n min-height: 64px;\n outline: none;\n text-align: left;\n text-decoration: none;\n\n & + & {\n border-top: $border;\n }\n\n &:focus-visible {\n @include focus-ring;\n }\n}\n\n.c-list-item--is-tappable {\n appearance: none; // Needed to avoid browser default styles for buttons\n border: none; // Needed to avoid browser default styles for buttons\n cursor: pointer;\n}\n\n.c-list-item__append__action-icon {\n color: $color-text-secondary;\n font-size: $font-size-medium;\n}\n</style>\n","export default \"data:image/svg+xml,%3csvg%20width='30'%20height='37'%20viewBox='0%200%2030%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_911_9050)'%3e%3cpath%20d='M7.39438%200.692966C7.39438%200.692966%206.35052%201.4649%205.56982%202.23683C5.3242%202.44735%205.35052%202.66665%205.36806%202.98244C5.44701%204.04384%205.64876%206.40349%207.25403%208.14033C8.85052%209.87718%2010.9119%209.64033%2010.9119%209.64033L15.2979%208.67542L7.39438%200.692966Z'%20fill='black'%20stroke='black'%20stroke-width='0.964912'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M0.482422%2022.6316C0.482422%2029.6754%206.42979%2035.386%2013.7719%2035.386C21.114%2035.386%2027.0614%2029.6754%2027.0614%2022.6316C27.0614%2015.5877%2021.114%209.8772%2013.7719%209.8772C6.42979%209.8772%200.482422%2015.5877%200.482422%2022.6316ZM7.8947%2022.6316C7.8947%2025.9123%2010.6666%2028.5702%2014.0877%2028.5702C17.5087%2028.5702%2020.2807%2025.9123%2020.2807%2022.6316C20.2807%2019.3509%2017.5087%2016.693%2014.0877%2016.693C10.6666%2016.693%207.8947%2019.3509%207.8947%2022.6316Z'%20fill='black'%20stroke='black'%20stroke-width='0.964912'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.73633%2022.0965C2.73633%2029.4912%208.72755%2035.4824%2016.1223%2035.4824C23.517%2035.4824%2029.5083%2029.4912%2029.5083%2022.0965C29.5083%2014.7017%2023.517%208.71051%2016.1223%208.71051C8.72755%208.71051%202.73633%2014.7017%202.73633%2022.0965ZM9.88545%2022.0965C9.88545%2025.5438%2012.6749%2028.3333%2016.1223%2028.3333C19.5697%2028.3333%2022.3591%2025.5438%2022.3591%2022.0965C22.3591%2018.6491%2019.5697%2015.8596%2016.1223%2015.8596C12.6749%2015.8596%209.88545%2018.6491%209.88545%2022.0965Z'%20fill='%23FFC120'%20stroke='black'%20stroke-width='0.978516'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.88672%2013.1491C7.41303%2010.9912%209.76391%209.74562%2013.3078%209.00001'%20stroke='black'%20stroke-width='0.973684'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M9.53516%2034.7193C12.7808%2035.7193%2015.7281%2035.8597%2018.9211%2035.193'%20stroke='black'%20stroke-width='0.973684'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M15.2988%208.67545C15.4742%208.64036%2015.6321%208.54387%2015.7286%208.38598C16.4567%207.21054%2016.1672%204.71054%2014.6146%203.28948C12.869%201.7544%2011.5707%202.0965%208.44792%200.614046C7.6409%200.228081%206.99178%200.736853%207.11459%201.71054C7.23739%202.68422%208.04441%206.3772%2010.3339%207.91229C11.9655%209.00001%2014.4655%208.85966%2015.2988%208.68422V8.67545Z'%20fill='%238BC95A'%20stroke='black'%20stroke-width='0.978516'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_911_9050'%3e%3crect%20width='30'%20height='36.0877'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20width='120'%20height='38'%20viewBox='0%200%20120%2038'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40.3101%2022.5039H36.5387C36.383%2022.5039%2036.2563%2022.6306%2036.2563%2022.7863V29.808C36.2563%2030.018%2036.0862%2030.1881%2035.8763%2030.1881H32.2206C32.0107%2030.1881%2031.8406%2030.018%2031.8406%2029.808V8.18892C31.8406%207.98261%2032.0107%207.8125%2032.2206%207.8125H40.3101C44.5847%207.8125%2048.0594%2010.5488%2048.0594%2015.1419C48.0594%2019.735%2044.5847%2022.5039%2040.3101%2022.5039ZM36.2563%2018.2764C36.2563%2018.432%2036.383%2018.5587%2036.5387%2018.5587H40.1364C42.4275%2018.5587%2043.6437%2017.1109%2043.6437%2015.1383C43.6437%2013.1657%2042.4275%2011.7505%2040.1364%2011.7505H36.5387C36.383%2011.7505%2036.2563%2011.8772%2036.2563%2012.0328V18.2728V18.2764Z'%20fill='black'/%3e%3cpath%20d='M53.7021%2014.5594V15.3919C53.7021%2015.533%2053.8723%2015.5945%2053.9664%2015.4932C54.7771%2014.6064%2056.2937%2014.0454%2057.9116%2014.0454H58.9214C59.1313%2014.0454%2059.3015%2014.2155%2059.3015%2014.4255V17.7119C59.3015%2017.9219%2059.1313%2018.092%2058.9214%2018.092H57.879C55.1499%2018.092%2053.7021%2019.8438%2053.7021%2022.4064V29.8118C53.7021%2030.0218%2053.532%2030.1919%2053.3221%2030.1919H49.8329C49.623%2030.1919%2049.4529%2030.0218%2049.4529%2029.8118V14.5594C49.4529%2014.3495%2049.623%2014.1793%2049.8329%2014.1793H53.3221C53.532%2014.1793%2053.7021%2014.3495%2053.7021%2014.5594Z'%20fill='black'/%3e%3cpath%20d='M76.9102%2022.1999C76.9102%2027.0174%2073.1713%2030.6224%2068.2162%2030.6224C63.2611%2030.6224%2059.5222%2027.0174%2059.5222%2022.1999C59.5222%2017.3824%2063.2611%2013.7412%2068.2162%2013.7412C73.1713%2013.7412%2076.9102%2017.3462%2076.9102%2022.1999ZM63.7715%2022.1999C63.7715%2024.8639%2065.6898%2026.7134%2068.2198%2026.7134C70.7498%2026.7134%2072.6681%2024.8602%2072.6681%2022.1999C72.6681%2019.5396%2070.7462%2017.6502%2068.2198%2017.6502C65.6934%2017.6502%2063.7715%2019.5034%2063.7715%2022.1999Z'%20fill='black'/%3e%3cpath%20d='M87.5261%2030.6224C85.9046%2030.6224%2084.2505%2030.1193%2083.1538%2029.2181C83.0307%2029.1167%2082.8425%2029.2%2082.8425%2029.3629V36.6814C82.8425%2036.8914%2082.6724%2037.0615%2082.4625%2037.0615H78.9733C78.7634%2037.0615%2078.5933%2036.8914%2078.5933%2036.6814V14.5556C78.5933%2014.3457%2078.7634%2014.1756%2078.9733%2014.1756H82.4625C82.6724%2014.1756%2082.8425%2014.3457%2082.8425%2014.5556V15.0478C82.8425%2015.1781%2082.9909%2015.2469%2083.0886%2015.1637C84.1853%2014.2335%2085.8684%2013.7412%2087.5261%2013.7412C92.6803%2013.7412%2095.7134%2017.7842%2095.7134%2022.1637C95.7134%2026.5433%2092.6803%2030.6224%2087.5261%2030.6224ZM87.1895%2017.6502C84.931%2017.6502%2082.676%2019.1342%2082.676%2022.1637C82.676%2025.1932%2084.9346%2026.7134%2087.1895%2026.7134C89.7159%2026.7134%2091.4677%2024.625%2091.4677%2022.1637C91.4677%2019.7025%2089.7159%2017.6502%2087.1895%2017.6502Z'%20fill='black'/%3e%3cpath%20d='M112.989%2025.3344C113.264%2025.3344%20113.449%2025.6167%20113.337%2025.8664C111.983%2028.791%20108.917%2030.6224%20105.674%2030.6224C100.686%2030.6224%2097.0127%2027.0174%2097.0127%2022.1637C97.0127%2017.31%20100.549%2013.7412%20105.504%2013.7412C110.459%2013.7412%20113.829%2017.3824%20113.829%2022.0986C113.829%2022.5184%20113.829%2022.855%20113.796%2023.2351C113.778%2023.4305%20113.615%2023.5826%20113.42%2023.5826H101.801C101.609%2023.5826%20101.468%2023.7708%20101.53%2023.9518C102.091%2025.6601%20103.72%2026.717%20105.674%2026.717C106.955%2026.717%20108.114%2026.3515%20108.863%2025.4755C108.939%2025.3887%20109.044%2025.3344%20109.156%2025.3344H112.989ZM108.968%2020.4119C109.149%2020.4119%20109.286%2020.2418%20109.243%2020.0644C108.838%2018.4103%20107.332%2017.3788%20105.504%2017.3788C103.676%2017.3788%20102.033%2018.4393%20101.602%2020.0608C101.555%2020.2382%20101.696%2020.4119%20101.877%2020.4119H108.968Z'%20fill='black'/%3e%3cpath%20d='M120%208.18912V29.8082C120%2030.0182%20119.83%2030.1883%20119.62%2030.1883H116.131C115.921%2030.1883%20115.751%2030.0182%20115.751%2029.8082V8.18912C115.751%207.97919%20115.921%207.80908%20116.131%207.80908H119.62C119.83%207.80908%20120%207.97919%20120%208.18912Z'%20fill='black'/%3e%3cpath%20d='M13.725%207.37832C14.1268%206.19475%2013.7757%204.37054%2012.556%203.25212C11.6909%202.49203%2010.9561%202.26762%2010.0259%201.98531C9.3672%201.78623%208.6252%201.56182%207.61899%201.08405C7.17018%200.8705%206.71774%200.892218%206.37751%201.14196C6.34132%201.1673%206.30512%201.19988%206.27255%201.22884C6.08795%201.37%205.40025%201.89481%204.85009%202.43412C4.50262%202.74539%204.52796%203.1001%204.54606%203.3607V3.3969C4.61483%204.24023%204.77046%206.22008%206.14224%207.7113C6.5802%208.18545%207.05435%208.49312%207.50317%208.69219C6.46438%209.15186%205.49436%209.73821%204.49539%2010.4947C4.29993%2010.6395%204.10448%2010.7915%203.91989%2010.9507C3.86922%2010.9905%203.81854%2011.0304%203.76787%2011.0738C3.74615%2011.0919%203.72806%2011.11%203.71358%2011.1281C1.43693%2013.1441%200%2016.0904%200%2019.3696C0%2024.3102%203.26476%2028.5016%207.74929%2029.8987C7.77463%2029.9095%207.79634%2029.9204%207.8253%2029.9276C9.39615%2030.3873%2010.8946%2030.6153%2012.3967%2030.6153C13.5332%2030.6153%2014.6697%2030.485%2015.8352%2030.2244C15.8388%2030.2244%2015.8461%2030.2208%2015.8497%2030.2208C21.0581%2029.1024%2024.9707%2024.4622%2024.9707%2018.9244C24.9707%2012.6555%2019.9505%207.53757%2013.7214%207.37469L13.725%207.37832ZM12.7333%2023.5827C11.738%2023.4379%2010.815%2022.9782%2010.0911%2022.2544C9.2007%2021.364%208.71207%2020.184%208.71207%2018.9244C8.71207%2017.2341%209.60608%2015.7502%2010.9489%2014.9213C11.0539%2014.9141%2011.1625%2014.9068%2011.271%2014.9068C13.7323%2014.9068%2015.7338%2016.9084%2015.7338%2019.3696C15.7338%2021.3169%2014.4779%2022.9746%2012.7369%2023.5827H12.7333Z'%20fill='black'/%3e%3cpath%20d='M11.9405%203.93626C11.2347%203.31371%2010.6447%203.13636%209.75796%202.86852C9.10284%202.66945%208.28846%202.42332%207.22433%201.91659C7.14832%201.8804%207.07231%201.8623%207.0144%201.8623C6.97459%201.8623%206.94201%201.86954%206.9203%201.88763C6.86238%201.93107%206.80447%202.06499%206.83705%202.30026C6.95649%203.20875%207.60438%205.79666%209.15713%206.83183C10.2502%207.56297%2012.0418%207.50506%2012.6897%207.36752C12.7151%207.36028%2012.7295%207.34942%2012.7368%207.33856C13.3449%206.34682%2012.6861%204.62034%2011.9405%203.93626Z'%20fill='%238BC95A'/%3e%3cpath%20d='M13.4209%208.29395C7.55737%208.29395%202.79053%2013.0644%202.79053%2018.9243C2.79053%2021.7656%203.89809%2024.4332%205.90327%2026.442C7.91208%2028.4508%2010.5796%2029.5547%2013.4209%2029.5547C19.2845%2029.5547%2024.0513%2024.7843%2024.0513%2018.9243C24.0513%2013.0644%2019.2808%208.29395%2013.4209%208.29395ZM17.4023%2022.9058C16.3382%2023.9699%2014.9266%2024.5526%2013.4209%2024.5526C11.9188%2024.5526%2010.5036%2023.9663%209.4395%2022.9058C8.37537%2021.8453%207.79264%2020.43%207.79264%2018.9243C7.79264%2015.8224%2010.319%2013.2961%2013.4209%2013.2961C16.5228%2013.2961%2019.0492%2015.8224%2019.0492%2018.9243C19.0492%2020.4264%2018.4628%2021.8416%2017.4023%2022.9058Z'%20fill='%23FFC120'/%3e%3c/svg%3e\"","<template>\n <img :src=\"src\" :alt=\"$t('{appName}')\" />\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue';\n\nimport propelIcon from '@propelinc/citrus-ui/src/assets/logos/propel/icon.svg';\nimport propelLockup from '@propelinc/citrus-ui/src/assets/logos/propel/lockup.svg';\n\nexport default defineComponent({\n props: {\n /** Show just the orange icon */\n icon: { type: Boolean, default: false },\n },\n setup(props) {\n const src = computed(() => {\n return props.icon ? propelIcon : propelLockup;\n });\n return { src };\n },\n});\n</script>\n","<template>\n <sl-menu class=\"c-menu pa-0 elevation-4\" @sl-select=\"$emit('select', $event.detail.item)\">\n <slot />\n </sl-menu>\n</template>\n\n<script lang=\"ts\">\nimport '@shoelace-style/shoelace/dist/components/menu/menu.js';\nimport { defineComponent } from 'vue';\nexport type { default as SlMenuItem } from '@shoelace-style/shoelace/dist/components/menu-item/menu-item.js';\n\nexport default defineComponent({\n name: 'CMenu',\n emits: ['select'],\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-menu {\n --sl-panel-border-width: $border-width;\n}\n</style>\n","<template>\n <sl-menu-item\n :type=\"checkable ? 'checkbox' : 'normal'\"\n :checked=\"checked\"\n class=\"menu-item\"\n :class=\"{ selectable }\"\n @click=\"onClick\"\n >\n <div slot=\"prefix\">\n <slot name=\"prepend-inner\">\n <template v-if=\"checkable\">\n <CCheckbox\n v-if=\"checkType === 'checkbox'\"\n :value=\"checked\"\n variant=\"minimal\"\n hide-details\n aria-hidden=\"true\"\n class=\"checkbox mr-3\"\n />\n <div v-else class=\"check-icon mr-3\">\n <FontAwesomeIcon v-if=\"checked\" :icon=\"faCheck\" />\n </div>\n </template>\n </slot>\n </div>\n <slot />\n </sl-menu-item>\n</template>\n\n<script lang=\"ts\">\nimport { faCheck } from '@fortawesome/pro-regular-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport { type PropType, defineComponent } from 'vue';\n\nimport '@shoelace-style/shoelace/dist/components/menu-item/menu-item.js';\nimport CCheckbox from '@propelinc/citrus-ui/src/components/CCheckbox.vue';\n\nexport default defineComponent({\n name: 'CMenuItem',\n components: { CCheckbox, FontAwesomeIcon },\n props: {\n /** Controls whether the item has hover-state styles and responds to click events */\n selectable: { type: Boolean, default: true },\n /** Controls whether to enable and display a checked state */\n checkable: { type: Boolean },\n /** Reflects the item's checked state */\n checked: { type: Boolean },\n /** Controls what style of checking to apply, either a checkbox, or just a check icon */\n checkType: { type: String as PropType<'checkbox' | 'icon'>, default: 'checkbox' },\n },\n setup(props) {\n const onClick = (e: Event): void => {\n if (!props.selectable) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n return { faCheck, onClick };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.menu-item {\n &::part(base) {\n @include body-emphasized;\n\n --sl-spacing-x-small: 12px;\n\n align-items: center;\n background-color: $color-white;\n color: $color-black;\n cursor: initial;\n padding: 12px 16px;\n }\n\n &.selectable::part(base):hover {\n background-color: var(--sl-color-neutral-100);\n color: var(--sl-color-neutral-1000);\n cursor: pointer;\n }\n\n &::part(checked-icon) {\n // Hide Shoelace's built-in checkmark, as it is not customizable and does not match our standard\n // checkmark icon.\n display: none;\n }\n\n &::part(submenu-icon) {\n display: none;\n }\n\n .checkbox {\n // We're using CCheckbox exclusively as a visual reflection of sl-menu-item's internal checked\n // state, so it should not capture any mouse events.\n pointer-events: none;\n }\n\n .check-icon {\n width: 14px;\n }\n}\n</style>\n","<template>\n <sl-menu-label class=\"menu-label pt-3 px-4\">\n <slot />\n </sl-menu-label>\n</template>\n\n<script lang=\"ts\">\nimport '@shoelace-style/shoelace/dist/components/menu-label/menu-label.js';\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n name: 'CMenuLabel',\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.menu-label {\n &::part(base) {\n @include eyebrow;\n\n padding: 0;\n }\n}\n</style>\n","<template>\n <sl-dialog\n ref=\"modal\"\n :label=\"dialogLabel\"\n no-header\n :open=\"value\"\n class=\"c-modal\"\n :class=\"{ 'c-modal--fullscreen': fullscreen }\"\n :data-loading=\"loading || undefined\"\n :data-state=\"value ? 'open' : 'closed'\"\n :data-test=\"getDataTestAttr()\"\n @sl-hide=\"$emit('input', false)\"\n @sl-request-close=\"onRequestClose\"\n @sl-after-show=\"isVisible = true\"\n @sl-after-hide=\"isVisible = false\"\n >\n <CExpandTransition class=\"c-modal__wrapper\" :disabled=\"!enableExpandTransition\">\n <div v-if=\"!loading\" class=\"c-modal__body\">\n <div :data-test=\"getDataTestAttr('content')\" class=\"c-modal__content\">\n <h2 v-if=\"title\" class=\"c-modal__title\" :data-test=\"getDataTestAttr('title')\">\n {{ title }}\n </h2>\n <button\n v-if=\"dismissible\"\n class=\"c-modal__dismiss\"\n :data-test=\"getDataTestAttr('dismiss')\"\n @click=\"$emit('input', false)\"\n >\n {{ $t('Dismiss') }}\n </button>\n <slot />\n </div>\n <CButtonStack\n v-if=\"footerHasContent\"\n tag=\"footer\"\n class=\"c-modal__footer\"\n :large=\"fullscreen || undefined\"\n :data-test=\"getDataTestAttr('footer')\"\n >\n <slot name=\"footer\" />\n </CButtonStack>\n </div>\n <div v-else class=\"c-modal__loading\" :data-test=\"value ? `${dataTest}-loading` : null\">\n <div class=\"c-modal__loading__loader\"><CLoader /></div>\n <slot name=\"loading\">\n <div v-if=\"loadingMessage\" :data-test=\"value ? `${dataTest}-loading-message` : null\">\n {{ loadingMessage }}\n </div>\n </slot>\n </div>\n </CExpandTransition>\n </sl-dialog>\n</template>\n\n<script lang=\"ts\">\nimport type SlDialog from '@shoelace-style/shoelace/dist/components/dialog/dialog.js';\nimport '@shoelace-style/shoelace/dist/components/dialog/dialog.js';\nimport type { PropType } from 'vue';\nimport { computed, defineComponent, ref } from 'vue';\n\nimport CButtonStack from '@propelinc/citrus-ui/src/components/CButtonStack.vue';\nimport CExpandTransition from '@propelinc/citrus-ui/src/components/CExpandTransition.vue';\nimport CLoader from '@propelinc/citrus-ui/src/components/CLoader.vue';\nimport { useShoelaceAnimation } from '@propelinc/citrus-ui/src/composables/animation';\nimport { useSlotHasContent } from '@propelinc/citrus-ui/src/composables/slots';\n\nexport default defineComponent({\n name: 'CModal',\n components: { CButtonStack, CLoader, CExpandTransition },\n props: {\n /** Controls whether or not the modal is showing */\n value: { type: Boolean, default: false },\n /** The title of the modal */\n title: { type: String as PropType<string | null>, default: null },\n /** Shows loading state and sets loading message if string */\n loading: { type: [String, Boolean], default: false },\n /** Allows modal to be dismissed */\n dismissible: { type: Boolean, default: true },\n /** Prefix for test selectors */\n dataTest: { type: String, default: 'modal' },\n /** Toggles the open/close animation */\n transition: { type: Boolean, default: true },\n /** Controls whether the modal displays fullscreen */\n fullscreen: { type: Boolean, default: false },\n /** Aria label for the modal. This is required if title is hidden */\n ariaLabel: { type: String, default: '' },\n },\n emits: ['input'],\n setup(props) {\n const onRequestClose = (event: Event): void => {\n if (!props.dismissible) {\n event.preventDefault();\n }\n };\n\n const modal = ref<SlDialog | null>(null);\n const animation = computed<'default' | null>(() => (props.transition ? 'default' : null));\n useShoelaceAnimation(modal, 'dialog.show', animation);\n useShoelaceAnimation(modal, 'dialog.hide', animation);\n useShoelaceAnimation(modal, 'dialog.overlay.show', animation);\n useShoelaceAnimation(modal, 'dialog.overlay.hide', animation);\n\n const isVisible = ref(false);\n // NOTE(mohan): Don't do any expand transitions until the modal is fully\n // open.\n const enableExpandTransition = computed(() => !props.fullscreen && isVisible.value);\n\n const getDataTestAttr = (suffix?: string): string => {\n return suffix ? `${props.dataTest}-${suffix}` : props.dataTest;\n };\n\n const loadingMessage = computed(() => {\n return typeof props.loading === 'string' ? props.loading : null;\n });\n\n const dialogLabel = computed(() => {\n if (loadingMessage.value) {\n return loadingMessage.value;\n }\n\n return props.title || props.ariaLabel;\n });\n\n const footerHasContent = useSlotHasContent('footer');\n\n return {\n dialogLabel,\n loadingMessage,\n isVisible,\n enableExpandTransition,\n footerHasContent,\n onRequestClose,\n getDataTestAttr,\n modal,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/utils/a11y';\n\n.c-modal {\n &::part(body) {\n padding: 24px 24px 16px;\n }\n\n :deep() {\n .c-card-section {\n padding: 0 !important;\n }\n\n .c-card-footer {\n padding: 24px 0 0;\n }\n\n // NOTE(slanden): This is a bit of a hack to ensure that the content of the modal\n // stays within the bounds of the page and scrolls rather than continuing on past\n // the bottom of the page and getting lost.\n .c-expand-transition--disabled .c-expand-transition__content {\n height: 100%;\n }\n }\n}\n\n.c-modal__title {\n @include large-headline;\n\n padding: 0 0 8px;\n}\n\n.c-modal__dismiss {\n @include sr-only;\n}\n\n.c-modal__body {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.c-modal__content {\n display: flex;\n flex: auto;\n flex-direction: column;\n max-height: 100%;\n}\n\n.c-modal__footer {\n flex: none;\n padding: 24px 0 0;\n}\n\n.c-modal__loading {\n padding: 32px 0 24px;\n text-align: center;\n}\n\n.c-modal__loading__loader {\n line-height: 1;\n margin-bottom: 8px;\n}\n\n.c-modal--fullscreen {\n &::part(panel) {\n border-radius: 0;\n height: 100%;\n max-height: none;\n max-width: none;\n width: 100%;\n }\n\n &::part(body) {\n padding: calc(env(safe-area-inset-top, 0) + 12px) 16px max(env(safe-area-inset-bottom, 0), 12px);\n }\n\n .c-modal__wrapper {\n height: 100%;\n }\n}\n</style>\n","<template>\n <CModal\n :value=\"value\"\n :loading=\"message || true\"\n :data-test=\"dataTest\"\n :dismissible=\"false\"\n @input=\"$emit('input', $event)\"\n >\n <template #loading>\n <slot name=\"loading\" />\n </template>\n </CModal>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue';\nimport { defineComponent } from 'vue';\n\nimport CModal from '@propelinc/citrus-ui/src/components/CModal.vue';\n\nexport default defineComponent({\n name: 'CModalLoading',\n components: { CModal },\n props: {\n /** Controls whether or not the modal is showing */\n value: { type: Boolean, default: false },\n /** Controls the message shown below the Modal Loading icon */\n message: { type: String as PropType<string | null>, default: null },\n /** Prefix for test selectors */\n dataTest: { type: String, default: 'loading-modal' },\n },\n emits: ['input'],\n});\n</script>\n","<template>\n <div\n data-test=\"notification\"\n class=\"c-notification\"\n :class=\"{\n 'c-notification--alert': alert,\n 'c-notification--warning': warning,\n }\"\n >\n <CIconButton\n v-if=\"dismissible\"\n data-test=\"notification-dismiss\"\n variant=\"tertiary\"\n class=\"c-notification__close-button\"\n :icon=\"farXmark\"\n :aria-label=\"$t('Dismiss')\"\n @click=\"$emit('dismiss')\"\n />\n <slot name=\"title\">\n <div v-if=\"title || titleIcon\" class=\"c-notification__title\" data-test=\"notification-title\">\n <font-awesome-icon\n v-if=\"titleIcon\"\n class=\"c-notification__title-icon\"\n data-test=\"notification-title-icon\"\n :icon=\"titleIcon\"\n />\n <div data-test=\"notification-title-text\" class=\"c-notification__title-text\">\n <strong>{{ title }}</strong>\n </div>\n </div>\n </slot>\n\n <div data-test=\"notification-body\" class=\"c-notification__text\">\n <slot />\n </div>\n\n <CButton\n v-if=\"hasButton\"\n data-test=\"notification-button\"\n class=\"c-notification__button\"\n :loading=\"buttonLoading\"\n :to=\"buttonTo\"\n :href=\"buttonHref\"\n :target=\"buttonTarget\"\n @click=\"$emit('click:button')\"\n >\n {{ buttonText }}\n </CButton>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { faXmark as farXmark } from '@fortawesome/pro-regular-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport { computed, defineComponent } from 'vue';\n\nimport CButton from '@propelinc/citrus-ui/src/components/CButton/CButton.vue';\nimport CIconButton from '@propelinc/citrus-ui/src/components/CIconButton.vue';\n\nexport default defineComponent({\n components: { CButton, CIconButton, FontAwesomeIcon },\n props: {\n // TODO(mohan): Make this prop accessible.\n alert: { type: Boolean, default: false },\n warning: { type: Boolean, default: false },\n dismissible: { type: Boolean, default: false },\n title: { type: String, default: '' },\n titleIcon: { type: [String, Array, Object], default: undefined },\n buttonText: { type: String, default: undefined },\n buttonTo: { type: [Object, String], default: undefined },\n buttonHref: { type: String, default: undefined },\n buttonTarget: { type: String, default: undefined },\n buttonLoading: { type: Boolean, default: false },\n },\n emits: ['click:button', 'dismiss'],\n setup(props) {\n const hasButton = computed(() => !!props.buttonText);\n\n return { hasButton, farXmark };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-notification {\n background-color: $color-blue-100;\n border-radius: $border-radius-next;\n padding: 16px;\n position: relative;\n}\n\n.c-notification--alert {\n background-color: $color-red-100;\n}\n\n.c-notification--warning {\n background-color: $color-gold-100;\n}\n\n.c-notification__close-button {\n float: right;\n font-size: 14px;\n margin-right: -8px;\n margin-top: -8px;\n}\n\n.c-notification__title {\n align-items: center;\n display: flex;\n margin-bottom: 8px;\n}\n\n.c-notification__title-icon {\n margin-right: 8px;\n}\n\n.c-notification__title-text {\n flex: 1;\n}\n\n.c-notification__button {\n margin-top: 12px;\n}\n</style>\n","import { type Ref, type SetupContext, computed, ref } from 'vue';\n\nexport interface Field {\n input: HTMLInputElement | null;\n}\n\ninterface FocusableField {\n field: Ref<Field | null>;\n}\n\nexport function useFocusableField(expose: SetupContext['expose']): FocusableField {\n const field = ref<Field | null>(null);\n const input = computed(() => field.value?.input as HTMLInputElement);\n function focus(): void {\n input?.value.focus();\n }\n expose({ focus });\n return { field };\n}\n","<template>\n <CMaskedTextField\n v-bind=\"$attrs\"\n :id=\"id\"\n ref=\"field\"\n :value=\"value\"\n type=\"tel\"\n :label=\"label || $t('Phone number')\"\n mask=\"(###) ###-####\"\n :minlength=\"10\"\n :maxlength=\"10\"\n :placeholder=\"placeholder || '(555) 555-5555'\"\n :data-test=\"dataTest\"\n :rules=\"[...defaultRules, ...rules]\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n >\n <template #label>\n <slot name=\"label\" />\n </template>\n <template #message>\n <slot name=\"message\" />\n </template>\n </CMaskedTextField>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue';\nimport type { PropType } from 'vue';\n\nimport CMaskedTextField from '@propelinc/citrus-ui/src/components/CMaskedTextField.vue';\nimport { useFocusableField } from '@propelinc/citrus-ui/src/composables/fields';\nimport { useTranslation } from '@propelinc/citrus-ui/src/composables/i18n';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\nimport { minLengthRule } from '@propelinc/shared-utils';\n\nexport default defineComponent({\n name: 'CPhoneField',\n components: { CMaskedTextField },\n props: {\n /** A custom data-test attribute for the input. */\n dataTest: { type: String, default: 'phone-field' },\n /** A unique id for the input. */\n id: { type: String as PropType<string | undefined>, default: undefined },\n /** The input's label. */\n label: { type: String as PropType<string | null>, default: null },\n /** The input's placeholder. */\n placeholder: { type: String, default: '' },\n /** Additional validation rules. */\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n /** The value of the input. */\n value: { type: String, default: '' },\n },\n setup(_, { expose }) {\n const { t } = useTranslation();\n\n const defaultRules = computed(() => {\n const errorMessage = t('Please enter a valid {inputLabel}', {\n inputLabel: t('phone number'),\n });\n return [minLengthRule(10, errorMessage)];\n });\n\n const { field } = useFocusableField(expose);\n\n return { defaultRules, field };\n },\n});\n</script>\n","import type { InjectionKey, Ref } from 'vue';\n\nexport const SELECTED_VALUE = Symbol('selected-value') as InjectionKey<Ref<string>>;\nexport const TOGGLE_VALUE = Symbol('toggle-value') as InjectionKey<\n (value: string | undefined) => void\n>;\nexport const ROLE = Symbol('role') as InjectionKey<Ref<string>>;\n","<template>\n <span\n v-bind=\"$attrs\"\n :aria-checked=\"ariaChecked\"\n :class=\"{ 'c-pill--active': isSelected }\"\n class=\"c-pill\"\n data-test=\"pill\"\n :role=\"role\"\n @click=\"onClick\"\n >\n <span class=\"c-pill-body\" data-test=\"pill-body\">\n <span v-if=\"icon || $slots.icon\" class=\"c-pill-icon\">\n <slot name=\"icon\">\n <FontAwesomeIcon v-if=\"icon\" data-test=\"pill-icon\" fixed-width :icon=\"icon\" />\n </slot>\n </span>\n\n <span class=\"c-pill-text\">\n <slot />\n </span>\n </span>\n </span>\n</template>\n\n<script lang=\"ts\">\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport type { PropType } from 'vue';\nimport { computed, defineComponent, inject } from 'vue';\n\nimport {\n ROLE,\n SELECTED_VALUE,\n TOGGLE_VALUE,\n} from '@propelinc/citrus-ui/src/services/injections/pills';\nimport type { FaPropType } from '@propelinc/citrus-ui/src/types/font-awesome';\n\ntype ToggleVariant = 'standalone' | 'group' | 'none';\n\nexport default defineComponent({\n components: { FontAwesomeIcon },\n props: {\n /** By default, this is a boolean that determines if the pill is selected or\n not. If in a pill group, this is a string that identifies this pill. */\n value: {\n type: [Boolean, String] as PropType<boolean | string | undefined>,\n default: undefined,\n },\n /** The icon to display. */\n icon: { type: [String, Array, Object] as FaPropType, default: undefined },\n },\n emits: ['click', 'input'],\n setup(props, { emit }) {\n const injectedRole = inject(ROLE, undefined);\n const injectedSelectedValue = inject(SELECTED_VALUE, undefined);\n const toggleValue = inject(TOGGLE_VALUE, undefined);\n\n const toggleVariant = computed<ToggleVariant>(() => {\n if (toggleValue) {\n return 'group';\n }\n\n if (props.value !== undefined) {\n return 'standalone';\n }\n\n return 'none';\n });\n\n const isSelected = computed(() => {\n if (toggleVariant.value === 'standalone') {\n // @ts-expect-error - \"Expression produces a union type that is too complex to represent\" error\n // unclear why this is occurring, ignoring for now\n return props.value;\n }\n\n if (injectedSelectedValue?.value) {\n return injectedSelectedValue.value === props.value;\n }\n\n return undefined;\n });\n\n const ariaChecked = computed((): 'true' | 'false' | undefined => {\n if (isSelected.value === undefined) {\n return undefined;\n }\n\n return isSelected.value ? 'true' : 'false';\n });\n\n const role = computed(() => {\n if (toggleVariant.value === 'standalone') {\n return 'radio';\n }\n\n if (toggleVariant.value === 'group') {\n return injectedRole?.value ?? undefined;\n }\n\n return undefined;\n });\n\n const onClick = (): void => {\n if (toggleVariant.value === 'standalone') {\n emit('input', !props.value);\n }\n\n if (toggleVariant.value === 'group' && toggleValue) {\n const nextValue = isSelected.value ? undefined : (props.value as string);\n toggleValue(nextValue);\n }\n\n emit('click');\n };\n\n return {\n ariaChecked,\n isSelected,\n onClick,\n role,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-pill {\n background-color: $color-white;\n border: $border-width solid $color-border;\n border-radius: $border-radius-next;\n color: $color-text-primary;\n display: inline-block;\n font-family: $font-family-polymath;\n height: $button-size-medium;\n padding-inline: 12px;\n}\n\n.c-pill--active {\n background-color: $color-black;\n border-color: $color-black;\n color: $color-white;\n}\n\n.c-pill-body {\n align-items: center;\n display: flex;\n gap: 8px;\n height: 100%;\n\n /**\n * Improves icon alignment\n */\n line-height: 1;\n white-space: nowrap;\n}\n\n.c-pill-icon {\n width: 16px;\n}\n</style>\n","<template>\n <div class=\"c-pill-group\" data-test=\"pill-group\">\n <fieldset class=\"c-pill-group__track\">\n <slot>\n <CPill\n v-for=\"option in options\"\n :key=\"option.value\"\n :value=\"option.value\"\n :icon=\"option.icon\"\n >\n {{ option.label }}\n </CPill>\n </slot>\n </fieldset>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue';\nimport { computed, defineComponent, provide, ref } from 'vue';\n\nimport CPill from '@propelinc/citrus-ui/src/components/CPill.vue';\nimport {\n ROLE,\n SELECTED_VALUE,\n TOGGLE_VALUE,\n} from '@propelinc/citrus-ui/src/services/injections/pills';\nimport type { FaIcon } from '@propelinc/citrus-ui/src/types/font-awesome';\n\ninterface PillConfig {\n label: string;\n value: string;\n icon?: FaIcon;\n}\n\nexport default defineComponent({\n components: { CPill },\n props: {\n /** Specifies which pill is selected. */\n value: { type: String as PropType<string>, default: () => '' },\n /** A list of pills to display. This is overwritten by the default slot. */\n options: { type: Array as PropType<PillConfig[]>, default: () => [] },\n },\n emits: ['input'],\n setup(props, { emit }) {\n provide(ROLE, ref('radio'));\n provide(\n SELECTED_VALUE,\n computed(() => props.value)\n );\n provide(TOGGLE_VALUE, (value) => {\n emit('input', value);\n });\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-pill-group {\n overflow: scroll hidden;\n padding: 0 16px;\n}\n\n.c-pill-group__track {\n border: none;\n display: block;\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n}\n</style>\n","<template>\n <sl-popup ref=\"popup\" :active=\"value\" distance=\"8\" class=\"c-popup\">\n <span slot=\"anchor\" class=\"anchor\">\n <slot />\n </span>\n <slot name=\"content\" />\n </sl-popup>\n</template>\n\n<script lang=\"ts\">\nimport { type SlPopup } from '@shoelace-style/shoelace';\nimport '@shoelace-style/shoelace/dist/components/popup/popup.js';\nimport { defineComponent, onMounted, onUnmounted, ref, watchEffect } from 'vue';\n\nexport default defineComponent({\n name: 'CPopup',\n props: {\n value: { type: Boolean, default: false },\n },\n emits: ['mouseleave', 'outside-click'],\n setup(props, { emit }) {\n const popup = ref<SlPopup | null>(null);\n\n const handleMouseLeave = (): void => {\n if (props.value) {\n emit('mouseleave');\n }\n };\n\n const handleOutsideClick = ({ target }: MouseEvent): void => {\n if (target instanceof HTMLElement && !popup.value?.contains(target)) {\n emit('outside-click');\n }\n };\n\n watchEffect(async () => {\n if (props.value) {\n document.addEventListener('click', handleOutsideClick);\n } else {\n document.removeEventListener('click', handleOutsideClick);\n }\n });\n\n onMounted(() => {\n popup.value?.addEventListener('mouseleave', handleMouseLeave);\n });\n\n onUnmounted(() => {\n document.removeEventListener('click', handleOutsideClick);\n popup.value?.removeEventListener('mouseleave', handleMouseLeave);\n });\n\n return { popup };\n },\n});\n</script>\n\n<style scoped>\n.c-popup::part(popup) {\n z-index: 1;\n}\n\n.anchor {\n height: fit-content;\n}\n</style>\n","<template>\n <sl-progress-bar\n class=\"c-progress-linear\"\n :class=\"{ 'c-progress-linear--rounded': rounded }\"\n :data-test=\"dataTest\"\n :value=\"value\"\n :indeterminate=\"indeterminate || undefined\"\n :label=\"accessibleText || $t('Loading...')\"\n />\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport '@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js';\n\nexport default defineComponent({\n props: {\n /** Customizes screen reader only text alternative, should be translated */\n accessibleText: { type: String, default: undefined },\n /** Selector for testing */\n dataTest: { type: String, default: 'c-progress-linear' },\n /** Renders an indefinite loading state */\n indeterminate: { type: Boolean, default: false },\n /** Rounds the progress bar */\n rounded: { type: Boolean, default: true },\n /** The current progress from 0 to 100 */\n value: { type: [Number, String], default: 0 },\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n$progress-linear-height: 4px;\n\n.c-progress-linear {\n --height: #{$progress-linear-height};\n --indicator-color: #{$color-black};\n --track-color: #{$color-gray-200};\n\n &::part(base) {\n border-radius: 0;\n }\n}\n\n.c-progress-linear--rounded {\n &::part(base) {\n border-radius: calc(#{$progress-linear-height} / 2);\n }\n}\n</style>\n","<template>\n <span\n class=\"c-progress-ring\"\n :data-test=\"dataTest\"\n :aria-label=\"accessibleText || $t('Loading...')\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"String(valueMax)\"\n :aria-valuenow=\"String(value)\"\n :style=\"{\n '--size': `${size}px`,\n '--indicator-color': cssColor,\n '--track-color': trackCssColor,\n '--track-width': `${trackWidth}px`,\n '--indicator-length': `${percentage}`,\n }\"\n >\n <svg class=\"c-progress-ring__svg\">\n <circle class=\"c-progress-ring__track\" />\n <circle class=\"c-progress-ring__indicator\" pathLength=\"100\" />\n </svg>\n <span class=\"c-progress-ring__label\">\n <slot />\n </span>\n </span>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, computed, defineComponent } from 'vue';\n\nimport type Colors from '@propelinc/citrus-ui/src/colors/colors';\nimport { type HexColor, isValidColor } from '@propelinc/citrus-ui/src/colors/colors';\nimport { useCssColor } from '@propelinc/citrus-ui/src/composables/colors';\n\nexport default defineComponent({\n props: {\n /** Customizes screen reader only text alternative, should be translated */\n accessibleText: { type: String, default: undefined },\n /** Selector for testing */\n dataTest: { type: String, default: 'c-progress-ring' },\n /** The current progress, from 0 to valueMax */\n value: { type: [Number, String], default: 0 },\n /** Total progress */\n valueMax: { type: [Number, String], default: 100 },\n /** The outer diameter of the progress ring, in px */\n size: { type: [Number, String], default: 44 },\n /** The width of the progress ring, in px */\n trackWidth: { type: [Number, String], default: 4 },\n /** Sets the indicator color */\n color: {\n type: String as PropType<HexColor | keyof typeof Colors>,\n default: 'blue-500',\n validator: isValidColor,\n },\n /** Sets the track color underneath the indicator */\n trackColor: {\n type: String as PropType<HexColor | keyof typeof Colors>,\n default: 'gray-200',\n validator: isValidColor,\n },\n },\n setup(props) {\n const { cssColor } = useCssColor(() => props.color);\n const { cssColor: trackCssColor } = useCssColor(() => props.trackColor);\n\n const percentage = computed(() => (100 * Number(props.value)) / Number(props.valueMax));\n\n return {\n percentage,\n cssColor,\n trackCssColor,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-progress-ring {\n align-items: center;\n display: inline-flex;\n flex-shrink: 0;\n font-size: var(--size);\n height: 1em;\n justify-content: center;\n position: relative;\n width: 1em;\n\n &__label {\n color: var(--indicator-color);\n font-size: $font-size-small;\n font-weight: $font-weight-bold;\n }\n\n &__svg {\n height: 100%;\n position: absolute;\n width: 100%;\n }\n\n &__indicator,\n &__track {\n cx: 0.5em;\n cy: 0.5em;\n fill: none;\n r: calc(0.5em - var(--track-width) / 2);\n stroke-width: var(--track-width);\n }\n\n &__indicator {\n stroke: var(--indicator-color);\n\n /* The empty gap equal to the path length 100 to make the rest of the circle empty. */\n stroke-dasharray: var(--indicator-length) 100;\n stroke-linecap: round;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: stroke-dasharray 0.2s;\n }\n\n &__track {\n stroke: var(--track-color);\n }\n}\n</style>\n","import type { InjectionKey, Ref } from 'vue';\n\nexport interface RadioState {\n value: unknown;\n invalid: boolean;\n name: string;\n update: (value: unknown) => void;\n register: (value: unknown) => void;\n unregister: (value: unknown) => void;\n}\n\nexport const RADIO_STATE = Symbol('radio-state') as InjectionKey<Ref<RadioState>>;\n","<template>\n <label\n :id=\"idWithFallback\"\n :for=\"`${idWithFallback}-input`\"\n :data-test=\"dataTest\"\n :data-selected=\"parentState.value === value || undefined\"\n class=\"c-radio\"\n :class=\"{\n 'c-radio--invalid': parentState.invalid,\n 'c-radio--checked': parentState.value === value,\n }\"\n >\n <input\n :id=\"`${idWithFallback}-input`\"\n type=\"radio\"\n :data-test=\"`${dataTest}-input`\"\n class=\"c-radio__input\"\n :class=\"{ 'sr-only': hideRadio }\"\n :name=\"parentState.name\"\n :value=\"value\"\n :checked=\"parentState.value === value || undefined\"\n @change=\"onChange($event)\"\n @blur=\"$emit('blur')\"\n @focus=\"$emit('focus')\"\n />\n <slot name=\"label\">{{ label }} </slot>\n </label>\n</template>\n\n<script lang=\"ts\">\nimport {\n type PropType,\n defineComponent,\n inject,\n onBeforeUnmount,\n onMounted,\n ref,\n toRefs,\n} from 'vue';\n\nimport { useId } from '@propelinc/citrus-ui/src/composables/id';\nimport { RADIO_STATE } from '@propelinc/citrus-ui/src/services/injections/radio';\nimport type { RadioState } from '@propelinc/citrus-ui/src/services/injections/radio';\n\nexport default defineComponent({\n name: 'CRadio',\n props: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: { type: null as unknown as PropType<any>, required: true },\n id: { type: String as PropType<string | null>, default: null },\n label: { type: String as PropType<string | null>, default: null },\n dataTest: { type: String, default: 'radio-group-option' },\n hideRadio: { type: Boolean, default: false },\n },\n emits: ['change', 'blur', 'focus'],\n setup(props, { emit }) {\n const { id } = toRefs(props);\n const idWithFallback = useId(id);\n\n const parentState = inject(\n RADIO_STATE,\n ref<RadioState>({\n value: null,\n name: idWithFallback.value,\n invalid: false,\n update: () => {},\n register: () => {},\n unregister: () => {},\n })\n );\n\n const onChange = (event: Event): void => {\n const target = event.target as HTMLInputElement;\n parentState.value.update(target.checked ? props.value : null);\n emit('change', event);\n };\n\n onMounted((): void => {\n parentState.value.register(props.value);\n });\n\n onBeforeUnmount((): void => {\n parentState.value.unregister(props.value);\n });\n\n return {\n idWithFallback,\n parentState,\n onChange,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/form-fields';\n\n.c-radio {\n align-items: center;\n background-color: $color-background;\n border: $border;\n border-radius: $border-radius-next;\n cursor: pointer;\n display: flex;\n gap: 12px;\n padding: 12px;\n transition: border-color $citrus-field-transition-duration ease;\n width: 100%;\n}\n\n.c-radio__input {\n accent-color: $color-black;\n background-color: $color-black;\n border: $color-gray-300 solid $border-width;\n border-color: $color-black;\n margin-top: 1px;\n transform: scale(1.5);\n}\n\n.c-radio__label {\n padding: 0 12px;\n width: 100%;\n}\n\n.c-radio--checked {\n border-color: $color-black;\n}\n\n.c-radio--invalid {\n border-color: $color-status-error;\n}\n\n.c-radio--invalid .c-radio__input {\n accent-color: $color-status-error;\n border-color: $color-status-error;\n}\n</style>\n","<template>\n <fieldset\n :id=\"idWithFallback\"\n ref=\"radioGroup\"\n :data-test=\"dataTest\"\n role=\"radiogroup\"\n class=\"c-radio-group\"\n :class=\"{\n 'c-radio-group--column': column,\n 'c-radio-group--row': !column,\n 'c-radio-group--invalid': !isValidationValid,\n }\"\n :aria-invalid=\"isValidationValid ? 'false' : 'true'\"\n :aria-labelledby=\"`${idWithFallback}-label`\"\n :aria-errormessage=\"`${idWithFallback}-message`\"\n >\n <span :id=\"`${idWithFallback}-label`\" :data-test=\"`${dataTest}-label`\">\n <slot name=\"label\">{{ label }}</slot>\n </span>\n\n <slot />\n\n <CValidationMessage\n :id=\"`${idWithFallback}-message`\"\n :data-test=\"`${dataTest}-message`\"\n :validation-message=\"validationMessage\"\n :hide=\"hideDetails\"\n >\n <slot name=\"message\" />\n </CValidationMessage>\n </fieldset>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, computed, defineComponent, provide, ref, toRefs, watch } from 'vue';\n\nimport CValidationMessage from '@propelinc/citrus-ui/src/components/CValidationMessage.vue';\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\nimport { useId } from '@propelinc/citrus-ui/src/composables/id';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\nimport { useValidations } from '@propelinc/citrus-ui/src/composables/validations';\nimport { RADIO_STATE } from '@propelinc/citrus-ui/src/services/injections/radio';\n\nexport default defineComponent({\n name: 'CRadioGroup',\n components: { CValidationMessage },\n props: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: { type: null as unknown as PropType<any>, default: null },\n id: { type: String as PropType<string | null>, default: null },\n dataTest: { type: String, default: 'radio-group' },\n label: { type: String as PropType<string | null>, default: null },\n column: { type: Boolean, default: true },\n mandatory: { type: Boolean, default: false },\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n hideDetails: { type: Boolean as PropType<boolean | 'auto'>, default: false },\n },\n emits: ['change', 'input'],\n setup(props, { emit }) {\n const { value, rules, id, mandatory } = toRefs(props);\n const idWithFallback = useId(id);\n const radioGroup = ref<HTMLElement | null>(null);\n\n const internalValue = useInternalValue(value, {\n onChange: (newValue) => {\n emit('change', newValue);\n emit('input', newValue);\n },\n });\n\n const {\n startValidating,\n message: validationMessage,\n valid: isValidationValid,\n } = useValidations({\n id: idWithFallback,\n value: internalValue,\n rules,\n required: mandatory,\n validateOn: 'change',\n });\n\n provide(\n RADIO_STATE,\n computed(() => ({\n invalid: !isValidationValid.value,\n value: internalValue.value,\n name: idWithFallback.value,\n update: (newValue: unknown): void => {\n internalValue.value = newValue;\n },\n register: (value: unknown): void => {\n if (props.mandatory && internalValue.value === null) {\n internalValue.value = value;\n }\n },\n unregister: (value: unknown): void => {\n if (internalValue.value === value) {\n internalValue.value = null;\n }\n },\n }))\n );\n\n watch(internalValue, () => {\n startValidating();\n });\n\n return {\n idWithFallback,\n isValidationValid,\n radioGroup,\n validationMessage,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/form-fields';\n\n.c-radio-group {\n border: none;\n display: flex;\n flex-direction: row;\n gap: 8px;\n width: 100%;\n\n &.c-radio-group--column {\n flex-direction: column;\n }\n\n &--row {\n align-items: center;\n\n :deep(.c-radio) {\n width: auto;\n }\n }\n}\n</style>\n","<template>\n <div :class=\"{ 'w-100': fullWidth }\">\n <slot />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n/**\n * NOTE(slanden): This component is no longer used. We are keeping it around for now\n * because it is used in the CMS, but other than applying the w-100 class, it has\n * no effect. We will remove this component in a future PR.\n */\n\nwithDefaults(\n defineProps<{\n fullWidth?: boolean;\n }>(),\n {\n fullWidth: false,\n }\n);\n</script>\n\n<style scoped>\n.w-100 {\n width: 100%;\n}\n</style>\n","<template>\n <div\n class=\"c-row\"\n :class=\"{\n 'c-row--dense': dense,\n 'c-row--no-gutters': noGutters,\n [`align-${align}`]: align,\n [`align-content-${alignContent}`]: alignContent,\n [`justify-${justify}`]: justify,\n }\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, defineComponent } from 'vue';\n\nexport default defineComponent({\n props: {\n /** Applies the align-items css property.\n * Available options are: start, center, end and stretch. */\n align: {\n type: String as PropType<'center' | 'start' | 'end' | 'stretch'>,\n default: null,\n },\n /** Applies the align-content css property.\n * Available options are: start, center, end, and stretch. */\n alignContent: {\n type: String as PropType<'center' | 'start' | 'end' | 'stretch'>,\n default: null,\n },\n /** Reduces the gutter between c-cols. */\n dense: { type: Boolean, default: false },\n /** Removes the gutter between c-cols. */\n noGutters: { type: Boolean, default: false },\n /** Applies the justify-content css property.\n * Available options are: start, center, end, space-between and space-around. */\n justify: {\n type: String as PropType<'center' | 'start' | 'end' | 'space-between' | 'space-around'>,\n default: null,\n },\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n.c-row {\n display: flex;\n flex: 1 1 auto;\n flex-wrap: wrap;\n margin: 0 -12px;\n}\n\n.c-row--dense {\n margin: 0 -4px;\n}\n\n.c-row--no-gutters {\n margin: 0;\n}\n</style>\n","<template>\n <div class=\"c-safe-area\">\n <slot />\n </div>\n</template>\n\n<style scoped>\n.c-safe-area {\n --full-height: 100vh;\n\n display: flex;\n flex-direction: column;\n height: calc(var(--full-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));\n max-width: 100%;\n overflow: scroll;\n}\n\n@supports (height: 100dvh) {\n .c-safe-area {\n --full-height: 100dvh;\n }\n}\n</style>\n","<template>\n <div class=\"c-section-header\" data-test=\"section-header\">\n <component :is=\"tag\" class=\"c-section-header__title\" data-test=\"section-header-title\">\n {{ title }}\n </component>\n <slot name=\"append\" />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent, provide, ref } from 'vue';\n\nimport { TERTIARY as TERTIARY_ICON_BUTTON } from '@propelinc/citrus-ui/src/services/injections/icon-buttons';\n\nexport default defineComponent({\n props: {\n /** The title text to display. */\n title: { type: String, default: '' },\n /** The tag used for the title text. */\n tag: { type: String, default: 'h2' },\n },\n setup(): void {\n provide(TERTIARY_ICON_BUTTON, ref(true));\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/utils/typography';\n\n.c-section-header {\n align-items: center;\n display: flex;\n gap: 12px;\n height: 48px;\n justify-content: space-between;\n}\n\n.c-section-header__title {\n @include headline;\n @include text-overflow-ellipsis;\n\n flex: 1 1 auto;\n}\n\n.c-card + .c-section-header {\n margin-top: 16px;\n}\n</style>\n","<!--\n This Skeleton component is the foundation for all of our skeleton loader components.\n\n In most cases, you will use a more specific version of this component, such as\n CSkeletonLoaderCard, CSkeletonLoaderText, CSkeletonLoaderCircle, etc.\n\n However, you can create custom skeleton loaders ad-hoc through composition. For example, a custom\n loader text component could be created like this:\n\n ```vue\n <div v-for=\"x in 3\" :key=\"x\">\n <div class=\"d-flex w-full\" style=\"font-size: 42px; line-height: 130%;\">\n <div style=\"height: 16px;\">\n <CSkeleton />\n </div>\n <span>&nbsp;</span>\n </div>\n </div>\n ```\n-->\n\n<template>\n <div class=\"c-skeleton\" data-test=\"skeleton\">\n <div class=\"c-skeleton__indicator\" />\n </div>\n</template>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-skeleton {\n display: flex;\n height: 100%;\n min-height: 1rem;\n position: relative;\n width: 100%;\n}\n\n.c-skeleton__indicator {\n --color: #{$color-gray-100};\n --sheen-color: #{$color-gray-200};\n\n animation: sheen 8s ease-in-out infinite;\n background: linear-gradient(\n 270deg,\n var(--sheen-color),\n var(--color),\n var(--color),\n var(--sheen-color)\n );\n background-size: 400% 100%;\n border-radius: $border-radius-next;\n flex: 1 1 auto;\n}\n\n@keyframes sheen {\n 0% {\n background-position: 200% 0;\n }\n\n 100% {\n background-position: -200% 0;\n }\n}\n</style>\n","<template>\n <div\n class=\"c-skeleton-loader-card\"\n data-test=\"skeleton-loader-card\"\n :style=\"{ height: `${height}px` }\"\n >\n <CSkeleton />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nimport CSkeleton from '@propelinc/citrus-ui/src/components/CSkeleton.vue';\n\nexport default defineComponent({\n components: {\n CSkeleton,\n },\n props: {\n /** Controls the height of the skeleton loader card */\n height: {\n type: [Number, String],\n required: false,\n default: 100,\n },\n },\n});\n</script>\n","<template>\n <div class=\"c-skeleton-loader-circle\" data-test=\"skeleton-loader-circle\">\n <CSkeleton />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nimport CSkeleton from '@propelinc/citrus-ui/src/components/CSkeleton.vue';\n\nexport default defineComponent({\n components: {\n CSkeleton,\n },\n});\n</script>\n\n<style scoped>\n.c-skeleton-loader-circle {\n --size: 36px;\n\n border-radius: calc(var(--size) / 2);\n height: var(--size);\n overflow: hidden;\n width: var(--size);\n}\n</style>\n","<template>\n <div\n data-test=\"skeleton-loader-text\"\n class=\"c-skeleton-loader-text\"\n :class=\"{ [`align-${align}`]: align }\"\n >\n <div\n v-for=\"x in rows\"\n :key=\"x\"\n :class=\"lineTypeClass\"\n class=\"c-skeleton-loader-text__line\"\n data-test=\"skeleton-loader-text-line\"\n >\n <CSkeleton class=\"c-skeleton-loader-text__line__skeleton\" />\n <!-- This invisible text ensures the line height matches the real text. -->\n &nbsp;\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, computed, defineComponent } from 'vue';\n\nimport CSkeleton from '@propelinc/citrus-ui/src/components/CSkeleton.vue';\n\ntype SkeletonLoaderType =\n | 'balance'\n | 'body'\n | 'caption'\n | 'eyebrow'\n | 'headline'\n | 'large-headline'\n // @deprecated use 'eyebrow' instead\n | 'overline'\n | 'statement'\n | 'subheadline'\n | 'wallet-caption'\n | 'x-large-headline';\n\nconst LINE_TYPE_TO_CLASS: Record<SkeletonLoaderType, string> = {\n 'balance': 'c-skeleton-loader-text__line--balance',\n 'body': 'c-skeleton-loader-text__line--body',\n 'caption': 'c-skeleton-loader-text__line--caption',\n 'eyebrow': 'c-skeleton-loader-text__line--eyebrow',\n 'headline': 'c-skeleton-loader-text__line--headline',\n 'large-headline': 'c-skeleton-loader-text__line--large-headline',\n // @deprecated use 'eyebrow' instead\n 'overline': 'c-skeleton-loader-text__line--eyebrow',\n 'statement': 'c-skeleton-loader-text__line--statement',\n 'subheadline': 'c-skeleton-loader-text__line--subheadline',\n 'wallet-caption': 'c-skeleton-loader-text__line--wallet-caption',\n 'x-large-headline': 'c-skeleton-loader-text__line--x-large-headline',\n};\n\nexport default defineComponent({\n components: {\n CSkeleton,\n },\n props: {\n /** Applies the align-items css property. */\n align: { type: String as PropType<'center' | 'start' | 'end'>, default: 'start' },\n /** Controls how many rows of loading text are shown */\n rows: { type: Number, default: 2 },\n /** Controls the appearance of the loading text */\n type: { type: String as PropType<SkeletonLoaderType>, default: 'body' },\n },\n setup(props) {\n const lineTypeClass = computed(() => {\n return LINE_TYPE_TO_CLASS[props.type];\n });\n\n return { lineTypeClass };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n// NOTE(mohan): This ensures that the skeleton loader text is exactly the same size as the text it\n// is replacing including the extra space around the text itself added by the line height.\n@mixin skeleton-loader-text-sizing($font-style) {\n font-size: map-get($font-style, 'size');\n line-height: map-get($font-style, 'line-height');\n\n // By applying a height equal to the font size, the skeleton takes up the space of the text,\n // leaving whitespace between each row\n .c-skeleton-loader-text__line__skeleton {\n height: map-get($font-style, 'size');\n }\n}\n\n.c-skeleton-loader-text {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n\n.c-skeleton-loader-text__line {\n @include skeleton-loader-text-sizing($body);\n\n align-items: center;\n display: flex;\n width: 100%;\n\n &:last-child {\n width: calc(100% - 32px);\n }\n}\n\n.c-skeleton-loader-text__line--balance {\n @include skeleton-loader-text-sizing($balance);\n\n max-width: 120px;\n}\n\n.c-skeleton-loader-text__line--caption {\n @include skeleton-loader-text-sizing($caption);\n}\n\n.c-skeleton-loader-text__line--eyebrow {\n @include skeleton-loader-text-sizing($eyebrow);\n}\n\n.c-skeleton-loader-text__line--headline {\n @include skeleton-loader-text-sizing($headline);\n}\n\n.c-skeleton-loader-text__line--large-headline {\n @include skeleton-loader-text-sizing($large-headline);\n}\n\n.c-skeleton-loader-text__line--statement {\n @include skeleton-loader-text-sizing($statement);\n}\n\n.c-skeleton-loader-text__line--subheadline {\n @include skeleton-loader-text-sizing($subheadline);\n}\n\n.c-skeleton-loader-text__line--wallet-caption {\n @include skeleton-loader-text-sizing($wallet-caption);\n}\n\n.c-skeleton-loader-text__line--x-large-headline {\n @include skeleton-loader-text-sizing($x-large-headline);\n}\n</style>\n","<template>\n <div :class=\"direction\" :style=\"{ '--slide-fade-amount': `${amount}px` }\">\n <Transition name=\"slide-fade\" mode=\"out-in\">\n <slot />\n </Transition>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, defineComponent } from 'vue';\n\ntype Direction = 'to-left' | 'to-right' | 'to-top' | 'to-bottom';\n\n/**\n * This component can be used to create a slide-fade transition for children.\n *\n * FIXME: Vue 3 Conversion - Remove this comment when Vue 3 conversion is complete.\n * NOTE: For Vue 2 usage: if you are conditionally rendering children, be sure to add unique\n * keys to each child!\n *\n * Example:\n * ```vue\n * <CSlideFadeTransition>\n * <div v-if=\"condition\" :key=\"if\">This will slide in</div>\n * <div v-else :key=\"else\">This will slide out</div>\n * </CSlideFadeTransition>\n * ```\n */\nexport default defineComponent({\n name: 'CSlideFadeTransition',\n props: {\n /**\n * The amount of pixels to slide the elements in or out\n * @default 20\n */\n amount: {\n type: Number,\n default: 20,\n validator(value: number) {\n return value >= 0;\n },\n },\n /**\n * Changes the direction of the slide fade transition\n * @default 'to-left'\n */\n direction: {\n type: String as PropType<Direction>,\n default: 'to-left',\n },\n },\n});\n</script>\n\n<style scoped>\n.slide-fade-enter-active,\n.slide-fade-leave-active {\n transition: all 0.3s ease-out;\n}\n\n/* TODO: Can remove `*-enter` classes when we upgrade to Vue 3 */\n.slide-fade-enter,\n/* Preemptively adding Vue 3 classes */\n.slide-fade-enter-from,\n.slide-fade-leave-to {\n opacity: 0;\n}\n\n/* TODO: Can remove `*-enter` classes when we upgrade to Vue 3 */\n.to-left .slide-fade-enter,\n/* Preemptively adding Vue 3 classes */\n.to-left .slide-fade-enter-from,\n.to-left .slide-fade-leave-to {\n transform: translateX(calc(-1 * var(--slide-fade-amount)));\n}\n\n/* TODO: Can remove `*-enter` classes when we upgrade to Vue 3 */\n.to-right .slide-fade-enter,\n/* Preemptively adding Vue 3 classes */\n.to-right .slide-fade-enter-from,\n.to-right .slide-fade-leave-to {\n transform: translateX(var(--slide-fade-amount));\n}\n\n/* TODO: Can remove `*-enter` classes when we upgrade to Vue 3 */\n.to-top .slide-fade-enter,\n/* Preemptively adding Vue 3 classes */\n.to-top .slide-fade-enter-from,\n.to-top .slide-fade-leave-to {\n transform: translateY(calc(-1 * var(--slide-fade-amount)));\n}\n\n/* TODO: Can remove `*-enter` classes when we upgrade to Vue 3 */\n.to-bottom .slide-fade-enter,\n/* Preemptively adding Vue 3 classes */\n.to-bottom .slide-fade-enter-from,\n.to-bottom .slide-fade-leave-to {\n transform: translateY(var(--slide-fade-amount));\n}\n</style>\n","<template>\n <CMaskedTextField\n v-bind=\"$attrs\"\n :data-test=\"dataTest\"\n class=\"c-split-input\"\n :type=\"type\"\n :label=\"label\"\n :name=\"name\"\n :inputmode=\"inputmode\"\n :value=\"value\"\n :rules=\"rules\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :autocomplete=\"autocomplete\"\n size=\"large\"\n :mask=\"mask\"\n @input:masked=\"maskedValue = $event\"\n >\n <template #label>\n <slot name=\"label\" />\n </template>\n <template #message>\n <slot name=\"message\" />\n </template>\n </CMaskedTextField>\n</template>\n\n<script lang=\"ts\">\nimport type { HTMLAttributes, PropType } from 'vue';\nimport { computed, defineComponent, ref, toRefs } from 'vue';\n\nimport CMaskedTextField from '@propelinc/citrus-ui/src/components/CMaskedTextField.vue';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\nimport type { SplitInputField } from '@propelinc/citrus-ui/src/types';\n\nexport default defineComponent({\n name: 'CSplitInput',\n components: { CMaskedTextField },\n props: {\n /** Custom data-test selector */\n dataTest: { type: String, default: 'split-input' },\n /** The input's type, either text or tel */\n type: { type: String as PropType<'text' | 'tel'>, default: 'text' },\n /** The input's label */\n label: { type: String as PropType<string | null>, default: null },\n /** The input's name */\n name: { type: String as PropType<string | undefined>, default: undefined },\n /** A hint to show the appropriate virtual keyboard, e.g. \"numeric\". */\n inputmode: {\n type: String as PropType<HTMLAttributes['inputmode'] | undefined>,\n default: undefined,\n },\n /** The input's value */\n value: { type: String, default: '' },\n /** The fields for each of the split inputs of type SplitInputField */\n fields: {\n type: Array as PropType<SplitInputField[]>,\n required: true,\n },\n /** Validation rules */\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n /** Controls whether the input is disabled */\n disabled: { type: Boolean, default: false },\n /** Controls the underlying input's autocomplete attribute */\n autocomplete: { type: String, default: undefined },\n },\n setup(props) {\n const { fields } = toRefs(props);\n\n const maskedValue = ref('');\n\n const placeholder = computed(() => {\n return fields.value\n .map((field) => `${field.placeholder ?? ''}${field.separator ?? ''}`)\n .join('');\n });\n\n const mask = computed(() => {\n return fields.value\n .map((field) => `${Array(field.characters).fill('*').join('')}${field.separator ?? ''}`)\n .join('');\n });\n\n return { placeholder, mask, maskedValue };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n@mixin split-input-text {\n @include headline;\n\n letter-spacing: 12px;\n line-height: 1;\n text-align: center;\n}\n\n.c-split-input {\n &::part(input) {\n @include split-input-text;\n }\n\n &::part(input)::placeholder {\n @include split-input-text;\n\n font-weight: $font-weight-normal;\n }\n}\n</style>\n","<template>\n <CMaskedTextField\n v-bind=\"$attrs\"\n :id=\"id\"\n ref=\"field\"\n :data-test=\"dataTest\"\n :value=\"value\"\n :label=\"label || defaultLabel\"\n :placeholder=\"fourDigitSsn ? 'XXXX' : 'XXX-XX-XXXX'\"\n inputmode=\"numeric\"\n :mask=\"fourDigitSsn ? '####' : '###-##-####'\"\n :minlength=\"fourDigitSsn ? 4 : 9\"\n :maxlength=\"fourDigitSsn ? 4 : 9\"\n :hideable=\"!fourDigitSsn\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n :rules=\"computedRules\"\n @input=\"$emit('input', $event)\"\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @change=\"$emit('change', $event)\"\n >\n <template #label>\n <slot name=\"label\" />\n </template>\n <template #message>\n <slot name=\"message\" />\n </template>\n <template #append>\n <!-- NOTE(mohan): When requesting the full SSN, we have to leave space for\n the hide/show icon. -->\n <FontAwesomeIcon v-if=\"fourDigitSsn\" :icon=\"faLock\" fixed-width />\n </template>\n </CMaskedTextField>\n</template>\n\n<script lang=\"ts\">\nimport { faLock } from '@fortawesome/pro-regular-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport { type PropType, computed, defineComponent } from 'vue';\n\nimport CMaskedTextField from '@propelinc/citrus-ui/src/components/CMaskedTextField.vue';\nimport { useFocusableField } from '@propelinc/citrus-ui/src/composables/fields';\nimport { useTranslation } from '@propelinc/citrus-ui/src/composables/i18n';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\nimport { minLengthRule } from '@propelinc/shared-utils';\n\nexport default defineComponent({\n name: 'CSsnField',\n components: { CMaskedTextField, FontAwesomeIcon },\n props: {\n dataTest: { type: String, default: 'ssn-field' },\n id: { type: String, default: undefined },\n label: { type: String as PropType<string | null>, default: null },\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n value: { type: String, default: '' },\n fourDigitSsn: { type: Boolean, default: false },\n },\n emits: ['input', 'focus', 'blur', 'change'],\n setup(props, { expose }) {\n const { t } = useTranslation();\n const defaultLabel = computed(() => {\n return props.fourDigitSsn ? t('Last 4 digits of SSN') : t('Social Security number');\n });\n const defaultRules = computed(() => {\n const fourDigitRule = minLengthRule(4, t('Please enter the last four digits of your SSN'));\n const fullSsnRule = minLengthRule(\n 9,\n t('Please enter a valid {inputLabel}', { inputLabel: t('Social Security number') })\n );\n return [props.fourDigitSsn ? fourDigitRule : fullSsnRule];\n });\n\n const computedRules = computed(() => [...defaultRules.value, ...props.rules]);\n\n const { field } = useFocusableField(expose);\n\n return {\n defaultLabel,\n computedRules,\n faLock,\n field,\n };\n },\n});\n</script>\n","<template>\n <div\n class=\"c-status-dot\"\n :class=\"{\n 'c-status-dot--count': hasCount,\n 'c-status-dot--bordered': bordered,\n }\"\n data-test=\"status-dot\"\n role=\"img\"\n >\n {{ displayCount }}\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue';\nimport { computed, defineComponent } from 'vue';\n\nimport { useA11yLabelCheck } from '@propelinc/citrus-ui/src/composables/accessibility';\n\nexport default defineComponent({\n props: {\n count: { type: Number as PropType<number | null>, default: null },\n bordered: { type: Boolean, default: false },\n },\n setup(props) {\n useA11yLabelCheck('CStatusDot');\n\n const hasCount = computed(() => props.count !== null);\n const displayCount = computed(() => {\n return props.count && props.count > 9 ? '9+' : props.count;\n });\n\n return { displayCount, hasCount };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-status-dot {\n background-color: $color-status-error;\n border-radius: 9999px;\n display: inline-block;\n height: 8px;\n width: 8px;\n}\n\n.c-status-dot--bordered {\n box-shadow: 0 0 0 1.5px $color-white;\n}\n\n/**\n * For users that may increase their font size for legibility,\n * we use rems so the circle grows if the font size increases.\n */\n.c-status-dot--count {\n align-items: center;\n color: $color-white;\n display: flex;\n font-size: 0.625rem;\n font-weight: $font-weight-bold;\n height: 1rem;\n justify-content: center;\n line-height: 1;\n text-align: center;\n width: 1rem;\n}\n</style>\n","<template>\n <sl-switch\n class=\"c-switch\"\n :class=\"{\n 'c-switch--label-first': labelFirst,\n 'c-switch--disabled': disabled,\n 'c-switch--checked': internalValue,\n 'c-switch--aria-labelled': ariaLabel,\n }\"\n :checked=\"internalValue || undefined\"\n :disabled=\"disabled || undefined\"\n @sl-change=\"internalValue = !internalValue\"\n >\n <slot />\n <span v-if=\"ariaLabel\" class=\"c-switch__sr-label\">\n {{ ariaLabel }}\n </span>\n </sl-switch>\n</template>\n\n<script lang=\"ts\">\nimport '@shoelace-style/shoelace/dist/components/switch/switch.js';\nimport { defineComponent, toRefs } from 'vue';\n\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\n\nexport default defineComponent({\n props: {\n /** When true, the slot label is visually rendered before the control (label left, switch right) */\n labelFirst: { type: Boolean, default: false },\n /** Whether the switch is in an \"on\" or \"off\" state */\n value: { type: Boolean, default: false },\n /** Prevents the user from interacting with the switch */\n disabled: { type: Boolean, default: false },\n /** Label for screen-readers. This hides and overrides the normal label. */\n ariaLabel: { type: String, default: '' },\n },\n emits: ['input'],\n setup(props, { emit }) {\n const { value } = toRefs(props);\n const internalValue = useInternalValue(value, {\n onChange: (newValue) => emit('input', newValue),\n });\n\n return {\n internalValue,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/utils/a11y';\n\n@mixin switch-theme($control-color, $thumb-color, $thumb-indicator-color) {\n &::part(control) {\n background-color: $control-color;\n }\n\n &::part(thumb) {\n background-color: $thumb-color;\n }\n\n &::part(thumb)::after {\n background-color: $thumb-indicator-color;\n }\n}\n\n.c-switch {\n --width: 44px;\n --height: 24px;\n --thumb-size: 20px;\n\n &::part(control) {\n border: none;\n }\n\n &::part(thumb) {\n align-items: center;\n border: none;\n display: flex;\n justify-content: center;\n }\n\n &::part(thumb)::after {\n border-radius: 1px;\n content: '';\n height: 8px;\n transition: background-color var(--sl-transition-fast) ease-in-out;\n width: 2px;\n }\n\n @include switch-theme($color-gray-400, $color-white, transparent);\n}\n\n.c-switch--label-first {\n &::part(base) {\n flex-direction: row-reverse;\n gap: 12px;\n width: 100%;\n }\n\n &::part(label) {\n flex: 1;\n margin: 0;\n }\n}\n\n.c-switch--checked {\n @include switch-theme($color-green-400, $color-white, $color-green-400);\n}\n\n.c-switch--disabled {\n @include switch-theme($color-gray-300, $color-gray-200, transparent);\n}\n\n.c-switch--disabled.c-switch--checked {\n @include switch-theme($color-gray-300, $color-gray-200, $color-gray-300);\n}\n\n.c-switch__sr-label {\n @include sr-only;\n}\n</style>\n","<template>\n <CListItem>\n <CSwitch\n data-test=\"list-item-switch\"\n class=\"c-switch-list-item__switch\"\n :value=\"value\"\n :disabled=\"disabled\"\n @input=\"$emit('input', $event)\"\n >\n <div\n class=\"d-flex flex-row gap-3\"\n :class=\"{\n 'align-start': align === 'top',\n 'align-center': align !== 'top',\n }\"\n >\n <slot name=\"prepend\">\n <CListItemIcon v-if=\"icon || iconSlotHasContent\" :icon=\"icon\" :icon-color=\"iconColor\">\n <template #icon>\n <slot name=\"icon\" />\n </template>\n </CListItemIcon>\n </slot>\n\n <CListItemContent :title=\"title\" :label=\"label\">\n <template v-for=\"slotName of ['title', 'label', 'default']\" #[slotName]>\n <slot :name=\"slotName\" />\n </template>\n </CListItemContent>\n </div>\n </CSwitch>\n </CListItem>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, defineComponent } from 'vue';\n\nimport CListItem from '@propelinc/citrus-ui/src/components/CListItem.vue';\nimport CListItemContent from '@propelinc/citrus-ui/src/components/CListItemContent.vue';\nimport CListItemIcon from '@propelinc/citrus-ui/src/components/CListItemIcon.vue';\nimport CSwitch from '@propelinc/citrus-ui/src/components/CSwitch.vue';\nimport type { FaPropType } from '@propelinc/citrus-ui/src/types/font-awesome';\n\nimport { useSlotHasContent } from '../composables/slots';\n\nexport default defineComponent({\n name: 'CSwitchListItem',\n components: {\n CSwitch,\n CListItem,\n CListItemContent,\n CListItemIcon,\n },\n props: {\n /** Alignment of the content */\n align: { type: String as PropType<'top' | 'center'>, default: 'center' },\n /** Prevents the user from interacting with the switch */\n disabled: { type: Boolean, default: false },\n /** Font Awesome icon to render on the left side of the component */\n icon: { type: [String, Array, Object] as FaPropType, default: null },\n /** Color of the icon background */\n iconColor: { type: String, default: 'gray-100' },\n /** Plain body copy. Overridden by the default slot. */\n label: { type: String, default: undefined },\n /** Emphasized text above body text. Overridden by the default slot. */\n title: { type: String, default: undefined },\n /** Whether the switch is in an \"on\" or \"off\" state */\n value: { type: Boolean, default: false },\n },\n emits: ['input'],\n setup() {\n const iconSlotHasContent = useSlotHasContent('icon');\n\n return {\n iconSlotHasContent,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n.c-switch-list-item__switch {\n width: 100%;\n\n &::part(base) {\n align-items: center;\n display: inline-flex;\n\n // Using row-reverse allows us to move the slot content to the left\n // and the switch to the right\n flex-direction: row-reverse;\n gap: 12px;\n\n // The padding from CListItem is sufficient\n padding: 0;\n width: 100%;\n }\n\n &::part(label) {\n align-items: center;\n display: flex;\n flex: 1;\n gap: 12px;\n justify-content: space-between;\n\n // Removes the margin-inline-start supplied by the Shoelace styles\n margin: 0;\n }\n}\n</style>\n","<template>\n <div\n class=\"d-flex flex-column gap-1\"\n :class=\"{\n 'c-text-area--disabled': disabled,\n 'c-text-area--invalid': !isValidationValid,\n 'c-text-area--hide-label': hideLabel,\n }\"\n :data-test=\"dataTest\"\n >\n <label class=\"c-text-area__label\" :for=\"idWithFallback\" :data-test=\"`${dataTest}-label`\">\n <slot name=\"label\">\n {{ label }}\n </slot>\n </label>\n\n <textarea\n :id=\"idWithFallback\"\n ref=\"textarea\"\n class=\"c-text-area__input\"\n rows=\"4\"\n :aria-label=\"label || undefined\"\n :aria-describedby=\"`${idWithFallback}-message ${idWithFallback}-validation-message`\"\n :aria-invalid=\"isValidationValid ? 'false' : 'true'\"\n :data-test=\"`${dataTest}-textarea`\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :maxlength=\"maxlength\"\n :required=\"required\"\n :value=\"internalValue\"\n @input=\"onInput\"\n @blur=\"$emit('blur')\"\n @focus=\"$emit('focus')\"\n @change=\"$emit('change', internalValue)\"\n v-on=\"validationListeners\"\n />\n\n <CValidationMessage\n :data-test=\"`${dataTest}-validation-message`\"\n :validation-message=\"validationMessage\"\n :hide=\"hideDetails\"\n >\n <template #append>\n <CFormFieldCounter\n v-if=\"counter\"\n :data-test=\"`${dataTest}-counter`\"\n :counter=\"counter\"\n :counter-value=\"counterValue\"\n :value=\"internalValue\"\n />\n </template>\n </CValidationMessage>\n\n <div\n v-if=\"messageSlotHasContent\"\n :id=\"`${idWithFallback}-message`\"\n class=\"c-text-area__message\"\n :data-test=\"`${dataTest}-message`\"\n >\n <slot name=\"message\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue';\nimport { defineComponent, ref, toRefs } from 'vue';\n\nimport CFormFieldCounter from '@propelinc/citrus-ui/src/components/CFormFieldCounter.vue';\nimport CValidationMessage from '@propelinc/citrus-ui/src/components/CValidationMessage.vue';\nimport { useInternalValue } from '@propelinc/citrus-ui/src/composables/binding';\nimport { useId } from '@propelinc/citrus-ui/src/composables/id';\nimport { useSlotHasContent } from '@propelinc/citrus-ui/src/composables/slots';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\nimport { useValidations } from '@propelinc/citrus-ui/src/composables/validations';\n\nexport default defineComponent({\n name: 'CTextArea',\n components: { CValidationMessage, CFormFieldCounter },\n props: {\n /** The textarea's label, both visual and screenreader-only */\n label: { type: String as PropType<string | null>, default: null },\n /** The textarea's placeholder */\n placeholder: { type: String, default: '' },\n /** The textarea element's id */\n id: { type: String as PropType<string | null>, default: null },\n /** Controls whether the input is disabled */\n disabled: { type: Boolean, default: false },\n /** The textarea's value */\n value: { type: String, default: '' },\n /** Hides the label and instead labels the field with `aria-label` */\n hideLabel: { type: Boolean, default: false },\n /** Hides the validation message area. Defaults to `false` (show message area even when valid), so validations transition in gracefully. */\n hideDetails: { type: [Boolean, String] as PropType<boolean | 'auto'>, default: false },\n /** Adds a custom data test string to the form field and textarea elements */\n dataTest: { type: String, default: 'text-area' },\n /** Shows a character counter and sets its denominator. */\n counter: { type: Number as PropType<number | null>, default: null },\n /** Function or number that determines the numerator of the counter. If not\n * set, the counter will be the length of the input value. */\n counterValue: {\n type: [Number, Function] as PropType<number | (() => number | null)>,\n default: null,\n },\n maxlength: { type: Number, default: undefined },\n /** Accepts a mixed array of types function, boolean and string.\n * Functions pass an input value as an argument and must return either true / false or\n * a string containing an error message. The input field will enter an error state if a\n * function returns (or any value in the array contains) false or is a string */\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n /** If true, the field is required */\n required: { type: Boolean, default: false },\n },\n emits: ['input', 'change', 'blur', 'focus'],\n setup(props, { emit }) {\n const { value, rules, required, id } = toRefs(props);\n const idWithFallback = useId(id);\n\n const internalValue = useInternalValue(value, {\n onChange: (value) => emit('input', value),\n });\n\n const messageSlotHasContent = useSlotHasContent('message');\n\n const textarea = ref<HTMLTextAreaElement | null>(null);\n\n const {\n message: validationMessage,\n valid: isValidationValid,\n listeners: validationListeners,\n } = useValidations({\n id: idWithFallback,\n value: internalValue,\n rules,\n required,\n field: textarea,\n });\n\n const onInput = (event: Event): void => {\n const target = event.target as HTMLTextAreaElement;\n internalValue.value = target.value;\n };\n\n return {\n textarea,\n idWithFallback,\n internalValue,\n validationMessage,\n isValidationValid,\n validationListeners,\n messageSlotHasContent,\n\n onInput,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n@import '@propelinc/citrus-ui/src/styles/utils/a11y';\n@import '@propelinc/citrus-ui/src/styles/form-fields';\n\n.c-text-area__label {\n @include body-emphasized;\n\n display: inline-block;\n margin-bottom: 4px;\n transition: color $citrus-field-transition-duration ease;\n\n .c-text-area--disabled & {\n color: $color-text-disabled;\n }\n\n .c-text-area--hide-label & {\n @include sr-only;\n }\n}\n\n.c-text-area__input {\n background-color: $color-white;\n border: $border-width solid $color-gray-200;\n border-radius: $border-radius-next;\n padding: 16px;\n resize: vertical;\n transition: border-color $citrus-field-transition-duration ease;\n\n &:focus,\n &:focus-within,\n .c-text-area--invalid & {\n border-color: $color-black;\n outline: none;\n }\n\n &:disabled {\n background-color: $color-gray-100;\n color: $color-text-disabled;\n }\n}\n\n.c-text-area__message {\n @include caption;\n\n color: $color-gray-500;\n margin-bottom: 16px;\n}\n</style>\n","<template>\n <a\n v-bind=\"$attrs\"\n :target=\"target\"\n :href=\"routerDestinationOrHref\"\n :tabindex=\"isRoleButton ? 0 : undefined\"\n :role=\"isRoleButton ? 'button' : undefined\"\n class=\"c-text-link\"\n :class=\"{ 'c-text-link--underline': underline }\"\n @click=\"navigate\"\n >\n <slot />\n </a>\n</template>\n\n<script lang=\"ts\">\nimport type { PropType } from 'vue';\nimport { computed, defineComponent } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\n\nimport { useRouterLink } from '@propelinc/citrus-ui/src/composables/router';\n\nexport default defineComponent({\n props: {\n /** Controls whether the text link functions as a router-link */\n to: { type: [String, Object] as PropType<RouteLocationRaw>, default: undefined },\n /** Designates the text link as an anchor and applies the href attribute */\n href: { type: String, default: undefined },\n /** Designates the target attribute. Only use with the href prop. */\n target: { type: String, default: undefined },\n /** Toggles whether the link should have an underline */\n underline: { type: Boolean, default: true },\n },\n setup(props) {\n const to = computed(() => props.to);\n const { href: routerDestination, navigate } = useRouterLink(to);\n const routerDestinationOrHref = computed(() => routerDestination.value ?? props.href);\n\n const isRoleButton = computed(() => {\n return !props.to && !props.href;\n });\n\n return {\n isRoleButton,\n navigate,\n routerDestinationOrHref,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-text-link {\n color: $color-black;\n font-weight: $font-weight-semibold;\n\n &--underline {\n @include link-underline;\n }\n}\n</style>\n","<template>\n <div class=\"c-third-party-logo\" :style=\"{ '--size': SIZE_TO_VALUE[size] }\">\n <img\n v-if=\"imageState === 'loaded' || imageState === 'loading'\"\n class=\"c-third-party-logo__img transition-opacity\"\n :class=\"{ 'opacity-0': imageState === 'loading' }\"\n :src=\"src\"\n :alt=\"alt\"\n @error=\"handleImageError\"\n @load=\"handleImageLoad\"\n />\n <c-squared-icon\n class=\"transition-opacity\"\n :class=\"{ 'opacity-0': imageState === 'loaded' }\"\n :icon=\"icon\"\n :color=\"color\"\n :large=\"size === 'large'\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, defineComponent, ref } from 'vue';\n\nimport CSquaredIcon from '@propelinc/citrus-ui/src/components/CSquaredIcon.vue';\n\ntype Size = 'medium' | 'large';\n\ntype ImageState = 'loading' | 'loaded' | 'failed';\n\nconst SIZES = new Set<Size>(['medium', 'large']);\n\nconst SIZE_TO_VALUE: Record<Size, `${number}px`> = {\n medium: '40px',\n large: '56px',\n};\n\n/**\n * A component that displays a third party logo with a fallback icon.\n *\n * The fallback icon is displayed while the image is loading or if the image fails to load.\n *\n * The image is rendered, but hidden, while loading, and displayed when loaded.\n */\nexport default defineComponent({\n name: 'CThirdPartyLogo',\n components: {\n CSquaredIcon,\n },\n props: {\n /**\n * The alt text for the logo.\n */\n alt: { type: String, required: true },\n /**\n * The color of the fallback icon logo\n */\n color: CSquaredIcon.props.color,\n /**\n * The Font Awesome icon to display as a fallback\n */\n icon: CSquaredIcon.props.icon,\n /**\n * The size of the logo. Defaults to `medium`.\n */\n size: {\n type: String as PropType<Size>,\n required: false,\n default: 'medium',\n validator: (value: string) => SIZES.has(value as Size),\n },\n /**\n * The URL of the logo image\n */\n src: { type: String, required: false, default: '' },\n },\n setup() {\n const imageState = ref<ImageState>('loading');\n\n const handleImageError = (): void => {\n imageState.value = 'failed';\n };\n\n const handleImageLoad = (): void => {\n imageState.value = 'loaded';\n };\n\n return {\n handleImageError,\n handleImageLoad,\n imageState,\n SIZE_TO_VALUE,\n };\n },\n});\n</script>\n\n<style scoped>\n.c-third-party-logo {\n border-radius: 8px;\n height: var(--size);\n isolation: isolate;\n object-fit: contain;\n overflow: hidden;\n position: relative;\n width: var(--size);\n}\n\n.c-third-party-logo__img {\n display: block;\n height: 100%;\n left: 0;\n object-fit: contain;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 1;\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.transition-opacity {\n transition: opacity 0.1s ease-in-out;\n}\n</style>\n","<template>\n <time v-bind=\"$attrs\" :datetime=\"isoString\">{{ timeago }}</time>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';\n\nconst props = withDefaults(\n defineProps<{\n datetime: string | number | Date;\n converter: (datetime: string | number | Date, locale: string, count?: number) => string;\n locale?: string;\n autoUpdate?: number | false;\n }>(),\n {\n locale: 'en',\n autoUpdate: 60,\n }\n);\n\n// NOTE(ram): Used to trigger reactivity in the computed property for auto updates.\nconst counter = ref(0);\nlet timer: number | null = null;\n\nconst isoString = computed((): string => new Date(props.datetime).toISOString());\nconst timeago = computed((): string =>\n props.converter(props.datetime, props.locale, counter.value)\n);\n\nconst startAutoUpdate = (): void => {\n if (props.autoUpdate) {\n // TODO(ram): This is a workaround to make sure the timer is of type number.\n // The type of setInterval is NodeJS.Timeout in Node.js and number in the browser.\n // This is causing issues in apps/healthcare-app.\n timer = setInterval(() => counter.value++, props.autoUpdate * 1000) as unknown as number;\n }\n};\n\nconst stopAutoUpdate = (): void => {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n};\n\nwatch(\n () => props.autoUpdate,\n (value: number | false) => {\n stopAutoUpdate();\n if (value) {\n startAutoUpdate();\n }\n }\n);\n\nonMounted(() => {\n startAutoUpdate();\n});\n\nonBeforeUnmount(() => {\n stopAutoUpdate();\n});\n</script>\n","<!-- eslint-disable vue/no-deprecated-slot-attribute -->\n<template>\n <sl-alert\n ref=\"alert\"\n class=\"c-toast\"\n :data-test=\"dataTest\"\n :data-open=\"isOpen || undefined\"\n :data-variant=\"computedVariant\"\n :class=\"`c-toast--${computedVariant}`\"\n :duration=\"duration\"\n :style=\"{ '--toast-base-transform': transform }\"\n @sl-hide=\"onHide\"\n @sl-after-hide=\"resetAnimation\"\n >\n <div class=\"flex-grow-1 d-flex flex-row align-center gap-4\">\n <slot name=\"icon\">\n <FontAwesomeIcon data-test=\"toast-icon\" fixed-width class=\"c-toast__icon\" :icon=\"icon\" />\n </slot>\n\n <div class=\"c-toast__message flex-grow-1\" data-test=\"toast-message\">\n <slot>{{ message }}</slot>\n </div>\n </div>\n\n <CIconButton\n data-test=\"toast-dismiss\"\n variant=\"tertiary\"\n :aria-label=\"$t('Close')\"\n :icon=\"faXmark\"\n @click=\"close\"\n />\n </sl-alert>\n</template>\n\n<script lang=\"ts\">\nimport {\n faCircleCheck,\n faCircleExclamation,\n faInfoCircle,\n faXmark,\n} from '@fortawesome/pro-regular-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\nimport '@shoelace-style/shoelace/dist/components/alert/alert.js';\nimport type SlAlert from '@shoelace-style/shoelace/dist/components/alert/alert.js';\nimport type { ElementAnimation } from '@shoelace-style/shoelace/dist/utilities/animation-registry';\nimport type { PropType } from 'vue';\nimport { computed, defineComponent, onBeforeUnmount, ref, watchEffect } from 'vue';\n\nimport CIconButton from '@propelinc/citrus-ui/src/components/CIconButton.vue';\nimport { useShoelaceAnimation } from '@propelinc/citrus-ui/src/composables/animation';\nimport { useShoelaceShadowParts } from '@propelinc/citrus-ui/src/composables/elements';\nimport { useDragListener } from '@propelinc/citrus-ui/src/composables/gestures';\nimport { slideLeft, slideRight } from '@propelinc/citrus-ui/src/services/animation';\nimport type { ToastVariant } from '@propelinc/citrus-ui/src/types';\n\n/** Default duration for the toast to be visible. */\nconst DEFAULT_DURATION = 5000;\n/** The minimum distance, in pixels, the user has to drag left or right for\n * it to be considered a successful swipe. */\nconst MIN_SWIPE_DISTANCE = 150;\n/** The minimum speed, in pixels per millisecond, the user has to swipe for\n * it to be considered a successful swipe. */\nconst MIN_SWIPE_VELOCITY = 0.75;\n\nexport default defineComponent({\n name: 'CToast',\n components: { FontAwesomeIcon, CIconButton },\n props: {\n /** Show/hides the toast */\n value: { type: Boolean, default: false },\n /** The message rendered in the toast, using the default slot overrides this value */\n message: { type: String, default: '' },\n /**\n * @deprecated use `variant` prop instead\n * Renders the error state\n */\n error: { type: Boolean, default: false, deprecated: true },\n /**\n * @deprecated use `variant` prop instead\n * Renders the success state\n */\n success: { type: Boolean, default: false, deprecated: true },\n /**\n * @deprecated use `variant` prop instead\n * Renders the warning state\n */\n warning: { type: Boolean, default: false, deprecated: true },\n /** The variant of the toast */\n variant: { type: String as PropType<ToastVariant>, default: 'info' },\n /** Controls (overrides) whether the toast is dismissible. */\n dismissible: { type: Boolean as PropType<boolean | undefined>, default: undefined },\n /** The data-test attribute for the toast. */\n dataTest: { type: String, default: 'toast' },\n },\n emits: ['hide', 'input'],\n setup(props, { emit }) {\n const alert = ref<SlAlert | null>(null);\n const isOpen = ref(props.value);\n\n /**\n * Handle merging the deprecated `error`, `success`, and `warning` props\n * with the `variant` prop.\n */\n const computedVariant = computed(() => {\n if (props.error) {\n return 'error';\n } else if (props.success) {\n return 'success';\n } else if (props.warning) {\n return 'warning';\n }\n return props.variant;\n });\n\n const show = async (): Promise<void> => {\n isOpen.value = true;\n alert.value?.toast();\n };\n\n const onHide = (): void => {\n isOpen.value = false;\n emit('input', false);\n emit('hide');\n };\n\n const close = async (): Promise<void> => {\n alert.value?.hide();\n };\n\n // If our value changes, show or hide the toast respectively\n watchEffect(() => (props.value ? show() : close()));\n\n // Close the toast when the component is unmounted\n onBeforeUnmount(() => close());\n\n const shouldAutoDismiss = computed(() => {\n if (props.dismissible !== undefined) {\n return !props.dismissible;\n }\n return computedVariant.value === 'success';\n });\n\n const duration = computed(() => {\n return shouldAutoDismiss.value ? DEFAULT_DURATION : Infinity;\n });\n\n const icon = computed(() => {\n if (computedVariant.value === 'error') {\n return faCircleExclamation;\n } else if (computedVariant.value === 'success') {\n return faCircleCheck;\n } else {\n return faInfoCircle;\n }\n });\n\n const alertHideAnimation = ref<ElementAnimation | 'default'>('default');\n useShoelaceAnimation(alert, 'alert.hide', alertHideAnimation);\n\n const resetAnimation = (): void => {\n alertHideAnimation.value = 'default';\n };\n\n const { base } = useShoelaceShadowParts(alert, ['base']);\n const { dragDistance } = useDragListener(base, {\n onDragEnd: async ({ distance, velocity }) => {\n const absoluteDistance = Math.abs(distance.x);\n const absoluteVelocity = Math.abs(velocity.x);\n const shouldDismiss =\n absoluteDistance > MIN_SWIPE_DISTANCE || absoluteVelocity > MIN_SWIPE_VELOCITY;\n const dismissStart = absoluteDistance / base.value!.clientWidth;\n if (shouldDismiss) {\n const remainingDismissDistance = Math.max(base.value!.clientWidth - absoluteDistance, 0);\n const dismissDuration =\n remainingDismissDistance / Math.max(absoluteVelocity, MIN_SWIPE_VELOCITY);\n const slideDirection = velocity.x > 0 ? slideRight : slideLeft;\n alertHideAnimation.value = slideDirection({\n start: dismissStart,\n duration: dismissDuration,\n end: 1.1,\n });\n close();\n } else {\n const slideDirection = velocity.x > 0 ? slideRight : slideLeft;\n const slideBack = slideDirection({ start: dismissStart, end: 0 });\n base.value?.animate(slideBack.keyframes, slideBack.options);\n }\n },\n });\n\n const transform = computed(() => {\n return `translateX(${dragDistance.value?.x ?? 0}px)`;\n });\n\n return {\n duration,\n alert,\n icon,\n faXmark,\n isOpen,\n computedVariant,\n close,\n onHide,\n transform,\n resetAnimation,\n };\n },\n});\n</script>\n\n<style lang=\"scss\" scoped>\n@import '@propelinc/citrus-ui/src/styles/core';\n\n.c-toast {\n margin: 16px;\n\n &::part(base) {\n background-color: $color-blue-200;\n border: none;\n border-radius: $border-radius-next;\n box-shadow: $box-shadow-toast;\n color: $color-black;\n transform: var(--toast-base-transform);\n }\n\n &::part(message) {\n @include body;\n\n align-items: center;\n display: flex;\n padding: 16px 0 16px 16px;\n }\n\n &::part(icon) {\n padding-left: 12px;\n }\n}\n\n.c-toast--error::part(base) {\n background-color: $color-red-200;\n}\n\n.c-toast--success::part(base) {\n background-color: $color-green-200;\n}\n\n.c-toast--warning::part(base) {\n background-color: $color-gold-200;\n}\n\n.c-toast__message {\n flex: auto;\n}\n\n.c-toast__icon {\n color: $color-black;\n font-size: $font-size-icon-medium;\n}\n</style>\n","import { type Ref, inject, provide, ref } from 'vue';\n\nimport type { ToastVariant } from '../types';\n\n// NOTE(slanden): Cannot use a symbol here because it may break the inject/provide chain across MFEs\nconst GlobalToast = 'GLOBAL_TOAST';\n\nexport interface Toast {\n id: number;\n dataTest?: string;\n message: string;\n variant: ToastVariant;\n}\n\ninterface ToastInjection {\n dismissToast: (id: Toast['id']) => void;\n showToast: (toast: Omit<Toast, 'id'>) => void;\n toasts: Ref<Toast[]>;\n}\n\nlet id = 0;\n\nfunction getNextIdDefault(): number {\n return id++;\n}\n\n/**\n * Custom provider for our toasts. Enables us to declaratively manage toasts in event handlers.\n *\n * NOTE: injecting `getNextId` allows us to test the composable without worry of side effects\n */\nexport function useToastProvider(getNextId: () => number = getNextIdDefault): ToastInjection {\n const toasts = ref<Toast[]>([]);\n\n function showToast(newToast: Omit<Toast, 'id'>): Toast['id'] {\n const toastId = getNextId();\n\n toasts.value.push({ ...newToast, id: toastId });\n\n return toastId;\n }\n\n function dismissToast(id: Toast['id']): void {\n toasts.value = toasts.value.filter((toast) => toast.id !== id);\n }\n\n const context: ToastInjection = {\n dismissToast,\n showToast,\n toasts,\n };\n\n provide(GlobalToast, context);\n\n return context;\n}\n\nexport function useToast(): ToastInjection {\n return inject<ToastInjection>(GlobalToast, {\n dismissToast: () => {},\n showToast: () => {},\n toasts: ref<Toast[]>([]),\n });\n}\n","<template>\n <CToast\n v-for=\"toast in toasts\"\n :key=\"toast.id\"\n :value=\"true\"\n :data-test=\"toast.dataTest || 'c-toast'\"\n :message=\"toast.message\"\n :variant=\"toast.variant\"\n @hide=\"dismissToast(toast.id)\"\n />\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nimport CToast from '@propelinc/citrus-ui/src/components/CToast.vue';\n\nimport { useToast } from '../composables/toast';\n\nexport default defineComponent({\n name: 'CToastsList',\n components: { CToast },\n setup() {\n const { toasts, dismissToast } = useToast();\n\n return {\n toasts,\n dismissToast,\n };\n },\n});\n</script>\n","<template>\n <CMaskedTextField\n v-bind=\"$attrs\"\n :id=\"id\"\n ref=\"field\"\n :data-test=\"dataTest\"\n :value=\"value\"\n name=\"zip\"\n :label=\"label || $t('ZIP Code')\"\n mask=\"#####\"\n :placeholder=\"placeholder || '12345'\"\n :minlength=\"5\"\n :maxlength=\"5\"\n type=\"tel\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n :rules=\"computedRules\"\n @input=\"$emit('input', $event)\"\n @focus=\"$emit('focus', $event)\"\n @blur=\"$emit('blur', $event)\"\n @change=\"$emit('change', $event)\"\n >\n <template #label>\n <slot name=\"label\" />\n </template>\n <template #message>\n <slot name=\"message\" />\n </template>\n </CMaskedTextField>\n</template>\n\n<script lang=\"ts\">\nimport { type PropType, computed, defineComponent } from 'vue';\n\nimport CMaskedTextField from '@propelinc/citrus-ui/src/components/CMaskedTextField.vue';\nimport { useFocusableField } from '@propelinc/citrus-ui/src/composables/fields';\nimport { useTranslation } from '@propelinc/citrus-ui/src/composables/i18n';\nimport type { Rules } from '@propelinc/citrus-ui/src/composables/validations';\nimport { minLengthRule } from '@propelinc/shared-utils';\n\nexport default defineComponent({\n name: 'CZipcodeField',\n components: { CMaskedTextField },\n props: {\n dataTest: { type: String, default: 'zipcode-field' },\n id: { type: String, default: undefined },\n label: { type: String as PropType<string | null>, default: null },\n placeholder: { type: String as PropType<string | null>, default: null },\n rules: { type: Array as PropType<Rules<string>>, default: () => [] },\n value: { type: String, default: '' },\n },\n emits: ['input', 'focus', 'blur', 'change'],\n setup(props, { expose }) {\n const { t } = useTranslation();\n\n const defaultRules = [\n minLengthRule(5, t('Please enter a valid {inputLabel}', { inputLabel: t('ZIP Code') })),\n ];\n const computedRules = computed(() => [...defaultRules, ...props.rules]);\n\n const { field } = useFocusableField(expose);\n\n return {\n computedRules,\n field,\n };\n },\n});\n</script>\n","import type { App, DefineComponent, Plugin } from 'vue';\n\nimport * as Components from '@propelinc/citrus-ui/src/components';\nimport { scrollIntoView, tapAnimation } from '@propelinc/citrus-ui/src/services/directives';\n\nconst plugin: Plugin = {\n install(app: App): void {\n Object.entries(Components).forEach(([name, component]): void => {\n app.component(name, component as DefineComponent);\n });\n\n // TODO: this has to be passed to the vue() plugin for Vite instead\n app.config.compilerOptions.isCustomElement = (tag): boolean => tag.startsWith('sl-');\n\n app.directive('scroll-into-view', scrollIntoView);\n app.directive('tap-animation', tapAnimation);\n },\n};\n\nexport default plugin;\n","import Colors from '@propelinc/citrus-ui/src/colors/colors';\n\ntype Theme = Record<string, string>;\n\nconst CitrusTheme = Object.entries(Colors).reduce<Theme>((theme, [colorName, hex]) => {\n const kebabCaseName = colorName.toLowerCase().replace(/_/g, '-');\n theme[kebabCaseName] = hex;\n return theme;\n}, {});\n\n// NOTE(mohan): Jest tests don't properly import scss files, leading to\n// undefined values. Clear them since we don't need these things to be defined\n// in unit tests anyways.\nexport default process.env.NODE_ENV === 'test' ? {} : CitrusTheme;\n","import { faCircle, faSquare, faXmark } from '@fortawesome/pro-light-svg-icons';\nimport { faCircleDot, faSquareCheck } from '@fortawesome/pro-solid-svg-icons';\nimport { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';\n\nconst Icons = {\n citrusCheckboxOn: {\n component: FontAwesomeIcon,\n props: { icon: faSquareCheck },\n },\n citrusCheckboxOff: {\n component: FontAwesomeIcon,\n props: { icon: faSquare },\n },\n citrusRadioOn: {\n component: FontAwesomeIcon,\n props: { icon: faCircleDot },\n },\n citrusRadioOff: {\n component: FontAwesomeIcon,\n props: { icon: faCircle },\n },\n citrusClear: {\n component: FontAwesomeIcon,\n props: { icon: faXmark },\n },\n} as const;\n\nexport default Icons;\n","export interface SplitInputField {\n characters: number;\n placeholder?: string;\n separator?: string;\n}\n\nexport type SplitInputRule = (v: string) => string | boolean;\n\nexport enum InputVariants {\n DEFAULT = 'default',\n CONTAINED = 'contained',\n SEGMENTED = 'segmented',\n}\n\nexport type ToastVariant = 'info' | 'success' | 'error' | 'warning';\n"],"names":["FLUID","ON_TOGGLE","_sfc_main$16","defineComponent","props","emit","fluid","toRefs","provide","accordion","ref","nextTick","openItems","acc","item","index","_openBlock","_createElementBlock","_hoisted_1","_renderSlot","_ctx","useShoelaceAnimation","el","animationName","animation","defaultAnimation","onMounted","getAnimation","animationValue","unref","setAnimation","isRef","watch","nextAnimation","TAP_ANIMATION_DURATION_MS","useTapAnimation","keyframes","downAnimation","upAnimation","onPointerDown","_a","_b","onPointerUp","useInternalValue","value","options","internalValue","newInternalValue","_sfc_main$15","FontAwesomeIcon","details","inject","injectedOrPropFluid","computed","injectedToggleItem","faChevronDown","_normalizeClass","_cache","_createVNode","_component_FontAwesomeIcon","_createElementVNode","_hoisted_2","_hoisted_3","BLACK","GRAY_100","GRAY_200","GRAY_300","GRAY_400","GRAY_500","GREEN_500","GOLD_500","RED_500","Colors","isHexColor","color","isRgbaColor","isCssColor","isColorKey","isValidColor","normalizedKey","_sfc_main$14","_createBlock","_Transition","useCssColor","name","normalizedColor","toValue","normalizedName","cssColor","SIZE_TO_FONT_SIZE","SIZE_TO_TRACK_WIDTH","_sfc_main$13","computedColor","computedTrackColor","computedSize","indicatorColorCode","trackColorCode","_normalizeStyle","TERTIARY","INHERIT_COLOR","_sfc_main$12","CLoader","CFadeTransition","TERTIARY_ICON_BUTTON","INHERIT_COLOR_ICON_BUTTON","initialBackgroundColor","bgCssColor","calculatedTextColor","r","g","b","hex","fullHex","match","ra","ga","ba","a","userTextCssColor","textCssColor","_component_CFadeTransition","_withCtx","_component_CLoader","_hoisted_4","_toDisplayString","_hoisted_5","_hoisted_6","_sfc_main$11","backgroundCssColor","style","_createTextVNode","BLOCK","LARGE","BOUNCE_AMOUNT","_sfc_main$10","large","_resolveDynamicComponent","getViewport","scrollToElement","element","rect","windowHeight","appHeight","estimatedHeaderHeight","estimatedFooterHeight","_c","_d","contentStartY","contentEndY","isObscuredByHeader","isObscuredByFooter","scrollIntoView","inputEl","debounce","DEFAULT_BOUNCE_AMOUNT","setupTapAnimation","bounceAmount","animationListeners","event","handler","tapAnimation","binding","__emit","onClick","$t","disabled","_unref","faXmark","useResizeObserver","callback","observer","onBeforeUnmount","useShoelaceShadowParts","shoelaceComponent","parts","shadowParts","part","shadowRoot","useDragListener","startDragTouch","lastDragTouch","dragVelocity","dragDistance","simplifyEvent","x","y","touchStartListener","touchMoveListener","newEvent","timeDelta","touchEndListener","addListeners","removeListeners","newElement","oldElement","useScrollBoundary","isScrolling","onScroll","onTouchEvent","onTouchEnd","useElasticClamp","resistance","min","max","absValue","isVisible","vnode","Comment","Fragment","children","child","useSlotHasContent","key","slots","useSlots","slot","DEFAULT_DURATION","DEFAULT_EASING","fadeIn","start","duration","easing","fadeOut","slideUp","slideDown","slideRight","end","slideLeft","MIN_SWIPE_DISTANCE","MIN_SWIPE_VELOCITY","MIN_DISMISS_VELOCITY","MIN_DISMISS_DURATION","DRAG_CLAMP_DISTANCE","SHEET_HEIGHT_FALLBACK","setCustomAnimation","_sfc_main$_","CButtonStack","CCloseButton","mounted","animatedValue","sheet","panel","overlay","body","handleDismiss","onRequestClose","onAfterClose","getTransformDistanceRatio","distance","velocity","remainingDismissDistance","dismissDuration","dismissStart","slideUpAnimation","fadeInAnimation","transformDistance","transformDistanceRatio","panelTransform","overlayOpacity","result","getDataTestAttr","suffix","dataTest","footerHasContent","isDismissVisible","args","_component_c_close_button","_component_CButtonStack","isBrowser","noop","isArray","warn","msg","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","i","NavigationType","NavigationDirection","isRouteLocation","route","NavigationFailureType","routerKey","routeLocationKey","useLink","router","currentRoute","hasPrevious","previousTo","to","activeRecordIndex","matched","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","p","instance","getCurrentInstance","linkContextDevtools","watchEffect","target","outer","inner","innerValue","outerValue","record","useLinkAttrs","href","useRouterLink","toWithDefault","useLinkResult","_navigate","_href","isRouterLink","error","VARIANT_TO_SHOELACE_VARIANT","BLOCK_BOUNCE_AMOUNT","BASE_BOUNCE_AMOUNT","_sfc_main$Z","block","routerDestination","routerDestinationOrHref","dataLoading","injectedBlock","injectedOrPropBlock","dataBlock","iconSlotHasContent","hasIcon","computedVariant","shoelaceVariant","injectedLarge","injectedOrPropsLarge","button","injectedBounceAmount","_mergeProps","_toHandlers","$event","_component_font_awesome_icon","_createCommentVNode","_sfc_main$Y","_sfc_main$X","CCardHeader","attrs","borderCssColor","routingVariant","_component_CCardHeader","_sfc_main$W","_sfc_main$V","_sfc_main$U","appendSlotHasContent","idCounter","useId","id","VALIDATIONS","useValidationRuleCheck","rules","required","active","message","valid","isEmpty","v","requiredRule","val","rulesResult","allRules","rule","passesRules","validate","useFormValidationSupport","state","formValidations","useValidations","validateOn","onValidationResultChange","startValidating","clearValidations","onInput","onBlur","onChange","newValue","oldValue","_sfc_main$T","CValidationMessage","idWithFallback","checkbox","validationMessage","isValidationValid","validationListeners","faCheck","_component_CValidationMessage","_sfc_main$S","_","_sfc_main$R","_sfc_main$Q","numerator","displayText","useA11yLabelCheck","componentName","useAttrs","_sfc_main$P","CButton","injectedTertiary","injectedOrPropTertiary","inheritColor","_component_CButton","useTranslation","currentInstance","_sfc_main$O","CFormFieldCounter","CIconButton","expose","t","isFocused","inputHidden","inputType","hideToggleAriaLabel","inputValue","input","prefixSlotHasContent","suffixSlotHasContent","messageSlotHasContent","toggleHidden","onFocus","clearInput","focus","blur","fallthroughAttrs","__","rest","rootStyles","faEye","faEyeSlash","_component_CIconButton","_component_CFormFieldCounter","_hoisted_7","toNumber","parsed","useInputMask","maskOptions","onMaska","onMaskaArray","detail","maskInput","newInput","MaskInput","mask","Mask","maskedValue","useMaskedMinLength","minlength","maskTokens","findMaskedMinLength","maskArray","char","minlengthValue","m","useMaskedMaxLength","maxlength","maxlengthValue","_sfc_main$N","CTextField","textField","inputMask","unmaskedValue","maskedMinLength","maskedMaxLength","counterValue","unmaskedRules","_component_CTextField","parseDateFromString","dateString","date","calculateAge","dob","today","age","monthDiff","createMinLengthValidator","minLength","ruleFromValidator","validator","errorMessage","minLengthRule","isValidDateInAgeRange","minAge","maxAge","dobDate","isValidEmail","email","_sfc_main$M","CMaskedTextField","parseDate","year","month","day","formattedDate","lastEmittedValue","emitIsoDate","defaultLabel","defaultPlaceholder","inputLabel","defaultRules","createMinLengthRule","maxAgeRule","validDateRule","dayjs","computedLabel","computedPlaceholder","computedRules","dateLength","_component_CMaskedTextField","_sfc_main$L","select","_Fragment","_renderList","_sfc_main$K","CSelect","localMonth","localDay","localYear","hasError","messages","localValue","monthRules","dayRules","yearRules","monthOptions","dayOptions","daysInMonth","currentYear","yearOptions","localRules","validation","validationResult","emitDate","_component_c_select","_sfc_main$J","ANIMATIONS_DISABLED","_sfc_main$I","injectedDisabled","isDisabled","content","height","entry","_sfc_main$H","hasValue","onFileChange","files","file","_sfc_main$G","footer","footerElement","_sfc_main$F","form","inputs","filteredInputs","inputArray","getInvalidInputs","newInvalidInputs","oldInvalidInputs","newValid","oldValid","invalidInputs","firstInvalidField","scrollIntoViewIfNeeded","_withModifiers","_sfc_main$E","_sfc_main$D","titleSlotHasContent","labelSlotHasContent","_sfc_main$C","prefix","iconName","useWhiteIcon","_sfc_main$B","CSquaredIcon","_component_CSquaredIcon","_sfc_main$A","CListItemIcon","CListItemContent","isLink","isButton","isTappable","tag","tagAttrs","actionSlotHasContent","renderActionSlot","mergeProps","faChevronRight","_component_CListItemIcon","_component_CListItemContent","_createSlots","slotName","propelIcon","propelLockup","_sfc_main$z","_sfc_main$y","_sfc_main$x","CCheckbox","_component_CCheckbox","_sfc_main$w","_sfc_main$v","CExpandTransition","modal","enableExpandTransition","loadingMessage","dialogLabel","_component_CExpandTransition","_hoisted_8","_sfc_main$u","CModal","_component_CModal","_sfc_main$t","farXmark","useFocusableField","field","_sfc_main$s","SELECTED_VALUE","TOGGLE_VALUE","ROLE","_sfc_main$r","injectedRole","injectedSelectedValue","toggleValue","toggleVariant","isSelected","ariaChecked","role","nextValue","_sfc_main$q","CPill","option","_component_CPill","_sfc_main$p","popup","handleMouseLeave","handleOutsideClick","onUnmounted","_sfc_main$o","_sfc_main$n","trackCssColor","RADIO_STATE","_sfc_main$m","parentState","_sfc_main$l","mandatory","radioGroup","fullWidth","_sfc_main$j","_sfc_main$h","_sfc_main$f","CSkeleton","_component_CSkeleton","_sfc_main$e","LINE_TYPE_TO_CLASS","_sfc_main$d","_sfc_main$c","_sfc_main$b","fields","placeholder","_sfc_main$a","fourDigitRule","fullSsnRule","faLock","_sfc_main$9","hasCount","_sfc_main$8","_sfc_main$7","CSwitch","CListItem","_component_CListItem","_component_CSwitch","_sfc_main$6","textarea","_sfc_main$5","SIZES","SIZE_TO_VALUE","_sfc_main$4","imageState","_component_c_squared_icon","__props","counter","timer","isoString","timeago","startAutoUpdate","stopAutoUpdate","$attrs","_sfc_main$2","alert","isOpen","show","onHide","close","shouldAutoDismiss","icon","faCircleExclamation","faCircleCheck","faInfoCircle","alertHideAnimation","resetAnimation","base","absoluteDistance","absoluteVelocity","shouldDismiss","slideDirection","slideBack","transform","GlobalToast","useToast","_sfc_main$1","CToast","toasts","dismissToast","toast","_component_CToast","_sfc_main","plugin","app","Components","component","CitrusTheme","theme","colorName","kebabCaseName","Icons","faSquareC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