@stachelock/ui 0.1.0

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 (153) hide show
  1. package/README.md +304 -0
  2. package/dist/CheckboxInput-rWkcde69.js +5 -0
  3. package/dist/CheckboxInput-rWkcde69.js.map +1 -0
  4. package/dist/ComboboxInput-B98P_8CZ.js +5 -0
  5. package/dist/ComboboxInput-B98P_8CZ.js.map +1 -0
  6. package/dist/SelectInput-B5liNv7H.js +5 -0
  7. package/dist/SelectInput-B5liNv7H.js.map +1 -0
  8. package/dist/SwitchInput-D1k9O8gn.js +5 -0
  9. package/dist/SwitchInput-D1k9O8gn.js.map +1 -0
  10. package/dist/TextAreaInput-Di6Kstic.js +5 -0
  11. package/dist/TextAreaInput-Di6Kstic.js.map +1 -0
  12. package/dist/UiLoading-BuzCrLqO.js +5 -0
  13. package/dist/UiLoading-BuzCrLqO.js.map +1 -0
  14. package/dist/index.d.ts +3 -0
  15. package/dist/index.js +4763 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/index.umd.cjs +11 -0
  18. package/dist/index.umd.cjs.map +1 -0
  19. package/dist/src/components/UiAvatar.d.ts +57 -0
  20. package/dist/src/components/UiAvatar.d.ts.map +1 -0
  21. package/dist/src/components/UiBadge.d.ts +44 -0
  22. package/dist/src/components/UiBadge.d.ts.map +1 -0
  23. package/dist/src/components/UiBreadcrumb.d.ts +3 -0
  24. package/dist/src/components/UiBreadcrumb.d.ts.map +1 -0
  25. package/dist/src/components/UiButton.d.ts +119 -0
  26. package/dist/src/components/UiButton.d.ts.map +1 -0
  27. package/dist/src/components/UiLoading.d.ts +36 -0
  28. package/dist/src/components/UiLoading.d.ts.map +1 -0
  29. package/dist/src/components/UiLoadingDots.d.ts +53 -0
  30. package/dist/src/components/UiLoadingDots.d.ts.map +1 -0
  31. package/dist/src/components/UiModal.d.ts +102 -0
  32. package/dist/src/components/UiModal.d.ts.map +1 -0
  33. package/dist/src/components/UiNavLink.d.ts +73 -0
  34. package/dist/src/components/UiNavLink.d.ts.map +1 -0
  35. package/dist/src/components/UiProgressBar.d.ts +35 -0
  36. package/dist/src/components/UiProgressBar.d.ts.map +1 -0
  37. package/dist/src/components/UiRadialProgressBar.d.ts +43 -0
  38. package/dist/src/components/UiRadialProgressBar.d.ts.map +1 -0
  39. package/dist/src/components/UiTable.d.ts +94 -0
  40. package/dist/src/components/UiTable.d.ts.map +1 -0
  41. package/dist/src/components/UiTextInput.d.ts +108 -0
  42. package/dist/src/components/UiTextInput.d.ts.map +1 -0
  43. package/dist/src/components/UiTransition.d.ts +41 -0
  44. package/dist/src/components/UiTransition.d.ts.map +1 -0
  45. package/dist/src/components/calendars/CalendarDashboard.d.ts +32 -0
  46. package/dist/src/components/calendars/CalendarDashboard.d.ts.map +1 -0
  47. package/dist/src/components/calendars/CalendarHeader.d.ts +26 -0
  48. package/dist/src/components/calendars/CalendarHeader.d.ts.map +1 -0
  49. package/dist/src/components/calendars/DayCalendar.d.ts +24 -0
  50. package/dist/src/components/calendars/DayCalendar.d.ts.map +1 -0
  51. package/dist/src/components/calendars/EventCard.d.ts +19 -0
  52. package/dist/src/components/calendars/EventCard.d.ts.map +1 -0
  53. package/dist/src/components/calendars/EventsList.d.ts +24 -0
  54. package/dist/src/components/calendars/EventsList.d.ts.map +1 -0
  55. package/dist/src/components/calendars/MonthCalendar.d.ts +36 -0
  56. package/dist/src/components/calendars/MonthCalendar.d.ts.map +1 -0
  57. package/dist/src/components/calendars/WeekCalendar.d.ts +24 -0
  58. package/dist/src/components/calendars/WeekCalendar.d.ts.map +1 -0
  59. package/dist/src/components/calendars/YearCalendar.d.ts +18 -0
  60. package/dist/src/components/calendars/YearCalendar.d.ts.map +1 -0
  61. package/dist/src/components/calendars/index.d.ts +9 -0
  62. package/dist/src/components/calendars/index.d.ts.map +1 -0
  63. package/dist/src/components/forms/DynamicForm.d.ts +70 -0
  64. package/dist/src/components/forms/DynamicForm.d.ts.map +1 -0
  65. package/dist/src/components/forms/DynamicFormField.d.ts +25 -0
  66. package/dist/src/components/forms/DynamicFormField.d.ts.map +1 -0
  67. package/dist/src/components/forms/FormFieldWrapper.d.ts +108 -0
  68. package/dist/src/components/forms/FormFieldWrapper.d.ts.map +1 -0
  69. package/dist/src/components/forms/index.d.ts +4 -0
  70. package/dist/src/components/forms/index.d.ts.map +1 -0
  71. package/dist/src/components/index.d.ts +18 -0
  72. package/dist/src/components/index.d.ts.map +1 -0
  73. package/dist/src/components/inputs/CheckboxInput.d.ts +68 -0
  74. package/dist/src/components/inputs/CheckboxInput.d.ts.map +1 -0
  75. package/dist/src/components/inputs/ComboboxInput.d.ts +76 -0
  76. package/dist/src/components/inputs/ComboboxInput.d.ts.map +1 -0
  77. package/dist/src/components/inputs/InputsShowcase.d.ts +3 -0
  78. package/dist/src/components/inputs/InputsShowcase.d.ts.map +1 -0
  79. package/dist/src/components/inputs/SelectInput.d.ts +67 -0
  80. package/dist/src/components/inputs/SelectInput.d.ts.map +1 -0
  81. package/dist/src/components/inputs/SwitchInput.d.ts +80 -0
  82. package/dist/src/components/inputs/SwitchInput.d.ts.map +1 -0
  83. package/dist/src/components/inputs/TagifyInput.d.ts +183 -0
  84. package/dist/src/components/inputs/TagifyInput.d.ts.map +1 -0
  85. package/dist/src/components/inputs/TextAreaInput.d.ts +68 -0
  86. package/dist/src/components/inputs/TextAreaInput.d.ts.map +1 -0
  87. package/dist/src/components/inputs/index.d.ts +8 -0
  88. package/dist/src/components/inputs/index.d.ts.map +1 -0
  89. package/dist/src/components/layouts/DashboardLayout.d.ts +33 -0
  90. package/dist/src/components/layouts/DashboardLayout.d.ts.map +1 -0
  91. package/dist/src/components/layouts/DefaultLayout.d.ts +58 -0
  92. package/dist/src/components/layouts/DefaultLayout.d.ts.map +1 -0
  93. package/dist/src/components/layouts/HeaderLayout.d.ts +15 -0
  94. package/dist/src/components/layouts/HeaderLayout.d.ts.map +1 -0
  95. package/dist/src/components/layouts/NavigationGroup.d.ts +25 -0
  96. package/dist/src/components/layouts/NavigationGroup.d.ts.map +1 -0
  97. package/dist/src/components/layouts/NavigationItem.d.ts +30 -0
  98. package/dist/src/components/layouts/NavigationItem.d.ts.map +1 -0
  99. package/dist/src/components/layouts/SidebarLayout.d.ts +27 -0
  100. package/dist/src/components/layouts/SidebarLayout.d.ts.map +1 -0
  101. package/dist/src/components/layouts/index.d.ts +7 -0
  102. package/dist/src/components/layouts/index.d.ts.map +1 -0
  103. package/dist/src/composables/index.d.ts +4 -0
  104. package/dist/src/composables/index.d.ts.map +1 -0
  105. package/dist/src/composables/useCalendar.d.ts +146 -0
  106. package/dist/src/composables/useCalendar.d.ts.map +1 -0
  107. package/dist/src/composables/useFormValidation.d.ts +52 -0
  108. package/dist/src/composables/useFormValidation.d.ts.map +1 -0
  109. package/dist/src/composables/useModal.d.ts +36 -0
  110. package/dist/src/composables/useModal.d.ts.map +1 -0
  111. package/dist/src/dev.d.ts +2 -0
  112. package/dist/src/dev.d.ts.map +1 -0
  113. package/dist/src/index.d.ts +11 -0
  114. package/dist/src/index.d.ts.map +1 -0
  115. package/dist/src/plugin.d.ts +21 -0
  116. package/dist/src/plugin.d.ts.map +1 -0
  117. package/dist/src/types/avatars.d.ts +10 -0
  118. package/dist/src/types/avatars.d.ts.map +1 -0
  119. package/dist/src/types/badges.d.ts +10 -0
  120. package/dist/src/types/badges.d.ts.map +1 -0
  121. package/dist/src/types/calendars.d.ts +28 -0
  122. package/dist/src/types/calendars.d.ts.map +1 -0
  123. package/dist/src/types/form.d.ts +86 -0
  124. package/dist/src/types/form.d.ts.map +1 -0
  125. package/dist/src/types/forms.d.ts +17 -0
  126. package/dist/src/types/forms.d.ts.map +1 -0
  127. package/dist/src/types/index.d.ts +13 -0
  128. package/dist/src/types/index.d.ts.map +1 -0
  129. package/dist/src/types/inputs.d.ts +22 -0
  130. package/dist/src/types/inputs.d.ts.map +1 -0
  131. package/dist/src/types/layouts.d.ts +41 -0
  132. package/dist/src/types/layouts.d.ts.map +1 -0
  133. package/dist/src/types/loading.d.ts +11 -0
  134. package/dist/src/types/loading.d.ts.map +1 -0
  135. package/dist/src/types/navigation.d.ts +18 -0
  136. package/dist/src/types/navigation.d.ts.map +1 -0
  137. package/dist/src/types/tables.d.ts +24 -0
  138. package/dist/src/types/tables.d.ts.map +1 -0
  139. package/dist/src/types/transitions.d.ts +16 -0
  140. package/dist/src/types/transitions.d.ts.map +1 -0
  141. package/dist/src/types/ui.d.ts +353 -0
  142. package/dist/src/types/ui.d.ts.map +1 -0
  143. package/dist/src/utils/calendar.d.ts +50 -0
  144. package/dist/src/utils/calendar.d.ts.map +1 -0
  145. package/dist/src/utils/component-registry.d.ts +48 -0
  146. package/dist/src/utils/component-registry.d.ts.map +1 -0
  147. package/dist/src/utils/id.d.ts +13 -0
  148. package/dist/src/utils/id.d.ts.map +1 -0
  149. package/dist/src/utils/index.d.ts +4 -0
  150. package/dist/src/utils/index.d.ts.map +1 -0
  151. package/dist/style.css +1 -0
  152. package/package.json +143 -0
  153. package/tailwind.config.js +110 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.cjs","sources":["../src/utils/id.ts","../src/components/forms/FormFieldWrapper.vue","../src/components/UiTextInput.vue","../src/utils/component-registry.ts","../src/components/UiAvatar.vue","../src/components/UiBadge.vue","../node_modules/vue-router/dist/vue-router.mjs","../src/components/UiButton.vue","../src/components/UiNavLink.vue","../src/components/UiBreadcrumb.vue","../src/components/UiLoading.vue","../src/components/UiLoadingDots.vue","../src/components/UiModal.vue","../src/components/UiProgressBar.vue","../src/components/UiRadialProgressBar.vue","../src/components/UiTable.vue","../src/components/UiTransition.vue","../src/components/inputs/SelectInput.vue","../src/components/calendars/CalendarHeader.vue","../src/components/calendars/MonthCalendar.vue","../src/components/calendars/EventCard.vue","../src/components/calendars/EventsList.vue","../src/components/calendars/CalendarDashboard.vue","../src/utils/calendar.ts","../src/components/calendars/DayCalendar.vue","../src/components/calendars/WeekCalendar.vue","../src/components/calendars/YearCalendar.vue","../src/components/forms/DynamicFormField.vue","../src/components/forms/DynamicForm.vue","../src/components/inputs/CheckboxInput.vue","../src/components/inputs/ComboboxInput.vue","../src/components/inputs/TextAreaInput.vue","../src/components/inputs/SwitchInput.vue","../src/components/inputs/InputsShowcase.vue","../src/components/inputs/TagifyInput.vue","../src/components/layouts/DashboardLayout.vue","../src/components/layouts/DefaultLayout.vue","../src/components/layouts/HeaderLayout.vue","../src/components/layouts/NavigationGroup.vue","../src/components/layouts/NavigationItem.vue","../src/components/layouts/SidebarLayout.vue","../src/plugin.ts"],"sourcesContent":["/**\n * Generate a unique ID with an optional prefix\n */\nexport function generateId(prefix = 'sl'): string {\n return `${prefix}-${Math.random().toString(36).substr(2, 9)}-${Date.now().toString(36)}`\n}\n\n/**\n * Generate a deterministic ID based on a seed string\n */\nexport function generateDeterministicId(seed: string, prefix = 'sl'): string {\n // Simple hash function for consistent IDs\n let hash = 0\n for (let i = 0; i < seed.length; i++) {\n const char = seed.charCodeAt(i)\n hash = ((hash << 5) - hash) + char\n hash = hash & hash // Convert to 32-bit integer\n }\n return `${prefix}-${Math.abs(hash).toString(36)}`\n}\n\n/**\n * Sanitize a string to be used as a valid HTML ID\n */\nexport function sanitizeId(id: string): string {\n return id\n .toLowerCase()\n .replace(/[^a-z0-9-_]/g, '-')\n .replace(/-+/g, '-')\n .replace(/^-|-$/g, '')\n}\n","<template>\n <div :class=\"[\n {\n 'has-error': !!errorMessage && (isTouched || showErrors),\n 'success': isValid && isTouched,\n },\n fieldClasses\n ]\" class=\"sl-text-sm\" data-testid=\"form-field-wrapper\">\n <div class=\"sl-grid sl-grid-cols-3 sl-items-center\">\n <label v-if=\"label\" :for=\"id\" class=\"sl-text-sm sl-col-span-2 sl-font-medium sl-text-gray-700\">\n {{ label }}\n <span v-if=\"!optional\" class=\"sl-text-red-500 sl-ml-1\">*</span>\n </label>\n <template v-if=\"disabled && disabledMessage\">\n <p class=\"disabled-message sl-text-xs sl-text-gray-400 sl-col-start-3 sl-text-right\">\n {{ disabledMessage }}\n </p>\n <span v-if=\"tertiaryLabel\"\n class=\"sl-text-xs sl-uppercase sl-text-gray-500 sl-truncate sl-text-right sl-font-semibold sl-justify-self-end sl-col-start-3\">\n {{ tertiaryLabel }}\n <slot name=\"tertiary-label-overlay\"></slot>\n </span>\n </template>\n <template v-else>\n <span v-if=\"tertiaryLabel\"\n class=\"sl-text-2xs sl-uppercase sl-text-gray-500 sl-truncate sl-text-right sl-font-semibold sl-justify-self-end sl-col-start-3\">\n {{ tertiaryLabel }}\n <slot name=\"tertiary-label-overlay\"></slot>\n </span>\n </template>\n </div>\n\n <div class=\"sl-relative\" :class=\"{ 'sl-mt-2': label }\">\n <!-- Error Icon -->\n <div v-if=\"!!errorMessage && (isTouched || showErrors)\"\n class=\"sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-3 sl-z-10 sl-pointer-events-none\">\n <ExclamationCircleIcon class=\"sl-h-5 sl-w-5 sl-text-red-500\" aria-hidden=\"true\" data-testid=\"error-icon\" />\n </div>\n <!-- Success Icon -->\n <div v-else-if=\"showValidCheck && isValid && isTouched\"\n class=\"sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-3 sl-z-10 sl-pointer-events-none\">\n <CheckCircleIcon class=\"sl-h-5 sl-w-5 sl-text-green-500\" aria-hidden=\"true\" data-testid=\"check-icon\" />\n </div>\n\n <!-- Input with prefix slot -->\n <div v-if=\"hasPrefixSlot\"\n class=\"sl-flex sl-rounded-md sl-shadow-sm sl-ring-1 sl-ring-inset focus-within:sl-ring-2 focus-within:sl-ring-inset focus-within:sl-ring-stachelock-600\"\n :class=\"wrapperRingClasses\">\n <div class=\"sl-flex sl-select-none sl-items-center sl-pl-3 sl-text-gray-500 sm:sl-text-sm\">\n <slot name=\"prefix\" />\n </div>\n <div class=\"sl-flex-1 sl-min-w-0\">\n <slot :input-classes=\"defaultInputClasses\"></slot>\n </div>\n <slot name=\"input-right\" />\n </div>\n\n <!-- Plain input (default slot):\n - When disabled, show a unified wrapper ring to match design\n - Otherwise, apply ring directly on the input element\n -->\n <div v-else class=\"sl-relative\">\n <template v-if=\"disabled\">\n <div class=\"sl-flex sl-rounded-md sl-shadow-sm sl-ring-1 sl-ring-inset sl-bg-gray-50\"\n :class=\"wrapperRingClasses\">\n <div class=\"sl-flex-1 sl-min-w-0 sl-pl-2 sl-pr-2\">\n <slot :input-classes=\"disabledInputClasses\"></slot>\n </div>\n <slot name=\"input-right\" />\n </div>\n </template>\n <template v-else>\n <slot :input-classes=\"defaultInputRingClasses\"></slot>\n <div class=\"sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center\">\n <slot name=\"input-right\" />\n </div>\n </template>\n </div>\n </div>\n\n <Transition :show=\"(!!errorMessage && (isTouched || showErrors)) || (isValid && !!successMessage && isTouched)\"\n :appear=\"true\" enter-active-class=\"sl-transition sl-ease-out sl-duration-300\"\n enter-from-class=\"sl-opacity-0 sl-transform sl-scale-95\" enter-to-class=\"sl-opacity-100 sl-transform sl-scale-100\"\n leave-active-class=\"sl-transition sl-ease-in sl-duration-200\"\n leave-from-class=\"sl-opacity-100 sl-transform sl-scale-100\"\n leave-to-class=\"sl-opacity-0 sl-transform sl-scale-95\">\n <p v-if=\"!!errorMessage && (isTouched || showErrors)\"\n class=\"error-message sl-mt-2 sl-text-sm sl-text-red-600 sl-bg-red-50 sl-ring-1 sl-ring-red-100 sl-rounded-md sl-p-2\">\n {{ errorMessage }}\n </p>\n <p v-else-if=\"isValid && !!successMessage && isTouched\"\n class=\"success-message sl-mt-2 sl-text-sm sl-text-green-600 sl-bg-green-50 sl-p-2 sl-rounded-md\">\n <slot name=\"success-message\">{{ successMessage }}</slot>\n </p>\n </Transition>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue'\nimport { CheckCircleIcon, ExclamationCircleIcon } from '@heroicons/vue/20/solid'\n// (Transition is used in the template via built-in component)\n\ninterface FormFieldWrapperProps {\n id: string\n name: string\n label?: string\n tertiaryLabel?: string\n errorMessage?: string | null\n successMessage?: string\n isValid?: boolean\n isTouched?: boolean\n showErrors?: boolean // To force show errors\n showValidCheck?: boolean\n colorfulValidation?: boolean\n disabled?: boolean\n disabledMessage?: string\n optional?: boolean\n boxShadow?: boolean\n formTracking?: boolean\n isFocused?: boolean\n isHovered?: boolean\n externalErrors?: Record<string, unknown> | null\n}\n\nconst props = withDefaults(defineProps<FormFieldWrapperProps>(), {\n label: '',\n tertiaryLabel: '',\n errorMessage: null,\n successMessage: '',\n isValid: false,\n isTouched: false,\n showErrors: false,\n showValidCheck: true,\n colorfulValidation: false,\n disabled: false,\n disabledMessage: '',\n optional: false,\n boxShadow: false,\n formTracking: false,\n isFocused: false,\n isHovered: false,\n externalErrors: null,\n})\n\nconst slots = useSlots()\nconst hasPrefixSlot = computed(() => !!slots.prefix)\n\n// Optional card-like container and form-tracking ring classes\nconst fieldClasses = computed(() => [\n props.boxShadow ? 'sl-shadow sm:sl-rounded-lg sl-mt-2 sl-mb-4 sl-px-4 sl-py-5 sm:sl-p-6' : '',\n (props.formTracking && (props.isFocused || props.isHovered)) ? 'sl-ring-1 sl-ring-stachelock-600 sl-bg-white/80' : '',\n props.externalErrors && props.externalErrors[props.name] ? 'has-error' : ''\n])\n\nconst wrapperRingClasses = computed(() => {\n if (props.disabled) return 'sl-ring-gray-300'\n if (!props.colorfulValidation) return 'sl-ring-gray-300'\n if (props.isValid && (props.isTouched || props.showValidCheck)) return 'sl-ring-green-500'\n if (!!props.errorMessage && (props.isTouched || props.showErrors)) return 'sl-ring-red-500'\n return 'sl-ring-gray-300'\n})\n\n// Default classes that can be passed to the slotted input for consistency with TextInput\nconst defaultInputClasses = \"sl-block sl-w-full sl-border-0 sl-bg-transparent sl-py-1.5 sl-text-gray-800 sl-placeholder:text-gray-400 focus:sl-ring-0 sm:sl-text-sm sm:sl-leading-6\"\nconst defaultInputRingClasses = \"sl-block sl-w-full sl-rounded-md sl-border-0 sl-py-1.5 sl-text-gray-800 sl-shadow-sm sl-ring-1 sl-ring-inset sl-placeholder:text-gray-400 focus:sl-ring-2 focus:sl-ring-inset focus:sl-ring-stachelock-600 sm:sl-text-sm sm:sl-leading-6\"\nconst disabledInputClasses = \"sl-block sl-w-full sl-border-0 sl-bg-transparent sl-py-1 sl-text-gray-400 sl-placeholder:text-gray-400 focus:sl-ring-0 sm:sl-text-sm sm:sl-leading-6 sl-cursor-not-allowed\"\n</script>\n\n<style scoped>\n.error-message,\n.success-message,\n.disabled-message {\n min-height: 1.4em;\n /* Match TextInput for layout consistency */\n}\n</style>\n","<template>\n <div class=\"sl-form\">\n <FormFieldWrapper :id=\"id\" :name=\"name\" :label=\"label\" :tertiary-label=\"tertiaryLabel\" :error-message=\"errorMessage\"\n :success-message=\"successMessage\" :is-valid=\"meta.valid\" :is-touched=\"meta.touched\" :show-errors=\"showErrors\"\n :show-valid-check=\"showValidCheck\" :colorful-validation=\"colorfulValidation\" :disabled=\"disabled\"\n :disabled-message=\"disabledMessage\" :box-shadow=\"boxShadow\">\n <!-- Prefix slot is passed through to wrapper -->\n <template #prefix>\n <slot name=\"prefix\" />\n </template>\n\n <!-- Default slot: the input field, consuming wrapper-provided classes -->\n <template #default=\"{ inputClasses }\">\n <input v-bind=\"$attrs\" :name=\"name\" :id=\"id\" :type=\"type\" :value=\"inputValue\" :placeholder=\"placeholder\"\n :spellcheck=\"spellcheck\" :disabled=\"disabled\"\n class=\"sl-block sl-w-full sl-bg-transparent placeholder:sl-text-gray-400 focus:sl-ring-0 focus:sl-outline-none sm:sl-text-sm sm:sl-leading-6\"\n :class=\"[\n inputClasses,\n 'sl-py-1.5 sl-pl-2 sl-pr-2',\n { 'sl-uppercase': capitalize },\n { 'sl-text-gray-400': disabled },\n { 'sl-pr-10': showValidCheck },\n inputClass,\n ]\" :style=\"inputStyle\" @input=\"handleInput\" @focus=\"handleFocus\" @blur=\"handleBlur\" />\n </template>\n\n <template #input-right>\n <slot name=\"input-right\" />\n </template>\n </FormFieldWrapper>\n </div>\n\n</template>\n\n<script setup lang=\"ts\">\nimport { defineOptions } from 'vue'\nimport { toRef, watch, ref, nextTick } from 'vue';\nimport { useField } from 'vee-validate';\nimport { debounce } from 'lodash-es';\nimport type { TextInputType } from '../types/ui';\nimport FormFieldWrapper from './forms/FormFieldWrapper.vue';\nimport { generateId } from '../utils/id';\n\ndefineOptions({ inheritAttrs: false })\n\ninterface TextInputProps extends TextInputType {\n boxShadow?: boolean\n}\n\nconst props = withDefaults(defineProps<TextInputProps>(), {\n type: 'text',\n value: '',\n label: '',\n successMessage: '',\n placeholder: '',\n rules: () => ({}),\n validateOnMount: true,\n disabled: false,\n disabledMessage: '',\n inputClass: '',\n inputStyle: '',\n spellcheck: true,\n capitalize: false,\n lazy: false,\n transformFunction: (v: string) => v,\n tertiaryLabel: '',\n colorfulValidation: true,\n showValidCheck: true,\n showErrors: false,\n boxShadow: false,\n});\n\nconst emits = defineEmits<{\n 'update:value': [value: string]\n 'focus': [event: Event]\n 'blur': [event: Event]\n 'error': [error: string | null]\n 'update:validity': [isValid: boolean]\n}>();\n\nconst touched = ref(false);\nconst id = generateId(props.name || 'text-input');\nconst validateOnMountRef = ref(props.validateOnMount);\n\nconst { value: inputValue, errorMessage, handleChange, meta, validate, setTouched } =\n useField(toRef(props, 'name'), toRef(props, 'rules'), {\n initialValue: props.value,\n validateOnValueUpdate: !props.lazy,\n validateOnMount: validateOnMountRef.value,\n });\n\n\nconst emitValue = (v: string) => emits('update:value', v);\nconst debouncedEmit = debounce(emitValue, 300);\n\nfunction handleInput(e: Event) {\n const v = (e.target as HTMLInputElement).value;\n if (props.lazy) debouncedEmit(v);\n else emitValue(v);\n handleChange(props.transformFunction(v));\n}\n\nasync function handleBlur(e: Event) {\n if (!touched.value) {\n touched.value = true;\n setTouched(true);\n }\n if (props.lazy) emitValue(inputValue.value);\n await validate();\n emits('blur', e);\n}\n\nfunction handleFocus(e: Event) {\n emits('focus', e);\n}\n\nwatch(() => meta.valid, v => nextTick(() => emits('update:validity', v)), { immediate: true });\n\nwatch(() => props.value, v => {\n if (v !== inputValue.value) inputValue.value = v;\n});\n\n// Wrapper now manages error/success visuals consistently across inputs\n</script>\n\n<style scoped>\n.error-message,\n.disabled-message {\n min-height: 1.4em;\n}\n\ninput:disabled {\n color: #9ca3af;\n background-color: #f3f4f6;\n}\n</style>\n","import { defineAsyncComponent, type Component } from 'vue'\nimport UiTextInput from '../components/UiTextInput.vue'\nimport type { ComponentMap } from '../types/form'\n\n/**\n * Default component map for dynamic forms\n */\nexport const defaultComponentMap: ComponentMap = {\n text: {\n component: 'TextInput',\n loader: () => Promise.resolve(UiTextInput)\n },\n email: {\n component: 'TextInput',\n loader: () => Promise.resolve(UiTextInput)\n },\n password: {\n component: 'TextInput',\n loader: () => Promise.resolve(UiTextInput)\n },\n number: {\n component: 'TextInput',\n loader: () => Promise.resolve(UiTextInput)\n },\n tel: {\n component: 'TextInput',\n loader: () => Promise.resolve(UiTextInput)\n },\n url: {\n component: 'TextInput',\n loader: () => Promise.resolve(UiTextInput)\n },\n textarea: {\n component: 'TextAreaInput',\n loader: () => import('../components/inputs/TextAreaInput.vue')\n },\n select: {\n component: 'SelectInput',\n loader: () => import('../components/inputs/SelectInput.vue')\n },\n combobox: {\n component: 'ComboboxInput',\n loader: () => import('../components/inputs/ComboboxInput.vue')\n },\n checkbox: {\n component: 'CheckboxInput',\n loader: () => import('../components/inputs/CheckboxInput.vue')\n },\n switch: {\n component: 'SwitchInput',\n loader: () => import('../components/inputs/SwitchInput.vue')\n }\n}\n\n/**\n * Component registry class for managing dynamic form components\n */\nexport class ComponentRegistry {\n private componentMap: ComponentMap = { ...defaultComponentMap }\n private loadedComponents: Map<string, Component> = new Map()\n\n /**\n * Register a new component type\n */\n register(type: string, component: string, loader: () => Promise<any>): void {\n this.componentMap[type] = { component, loader }\n // Clear cached component if it exists\n this.loadedComponents.delete(type)\n }\n\n /**\n * Get a component for a field type\n */\n getComponent(type: string): Component | null {\n const mapItem = this.componentMap[type]\n if (!mapItem) {\n console.warn(`Component type \"${type}\" is not registered`)\n return null\n }\n\n // Return cached component if available\n if (this.loadedComponents.has(type)) {\n return this.loadedComponents.get(type)!\n }\n\n // Create async component\n const asyncComponent = defineAsyncComponent({\n loader: mapItem.loader,\n delay: 0\n })\n\n this.loadedComponents.set(type, asyncComponent)\n return asyncComponent\n }\n\n /**\n * Check if a component type is registered\n */\n hasComponent(type: string): boolean {\n return type in this.componentMap\n }\n\n /**\n * Get all registered component types\n */\n getRegisteredTypes(): string[] {\n return Object.keys(this.componentMap)\n }\n\n /**\n * Unregister a component type\n */\n unregister(type: string): void {\n delete this.componentMap[type]\n this.loadedComponents.delete(type)\n }\n\n /**\n * Clear all cached components\n */\n clearCache(): void {\n this.loadedComponents.clear()\n }\n}\n\n// Global component registry instance\nexport const componentRegistry = new ComponentRegistry()\n\n/**\n * Register a component type globally\n */\nexport function registerComponent(type: string, component: string, loader: () => Promise<any>): void {\n componentRegistry.register(type, component, loader)\n}\n\n/**\n * Get a component for a field type\n */\nexport function getComponent(type: string): Component | null {\n return componentRegistry.getComponent(type)\n}\n","<template>\n <div class=\"sl-relative sl-inline-block\" :class=\"[sizeClass, ring, rounded]\">\n <div v-if=\"hasImage && !imageError\" class=\"sl-h-full sl-w-full\">\n <img\n :src=\"imageUrl\"\n :alt=\"displayName\"\n class=\"sl-h-full sl-w-full sl-object-cover\"\n :class=\"rounded\"\n @error=\"handleImageError\"\n />\n </div>\n <div v-if=\"!hasImage || imageError\" class=\"sl-h-full sl-w-full sl-flex sl-items-center sl-justify-center sl-font-semibold sl-text-white\"\n :class=\"[color, rounded]\">\n {{ initials }}\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\n\ninterface AvatarProps {\n // Flexible data object - can be any object with optional name and image properties\n data?: Record<string, any>;\n \n // Direct properties for simple use cases\n name?: string;\n imageUrl?: string;\n \n // Size options\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | number;\n \n // Styling options\n color?: string;\n ring?: string;\n rounded?: string;\n \n // Image fallback options\n fallbackInitials?: string;\n fallbackIcon?: string;\n \n // Custom image path keys for different data structures\n imagePath?: string | string[]; // e.g., 'profile_image.url' or ['profile_image', 'url']\n namePath?: string | string[]; // e.g., 'display_name' or ['user', 'profile', 'name']\n}\n\nconst props = withDefaults(defineProps<AvatarProps>(), {\n size: 'md',\n color: 'sl-bg-stachelock-600',\n ring: 'sl-ring-white',\n rounded: 'sl-rounded-full',\n fallbackInitials: '?',\n imagePath: 'image.url',\n namePath: 'name'\n});\n\nconst imageError = ref(false);\n\nconst handleImageError = () => {\n imageError.value = true;\n};\n\n// Size classes mapping\nconst sizeClasses: Record<string, string> = {\n xs: 'sl-h-6 sl-w-6',\n sm: 'sl-h-8 sl-w-8',\n md: 'sl-h-12 sl-w-12',\n lg: 'sl-h-16 sl-w-16',\n xl: 'sl-h-20 sl-w-20',\n '2xl': 'sl-h-24 sl-w-24',\n};\n\nconst sizeClass = computed(() => {\n if (typeof props.size === 'number') {\n return `sl-h-${props.size} sl-w-${props.size}`;\n }\n return sizeClasses[props.size] || sizeClasses.md;\n});\n\n// Helper function to get nested object values\nconst getNestedValue = (obj: any, path: string | string[]): any => {\n if (!obj) return undefined;\n \n const keys = Array.isArray(path) ? path : path.split('.');\n let current = obj;\n \n for (const key of keys) {\n if (current && typeof current === 'object' && key in current) {\n current = current[key];\n } else {\n return undefined;\n }\n }\n \n return current;\n};\n\n// Get image URL from various sources\nconst imageUrl = computed(() => {\n // Direct imageUrl prop takes precedence\n if (props.imageUrl) return props.imageUrl;\n \n // Try to get from data object using imagePath\n if (props.data && props.imagePath) {\n const url = getNestedValue(props.data, props.imagePath);\n if (url) return url;\n }\n \n // Fallback to common image paths if no specific path provided\n if (props.data) {\n const commonPaths = [\n 'profile_image.url',\n 'image.url',\n 'avatar.url',\n 'photo.url',\n 'picture.url'\n ];\n \n for (const path of commonPaths) {\n const url = getNestedValue(props.data, path);\n if (url) return url;\n }\n }\n \n return null;\n});\n\n// Get display name from various sources\nconst displayName = computed(() => {\n // Direct name prop takes precedence\n if (props.name) return props.name;\n \n // Try to get from data object using namePath\n if (props.data && props.namePath) {\n const name = getNestedValue(props.data, props.namePath);\n if (name) return name;\n }\n \n // Fallback to common name paths if no specific path provided\n if (props.data) {\n const commonPaths = [\n 'name',\n 'display_name',\n 'full_name',\n 'username',\n 'title'\n ];\n \n for (const path of commonPaths) {\n const name = getNestedValue(props.data, path);\n if (name) return name;\n }\n }\n \n return '';\n});\n\nconst hasImage = computed(() => {\n return !!imageUrl.value;\n});\n\nconst initials = computed(() => {\n const name = displayName.value;\n \n if (!name || name.trim() === '') {\n return props.fallbackInitials;\n }\n\n const names = name.split(' ').filter(Boolean);\n if (names.length === 0) {\n return props.fallbackInitials;\n }\n\n if (names.length === 1) {\n return names[0][0].toUpperCase();\n } else {\n return (names[0][0] + names[names.length - 1][0]).toUpperCase();\n }\n});\n</script>\n\n<style scoped>\n</style>\n","<template>\n <span :class=\"[badgeClass, roundedClass, colorClass, sizeClass]\">\n <slot />\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue';\n\ninterface BadgeProps {\n theme?: 'primary' | 'dark' | 'secondary' | 'light' | 'warning' | 'danger' | 'success' | 'ghost';\n shape?: 'circular' | 'rounded' | 'default';\n size?: 'xs' | 'sm' | 'md' | 'lg';\n}\n\nconst props = withDefaults(defineProps<BadgeProps>(), {\n theme: 'primary',\n shape: 'default',\n size: 'md'\n});\n\nconst badgeClass = 'sl-inline-flex sl-items-center sl-font-medium sl-ring-1 sl-ring-inset sl-p-4';\n\nconst colorClass = computed(() => {\n const baseClasses = {\n // Use the same color scheme as in UiButton\n primary: 'sl-bg-stachelock-050 sl-text-stachelock-600 sl-ring-stachelock-600/10',\n dark: 'sl-bg-gray-50 sl-text-gray-600 sl-ring-gray-500/10',\n secondary: 'sl-bg-gray-100 sl-text-gray-800 sl-ring-gray-300',\n light: 'sl-bg-white sl-text-gray-800 sl-ring-gray-300',\n warning: 'sl-bg-yellow-50 sl-text-yellow-800 sl-ring-yellow-600/20',\n danger: 'sl-bg-red-50 sl-text-red-700 sl-ring-red-600/10',\n success: 'sl-bg-green-50 sl-text-green-700 sl-ring-green-600/20',\n ghost: 'sl-bg-white sl-text-gray-400 sl-ring-gray-400/20',\n };\n return baseClasses[props.theme];\n});\n\nconst roundedClass = {\n circular: 'sl-rounded-full',\n rounded: 'sl-rounded-lg',\n default: 'sl-rounded-md', // Default rounded class\n}[props.shape];\n\nconst sizeClass = {\n xs: 'sl-px-1 sl-py-0.5 sl-text-4xs',\n sm: 'sl-px-2 sl-py-0.5 sl-text-xs',\n md: 'sl-px-3 sl-py-1 sl-text-sm',\n lg: 'sl-px-4 sl-py-1.5 sl-text-md',\n}[props.size];\n</script>\n\n<style scoped>\n/* Add any additional styling here */\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","<template>\n <button\n ref=\"buttonRef\"\n type=\"button\"\n :disabled=\"props.disabled\"\n :class=\"buttonClasses\"\n @click=\"onClick\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n >\n <!-- Leading Icon Area (or Loading Replacement) -->\n <template v-if=\"props.centerLeadingIcon && !isLabelPresent\">\n <div :class=\"leadingIconClasses\">\n <slot name=\"leading-icon\" />\n </div>\n </template>\n <template v-else>\n <div\n v-if=\"replaceLeadingIconWithLoading && loading\"\n class=\"sl-flex sl-items-center sl-justify-center\"\n :class=\"[leadingIconClasses, !isLabelPresent ? 'sl-h-full sl-w-full' : '']\"\n >\n <Loading :theme=\"theme\" :size=\"loadingSize\" />\n </div>\n <div v-else-if=\"props.leadingIcon\" :class=\"leadingIconClasses\">\n <slot name=\"leading-icon\" />\n </div>\n </template>\n\n <!-- Button Content -->\n <span\n v-if=\"isLabelPresent\"\n class=\"sl-flex-1 sl-text-center\"\n :class=\"[\n { 'sl-truncate sl-max-w-[150px]': truncateLabel },\n { 'sl-mx-auto': !props.leadingIcon && !props.trailingIcon }\n ]\"\n >\n {{ props.label }}\n </span>\n <span\n v-else-if=\"(!replaceLeadingIconWithLoading || !loading) && !props.centerLeadingIcon\"\n class=\"sl-flex\"\n :class=\"props.centerLabel || (!props.leadingIcon && !props.trailingIcon) ? 'sl-justify-center sl-items-center sl-flex-1' : 'sl-flex-1'\"\n >\n <slot />\n </span>\n\n <!-- Trailing Icon or Loading -->\n <div v-if=\"props.trailingLoading && loading\" :class=\"trailingLoadingClasses\">\n <Loading :theme=\"theme\" :size=\"props.trailingLoadingSize || 'sm'\" />\n </div>\n <div v-else-if=\"props.trailingIcon\" :class=\"trailingIconClasses\">\n <slot name=\"trailing-icon\" />\n </div>\n\n <!-- Badge Slot -->\n <div class=\"sl-absolute sl-top-0 sl-right-0 sl-transform sl-translate-x-1/2 -sl-translate-y-1/2\">\n <slot name=\"badge\" />\n </div>\n\n <!-- Overlay Loading (if not replacing the leading icon and not using trailing loading) -->\n <div\n v-if=\"loading && !replaceLeadingIconWithLoading && !props.trailingLoading\"\n class=\"sl-absolute sl-inset-0 sl-flex sl-items-center sl-justify-center sl-bg-opacity-75 sl-bg-white dark:sl-bg-opacity-75 dark:sl-bg-gray-700 sl-rounded sl-z-10\"\n >\n <Loading :theme=\"theme\" :size=\"loadingSize\" />\n <p v-if=\"showLoadingTitle\">Loading...</p>\n </div>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, defineAsyncComponent, ref, onMounted, watch, nextTick } from 'vue';\nimport type { ButtonType, RoundedType, Theme } from '../types/ui';\n\n// Asynchronously load the Loading component\nconst Loading = defineAsyncComponent(() => import('./UiLoading.vue'));\n\n// Define props using the ButtonType interface\ninterface ButtonProps extends ButtonType {\n replaceLeadingIconWithLoading?: boolean;\n centerLeadingIcon?: boolean;\n /**\n * When enabled, shows loading indicator in trailing position instead of overlay\n */\n trailingLoading?: boolean;\n /**\n * Size of the loading indicator when using trailingLoading\n */\n trailingLoadingSize?: import('../types/ui').Size;\n /**\n * Positions trailing loading/icon absolutely at the far right, centered vertically.\n */\n trailingOverlay?: boolean;\n /**\n * When enabled the button will attempt to automatically choose a contrasting\n * colour theme if its background matches that of its closest non-transparent\n * ancestor.\n */\n autoContrast?: boolean;\n}\n\nconst props = withDefaults(defineProps<ButtonProps>(), {\n theme: 'primary',\n size: 'md',\n rounded: 'rounded-md',\n disabled: false,\n expanded: false,\n outlined: false,\n loading: false,\n leadingIcon: false,\n trailingIcon: false,\n showLoadingTitle: false,\n truncateLabel: false,\n centerLabel: false,\n inlineFlex: false,\n replaceLeadingIconWithLoading: false,\n centerLeadingIcon: false,\n trailingLoading: false,\n trailingOverlay: false,\n autoContrast: false,\n});\n\n// Define the emits\nconst emit = defineEmits<{\n 'button-click': []\n 'hover-enter': []\n 'hover-leave': []\n}>();\n\n// Reactive computed properties\nconst loading = computed(() => Boolean(props.loading));\nconst replaceLeadingIconWithLoading = computed(() => props.replaceLeadingIconWithLoading || false);\n\n// Reference to the underlying button element\nconst buttonRef = ref<HTMLElement | null>(null);\n\n// Internal reactive theme value that may be overridden for auto-contrast\nconst resolvedTheme = ref<Theme>(props.theme ?? 'primary');\n\nconst findParentBackground = (node: HTMLElement | null): string | null => {\n while (node && node !== document.documentElement) {\n const bg = window.getComputedStyle(node).backgroundColor;\n if (bg && bg !== 'rgba(0, 0, 0, 0)' && bg !== 'transparent') {\n return bg;\n }\n node = node.parentElement as HTMLElement | null;\n }\n return null;\n};\n\nconst adjustThemeBasedOnBackground = (): void => {\n if (!props.autoContrast) return;\n const el = buttonRef.value;\n if (!el) return;\n\n const parentBg = findParentBackground(el.parentElement as HTMLElement | null);\n if (!parentBg) return;\n\n const buttonBg = window.getComputedStyle(el).backgroundColor;\n\n if (buttonBg === parentBg) {\n resolvedTheme.value = resolvedTheme.value === 'light' ? 'primary' : 'light';\n }\n};\n\nonMounted(() => {\n nextTick(adjustThemeBasedOnBackground);\n});\n\nwatch(\n () => props.theme,\n (newTheme) => {\n resolvedTheme.value = newTheme || 'primary';\n nextTick(adjustThemeBasedOnBackground);\n },\n { immediate: false }\n);\n\n// Public computed theme\nconst theme = computed(() => resolvedTheme.value);\n\n// Compute loading size with fallback\nconst loadingSize = computed(() => props.loadingSize || props.size || 'md');\n\n// Styling computed properties\nconst colorClass = computed(() => {\n const outlineBaseClasses: Record<string, string> = {\n primary: 'sl-text-stachelock-600 sl-border sl-border-stachelock-600 hover:sl-bg-stachelock-50 hover:sl-border-stachelock-400 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-stachelock-300 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n dark: 'sl-text-gray-700 sl-border sl-border-gray-700 hover:sl-bg-gray-50 hover:sl-border-gray-800 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-gray-300 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n secondary: 'sl-text-gray-800 sl-border sl-border-gray-300 hover:sl-bg-gray-100 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-gray-300 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n light: 'sl-text-gray-800 sl-border sl-border-gray-300 hover:sl-bg-gray-100 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-gray-300 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n warning: 'sl-text-yellow-500 sl-border sl-border-yellow-500 hover:sl-bg-yellow-50 hover:sl-border-yellow-400 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-yellow-300 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n danger: 'sl-text-red-500 sl-border sl-border-red-500 hover:sl-bg-red-50 hover:sl-border-red-400 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-red-300 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n success: 'sl-text-green-500 sl-border sl-border-green-500 hover:sl-bg-green-50 hover:sl-border-green-400 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-green-300 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n ghost: 'sl-text-gray-800 sl-border sl-border-transparent sl-bg-transparent hover:sl-text-gray-700 focus:sl-outline-none',\n };\n\n const filledBaseClasses: Record<string, string> = {\n primary: 'sl-border sl-border-transparent sl-bg-stachelock-600 sl-text-white sl-shadow-sm hover:sl-bg-stachelock-700 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-stachelock-500 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n dark: 'sl-border sl-border-transparent sl-bg-gray-700 sl-text-white sl-shadow-sm hover:sl-bg-gray-800 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-gray-500 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n secondary: 'sl-text-gray-800 sl-bg-gray-200 hover:sl-bg-gray-100 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-gray-300 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50 sl-border sl-border-gray-300',\n light: 'sl-text-gray-800 sl-bg-gray-200 hover:sl-bg-gray-100 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-gray-300 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50 sl-border sl-border-gray-300',\n warning: 'sl-border sl-border-transparent sl-bg-yellow-400 sl-text-white sl-shadow-sm hover:sl-bg-yellow-600 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-yellow-400 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n danger: 'sl-border sl-border-transparent sl-bg-red-500 sl-text-white sl-shadow-sm hover:sl-bg-red-600 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-red-400 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n success: 'sl-border sl-border-transparent sl-bg-green-500 sl-text-white sl-shadow-sm hover:sl-bg-green-600 focus:sl-outline-none focus:sl-ring-2 focus:sl-ring-green-400 focus:sl-ring-offset-2 focus:sl-ring-offset-gray-50',\n ghost: 'sl-border sl-border-transparent sl-text-gray-800 sl-bg-transparent hover:sl-text-gray-700 focus:sl-outline-none',\n };\n\n if (props.outlined) {\n return `${outlineBaseClasses[theme.value] || ''} sl-bg-transparent`;\n } else {\n return filledBaseClasses[theme.value] || '';\n }\n});\n\nconst roundedClassMap: Record<RoundedType, string> = {\n square: '',\n rounded: 'sl-rounded',\n 'rounded-md': 'sl-rounded-md',\n 'rounded-lg': 'sl-rounded-lg',\n 'rounded-full': 'sl-rounded-full',\n};\n\nconst roundedClass = computed(() => roundedClassMap[props.rounded || 'rounded-md']);\n\nconst sizeClass = computed(() => {\n const sizeMapping: Record<string, string> = {\n xs: 'sl-p-0.5',\n sm: 'sl-p-1',\n md: 'sl-p-2',\n lg: 'sl-p-3',\n xl: 'sl-p-4',\n '2xl': 'sl-p-5',\n };\n return sizeMapping[props.size || 'md'];\n});\n\nconst textClass = computed(() => {\n const textMapping: Record<string, string> = {\n xs: 'sl-text-xs sl-font-regular',\n sm: 'sl-text-sm sl-font-regular',\n md: 'sl-text-base sl-font-medium',\n lg: 'sl-text-lg sl-font-medium',\n xl: 'sl-text-xl sl-font-medium',\n '2xl': 'sl-text-2xl sl-font-medium',\n };\n return textMapping[props.size || 'sm'];\n});\n\nconst expandedClass = computed(() => (props.expanded ? 'sl-w-full' : ''));\n\nconst isLabelPresent = computed(() => !!props.label && props.label.length > 0);\n\nconst buttonClasses = computed(() => {\n if (props.customClass) {\n return props.customClass;\n }\n\n const coreClasses = [\n roundedClass.value,\n sizeClass.value,\n textClass.value,\n expandedClass.value,\n colorClass.value,\n props.disabled ? 'sl-cursor-not-allowed' : 'sl-cursor-pointer',\n 'focus:sl-ring-0',\n 'sl-relative',\n 'sl-flex',\n 'sl-items-center',\n 'sl-justify-center',\n ];\n\n const finalClasses = [...coreClasses];\n\n if (roundedClass.value === 'sl-rounded-full') {\n finalClasses.push('sl-px-1', 'sl-py-1');\n } else {\n finalClasses.push('sl-px-2.5', 'sl-py-2');\n }\n\n if (props.centerLeadingIcon && !isLabelPresent.value) {\n finalClasses.push('sl-w-full', 'sl-h-full');\n } else {\n if (props.leadingIcon || props.inlineFlex || props.trailingIcon) {\n finalClasses.push('sl-inline-flex');\n }\n }\n\n return finalClasses.filter(Boolean);\n});\n\nconst trailingBaseClasses = 'sl-ml-auto sl-flex sl-items-center';\nconst trailingAbsoluteClasses = 'sl-absolute sl-right-0 sl-top-1/2 -sl-translate-y-1/2 sl-pr-0 sl-flex sl-items-center';\nconst trailingLoadingClasses = computed(() => props.trailingOverlay ? trailingAbsoluteClasses : trailingBaseClasses);\nconst trailingIconClasses = computed(() => props.trailingOverlay ? `${trailingAbsoluteClasses} sl-h-5 sl-w-5` : 'sl-ml-2 sl-h-5 sl-w-5 sl-flex sl-items-center');\n\nconst leadingIconClasses = computed(() => {\n if (props.centerLeadingIcon && !isLabelPresent.value) {\n return 'sl-absolute sl-inset-0 sl-flex sl-items-center sl-justify-center sl-w-full sl-h-full';\n }\n if (props.centerLeadingIcon) {\n return 'sl-h-full sl-flex sl-items-center sl-justify-center';\n }\n if (!isLabelPresent.value) {\n return 'sl-flex sl-items-center sl-justify-center';\n }\n return '-sl-ml-0.5 sl-h-5 sl-w-5 sl-flex sl-items-center sl-justify-center';\n});\n\nconst onClick = (): void => {\n emit('button-click');\n};\n\nconst onMouseEnter = (): void => {\n emit('hover-enter');\n};\n\nconst onMouseLeave = (): void => {\n emit('hover-leave');\n};\n\nconst showLoadingTitle = props.showLoadingTitle || false;\n</script>\n\n<style scoped>\n/* Component-specific styles if needed */\n</style>\n\n\n","<template>\n <UiButton center-label v-bind=\"$attrs\" :disabled=\"disabled\" :loading=\"displayLoading\" :trailing-loading=\"true\"\n :trailing-loading-size=\"'xs'\" :custom-class=\"computedClasses\" :aria-current=\"ariaCurrent\" @click=\"handleClick\">\n <!-- This container spans the full width and arranges its children -->\n <div class=\"sl-flex sl-items-center sl-w-full\">\n <!-- Primary text container: icon and default slot (primary text) -->\n <div class=\"sl-flex sl-items-center sl-space-x-2 sl-flex-1\">\n <slot name=\"icon\" :is-exact-active=\"isExactActive\" :is-active=\"isActive\" />\n <slot />\n </div>\n <!-- Secondary text container: aligned to the right if content exists -->\n <div v-if=\"$slots.secondaryText || $slots.badge\" class=\"sl-flex sl-items-center sl-ml-auto\">\n <slot name=\"secondaryText\" />\n <!-- Badge slot (if provided) will be handled by UiButton's own positioning -->\n <slot name=\"badge\" />\n </div>\n </div>\n </UiButton>\n</template>\n\n<script setup lang=\"ts\">\nimport { toRefs, ref, watch, computed } from 'vue';\nimport { useRoute, useLink, useRouter, type RouteLocationRaw, type RouteRecordNameGeneric } from 'vue-router';\nimport UiButton from './UiButton.vue';\n\n// Define the props interface for this component.\ninterface RouteMeta {\n isErrorPage?: boolean;\n}\n\ninterface UiNavLinkProps {\n to: RouteLocationRaw;\n inactiveClass?: string;\n activeClass?: string;\n ariaCurrent?: \"time\" | \"page\" | \"step\" | \"location\" | \"date\" | undefined;\n current?: boolean;\n disabled?: boolean;\n customDisabled?: boolean; // New prop for custom disabled styling (gray text, no cursor)\n useCustomActiveState?: boolean; // New prop to control active state behavior\n}\n\n// Define the component props with default values.\nconst props = withDefaults(defineProps<UiNavLinkProps>(), {\n inactiveClass: '',\n activeClass: '',\n ariaCurrent: undefined,\n current: false,\n disabled: false,\n customDisabled: false,\n useCustomActiveState: false,\n});\n\n// Declare an emit for click events.\nconst emit = defineEmits<{\n (e: 'click', event: MouseEvent): void;\n}>();\n\n// Destructure the props into refs.\nconst { to, inactiveClass, activeClass, ariaCurrent, current, disabled, customDisabled, useCustomActiveState } = toRefs(props);\n\n// Get navigation helpers from vue-router.\nconst { navigate, isExactActive, isActive } = useLink({ to });\n\n// Get the router instance.\nconst router = useRouter();\n\n// Track the previous route for sidebar closing logic.\nconst route = useRoute();\nconst previousRoute = ref<RouteRecordNameGeneric | null>(route.name);\nwatch(route, (to, from) => {\n previousRoute.value = from.name;\n});\n\n// Determine if the target route is valid and not an error page.\nconst isReal = computed(() => {\n const resolved = router.resolve(to.value);\n return resolved && resolved.matched.length > 0 && !resolved.matched.some((route: { meta?: RouteMeta }) => route.meta?.isErrorPage);\n});\n\n// Compute custom classes for the UiButton.\nconst computedClasses = computed(() => {\n // If useCustomActiveState is true, use only the current prop\n // Otherwise use the router's isActive behavior\n const shouldBeActive = useCustomActiveState.value ? current.value : isActive.value;\n\n const classes = [\n (shouldBeActive ? activeClass.value : inactiveClass.value),\n 'sl-w-full',\n 'sl-flex', // Make the button container a flexbox.\n 'sl-items-center', // Vertically align items.\n 'sl-relative', // Essential for loading overlay positioning\n 'sl-justify-between', // Space between content and trailing loading\n ];\n\n // Handle cursor and disabled styling\n if (customDisabled.value) {\n classes.push('sl-cursor-not-allowed', 'sl-text-gray-500');\n } else if (!isReal.value || disabled.value) {\n classes.push('sl-cursor-not-allowed');\n } else {\n classes.push('sl-cursor-pointer');\n }\n\n return classes.join(' ');\n});\n\n// Simple loading state for demonstration\nconst displayLoading = ref(false);\n\n// Click handler that emits events and manages navigation.\nconst handleClick = async (event: MouseEvent) => {\n // Emit the click event for parent components to intercept.\n emit('click', event);\n\n // If the default action was prevented, do not proceed.\n if (event.defaultPrevented) {\n return;\n }\n\n // Don't navigate if custom disabled\n if (customDisabled.value) {\n return;\n }\n\n // Don't navigate if disabled\n if (disabled.value) {\n return;\n }\n\n // Use the enhanced navigation from the composable\n try {\n displayLoading.value = true;\n await navigate();\n } catch (error) {\n console.error('[UiNavLink] Navigation failed:', error);\n } finally {\n displayLoading.value = false;\n }\n};\n</script>\n\n<style scoped>\n</style>\n","<template>\n <nav class=\"sl-hidden sm:sl-flex\" aria-label=\"Breadcrumb\">\n <ol role=\"list\" class=\"sl-flex sl-items-center sl-space-x-4\">\n <li v-for=\"(breadcrumb, index) in processedBreadcrumbs\" :key=\"breadcrumb.fullPath\">\n <div class=\"sl-flex sl-items-center\">\n <ChevronRightIcon v-if=\"index !== 0\" class=\"sl-h-5 sl-w-5 sl-flex-shrink-0 sl-text-gray-400 sl-mr-3\" aria-hidden=\"true\" />\n <!-- Make sure UiNavLink forwards the native click event -->\n <UiNavLink :to=\"breadcrumb.fullPath\" @click=\"(event) => handleBreadcrumbClick(breadcrumb, event)\"\n :aria-current=\"breadcrumb.fullPath === currentPath ? 'page' : undefined\"\n class=\"sl-text-sm sl-font-medium sl-text-gray-500 hover:sl-text-gray-700 sl-truncate sl-overflow-ellipsis\">\n {{ breadcrumb.name }}\n </UiNavLink>\n </div>\n </li>\n </ol>\n </nav>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watchEffect, computed } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\nimport UiNavLink from './UiNavLink.vue';\nimport { ChevronRightIcon } from '@heroicons/vue/20/solid';\n\ninterface BreadcrumbItem {\n name: string;\n fullPath: string;\n}\n\ninterface RouteMeta {\n isErrorPage?: boolean;\n}\n\nconst breadcrumbs = ref<BreadcrumbItem[]>([]);\n\nconst route = useRoute();\nconst router = useRouter();\nconst currentPath = ref<string>('');\n\nconst processedBreadcrumbs = computed(() => {\n return breadcrumbs.value.map(breadcrumb => {\n // Optionally trim very long names (only if needed)\n const trimmedName = breadcrumb.name.trim();\n return {\n ...breadcrumb,\n name: trimmedName.length > 12 ? trimmedName.slice(0, 12) + '...' : trimmedName\n };\n });\n});\n\nconst processSegments = async () => {\n const path = route.path;\n currentPath.value = path;\n const pathSegments = path.split('/').filter(Boolean);\n const tempBreadcrumbs: BreadcrumbItem[] = [];\n\n // Loop through each segment in the URL.\n for (const [index, segment] of pathSegments.entries()) {\n let segmentName: string;\n \n // Simple processing - can be extended as needed\n segmentName = segment.charAt(0).toUpperCase() + segment.slice(1).toLowerCase();\n\n tempBreadcrumbs.push({\n name: segmentName,\n fullPath: '/' + pathSegments.slice(0, index + 1).join('/')\n });\n }\n\n breadcrumbs.value = tempBreadcrumbs;\n};\n\n/**\n * Prevent navigation if the resolved route is an error page.\n */\nconst handleBreadcrumbClick = (breadcrumb: BreadcrumbItem, event: MouseEvent) => {\n const resolved = router.resolve(breadcrumb.fullPath);\n // Check if any matched record is an error page.\n const isErrorPage = resolved.matched.some((route: { meta?: RouteMeta }) => route.meta?.isErrorPage);\n if (!resolved || resolved.matched.length === 0 || isErrorPage) {\n event.preventDefault();\n event.stopPropagation();\n console.warn('Breadcrumb route not found or is an error page:', breadcrumb.fullPath);\n }\n};\n\nwatchEffect(() => {\n processSegments();\n});\n</script>\n\n<style scoped>\n</style>\n","<template>\n <div :class=\"containerClasses\">\n <div v-if=\"overlay\" class=\"sl-absolute sl-inset-0 sl-bg-white sl-bg-opacity-75 dark:sl-bg-gray-900 dark:sl-bg-opacity-75 sl-flex sl-items-center sl-justify-center sl-z-50\">\n <div class=\"sl-flex sl-flex-col sl-items-center\">\n <div :class=\"spinnerClasses\">\n <svg class=\"sl-animate-spin\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle\n class=\"sl-opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n />\n <path\n class=\"sl-opacity-75\"\n fill=\"currentColor\"\n d=\"m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n </div>\n <p v-if=\"text\" :class=\"textClasses\">{{ text }}</p>\n </div>\n </div>\n <div v-else :class=\"spinnerClasses\">\n <svg class=\"sl-animate-spin\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle\n class=\"sl-opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n stroke-width=\"4\"\n />\n <path\n class=\"sl-opacity-75\"\n fill=\"currentColor\"\n d=\"m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n </div>\n <p v-if=\"text && !overlay\" :class=\"textClasses\">{{ text }}</p>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport type { LoadingType } from '../types/ui';\n\ninterface LoadingProps extends LoadingType {}\n\nconst props = withDefaults(defineProps<LoadingProps>(), {\n theme: 'primary',\n size: 'md',\n overlay: false,\n});\n\nconst containerClasses = computed(() => {\n const base = 'sl-flex sl-items-center sl-justify-center';\n const classes = [base];\n\n if (props.overlay) {\n classes.push('sl-relative');\n } else {\n classes.push('sl-flex-col sl-space-y-2');\n }\n\n if (props.className) {\n classes.push(props.className);\n }\n\n return classes;\n});\n\nconst spinnerClasses = computed(() => {\n const sizeMapping: Record<string, string> = {\n xs: 'sl-h-3 sl-w-3',\n sm: 'sl-h-4 sl-w-4',\n md: 'sl-h-6 sl-w-6',\n lg: 'sl-h-8 sl-w-8',\n xl: 'sl-h-10 sl-w-10',\n '2xl': 'sl-h-12 sl-w-12',\n };\n\n const colorMapping: Record<string, string> = {\n primary: 'sl-text-stachelock-600',\n secondary: 'sl-text-gray-600',\n dark: 'sl-text-gray-700',\n light: 'sl-text-gray-400',\n success: 'sl-text-green-600',\n warning: 'sl-text-yellow-600',\n danger: 'sl-text-red-600',\n ghost: 'sl-text-gray-600',\n };\n\n return [\n sizeMapping[props.size || 'md'],\n colorMapping[props.theme || 'primary']\n ];\n});\n\nconst textClasses = computed(() => {\n const sizeMapping: Record<string, string> = {\n xs: 'sl-text-xs',\n sm: 'sl-text-sm',\n md: 'sl-text-base',\n lg: 'sl-text-lg',\n xl: 'sl-text-xl',\n '2xl': 'sl-text-2xl',\n };\n\n const colorMapping: Record<string, string> = {\n primary: 'sl-text-stachelock-700',\n secondary: 'sl-text-gray-700',\n dark: 'sl-text-gray-800',\n light: 'sl-text-gray-500',\n success: 'sl-text-green-700',\n warning: 'sl-text-yellow-700',\n danger: 'sl-text-red-700',\n ghost: 'sl-text-gray-700',\n };\n\n return [\n sizeMapping[props.size || 'md'],\n colorMapping[props.theme || 'primary'],\n 'sl-font-medium'\n ];\n});\n</script>\n\n\n","<template>\n <div v-if=\"title && subtitle && caption\" class=\"sl-bg-white sl-px-6 sl-py-24 sm:sl-py-32 lg:sl-px-8\">\n <div class=\"sl-mx-auto sl-max-w-2xl sl-text-center\">\n <p class=\"sl-text-base sl-font-semibold sl-leading-7 sl-text-stachelock-600\">{{ caption }}</p>\n <h2 class=\"sl-mt-2 sl-text-4xl sl-font-bold sl-tracking-tight sl-text-gray-900 sm:sl-text-6xl\">{{ title }}</h2>\n <div class=\"sl-flex sl-justify-center sl-mt-6\">\n <div class=\"loader-dots\" :class=\"dotSizeClass\">\n <div v-for=\"n in 4\" :key=\"n\" class=\"dots-div\" :style=\"{ backgroundColor }\"></div>\n </div>\n </div>\n <p class=\"sl-mt-6 sl-text-lg sl-leading-8 sl-text-gray-600\">{{ subtitle }}</p>\n </div>\n </div>\n <div v-else class=\"sl-flex sl-justify-center sl-mt-6\">\n <div class=\"loader-dots\" :class=\"dotSizeClass\">\n <div v-for=\"n in 4\" :key=\"n\" class=\"dots-div\" :style=\"{ backgroundColor }\"></div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\nconst props = defineProps({\n backgroundColor: {\n type: String,\n default: \"#3e4b9a\",\n },\n size: {\n type: String,\n default: \"md\",\n validator: (value: string) =>\n [\"sm\", \"md\", \"lg\", \"xl\"].includes(value),\n },\n caption: {\n type: String,\n default: 'LOADING'\n },\n title: {\n type: String,\n default: 'Please wait'\n },\n subtitle: {\n type: String,\n default: ''\n }\n});\n\nconst dotSizeClass = computed(() => {\n return `dots-${props.size}`;\n});\n</script>\n\n<style scoped>\n.loader-dots {\n display: block;\n position: relative;\n width: 5rem;\n height: 1.25rem;\n margin-top: 0.5rem;\n max-width: 20rem;\n}\n\n.dots-div {\n position: absolute;\n top: 0;\n margin-top: 0.25rem;\n border-radius: 9999999px;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n}\n\n.loader-dots div {\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n}\n\n.loader-dots div:nth-child(1) {\n left: 8px;\n animation: loader-dots1 0.6s infinite;\n}\n\n.loader-dots div:nth-child(2) {\n left: 8px;\n animation: loader-dots2 0.6s infinite;\n}\n\n.loader-dots div:nth-child(3) {\n left: 32px;\n animation: loader-dots2 0.6s infinite;\n}\n\n.loader-dots div:nth-child(4) {\n left: 56px;\n animation: loader-dots3 0.6s infinite;\n}\n\n@keyframes loader-dots1 {\n 0% {\n transform: scale(0);\n }\n\n 100% {\n transform: scale(1);\n }\n}\n\n@keyframes loader-dots3 {\n 0% {\n transform: scale(1);\n }\n\n 100% {\n transform: scale(0);\n }\n}\n\n@keyframes loader-dots2 {\n 0% {\n transform: translate(0, 0);\n }\n\n 100% {\n transform: translate(24px, 0);\n }\n}\n\n/* Size variations */\n.dots-sm .dots-div {\n width: 0.5rem;\n height: 0.5rem;\n}\n\n.dots-md .dots-div {\n width: 0.75rem;\n height: 0.75rem;\n}\n\n.dots-lg .dots-div {\n width: 1rem;\n height: 1rem;\n}\n\n.dots-xl .dots-div {\n width: 1.25rem;\n height: 1.25rem;\n}\n</style>\n","<template>\n <TransitionRoot as=\"template\" :show=\"modelValue\">\n <Dialog as=\"div\" class=\"sl-relative sl-z-50\" @close=\"onClose\" :initial-focus=\"initialFocusElement\">\n <TransitionChild as=\"template\" enter=\"ease-out duration-300\" enter-from=\"opacity-0\" enter-to=\"opacity-100\"\n leave=\"ease-in duration-200\" leave-from=\"opacity-100\" leave-to=\"opacity-0\">\n <div class=\"sl-fixed sl-inset-0 sl-bg-gray-500/75 sl-transition-opacity\" />\n </TransitionChild>\n\n <div class=\"sl-fixed sl-inset-0 sl-z-10 sl-w-screen sl-overflow-y-auto\">\n <div class=\"sl-flex sl-min-h-full sl-items-center sl-justify-center sl-p-4 sl-text-center\"\n :class=\"[position === 'top' ? 'sm:sl-items-start sm:sl-pt-16' : 'sm:sl-items-center']\">\n <TransitionChild as=\"template\" enter=\"ease-out duration-300\"\n enter-from=\"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95\"\n enter-to=\"opacity-100 translate-y-0 sm:scale-100\" leave=\"ease-in duration-200\"\n leave-from=\"opacity-100 translate-y-0 sm:scale-100\" leave-to=\"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95\">\n <DialogPanel\n :class=\"['sl-relative sl-transform sl-overflow-hidden sl-rounded-lg sl-bg-white sl-text-left sl-shadow-xl sl-transition-all sl-w-full', size]\">\n <div class=\"sl-bg-white\">\n <div class=\"sl-px-4 sl-pt-5 sl-pb-4 sm:sl-p-6 sm:sl-pb-4\">\n <div class=\"sm:sl-flex sm:sl-items-start\">\n <div class=\"sl-mx-auto sl-flex sl-h-12 sl-w-12 sl-flex-shrink-0 sl-items-center sl-justify-center sl-rounded-full sl-bg-gray-100 sm:sl-mx-0 sm:sl-h-10 sm:sl-w-10\">\n <slot name=\"icon\" />\n </div>\n <div class=\"sl-mt-3 sl-text-center sm:sl-ml-4 sm:sl-mt-0 sm:sl-text-left sl-w-full\">\n <DialogTitle as=\"h3\" class=\"sl-text-base sl-font-semibold sl-leading-6 sl-text-gray-900\">\n <slot name=\"header\" />\n </DialogTitle>\n <div class=\"sl-mt-2\">\n <slot name=\"body\">\n <slot />\n </slot>\n </div>\n </div>\n </div>\n </div>\n <div class=\"sl-px-4 sl-py-3 sm:sl-flex sm:sl-flex-row-reverse sm:sl-px-6\">\n <slot name=\"footer\">\n <div class=\"sl-flex sl-w-full sl-justify-end sl-gap-3\">\n <UiButton v-if=\"showCancel\" center-label theme=\"light\" :outlined=\"true\" @button-click=\"onClose\">\n {{ cancelText }}\n </UiButton>\n <UiButton v-if=\"showConfirm\" center-label :theme=\"confirmTheme\" :outlined=\"false\" @button-click=\"onConfirm\">\n {{ confirmText }}\n </UiButton>\n </div>\n </slot>\n </div>\n </div>\n <button ref=\"fallbackFocusRef\" class=\"sl-sr-only\">Close</button>\n </DialogPanel>\n </TransitionChild>\n </div>\n </div>\n </Dialog>\n </TransitionRoot>\n</template>\n\n<script setup lang=\"ts\">\nimport { Dialog, DialogPanel, DialogTitle, TransitionChild, TransitionRoot } from '@headlessui/vue';\nimport { ref, computed } from 'vue';\nimport type { Theme } from '@/types/ui';\nimport UiButton from '@/components/UiButton.vue';\n\ndefineProps({\n modelValue: { type: Boolean, required: true },\n size: {\n type: String,\n default: 'sm:max-w-lg',\n validator: (value: string) => [\n 'sm:max-w-sm','sm:max-w-md','sm:max-w-lg','sm:max-w-xl','sm:max-w-2xl','sm:max-w-3xl','sm:max-w-4xl','sm:max-w-5xl','sm:max-w-6xl','sm:max-w-7xl'\n ].includes(value)\n },\n position: { type: String, default: 'center', validator: (value: string) => ['center', 'top'].includes(value) },\n showCancel: { type: Boolean, default: true },\n showConfirm: { type: Boolean, default: true },\n cancelText: { type: String, default: 'Cancel' },\n confirmText: { type: String, default: 'Confirm' },\n confirmTheme: { type: String as () => Theme, default: 'primary' }\n});\n\nconst emit = defineEmits(['update:modelValue', 'cancel', 'confirm']);\nconst fallbackFocusRef = ref(null);\nconst initialFocusElement = computed(() => fallbackFocusRef.value);\n\nconst onClose = () => {\n emit('update:modelValue', false);\n emit('cancel');\n};\n\nconst onConfirm = () => {\n emit('confirm');\n emit('update:modelValue', false);\n};\n</script>\n\n<style scoped>\n</style>\n\n\n","<template>\n <div>\n <div class=\"sl-flex sl-justify-between sl-mb-1\">\n <span v-if=\"label && label.length > 0\" class=\"sl-text-base sl-font-medium sl-text-stachelock-700\">{{ label }}</span>\n <span v-if=\"showProgressLabel\" class=\"sl-text-sm sl-font-medium sl-text-stachelock-700\">{{ progress }}%</span>\n </div>\n <div class=\"sl-w-full sl-bg-gray-200 sl-rounded-full sl-h-2.5\">\n <div class=\"sl-bg-stachelock-600 sl-h-2.5 sl-rounded-full sl-transition-all sl-duration-500 sl-ease-out\" \n :style=\"{ width: `${progress}%` }\" />\n </div>\n </div>\n</template>\n \n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue';\n\n// Props\nconst props = defineProps({\n progress: {\n type: Number,\n default: 0,\n required: true\n },\n label: {\n type: String,\n default: ''\n },\n showProgressLabel: {\n type: Boolean,\n default: false\n }\n});\n\nconst progress = ref(props.progress);\n\n// Watch for changes to props.progress and update local state\nwatch(() => props.progress, (newValue) => {\n progress.value = newValue;\n});\n</script>\n \n<style scoped>\n</style>\n","<template>\n <div class=\"sl-relative\" :class=\"sizeClass\">\n <svg viewBox=\"0 0 36 36\" class=\"sl-transform -sl-rotate-90 sl-w-full sl-h-full\">\n <path class=\"sl-fill-none sl-stroke-gray-300\" stroke-width=\"3.8\"\n d=\"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831\" />\n <path\n class=\"sl-fill-none sl-stroke-stachelock-600 sl-stroke-linecap-round sl-transition-[stroke-dasharray] sl-duration-500 sl-ease-out\"\n :stroke-dasharray=\"progress + ', 100'\" stroke-width=\"3.8\"\n d=\"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831\" />\n </svg>\n <div v-if=\"label && label.length > 0\"\n class=\"sl-absolute sl-top-1/2 sl-left-1/2 sl-transform -sl-translate-x-1/2 -sl-translate-y-1/2 sl-text-center\">{{ label }}</div>\n <div v-if=\"showProgressLabel\"\n class=\"sl-absolute sl-top-1/2 sl-left-1/2 sl-transform -sl-translate-x-1/2 -sl-translate-y-1/2 sl-text-center sl-text-xs\">\n {{ progress }}%\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\n\ntype RadialProgressBarSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst props = defineProps({\n progress: {\n type: Number,\n default: 0\n },\n label: {\n type: String,\n default: ''\n },\n showProgressLabel: {\n type: Boolean,\n default: false\n },\n size: {\n type: String as () => RadialProgressBarSize,\n default: 'md'\n }\n});\n\nconst sizeClass = computed(() => {\n switch (props.size) {\n case 'xs':\n return 'sl-h-4 sl-w-4'\n case 'sm':\n return 'sl-h-8 sl-w-8'\n case 'md':\n return 'sl-h-12 sl-w-12'\n case 'lg':\n return 'sl-h-16 sl-w-16'\n default:\n return 'sl-h-8 sl-w-8'\n }\n});\n\nconst progress = ref(props.progress);\n\nwatch(() => props.progress, (newValue) => {\n progress.value = newValue;\n});\n</script>\n\n<style scoped>\n</style>\n","<template>\n <div class=\"sl-px-4 sm:sl-px-6 lg:sl-px-8\">\n <div class=\"sm:sl-flex sm:sl-items-center\">\n <div class=\"sm:sl-flex-auto\">\n <h1 v-if=\"$slots.title\" class=\"sl-text-base sl-font-semibold sl-leading-6 sl-text-gray-800\">\n <slot name=\"title\" />\n </h1>\n <p v-if=\"$slots.description\" class=\"sl-mt-2 sl-text-sm sl-text-gray-700\">\n <slot name=\"description\" />\n </p>\n </div>\n <div v-if=\"$slots.right\" class=\"sl-mt-4 sm:sl-ml-16 sm:sl-mt-0 sm:sl-flex-none\">\n <slot name=\"right\" />\n </div>\n </div>\n\n <!-- Mobile cards -->\n <div class=\"md:sl-hidden\" v-if=\"!isLoading\">\n <div class=\"sl-mt-6 sl-space-y-4\">\n <div v-for=\"row in table.getRowModel().rows\" :key=\"row.id\" class=\"sl-bg-white sl-rounded-lg sl-shadow sl-p-4\">\n <div class=\"sl-flex sl-items-start sl-justify-between\">\n <div class=\"sl-text-sm sl-font-medium sl-text-gray-900\">\n {{ getColumnValue(getTitleCell(row)) }}\n </div>\n <div class=\"sl-ml-4 sl-shrink-0\">\n <slot name=\"row:actions\" :row=\"row\" />\n </div>\n </div>\n <div class=\"sl-mt-3 sl-grid sl-grid-cols-1 sl-gap-2\">\n <div v-for=\"cell in getPrimaryCells(row)\" :key=\"cell.id\" class=\"sl-text-sm sl-text-gray-700\">\n <span class=\"sl-font-medium sl-text-gray-900\">{{ getColumnHeader(cell) }}:</span>\n <span class=\"sl-ml-1\">{{ getColumnValue(cell) }}</span>\n </div>\n </div>\n <div class=\"sl-mt-3\" v-if=\"getSecondaryCells(row).length\">\n <details class=\"sl-group\">\n <summary class=\"sl-cursor-pointer sl-text-sm sl-text-gray-700 sl-select-none\">More</summary>\n <div class=\"sl-mt-2\">\n <dl class=\"sl-divide-y sl-divide-gray-100\">\n <div v-for=\"cell in getSecondaryCells(row)\" :key=\"cell.id\" class=\"sl-py-2 sl-grid sl-grid-cols-3 sl-gap-4\">\n <dt class=\"sl-text-sm sl-font-medium sl-text-gray-900 sl-col-span-1\">{{ getColumnHeader(cell) }}</dt>\n <dd class=\"sl-mt-1 sl-text-sm sl-text-gray-700 sl-col-span-2\">{{ getColumnValue(cell) }}</dd>\n </div>\n </dl>\n </div>\n </details>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Mobile loading -->\n <div v-if=\"isLoading\" class=\"md:sl-hidden sl-mt-6\">\n <div class=\"sl-space-y-4\">\n <div v-for=\"i in 3\" :key=\"i\" class=\"sl-animate-pulse\">\n <div class=\"sl-bg-white sl-rounded-lg sl-shadow sl-p-4\">\n <div class=\"sl-flex sl-items-center sl-justify-between sl-mb-3\">\n <div class=\"sl-h-4 sl-bg-gray-200 sl-rounded sl-w-1/2\"></div>\n <div class=\"sl-h-8 sl-bg-gray-200 sl-rounded-full sl-w-8\"></div>\n </div>\n <div class=\"sl-space-y-2\">\n <div class=\"sl-h-3 sl-bg-gray-200 sl-rounded sl-w-full\"></div>\n <div class=\"sl-h-3 sl-bg-gray-200 sl-rounded sl-w-3/4\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Desktop table -->\n <div class=\"sl-hidden md:sl-block\">\n <div class=\"sl-mt-8 sl-flow-root\">\n <div class=\"sl--my-2 sl--mx-4 sl-overflow-x-auto sm:sl--mx-6 lg:sl--mx-8\">\n <div class=\"sl-inline-block sl-min-w-full sl-py-2 sl-align-middle md:sl-px-6 lg:sl-px-8\">\n <div class=\"sl-overflow-hidden sl-shadow sl-ring-1 sl-ring-black sl-ring-opacity-5 md:sl-rounded-lg\">\n <table class=\"sl-min-w-full sl-divide-y sl-divide-gray-300\">\n <thead class=\"sl-bg-gray-50\">\n <tr>\n <th v-for=\"header in table.getHeaderGroups()[0].headers\" :key=\"header.id\"\n scope=\"col\" class=\"sl-px-3 sl-py-3.5 sl-text-left sl-text-sm sl-font-semibold sl-text-gray-900\">\n <FlexRender :render=\"header.column.columnDef.header\" :props=\"header.getContext()\" />\n </th>\n <th v-if=\"$slots['row:actions']\" class=\"sl-px-3 sl-py-3.5\"></th>\n </tr>\n </thead>\n <tbody class=\"sl-divide-y sl-divide-gray-200 sl-bg-white\">\n <tr v-for=\"row in table.getRowModel().rows\" :key=\"row.id\">\n <td v-for=\"cell in row.getVisibleCells()\" :key=\"cell.id\" class=\"sl-whitespace-nowrap sl-px-3 sl-py-4 sl-text-sm sl-text-gray-500\">\n <FlexRender :render=\"cell.column.columnDef.cell\" :props=\"cell.getContext()\" />\n </td>\n <td v-if=\"$slots['row:actions']\" class=\"sl-whitespace-nowrap sl-px-3 sl-py-4 sl-text-sm sl-text-right\">\n <slot name=\"row:actions\" :row=\"row\" />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport type { PropType } from 'vue';\nimport { FlexRender, getCoreRowModel, useVueTable } from '@tanstack/vue-table';\nimport { getSortedRowModel } from '@tanstack/table-core';\nimport type { TableOptions, Updater, Row, Cell, SortingState } from '@tanstack/vue-table';\n\n\nconst props = defineProps({\n data: { type: Array as PropType<any[]>, required: true },\n columns: { type: Array as PropType<any[]>, required: true },\n truncate: { type: Array as PropType<{ column: string, length: number, link?: string }[]>, default: () => [] },\n isLoading: { type: Boolean, default: false },\n mobileConfig: {\n type: Object as PropType<{ titleColumn?: string; primaryColumns?: string[]; secondaryColumns?: string[]; expandableColumns?: string[]; maxPrimaryColumns?: number }>,\n default: () => ({})\n }\n});\n\n\nconst sorting = ref<SortingState>([]);\n\nconst tableColumns = computed(() => {\n return props.columns.map((col: any) => {\n const truncateConfig = props.truncate.find(t => t.column === col.accessorKey);\n if (truncateConfig) {\n return {\n ...col,\n cell: (info: any) => {\n const value = info.getValue() as string;\n if (value && value.length > truncateConfig.length) {\n return `${value.substring(0, truncateConfig.length)}...`;\n }\n return value;\n }\n }\n }\n return col;\n });\n});\n\nconst tableOptions: TableOptions<any> = {\n get data() { return props.data; },\n get columns() { return tableColumns.value; },\n getCoreRowModel: getCoreRowModel(),\n enableColumnResizing: true,\n columnResizeMode: 'onChange',\n getSortedRowModel: getSortedRowModel(),\n state: {\n get sorting() {\n return sorting.value;\n },\n },\n onSortingChange: (updaterOrValue: Updater<SortingState>) => {\n sorting.value = typeof updaterOrValue === 'function' ? updaterOrValue(sorting.value) : updaterOrValue;\n },\n defaultColumn: { enableSorting: true },\n};\n\nconst table = useVueTable(tableOptions);\n\nconst getTitleCell = (row: Row<any>): Cell<any, unknown> | null => {\n if (!row) return null;\n const visibleCells = row.getVisibleCells() || [];\n const config = props.mobileConfig || {};\n if (config.titleColumn) {\n return visibleCells.find(cell => cell.column.id === config.titleColumn) || null;\n }\n const titlePatterns = ['name', 'title', 'embedCode'];\n for (const pattern of titlePatterns) {\n const cell = visibleCells.find(cell => cell.column.id.toLowerCase().includes(pattern.toLowerCase()));\n if (cell) return cell;\n }\n return visibleCells[0] || null;\n};\n\nconst getColumnHeader = (cell: Cell<any, unknown>): string => {\n if (!cell) return '';\n const header = cell.column.columnDef.header;\n if (typeof header === 'string') return header;\n return cell.column.id;\n};\n\nconst getColumnValue = (cell: Cell<any, unknown> | null): any => {\n if (!cell) return '';\n const value = cell.getValue?.();\n return typeof value === 'object' ? JSON.stringify(value) : value;\n};\n\nconst getPrimaryCells = (row: Row<any>): Cell<any, unknown>[] => {\n const visibleCells = row.getVisibleCells() || [];\n const config = props.mobileConfig || {};\n const ids = config.primaryColumns || [];\n if (ids.length) return visibleCells.filter(c => ids.includes(c.column.id));\n return visibleCells.slice(0, Math.min(3, visibleCells.length));\n};\n\nconst getSecondaryCells = (row: Row<any>): Cell<any, unknown>[] => {\n const visibleCells = row.getVisibleCells() || [];\n const config = props.mobileConfig || {};\n const ids = config.secondaryColumns || [];\n if (ids.length) return visibleCells.filter(c => ids.includes(c.column.id));\n return visibleCells.slice(3);\n};\n</script>\n\n<style scoped>\n</style>\n\n\n","<template>\n <Transition\n :enter-active-class=\"enterActiveClass\"\n :enter-from-class=\"enterFromClass\"\n :enter-to-class=\"enterToClass\"\n :leave-active-class=\"leaveActiveClass\"\n :leave-from-class=\"leaveFromClass\"\n :leave-to-class=\"leaveToClass\"\n >\n <slot v-if=\"show\" />\n </Transition>\n</template>\n\n<script lang=\"ts\" setup>\ninterface TransitionProps {\n show: boolean;\n type?: 'fade' | 'scale' | 'slide-up' | 'slide-down';\n duration?: 'fast' | 'normal' | 'slow';\n}\n\nconst props = withDefaults(defineProps<TransitionProps>(), {\n type: 'fade',\n duration: 'normal',\n});\n\nconst durationClasses = {\n fast: 'sl-duration-150',\n normal: 'sl-duration-300',\n slow: 'sl-duration-500',\n};\n\nconst transitions = {\n fade: {\n enterActive: `sl-transition-opacity sl-ease-out ${durationClasses[props.duration]}`,\n enterFrom: 'sl-opacity-0',\n enterTo: 'sl-opacity-100',\n leaveActive: `sl-transition-opacity sl-ease-in ${durationClasses[props.duration]}`,\n leaveFrom: 'sl-opacity-100',\n leaveTo: 'sl-opacity-0',\n },\n scale: {\n enterActive: `sl-transition-all sl-ease-out ${durationClasses[props.duration]}`,\n enterFrom: 'sl-opacity-0 sl-transform sl-scale-95',\n enterTo: 'sl-opacity-100 sl-transform sl-scale-100',\n leaveActive: `sl-transition-all sl-ease-in ${durationClasses[props.duration]}`,\n leaveFrom: 'sl-opacity-100 sl-transform sl-scale-100',\n leaveTo: 'sl-opacity-0 sl-transform sl-scale-95',\n },\n 'slide-up': {\n enterActive: `sl-transition-all sl-ease-out ${durationClasses[props.duration]}`,\n enterFrom: 'sl-opacity-0 sl-transform sl-translate-y-4',\n enterTo: 'sl-opacity-100 sl-transform sl-translate-y-0',\n leaveActive: `sl-transition-all sl-ease-in ${durationClasses[props.duration]}`,\n leaveFrom: 'sl-opacity-100 sl-transform sl-translate-y-0',\n leaveTo: 'sl-opacity-0 sl-transform -sl-translate-y-4',\n },\n 'slide-down': {\n enterActive: `sl-transition-all sl-ease-out ${durationClasses[props.duration]}`,\n enterFrom: 'sl-opacity-0 sl-transform -sl-translate-y-4',\n enterTo: 'sl-opacity-100 sl-transform sl-translate-y-0',\n leaveActive: `sl-transition-all sl-ease-in ${durationClasses[props.duration]}`,\n leaveFrom: 'sl-opacity-100 sl-transform sl-translate-y-0',\n leaveTo: 'sl-opacity-0 sl-transform sl-translate-y-4',\n },\n};\n\nconst transition = transitions[props.type];\n\nconst enterActiveClass = transition.enterActive;\nconst enterFromClass = transition.enterFrom;\nconst enterToClass = transition.enterTo;\nconst leaveActiveClass = transition.leaveActive;\nconst leaveFromClass = transition.leaveFrom;\nconst leaveToClass = transition.leaveTo;\n</script>\n\n\n","<template>\n <div class=\"sl-w-full\">\n <FormFieldWrapper\n :id=\"id\"\n :name=\"name\"\n :label=\"label\"\n :disabled=\"disabled\"\n :optional=\"!rules\"\n :tertiary-label=\"tertiaryLabel\"\n :box-shadow=\"boxShadow\"\n :error-message=\"errorMessage\"\n :success-message=\"successMessage\"\n :is-valid=\"meta.valid\"\n :is-touched=\"meta.touched\"\n >\n <Listbox\n v-model=\"selectedValue\"\n :disabled=\"disabled\"\n :multiple=\"multiple\"\n @update:model-value=\"handleChange\"\n >\n <div class=\"sl-relative\">\n <ListboxButton\n :id=\"id\"\n :class=\"[\n selectClasses,\n buttonClass\n ]\"\n >\n <span class=\"sl-flex sl-items-center sl-gap-2\">\n <!-- Selected item icon -->\n <component\n v-if=\"selectedIcon\"\n :is=\"selectedIcon\"\n class=\"sl-h-4 sl-w-4 sl-flex-shrink-0\"\n aria-hidden=\"true\"\n />\n \n <!-- Selected value display -->\n <span\n v-if=\"displayValue\"\n class=\"sl-block sl-truncate sl-text-left\"\n >\n {{ displayValue }}\n </span>\n <span\n v-else\n class=\"sl-block sl-truncate sl-text-left sl-text-gray-500\"\n >\n {{ placeholder || 'Select an option' }}\n </span>\n </span>\n \n <span class=\"sl-pointer-events-none sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-2\">\n <ChevronUpDownIcon\n class=\"sl-h-5 sl-w-5 sl-text-gray-400\"\n aria-hidden=\"true\"\n />\n </span>\n </ListboxButton>\n\n <transition\n leave-active-class=\"sl-transition sl-duration-100 sl-ease-in\"\n leave-from-class=\"sl-opacity-100\"\n leave-to-class=\"sl-opacity-0\"\n >\n <ListboxOptions\n class=\"sl-absolute sl-z-10 sl-mt-1 sl-max-h-56 sl-w-full sl-overflow-auto sl-rounded-md sl-bg-white sl-py-1 sl-text-base sl-shadow-lg sl-ring-1 sl-ring-black sl-ring-opacity-5 focus:sl-outline-none sm:sl-text-sm\"\n >\n <!-- Show All option for multiple select -->\n <li\n v-if=\"multiple && showAll\"\n role=\"button\"\n tabindex=\"0\"\n @mousedown.prevent\n @click.prevent.stop=\"toggleSelectAll\"\n :class=\"[\n 'sl-relative sl-cursor-pointer sl-select-none sl-py-2 sl-pl-3 sl-pr-9',\n 'hover:sl-bg-stachelock-600 hover:sl-text-white',\n ]\"\n >\n <span class=\"sl-block sl-truncate sl-font-medium\">\n {{ isAllSelected ? 'Unselect All' : 'Select All' }}\n </span>\n </li>\n\n <!-- Regular options -->\n <ListboxOption\n v-for=\"item in items\"\n :key=\"getItemKey(item)\"\n :value=\"item\"\n as=\"template\"\n :disabled=\"item.disabled\"\n v-slot=\"{ active, selected }\"\n >\n <li\n :class=\"[\n 'sl-relative sl-cursor-default sl-select-none sl-py-2 sl-pl-3 sl-pr-9',\n active ? 'sl-bg-stachelock-600 sl-text-white' : 'sl-text-gray-900',\n item.disabled ? 'sl-opacity-50 sl-cursor-not-allowed' : ''\n ]\"\n >\n <div class=\"sl-flex sl-items-center sl-gap-2\">\n <!-- Item icon -->\n <component\n v-if=\"item.icon\"\n :is=\"item.icon\"\n class=\"sl-h-4 sl-w-4 sl-flex-shrink-0\"\n :class=\"active ? 'sl-text-white' : 'sl-text-gray-400'\"\n aria-hidden=\"true\"\n />\n \n <span\n :class=\"[\n 'sl-block sl-truncate',\n selected ? 'sl-font-medium' : 'sl-font-normal'\n ]\"\n >\n {{ getItemText(item) }}\n </span>\n </div>\n\n <span\n v-if=\"selected\"\n class=\"sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-4\"\n >\n <CheckIcon class=\"sl-h-5 sl-w-5\" aria-hidden=\"true\" />\n </span>\n </li>\n </ListboxOption>\n </ListboxOptions>\n </transition>\n </div>\n </Listbox>\n \n <template #success-message>\n <span v-if=\"successMessage\">{{ successMessage }}</span>\n </template>\n </FormFieldWrapper>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport {\n Listbox,\n ListboxButton,\n ListboxOption,\n ListboxOptions,\n} from '@headlessui/vue'\nimport { CheckIcon, ChevronUpDownIcon } from '@heroicons/vue/20/solid'\nimport { useField } from 'vee-validate'\nimport FormFieldWrapper from '../forms/FormFieldWrapper.vue'\nimport type { ValidationRule } from '../../types/form'\nimport { generateId } from '../../utils/id'\n\ninterface SelectItem {\n [key: string]: any\n icon?: any\n disabled?: boolean\n}\n\ninterface Props {\n name: string\n items: SelectItem[]\n label?: string\n placeholder?: string\n disabled?: boolean\n rules?: ValidationRule\n validateOnMount?: boolean\n successMessage?: string\n tertiaryLabel?: string\n buttonClass?: string\n multiple?: boolean\n showAll?: boolean\n itemKey?: string\n itemText?: string\n modelValue?: any\n boxShadow?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n itemKey: 'id',\n itemText: 'name',\n multiple: false,\n showAll: false,\n boxShadow: false\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: any]\n}>()\n\nconst id = generateId(props.name)\n\n// Use vee-validate for form validation\nconst { value, errorMessage, handleChange: handleValidation, meta, setTouched } = useField(\n () => props.name,\n props.rules,\n {\n validateOnMount: props.validateOnMount,\n initialValue: props.modelValue\n }\n)\n\nconst selectedValue = ref<any>(\n props.multiple\n ? (Array.isArray(props.modelValue) ? props.modelValue : [])\n : props.modelValue\n)\n\n// Watch for external changes\nwatch(\n () => props.modelValue,\n (newValue) => {\n if (props.multiple) {\n const coerced = Array.isArray(newValue) ? newValue : []\n if (coerced !== selectedValue.value) {\n selectedValue.value = coerced\n value.value = coerced\n }\n } else {\n if (newValue !== selectedValue.value) {\n selectedValue.value = newValue\n value.value = newValue\n }\n }\n },\n { immediate: true }\n)\n\nwatch(\n selectedValue,\n (newValue) => {\n emit('update:modelValue', newValue)\n }\n)\n\nconst selectClasses = computed(() => {\n const baseClasses = [\n 'sl-relative',\n 'sl-w-full',\n 'sl-cursor-default',\n 'sl-rounded-md',\n 'sl-bg-white',\n 'sl-py-2',\n 'sl-pl-3',\n 'sl-pr-10',\n 'sl-text-left',\n 'sl-border',\n 'sl-text-sm',\n 'focus:sl-outline-none',\n 'focus:sl-ring-2',\n 'focus:sl-ring-stachelock-500',\n 'focus:sl-border-stachelock-500',\n 'sl-transition-all',\n 'sl-duration-200'\n ]\n\n if (props.disabled) {\n baseClasses.push(\n 'sl-bg-gray-50',\n 'sl-text-gray-500',\n 'sl-cursor-not-allowed',\n 'sl-border-gray-200'\n )\n } else if (errorMessage.value) {\n baseClasses.push(\n 'sl-border-red-300',\n 'focus:sl-ring-red-500',\n 'focus:sl-border-red-500'\n )\n } else if (meta.valid && meta.touched) {\n baseClasses.push(\n 'sl-border-green-300',\n 'focus:sl-ring-green-500',\n 'focus:sl-border-green-500'\n )\n } else {\n baseClasses.push(\n 'sl-border-gray-300',\n 'hover:sl-border-gray-400'\n )\n }\n\n return baseClasses.join(' ')\n})\n\nconst getItemKey = (item: SelectItem): any => {\n return item[props.itemKey]\n}\n\nconst getItemText = (item: SelectItem): string => {\n return item[props.itemText] || item.toString()\n}\n\nconst displayValue = computed(() => {\n if (!selectedValue.value) return ''\n \n if (props.multiple && Array.isArray(selectedValue.value)) {\n if (selectedValue.value.length === 0) return ''\n if (selectedValue.value.length === 1) {\n return getItemText(selectedValue.value[0])\n }\n return `${selectedValue.value.length} items selected`\n }\n \n return getItemText(selectedValue.value)\n})\n\nconst selectedIcon = computed(() => {\n if (!selectedValue.value) return null\n \n if (props.multiple && Array.isArray(selectedValue.value)) {\n return selectedValue.value.length === 1 ? selectedValue.value[0].icon : null\n }\n \n return selectedValue.value.icon\n})\n\nconst allItems = computed(() => {\n return props.items.filter(item => !item.disabled)\n})\n\nconst handleChange = (value: any) => {\n selectedValue.value = value\n setTouched(true)\n handleValidation(value)\n}\n\nconst isAllSelected = computed(() => {\n if (!props.multiple || !Array.isArray(selectedValue.value)) return false\n const selectable = allItems.value\n if (selectable.length === 0) return false\n return selectable.every(item => (selectedValue.value as any[]).includes(item))\n})\n\nconst toggleSelectAll = () => {\n if (!props.multiple) return\n if (isAllSelected.value) {\n selectedValue.value = []\n } else {\n selectedValue.value = [...allItems.value]\n }\n handleValidation(selectedValue.value)\n}\n</script>\n\n\n","<template>\n <div class=\"sl-flex sl-items-center sl-gap-4\">\n <div class=\"sl-flex sl-items-center sl-gap-2\">\n <UiButton size=\"sm\" theme=\"light\" :outlined=\"true\" center-label @button-click=\"prev\">Prev</UiButton>\n <UiButton size=\"sm\" theme=\"light\" :outlined=\"true\" center-label @button-click=\"next\">Next</UiButton>\n </div>\n <div class=\"sl-w-32\">\n <SelectInput\n name=\"calendarView\"\n :items=\"viewOptions\"\n v-model=\"selectedView\"\n placeholder=\"Select view\"\n :box-shadow=\"false\"\n />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue';\nimport UiButton from '@/components/UiButton.vue';\nimport SelectInput from '@/components/inputs/SelectInput.vue';\nimport type { CalendarDay, Month } from '@/utils/calendar';\n\nconst props = defineProps<{ view: 'day' | 'week' | 'month' | 'year'; selectedRange: CalendarDay[] | Month[] | null }>();\nconst emit = defineEmits(['changeRange', 'changeView']);\n\n// View options for SelectInput\nconst viewOptions = [\n { id: 'day', name: 'Day' },\n { id: 'week', name: 'Week' },\n { id: 'month', name: 'Month' },\n { id: 'year', name: 'Year' }\n];\n\n// Find the current view option object\nconst selectedView = ref(viewOptions.find(option => option.id === props.view) || viewOptions[2]);\n\n// Watch for prop changes\nwatch(() => props.view, (newView) => {\n const viewOption = viewOptions.find(option => option.id === newView);\n if (viewOption) {\n selectedView.value = viewOption;\n }\n});\n\n// Watch for SelectInput changes\nwatch(selectedView, (newViewOption) => {\n if (newViewOption) {\n emit('changeView', newViewOption.id);\n }\n});\n\nconst prev = () => emit('changeRange', 'prev');\nconst next = () => emit('changeRange', 'next');\n</script>\n\n<style scoped>\n</style>\n\n\n","<template>\n <div class=\"sl-text-center\">\n <!-- Day headers -->\n <div class=\"sl-mt-6 sl-grid sl-grid-cols-7 sl-text-xs sl-leading-6 sl-text-gray-500\">\n <div>S</div>\n <div>M</div>\n <div>T</div>\n <div>W</div>\n <div>T</div>\n <div>F</div>\n <div>S</div>\n </div>\n \n <!-- Calendar grid -->\n <div class=\"sl-isolate sl-mt-2 sl-grid sl-grid-cols-7 sl-gap-px sl-rounded-lg sl-bg-gray-200 sl-text-sm sl-shadow sl-ring-1 sl-ring-gray-200\">\n <button v-for=\"(day, dayIdx) in formattedDays\" :key=\"day.id\" type=\"button\" \n :class=\"[\n 'sl-relative sl-py-1.5 hover:sl-bg-gray-100 focus:sl-z-10',\n day.isCurrentMonth ? 'sl-bg-white' : 'sl-bg-gray-50',\n (day.isSelected || day.isToday) && 'sl-font-semibold',\n day.isSelected && 'sl-text-white',\n !day.isSelected && day.isCurrentMonth && !day.isToday && 'sl-text-gray-800',\n !day.isSelected && !day.isCurrentMonth && !day.isToday && 'sl-text-gray-400',\n day.isToday && !day.isSelected && 'sl-text-stachelock-600',\n dayIdx === 0 && 'sl-rounded-tl-lg',\n dayIdx === 6 && 'sl-rounded-tr-lg',\n dayIdx === days.length - 7 && 'sl-rounded-bl-lg',\n dayIdx === days.length - 1 && 'sl-rounded-br-lg'\n ]\"\n @click=\"handleClick(day)\"\n @dblclick=\"handleDoubleClick(day)\">\n \n <time :datetime=\"day.date\" :class=\"[\n 'sl-mx-auto sl-flex sl-h-7 sl-w-7 sl-items-center sl-justify-center sl-rounded-full',\n day.isToday\n ? 'sl-bg-stachelock-600 sl-text-white'\n : day.isSelected\n ? 'sl-bg-gray-900 sl-text-white'\n : ''\n ]\">\n {{ ((day?.date || '').split('-').pop() || '').replace(/^0/, '') }}\n </time>\n\n <!-- Event indicator dot -->\n <span v-if=\"day.hasEvent\" class=\"sl-absolute sl-top-1 sl-right-1 sl-h-2 sl-w-2 sl-rounded-full sl-bg-stachelock-600\"></span>\n </button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { CalendarDay } from '@/utils/calendar';\n\nconst props = defineProps<{ \n days: Array<CalendarDay>;\n events?: Array<{ id: string | number; datetime: string; start_time?: string }>;\n}>();\nconst emit = defineEmits(['selectDay', 'select:event', 'doubleSelectDay']);\n\nconst hasEvent = (day: CalendarDay): boolean => {\n if (!props.events) return false;\n return props.events.some(event => {\n const eventDate = new Date(event.datetime || event.start_time || '').toISOString().split('T')[0];\n return eventDate === day.date;\n });\n};\n\nconst formattedDays = computed(() =>\n props.days.map(day => ({\n ...day,\n id: day.id || day.date,\n hasEvent: hasEvent(day)\n }))\n);\n\nconst handleClick = (day: CalendarDay) => emit('selectDay', day);\nconst handleDoubleClick = (day: CalendarDay) => emit('doubleSelectDay', day);\n</script>\n\n<style scoped>\n</style>\n\n\n","<template>\n <li class=\"sl-relative sl-flex sl-space-x-6 sl-py-6 sl-cursor-pointer\" @click=\"handleClick\">\n <!-- Event Thumbnail or Placeholder -->\n <img v-if=\"event.geocodeResult?.thumbnailUrl\" :src=\"event.geocodeResult.thumbnailUrl\" alt=\"\"\n class=\"sl-h-14 sl-w-14 sl-flex-none sl-rounded-md\" />\n <div v-else class=\"sl-h-14 sl-w-14 sl-flex-none sl-rounded-md sl-bg-gray-100 sl-flex sl-items-center sl-justify-center\">\n <div class=\"sl-relative sl-h-8 sl-w-8\">\n <NoSymbolOutline class=\"sl-absolute sl-h-full sl-w-full sl-text-gray-400\" />\n <MapPinOutline\n class=\"sl-absolute sl-top-1/2 sl-left-1/2 sl-h-5 sl-w-5 -sl-translate-x-1/2 -sl-translate-y-1/2 sl-text-gray-400\" />\n </div>\n </div>\n\n <div class=\"sl-flex-auto\">\n <h3 class=\"sl-font-semibold sl-text-gray-800\">{{ event.name }}</h3>\n <dl class=\"sl-mt-2 sl-flex sl-flex-col xl:sl-flex-row\">\n <div class=\"sl-flex sl-items-start sl-space-x-3\">\n <CalendarIcon class=\"sl-h-5 sl-w-5 sl-text-gray-400\" aria-hidden=\"true\" />\n <dd>\n <time :datetime=\"event.datetime\">\n {{ formatDate(event.date) }} at {{ event.time }}\n </time>\n </dd>\n </div>\n <div class=\"sl-flex sl-items-start sl-space-x-3 sl-mt-2 xl:sl-ml-3.5 xl:sl-mt-0 xl:sl-border-l xl:sl-border-gray-400 xl:sl-border-opacity-50 xl:sl-pl-3.5\">\n <template v-if=\"event.geocodeResult\">\n <MapPinSolid class=\"sl-h-5 sl-w-5 sl-text-gray-400\" aria-hidden=\"true\" />\n </template>\n <template v-else>\n <div class=\"sl-relative sl-h-5 sl-w-5\">\n <NoSymbolSolid class=\"sl-absolute sl-h-full sl-w-full sl-text-gray-400\" />\n <MapPinSolid\n class=\"sl-absolute sl-top-1/2 sl-left-1/2 sl-h-3 sl-w-3 -sl-translate-x-1/2 -sl-translate-y-1/2 sl-text-gray-400\" />\n </div>\n </template>\n <dd>{{ event.location }}</dd>\n </div>\n </dl>\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport { CalendarIcon, MapPinIcon as MapPinSolid, NoSymbolIcon as NoSymbolSolid } from '@heroicons/vue/24/solid';\nimport { MapPinIcon as MapPinOutline, NoSymbolIcon as NoSymbolOutline } from '@heroicons/vue/24/outline';\nimport type { ListEvent } from '@/utils/calendar';\n\nconst props = defineProps({\n event: {\n type: Object as () => ListEvent,\n required: true,\n },\n});\n\nconst emit = defineEmits(['navigate-to-event']);\n\nconst handleClick = () => {\n emit('navigate-to-event', props.event.id);\n};\n\nconst formatDate = (dateStr: string) => {\n const date = new Date(dateStr);\n return date.toLocaleDateString('en-US', { \n month: 'short', \n day: '2-digit', \n year: 'numeric' \n });\n};\n</script>\n\n<style scoped>\n</style>\n","<template>\n <div class=\"sl-relative\">\n <!-- Header -->\n <div class=\"sl-flex sl-justify-between sl-items-center sl-mb-4\">\n <h2 class=\"sl-text-lg sl-font-bold\">\n <template v-if=\"upcomingEvents.length\">Upcoming Events</template>\n <template v-else-if=\"groupedPastEventsByYear.length\">Past Events</template>\n <template v-else>Events</template>\n </h2>\n <UiButton v-if=\"showAllButton\" center-label size=\"xs\" @button-click=\"handleShowAll\">\n Show all\n </UiButton>\n </div>\n\n <!-- Upcoming Events -->\n <div v-if=\"upcomingEvents.length\">\n <ol class=\"sl-divide-y sl-divide-gray-100 sl-text-sm sl-leading-6 sl-mb-8\">\n <EventCard v-for=\"event in upcomingEvents\" :key=\"event.id\" :event=\"event\" />\n </ol>\n </div>\n\n <!-- Past Events -->\n <div v-if=\"groupedPastEventsByYear.length\">\n <div v-for=\"group in groupedPastEventsByYear\" :key=\"group.year\" class=\"sl-mb-8\">\n <h2 class=\"sl-text-lg sl-font-bold sl-mb-2\">{{ group.year }}</h2>\n <hr class=\"sl-border-gray-200 sl-mb-4\" />\n <ol class=\"sl-divide-y sl-divide-gray-100 sl-text-sm sl-leading-6\">\n <EventCard v-for=\"event in group.events\" :key=\"event.id\" :event=\"event\" />\n </ol>\n </div>\n </div>\n\n <!-- No Events Message -->\n <div v-if=\"!upcomingEvents.length && !groupedPastEventsByYear.length\"\n class=\"sl-px-6 sl-py-14 sl-text-center sl-text-sm sm:sl-px-14\">\n <CalendarIcon class=\"sl-mx-auto sl-h-6 sl-w-6 sl-text-gray-400\" aria-hidden=\"true\" />\n <p class=\"sl-mt-4 sl-font-semibold sl-text-gray-800\">No events</p>\n <p class=\"sl-mt-2 sl-text-gray-500\">Add events to get started!</p>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { CalendarIcon } from '@heroicons/vue/20/solid';\nimport type { ListEvent } from '@/utils/calendar';\nimport UiButton from '@/components/UiButton.vue';\nimport EventCard from './EventCard.vue';\n\nconst props = defineProps<{ \n events: ListEvent[]; \n showAllButton?: boolean;\n}>();\nconst emit = defineEmits(['show:all']);\n\nconst now = new Date();\nconst threeMonthsFromNow = new Date();\nthreeMonthsFromNow.setMonth(now.getMonth() + 3);\n\n// Upcoming events: events occurring between now and three months from now\nconst upcomingEvents = computed(() => {\n if (!props.events || !Array.isArray(props.events)) return [];\n return props.events\n .filter((event) => {\n const eventDate = new Date(event.datetime);\n return eventDate >= now && eventDate <= threeMonthsFromNow;\n })\n .sort((a, b) => new Date(a.datetime).getTime() - new Date(b.datetime).getTime());\n});\n\n// Past events: events that occurred before now\nconst pastEvents = computed(() => {\n if (!props.events || !Array.isArray(props.events)) return [];\n return props.events\n .filter((event) => new Date(event.datetime) < now)\n .sort((a, b) => new Date(b.datetime).getTime() - new Date(a.datetime).getTime());\n});\n\n// Group past events by year in descending order\nconst groupedPastEventsByYear = computed(() => {\n const groups: Record<string, ListEvent[]> = {};\n pastEvents.value.forEach((event) => {\n const year = new Date(event.datetime).getFullYear().toString();\n if (!groups[year]) {\n groups[year] = [];\n }\n groups[year].push(event);\n });\n return Object.entries(groups)\n .sort(([yearA], [yearB]) => Number(yearB) - Number(yearA))\n .map(([year, events]) => ({ year, events }));\n});\n\nconst handleShowAll = () => emit('show:all');\n</script>\n\n<style scoped>\n</style>\n","<template>\n <div class=\"lg:sl-grid lg:sl-grid-cols-12 lg:sl-gap-x-8\">\n <!-- Calendar Column -->\n <div class=\"sl-mt-10 sl-text-center lg:sl-col-start-8 lg:sl-col-end-13 lg:sl-row-start-1 lg:sl-mt-9 xl:sl-col-start-9 xl:sl-col-end-13 sl-h-auto lg:sl-border-l lg:sl-border-gray-100 lg:sl-pl-8 lg:sl-h-full\">\n <CalendarHeader :view=\"'month'\" :selectedRange=\"days\" @changeView=\"handleViewChange\" @changeRange=\"handleRangeChange\" />\n <MonthCalendar \n :days=\"days\" \n :events=\"events\"\n @selectDay=\"handleDaySelect\"\n @doubleSelectDay=\"handleDoubleSelectDay\" />\n <div class=\"sl-mt-4\">\n <UiButton center-label type=\"button\" @click=\"handleNewEventClick\" size=\"sm\" expanded>\n Add event\n </UiButton>\n </div>\n </div>\n\n <!-- Events List Column -->\n <EventsList \n class=\"lg:sl-col-span-7 xl:sl-col-span-8 sl-py-6\" \n :events=\"filteredEvents\"\n :show-all-button=\"showAllButton\" \n @show:all=\"handleShowAll\" />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed } from 'vue';\nimport type { CalendarDay, ListEvent } from '@/utils/calendar';\nimport CalendarHeader from './CalendarHeader.vue';\nimport MonthCalendar from './MonthCalendar.vue';\nimport EventsList from './EventsList.vue';\nimport UiButton from '@/components/UiButton.vue';\n\nconst props = defineProps<{\n days: CalendarDay[];\n events: ListEvent[];\n}>();\n\nconst emit = defineEmits(['selectDay', 'doubleSelectDay', 'newEvent', 'monthChange', 'showAll']);\n\nconst selectedDay = ref<CalendarDay | null>(null);\n\nconst showAllButton = computed(() => \n props.events.length !== filteredEvents.value.length\n);\n\nconst filteredEvents = computed(() => {\n if (!selectedDay.value) return props.events;\n \n return props.events.filter(event => {\n const eventDate = new Date(event.datetime).toISOString().split('T')[0];\n return eventDate === selectedDay.value?.date;\n });\n});\n\nconst handleDaySelect = (day: CalendarDay) => {\n selectedDay.value = day;\n emit('selectDay', day);\n};\n\nconst handleDoubleSelectDay = (day: CalendarDay) => {\n emit('doubleSelectDay', day);\n};\n\nconst handleViewChange = (view: string) => {\n // Handle view change if needed\n console.log('View changed to:', view);\n};\n\nconst handleRangeChange = (direction: string) => {\n if (direction === 'prev') {\n emit('monthChange', 'prev');\n } else if (direction === 'next') {\n emit('monthChange', 'next');\n }\n};\n\nconst handleNewEventClick = () => {\n emit('newEvent');\n};\n\nconst handleShowAll = () => {\n selectedDay.value = null;\n emit('showAll');\n};\n</script>\n\n<style scoped>\n@media (max-width: 1024px) {\n .lg\\:sl-col-start-7 {\n grid-column-start: 1;\n }\n\n .lg\\:sl-col-end-13 {\n grid-column-end: 13;\n }\n\n .lg\\:sl-col-span-6 {\n grid-column: span 12 / span 12;\n }\n\n .xl\\:sl-col-start-8 {\n grid-column-start: 1;\n }\n\n .xl\\:sl-col-end-13 {\n grid-column-end: 13;\n }\n\n .xl\\:sl-col-span-6 {\n grid-column: span 12 / span 12;\n }\n}\n</style>\n","import { format, startOfMonth, endOfMonth, startOfWeek, endOfWeek, addDays, isSameMonth, isToday } from 'date-fns';\nimport { enUS } from 'date-fns/locale';\n\nexport type ListEvent = {\n id: string | number;\n name: string;\n date: string;\n time: string;\n datetime: string;\n location: string;\n href?: string;\n startTime?: { dateTime: string; timeZone: string; shortTimeZone: string };\n endTime?: { dateTime: string; timeZone: string; shortTimeZone: string };\n geocodeResult?: {\n thumbnailUrl?: string;\n [key: string]: any;\n };\n};\n\nexport type CalendarDay = {\n id?: string | number;\n date: string;\n isCurrentMonth: boolean;\n isToday?: boolean;\n isSelected?: boolean;\n events?: ListEvent[];\n shortDay?: string;\n longDay?: string;\n day?: number;\n};\n\nexport interface Month {\n name: string;\n days: Array<CalendarDay>;\n}\n\nexport function generateDays(monthDate: Date, weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6 = 0): CalendarDay[] {\n const start = startOfMonth(monthDate);\n const end = endOfMonth(monthDate);\n const calendarStart = startOfWeek(start, { weekStartsOn });\n const calendarEnd = endOfWeek(end, { weekStartsOn });\n const days: CalendarDay[] = [];\n let currentDay = calendarStart;\n while (currentDay <= calendarEnd) {\n const isCurrent = isSameMonth(currentDay, monthDate);\n const dayObj: CalendarDay = {\n date: format(currentDay, 'yyyy-MM-dd'),\n isCurrentMonth: isCurrent,\n isToday: isToday(currentDay),\n isSelected: false,\n shortDay: format(currentDay, 'EEE', { locale: enUS }),\n longDay: format(currentDay, 'EEEE', { locale: enUS }),\n day: Number(format(currentDay, 'd')),\n };\n days.push(dayObj);\n currentDay = addDays(currentDay, 1);\n }\n days.forEach(d => { if (d.isToday && d.isCurrentMonth) d.isSelected = true });\n return days;\n}\n\nexport const generateMonthDays = generateDays;\n\nexport function generateWeekDays(weekDate: Date, weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6 = 0): CalendarDay[] {\n const start = startOfWeek(weekDate, { weekStartsOn });\n const end = endOfWeek(weekDate, { weekStartsOn });\n const days: CalendarDay[] = [];\n let currentDay = start;\n while (currentDay <= end) {\n const dayObj: CalendarDay = {\n date: format(currentDay, 'yyyy-MM-dd'),\n isCurrentMonth: true,\n isToday: isToday(currentDay),\n isSelected: false,\n shortDay: format(currentDay, 'EEE', { locale: enUS }),\n longDay: format(currentDay, 'EEEE', { locale: enUS }),\n day: Number(format(currentDay, 'd')),\n };\n days.push(dayObj);\n currentDay = addDays(currentDay, 1);\n }\n return days;\n}\n\nexport function generateYearDays(yearDate: Date, weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6 = 0): Month[] {\n const months: Month[] = [];\n const year = yearDate.getFullYear();\n for (let monthIndex = 0; monthIndex < 12; monthIndex++) {\n const thisMonth = new Date(year, monthIndex, 1);\n const days = generateDays(thisMonth, weekStartsOn);\n months.push({ name: String(monthIndex + 1), days });\n }\n return months;\n}\n\nexport function formatEventDate(dateStr: string): string {\n const date = new Date(dateStr);\n return format(date, 'yyyy-MM-dd');\n}\n\nexport function calculateGridRow(datetime: string) {\n const d = new Date(datetime);\n const hours = d.getHours();\n const minutes = d.getMinutes();\n const totalMinutes = hours * 60 + minutes;\n return Math.round(totalMinutes / 5 + 2);\n}\n\nexport const calculateGridSpan = (startDateTime?: string, endDateTime?: string) => {\n if (!startDateTime || !endDateTime) return 1;\n const start = new Date(startDateTime);\n const end = new Date(endDateTime);\n const diffInMinutes = (end.getTime() - start.getTime()) / (1000 * 60);\n const spanPerMinute = 1 / 5;\n return Math.round(diffInMinutes * spanPerMinute);\n};\n\nexport const formatTime = (datetime: string) => {\n const date = new Date(datetime);\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const period = hours >= 12 ? 'PM' : 'AM';\n const formattedHours = hours % 12 || 12;\n const formattedMinutes = minutes < 10 ? `0${minutes}` : minutes;\n return `${formattedHours}:${formattedMinutes} ${period}`;\n};\n\nexport type CalendarView = 'month' | 'week';\n\nexport const calculateColStart = (day: string, view: CalendarView = 'month'): number => {\n let column: number;\n if (view === 'month') {\n switch (day) {\n case 'Monday': column = 1; break;\n case 'Tuesday': column = 2; break;\n case 'Wednesday': column = 3; break;\n case 'Thursday': column = 4; break;\n case 'Friday': column = 5; break;\n case 'Saturday': column = 6; break;\n case 'Sunday': column = 7; break;\n default: column = 1;\n }\n } else if (view === 'week') {\n switch (day) {\n case 'Sunday': column = 1; break;\n case 'Monday': column = 2; break;\n case 'Tuesday': column = 3; break;\n case 'Wednesday': column = 4; break;\n case 'Thursday': column = 5; break;\n case 'Friday': column = 6; break;\n case 'Saturday': column = 7; break;\n default: column = 1;\n }\n } else {\n column = 1;\n }\n return column;\n};\n\nexport function updateSelectedDay(days: CalendarDay[], selectedDay: CalendarDay): CalendarDay[] {\n return days.map(day => ({ ...day, isSelected: day.date === selectedDay.date }));\n}\n\n\n","<template>\n <div class=\"sl-isolate sl-flex sl-flex-auto sl-overflow-hidden sl-bg-white\">\n <div ref=\"container\" class=\"sl-flex sl-flex-auto sl-flex-col sl-overflow-auto\">\n <!-- Mobile sticky nav with days -->\n <div ref=\"containerNav\" class=\"sl-sticky sl-top-0 sl-z-10 sl-bg-white sl-text-xs sl-text-gray-500 sl-shadow sl-ring-1 sl-ring-black sl-ring-opacity-5 md:sl-hidden\">\n <div class=\"sl-grid sl-grid-cols-7 sl-text-sm sl-leading-6 sl-text-gray-500 xl:sl-hidden\">\n <button v-for=\"day in days\" :key=\"day.date\" type=\"button\" class=\"sl-flex sl-flex-col sl-items-center sl-pb-3 sl-pt-2\" @click=\"setActiveDay(day)\">\n {{ day.shortDay }}\n <span class=\"sl-mt-1 sl-flex sl-h-8 sl-w-8 sl-items-center sl-justify-center sl-font-semibold sl-text-gray-800\" :class=\"isActiveDay(day) ? 'sl-rounded-full sl-bg-stachelock-600 sl-font-semibold sl-text-white' : ''\">\n {{ day.day }}\n </span>\n </button>\n </div>\n </div>\n\n <div class=\"sl-flex sl-flex-auto\">\n <div class=\"sl-w-14 sl-flex-none sl-bg-white sl-ring-1 sl-ring-gray-100\" />\n <div class=\"sl-grid sl-flex-auto sl-grid-cols-1 sl-grid-rows-1\">\n <!-- Hour grid -->\n <div class=\"sl-col-start-1 sl-col-end-2 sl-row-start-1 sl-grid sl-divide-y sl-divide-gray-100\" style=\"grid-template-rows: repeat(48, minmax(3.5rem, 1fr))\">\n <div ref=\"containerOffset\" class=\"sl-row-end-1 sl-h-7\"></div>\n <template v-for=\"hour in hours\" :key=\"hour\">\n <div class=\"sl-relative\">\n <div class=\"sl-sticky sl-left-0 sl-z-20 -sl-ml-14 -sl-mt-2.5 sl-w-14 sl-pr-2 sl-text-right sl-text-xs sl-leading-5 sl-text-gray-400\">{{ hour }}</div>\n </div>\n <div></div>\n </template>\n </div>\n\n <!-- Events -->\n <ol class=\"sl-col-end-2 sl-row-start-1 sl-grid sl-grid-cols-1\" style=\"grid-template-rows: 1.75rem repeat(288, minmax(0, 1fr)) auto\">\n <template v-for=\"day in filteredDays\" :key=\"day.date\">\n <template v-if=\"day.events && day.events.length\">\n <li v-for=\"event in day.events\" :key=\"event.id\" class=\"sl-relative sl-mt-px sl-flex\" :style=\"`grid-row: ${calculateGridRow(event.datetime)} / span ${calculateGridSpan(event.startTime?.dateTime, event.endTime?.dateTime)}`\">\n <button @click=\"handleSelectEvent(event.id)\" class=\"sl-justify-start sl-group sl-absolute sl-inset-1 sl-flex sl-flex-col sl-overflow-y-auto sl-rounded-lg sl-bg-blue-50 sl-p-2 sl-text-xs sl-leading-5 hover:sl-bg-blue-100\">\n <p class=\"sl-order-1 sl-font-semibold sl-text-blue-700\">{{ event.name }}</p>\n <p class=\"sl-text-blue-500 group-hover:sl-text-blue-700\">\n <time :datetime=\"event.datetime\">{{ formatTime(event.datetime) }} {{ event.startTime?.shortTimeZone }}</time>\n </p>\n </button>\n </li>\n </template>\n </template>\n </ol>\n </div>\n </div>\n </div>\n </div>\n <div class=\"md:sl-block sl-hidden sl-w-1/2 sl-max-w-md sl-flex-none sl-border-l sl-border-gray-100 sl-px-8 sl-py-10\">\n <!-- Placeholder for side panel hook (omitted for library) -->\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, onMounted } from 'vue';\nimport type { CalendarDay } from '@/utils/calendar';\nimport { calculateGridRow, calculateGridSpan, formatTime } from '@/utils/calendar';\n\nconst props = defineProps<{ days: Array<CalendarDay> }>();\nconst emit = defineEmits(['selectDay', 'select:event']);\n\nconst container = ref<HTMLElement | null>(null);\nconst containerNav = ref<HTMLElement | null>(null);\nconst containerOffset = ref<HTMLElement | null>(null);\nconst activeDay = ref<CalendarDay | null>(null);\n\nconst hours = [\n '12AM','1AM','2AM','3AM','4AM','5AM','6AM','7AM','8AM','9AM','10AM','11AM',\n '12PM','1PM','2PM','3PM','4PM','5PM','6PM','7PM','8PM','9PM','10PM','11PM'\n];\n\nconst isActiveDay = (day: CalendarDay) => activeDay.value === day;\nconst setActiveDay = (day: CalendarDay) => { activeDay.value = day; emit('selectDay', day); };\nconst handleSelectEvent = (eventId: string | number) => emit('select:event', eventId);\n\nconst filteredDays = computed(() => activeDay.value ? [activeDay.value] : props.days);\n\nonMounted(() => {\n const currentMinute = new Date().getHours() * 60;\n const containerElement = container.value;\n const containerNavElement = containerNav.value;\n const containerOffsetElement = containerOffset.value;\n if (containerElement && containerNavElement && containerOffsetElement) {\n containerElement.scrollTop = ((containerElement.scrollHeight - containerNavElement.offsetHeight - containerOffsetElement.offsetHeight) * currentMinute) / 1440;\n }\n});\n</script>\n\n<style scoped>\n</style>\n\n\n","<template>\n <div ref=\"container\" class=\"sl-isolate sl-flex sl-flex-auto sl-flex-col sl-overflow-auto sl-bg-white\">\n <div style=\"width: 165%\" class=\"sl-flex sl-max-w-full sl-flex-none sl-flex-col sm:sl-max-w-none md:sl-max-w-full\">\n <!-- Header rows with day names -->\n <div ref=\"containerNav\" class=\"sl-sticky sl-top-0 sl-z-30 sl-flex-none sl-bg-white sl-shadow sl-ring-1 sl-ring-black sl-ring-opacity-5 sm:sl-pr-8\">\n <!-- Mobile: compact day chips -->\n <div class=\"sl-grid sl-grid-cols-7 sl-text-sm sl-leading-6 sl-text-gray-500 xl:sl-hidden\">\n <button v-for=\"day in days\" :key=\"day.date\" type=\"button\" class=\"sl-flex sl-flex-col sl-items-center sl-pb-3 sl-pt-2\" @click=\"setActiveDay(day)\">\n {{ day.shortDay }}\n <span class=\"sl-mt-1 sl-flex sl-h-8 sl-w-8 sl-items-center sl-justify-center sl-font-semibold sl-text-gray-800\"\n :class=\"isActiveDay(day) ? 'sl-rounded-full sl-bg-stachelock-600 sl-font-semibold sl-text-white' : ''\">\n {{ day.day }}\n </span>\n </button>\n </div>\n <!-- Desktop: full day names -->\n <div class=\"sl--mr-px sl-hidden sl-grid-cols-7 sl-divide-x sl-divide-gray-100 sl-border-r sl-border-gray-100 sl-text-sm sl-leading-6 sl-text-gray-500 xl:sl-grid\">\n <div class=\"sl-col-end-1 sl-w-14\"></div>\n <div v-for=\"day in days\" :key=\"day.date\" class=\"sl-flex sl-items-center sl-justify-center sl-py-3\">\n <span>\n {{ day.longDay }} <span class=\"sl-items-center sl-justify-center sl-font-semibold sl-text-gray-800\">{{ day.day }}</span>\n </span>\n </div>\n </div>\n </div>\n\n <div class=\"sl-flex sl-flex-auto\">\n <!-- Left time gutter -->\n <div class=\"sl-sticky sl-left-0 sl-z-10 sl-w-14 sl-flex-none sl-bg-white sl-ring-1 sl-ring-gray-100\" />\n <div class=\"sl-grid sl-flex-auto sl-grid-cols-1 sl-grid-rows-1\">\n <!-- Horizontal hour lines -->\n <div class=\"sl-col-start-1 sl-col-end-2 sl-row-start-1 sl-grid sl-divide-y sl-divide-gray-100\" style=\"grid-template-rows: repeat(48, minmax(3.5rem, 1fr))\">\n <div ref=\"containerOffset\" class=\"sl-row-end-1 sl-h-7\"></div>\n <template v-for=\"hour in hours\" :key=\"hour\">\n <div class=\"sl-relative\">\n <div class=\"sl-sticky sl-left-0 sl-z-20 -sl-ml-14 -sl-mt-2.5 sl-w-14 sl-pr-2 sl-text-right sl-text-xs sl-leading-5 sl-text-gray-400\">{{ hour }}</div>\n </div>\n <div></div>\n </template>\n </div>\n\n <!-- Vertical day separators -->\n <div class=\"sl-col-start-1 sl-col-end-2 sl-row-start-1 sl-hidden sl-grid-cols-7 sl-grid-rows-1 sl-divide-x sl-divide-gray-100 sm:sl-grid sm:sl-grid-cols-7\">\n <div v-for=\"day in days\" :key=\"day.date\" class=\"sl-col-start-1 sl-row-span-full\" />\n </div>\n\n <!-- Events layer -->\n <ol class=\"sl-col-end-2 sl-row-start-1 sl-grid sl-grid-cols-1 sm:sl-grid-cols-7 sm:sl-pr-8\" style=\"grid-template-rows: 1.75rem repeat(288, minmax(0, 1fr)) auto\">\n <template v-for=\"day in filteredDays\" :key=\"day.date\">\n <template v-if=\"day.events && day.events.length && day.longDay\">\n <li v-for=\"event in day.events\" :key=\"event.id\" class=\"sl-relative sl-mt-px sl-flex\" :class=\"`sl-col-start-${calculateColStart(day.longDay, 'week')}`\" :style=\"`grid-row: ${calculateGridRow(event.datetime)} / span ${calculateGridSpan(event.startTime?.dateTime, event.endTime?.dateTime)}`\">\n <button @click=\"handleSelectEvent(event.id)\" class=\"sl-group sl-absolute sl-inset-1 sl-flex sl-flex-col sl-overflow-y-auto sl-rounded-lg sl-bg-blue-50 sl-p-2 sl-text-xs sl-leading-5 hover:sl-bg-blue-100\">\n <p class=\"sl-order-1 sl-font-semibold sl-text-blue-700\">{{ event.name }}</p>\n <p class=\"sl-text-blue-500 group-hover:sl-text-blue-700\">\n <time :datetime=\"event.datetime\">{{ formatTime(event.datetime) }} {{ event.startTime?.shortTimeZone }}</time>\n </p>\n </button>\n </li>\n </template>\n </template>\n </ol>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, onMounted, onUnmounted, watch } from 'vue';\nimport type { CalendarDay } from '@/utils/calendar';\nimport { calculateGridRow, calculateGridSpan, formatTime, calculateColStart } from '@/utils/calendar';\n\nconst props = defineProps<{ days: Array<CalendarDay> }>();\nconst emit = defineEmits(['selectDay', 'select:event']);\n\nconst container = ref<HTMLElement | null>(null);\nconst containerNav = ref<HTMLElement | null>(null);\nconst containerOffset = ref<HTMLElement | null>(null);\nconst activeDay = ref<CalendarDay | null>(null);\n\nconst handleSelectEvent = (eventId: string | number) => emit('select:event', eventId);\nconst setActiveDay = (day: CalendarDay) => { activeDay.value = day; };\nconst isActiveDay = (day: CalendarDay) => activeDay.value === day;\n\nconst hours = [\n '12AM','1AM','2AM','3AM','4AM','5AM','6AM','7AM','8AM','9AM','10AM','11AM',\n '12PM','1PM','2PM','3PM','4PM','5PM','6PM','7PM','8PM','9PM','10PM','11PM'\n];\n\nonMounted(() => {\n const currentMinute = new Date().getHours() * 60;\n const containerElement = container.value;\n const containerNavElement = containerNav.value;\n const containerOffsetElement = containerOffset.value;\n if (containerElement && containerNavElement && containerOffsetElement) {\n containerElement.scrollTop = ((containerElement.scrollHeight - containerNavElement.offsetHeight - containerOffsetElement.offsetHeight) * currentMinute) / 1440;\n }\n});\n\nconst isMobile = ref(window.innerWidth < 768);\nconst updateIsMobile = () => { isMobile.value = window.innerWidth < 768; };\nonMounted(() => {\n window.addEventListener('resize', updateIsMobile);\n watch(isMobile, (newVal) => {\n if (!newVal) {\n const firstWithEvents = filteredDays.value.find((d: CalendarDay) => (d.events?.length || 0) > 0);\n if (firstWithEvents) setActiveDay(firstWithEvents);\n }\n });\n});\nonUnmounted(() => window.removeEventListener('resize', updateIsMobile));\n\nconst filteredDays = computed(() => {\n if (isMobile.value && activeDay.value) return [activeDay.value];\n return props.days || [];\n});\n</script>\n\n<style scoped>\n</style>\n\n\n","<template>\n <div class=\"sl-grid sl-grid-cols-1 md:sl-grid-cols-2 lg:sl-grid-cols-3 sl-gap-6\">\n <div v-for=\"month in months\" :key=\"month.name\" class=\"sl-bg-white sl-rounded sl-shadow sl-p-3\">\n <div class=\"sl-text-sm sl-font-medium sl-mb-2\">{{ month.name }}</div>\n <div class=\"sl-grid sl-grid-cols-7 sl-gap-px sl-bg-gray-200 sl-rounded sl-overflow-hidden\">\n <div v-for=\"day in month.days\" :key=\"day.date\" class=\"sl-bg-white sl-p-1 sl-h-10\">\n <div class=\"sl-text-[10px] sl-text-gray-500\">{{ day.day }}</div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Month } from '@/utils/calendar';\ndefineProps<{ months: Array<Month> }>();\n</script>\n\n<style scoped>\n</style>\n\n\n","<template>\n <component\n :is=\"fieldComponent\"\n v-if=\"fieldComponent\"\n v-bind=\"componentProps\"\n v-on=\"componentEvents\"\n :model-value=\"fieldValue\"\n @update:model-value=\"handleFieldChange\"\n />\n \n <!-- Fallback for unknown field types -->\n <div \n v-else\n class=\"sl-p-4 sl-bg-yellow-50 sl-border sl-border-yellow-200 sl-rounded-md\"\n >\n <div class=\"sl-flex\">\n <ExclamationTriangleIcon class=\"sl-h-5 sl-w-5 sl-text-yellow-400\" />\n <div class=\"sl-ml-3\">\n <h3 class=\"sl-text-sm sl-font-medium sl-text-yellow-800\">\n Unknown field type\n </h3>\n <div class=\"sl-mt-2 sl-text-sm sl-text-yellow-700\">\n <p>Field type \"{{ field.type }}\" is not supported.</p>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent } from 'vue'\nimport UiTextInput from '../UiTextInput.vue'\nimport { ExclamationTriangleIcon } from '@heroicons/vue/24/outline'\nimport type { DynamicFormField } from '../../types/form'\n\ninterface Props {\n field: DynamicFormField\n modelValue?: any\n formData?: Record<string, any>\n}\n\nconst props = defineProps<Props>()\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: any]\n 'field-change': [field: DynamicFormField, value: any]\n}>()\n\n// Component mapping for dynamic loading\nconst componentMap: Record<string, () => Promise<any>> = {\n text: () => Promise.resolve(UiTextInput),\n email: () => Promise.resolve(UiTextInput), \n password: () => Promise.resolve(UiTextInput),\n number: () => Promise.resolve(UiTextInput),\n tel: () => Promise.resolve(UiTextInput),\n url: () => Promise.resolve(UiTextInput),\n textarea: () => import('../inputs/TextAreaInput.vue'),\n select: () => import('../inputs/SelectInput.vue'),\n combobox: () => import('../inputs/ComboboxInput.vue'),\n checkbox: () => import('../inputs/CheckboxInput.vue'),\n switch: () => import('../inputs/SwitchInput.vue'),\n}\n\nconst fieldComponent = computed(() => {\n const componentLoader = componentMap[props.field.type]\n if (componentLoader) {\n return defineAsyncComponent({\n loader: componentLoader,\n errorComponent: () => null,\n delay: 0\n })\n }\n return null\n})\n\nconst fieldValue = computed({\n get: () => props.modelValue ?? props.field.defaultValue ?? getDefaultValue(),\n set: (value) => {\n emit('update:modelValue', value)\n emit('field-change', props.field, value)\n }\n})\n\nconst componentProps = computed(() => {\n const baseProps: Record<string, any> = {\n name: props.field.name,\n label: props.field.label,\n placeholder: props.field.placeholder,\n disabled: props.field.disabled,\n rules: props.field.validation,\n validateOnMount: props.field.validateOnMount,\n tertiaryLabel: props.field.tertiaryLabel,\n successMessage: props.field.successMessage\n }\n\n // Type-specific props\n switch (props.field.type) {\n case 'text':\n case 'email':\n case 'password':\n case 'number':\n case 'tel':\n case 'url':\n return {\n ...baseProps,\n type: props.field.inputType || props.field.type,\n maxlength: props.field.maxLength,\n minlength: props.field.minLength,\n min: props.field.min,\n max: props.field.max,\n step: props.field.step,\n spellcheck: props.field.spellcheck,\n autocomplete: props.field.autocomplete\n }\n \n case 'textarea':\n return {\n ...baseProps,\n rows: props.field.rows,\n maxlength: props.field.maxLength,\n spellcheck: props.field.spellcheck\n }\n \n case 'select':\n return {\n ...baseProps,\n items: props.field.options || [],\n multiple: props.field.multiple,\n itemKey: props.field.optionKey || 'value',\n itemText: props.field.optionLabel || 'label',\n showAll: props.field.showSelectAll\n }\n \n case 'combobox':\n return {\n ...baseProps,\n items: props.field.options || [],\n itemKey: props.field.optionKey || 'value',\n itemText: props.field.optionLabel || 'label',\n customQuery: props.field.customQuery,\n loading: props.field.loading\n }\n \n case 'checkbox':\n return {\n ...baseProps,\n description: props.field.description,\n immediate: props.field.immediate ?? true,\n isDescriptionHtml: props.field.isDescriptionHtml\n }\n \n case 'switch':\n return {\n ...baseProps,\n description: props.field.description,\n immediate: props.field.immediate ?? true,\n boxShadow: props.field.boxShadow,\n hideMainLabel: props.field.hideMainLabel,\n textTrue: props.field.textTrue,\n textFalse: props.field.textFalse\n }\n \n default:\n return baseProps\n }\n})\n\nconst componentEvents = computed(() => {\n const baseEvents: Record<string, Function> = {}\n \n // Add event handlers based on field configuration\n if (props.field.onBlur) {\n baseEvents.blur = props.field.onBlur\n }\n \n if (props.field.onFocus) {\n baseEvents.focus = props.field.onFocus\n }\n \n if (props.field.onChange) {\n baseEvents['update:modelValue'] = (value: any) => {\n fieldValue.value = value\n props.field.onChange?.(value, props.field, props.formData ?? {})\n }\n }\n \n return baseEvents\n})\n\nconst getDefaultValue = () => {\n switch (props.field.type) {\n case 'checkbox':\n case 'switch':\n return false\n case 'select':\n return props.field.multiple ? [] : null\n case 'number':\n return props.field.min || 0\n default:\n return ''\n }\n}\n\nconst handleFieldChange = (value: any) => {\n fieldValue.value = value\n}\n</script>\n","<template>\n <form\n ref=\"formRef\"\n :class=\"formClasses\"\n @submit.prevent=\"handleSubmit\"\n >\n <!-- Form title and description -->\n <div v-if=\"schema.title || schema.description\" class=\"sl-mb-6\">\n <h2 v-if=\"schema.title\" class=\"sl-text-lg sl-font-semibold sl-text-gray-900 sl-mb-2\">\n {{ schema.title }}\n </h2>\n <p v-if=\"schema.description\" class=\"sl-text-sm sl-text-gray-600\">\n {{ schema.description }}\n </p>\n </div>\n\n <!-- Form sections -->\n <div v-for=\"(section, sectionIndex) in formSections\" :key=\"section.id || sectionIndex\">\n <!-- Section header -->\n <div v-if=\"section.title || section.description\" class=\"sl-mb-4\">\n <h3 v-if=\"section.title\" class=\"sl-text-md sl-font-medium sl-text-gray-900 sl-mb-1\">\n {{ section.title }}\n </h3>\n <p v-if=\"section.description\" class=\"sl-text-sm sl-text-gray-600\">\n {{ section.description }}\n </p>\n </div>\n\n <!-- Section fields -->\n <div :class=\"sectionClasses(section)\">\n <div\n v-for=\"field in section.fields\"\n :key=\"field.name\"\n :class=\"fieldClasses(field)\"\n >\n <!-- Conditional rendering -->\n <SlDynamicFormField\n v-if=\"shouldShowField(field)\"\n :field=\"field\"\n v-model=\"formData[field.name]\"\n :form-data=\"formData\"\n @field-change=\"handleFieldChange\"\n />\n </div>\n </div>\n </div>\n\n <!-- Form actions -->\n <div\n v-if=\"showActions\"\n :class=\"[\n 'sl-flex sl-gap-3',\n actionsAlignment === 'center' ? 'sl-justify-center' :\n actionsAlignment === 'right' ? 'sl-justify-end' :\n 'sl-justify-start'\n ]\"\n >\n <SlButton\n v-if=\"showCancelButton\"\n variant=\"outline\"\n :disabled=\"loading\"\n type=\"button\"\n @click=\"handleCancel\"\n >\n {{ cancelButtonText || 'Cancel' }}\n </SlButton>\n \n <SlButton\n :variant=\"submitButtonVariant\"\n :loading=\"loading\"\n :disabled=\"!isFormValid || loading\"\n type=\"submit\"\n >\n {{ submitButtonText || 'Submit' }}\n </SlButton>\n </div>\n \n <!-- Form-level errors -->\n <div v-if=\"formError\" class=\"sl-mt-4\">\n <div class=\"sl-bg-red-50 sl-border sl-border-red-200 sl-rounded-md sl-p-4\">\n <div class=\"sl-flex\">\n <ExclamationCircleIcon class=\"sl-h-5 sl-w-5 sl-text-red-400\" />\n <div class=\"sl-ml-3\">\n <h3 class=\"sl-text-sm sl-font-medium sl-text-red-800\">\n Form Error\n </h3>\n <div class=\"sl-mt-2 sl-text-sm sl-text-red-700\">\n <p>{{ formError }}</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </form>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, reactive, ref, watch } from 'vue'\nimport { useForm } from 'vee-validate'\nimport { ExclamationCircleIcon } from '@heroicons/vue/24/outline'\nimport SlButton from '../UiButton.vue'\nimport SlDynamicFormField from './DynamicFormField.vue'\nimport type { \n DynamicFormSchema, \n DynamicFormSection,\n DynamicFormField,\n ButtonVariant \n} from '../../types/form'\n\ninterface Props {\n schema: DynamicFormSchema\n modelValue?: Record<string, any>\n loading?: boolean\n showActions?: boolean\n showCancelButton?: boolean\n submitButtonText?: string\n cancelButtonText?: string\n submitButtonVariant?: ButtonVariant\n actionsAlignment?: 'left' | 'center' | 'right'\n formError?: string\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n showActions: true,\n showCancelButton: false,\n submitButtonVariant: 'primary',\n actionsAlignment: 'right'\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: Record<string, any>): void\n (e: 'submit', data: Record<string, any>, ctx: { setErrors: (errors: Record<string, string>) => void }): void\n (e: 'cancel'): void\n (e: 'field-change', field: DynamicFormField, value: any, formData: Record<string, any>): void\n}>()\n\nconst formRef = ref<HTMLFormElement>()\nconst formData = reactive<Record<string, any>>({})\n\n// Initialize form with vee-validate\nconst { handleSubmit: veeHandleSubmit, setErrors, meta } = useForm({\n keepValuesOnUnmount: true\n})\n\n// Initialize form data\nconst initializeFormData = () => {\n const initialData = { ...props.modelValue } || {}\n \n // Set default values from schema\n props.schema.sections.forEach(section => {\n section.fields.forEach(field => {\n if (!(field.name in initialData)) {\n initialData[field.name] = field.defaultValue ?? getDefaultValue(field.type)\n }\n })\n })\n \n Object.assign(formData, initialData)\n}\n\n// Watch for external changes to modelValue\nwatch(\n () => props.modelValue,\n (newValue) => {\n if (newValue) {\n Object.assign(formData, newValue)\n }\n },\n { deep: true }\n)\n\n// Watch form data changes and emit updates\nwatch(\n formData,\n (newData) => {\n emit('update:modelValue', { ...newData })\n },\n { deep: true }\n)\n\n// Initialize form data on mount\ninitializeFormData()\n\nconst formSections = computed(() => {\n return props.schema.sections.filter(section => \n section.condition ? section.condition(formData) : true\n )\n})\n\nconst formClasses = computed(() => {\n const baseClasses = ['sl-space-y-6']\n \n if (props.schema.className) {\n baseClasses.push(props.schema.className)\n }\n \n return baseClasses.join(' ')\n})\n\nconst sectionClasses = (section: DynamicFormSection) => {\n const baseClasses = [\n 'sl-grid',\n 'sl-gap-4'\n ]\n \n // Grid columns based on section layout\n const columns = section.columns || 1\n baseClasses.push(`sl-grid-cols-1`)\n \n if (columns > 1) {\n baseClasses.push(`md:sl-grid-cols-${Math.min(columns, 3)}`)\n }\n \n if (section.className) {\n baseClasses.push(section.className)\n }\n \n return baseClasses.join(' ')\n}\n\nconst fieldClasses = (field: DynamicFormField) => {\n const baseClasses: string[] = []\n \n // Field span\n if (field.colSpan && field.colSpan > 1) {\n baseClasses.push(`sl-col-span-${Math.min(field.colSpan, 3)}`)\n }\n \n if (field.className) {\n baseClasses.push(field.className)\n }\n \n return baseClasses.join(' ')\n}\n\nconst shouldShowField = (field: DynamicFormField): boolean => {\n if (field.condition) {\n return field.condition(formData, field)\n }\n return true\n}\n\nconst isFormValid = computed(() => {\n return meta.value.valid\n})\n\nconst getDefaultValue = (type: string) => {\n switch (type) {\n case 'checkbox':\n case 'switch':\n return false\n case 'select':\n return null\n case 'number':\n return 0\n default:\n return ''\n }\n}\n\nconst handleSubmit = veeHandleSubmit((values) => {\n emit('submit', values, { setErrors })\n})\n\nconst handleCancel = () => {\n emit('cancel')\n}\n\nconst handleFieldChange = (field: DynamicFormField, value: any) => {\n emit('field-change', field, value, formData)\n \n // Handle field dependencies\n if (field.onFieldChange) {\n field.onFieldChange(value, field, formData)\n }\n}\n\n// Expose form methods\nconst validate = async () => {\n // Trigger vee-validate validation\n return meta.value.valid\n}\n\nconst reset = () => {\n Object.keys(formData).forEach(key => {\n delete formData[key]\n })\n initializeFormData()\n}\n\nconst setFieldValue = (fieldName: string, value: any) => {\n formData[fieldName] = value\n}\n\nconst getFieldValue = (fieldName: string) => {\n return formData[fieldName]\n}\n\ndefineExpose({\n validate,\n reset,\n setFieldValue,\n getFieldValue,\n formData,\n formRef\n})\n</script>\n","<template>\n <div class=\"sl-w-full\">\n <FormFieldWrapper\n :id=\"id\"\n :name=\"name\"\n :label=\"layout === 'stacked' ? label : ''\"\n :disabled=\"disabled\"\n :optional=\"!rules\"\n :tertiary-label=\"tertiaryLabel\"\n :box-shadow=\"boxShadow\"\n :error-message=\"errorMessage\"\n :success-message=\"successMessage\"\n :is-valid=\"meta.valid\"\n :is-touched=\"meta.touched\"\n :show-errors=\"showErrors\"\n >\n <div class=\"sl-flex sl-items-start sl-gap-3\">\n <div class=\"sl-flex sl-h-6 sl-shrink-0 sl-items-center\">\n <div class=\"sl-group group sl-grid sl-w-4 sl-h-4 sl-grid-cols-1\">\n <input\n :id=\"id\"\n :aria-describedby=\"description ? `${id}-description` : undefined\"\n :name=\"name\"\n ref=\"checkboxRef\"\n v-model=\"checkboxValue\"\n type=\"checkbox\"\n :disabled=\"disabled\"\n :class=\"[\n 'sl-col-start-1 sl-row-start-1 sl-w-full sl-h-full sl-appearance-none sl-rounded sl-border sl-border-gray-300 sl-bg-white',\n 'checked:sl-border-stachelock-600 checked:sl-bg-stachelock-600',\n 'indeterminate:sl-border-stachelock-600 indeterminate:sl-bg-stachelock-600',\n 'focus-visible:sl-outline focus-visible:sl-outline-2 focus-visible:sl-outline-offset-2 focus-visible:sl-outline-stachelock-600',\n 'disabled:sl-border-gray-300 disabled:sl-bg-gray-100 disabled:checked:sl-bg-gray-100',\n checkboxClasses\n ]\"\n @change=\"handleChange\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n >\n <svg\n class=\"sl-pointer-events-none sl-col-start-1 sl-row-start-1 sl-w-3.5 sl-h-3.5 sl-self-center sl-justify-self-center sl-stroke-white\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n >\n <path\n class=\"sl-opacity-0 group-has-[:checked]:sl-opacity-100\"\n d=\"M3 8L6 11L11 3.5\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n class=\"sl-opacity-0 group-has-[:indeterminate]:sl-opacity-100\"\n d=\"M3 7H11\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </div>\n </div>\n <div class=\"sl-flex-1 sl-text-sm sl-leading-6\">\n <!-- Inline label to the right of the checkbox -->\n <label v-if=\"layout === 'inline' && label\" :for=\"id\" class=\"sl-font-medium sl-text-gray-900 sl-cursor-pointer\">{{ label }}</label>\n <!-- Description (inline layout shows beneath label) -->\n <div\n v-if=\"description\"\n :id=\"`${id}-description`\"\n class=\"sl-text-gray-600\"\n :class=\"[ layout === 'inline' ? '' : 'sl-mt-1', { 'sl-cursor-pointer': !disabled } ]\"\n ref=\"descriptionHtml\"\n @click=\"onDescriptionClick\"\n >\n <div v-if=\"isDescriptionHtml\" v-html=\"description\" />\n <span v-else>{{ description }}</span>\n </div>\n </div>\n </div>\n </FormFieldWrapper>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { useField } from 'vee-validate'\nimport type { ValidationRule } from '../../types/form'\nimport { generateId } from '../../utils/id'\nimport FormFieldWrapper from '../forms/FormFieldWrapper.vue'\n\ninterface Props {\n name: string\n label?: string\n description?: string\n disabled?: boolean\n rules?: ValidationRule\n immediate?: boolean\n isDescriptionHtml?: boolean\n successMessage?: string\n modelValue?: boolean\n tertiaryLabel?: string\n showErrors?: boolean\n layout?: 'stacked' | 'inline'\n boxShadow?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n immediate: true,\n isDescriptionHtml: false,\n showErrors: false,\n layout: 'stacked',\n boxShadow: false\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: boolean]\n blur: [event: FocusEvent]\n focus: [event: FocusEvent]\n}>()\n\nconst checkboxRef = ref<HTMLInputElement>()\nconst descriptionHtml = ref<HTMLElement | null>(null)\nconst id = generateId(`sl-${props.name}`)\n\n// Use vee-validate for form validation\nconst { value, errorMessage, handleChange: handleValidation, handleBlur, meta } = useField(\n () => props.name,\n props.rules,\n {\n type: 'checkbox',\n initialValue: props.modelValue || false\n }\n)\n\nconst checkboxValue = ref(props.modelValue || false)\n\n// Watch for external changes\nwatch(\n () => props.modelValue,\n (newValue) => {\n if (newValue !== undefined && newValue !== checkboxValue.value) {\n checkboxValue.value = newValue\n value.value = newValue\n }\n },\n { immediate: true }\n)\n\nwatch(\n checkboxValue,\n (newValue) => {\n emit('update:modelValue', newValue)\n if (props.immediate) {\n handleValidation(newValue)\n }\n }\n)\n\nconst checkboxClasses = computed(() => {\n const baseClasses = [\n 'sl-h-4',\n 'sl-w-4',\n 'sl-rounded',\n 'sl-border-gray-300',\n 'sl-text-stachelock-600',\n 'focus:sl-ring-stachelock-600',\n 'focus:sl-ring-2',\n 'focus:sl-ring-offset-2',\n 'sl-transition-all',\n 'sl-duration-200'\n ]\n\n if (props.disabled) {\n baseClasses.push(\n 'sl-cursor-not-allowed',\n 'sl-opacity-50',\n 'sl-bg-gray-50'\n )\n } else {\n baseClasses.push(\n 'sl-cursor-pointer',\n 'hover:sl-border-gray-400'\n )\n }\n\n if (errorMessage.value) {\n baseClasses.push(\n 'sl-border-red-300',\n 'focus:sl-ring-red-600'\n )\n } else if (meta.valid && meta.touched) {\n baseClasses.push(\n 'sl-border-green-300',\n 'focus:sl-ring-green-500'\n )\n }\n\n return baseClasses.join(' ')\n})\n\nconst handleChange = (event: Event) => {\n const target = event.target as HTMLInputElement\n checkboxValue.value = target.checked\n \n if (!props.immediate) {\n handleValidation(target.checked)\n }\n}\n\nconst toggle = () => {\n if (!props.disabled) {\n checkboxValue.value = !checkboxValue.value\n }\n}\n\nconst focus = () => {\n checkboxRef.value?.focus()\n}\n\nconst blur = () => {\n checkboxRef.value?.blur()\n}\n\nconst onBlur = (event: FocusEvent) => {\n if (!props.immediate) {\n handleValidation(checkboxValue.value)\n }\n handleBlur(event)\n emit('blur', event)\n}\n\nconst onFocus = (event: FocusEvent) => {\n emit('focus', event)\n}\n\nconst onDescriptionClick = (event: Event) => {\n if (props.disabled) return\n const target = event.target as HTMLElement\n if (target.tagName === 'A') {\n // Allow links to be clickable without toggling\n return\n }\n toggle()\n}\n\ndefineExpose({\n focus,\n blur,\n toggle,\n checkboxRef\n})\n</script>\n\n\n","<template>\n <div class=\"sl-w-full\">\n <FormFieldWrapper\n :id=\"id\"\n :name=\"name\"\n :label=\"label\"\n :disabled=\"disabled\"\n :optional=\"!rules\"\n :tertiary-label=\"tertiaryLabel\"\n :box-shadow=\"boxShadow\"\n :error-message=\"errorMessage\"\n :success-message=\"successMessage\"\n :is-valid=\"meta.valid\"\n :is-touched=\"meta.touched\"\n >\n <Combobox\n v-model=\"selectedValue\"\n :disabled=\"disabled\"\n :multiple=\"multiple\"\n @update:model-value=\"handleChange\"\n >\n <div :class=\"wrapperClasses\">\n <ComboboxInput\n :id=\"id\"\n :class=\"inputClasses\"\n :display-value=\"displayComboboxValue\"\n :placeholder=\"placeholder || 'Type to search...'\"\n v-model=\"query\"\n @input=\"onQueryInput\"\n @blur=\"onBlur\"\n @focus=\"onFocus\"\n />\n \n <ComboboxButton class=\"sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-2\">\n <ChevronUpDownIcon\n class=\"sl-h-5 sl-w-5 sl-text-gray-400\"\n aria-hidden=\"true\"\n />\n </ComboboxButton>\n\n <TransitionRoot\n leave=\"sl-transition sl-ease-in sl-duration-100\"\n leave-from=\"sl-opacity-100\"\n leave-to=\"sl-opacity-0\"\n @after-leave=\"query = ''\"\n >\n <ComboboxOptions\n v-if=\"filteredItems.length > 0 || query !== '' || (multiple && showAll)\"\n class=\"sl-absolute sl-z-10 sl-mt-1 sl-max-h-60 sl-w-full sl-overflow-auto sl-rounded-md sl-bg-white sl-py-1 sl-text-base sl-shadow-lg sl-ring-1 sl-ring-black sl-ring-opacity-5 focus:sl-outline-none sm:sl-text-sm\"\n @scroll=\"onScroll\"\n >\n <!-- Select All option -->\n <ComboboxOption\n v-if=\"multiple && showAll\"\n :value=\"null\"\n :disabled=\"true\"\n as=\"template\"\n v-slot=\"{ active }\"\n >\n <li\n @click.prevent.stop=\"toggleSelectAll\"\n :class=\"[\n 'sl-relative sl-cursor-default sl-select-none sl-py-2 sl-pl-10 sl-pr-4',\n active ? 'sl-bg-stachelock-600 sl-text-white' : 'sl-text-gray-900'\n ]\"\n >\n <span class=\"sl-block sl-truncate sl-font-medium\">\n {{ isAllSelected ? 'Unselect All' : 'Select All' }}\n </span>\n </li>\n </ComboboxOption>\n <!-- Loading state -->\n <div \n v-if=\"loading\"\n class=\"sl-relative sl-cursor-default sl-select-none sl-py-2 sl-px-4 sl-text-gray-700\"\n >\n <div class=\"sl-flex sl-items-center sl-gap-2\">\n <Loading size=\"sm\" />\n <span>Loading...</span>\n </div>\n </div>\n \n <!-- No results -->\n <div\n v-else-if=\"query !== '' && filteredItems.length === 0\"\n class=\"sl-relative sl-cursor-default sl-select-none sl-py-2 sl-px-4 sl-text-gray-700\"\n >\n Nothing found.\n </div>\n \n <!-- Options -->\n <ComboboxOption\n v-for=\"item in visibleItems\"\n :key=\"getItemKey(item)\"\n :value=\"item\"\n as=\"template\"\n :disabled=\"item.disabled\"\n v-slot=\"{ active, selected }\"\n >\n <li\n :class=\"[\n 'sl-relative sl-cursor-default sl-select-none sl-py-2 sl-pl-10 sl-pr-4',\n active ? 'sl-bg-stachelock-600 sl-text-white' : 'sl-text-gray-900',\n item.disabled ? 'sl-opacity-50 sl-cursor-not-allowed' : ''\n ]\"\n >\n <span\n :class=\"[\n 'sl-block sl-truncate',\n selected ? 'sl-font-medium' : 'sl-font-normal'\n ]\"\n >\n {{ getItemText(item) }}\n </span>\n <span\n v-if=\"selected\"\n class=\"sl-absolute sl-inset-y-0 sl-left-0 sl-flex sl-items-center sl-pl-3\"\n :class=\"active ? 'sl-text-white' : 'sl-text-stachelock-600'\"\n >\n <CheckIcon class=\"sl-h-5 sl-w-5\" aria-hidden=\"true\" />\n </span>\n </li>\n </ComboboxOption>\n <!-- Manual entry option -->\n <ComboboxOption\n v-if=\"!multiple && queryValue\"\n :value=\"queryValue\"\n as=\"template\"\n v-slot=\"{ active }\"\n >\n <li\n @click.prevent.stop=\"handleManualEntry\"\n :class=\"[\n 'sl-relative sl-cursor-pointer sl-select-none sl-py-2 sl-pl-10 sl-pr-4',\n active ? 'sl-bg-stachelock-600 sl-text-white' : 'sl-text-gray-900'\n ]\"\n >\n <span class=\"sl-block sl-truncate\">\n Enter \"{{ query }}\" manually\n </span>\n </li>\n </ComboboxOption>\n </ComboboxOptions>\n </TransitionRoot>\n </div>\n </Combobox>\n \n <template #success-message>\n <span v-if=\"successMessage\">{{ successMessage }}</span>\n </template>\n </FormFieldWrapper>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport {\n Combobox,\n ComboboxInput,\n ComboboxButton,\n ComboboxOption,\n ComboboxOptions,\n TransitionRoot,\n} from '@headlessui/vue'\nimport { CheckIcon, ChevronUpDownIcon } from '@heroicons/vue/20/solid'\nimport { useField } from 'vee-validate'\nimport FormFieldWrapper from '../forms/FormFieldWrapper.vue'\nimport Loading from '../UiLoading.vue'\nimport type { ValidationRule } from '../../types/form'\nimport { generateId } from '../../utils/id'\n\ninterface ComboboxItem {\n [key: string]: any\n disabled?: boolean\n}\n\ninterface Props {\n name: string\n items: ComboboxItem[]\n label?: string\n placeholder?: string\n disabled?: boolean\n rules?: ValidationRule\n validateOnMount?: boolean\n successMessage?: string\n tertiaryLabel?: string\n itemKey?: string\n itemText?: string\n customQuery?: (query: string, items: ComboboxItem[]) => ComboboxItem[]\n loading?: boolean\n multiple?: boolean\n showAll?: boolean\n modelValue?: any\n boxShadow?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n itemKey: 'id',\n itemText: 'name',\n loading: false,\n multiple: false,\n showAll: false,\n boxShadow: false\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: any]\n 'update:query': [query: string]\n blur: [event: FocusEvent]\n focus: [event: FocusEvent]\n}>()\n\nconst id = generateId(props.name)\nconst query = ref('')\n\n// Use vee-validate for form validation\nconst { value, errorMessage, handleChange: handleValidation, meta, setTouched } = useField(\n () => props.name,\n props.rules,\n {\n validateOnMount: props.validateOnMount,\n initialValue: props.modelValue\n }\n)\n\nconst selectedValue = ref<any>(\n props.multiple\n ? (Array.isArray(props.modelValue) ? props.modelValue : [])\n : props.modelValue\n)\n\n// Watch for external changes\nwatch(\n () => props.modelValue,\n (newValue) => {\n if (props.multiple) {\n const coerced = Array.isArray(newValue) ? newValue : []\n if (coerced !== selectedValue.value) {\n selectedValue.value = coerced\n value.value = coerced\n }\n } else {\n if (newValue !== selectedValue.value) {\n selectedValue.value = newValue\n value.value = newValue\n }\n }\n },\n { immediate: true }\n)\n\nwatch(\n selectedValue,\n (newValue) => {\n emit('update:modelValue', newValue)\n }\n)\n\nconst inputClasses = computed(() => {\n const baseClasses = [\n 'sl-w-full',\n 'sl-border-none',\n 'sl-py-2',\n 'sl-pl-3',\n 'sl-pr-10',\n 'sl-text-sm',\n 'sl-leading-5',\n 'sl-text-gray-900',\n 'focus:sl-outline-none',\n 'focus:sl-ring-0',\n 'sl-bg-transparent'\n ]\n\n return baseClasses.join(' ')\n})\n\nconst wrapperClasses = computed(() => {\n const baseClasses = [\n 'sl-relative',\n 'sl-w-full',\n 'sl-cursor-default',\n 'sl-rounded-lg',\n 'sl-bg-white',\n 'sl-text-left',\n 'sl-border',\n 'focus-within:sl-ring-2',\n 'focus-within:sl-ring-stachelock-500',\n 'focus-within:sl-border-stachelock-500',\n 'sl-transition-all',\n 'sl-duration-200'\n ]\n\n if (props.disabled) {\n baseClasses.push(\n 'sl-bg-gray-50',\n 'sl-cursor-not-allowed',\n 'sl-border-gray-200'\n )\n } else if (errorMessage.value) {\n baseClasses.push(\n 'sl-border-red-300',\n 'focus-within:sl-ring-red-500',\n 'focus-within:sl-border-red-500'\n )\n } else if (meta.valid && meta.touched) {\n baseClasses.push(\n 'sl-border-green-300',\n 'focus-within:sl-ring-green-500',\n 'focus-within:sl-border-green-500'\n )\n } else {\n baseClasses.push(\n 'sl-border-gray-300',\n 'hover:sl-border-gray-400'\n )\n }\n\n return baseClasses.join(' ')\n})\n\nconst getItemKey = (item: ComboboxItem): any => {\n return item[props.itemKey]\n}\n\nconst getItemText = (item: ComboboxItem): string => {\n if (!item) return ''\n return item[props.itemText] || item.toString()\n}\n\n// Filtering and infinite scroll state\nconst filteredItems = ref<ComboboxItem[]>([])\nconst visibleItems = ref<ComboboxItem[]>([])\nconst itemsPerPage = 50\nconst currentPage = ref(1)\n\nconst loadMoreItems = () => {\n const end = currentPage.value * itemsPerPage\n visibleItems.value = filteredItems.value.slice(0, end)\n currentPage.value += 1\n}\n\nconst resetPagination = () => {\n currentPage.value = 1\n visibleItems.value = []\n loadMoreItems()\n}\n\nconst recomputeFilteredItems = () => {\n if (query.value && query.value !== '') {\n if (props.customQuery) {\n filteredItems.value = props.customQuery(query.value, props.items)\n } else {\n const lower = query.value.toLowerCase()\n filteredItems.value = props.items.filter((item) => {\n const text = getItemText(item)\n return text.toLowerCase().includes(lower)\n })\n }\n } else {\n filteredItems.value = props.items\n }\n resetPagination()\n}\n\nconst allItems = computed(() => {\n return props.items.filter(item => !item.disabled)\n})\n\nconst onQueryInput = (event: Event) => {\n const target = event.target as HTMLInputElement\n query.value = target.value\n emit('update:query', query.value)\n recomputeFilteredItems()\n}\n\nconst handleChange = (value: any) => {\n selectedValue.value = value\n setTouched(true)\n handleValidation(value)\n}\n\nconst isAllSelected = computed(() => {\n if (!props.multiple || !Array.isArray(selectedValue.value)) return false\n const selectable = allItems.value\n if (selectable.length === 0) return false\n return selectable.every(item => (selectedValue.value as any[]).includes(item))\n})\n\nconst toggleSelectAll = () => {\n if (!props.multiple) return\n if (isAllSelected.value) {\n selectedValue.value = []\n } else {\n selectedValue.value = [...allItems.value]\n }\n handleValidation(selectedValue.value)\n}\n\nconst displayComboboxValue = (val: any): string => {\n if (!props.multiple) {\n return getItemText(val as ComboboxItem)\n }\n if (!Array.isArray(val) || val.length === 0) return ''\n if (val.length === 1) return getItemText(val[0] as ComboboxItem)\n return `${val.length} selected`\n}\n\n// Manual entry support (single-select only)\nconst queryValue = computed(() => {\n if (props.multiple) return null\n return query.value === '' ? null : { [props.itemKey]: null, [props.itemText]: query.value }\n})\n\nconst handleManualEntry = () => {\n if (props.multiple) return\n if (!queryValue.value) return\n // If customQuery provided and expects external handling, emit raw query\n if (props.customQuery) {\n emit('update:modelValue', query.value)\n handleValidation(query.value)\n } else {\n selectedValue.value = queryValue.value\n handleValidation(selectedValue.value)\n }\n}\n\nconst onScroll = (event: Event) => {\n const element = event.target as HTMLElement\n if (element.scrollTop + element.clientHeight >= element.scrollHeight) {\n loadMoreItems()\n }\n}\n\nconst onFocus = (event: FocusEvent) => {\n emit('focus', event)\n}\n\nconst onBlur = (event: FocusEvent) => {\n if (!props.multiple && queryValue.value) {\n selectedValue.value = queryValue.value\n handleValidation(selectedValue.value)\n emit('update:modelValue', selectedValue.value)\n }\n emit('blur', event)\n}\n\n// Initialize and keep filtered items in sync\nwatch(() => props.items, () => {\n recomputeFilteredItems()\n}, { immediate: true, deep: true })\n</script>\n\n\n","<template>\n <div class=\"sl-w-full\">\n <FormFieldWrapper\n :id=\"id\"\n :name=\"name\"\n :label=\"label\"\n :disabled=\"disabled\"\n :optional=\"!rules\"\n :tertiary-label=\"tertiaryLabel\"\n :box-shadow=\"boxShadow\"\n :error-message=\"errorMessage\"\n :success-message=\"successMessage\"\n :is-valid=\"meta.valid\"\n :is-touched=\"meta.touched\"\n >\n <div class=\"sl-relative\">\n <textarea\n :id=\"id\"\n ref=\"textareaRef\"\n v-model=\"value\"\n :name=\"name\"\n :disabled=\"disabled\"\n :placeholder=\"placeholder\"\n :class=\"[\n textareaClasses,\n inputClass\n ]\"\n :style=\"inputStyle\"\n :spellcheck=\"spellcheck\"\n :rows=\"rows\"\n :maxlength=\"maxlength\"\n v-bind=\"$attrs\"\n @blur=\"onBlur\"\n @focus=\"onFocus\"\n @input=\"onInput\"\n />\n \n <!-- Character count -->\n <div \n v-if=\"maxlength !== undefined\" \n class=\"sl-absolute sl-bottom-2 sl-right-2 sl-text-xs sl-text-slate-500 sl-pointer-events-none\"\n >\n {{ value?.length || 0 }}/{{ maxlength }}\n </div>\n </div>\n \n <template #success-message>\n <span v-if=\"successMessage\">{{ successMessage }}</span>\n </template>\n </FormFieldWrapper>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch, type StyleValue } from 'vue'\nimport { useField } from 'vee-validate'\nimport FormFieldWrapper from '../forms/FormFieldWrapper.vue'\nimport type { ValidationRule } from '../../types/form'\nimport { generateId } from '../../utils/id'\n\ninterface Props {\n name: string\n label?: string\n placeholder?: string\n disabled?: boolean\n rules?: ValidationRule\n validateOnMount?: boolean\n successMessage?: string\n tertiaryLabel?: string\n spellcheck?: boolean\n rows?: number\n maxlength?: number\n inputClass?: string\n inputStyle?: StyleValue\n lazy?: boolean\n modelValue?: string\n boxShadow?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n spellcheck: true,\n rows: 4,\n lazy: false,\n boxShadow: false\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: string]\n blur: [event: FocusEvent]\n focus: [event: FocusEvent]\n}>()\n\nconst textareaRef = ref<HTMLTextAreaElement>()\nconst id = generateId(props.name)\n\n// Use vee-validate for form validation\nconst { value, errorMessage, handleBlur, handleChange, meta } = useField(\n () => props.name,\n props.rules,\n {\n validateOnMount: props.validateOnMount,\n initialValue: props.modelValue,\n syncVModel: true\n }\n)\n\n// Sync with v-model\nwatch(\n () => props.modelValue,\n (newValue) => {\n if (newValue !== value.value) {\n value.value = newValue || ''\n }\n }\n)\n\nwatch(\n value,\n (newValue) => {\n emit('update:modelValue', newValue)\n }\n)\n\nconst textareaClasses = computed(() => {\n const baseClasses = [\n 'sl-w-full',\n 'sl-px-3',\n 'sl-py-2',\n 'sl-text-sm',\n 'sl-border',\n 'sl-rounded-md',\n 'sl-bg-white',\n 'sl-transition-all',\n 'sl-duration-200',\n 'focus:sl-outline-none',\n 'focus:sl-ring-2',\n 'focus:sl-ring-stachelock-500',\n 'focus:sl-border-stachelock-500',\n 'sl-resize-y',\n 'sl-min-h-[80px]'\n ]\n\n if (props.disabled) {\n baseClasses.push(\n 'sl-bg-gray-50',\n 'sl-text-gray-500',\n 'sl-cursor-not-allowed',\n 'sl-border-gray-200'\n )\n } else if (errorMessage.value) {\n baseClasses.push(\n 'sl-border-red-300',\n 'focus:sl-ring-red-500',\n 'focus:sl-border-red-500'\n )\n } else if (meta.valid && meta.touched) {\n baseClasses.push(\n 'sl-border-green-300',\n 'focus:sl-ring-green-500',\n 'focus:sl-border-green-500'\n )\n } else {\n baseClasses.push(\n 'sl-border-gray-300',\n 'hover:sl-border-gray-400'\n )\n }\n\n return baseClasses.join(' ')\n})\n\nconst onInput = (event: Event) => {\n const target = event.target as HTMLTextAreaElement\n if (!props.lazy) {\n handleChange(target.value)\n }\n}\n\nconst onBlur = (event: FocusEvent) => {\n if (props.lazy) {\n const target = event.target as HTMLTextAreaElement\n handleChange(target.value)\n }\n handleBlur(event)\n emit('blur', event)\n}\n\nconst onFocus = (event: FocusEvent) => {\n emit('focus', event)\n}\n\nconst focus = () => {\n textareaRef.value?.focus()\n}\n\nconst blur = () => {\n textareaRef.value?.blur()\n}\n\ndefineExpose({\n focus,\n blur,\n textareaRef\n})\n</script>\n\n\n","<template>\n <div class=\"sl-w-full\">\n <FormFieldWrapper\n :id=\"id\"\n :name=\"name\"\n :label=\"layout === 'stacked' && !hideMainLabel ? label : ''\"\n :disabled=\"disabled\"\n :optional=\"!rules\"\n :tertiary-label=\"tertiaryLabel\"\n :box-shadow=\"boxShadow\"\n :error-message=\"errorMessage\"\n :success-message=\"successMessage\"\n :is-valid=\"meta.valid\"\n :is-touched=\"meta.touched\"\n :show-errors=\"showErrors\"\n >\n <div class=\"sl-flex sl-items-center sl-justify-between sl-gap-4\">\n <div v-if=\"layout === 'inline'\" class=\"sl-flex-1\">\n <label\n v-if=\"label && !hideMainLabel\"\n :for=\"id\"\n class=\"sl-block sl-text-sm sl-font-medium sl-text-gray-900 sl-cursor-pointer\"\n >\n {{ label }}\n </label>\n <div v-if=\"description\" class=\"sl-mt-1 sl-text-sm sl-text-gray-600\" :class=\"{ 'sl-cursor-pointer': !disabled }\" @click=\"!disabled && toggle()\">\n <div v-if=\"isDescriptionHtml\" v-html=\"description\" />\n <span v-else>{{ description }}</span>\n </div>\n </div>\n <Switch\n :id=\"id\"\n ref=\"switchRef\"\n v-model=\"switchValue\"\n :disabled=\"disabled\"\n :class=\"[\n switchClasses,\n { 'sl-shadow-md': boxShadow }\n ]\"\n @update:model-value=\"handleToggle\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown.space.prevent=\"toggle\"\n @keydown.enter.prevent=\"toggle\"\n >\n <span class=\"sl-sr-only\">{{ label }}</span>\n <span\n :class=\"[\n switchValue ? 'sl-translate-x-5' : 'sl-translate-x-0',\n 'sl-pointer-events-none sl-inline-block sl-h-5 sl-w-5 sl-transform sl-rounded-full sl-bg-white sl-shadow sl-ring-0 sl-transition sl-duration-200 sl-ease-in-out sl-relative'\n ]\"\n >\n </span>\n </Switch>\n <span v-if=\"textTrue || textFalse\" class=\"sl-ml-3 sl-text-sm\">\n <span v-if=\"switchValue && textTrue\" class=\"sl-font-medium sl-text-gray-800\">{{ textTrue }}</span>\n <span v-else-if=\"!switchValue && textFalse\" class=\"sl-text-gray-500\">{{ textFalse }}</span>\n </span>\n <div v-if=\"description && layout === 'stacked'\" class=\"sl-flex-1\">\n <p v-if=\"!isDescriptionHtml\" class=\"sl-mt-1 sl-text-sm sl-text-gray-600\">{{ description }}</p>\n <p v-else class=\"sl-mt-1 sl-text-sm sl-text-gray-600\" v-html=\"description\" />\n </div>\n </div>\n </FormFieldWrapper>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { Switch } from '@headlessui/vue'\nimport { useField } from 'vee-validate'\nimport { generateId } from '../../utils/id'\nimport FormFieldWrapper from '../forms/FormFieldWrapper.vue'\nimport type { ValidationRule } from '../../types/form'\n\ninterface Props {\n name: string\n modelValue?: boolean\n label?: string\n description?: string\n disabled?: boolean\n immediate?: boolean\n boxShadow?: boolean\n defaultValue?: boolean\n hideMainLabel?: boolean\n textTrue?: string\n textFalse?: string\n rules?: ValidationRule\n validateOnMount?: boolean\n successMessage?: string\n tertiaryLabel?: string\n isDescriptionHtml?: boolean\n showErrors?: boolean\n layout?: 'stacked' | 'inline'\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n immediate: false,\n boxShadow: false,\n defaultValue: false,\n hideMainLabel: false,\n isDescriptionHtml: false,\n showErrors: false,\n layout: 'stacked'\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: boolean]\n blur: [event: FocusEvent]\n focus: [event: FocusEvent]\n}>()\n\nconst switchRef = ref<any>()\nconst id = generateId(`sl-${props.name}`)\n\nconst { value, errorMessage, handleChange, handleBlur, meta } = useField(\n () => props.name,\n props.rules,\n {\n type: 'checkbox',\n validateOnMount: props.validateOnMount,\n initialValue: props.modelValue ?? props.defaultValue,\n syncVModel: true\n }\n)\n\nconst switchValue = ref<boolean>(props.modelValue ?? props.defaultValue)\n\n// Watch for external changes\nwatch(\n () => props.modelValue,\n (newValue) => {\n if (newValue !== undefined && newValue !== switchValue.value) {\n const boolVal = !!newValue\n switchValue.value = boolVal\n value.value = boolVal\n }\n },\n { immediate: true }\n)\n\nconst switchClasses = computed(() => {\n const baseClasses = [\n 'sl-relative',\n 'sl-inline-flex',\n 'sl-items-center',\n 'sl-h-6',\n 'sl-w-11',\n 'sl-flex-shrink-0',\n 'sl-cursor-pointer',\n 'sl-rounded-full',\n 'sl-border-2',\n 'sl-border-transparent',\n 'sl-transition-colors',\n 'sl-duration-200',\n 'sl-ease-in-out',\n 'focus:sl-outline-none',\n 'focus:sl-ring-2',\n 'focus:sl-ring-stachelock-600',\n 'focus:sl-ring-offset-2'\n ]\n\n if (props.disabled) {\n baseClasses.push(\n 'sl-cursor-not-allowed',\n 'sl-opacity-50'\n )\n }\n\n if (switchValue.value) {\n baseClasses.push('sl-bg-stachelock-600')\n } else {\n baseClasses.push('sl-bg-gray-200')\n }\n\n return baseClasses.join(' ')\n})\n\nconst handleToggle = (value: boolean) => {\n if (props.disabled) return\n \n switchValue.value = value\n if (props.immediate) {\n handleChange(value)\n }\n emit('update:modelValue', value)\n}\n\nconst onBlur = (event: FocusEvent) => {\n if (!props.immediate) {\n handleChange(switchValue.value)\n }\n handleBlur(event)\n emit('blur', event)\n}\n\nconst onFocus = (event: FocusEvent) => {\n emit('focus', event)\n}\n\n// Expose toggle method for external control\nconst toggle = () => {\n if (!props.disabled) {\n handleToggle(!switchValue.value)\n }\n}\n\ndefineExpose({\n toggle,\n value: switchValue,\n focus: () => {\n const el = (switchRef.value as any)?.$el ?? switchRef.value\n ;(el as HTMLButtonElement | null)?.focus?.()\n },\n blur: () => {\n const el = (switchRef.value as any)?.$el ?? switchRef.value\n ;(el as HTMLButtonElement | null)?.blur?.()\n },\n switchRef\n})\n</script>\n\n\n","<template>\n <section class=\"sl-bg-white sl-rounded-lg sl-shadow sl-p-6\">\n <h2 class=\"sl-text-xl sl-font-semibold sl-mb-4\">All Inputs Showcase</h2>\n\n <div class=\"sl-space-y-8\">\n <!-- Text Input -->\n <div>\n <h3 class=\"sl-text-sm sl-font-medium sl-text-gray-700 sl-mb-2\">Text Input</h3>\n <TextInput\n name=\"demoText\"\n label=\"Text Input\"\n placeholder=\"Type something...\"\n v-model:value=\"state.text\"\n />\n </div>\n\n <!-- Text Area Input -->\n <div>\n <h3 class=\"sl-text-sm sl-font-medium sl-text-gray-700 sl-mb-2\">Text Area</h3>\n <TextAreaInput\n name=\"demoTextArea\"\n label=\"Text Area\"\n placeholder=\"Write a longer message...\"\n :rows=\"4\"\n :maxlength=\"200\"\n v-model=\"state.textArea\"\n />\n </div>\n\n <!-- Switch Input -->\n <div>\n <h3 class=\"sl-text-sm sl-font-medium sl-text-gray-700 sl-mb-2\">Switch</h3>\n <SwitchInput\n name=\"demoSwitch\"\n label=\"Enable feature\"\n v-model=\"state.switchOn\"\n textTrue=\"ON\"\n textFalse=\"OFF\"\n />\n </div>\n\n <!-- Checkbox Input -->\n <div>\n <h3 class=\"sl-text-sm sl-font-medium sl-text-gray-700 sl-mb-2\">Checkbox</h3>\n <CheckboxInput\n name=\"demoCheckbox\"\n label=\"I agree to the terms\"\n v-model=\"state.checkbox\"\n />\n </div>\n\n <!-- Select Input -->\n <div class=\"sl-grid sl-grid-cols-1 sl-md:grid-cols-2 sl-gap-6\">\n <div>\n <h3 class=\"sl-text-sm sl-font-medium sl-text-gray-700 sl-mb-2\">Select (Single)</h3>\n <SelectInput\n name=\"demoSelect\"\n label=\"Favorite Fruit\"\n placeholder=\"Select a fruit\"\n :items=\"fruits\"\n v-model=\"state.selectedFruit\"\n />\n </div>\n <div>\n <h3 class=\"sl-text-sm sl-font-medium sl-text-gray-700 sl-mb-2\">Select (Multiple)</h3>\n <SelectInput\n name=\"demoSelectMulti\"\n label=\"Favorite Languages\"\n placeholder=\"Select languages\"\n :items=\"languages\"\n multiple\n showAll\n v-model=\"state.selectedLanguages\"\n />\n </div>\n </div>\n\n <!-- Combobox Input -->\n <div>\n <h3 class=\"sl-text-sm sl-font-medium sl-text-gray-700 sl-mb-2\">Combobox</h3>\n <ComboboxInput\n name=\"demoCombobox\"\n label=\"Search a City\"\n placeholder=\"Start typing...\"\n :items=\"cities\"\n v-model=\"state.selectedCity\"\n />\n </div>\n\n <!-- Current State -->\n <div class=\"sl-bg-gray-50 sl-rounded-md sl-p-4 sl-text-sm sl-text-gray-700\">\n <div class=\"sl-font-semibold sl-mb-1\">State</div>\n <pre class=\"sl-whitespace-pre-wrap\">{{ state }}</pre>\n </div>\n </div>\n </section>\n</template>\n\n<script setup lang=\"ts\">\nimport { reactive } from 'vue'\nimport TextInput from '../UiTextInput.vue'\nimport TextAreaInput from './TextAreaInput.vue'\nimport SwitchInput from './SwitchInput.vue'\nimport CheckboxInput from './CheckboxInput.vue'\nimport SelectInput from './SelectInput.vue'\nimport ComboboxInput from './ComboboxInput.vue'\n\nconst state = reactive({\n text: '',\n textArea: '',\n switchOn: false,\n checkbox: false,\n selectedFruit: null as null | { id: number; name: string },\n selectedLanguages: [] as Array<{ id: number; name: string }>,\n selectedCity: null as null | { id: number; name: string },\n})\n\nconst fruits = [\n { id: 1, name: 'Apple' },\n { id: 2, name: 'Banana' },\n { id: 3, name: 'Cherry' },\n { id: 4, name: 'Durian', disabled: true },\n]\n\nconst languages = [\n { id: 1, name: 'TypeScript' },\n { id: 2, name: 'JavaScript' },\n { id: 3, name: 'Python' },\n { id: 4, name: 'Go' },\n { id: 5, name: 'Rust' },\n]\n\nconst cities = [\n { id: 1, name: 'New York' },\n { id: 2, name: 'San Francisco' },\n { id: 3, name: 'Seattle' },\n { id: 4, name: 'Austin' },\n { id: 5, name: 'Chicago' },\n { id: 6, name: 'Denver' },\n { id: 7, name: 'Miami' },\n { id: 8, name: 'Boston' },\n]\n</script>\n\n\n","<template>\n <FormFieldWrapper\n :id=\"name\"\n :name=\"name\"\n :label=\"label\"\n :tertiary-label=\"tertiaryLabel\"\n :error-message=\"errorMessage\"\n :disabled=\"disabled\"\n :optional=\"optional\"\n >\n <template #tertiary-label-overlay>\n <slot name=\"tertiary-overlay\"></slot>\n </template>\n \n <div class=\"sl-flex sl-flex-wrap sl-items-center sl-gap-4 sl-rounded-md sl-bg-white sl-px-3 sm:sl-text-sm sm:sl-leading-6\"\n :class=\"inline ? null : 'sl-shadow-sm sl-border sl-border-gray-300 focus-within:sl-ring-2 focus-within:sl-ring-stachelock-600'\">\n <!-- Display selected tags as badges -->\n <UiBadge v-for=\"(tag, index) in selectedTags\" :key=\"index\" @click=\"editTag(index)\" theme=\"primary\" size=\"sm\">\n <span v-if=\"!tag.isEditing\">{{ tagDisplay(tag) }}</span>\n <input v-else ref=\"editInput\" v-model=\"tag[props.itemText]\" :placeholder=\"placeholder\"\n :disabled=\"disabled\" @keydown.enter.prevent=\"stopEditingTag(index)\"\n @blur=\"stopEditingTag(index)\"\n class=\"sl-bg-transparent sl-border-none sl-outline-none sl-text-stachelock-600 sl-text-sm placeholder:sl-text-stachelock-400/80 focus:sl-ring-0 focus:sl-ring-stachelock-600 focus:sl-rounded-lg -sl-mx-3 -sl-my-2\"\n :style=\"{ width: tag[props.itemText].length + 4 + 'ch' }\" />\n <button type=\"button\" class=\"sl-ml-2 sl-text-stachelock-600 hover:sl-text-stachelock-400 focus:sl-outline-none\"\n @click.stop=\"removeTag(index)\" :disabled=\"disabled\">\n <XMarkIcon class=\"sl-h-4 sl-w-4\" />\n </button>\n </UiBadge>\n <!-- Input for adding new tags -->\n <div class=\"sl-flex-1 sl-min-w-0 sl-relative\">\n <input ref=\"input\" v-model=\"query\" :placeholder=\"placeholder\" @input=\"filterItems\"\n :disabled=\"disabled\" @keydown.enter.prevent=\"addTag\"\n class=\"sl-w-full sl-border-none sl-outline-none sl-rounded-md focus:sl-ring-0 sl-text-sm sl-font-light -sl-mx-3 sl-pr-12\" />\n <!-- Overlay slot aligned to the far right -->\n <div class=\"sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-3 sl-pointer-events-auto\">\n <slot name=\"input-overlay\" />\n </div>\n <!-- Suggestions Dropdown -->\n <div v-if=\"showDropdown && !disabled\"\n class=\"sl-absolute sl-z-50 sl-mt-1 sl-max-h-60 sl-w-full sl-overflow-auto sl-rounded-md sl-bg-white sl-py-1 sl-text-base sl-shadow-lg sl-ring-1 sl-ring-black sl-ring-opacity-5 focus:sl-outline-none sm:sl-text-sm\">\n <div v-for=\"item in filteredItems\" :key=\"item[itemKey]\"\n class=\"sl-cursor-pointer sl-select-none sl-py-2 sl-pl-3 sl-pr-9 hover:sl-bg-stachelock-600 hover:sl-text-white\"\n @click.prevent=\"selectSuggestion(item)\">\n <div class=\"sl-flex\">\n <span class=\"sl-truncate sl-font-semibold\">\n <span class=\"sl-block sl-truncate\">{{ itemDisplay(item) }}</span>\n </span>\n <span v-if=\"showSubext\" class=\"sl-ml-2 sl-truncate sl-text-gray-500\">\n {{ itemSecondaryDisplay(item) }}\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </FormFieldWrapper>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ref, watch, onMounted, nextTick } from 'vue';\nimport { XMarkIcon } from '@heroicons/vue/20/solid';\nimport UiBadge from '../UiBadge.vue';\nimport FormFieldWrapper from '../forms/FormFieldWrapper.vue';\n\ninterface Item {\n id: string | number | null;\n [key: string]: any; // Allows dynamic keys like 'value' or 'name'\n}\n\nconst props = defineProps({\n items: {\n type: Array as () => Item[],\n required: true,\n },\n value: {\n type: Array as () => Item[],\n default: () => [],\n },\n name: {\n type: String,\n required: true,\n },\n label: {\n type: String,\n required: false,\n },\n itemKey: {\n type: String,\n default: 'id',\n },\n itemText: {\n type: String,\n default: 'value',\n },\n itemSubtext: {\n type: String,\n default: 'name',\n },\n showSubext: {\n type: Boolean,\n default: true\n },\n tagDisplayKey: {\n type: String,\n default: 'name',\n },\n tertiaryLabel: {\n type: String,\n required: false,\n },\n pattern: {\n type: RegExp,\n default: null,\n },\n inline: {\n type: Boolean,\n default: false,\n },\n placeholder: {\n type: String,\n default: 'Add a tag...',\n },\n disabled: {\n type: Boolean,\n default: false\n },\n optional: {\n type: Boolean,\n default: false\n },\n errorMessage: {\n type: String,\n default: ''\n },\n hasInputRing: {\n type: Boolean,\n default: false\n }\n});\n\nconst emits = defineEmits(['update:value', 'update:query', 'invalid-tag']);\n\nconst query = ref<string>('');\nconst filteredItems = ref<Item[]>([]);\nconst selectedTags = ref<Item[]>(JSON.parse(JSON.stringify(props.value)));\nconst showDropdown = ref(false);\n\nwatch(\n () => props.value,\n (newVal) => {\n if (JSON.stringify(newVal) !== JSON.stringify(selectedTags.value)) {\n selectedTags.value = JSON.parse(JSON.stringify(newVal));\n }\n },\n { deep: true }\n);\n\nconst itemDisplay = (item: Item) => item[props.itemSubtext] || item[props.itemText];\nconst itemSecondaryDisplay = (item: Item) => item[props.itemSubtext] ? item[props.itemText] : undefined;\nconst tagDisplay = (tag: Item) => tag[props.tagDisplayKey] || tag[props.itemText];\n\nconst filterItems = () => {\n if (query.value && query.value.length > 0) {\n emits('update:query', query.value);\n\n // Simple filtering logic\n const lowerQuery = query.value.toLowerCase();\n filteredItems.value = props.items.filter((item) => {\n return (\n item[props.itemText]?.toLowerCase().includes(lowerQuery) ||\n item[props.itemSubtext]?.toLowerCase().includes(lowerQuery)\n );\n });\n showDropdown.value = true;\n } else {\n filteredItems.value = [];\n showDropdown.value = false;\n }\n};\n\nconst addTag = () => {\n const trimmedQuery = query.value.trim();\n if (trimmedQuery === '') {\n return;\n }\n\n let tagToAdd: Item | null = null;\n\n const lowerQuery = trimmedQuery.toLowerCase();\n\n // Check if the query matches any item in the items list\n const matchedItem = props.items.find(\n (item) =>\n item[props.itemText]?.toLowerCase() === lowerQuery ||\n item[props.itemSubtext]?.toLowerCase() === lowerQuery\n );\n\n if (matchedItem) {\n tagToAdd = { ...matchedItem };\n } else if (props.pattern && props.pattern.test(trimmedQuery)) {\n // Create a new item if it doesn't exist and matches the pattern\n tagToAdd = { id: null, [props.itemText]: trimmedQuery };\n } else {\n // Do not emit invalid-tag here; let the user continue typing\n return;\n }\n\n // Avoid duplicates\n if (\n !selectedTags.value.some(\n (tag) => tag[props.itemText] === tagToAdd![props.itemText]\n )\n ) {\n selectedTags.value.push(tagToAdd!);\n emits('update:value', selectedTags.value);\n }\n\n query.value = '';\n filteredItems.value = [];\n showDropdown.value = false;\n};\n\nconst selectSuggestion = (item: Item) => {\n const valueToTest = item[props.itemText].trim();\n\n // Avoid duplicates\n if (\n !selectedTags.value.some(\n (tag) => tag[props.itemText] === valueToTest\n )\n ) {\n selectedTags.value.push({ ...item });\n emits('update:value', selectedTags.value);\n }\n query.value = '';\n filteredItems.value = [];\n showDropdown.value = false;\n};\n\nconst removeTag = (index: number) => {\n selectedTags.value.splice(index, 1);\n emits('update:value', selectedTags.value);\n};\n\nconst editTag = (index: number) => {\n selectedTags.value[index].isEditing = true;\n nextTick(() => {\n // Focus logic can be added here if needed\n });\n};\n\nconst stopEditingTag = (index: number) => {\n const tag = selectedTags.value[index];\n if (tag) {\n tag.isEditing = false;\n const valueToTest = tag[props.itemText].trim();\n\n // Validate tag if pattern is provided\n if (props.pattern && !props.pattern.test(valueToTest)) {\n emits('invalid-tag', valueToTest);\n removeTag(index);\n return;\n }\n\n // Update the tag value after trimming\n tag[props.itemText] = valueToTest;\n emits('update:value', selectedTags.value);\n }\n};\n\nonMounted(() => {\n // Initialize filteredItems\n filteredItems.value = [];\n});\n\ndefineExpose({\n selectedTags,\n});\n</script>\n\n<style scoped>\n</style>\n","<template>\n <div class=\"sl-min-h-screen sl-bg-gray-50\">\n <!-- Mobile sidebar overlay -->\n <TransitionRoot as=\"template\" :show=\"sidebarOpen\">\n <Dialog as=\"div\" class=\"sl-relative sl-z-50 lg:sl-hidden\" @close=\"closeSidebar\">\n <TransitionChild as=\"template\" enter=\"sl-transition-opacity sl-ease-linear sl-duration-300\" enter-from=\"sl-opacity-0\"\n enter-to=\"sl-opacity-100\" leave=\"sl-transition-opacity sl-ease-linear sl-duration-300\" leave-from=\"sl-opacity-100\"\n leave-to=\"sl-opacity-0\">\n <div class=\"sl-fixed sl-inset-0 sl-bg-gray-900/80\" />\n </TransitionChild>\n\n <div class=\"sl-fixed sl-inset-0 sl-flex\">\n <TransitionChild as=\"template\" enter=\"sl-transition sl-ease-in-out sl-duration-300 sl-transform\"\n enter-from=\"-sl-translate-x-full\" enter-to=\"sl-translate-x-0\"\n leave=\"sl-transition sl-ease-in-out sl-duration-300 sl-transform\" leave-from=\"sl-translate-x-0\"\n leave-to=\"-sl-translate-x-full\">\n <DialogPanel class=\"sl-relative sl-mr-16 sl-flex sl-w-full sl-max-w-xs sl-flex-1\">\n <TransitionChild as=\"template\" enter=\"sl-ease-in-out sl-duration-300\" enter-from=\"sl-opacity-0\"\n enter-to=\"sl-opacity-100\" leave=\"sl-ease-in-out sl-duration-300\" leave-from=\"sl-opacity-100\" leave-to=\"sl-opacity-0\">\n <div class=\"sl-absolute sl-left-full sl-top-0 sl-flex sl-w-16 sl-justify-center sl-pt-5\">\n <button type=\"button\" class=\"-sl-m-2.5 sl-p-2.5\" @click=\"closeSidebar()\">\n <span class=\"sl-sr-only\">Close sidebar</span>\n <XMarkIcon class=\"sl-h-6 sl-w-6 sl-text-stachelock-050\" aria-hidden=\"true\" />\n </button>\n </div>\n </TransitionChild>\n\n <div class=\"sl-flex sl-grow sl-flex-col sl-gap-y-5 sl-bg-stachelock-600 sl-px-6 sl-pb-2 sl-ring-1 sl-ring-white/10\">\n <div class=\"sl-flex sl-h-16 sl-shrink-0 sl-items-center\">\n <slot name=\"logo\">\n <div class=\"sl-text-stachelock-050 sl-font-semibold sl-text-lg\">Logo</div>\n </slot>\n </div>\n <nav class=\"sl-flex sl-flex-1 sl-flex-col\">\n <ul role=\"list\" class=\"-sl-mx-2 sl-flex-1 sl-space-y-1\">\n <slot name=\"navigation\">\n <!-- Default navigation slot -->\n </slot>\n </ul>\n </nav>\n <div class=\"sl-mt-auto\">\n <slot name=\"sidebar-footer\">\n <!-- Sidebar footer content -->\n </slot>\n </div>\n </div>\n </DialogPanel>\n </TransitionChild>\n </div>\n </Dialog>\n </TransitionRoot>\n\n <!-- Desktop sidebar -->\n <div class=\"sl-hidden lg:sl-fixed lg:sl-inset-y-0 lg:sl-left-0 lg:sl-z-50 lg:sl-block lg:sl-pb-4 sl-pt-4 lg:sl-bg-stachelock-600\"\n :class=\"isWideSidebar ? 'lg:sl-w-72' : 'lg:sl-w-20'\">\n <div class=\"sl-flex sl-h-16 sl-shrink-0 sl-items-center sl-px-6\">\n <slot name=\"logo\">\n <div class=\"sl-text-stachelock-050 sl-font-semibold sl-text-lg\">Logo</div>\n </slot>\n </div>\n <nav class=\"sl-mt-8 sl-flex sl-flex-col sl-justify-between sl-h-full\">\n <ul role=\"list\" :class=\"isWideSidebar ? 'sl-flex sl-flex-col sl-items-start sl-mx-4 sl-space-y-1' : 'sl-flex sl-flex-col sl-items-center sl-space-y-1'\">\n <slot name=\"navigation\">\n <!-- Default navigation slot -->\n </slot>\n </ul>\n <div class=\"sl-absolute sl-bottom-4 sl-left-0 sl-right-0 sl-px-6\">\n <slot name=\"sidebar-footer\">\n <!-- Sidebar footer content -->\n </slot>\n </div>\n </nav>\n </div>\n\n <!-- Main content area -->\n <div :class=\"['lg:sl-pl-20', isWideSidebar ? 'lg:sl-pl-72' : 'lg:sl-pl-20']\">\n <!-- Header -->\n <div class=\"sl-sticky sl-top-0 sl-z-40 sl-flex sl-h-16 sl-shrink-0 sl-items-center sl-gap-x-4 sl-border-b sl-border-gray-200 sl-bg-white sl-px-4 sl-shadow-sm sm:sl-gap-x-6 sm:sl-px-6 lg:sl-px-8\">\n <button type=\"button\" class=\"-sl-m-2.5 sl-p-2.5 sl-text-gray-700 lg:sl-hidden\" @click=\"openSidebar()\">\n <span class=\"sl-sr-only\">Open sidebar</span>\n <Bars3Icon class=\"sl-h-6 sl-w-6\" aria-hidden=\"true\" />\n </button>\n\n <!-- Separator -->\n <div class=\"sl-h-6 sl-w-px sl-bg-gray-900/10 lg:sl-hidden\" aria-hidden=\"true\" />\n\n <div class=\"sl-flex sl-flex-1 sl-gap-x-4 sm:sl-self-stretch lg:sl-gap-x-6\">\n <div class=\"sl-relative sl-flex sl-flex-1\">\n <slot name=\"header-content\">\n <!-- Header content -->\n </slot>\n </div>\n <div class=\"sl-flex sl-items-center sl-gap-x-4 lg:sl-gap-x-6\">\n <slot name=\"header-right\">\n <!-- Header right content (notifications, profile, etc.) -->\n </slot>\n </div>\n </div>\n </div>\n\n <!-- Page header -->\n <div v-if=\"$slots['page-header']\" class=\"sl-border-b sl-border-gray-200 sl-bg-white sl-px-4 sl-py-6 sm:sl-px-6 lg:sl-px-8\">\n <slot name=\"page-header\">\n <!-- Page header content -->\n </slot>\n </div>\n\n <!-- Main content -->\n <main class=\"sl-px-4 sm:sl-px-6 lg:sl-px-8 sl-py-6\">\n <slot name=\"main\">\n <!-- Main content slot -->\n </slot>\n </main>\n\n <!-- Footer -->\n <footer v-if=\"$slots.footer\" class=\"sl-border-t sl-border-gray-200 sl-bg-white sl-px-4 sl-py-6 sm:sl-px-6 lg:sl-px-8\">\n <slot name=\"footer\">\n <!-- Footer content -->\n </slot>\n </footer>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Dialog, DialogPanel, TransitionChild, TransitionRoot } from '@headlessui/vue';\nimport { Bars3Icon, XMarkIcon } from '@heroicons/vue/24/outline';\n\nconst props = defineProps({\n isWideSidebar: {\n type: Boolean,\n default: false\n }\n});\n\nconst emit = defineEmits(['sidebar-toggle']);\n\nconst sidebarOpen = ref(false);\n\nconst closeSidebar = () => {\n sidebarOpen.value = false;\n};\n\nconst openSidebar = () => {\n sidebarOpen.value = true;\n};\n\n\n</script>\n\n<style scoped>\n</style>\n","<template>\n <div class=\"sl-relative\">\n <!-- Header with title -->\n <div v-if=\"title\" class=\"sl-py-16 lg:sl-ml-12 sl-mx-2\">\n <div class=\"sl-mx-auto sl-max-w-7xl\">\n <div class=\"sl-mx-auto sl-max-w-2xl lg:sl-mx-0\">\n <h1 :class=\"titleClass\">{{ title }}</h1>\n <p v-if=\"subtitle\" :class=\"subtitleClass\" class=\"sl-mt-6\">{{ subtitle }}</p>\n <div class=\"sl-h-2\">\n <template v-if=\"$slots.bottomCaption\">\n <div class=\"sl-mt-1\">\n <slot name=\"bottomCaption\"></slot>\n </div>\n </template>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Header without title - for right slot only -->\n <header v-else-if=\"!title && $slots.right\" class=\"sl-mx-auto sl-z-50 sl-flex sl-h-16 lg:sl-h-16 sl-border-gray-900/10\">\n <div class=\"sl-flex sl-h-16 lg:sl-h-16 sl-w-full sl-px-4 sm:sl-px-6 lg:sl-px-8 sl-justify-between\">\n <div class=\"sl-hidden lg:sl-flex lg:sl-justify-start lg:sl-items-center\">\n <!-- Empty space to match positioning -->\n </div>\n <div class=\"sl-flex sl-justify-end sl-items-center sl-ml-auto\">\n <slot name=\"right\"></slot>\n </div>\n </div>\n </header>\n\n <!-- Main content slot -->\n <template v-if=\"$slots.main\">\n <div class=\"lg:sl-mx-12 sl-mx-2 sl-pb-16\">\n <slot name=\"main\"></slot>\n </div>\n </template>\n\n <!-- Container slot -->\n <template v-if=\"$slots.container\">\n <div :class=\"!title ? 'sl-my-4 sm:sl-py-12' : 'sl-pb-12'\">\n <slot name=\"container\"></slot>\n </div>\n </template>\n\n <!-- Home slot -->\n <template v-if=\"$slots.home\">\n <slot name=\"home\"></slot>\n </template>\n\n <!-- Default slot -->\n <template v-if=\"$slots.default\">\n <div class=\"lg:sl-mx-12 sl-mx-2 sl-pb-16\">\n <slot></slot>\n </div>\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps({\n title: {\n type: String,\n required: false,\n default: ''\n },\n titleClass: {\n type: String,\n default: 'sl-text-4xl sl-font-bold sl-tracking-tight sl-text-gray-800'\n },\n subtitle: {\n type: String,\n required: false,\n default: ''\n },\n subtitleClass: {\n type: String,\n default: 'sl-text-lg sl-leading-8 sl-text-gray-600'\n }\n});\n</script>\n\n<style scoped>\n</style>\n","<template>\n <div class=\"sl-min-h-screen sl-bg-gray-50\">\n <!-- Header -->\n <header class=\"sl-bg-white sl-shadow\">\n <div class=\"sl-mx-auto sl-max-w-7xl sl-px-4 sm:sl-px-6 lg:sl-px-8\">\n <div class=\"sl-flex sl-h-16 sl-items-center sl-justify-between\">\n <!-- Logo and primary navigation -->\n <div class=\"sl-flex sl-items-center\">\n <div class=\"sl-flex-shrink-0\">\n <slot name=\"logo\">\n <div class=\"sl-text-xl sl-font-bold sl-text-stachelock-600\">Logo</div>\n </slot>\n </div>\n <nav class=\"sl-ml-10 sl-hidden sm:sl-flex sm:sl-space-x-8\">\n <slot name=\"primary-navigation\">\n <!-- Primary navigation items -->\n </slot>\n </nav>\n </div>\n\n <!-- Right side content -->\n <div class=\"sl-flex sl-items-center sl-space-x-4\">\n <slot name=\"header-right\">\n <!-- Header right content (search, notifications, profile, etc.) -->\n </slot>\n </div>\n </div>\n </div>\n\n <!-- Mobile navigation -->\n <div class=\"sm:sl-hidden\">\n <slot name=\"mobile-navigation\">\n <!-- Mobile navigation content -->\n </slot>\n </div>\n </header>\n\n <!-- Main content -->\n <main>\n <div class=\"sl-mx-auto sl-max-w-7xl sl-py-6 sm:sl-px-6 lg:sl-px-8\">\n <slot name=\"main\">\n <!-- Main content slot -->\n </slot>\n </div>\n </main>\n\n <!-- Footer -->\n <footer v-if=\"$slots.footer\" class=\"sl-bg-white sl-border-t sl-border-gray-200\">\n <div class=\"sl-mx-auto sl-max-w-7xl sl-px-4 sm:sl-px-6 lg:sl-px-8\">\n <div class=\"sl-py-8\">\n <slot name=\"footer\">\n <!-- Footer content -->\n </slot>\n </div>\n </div>\n </footer>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n// No props needed for this component\n</script>\n\n<style scoped>\n</style>\n","<template>\n <div class=\"sl-space-y-1\">\n <!-- Group header -->\n <h3 v-if=\"title\" :class=\"[\n 'sl-px-3 sl-py-2 sl-text-xs sl-font-semibold sl-text-stachelock-050 sl-uppercase sl-tracking-wider',\n iconOnly ? 'sl-text-center' : ''\n ]\">\n {{ title }}\n </h3>\n \n <!-- Navigation items -->\n <ul role=\"list\" class=\"sl-space-y-1\">\n <slot>\n <!-- Default navigation items slot -->\n </slot>\n </ul>\n </div>\n</template>\n\n<script setup lang=\"ts\">\ndefineProps<{\n title?: string;\n iconOnly?: boolean;\n}>();\n</script>\n\n<style scoped>\n</style>\n","<template>\n <li>\n <a :href=\"href\" :class=\"[\n 'sl-group sl-flex sl-gap-x-3 sl-rounded-md sl-p-2 sl-text-sm sl-leading-6 sl-font-semibold',\n isActive \n ? 'sl-bg-stachelock-400 sl-text-stachelock-050' \n : 'sl-text-stachelock-300 hover:sl-text-stachelock-050 hover:sl-bg-white/10'\n ]\">\n <component \n :is=\"icon\" \n :class=\"[\n 'sl-h-6 sl-w-6 sl-shrink-0',\n isActive \n ? 'sl-text-stachelock-050' \n : 'sl-text-stachelock-300 group-hover:sl-text-stachelock-050'\n ]\" \n aria-hidden=\"true\" \n />\n <span v-if=\"!iconOnly\" class=\"sl-truncate\">{{ name }}</span>\n <span v-if=\"badge\" :class=\"[\n 'sl-ml-auto sl-inline-flex sl-items-center sl-rounded-md sl-px-2 sl-py-1 sl-text-xs sl-font-medium',\n badgeTheme === 'primary' ? 'sl-bg-stachelock-400 sl-text-white' : '',\n badgeTheme === 'secondary' ? 'sl-bg-gray-400 sl-text-white' : '',\n badgeTheme === 'success' ? 'sl-bg-green-400 sl-text-white' : '',\n badgeTheme === 'warning' ? 'sl-bg-yellow-400 sl-text-white' : '',\n badgeTheme === 'danger' ? 'sl-bg-red-400 sl-text-white' : ''\n ]\">\n {{ badge }}\n </span>\n </a>\n </li>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Component } from 'vue';\n\ndefineProps<{\n name: string;\n href: string;\n icon: Component;\n isActive?: boolean;\n iconOnly?: boolean;\n badge?: string;\n badgeTheme?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';\n}>();\n</script>\n\n<style scoped>\n</style>\n","<template>\n <div class=\"sl-relative\">\n <!-- Mobile sidebar overlay -->\n <TransitionRoot as=\"template\" :show=\"sidebarOpen\">\n <Dialog as=\"div\" class=\"sl-relative sl-z-50 lg:sl-hidden\" @close=\"closeSidebar\">\n <TransitionChild as=\"template\" enter=\"sl-transition-opacity sl-ease-linear sl-duration-300\"\n enter-from=\"sl-opacity-0\" enter-to=\"sl-opacity-100\"\n leave=\"sl-transition-opacity sl-ease-linear sl-duration-300\" leave-from=\"sl-opacity-100\"\n leave-to=\"sl-opacity-0\">\n <div class=\"sl-fixed sl-inset-0 sl-bg-gray-900/80\" />\n </TransitionChild>\n\n <div class=\"sl-fixed sl-inset-0 sl-flex\">\n <TransitionChild as=\"template\" enter=\"sl-transition sl-ease-in-out sl-duration-300 sl-transform\"\n enter-from=\"-sl-translate-x-full\" enter-to=\"sl-translate-x-0\"\n leave=\"sl-transition sl-ease-in-out sl-duration-300 sl-transform\" leave-from=\"sl-translate-x-0\"\n leave-to=\"-sl-translate-x-full\">\n <DialogPanel class=\"sl-relative sl-mr-16 sl-flex sl-w-full sl-max-w-xs sl-flex-1\">\n <TransitionChild as=\"template\" enter=\"sl-ease-in-out sl-duration-300\" enter-from=\"sl-opacity-0\"\n enter-to=\"sl-opacity-100\" leave=\"sl-ease-in-out sl-duration-300\" leave-from=\"sl-opacity-100\"\n leave-to=\"sl-opacity-0\">\n <div class=\"sl-absolute sl-left-full sl-top-0 sl-flex sl-w-16 sl-justify-center sl-pt-5\">\n <button type=\"button\" class=\"-sl-m-2.5 sl-p-2.5\" @click=\"closeSidebar()\">\n <span class=\"sl-sr-only\">Close sidebar</span>\n <XMarkIcon class=\"sl-h-6 sl-w-6 sl-text-stachelock-050\" aria-hidden=\"true\" />\n </button>\n </div>\n </TransitionChild>\n\n <div\n class=\"sl-flex sl-grow sl-flex-col sl-gap-y-5 sl-bg-stachelock-600 sl-px-6 sl-pb-2 sl-ring-1 sl-ring-white/10\">\n <div class=\"sl-flex sl-h-16 sl-shrink-0 sl-items-center\">\n <slot name=\"logo\">\n <div class=\"sl-text-stachelock-050 sl-font-semibold sl-text-lg\">Logo</div>\n </slot>\n </div>\n <nav class=\"sl-flex sl-flex-1 sl-flex-col\">\n <ul role=\"list\" class=\"-sl-mx-2 sl-flex-1 sl-space-y-1\">\n <slot name=\"navigation\">\n <!-- Default navigation slot -->\n </slot>\n </ul>\n </nav>\n <div class=\"sl-mt-auto\">\n <slot name=\"sidebar-footer\">\n <!-- Sidebar footer content -->\n </slot>\n </div>\n </div>\n </DialogPanel>\n </TransitionChild>\n </div>\n </Dialog>\n </TransitionRoot>\n\n <!-- Desktop sidebar -->\n <div\n class=\"sl-hidden lg:sl-fixed lg:sl-inset-y-0 lg:sl-left-0 lg:sl-z-50 lg:sl-block lg:sl-pb-4 sl-pt-4 lg:sl-bg-stachelock-600\"\n :class=\"isWideSidebar ? 'lg:sl-w-72' : 'lg:sl-w-20'\">\n <div class=\"sl-flex sl-h-16 sl-shrink-0 sl-items-center sl-px-6\">\n <slot name=\"logo\">\n <div class=\"sl-text-stachelock-050 sl-font-semibold sl-text-lg\">Logo</div>\n </slot>\n </div>\n <nav class=\"sl-mt-8 sl-flex sl-flex-col sl-justify-between sl-h-full\">\n <ul role=\"list\"\n :class=\"isWideSidebar ? 'sl-flex sl-flex-col sl-items-start sl-mx-4 sl-space-y-1' : 'sl-flex sl-flex-col sl-items-center sl-space-y-1'\">\n <slot name=\"navigation\">\n <!-- Default navigation slot -->\n </slot>\n </ul>\n <div class=\"sl-absolute sl-bottom-4 sl-left-0 sl-right-0 sl-px-6\">\n <slot name=\"sidebar-footer\">\n <!-- Sidebar footer content -->\n </slot>\n </div>\n </nav>\n </div>\n\n <!-- Main content area -->\n <div :class=\"['lg:sl-pl-20', isWideSidebar ? 'lg:sl-pl-72' : 'lg:sl-pl-20']\">\n <!-- Header -->\n <div\n class=\"sl-sticky sl-top-0 sl-z-40 sl-flex sl-h-16 sl-shrink-0 sl-items-center sl-gap-x-4 sl-border-b sl-border-gray-200 sl-bg-white sl-px-4 sl-shadow-sm sm:sl-gap-x-6 sm:sl-px-6 lg:sl-px-8\">\n <button type=\"button\" class=\"-sl-m-2.5 sl-p-2.5 sl-text-gray-700 lg:sl-hidden\" @click=\"openSidebar()\">\n <span class=\"sl-sr-only\">Open sidebar</span>\n <Bars3Icon class=\"sl-h-6 sl-w-6\" aria-hidden=\"true\" />\n </button>\n\n <!-- Separator -->\n <div class=\"sl-h-6 sl-w-px sl-bg-gray-900/10 lg:sl-hidden\" aria-hidden=\"true\" />\n\n <div class=\"sl-flex sl-flex-1 sl-gap-x-4 sm:sl-self-stretch lg:sl-gap-x-6\">\n <div class=\"sl-relative sl-flex sl-flex-1\">\n <slot name=\"header-content\">\n <!-- Header content -->\n </slot>\n </div>\n <div class=\"sl-flex sl-items-center sl-gap-x-4 lg:sl-gap-x-6\">\n <slot name=\"header-right\">\n <!-- Header right content (notifications, profile, etc.) -->\n </slot>\n </div>\n </div>\n </div>\n\n <!-- Main content -->\n <main class=\"sl-px-4 sm:sl-px-6 lg:sl-px-8 sl-py-6\">\n <slot name=\"main\">\n <!-- Main content slot -->\n </slot>\n </main>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport { Dialog, DialogPanel, TransitionChild, TransitionRoot } from '@headlessui/vue';\nimport { Bars3Icon, XMarkIcon } from '@heroicons/vue/24/outline';\n\ndefineProps({\n isWideSidebar: {\n type: Boolean,\n default: false\n }\n});\n\nconst sidebarOpen = ref(false);\n\nconst closeSidebar = () => {\n sidebarOpen.value = false;\n};\n\nconst openSidebar = () => {\n sidebarOpen.value = true;\n};\n\n</script>\n\n<style scoped></style>\n","import type { App } from 'vue';\nimport * as components from './components';\nimport * as layouts from './components/layouts';\nimport * as inputs from './components/inputs';\nimport * as calendars from './components/calendars';\nimport * as forms from './components/forms';\n\n// Combine all components\nconst allComponents = {\n ...components,\n ...layouts,\n ...inputs,\n ...calendars,\n ...forms,\n};\n\n// Plugin interface\nexport interface StachelockUIOptions {\n /**\n * Component name prefix (default: 'Sl')\n */\n prefix?: string;\n /**\n * Array of component names to install globally\n */\n components?: string[];\n /**\n * Whether to install all components globally\n */\n installAll?: boolean;\n}\n\n// Vue plugin\nexport const StachelockUI = {\n install(app: App, options: StachelockUIOptions = {}) {\n const { prefix = 'Sl', installAll = false, components: selectedComponents } = options;\n\n // Register components\n Object.entries(allComponents).forEach(([name, component]) => {\n const shouldInstall = installAll || \n (selectedComponents && selectedComponents.includes(name)) ||\n (!selectedComponents && !installAll);\n\n if (shouldInstall) {\n // Register non-prefixed\n app.component(name, component);\n // Also register prefixed alias for back-compat\n const prefixedName = name.startsWith(prefix) ? name : `${prefix}${name}`;\n app.component(prefixedName, component);\n }\n });\n }\n};\n\nexport default StachelockUI;\n"],"names":["generateId","prefix","generateDeterministicId","seed","hash","i","char","sanitizeId","id","defaultInputClasses","defaultInputRingClasses","disabledInputClasses","props","__props","slots","useSlots","hasPrefixSlot","computed","fieldClasses","wrapperRingClasses","_createElementBlock","_normalizeClass","errorMessage","isTouched","showErrors","isValid","_createElementVNode","_hoisted_1","label","optional","_hoisted_3","disabled","disabledMessage","_Fragment","_hoisted_4","_toDisplayString","tertiaryLabel","_openBlock","_hoisted_5","_renderSlot","_ctx","_hoisted_6","_hoisted_7","_createVNode","_unref","ExclamationCircleIcon","showValidCheck","_hoisted_8","CheckCircleIcon","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_Transition","successMessage","_hoisted_14","_hoisted_15","emits","__emit","touched","ref","validateOnMountRef","inputValue","handleChange","meta","validate","setTouched","useField","toRef","emitValue","v","debouncedEmit","debounce","handleInput","e","handleBlur","handleFocus","watch","nextTick","FormFieldWrapper","name","colorfulValidation","boxShadow","_withCtx","inputClasses","_mergeProps","type","placeholder","spellcheck","capitalize","inputClass","inputStyle","defaultComponentMap","UiTextInput","TextAreaInput","SelectInput","ComboboxInput","CheckboxInput","SwitchInput","ComponentRegistry","component","loader","mapItem","asyncComponent","defineAsyncComponent","componentRegistry","registerComponent","getComponent","imageError","handleImageError","sizeClasses","sizeClass","getNestedValue","obj","path","keys","current","key","imageUrl","url","commonPaths","displayName","hasImage","initials","names","ring","rounded","color","badgeClass","colorClass","roundedClass","isBrowser","noop","isArray","warn","msg","args","isSameRouteRecord","a","b","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","value","NavigationType","NavigationDirection","isRouteLocation","route","NavigationFailureType","routerKey","routeLocationKey","useLink","router","inject","currentRoute","hasPrevious","previousTo","to","unref","activeRecordIndex","matched","length","routeMatched","currentMatched","index","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","guardEvent","p","instance","getCurrentInstance","linkContextDevtools","watchEffect","target","outer","inner","innerValue","outerValue","record","useRouter","useRoute","_name","trailingBaseClasses","trailingAbsoluteClasses","Loading","emit","loading","replaceLeadingIconWithLoading","buttonRef","resolvedTheme","findParentBackground","node","bg","adjustThemeBasedOnBackground","el","parentBg","onMounted","newTheme","theme","loadingSize","outlineBaseClasses","filledBaseClasses","roundedClassMap","textClass","expandedClass","isLabelPresent","buttonClasses","finalClasses","trailingLoadingClasses","trailingIconClasses","leadingIconClasses","onClick","onMouseEnter","onMouseLeave","showLoadingTitle","truncateLabel","_hoisted_2","inactiveClass","activeClass","ariaCurrent","customDisabled","useCustomActiveState","toRefs","previousRoute","from","isReal","resolved","computedClasses","classes","displayLoading","handleClick","event","error","_createBlock","UiButton","$attrs","$slots","breadcrumbs","currentPath","processedBreadcrumbs","breadcrumb","trimmedName","processSegments","pathSegments","tempBreadcrumbs","segment","segmentName","handleBreadcrumbClick","isErrorPage","_renderList","ChevronRightIcon","UiNavLink","_createTextVNode","containerClasses","spinnerClasses","sizeMapping","colorMapping","textClasses","overlay","text","dotSizeClass","n","fallbackFocusRef","initialFocusElement","onClose","onConfirm","TransitionRoot","Dialog","TransitionChild","_cache","DialogPanel","DialogTitle","progress","newValue","sorting","tableColumns","col","truncateConfig","t","info","tableOptions","getCoreRowModel","getSortedRowModel","updaterOrValue","table","useVueTable","getTitleCell","row","visibleCells","config","cell","titlePatterns","pattern","getColumnHeader","header","getColumnValue","getPrimaryCells","ids","c","getSecondaryCells","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","FlexRender","_hoisted_30","_hoisted_31","_hoisted_32","durationClasses","transition","enterActiveClass","enterFromClass","enterToClass","leaveActiveClass","leaveFromClass","leaveToClass","show","handleValidation","selectedValue","coerced","selectClasses","baseClasses","getItemKey","item","getItemText","displayValue","selectedIcon","allItems","isAllSelected","selectable","toggleSelectAll","rules","Listbox","$event","multiple","ListboxButton","buttonClass","_resolveDynamicComponent","ChevronUpDownIcon","ListboxOptions","showAll","items","ListboxOption","active","selected","CheckIcon","viewOptions","selectedView","option","newView","viewOption","newViewOption","prev","next","hasEvent","day","formattedDays","handleDoubleClick","dayIdx","days","formatDate","dateStr","NoSymbolOutline","MapPinOutline","CalendarIcon","MapPinSolid","NoSymbolSolid","now","threeMonthsFromNow","upcomingEvents","eventDate","pastEvents","groupedPastEventsByYear","groups","year","yearA","yearB","events","handleShowAll","showAllButton","EventCard","group","selectedDay","filteredEvents","handleDaySelect","handleDoubleSelectDay","handleViewChange","view","handleRangeChange","direction","handleNewEventClick","CalendarHeader","MonthCalendar","EventsList","calculateGridRow","datetime","d","hours","minutes","totalMinutes","calculateGridSpan","startDateTime","endDateTime","start","diffInMinutes","spanPerMinute","formatTime","date","period","formattedHours","formattedMinutes","calculateColStart","column","container","containerNav","containerOffset","activeDay","isActiveDay","setActiveDay","handleSelectEvent","eventId","filteredDays","currentMinute","containerElement","containerNavElement","containerOffsetElement","hour","isMobile","updateIsMobile","newVal","firstWithEvents","onUnmounted","months","month","componentMap","fieldComponent","componentLoader","fieldValue","getDefaultValue","componentProps","baseProps","componentEvents","baseEvents","handleFieldChange","_toHandlers","ExclamationTriangleIcon","field","formRef","formData","reactive","veeHandleSubmit","setErrors","useForm","initializeFormData","initialData","section","newData","formSections","formClasses","sectionClasses","columns","shouldShowField","isFormValid","handleSubmit","values","handleCancel","__expose","fieldName","_withModifiers","schema","sectionIndex","SlDynamicFormField","showActions","actionsAlignment","showCancelButton","SlButton","cancelButtonText","submitButtonVariant","submitButtonText","formError","checkboxRef","descriptionHtml","checkboxValue","checkboxClasses","toggle","focus","blur","onBlur","onFocus","onDescriptionClick","layout","description","isDescriptionHtml","itemsPerPage","query","wrapperClasses","filteredItems","visibleItems","currentPage","loadMoreItems","end","resetPagination","recomputeFilteredItems","lower","onQueryInput","displayComboboxValue","val","queryValue","handleManualEntry","onScroll","element","Combobox","ComboboxButton","ComboboxOptions","ComboboxOption","textareaRef","textareaClasses","onInput","_withDirectives","rows","maxlength","switchRef","switchValue","boolVal","switchClasses","handleToggle","hideMainLabel","Switch","textTrue","textFalse","state","fruits","languages","cities","TextInput","selectedTags","showDropdown","itemDisplay","itemSecondaryDisplay","tagDisplay","tag","filterItems","lowerQuery","addTag","trimmedQuery","tagToAdd","matchedItem","selectSuggestion","valueToTest","removeTag","editTag","stopEditingTag","UiBadge","_withKeys","XMarkIcon","sidebarOpen","closeSidebar","openSidebar","Bars3Icon","title","iconOnly","href","icon","badge","badgeTheme","allComponents","inputs","calendars","forms","StachelockUI","app","options","installAll","selectedComponents","prefixedName"],"mappings":"q0BAGO,SAASA,EAAWC,EAAS,KAAc,CAChD,MAAO,GAAGA,CAAM,IAAI,KAAK,SAAS,SAAS,EAAE,EAAE,OAAO,EAAG,CAAC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